# coding: utf-8

"""
    Teambition Open API

    Teambition Open API

    The version of the OpenAPI document: 1.0.0
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""  # noqa: E501


import warnings
from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
from typing import Any, Dict, List, Optional, Tuple, Union
from typing_extensions import Annotated

from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr
from typing import Optional, Union
from typing_extensions import Annotated
from teambition_oapi_sdk.model.archive_task_v3_response import ArchiveTaskV3Response
from teambition_oapi_sdk.model.check_user_visible_in_app_response import CheckUserVisibleInAppResponse
from teambition_oapi_sdk.model.create_plan_approval_v3_request import CreatePlanApprovalV3Request
from teambition_oapi_sdk.model.create_project_plan_status_setting_v3_request import CreateProjectPlanStatusSettingV3Request
from teambition_oapi_sdk.model.create_project_plan_status_setting_v3_response import CreateProjectPlanStatusSettingV3Response
from teambition_oapi_sdk.model.delete_v3_projectplan_scenariofields_deletescenariofields_response import DeleteV3ProjectplanScenariofieldsDeletescenariofieldsResponse
from teambition_oapi_sdk.model.execute_plan_event_v3_request import ExecutePlanEventV3Request
from teambition_oapi_sdk.model.execute_plan_event_v3_response import ExecutePlanEventV3Response
from teambition_oapi_sdk.model.get_plan_status_v3_response import GetPlanStatusV3Response
from teambition_oapi_sdk.model.get_plan_v3_response import GetPlanV3Response
from teambition_oapi_sdk.model.get_project_plan_status_setting_v3_response import GetProjectPlanStatusSettingV3Response
from teambition_oapi_sdk.model.get_v3_projectplan_listscenariofields_response import GetV3ProjectplanListscenariofieldsResponse
from teambition_oapi_sdk.model.get_v3_projectplan_listscenariofieldvalues_response import GetV3ProjectplanListscenariofieldvaluesResponse
from teambition_oapi_sdk.model.get_v3_projectplan_operable_access_policy_list_response import GetV3ProjectplanOperableAccessPolicyListResponse
from teambition_oapi_sdk.model.get_v3_projectplan_plans_list_response import GetV3ProjectplanPlansListResponse
from teambition_oapi_sdk.model.get_v3_projectplan_scenariofield_value_list_response import GetV3ProjectplanScenariofieldValueListResponse
from teambition_oapi_sdk.model.get_v3_projectplan_task_operable_access_policy_list_response import GetV3ProjectplanTaskOperableAccessPolicyListResponse
from teambition_oapi_sdk.model.get_v3_projectplan_task_plans_tasks_subtasks_response import GetV3ProjectplanTaskPlansTasksSubtasksResponse
from teambition_oapi_sdk.model.list_plan_member_roles_v3_response import ListPlanMemberRolesV3Response
from teambition_oapi_sdk.model.list_plan_versions_v3_response import ListPlanVersionsV3Response
from teambition_oapi_sdk.model.list_project_plan_tasks_legacy_v3_response import ListProjectPlanTasksLegacyV3Response
from teambition_oapi_sdk.model.list_visible_plans_v3_response import ListVisiblePlansV3Response
from teambition_oapi_sdk.model.post_v3_projectplan_change_rule_update_request import PostV3ProjectplanChangeRuleUpdateRequest
from teambition_oapi_sdk.model.post_v3_projectplan_createscenariofields_request import PostV3ProjectplanCreatescenariofieldsRequest
from teambition_oapi_sdk.model.post_v3_projectplan_createscenariofields_response import PostV3ProjectplanCreatescenariofieldsResponse
from teambition_oapi_sdk.model.post_v3_projectplan_project_plans_request import PostV3ProjectplanProjectPlansRequest
from teambition_oapi_sdk.model.post_v3_projectplan_project_plans_response import PostV3ProjectplanProjectPlansResponse
from teambition_oapi_sdk.model.post_v3_projectplan_task_plans_addexisttasks_request import PostV3ProjectplanTaskPlansAddexisttasksRequest
from teambition_oapi_sdk.model.post_v3_projectplan_task_plans_addexisttasks_response import PostV3ProjectplanTaskPlansAddexisttasksResponse
from teambition_oapi_sdk.model.post_v3_projectplan_task_plans_tasks_request import PostV3ProjectplanTaskPlansTasksRequest
from teambition_oapi_sdk.model.post_v3_projectplan_task_plans_tasks_response import PostV3ProjectplanTaskPlansTasksResponse
from teambition_oapi_sdk.model.put_v3_projectplan_scenariofields_updatescenariofieldvalue_request import PutV3ProjectplanScenariofieldsUpdatescenariofieldvalueRequest
from teambition_oapi_sdk.model.put_v3_projectplan_scenariofields_updatescenariofieldvalue_response import PutV3ProjectplanScenariofieldsUpdatescenariofieldvalueResponse
from teambition_oapi_sdk.model.put_v3_projectplan_task_plans_tasks_executorid_request import PutV3ProjectplanTaskPlansTasksExecutoridRequest
from teambition_oapi_sdk.model.search_project_plan_tasks_v3_response import SearchProjectPlanTasksV3Response
from teambition_oapi_sdk.model.update_plan_approval_v3_request import UpdatePlanApprovalV3Request
from teambition_oapi_sdk.model.update_plan_custom_status_v3_request import UpdatePlanCustomStatusV3Request
from teambition_oapi_sdk.model.update_plan_custom_status_v3_response import UpdatePlanCustomStatusV3Response
from teambition_oapi_sdk.model.update_plan_member_role_v3_request import UpdatePlanMemberRoleV3Request
from teambition_oapi_sdk.model.update_plan_member_role_v3_response import UpdatePlanMemberRoleV3Response
from teambition_oapi_sdk.model.update_project_plan_task_v3_request import UpdateProjectPlanTaskV3Request
from teambition_oapi_sdk.model.update_project_plan_task_v3_response import UpdateProjectPlanTaskV3Response
from teambition_oapi_sdk.model.update_task_executor_v3_response import UpdateTaskExecutorV3Response
from teambition_oapi_sdk.model.update_task_lock_v3_request import UpdateTaskLockV3Request

from teambition_oapi_sdk.api_client import ApiClient, RequestSerialized
from teambition_oapi_sdk.api_response import ApiResponse
from teambition_oapi_sdk.rest import RESTResponseType

class ProjectplanApi:
    """NOTE: This class is auto generated by OpenAPI Generator
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    def __init__(self, api_client=None) -> None:
        if api_client is None:
            api_client = ApiClient.get_default()
        self.api_client = api_client

    @validate_call
    def create_plan_approval_v3(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="租户 ID")] = None,
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        create_plan_approval_v3_request: Optional[CreatePlanApprovalV3Request] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ExecutePlanEventV3Response:
        """创建计划审批信息

        创建计划审批信息

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param x_tenant_id: 租户 ID
        :type x_tenant_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param create_plan_approval_v3_request: 
        :type create_plan_approval_v3_request: CreatePlanApprovalV3Request
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._create_plan_approval_v3_serialize(
            project_plan_id=project_plan_id,
            x_tenant_id=x_tenant_id,
            x_operator_id=x_operator_id,
            create_plan_approval_v3_request=create_plan_approval_v3_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ExecutePlanEventV3Response",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    def create_plan_approval_v3_with_http_info(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="租户 ID")] = None,
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        create_plan_approval_v3_request: Optional[CreatePlanApprovalV3Request] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[ExecutePlanEventV3Response]:
        """创建计划审批信息

        创建计划审批信息

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param x_tenant_id: 租户 ID
        :type x_tenant_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param create_plan_approval_v3_request: 
        :type create_plan_approval_v3_request: CreatePlanApprovalV3Request
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._create_plan_approval_v3_serialize(
            project_plan_id=project_plan_id,
            x_tenant_id=x_tenant_id,
            x_operator_id=x_operator_id,
            create_plan_approval_v3_request=create_plan_approval_v3_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ExecutePlanEventV3Response",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    def create_plan_approval_v3_without_preload_content(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="租户 ID")] = None,
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        create_plan_approval_v3_request: Optional[CreatePlanApprovalV3Request] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """创建计划审批信息

        创建计划审批信息

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param x_tenant_id: 租户 ID
        :type x_tenant_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param create_plan_approval_v3_request: 
        :type create_plan_approval_v3_request: CreatePlanApprovalV3Request
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._create_plan_approval_v3_serialize(
            project_plan_id=project_plan_id,
            x_tenant_id=x_tenant_id,
            x_operator_id=x_operator_id,
            create_plan_approval_v3_request=create_plan_approval_v3_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ExecutePlanEventV3Response",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        return response_data.response

    def _create_plan_approval_v3_serialize(
        self,
        project_plan_id,
        x_tenant_id,
        x_operator_id,
        create_plan_approval_v3_request,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = 'https://open.teambition.com/api'  

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if project_plan_id is not None:
            _path_params['projectPlanId'] = project_plan_id
        # process the query parameters
        # process the header parameters
        if x_tenant_id is not None:
            _header_params['X-Tenant-Id'] = x_tenant_id
        if x_operator_id is not None:
            _header_params['X-Operator-Id'] = x_operator_id
        # process the form parameters
        # process the body parameter
        if create_plan_approval_v3_request is not None:
            _body_params = create_plan_approval_v3_request


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )

        # set the HTTP header `Content-Type`
        if _content_type:
            _header_params['Content-Type'] = _content_type
        else:
            _default_content_type = (
                self.api_client.select_header_content_type(
                    [
                        'application/json'
                    ]
                )
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = [
            'appToken'
        ]

        # Build the full URL
        url = _host + "/v3/projectplan/plans/{projectPlanId}/approve"
        url = url.replace('{' + 'projectPlanId' + '}', str(project_plan_id))

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/v3/projectplan/plans/{projectPlanId}/approve',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )


    @validate_call
    def create_project_plan_status_setting_v3(
        self,
        project_id: Annotated[StrictStr, Field(description="项目ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        create_project_plan_status_setting_v3_request: Optional[CreateProjectPlanStatusSettingV3Request] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> CreateProjectPlanStatusSettingV3Response:
        """配置项目级计划自定义状态信息

        配置项目级计划自定义状态信息

        :param project_id: 项目ID (required)
        :type project_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param create_project_plan_status_setting_v3_request: 
        :type create_project_plan_status_setting_v3_request: CreateProjectPlanStatusSettingV3Request
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._create_project_plan_status_setting_v3_serialize(
            project_id=project_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            create_project_plan_status_setting_v3_request=create_project_plan_status_setting_v3_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "CreateProjectPlanStatusSettingV3Response",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    def create_project_plan_status_setting_v3_with_http_info(
        self,
        project_id: Annotated[StrictStr, Field(description="项目ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        create_project_plan_status_setting_v3_request: Optional[CreateProjectPlanStatusSettingV3Request] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[CreateProjectPlanStatusSettingV3Response]:
        """配置项目级计划自定义状态信息

        配置项目级计划自定义状态信息

        :param project_id: 项目ID (required)
        :type project_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param create_project_plan_status_setting_v3_request: 
        :type create_project_plan_status_setting_v3_request: CreateProjectPlanStatusSettingV3Request
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._create_project_plan_status_setting_v3_serialize(
            project_id=project_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            create_project_plan_status_setting_v3_request=create_project_plan_status_setting_v3_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "CreateProjectPlanStatusSettingV3Response",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    def create_project_plan_status_setting_v3_without_preload_content(
        self,
        project_id: Annotated[StrictStr, Field(description="项目ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        create_project_plan_status_setting_v3_request: Optional[CreateProjectPlanStatusSettingV3Request] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """配置项目级计划自定义状态信息

        配置项目级计划自定义状态信息

        :param project_id: 项目ID (required)
        :type project_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param create_project_plan_status_setting_v3_request: 
        :type create_project_plan_status_setting_v3_request: CreateProjectPlanStatusSettingV3Request
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._create_project_plan_status_setting_v3_serialize(
            project_id=project_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            create_project_plan_status_setting_v3_request=create_project_plan_status_setting_v3_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "CreateProjectPlanStatusSettingV3Response",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        return response_data.response

    def _create_project_plan_status_setting_v3_serialize(
        self,
        project_id,
        x_operator_id,
        x_tenant_id,
        create_project_plan_status_setting_v3_request,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = 'https://open.teambition.com/api'  

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if project_id is not None:
            _path_params['projectId'] = project_id
        # process the query parameters
        # process the header parameters
        if x_operator_id is not None:
            _header_params['x-operator-id'] = x_operator_id
        if x_tenant_id is not None:
            _header_params['X-Tenant-Id'] = x_tenant_id
        # process the form parameters
        # process the body parameter
        if create_project_plan_status_setting_v3_request is not None:
            _body_params = create_project_plan_status_setting_v3_request


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )

        # set the HTTP header `Content-Type`
        if _content_type:
            _header_params['Content-Type'] = _content_type
        else:
            _default_content_type = (
                self.api_client.select_header_content_type(
                    [
                        'application/json'
                    ]
                )
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = [
            'appToken'
        ]

        # Build the full URL
        url = _host + "/v3/projectplan/projects/{projectId}/planCustomStatusSetting"
        url = url.replace('{' + 'projectId' + '}', str(project_id))

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/v3/projectplan/projects/{projectId}/planCustomStatusSetting',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )


    @validate_call
    def delete_v3_projectplan_scenariofield_delete(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划id")],
        scenariofield_id: Annotated[StrictStr, Field(description="该字段值在计划中的场景字段id")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> DeleteV3ProjectplanScenariofieldsDeletescenariofieldsResponse:
        """删除计划字段配置

        删除计划字段配置

        :param project_plan_id: 计划id (required)
        :type project_plan_id: str
        :param scenariofield_id: 该字段值在计划中的场景字段id (required)
        :type scenariofield_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._delete_v3_projectplan_scenariofield_delete_serialize(
            project_plan_id=project_plan_id,
            scenariofield_id=scenariofield_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "DeleteV3ProjectplanScenariofieldsDeletescenariofieldsResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    def delete_v3_projectplan_scenariofield_delete_with_http_info(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划id")],
        scenariofield_id: Annotated[StrictStr, Field(description="该字段值在计划中的场景字段id")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[DeleteV3ProjectplanScenariofieldsDeletescenariofieldsResponse]:
        """删除计划字段配置

        删除计划字段配置

        :param project_plan_id: 计划id (required)
        :type project_plan_id: str
        :param scenariofield_id: 该字段值在计划中的场景字段id (required)
        :type scenariofield_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._delete_v3_projectplan_scenariofield_delete_serialize(
            project_plan_id=project_plan_id,
            scenariofield_id=scenariofield_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "DeleteV3ProjectplanScenariofieldsDeletescenariofieldsResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    def delete_v3_projectplan_scenariofield_delete_without_preload_content(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划id")],
        scenariofield_id: Annotated[StrictStr, Field(description="该字段值在计划中的场景字段id")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """删除计划字段配置

        删除计划字段配置

        :param project_plan_id: 计划id (required)
        :type project_plan_id: str
        :param scenariofield_id: 该字段值在计划中的场景字段id (required)
        :type scenariofield_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._delete_v3_projectplan_scenariofield_delete_serialize(
            project_plan_id=project_plan_id,
            scenariofield_id=scenariofield_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "DeleteV3ProjectplanScenariofieldsDeletescenariofieldsResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        return response_data.response

    def _delete_v3_projectplan_scenariofield_delete_serialize(
        self,
        project_plan_id,
        scenariofield_id,
        x_operator_id,
        x_tenant_id,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = 'https://open.teambition.com/api'  

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if project_plan_id is not None:
            _path_params['projectPlanId'] = project_plan_id
        if scenariofield_id is not None:
            _path_params['scenariofieldId'] = scenariofield_id
        # process the query parameters
        # process the header parameters
        if x_operator_id is not None:
            _header_params['x-operator-id'] = x_operator_id
        if x_tenant_id is not None:
            _header_params['X-Tenant-Id'] = x_tenant_id
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'appToken'
        ]

        # Build the full URL
        url = _host + "/v3/projectplan/{projectPlanId}/scenariofield/{scenariofieldId}/delete"
        url = url.replace('{' + 'projectPlanId' + '}', str(project_plan_id))
        url = url.replace('{' + 'scenariofieldId' + '}', str(scenariofield_id))

        return self.api_client.param_serialize(
            method='DELETE',
            resource_path='/v3/projectplan/{projectPlanId}/scenariofield/{scenariofieldId}/delete',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )


    @validate_call
    def delete_v3_projectplan_scenariofields_deletescenariofields(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划id")],
        scenariofield_id: Annotated[StrictStr, Field(description="该字段值在计划中的场景字段id")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> DeleteV3ProjectplanScenariofieldsDeletescenariofieldsResponse:
        """删除计划字段配置

        删除计划字段配置

        :param project_plan_id: 计划id (required)
        :type project_plan_id: str
        :param scenariofield_id: 该字段值在计划中的场景字段id (required)
        :type scenariofield_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._delete_v3_projectplan_scenariofields_deletescenariofields_serialize(
            project_plan_id=project_plan_id,
            scenariofield_id=scenariofield_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "DeleteV3ProjectplanScenariofieldsDeletescenariofieldsResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    def delete_v3_projectplan_scenariofields_deletescenariofields_with_http_info(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划id")],
        scenariofield_id: Annotated[StrictStr, Field(description="该字段值在计划中的场景字段id")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[DeleteV3ProjectplanScenariofieldsDeletescenariofieldsResponse]:
        """删除计划字段配置

        删除计划字段配置

        :param project_plan_id: 计划id (required)
        :type project_plan_id: str
        :param scenariofield_id: 该字段值在计划中的场景字段id (required)
        :type scenariofield_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._delete_v3_projectplan_scenariofields_deletescenariofields_serialize(
            project_plan_id=project_plan_id,
            scenariofield_id=scenariofield_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "DeleteV3ProjectplanScenariofieldsDeletescenariofieldsResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    def delete_v3_projectplan_scenariofields_deletescenariofields_without_preload_content(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划id")],
        scenariofield_id: Annotated[StrictStr, Field(description="该字段值在计划中的场景字段id")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """删除计划字段配置

        删除计划字段配置

        :param project_plan_id: 计划id (required)
        :type project_plan_id: str
        :param scenariofield_id: 该字段值在计划中的场景字段id (required)
        :type scenariofield_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._delete_v3_projectplan_scenariofields_deletescenariofields_serialize(
            project_plan_id=project_plan_id,
            scenariofield_id=scenariofield_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "DeleteV3ProjectplanScenariofieldsDeletescenariofieldsResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        return response_data.response

    def _delete_v3_projectplan_scenariofields_deletescenariofields_serialize(
        self,
        project_plan_id,
        scenariofield_id,
        x_operator_id,
        x_tenant_id,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = 'https://open.teambition.com/api'  

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if project_plan_id is not None:
            _path_params['projectPlanId'] = project_plan_id
        if scenariofield_id is not None:
            _path_params['scenariofieldId'] = scenariofield_id
        # process the query parameters
        # process the header parameters
        if x_operator_id is not None:
            _header_params['x-operator-id'] = x_operator_id
        if x_tenant_id is not None:
            _header_params['X-Tenant-Id'] = x_tenant_id
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'appToken'
        ]

        # Build the full URL
        url = _host + "/v3/projectplan/{projectPlanId}/scenariofields/{scenariofieldId}/deleteScenariofields"
        url = url.replace('{' + 'projectPlanId' + '}', str(project_plan_id))
        url = url.replace('{' + 'scenariofieldId' + '}', str(scenariofield_id))

        return self.api_client.param_serialize(
            method='DELETE',
            resource_path='/v3/projectplan/{projectPlanId}/scenariofields/{scenariofieldId}/deleteScenariofields',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )


    @validate_call
    def execute_plan_event_v3(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        event: Annotated[StrictStr, Field(description="计划执行操作,可传入自定义操作或默认计划操作，默认enum['change', 'publish','cancel'],分别对应变更/发布/取消变更")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        execute_plan_event_v3_request: Optional[ExecutePlanEventV3Request] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ExecutePlanEventV3Response:
        """更改计划状态(发布/变更/取消变更)

        更改计划状态(发布/变更/取消变更)

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param event: 计划执行操作,可传入自定义操作或默认计划操作，默认enum['change', 'publish','cancel'],分别对应变更/发布/取消变更 (required)
        :type event: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param execute_plan_event_v3_request: 
        :type execute_plan_event_v3_request: ExecutePlanEventV3Request
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._execute_plan_event_v3_serialize(
            project_plan_id=project_plan_id,
            event=event,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            execute_plan_event_v3_request=execute_plan_event_v3_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ExecutePlanEventV3Response",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    def execute_plan_event_v3_with_http_info(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        event: Annotated[StrictStr, Field(description="计划执行操作,可传入自定义操作或默认计划操作，默认enum['change', 'publish','cancel'],分别对应变更/发布/取消变更")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        execute_plan_event_v3_request: Optional[ExecutePlanEventV3Request] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[ExecutePlanEventV3Response]:
        """更改计划状态(发布/变更/取消变更)

        更改计划状态(发布/变更/取消变更)

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param event: 计划执行操作,可传入自定义操作或默认计划操作，默认enum['change', 'publish','cancel'],分别对应变更/发布/取消变更 (required)
        :type event: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param execute_plan_event_v3_request: 
        :type execute_plan_event_v3_request: ExecutePlanEventV3Request
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._execute_plan_event_v3_serialize(
            project_plan_id=project_plan_id,
            event=event,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            execute_plan_event_v3_request=execute_plan_event_v3_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ExecutePlanEventV3Response",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    def execute_plan_event_v3_without_preload_content(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        event: Annotated[StrictStr, Field(description="计划执行操作,可传入自定义操作或默认计划操作，默认enum['change', 'publish','cancel'],分别对应变更/发布/取消变更")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        execute_plan_event_v3_request: Optional[ExecutePlanEventV3Request] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """更改计划状态(发布/变更/取消变更)

        更改计划状态(发布/变更/取消变更)

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param event: 计划执行操作,可传入自定义操作或默认计划操作，默认enum['change', 'publish','cancel'],分别对应变更/发布/取消变更 (required)
        :type event: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param execute_plan_event_v3_request: 
        :type execute_plan_event_v3_request: ExecutePlanEventV3Request
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._execute_plan_event_v3_serialize(
            project_plan_id=project_plan_id,
            event=event,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            execute_plan_event_v3_request=execute_plan_event_v3_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ExecutePlanEventV3Response",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        return response_data.response

    def _execute_plan_event_v3_serialize(
        self,
        project_plan_id,
        event,
        x_operator_id,
        x_tenant_id,
        execute_plan_event_v3_request,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = 'https://open.teambition.com/api'  

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if project_plan_id is not None:
            _path_params['projectPlanId'] = project_plan_id
        if event is not None:
            _path_params['event'] = event
        # process the query parameters
        # process the header parameters
        if x_operator_id is not None:
            _header_params['x-operator-id'] = x_operator_id
        if x_tenant_id is not None:
            _header_params['X-Tenant-Id'] = x_tenant_id
        # process the form parameters
        # process the body parameter
        if execute_plan_event_v3_request is not None:
            _body_params = execute_plan_event_v3_request


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )

        # set the HTTP header `Content-Type`
        if _content_type:
            _header_params['Content-Type'] = _content_type
        else:
            _default_content_type = (
                self.api_client.select_header_content_type(
                    [
                        'application/json'
                    ]
                )
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = [
            'appToken'
        ]

        # Build the full URL
        url = _host + "/v3/projectplan/plans/{projectPlanId}/execute/{event}"
        url = url.replace('{' + 'projectPlanId' + '}', str(project_plan_id))
        url = url.replace('{' + 'event' + '}', str(event))

        return self.api_client.param_serialize(
            method='PUT',
            resource_path='/v3/projectplan/plans/{projectPlanId}/execute/{event}',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )


    @validate_call
    def get_plan_status_v3(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作人ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> GetPlanStatusV3Response:
        """查询计划状态信息

        查询计划状态信息

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param x_operator_id: 操作人ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_plan_status_v3_serialize(
            project_plan_id=project_plan_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "GetPlanStatusV3Response",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    def get_plan_status_v3_with_http_info(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作人ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[GetPlanStatusV3Response]:
        """查询计划状态信息

        查询计划状态信息

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param x_operator_id: 操作人ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_plan_status_v3_serialize(
            project_plan_id=project_plan_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "GetPlanStatusV3Response",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    def get_plan_status_v3_without_preload_content(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作人ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """查询计划状态信息

        查询计划状态信息

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param x_operator_id: 操作人ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_plan_status_v3_serialize(
            project_plan_id=project_plan_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "GetPlanStatusV3Response",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        return response_data.response

    def _get_plan_status_v3_serialize(
        self,
        project_plan_id,
        x_operator_id,
        x_tenant_id,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = 'https://open.teambition.com/api'  

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if project_plan_id is not None:
            _path_params['projectPlanId'] = project_plan_id
        # process the query parameters
        # process the header parameters
        if x_operator_id is not None:
            _header_params['x-operator-id'] = x_operator_id
        if x_tenant_id is not None:
            _header_params['X-Tenant-Id'] = x_tenant_id
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'appToken'
        ]

        # Build the full URL
        url = _host + "/v3/projectplan/plans/{projectPlanId}/status-info"
        url = url.replace('{' + 'projectPlanId' + '}', str(project_plan_id))

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/v3/projectplan/plans/{projectPlanId}/status-info',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )


    @validate_call
    def get_plan_v3(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> GetPlanV3Response:
        """查询计划

        查询计划

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_plan_v3_serialize(
            project_plan_id=project_plan_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "GetPlanV3Response",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    def get_plan_v3_with_http_info(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[GetPlanV3Response]:
        """查询计划

        查询计划

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_plan_v3_serialize(
            project_plan_id=project_plan_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "GetPlanV3Response",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    def get_plan_v3_without_preload_content(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """查询计划

        查询计划

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_plan_v3_serialize(
            project_plan_id=project_plan_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "GetPlanV3Response",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        return response_data.response

    def _get_plan_v3_serialize(
        self,
        project_plan_id,
        x_operator_id,
        x_tenant_id,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = 'https://open.teambition.com/api'  

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if project_plan_id is not None:
            _path_params['projectPlanId'] = project_plan_id
        # process the query parameters
        # process the header parameters
        if x_operator_id is not None:
            _header_params['x-operator-id'] = x_operator_id
        if x_tenant_id is not None:
            _header_params['X-Tenant-Id'] = x_tenant_id
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'appToken'
        ]

        # Build the full URL
        url = _host + "/v3/projectplan/plans/{projectPlanId}/query"
        url = url.replace('{' + 'projectPlanId' + '}', str(project_plan_id))

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/v3/projectplan/plans/{projectPlanId}/query',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )


    @validate_call
    def get_project_plan_status_setting_v3(
        self,
        project_id: Annotated[StrictStr, Field(description="项目ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作人ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> GetProjectPlanStatusSettingV3Response:
        """获取项目级计划自定义状态配置

        获取项目级计划自定义状态配置

        :param project_id: 项目ID (required)
        :type project_id: str
        :param x_operator_id: 操作人ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_project_plan_status_setting_v3_serialize(
            project_id=project_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "GetProjectPlanStatusSettingV3Response",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    def get_project_plan_status_setting_v3_with_http_info(
        self,
        project_id: Annotated[StrictStr, Field(description="项目ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作人ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[GetProjectPlanStatusSettingV3Response]:
        """获取项目级计划自定义状态配置

        获取项目级计划自定义状态配置

        :param project_id: 项目ID (required)
        :type project_id: str
        :param x_operator_id: 操作人ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_project_plan_status_setting_v3_serialize(
            project_id=project_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "GetProjectPlanStatusSettingV3Response",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    def get_project_plan_status_setting_v3_without_preload_content(
        self,
        project_id: Annotated[StrictStr, Field(description="项目ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作人ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """获取项目级计划自定义状态配置

        获取项目级计划自定义状态配置

        :param project_id: 项目ID (required)
        :type project_id: str
        :param x_operator_id: 操作人ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_project_plan_status_setting_v3_serialize(
            project_id=project_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "GetProjectPlanStatusSettingV3Response",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        return response_data.response

    def _get_project_plan_status_setting_v3_serialize(
        self,
        project_id,
        x_operator_id,
        x_tenant_id,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = 'https://open.teambition.com/api'  

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if project_id is not None:
            _path_params['projectId'] = project_id
        # process the query parameters
        # process the header parameters
        if x_operator_id is not None:
            _header_params['x-operator-id'] = x_operator_id
        if x_tenant_id is not None:
            _header_params['X-Tenant-Id'] = x_tenant_id
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'appToken'
        ]

        # Build the full URL
        url = _host + "/v3/projectplan/projects/{projectId}/planCustomStatusSetting"
        url = url.replace('{' + 'projectId' + '}', str(project_id))

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/v3/projectplan/projects/{projectId}/planCustomStatusSetting',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )


    @validate_call
    def get_v3_projectplan_listscenariofields(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划id")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        customfield_id: Annotated[Optional[StrictStr], Field(description="自定义字段id")] = None,
        page_size: Annotated[Optional[StrictInt], Field(description="分页大小")] = None,
        page_token: Annotated[Optional[StrictStr], Field(description="分页Token")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> GetV3ProjectplanListscenariofieldsResponse:
        """查询计划自定义字段

        查询计划自定义字段

        :param project_plan_id: 计划id (required)
        :type project_plan_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param customfield_id: 自定义字段id
        :type customfield_id: str
        :param page_size: 分页大小
        :type page_size: int
        :param page_token: 分页Token
        :type page_token: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_v3_projectplan_listscenariofields_serialize(
            project_plan_id=project_plan_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            customfield_id=customfield_id,
            page_size=page_size,
            page_token=page_token,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "GetV3ProjectplanListscenariofieldsResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    def get_v3_projectplan_listscenariofields_with_http_info(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划id")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        customfield_id: Annotated[Optional[StrictStr], Field(description="自定义字段id")] = None,
        page_size: Annotated[Optional[StrictInt], Field(description="分页大小")] = None,
        page_token: Annotated[Optional[StrictStr], Field(description="分页Token")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[GetV3ProjectplanListscenariofieldsResponse]:
        """查询计划自定义字段

        查询计划自定义字段

        :param project_plan_id: 计划id (required)
        :type project_plan_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param customfield_id: 自定义字段id
        :type customfield_id: str
        :param page_size: 分页大小
        :type page_size: int
        :param page_token: 分页Token
        :type page_token: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_v3_projectplan_listscenariofields_serialize(
            project_plan_id=project_plan_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            customfield_id=customfield_id,
            page_size=page_size,
            page_token=page_token,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "GetV3ProjectplanListscenariofieldsResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    def get_v3_projectplan_listscenariofields_without_preload_content(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划id")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        customfield_id: Annotated[Optional[StrictStr], Field(description="自定义字段id")] = None,
        page_size: Annotated[Optional[StrictInt], Field(description="分页大小")] = None,
        page_token: Annotated[Optional[StrictStr], Field(description="分页Token")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """查询计划自定义字段

        查询计划自定义字段

        :param project_plan_id: 计划id (required)
        :type project_plan_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param customfield_id: 自定义字段id
        :type customfield_id: str
        :param page_size: 分页大小
        :type page_size: int
        :param page_token: 分页Token
        :type page_token: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_v3_projectplan_listscenariofields_serialize(
            project_plan_id=project_plan_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            customfield_id=customfield_id,
            page_size=page_size,
            page_token=page_token,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "GetV3ProjectplanListscenariofieldsResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        return response_data.response

    def _get_v3_projectplan_listscenariofields_serialize(
        self,
        project_plan_id,
        x_operator_id,
        x_tenant_id,
        customfield_id,
        page_size,
        page_token,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = 'https://open.teambition.com/api'  

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if project_plan_id is not None:
            _path_params['projectPlanId'] = project_plan_id
        # process the query parameters
        if customfield_id is not None:
            
            _query_params.append(('customfieldId', customfield_id))
            
        if page_size is not None:
            
            _query_params.append(('pageSize', page_size))
            
        if page_token is not None:
            
            _query_params.append(('pageToken', page_token))
            
        # process the header parameters
        if x_operator_id is not None:
            _header_params['x-operator-id'] = x_operator_id
        if x_tenant_id is not None:
            _header_params['X-Tenant-Id'] = x_tenant_id
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'appToken'
        ]

        # Build the full URL
        url = _host + "/v3/projectplan/{projectPlanId}/listScenariofields"
        url = url.replace('{' + 'projectPlanId' + '}', str(project_plan_id))

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/v3/projectplan/{projectPlanId}/listScenariofields',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )


    @validate_call
    def get_v3_projectplan_listscenariofieldvalues(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划id")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        scenariofield_id: Annotated[Optional[StrictStr], Field(description="该字段值在计划中的场景字段id")] = None,
        labels: Annotated[Optional[StrictStr], Field(description="按标签查询, 逗号分隔")] = None,
        page_size: Annotated[Optional[StrictInt], Field(description="分页大小")] = None,
        page_token: Annotated[Optional[StrictStr], Field(description="分页Token")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> GetV3ProjectplanListscenariofieldvaluesResponse:
        """获取字段值

        获取字段值

        :param project_plan_id: 计划id (required)
        :type project_plan_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param scenariofield_id: 该字段值在计划中的场景字段id
        :type scenariofield_id: str
        :param labels: 按标签查询, 逗号分隔
        :type labels: str
        :param page_size: 分页大小
        :type page_size: int
        :param page_token: 分页Token
        :type page_token: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_v3_projectplan_listscenariofieldvalues_serialize(
            project_plan_id=project_plan_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            scenariofield_id=scenariofield_id,
            labels=labels,
            page_size=page_size,
            page_token=page_token,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "GetV3ProjectplanListscenariofieldvaluesResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    def get_v3_projectplan_listscenariofieldvalues_with_http_info(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划id")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        scenariofield_id: Annotated[Optional[StrictStr], Field(description="该字段值在计划中的场景字段id")] = None,
        labels: Annotated[Optional[StrictStr], Field(description="按标签查询, 逗号分隔")] = None,
        page_size: Annotated[Optional[StrictInt], Field(description="分页大小")] = None,
        page_token: Annotated[Optional[StrictStr], Field(description="分页Token")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[GetV3ProjectplanListscenariofieldvaluesResponse]:
        """获取字段值

        获取字段值

        :param project_plan_id: 计划id (required)
        :type project_plan_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param scenariofield_id: 该字段值在计划中的场景字段id
        :type scenariofield_id: str
        :param labels: 按标签查询, 逗号分隔
        :type labels: str
        :param page_size: 分页大小
        :type page_size: int
        :param page_token: 分页Token
        :type page_token: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_v3_projectplan_listscenariofieldvalues_serialize(
            project_plan_id=project_plan_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            scenariofield_id=scenariofield_id,
            labels=labels,
            page_size=page_size,
            page_token=page_token,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "GetV3ProjectplanListscenariofieldvaluesResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    def get_v3_projectplan_listscenariofieldvalues_without_preload_content(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划id")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        scenariofield_id: Annotated[Optional[StrictStr], Field(description="该字段值在计划中的场景字段id")] = None,
        labels: Annotated[Optional[StrictStr], Field(description="按标签查询, 逗号分隔")] = None,
        page_size: Annotated[Optional[StrictInt], Field(description="分页大小")] = None,
        page_token: Annotated[Optional[StrictStr], Field(description="分页Token")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """获取字段值

        获取字段值

        :param project_plan_id: 计划id (required)
        :type project_plan_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param scenariofield_id: 该字段值在计划中的场景字段id
        :type scenariofield_id: str
        :param labels: 按标签查询, 逗号分隔
        :type labels: str
        :param page_size: 分页大小
        :type page_size: int
        :param page_token: 分页Token
        :type page_token: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_v3_projectplan_listscenariofieldvalues_serialize(
            project_plan_id=project_plan_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            scenariofield_id=scenariofield_id,
            labels=labels,
            page_size=page_size,
            page_token=page_token,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "GetV3ProjectplanListscenariofieldvaluesResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        return response_data.response

    def _get_v3_projectplan_listscenariofieldvalues_serialize(
        self,
        project_plan_id,
        x_operator_id,
        x_tenant_id,
        scenariofield_id,
        labels,
        page_size,
        page_token,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = 'https://open.teambition.com/api'  

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if project_plan_id is not None:
            _path_params['projectPlanId'] = project_plan_id
        # process the query parameters
        if scenariofield_id is not None:
            
            _query_params.append(('scenariofieldId', scenariofield_id))
            
        if labels is not None:
            
            _query_params.append(('labels', labels))
            
        if page_size is not None:
            
            _query_params.append(('pageSize', page_size))
            
        if page_token is not None:
            
            _query_params.append(('pageToken', page_token))
            
        # process the header parameters
        if x_operator_id is not None:
            _header_params['x-operator-id'] = x_operator_id
        if x_tenant_id is not None:
            _header_params['X-Tenant-Id'] = x_tenant_id
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'appToken'
        ]

        # Build the full URL
        url = _host + "/v3/projectplan/{projectPlanId}/listScenariofieldValues"
        url = url.replace('{' + 'projectPlanId' + '}', str(project_plan_id))

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/v3/projectplan/{projectPlanId}/listScenariofieldValues',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )


    @validate_call
    def get_v3_projectplan_operable_access_policy_list(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> GetV3ProjectplanOperableAccessPolicyListResponse:
        """获取当前计划可设置加锁/解锁的动作

        获取当前计划可设置加锁/解锁的动作

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_v3_projectplan_operable_access_policy_list_serialize(
            project_plan_id=project_plan_id,
            x_tenant_id=x_tenant_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "GetV3ProjectplanOperableAccessPolicyListResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    def get_v3_projectplan_operable_access_policy_list_with_http_info(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[GetV3ProjectplanOperableAccessPolicyListResponse]:
        """获取当前计划可设置加锁/解锁的动作

        获取当前计划可设置加锁/解锁的动作

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_v3_projectplan_operable_access_policy_list_serialize(
            project_plan_id=project_plan_id,
            x_tenant_id=x_tenant_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "GetV3ProjectplanOperableAccessPolicyListResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    def get_v3_projectplan_operable_access_policy_list_without_preload_content(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """获取当前计划可设置加锁/解锁的动作

        获取当前计划可设置加锁/解锁的动作

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_v3_projectplan_operable_access_policy_list_serialize(
            project_plan_id=project_plan_id,
            x_tenant_id=x_tenant_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "GetV3ProjectplanOperableAccessPolicyListResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        return response_data.response

    def _get_v3_projectplan_operable_access_policy_list_serialize(
        self,
        project_plan_id,
        x_tenant_id,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = 'https://open.teambition.com/api'  

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if project_plan_id is not None:
            _path_params['projectPlanId'] = project_plan_id
        # process the query parameters
        # process the header parameters
        if x_tenant_id is not None:
            _header_params['X-Tenant-Id'] = x_tenant_id
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'appToken'
        ]

        # Build the full URL
        url = _host + "/v3/projectplan/{projectPlanId}/operable-access-policy/list"
        url = url.replace('{' + 'projectPlanId' + '}', str(project_plan_id))

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/v3/projectplan/{projectPlanId}/operable-access-policy/list',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )


    @validate_call
    def get_v3_projectplan_plans_list(
        self,
        project_id: Annotated[StrictStr, Field(description="项目ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        ids: Annotated[Optional[StrictStr], Field(description="计划ids集合,使用逗号分隔")] = None,
        page_token: Annotated[Optional[StrictStr], Field(description="分页标")] = None,
        page_size: Annotated[Optional[StrictStr], Field(description="每页长度")] = None,
        query_all_levels: Annotated[Optional[StrictBool], Field(description="是否返回所有层级的计划")] = None,
        parent_id: Annotated[Optional[StrictStr], Field(description="父计划ID")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> GetV3ProjectplanPlansListResponse:
        """查询用户可见的计划列表

        查询用户可见的计划列表

        :param project_id: 项目ID (required)
        :type project_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param ids: 计划ids集合,使用逗号分隔
        :type ids: str
        :param page_token: 分页标
        :type page_token: str
        :param page_size: 每页长度
        :type page_size: str
        :param query_all_levels: 是否返回所有层级的计划
        :type query_all_levels: bool
        :param parent_id: 父计划ID
        :type parent_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_v3_projectplan_plans_list_serialize(
            project_id=project_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            ids=ids,
            page_token=page_token,
            page_size=page_size,
            query_all_levels=query_all_levels,
            parent_id=parent_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "GetV3ProjectplanPlansListResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    def get_v3_projectplan_plans_list_with_http_info(
        self,
        project_id: Annotated[StrictStr, Field(description="项目ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        ids: Annotated[Optional[StrictStr], Field(description="计划ids集合,使用逗号分隔")] = None,
        page_token: Annotated[Optional[StrictStr], Field(description="分页标")] = None,
        page_size: Annotated[Optional[StrictStr], Field(description="每页长度")] = None,
        query_all_levels: Annotated[Optional[StrictBool], Field(description="是否返回所有层级的计划")] = None,
        parent_id: Annotated[Optional[StrictStr], Field(description="父计划ID")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[GetV3ProjectplanPlansListResponse]:
        """查询用户可见的计划列表

        查询用户可见的计划列表

        :param project_id: 项目ID (required)
        :type project_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param ids: 计划ids集合,使用逗号分隔
        :type ids: str
        :param page_token: 分页标
        :type page_token: str
        :param page_size: 每页长度
        :type page_size: str
        :param query_all_levels: 是否返回所有层级的计划
        :type query_all_levels: bool
        :param parent_id: 父计划ID
        :type parent_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_v3_projectplan_plans_list_serialize(
            project_id=project_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            ids=ids,
            page_token=page_token,
            page_size=page_size,
            query_all_levels=query_all_levels,
            parent_id=parent_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "GetV3ProjectplanPlansListResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    def get_v3_projectplan_plans_list_without_preload_content(
        self,
        project_id: Annotated[StrictStr, Field(description="项目ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        ids: Annotated[Optional[StrictStr], Field(description="计划ids集合,使用逗号分隔")] = None,
        page_token: Annotated[Optional[StrictStr], Field(description="分页标")] = None,
        page_size: Annotated[Optional[StrictStr], Field(description="每页长度")] = None,
        query_all_levels: Annotated[Optional[StrictBool], Field(description="是否返回所有层级的计划")] = None,
        parent_id: Annotated[Optional[StrictStr], Field(description="父计划ID")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """查询用户可见的计划列表

        查询用户可见的计划列表

        :param project_id: 项目ID (required)
        :type project_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param ids: 计划ids集合,使用逗号分隔
        :type ids: str
        :param page_token: 分页标
        :type page_token: str
        :param page_size: 每页长度
        :type page_size: str
        :param query_all_levels: 是否返回所有层级的计划
        :type query_all_levels: bool
        :param parent_id: 父计划ID
        :type parent_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_v3_projectplan_plans_list_serialize(
            project_id=project_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            ids=ids,
            page_token=page_token,
            page_size=page_size,
            query_all_levels=query_all_levels,
            parent_id=parent_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "GetV3ProjectplanPlansListResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        return response_data.response

    def _get_v3_projectplan_plans_list_serialize(
        self,
        project_id,
        x_operator_id,
        x_tenant_id,
        ids,
        page_token,
        page_size,
        query_all_levels,
        parent_id,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = 'https://open.teambition.com/api'  

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if project_id is not None:
            _path_params['projectId'] = project_id
        # process the query parameters
        if ids is not None:
            
            _query_params.append(('ids', ids))
            
        if page_token is not None:
            
            _query_params.append(('pageToken', page_token))
            
        if page_size is not None:
            
            _query_params.append(('pageSize', page_size))
            
        if query_all_levels is not None:
            
            _query_params.append(('queryAllLevels', query_all_levels))
            
        if parent_id is not None:
            
            _query_params.append(('parentId', parent_id))
            
        # process the header parameters
        if x_operator_id is not None:
            _header_params['x-operator-id'] = x_operator_id
        if x_tenant_id is not None:
            _header_params['X-Tenant-Id'] = x_tenant_id
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'appToken'
        ]

        # Build the full URL
        url = _host + "/v3/projectplan/plans/{projectId}/list"
        url = url.replace('{' + 'projectId' + '}', str(project_id))

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/v3/projectplan/plans/{projectId}/list',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )


    @validate_call
    def get_v3_projectplan_scenariofield_list(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划id")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        customfield_id: Annotated[Optional[StrictStr], Field(description="自定义字段id")] = None,
        page_size: Annotated[Optional[StrictInt], Field(description="分页大小")] = None,
        page_token: Annotated[Optional[StrictStr], Field(description="分页Token")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> GetV3ProjectplanListscenariofieldsResponse:
        """查询计划自定义字段

        查询计划自定义字段

        :param project_plan_id: 计划id (required)
        :type project_plan_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param customfield_id: 自定义字段id
        :type customfield_id: str
        :param page_size: 分页大小
        :type page_size: int
        :param page_token: 分页Token
        :type page_token: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_v3_projectplan_scenariofield_list_serialize(
            project_plan_id=project_plan_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            customfield_id=customfield_id,
            page_size=page_size,
            page_token=page_token,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "GetV3ProjectplanListscenariofieldsResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    def get_v3_projectplan_scenariofield_list_with_http_info(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划id")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        customfield_id: Annotated[Optional[StrictStr], Field(description="自定义字段id")] = None,
        page_size: Annotated[Optional[StrictInt], Field(description="分页大小")] = None,
        page_token: Annotated[Optional[StrictStr], Field(description="分页Token")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[GetV3ProjectplanListscenariofieldsResponse]:
        """查询计划自定义字段

        查询计划自定义字段

        :param project_plan_id: 计划id (required)
        :type project_plan_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param customfield_id: 自定义字段id
        :type customfield_id: str
        :param page_size: 分页大小
        :type page_size: int
        :param page_token: 分页Token
        :type page_token: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_v3_projectplan_scenariofield_list_serialize(
            project_plan_id=project_plan_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            customfield_id=customfield_id,
            page_size=page_size,
            page_token=page_token,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "GetV3ProjectplanListscenariofieldsResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    def get_v3_projectplan_scenariofield_list_without_preload_content(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划id")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        customfield_id: Annotated[Optional[StrictStr], Field(description="自定义字段id")] = None,
        page_size: Annotated[Optional[StrictInt], Field(description="分页大小")] = None,
        page_token: Annotated[Optional[StrictStr], Field(description="分页Token")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """查询计划自定义字段

        查询计划自定义字段

        :param project_plan_id: 计划id (required)
        :type project_plan_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param customfield_id: 自定义字段id
        :type customfield_id: str
        :param page_size: 分页大小
        :type page_size: int
        :param page_token: 分页Token
        :type page_token: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_v3_projectplan_scenariofield_list_serialize(
            project_plan_id=project_plan_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            customfield_id=customfield_id,
            page_size=page_size,
            page_token=page_token,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "GetV3ProjectplanListscenariofieldsResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        return response_data.response

    def _get_v3_projectplan_scenariofield_list_serialize(
        self,
        project_plan_id,
        x_operator_id,
        x_tenant_id,
        customfield_id,
        page_size,
        page_token,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = 'https://open.teambition.com/api'  

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if project_plan_id is not None:
            _path_params['projectPlanId'] = project_plan_id
        # process the query parameters
        if customfield_id is not None:
            
            _query_params.append(('customfieldId', customfield_id))
            
        if page_size is not None:
            
            _query_params.append(('pageSize', page_size))
            
        if page_token is not None:
            
            _query_params.append(('pageToken', page_token))
            
        # process the header parameters
        if x_operator_id is not None:
            _header_params['x-operator-id'] = x_operator_id
        if x_tenant_id is not None:
            _header_params['X-Tenant-Id'] = x_tenant_id
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'appToken'
        ]

        # Build the full URL
        url = _host + "/v3/projectplan/{projectPlanId}/scenariofield/list"
        url = url.replace('{' + 'projectPlanId' + '}', str(project_plan_id))

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/v3/projectplan/{projectPlanId}/scenariofield/list',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )


    @validate_call
    def get_v3_projectplan_scenariofield_value_list(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划id")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        scenariofield_id: Annotated[Optional[StrictStr], Field(description="该字段值在计划中的场景字段id")] = None,
        labels: Annotated[Optional[StrictStr], Field(description="按标签查询, 逗号分隔")] = None,
        page_size: Annotated[Optional[StrictInt], Field(description="分页大小")] = None,
        page_token: Annotated[Optional[StrictStr], Field(description="分页Token")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> GetV3ProjectplanScenariofieldValueListResponse:
        """获取字段值

        获取字段值

        :param project_plan_id: 计划id (required)
        :type project_plan_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param scenariofield_id: 该字段值在计划中的场景字段id
        :type scenariofield_id: str
        :param labels: 按标签查询, 逗号分隔
        :type labels: str
        :param page_size: 分页大小
        :type page_size: int
        :param page_token: 分页Token
        :type page_token: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_v3_projectplan_scenariofield_value_list_serialize(
            project_plan_id=project_plan_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            scenariofield_id=scenariofield_id,
            labels=labels,
            page_size=page_size,
            page_token=page_token,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "GetV3ProjectplanScenariofieldValueListResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    def get_v3_projectplan_scenariofield_value_list_with_http_info(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划id")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        scenariofield_id: Annotated[Optional[StrictStr], Field(description="该字段值在计划中的场景字段id")] = None,
        labels: Annotated[Optional[StrictStr], Field(description="按标签查询, 逗号分隔")] = None,
        page_size: Annotated[Optional[StrictInt], Field(description="分页大小")] = None,
        page_token: Annotated[Optional[StrictStr], Field(description="分页Token")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[GetV3ProjectplanScenariofieldValueListResponse]:
        """获取字段值

        获取字段值

        :param project_plan_id: 计划id (required)
        :type project_plan_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param scenariofield_id: 该字段值在计划中的场景字段id
        :type scenariofield_id: str
        :param labels: 按标签查询, 逗号分隔
        :type labels: str
        :param page_size: 分页大小
        :type page_size: int
        :param page_token: 分页Token
        :type page_token: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_v3_projectplan_scenariofield_value_list_serialize(
            project_plan_id=project_plan_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            scenariofield_id=scenariofield_id,
            labels=labels,
            page_size=page_size,
            page_token=page_token,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "GetV3ProjectplanScenariofieldValueListResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    def get_v3_projectplan_scenariofield_value_list_without_preload_content(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划id")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        scenariofield_id: Annotated[Optional[StrictStr], Field(description="该字段值在计划中的场景字段id")] = None,
        labels: Annotated[Optional[StrictStr], Field(description="按标签查询, 逗号分隔")] = None,
        page_size: Annotated[Optional[StrictInt], Field(description="分页大小")] = None,
        page_token: Annotated[Optional[StrictStr], Field(description="分页Token")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """获取字段值

        获取字段值

        :param project_plan_id: 计划id (required)
        :type project_plan_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param scenariofield_id: 该字段值在计划中的场景字段id
        :type scenariofield_id: str
        :param labels: 按标签查询, 逗号分隔
        :type labels: str
        :param page_size: 分页大小
        :type page_size: int
        :param page_token: 分页Token
        :type page_token: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_v3_projectplan_scenariofield_value_list_serialize(
            project_plan_id=project_plan_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            scenariofield_id=scenariofield_id,
            labels=labels,
            page_size=page_size,
            page_token=page_token,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "GetV3ProjectplanScenariofieldValueListResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        return response_data.response

    def _get_v3_projectplan_scenariofield_value_list_serialize(
        self,
        project_plan_id,
        x_operator_id,
        x_tenant_id,
        scenariofield_id,
        labels,
        page_size,
        page_token,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = 'https://open.teambition.com/api'  

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if project_plan_id is not None:
            _path_params['projectPlanId'] = project_plan_id
        # process the query parameters
        if scenariofield_id is not None:
            
            _query_params.append(('scenariofieldId', scenariofield_id))
            
        if labels is not None:
            
            _query_params.append(('labels', labels))
            
        if page_size is not None:
            
            _query_params.append(('pageSize', page_size))
            
        if page_token is not None:
            
            _query_params.append(('pageToken', page_token))
            
        # process the header parameters
        if x_operator_id is not None:
            _header_params['x-operator-id'] = x_operator_id
        if x_tenant_id is not None:
            _header_params['X-Tenant-Id'] = x_tenant_id
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'appToken'
        ]

        # Build the full URL
        url = _host + "/v3/projectplan/{projectPlanId}/scenariofield/value/list"
        url = url.replace('{' + 'projectPlanId' + '}', str(project_plan_id))

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/v3/projectplan/{projectPlanId}/scenariofield/value/list',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )


    @validate_call
    def get_v3_projectplan_task_operable_access_policy_list(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        task_id: Annotated[StrictStr, Field(description="任务ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> GetV3ProjectplanTaskOperableAccessPolicyListResponse:
        """获取当前计划任务可设置加锁/解锁的动作

        获取当前任计划务可设置加锁/解锁的动作

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param task_id: 任务ID (required)
        :type task_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_v3_projectplan_task_operable_access_policy_list_serialize(
            project_plan_id=project_plan_id,
            task_id=task_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "GetV3ProjectplanTaskOperableAccessPolicyListResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    def get_v3_projectplan_task_operable_access_policy_list_with_http_info(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        task_id: Annotated[StrictStr, Field(description="任务ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[GetV3ProjectplanTaskOperableAccessPolicyListResponse]:
        """获取当前计划任务可设置加锁/解锁的动作

        获取当前任计划务可设置加锁/解锁的动作

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param task_id: 任务ID (required)
        :type task_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_v3_projectplan_task_operable_access_policy_list_serialize(
            project_plan_id=project_plan_id,
            task_id=task_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "GetV3ProjectplanTaskOperableAccessPolicyListResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    def get_v3_projectplan_task_operable_access_policy_list_without_preload_content(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        task_id: Annotated[StrictStr, Field(description="任务ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """获取当前计划任务可设置加锁/解锁的动作

        获取当前任计划务可设置加锁/解锁的动作

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param task_id: 任务ID (required)
        :type task_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_v3_projectplan_task_operable_access_policy_list_serialize(
            project_plan_id=project_plan_id,
            task_id=task_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "GetV3ProjectplanTaskOperableAccessPolicyListResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        return response_data.response

    def _get_v3_projectplan_task_operable_access_policy_list_serialize(
        self,
        project_plan_id,
        task_id,
        x_operator_id,
        x_tenant_id,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = 'https://open.teambition.com/api'  

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if project_plan_id is not None:
            _path_params['projectPlanId'] = project_plan_id
        if task_id is not None:
            _path_params['taskId'] = task_id
        # process the query parameters
        # process the header parameters
        if x_operator_id is not None:
            _header_params['x-operator-id'] = x_operator_id
        if x_tenant_id is not None:
            _header_params['X-Tenant-Id'] = x_tenant_id
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'appToken'
        ]

        # Build the full URL
        url = _host + "/v3/projectplan/{projectPlanId}/task/{taskId}/operable-access-policy/list"
        url = url.replace('{' + 'projectPlanId' + '}', str(project_plan_id))
        url = url.replace('{' + 'taskId' + '}', str(task_id))

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/v3/projectplan/{projectPlanId}/task/{taskId}/operable-access-policy/list',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )


    @validate_call
    def get_v3_projectplan_task_plans_tasks_subtasks(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        task_id: Annotated[StrictStr, Field(description="任务ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        page_token: Annotated[Optional[StrictStr], Field(description="分页标")] = None,
        page_size: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="每页长度")] = None,
        has_subtask: Annotated[Optional[StrictBool], Field(description="返回是否包含子任务")] = None,
        query_all_levels: Annotated[Optional[StrictBool], Field(description="是否返回所有子任务，默认返回一级子任务")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> GetV3ProjectplanTaskPlansTasksSubtasksResponse:
        """获取计划任务的子任务

        获取计划任务的子任务

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param task_id: 任务ID (required)
        :type task_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param page_token: 分页标
        :type page_token: str
        :param page_size: 每页长度
        :type page_size: float
        :param has_subtask: 返回是否包含子任务
        :type has_subtask: bool
        :param query_all_levels: 是否返回所有子任务，默认返回一级子任务
        :type query_all_levels: bool
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_v3_projectplan_task_plans_tasks_subtasks_serialize(
            project_plan_id=project_plan_id,
            task_id=task_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            page_token=page_token,
            page_size=page_size,
            has_subtask=has_subtask,
            query_all_levels=query_all_levels,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "GetV3ProjectplanTaskPlansTasksSubtasksResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    def get_v3_projectplan_task_plans_tasks_subtasks_with_http_info(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        task_id: Annotated[StrictStr, Field(description="任务ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        page_token: Annotated[Optional[StrictStr], Field(description="分页标")] = None,
        page_size: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="每页长度")] = None,
        has_subtask: Annotated[Optional[StrictBool], Field(description="返回是否包含子任务")] = None,
        query_all_levels: Annotated[Optional[StrictBool], Field(description="是否返回所有子任务，默认返回一级子任务")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[GetV3ProjectplanTaskPlansTasksSubtasksResponse]:
        """获取计划任务的子任务

        获取计划任务的子任务

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param task_id: 任务ID (required)
        :type task_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param page_token: 分页标
        :type page_token: str
        :param page_size: 每页长度
        :type page_size: float
        :param has_subtask: 返回是否包含子任务
        :type has_subtask: bool
        :param query_all_levels: 是否返回所有子任务，默认返回一级子任务
        :type query_all_levels: bool
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_v3_projectplan_task_plans_tasks_subtasks_serialize(
            project_plan_id=project_plan_id,
            task_id=task_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            page_token=page_token,
            page_size=page_size,
            has_subtask=has_subtask,
            query_all_levels=query_all_levels,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "GetV3ProjectplanTaskPlansTasksSubtasksResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    def get_v3_projectplan_task_plans_tasks_subtasks_without_preload_content(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        task_id: Annotated[StrictStr, Field(description="任务ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        page_token: Annotated[Optional[StrictStr], Field(description="分页标")] = None,
        page_size: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="每页长度")] = None,
        has_subtask: Annotated[Optional[StrictBool], Field(description="返回是否包含子任务")] = None,
        query_all_levels: Annotated[Optional[StrictBool], Field(description="是否返回所有子任务，默认返回一级子任务")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """获取计划任务的子任务

        获取计划任务的子任务

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param task_id: 任务ID (required)
        :type task_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param page_token: 分页标
        :type page_token: str
        :param page_size: 每页长度
        :type page_size: float
        :param has_subtask: 返回是否包含子任务
        :type has_subtask: bool
        :param query_all_levels: 是否返回所有子任务，默认返回一级子任务
        :type query_all_levels: bool
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._get_v3_projectplan_task_plans_tasks_subtasks_serialize(
            project_plan_id=project_plan_id,
            task_id=task_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            page_token=page_token,
            page_size=page_size,
            has_subtask=has_subtask,
            query_all_levels=query_all_levels,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "GetV3ProjectplanTaskPlansTasksSubtasksResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        return response_data.response

    def _get_v3_projectplan_task_plans_tasks_subtasks_serialize(
        self,
        project_plan_id,
        task_id,
        x_operator_id,
        x_tenant_id,
        page_token,
        page_size,
        has_subtask,
        query_all_levels,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = 'https://open.teambition.com/api'  

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if project_plan_id is not None:
            _path_params['projectPlanId'] = project_plan_id
        if task_id is not None:
            _path_params['taskId'] = task_id
        # process the query parameters
        if page_token is not None:
            
            _query_params.append(('pageToken', page_token))
            
        if page_size is not None:
            
            _query_params.append(('pageSize', page_size))
            
        if has_subtask is not None:
            
            _query_params.append(('hasSubtask', has_subtask))
            
        if query_all_levels is not None:
            
            _query_params.append(('queryAllLevels', query_all_levels))
            
        # process the header parameters
        if x_operator_id is not None:
            _header_params['x-operator-id'] = x_operator_id
        if x_tenant_id is not None:
            _header_params['X-Tenant-Id'] = x_tenant_id
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'appToken'
        ]

        # Build the full URL
        url = _host + "/v3/projectplan-task/plans/{projectPlanId}/tasks/{taskId}/subtasks"
        url = url.replace('{' + 'projectPlanId' + '}', str(project_plan_id))
        url = url.replace('{' + 'taskId' + '}', str(task_id))

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/v3/projectplan-task/plans/{projectPlanId}/tasks/{taskId}/subtasks',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )


    @validate_call
    def list_plan_member_roles_v3(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        role: Annotated[Optional[StrictStr], Field(description="计划成员角色，-1=审批人，0=参与者，1=管理员")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ListPlanMemberRolesV3Response:
        """查询计划成员角色

        查询计划成员角色

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param role: 计划成员角色，-1=审批人，0=参与者，1=管理员
        :type role: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._list_plan_member_roles_v3_serialize(
            project_plan_id=project_plan_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            role=role,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ListPlanMemberRolesV3Response",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    def list_plan_member_roles_v3_with_http_info(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        role: Annotated[Optional[StrictStr], Field(description="计划成员角色，-1=审批人，0=参与者，1=管理员")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[ListPlanMemberRolesV3Response]:
        """查询计划成员角色

        查询计划成员角色

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param role: 计划成员角色，-1=审批人，0=参与者，1=管理员
        :type role: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._list_plan_member_roles_v3_serialize(
            project_plan_id=project_plan_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            role=role,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ListPlanMemberRolesV3Response",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    def list_plan_member_roles_v3_without_preload_content(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        role: Annotated[Optional[StrictStr], Field(description="计划成员角色，-1=审批人，0=参与者，1=管理员")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """查询计划成员角色

        查询计划成员角色

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param role: 计划成员角色，-1=审批人，0=参与者，1=管理员
        :type role: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._list_plan_member_roles_v3_serialize(
            project_plan_id=project_plan_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            role=role,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ListPlanMemberRolesV3Response",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        return response_data.response

    def _list_plan_member_roles_v3_serialize(
        self,
        project_plan_id,
        x_operator_id,
        x_tenant_id,
        role,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = 'https://open.teambition.com/api'  

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if project_plan_id is not None:
            _path_params['projectPlanId'] = project_plan_id
        # process the query parameters
        if role is not None:
            
            _query_params.append(('role', role))
            
        # process the header parameters
        if x_operator_id is not None:
            _header_params['x-operator-id'] = x_operator_id
        if x_tenant_id is not None:
            _header_params['X-Tenant-Id'] = x_tenant_id
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'appToken'
        ]

        # Build the full URL
        url = _host + "/v3/projectplan/{projectPlanId}/members/list"
        url = url.replace('{' + 'projectPlanId' + '}', str(project_plan_id))

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/v3/projectplan/{projectPlanId}/members/list',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )


    @validate_call
    def list_plan_versions_v3(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="项目计划ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        is_include_draft_version: Annotated[Optional[StrictBool], Field(description="是否包括草稿版本")] = None,
        is_include_real_version: Annotated[Optional[StrictBool], Field(description="是否包括正式版本")] = None,
        is_include_init_version: Annotated[Optional[StrictBool], Field(description="是否包括初始化版本")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ListPlanVersionsV3Response:
        """查询计划版本列表

        查询用户计划版本列表

        :param project_plan_id: 项目计划ID (required)
        :type project_plan_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param is_include_draft_version: 是否包括草稿版本
        :type is_include_draft_version: bool
        :param is_include_real_version: 是否包括正式版本
        :type is_include_real_version: bool
        :param is_include_init_version: 是否包括初始化版本
        :type is_include_init_version: bool
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._list_plan_versions_v3_serialize(
            project_plan_id=project_plan_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            is_include_draft_version=is_include_draft_version,
            is_include_real_version=is_include_real_version,
            is_include_init_version=is_include_init_version,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ListPlanVersionsV3Response",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    def list_plan_versions_v3_with_http_info(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="项目计划ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        is_include_draft_version: Annotated[Optional[StrictBool], Field(description="是否包括草稿版本")] = None,
        is_include_real_version: Annotated[Optional[StrictBool], Field(description="是否包括正式版本")] = None,
        is_include_init_version: Annotated[Optional[StrictBool], Field(description="是否包括初始化版本")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[ListPlanVersionsV3Response]:
        """查询计划版本列表

        查询用户计划版本列表

        :param project_plan_id: 项目计划ID (required)
        :type project_plan_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param is_include_draft_version: 是否包括草稿版本
        :type is_include_draft_version: bool
        :param is_include_real_version: 是否包括正式版本
        :type is_include_real_version: bool
        :param is_include_init_version: 是否包括初始化版本
        :type is_include_init_version: bool
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._list_plan_versions_v3_serialize(
            project_plan_id=project_plan_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            is_include_draft_version=is_include_draft_version,
            is_include_real_version=is_include_real_version,
            is_include_init_version=is_include_init_version,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ListPlanVersionsV3Response",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    def list_plan_versions_v3_without_preload_content(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="项目计划ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        is_include_draft_version: Annotated[Optional[StrictBool], Field(description="是否包括草稿版本")] = None,
        is_include_real_version: Annotated[Optional[StrictBool], Field(description="是否包括正式版本")] = None,
        is_include_init_version: Annotated[Optional[StrictBool], Field(description="是否包括初始化版本")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """查询计划版本列表

        查询用户计划版本列表

        :param project_plan_id: 项目计划ID (required)
        :type project_plan_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param is_include_draft_version: 是否包括草稿版本
        :type is_include_draft_version: bool
        :param is_include_real_version: 是否包括正式版本
        :type is_include_real_version: bool
        :param is_include_init_version: 是否包括初始化版本
        :type is_include_init_version: bool
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._list_plan_versions_v3_serialize(
            project_plan_id=project_plan_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            is_include_draft_version=is_include_draft_version,
            is_include_real_version=is_include_real_version,
            is_include_init_version=is_include_init_version,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ListPlanVersionsV3Response",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        return response_data.response

    def _list_plan_versions_v3_serialize(
        self,
        project_plan_id,
        x_operator_id,
        x_tenant_id,
        is_include_draft_version,
        is_include_real_version,
        is_include_init_version,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = 'https://open.teambition.com/api'  

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if project_plan_id is not None:
            _path_params['projectPlanId'] = project_plan_id
        # process the query parameters
        if is_include_draft_version is not None:
            
            _query_params.append(('isIncludeDraftVersion', is_include_draft_version))
            
        if is_include_real_version is not None:
            
            _query_params.append(('isIncludeRealVersion', is_include_real_version))
            
        if is_include_init_version is not None:
            
            _query_params.append(('isIncludeInitVersion', is_include_init_version))
            
        # process the header parameters
        if x_operator_id is not None:
            _header_params['x-operator-id'] = x_operator_id
        if x_tenant_id is not None:
            _header_params['X-Tenant-Id'] = x_tenant_id
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'appToken'
        ]

        # Build the full URL
        url = _host + "/v3/projectplan/{projectPlanId}/version/list"
        url = url.replace('{' + 'projectPlanId' + '}', str(project_plan_id))

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/v3/projectplan/{projectPlanId}/version/list',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )


    @validate_call
    def list_project_plan_tasks_legacy_v3(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        filter: Annotated[Optional[StrictStr], Field(description="TQL")] = None,
        page_token: Annotated[Optional[StrictStr], Field(description="分页标")] = None,
        page_size: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="每页长度")] = None,
        disable_default_sort: Annotated[Optional[StrictBool], Field(description="去掉系统默认加的筛选条件")] = None,
        includes_archived: Annotated[Optional[StrictBool], Field(description="是否包含已归档的任务")] = None,
        skip_sort: Annotated[Optional[StrictBool], Field(description="是否跳过排序")] = None,
        check_invisible: Annotated[Optional[StrictBool], Field(description="满足 tql 的任务数据是否含有隐私任务")] = None,
        my_visible: Annotated[Optional[StrictBool], Field(description="是否只返回可见的任务")] = None,
        list_change_tasks: Annotated[Optional[StrictBool], Field(description="是否只返回变更选择的任务")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ListProjectPlanTasksLegacyV3Response:
        """获取计划任务列表

        获取计划任务列表

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param filter: TQL
        :type filter: str
        :param page_token: 分页标
        :type page_token: str
        :param page_size: 每页长度
        :type page_size: float
        :param disable_default_sort: 去掉系统默认加的筛选条件
        :type disable_default_sort: bool
        :param includes_archived: 是否包含已归档的任务
        :type includes_archived: bool
        :param skip_sort: 是否跳过排序
        :type skip_sort: bool
        :param check_invisible: 满足 tql 的任务数据是否含有隐私任务
        :type check_invisible: bool
        :param my_visible: 是否只返回可见的任务
        :type my_visible: bool
        :param list_change_tasks: 是否只返回变更选择的任务
        :type list_change_tasks: bool
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._list_project_plan_tasks_legacy_v3_serialize(
            project_plan_id=project_plan_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            filter=filter,
            page_token=page_token,
            page_size=page_size,
            disable_default_sort=disable_default_sort,
            includes_archived=includes_archived,
            skip_sort=skip_sort,
            check_invisible=check_invisible,
            my_visible=my_visible,
            list_change_tasks=list_change_tasks,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ListProjectPlanTasksLegacyV3Response",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    def list_project_plan_tasks_legacy_v3_with_http_info(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        filter: Annotated[Optional[StrictStr], Field(description="TQL")] = None,
        page_token: Annotated[Optional[StrictStr], Field(description="分页标")] = None,
        page_size: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="每页长度")] = None,
        disable_default_sort: Annotated[Optional[StrictBool], Field(description="去掉系统默认加的筛选条件")] = None,
        includes_archived: Annotated[Optional[StrictBool], Field(description="是否包含已归档的任务")] = None,
        skip_sort: Annotated[Optional[StrictBool], Field(description="是否跳过排序")] = None,
        check_invisible: Annotated[Optional[StrictBool], Field(description="满足 tql 的任务数据是否含有隐私任务")] = None,
        my_visible: Annotated[Optional[StrictBool], Field(description="是否只返回可见的任务")] = None,
        list_change_tasks: Annotated[Optional[StrictBool], Field(description="是否只返回变更选择的任务")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[ListProjectPlanTasksLegacyV3Response]:
        """获取计划任务列表

        获取计划任务列表

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param filter: TQL
        :type filter: str
        :param page_token: 分页标
        :type page_token: str
        :param page_size: 每页长度
        :type page_size: float
        :param disable_default_sort: 去掉系统默认加的筛选条件
        :type disable_default_sort: bool
        :param includes_archived: 是否包含已归档的任务
        :type includes_archived: bool
        :param skip_sort: 是否跳过排序
        :type skip_sort: bool
        :param check_invisible: 满足 tql 的任务数据是否含有隐私任务
        :type check_invisible: bool
        :param my_visible: 是否只返回可见的任务
        :type my_visible: bool
        :param list_change_tasks: 是否只返回变更选择的任务
        :type list_change_tasks: bool
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._list_project_plan_tasks_legacy_v3_serialize(
            project_plan_id=project_plan_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            filter=filter,
            page_token=page_token,
            page_size=page_size,
            disable_default_sort=disable_default_sort,
            includes_archived=includes_archived,
            skip_sort=skip_sort,
            check_invisible=check_invisible,
            my_visible=my_visible,
            list_change_tasks=list_change_tasks,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ListProjectPlanTasksLegacyV3Response",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    def list_project_plan_tasks_legacy_v3_without_preload_content(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        filter: Annotated[Optional[StrictStr], Field(description="TQL")] = None,
        page_token: Annotated[Optional[StrictStr], Field(description="分页标")] = None,
        page_size: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="每页长度")] = None,
        disable_default_sort: Annotated[Optional[StrictBool], Field(description="去掉系统默认加的筛选条件")] = None,
        includes_archived: Annotated[Optional[StrictBool], Field(description="是否包含已归档的任务")] = None,
        skip_sort: Annotated[Optional[StrictBool], Field(description="是否跳过排序")] = None,
        check_invisible: Annotated[Optional[StrictBool], Field(description="满足 tql 的任务数据是否含有隐私任务")] = None,
        my_visible: Annotated[Optional[StrictBool], Field(description="是否只返回可见的任务")] = None,
        list_change_tasks: Annotated[Optional[StrictBool], Field(description="是否只返回变更选择的任务")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """获取计划任务列表

        获取计划任务列表

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param filter: TQL
        :type filter: str
        :param page_token: 分页标
        :type page_token: str
        :param page_size: 每页长度
        :type page_size: float
        :param disable_default_sort: 去掉系统默认加的筛选条件
        :type disable_default_sort: bool
        :param includes_archived: 是否包含已归档的任务
        :type includes_archived: bool
        :param skip_sort: 是否跳过排序
        :type skip_sort: bool
        :param check_invisible: 满足 tql 的任务数据是否含有隐私任务
        :type check_invisible: bool
        :param my_visible: 是否只返回可见的任务
        :type my_visible: bool
        :param list_change_tasks: 是否只返回变更选择的任务
        :type list_change_tasks: bool
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._list_project_plan_tasks_legacy_v3_serialize(
            project_plan_id=project_plan_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            filter=filter,
            page_token=page_token,
            page_size=page_size,
            disable_default_sort=disable_default_sort,
            includes_archived=includes_archived,
            skip_sort=skip_sort,
            check_invisible=check_invisible,
            my_visible=my_visible,
            list_change_tasks=list_change_tasks,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ListProjectPlanTasksLegacyV3Response",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        return response_data.response

    def _list_project_plan_tasks_legacy_v3_serialize(
        self,
        project_plan_id,
        x_operator_id,
        x_tenant_id,
        filter,
        page_token,
        page_size,
        disable_default_sort,
        includes_archived,
        skip_sort,
        check_invisible,
        my_visible,
        list_change_tasks,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = 'https://open.teambition.com/api'  

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if project_plan_id is not None:
            _path_params['projectPlanId'] = project_plan_id
        # process the query parameters
        if filter is not None:
            
            _query_params.append(('filter', filter))
            
        if page_token is not None:
            
            _query_params.append(('pageToken', page_token))
            
        if page_size is not None:
            
            _query_params.append(('pageSize', page_size))
            
        if disable_default_sort is not None:
            
            _query_params.append(('disableDefaultSort', disable_default_sort))
            
        if includes_archived is not None:
            
            _query_params.append(('includesArchived', includes_archived))
            
        if skip_sort is not None:
            
            _query_params.append(('skipSort', skip_sort))
            
        if check_invisible is not None:
            
            _query_params.append(('checkInvisible', check_invisible))
            
        if my_visible is not None:
            
            _query_params.append(('myVisible', my_visible))
            
        if list_change_tasks is not None:
            
            _query_params.append(('listChangeTasks', list_change_tasks))
            
        # process the header parameters
        if x_operator_id is not None:
            _header_params['x-operator-id'] = x_operator_id
        if x_tenant_id is not None:
            _header_params['X-Tenant-Id'] = x_tenant_id
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'appToken'
        ]

        # Build the full URL
        url = _host + "/v3/projectplan-task/plans/{projectPlanId}/tasks"
        url = url.replace('{' + 'projectPlanId' + '}', str(project_plan_id))

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/v3/projectplan-task/plans/{projectPlanId}/tasks',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )


    @validate_call
    def list_visible_plans_v3(
        self,
        project_id: Annotated[StrictStr, Field(description="项目ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        ids: Annotated[Optional[StrictStr], Field(description="计划ids集合,使用逗号分隔")] = None,
        page_token: Annotated[Optional[StrictStr], Field(description="分页标")] = None,
        page_size: Annotated[Optional[StrictStr], Field(description="每页长度")] = None,
        query_all_levels: Annotated[Optional[StrictBool], Field(description="是否返回所有层级的计划")] = None,
        parent_id: Annotated[Optional[StrictStr], Field(description="父计划ID")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ListVisiblePlansV3Response:
        """查询用户可见的计划列表

        查询用户可见的计划列表

        :param project_id: 项目ID (required)
        :type project_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param ids: 计划ids集合,使用逗号分隔
        :type ids: str
        :param page_token: 分页标
        :type page_token: str
        :param page_size: 每页长度
        :type page_size: str
        :param query_all_levels: 是否返回所有层级的计划
        :type query_all_levels: bool
        :param parent_id: 父计划ID
        :type parent_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._list_visible_plans_v3_serialize(
            project_id=project_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            ids=ids,
            page_token=page_token,
            page_size=page_size,
            query_all_levels=query_all_levels,
            parent_id=parent_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ListVisiblePlansV3Response",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    def list_visible_plans_v3_with_http_info(
        self,
        project_id: Annotated[StrictStr, Field(description="项目ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        ids: Annotated[Optional[StrictStr], Field(description="计划ids集合,使用逗号分隔")] = None,
        page_token: Annotated[Optional[StrictStr], Field(description="分页标")] = None,
        page_size: Annotated[Optional[StrictStr], Field(description="每页长度")] = None,
        query_all_levels: Annotated[Optional[StrictBool], Field(description="是否返回所有层级的计划")] = None,
        parent_id: Annotated[Optional[StrictStr], Field(description="父计划ID")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[ListVisiblePlansV3Response]:
        """查询用户可见的计划列表

        查询用户可见的计划列表

        :param project_id: 项目ID (required)
        :type project_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param ids: 计划ids集合,使用逗号分隔
        :type ids: str
        :param page_token: 分页标
        :type page_token: str
        :param page_size: 每页长度
        :type page_size: str
        :param query_all_levels: 是否返回所有层级的计划
        :type query_all_levels: bool
        :param parent_id: 父计划ID
        :type parent_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._list_visible_plans_v3_serialize(
            project_id=project_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            ids=ids,
            page_token=page_token,
            page_size=page_size,
            query_all_levels=query_all_levels,
            parent_id=parent_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ListVisiblePlansV3Response",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    def list_visible_plans_v3_without_preload_content(
        self,
        project_id: Annotated[StrictStr, Field(description="项目ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        ids: Annotated[Optional[StrictStr], Field(description="计划ids集合,使用逗号分隔")] = None,
        page_token: Annotated[Optional[StrictStr], Field(description="分页标")] = None,
        page_size: Annotated[Optional[StrictStr], Field(description="每页长度")] = None,
        query_all_levels: Annotated[Optional[StrictBool], Field(description="是否返回所有层级的计划")] = None,
        parent_id: Annotated[Optional[StrictStr], Field(description="父计划ID")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """查询用户可见的计划列表

        查询用户可见的计划列表

        :param project_id: 项目ID (required)
        :type project_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param ids: 计划ids集合,使用逗号分隔
        :type ids: str
        :param page_token: 分页标
        :type page_token: str
        :param page_size: 每页长度
        :type page_size: str
        :param query_all_levels: 是否返回所有层级的计划
        :type query_all_levels: bool
        :param parent_id: 父计划ID
        :type parent_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._list_visible_plans_v3_serialize(
            project_id=project_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            ids=ids,
            page_token=page_token,
            page_size=page_size,
            query_all_levels=query_all_levels,
            parent_id=parent_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ListVisiblePlansV3Response",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        return response_data.response

    def _list_visible_plans_v3_serialize(
        self,
        project_id,
        x_operator_id,
        x_tenant_id,
        ids,
        page_token,
        page_size,
        query_all_levels,
        parent_id,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = 'https://open.teambition.com/api'  

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if project_id is not None:
            _path_params['projectId'] = project_id
        # process the query parameters
        if ids is not None:
            
            _query_params.append(('ids', ids))
            
        if page_token is not None:
            
            _query_params.append(('pageToken', page_token))
            
        if page_size is not None:
            
            _query_params.append(('pageSize', page_size))
            
        if query_all_levels is not None:
            
            _query_params.append(('queryAllLevels', query_all_levels))
            
        if parent_id is not None:
            
            _query_params.append(('parentId', parent_id))
            
        # process the header parameters
        if x_operator_id is not None:
            _header_params['x-operator-id'] = x_operator_id
        if x_tenant_id is not None:
            _header_params['X-Tenant-Id'] = x_tenant_id
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'appToken'
        ]

        # Build the full URL
        url = _host + "/v3/projectplan/projects/{projectId}/list"
        url = url.replace('{' + 'projectId' + '}', str(project_id))

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/v3/projectplan/projects/{projectId}/list',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )


    @validate_call
    def post_v3_projectplan_change_rule_update(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        post_v3_projectplan_change_rule_update_request: Optional[PostV3ProjectplanChangeRuleUpdateRequest] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> CheckUserVisibleInAppResponse:
        """更新计划发布规则

        更新计划发布规则

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param post_v3_projectplan_change_rule_update_request: 
        :type post_v3_projectplan_change_rule_update_request: PostV3ProjectplanChangeRuleUpdateRequest
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._post_v3_projectplan_change_rule_update_serialize(
            project_plan_id=project_plan_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            post_v3_projectplan_change_rule_update_request=post_v3_projectplan_change_rule_update_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "CheckUserVisibleInAppResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    def post_v3_projectplan_change_rule_update_with_http_info(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        post_v3_projectplan_change_rule_update_request: Optional[PostV3ProjectplanChangeRuleUpdateRequest] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[CheckUserVisibleInAppResponse]:
        """更新计划发布规则

        更新计划发布规则

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param post_v3_projectplan_change_rule_update_request: 
        :type post_v3_projectplan_change_rule_update_request: PostV3ProjectplanChangeRuleUpdateRequest
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._post_v3_projectplan_change_rule_update_serialize(
            project_plan_id=project_plan_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            post_v3_projectplan_change_rule_update_request=post_v3_projectplan_change_rule_update_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "CheckUserVisibleInAppResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    def post_v3_projectplan_change_rule_update_without_preload_content(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        post_v3_projectplan_change_rule_update_request: Optional[PostV3ProjectplanChangeRuleUpdateRequest] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """更新计划发布规则

        更新计划发布规则

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param post_v3_projectplan_change_rule_update_request: 
        :type post_v3_projectplan_change_rule_update_request: PostV3ProjectplanChangeRuleUpdateRequest
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._post_v3_projectplan_change_rule_update_serialize(
            project_plan_id=project_plan_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            post_v3_projectplan_change_rule_update_request=post_v3_projectplan_change_rule_update_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "CheckUserVisibleInAppResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        return response_data.response

    def _post_v3_projectplan_change_rule_update_serialize(
        self,
        project_plan_id,
        x_operator_id,
        x_tenant_id,
        post_v3_projectplan_change_rule_update_request,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = 'https://open.teambition.com/api'  

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if project_plan_id is not None:
            _path_params['projectPlanId'] = project_plan_id
        # process the query parameters
        # process the header parameters
        if x_operator_id is not None:
            _header_params['x-operator-id'] = x_operator_id
        if x_tenant_id is not None:
            _header_params['X-Tenant-Id'] = x_tenant_id
        # process the form parameters
        # process the body parameter
        if post_v3_projectplan_change_rule_update_request is not None:
            _body_params = post_v3_projectplan_change_rule_update_request


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )

        # set the HTTP header `Content-Type`
        if _content_type:
            _header_params['Content-Type'] = _content_type
        else:
            _default_content_type = (
                self.api_client.select_header_content_type(
                    [
                        'application/json'
                    ]
                )
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = [
            'appToken'
        ]

        # Build the full URL
        url = _host + "/v3/projectplan/{projectPlanId}/change-rule/update"
        url = url.replace('{' + 'projectPlanId' + '}', str(project_plan_id))

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/v3/projectplan/{projectPlanId}/change-rule/update',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )


    @validate_call
    def post_v3_projectplan_createscenariofields(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划id")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        post_v3_projectplan_createscenariofields_request: Optional[PostV3ProjectplanCreatescenariofieldsRequest] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> PostV3ProjectplanCreatescenariofieldsResponse:
        """关联计划自定义字段

        关联计划自定义字段

        :param project_plan_id: 计划id (required)
        :type project_plan_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param post_v3_projectplan_createscenariofields_request: 
        :type post_v3_projectplan_createscenariofields_request: PostV3ProjectplanCreatescenariofieldsRequest
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._post_v3_projectplan_createscenariofields_serialize(
            project_plan_id=project_plan_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            post_v3_projectplan_createscenariofields_request=post_v3_projectplan_createscenariofields_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "PostV3ProjectplanCreatescenariofieldsResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    def post_v3_projectplan_createscenariofields_with_http_info(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划id")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        post_v3_projectplan_createscenariofields_request: Optional[PostV3ProjectplanCreatescenariofieldsRequest] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[PostV3ProjectplanCreatescenariofieldsResponse]:
        """关联计划自定义字段

        关联计划自定义字段

        :param project_plan_id: 计划id (required)
        :type project_plan_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param post_v3_projectplan_createscenariofields_request: 
        :type post_v3_projectplan_createscenariofields_request: PostV3ProjectplanCreatescenariofieldsRequest
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._post_v3_projectplan_createscenariofields_serialize(
            project_plan_id=project_plan_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            post_v3_projectplan_createscenariofields_request=post_v3_projectplan_createscenariofields_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "PostV3ProjectplanCreatescenariofieldsResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    def post_v3_projectplan_createscenariofields_without_preload_content(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划id")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        post_v3_projectplan_createscenariofields_request: Optional[PostV3ProjectplanCreatescenariofieldsRequest] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """关联计划自定义字段

        关联计划自定义字段

        :param project_plan_id: 计划id (required)
        :type project_plan_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param post_v3_projectplan_createscenariofields_request: 
        :type post_v3_projectplan_createscenariofields_request: PostV3ProjectplanCreatescenariofieldsRequest
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._post_v3_projectplan_createscenariofields_serialize(
            project_plan_id=project_plan_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            post_v3_projectplan_createscenariofields_request=post_v3_projectplan_createscenariofields_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "PostV3ProjectplanCreatescenariofieldsResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        return response_data.response

    def _post_v3_projectplan_createscenariofields_serialize(
        self,
        project_plan_id,
        x_operator_id,
        x_tenant_id,
        post_v3_projectplan_createscenariofields_request,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = 'https://open.teambition.com/api'  

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if project_plan_id is not None:
            _path_params['projectPlanId'] = project_plan_id
        # process the query parameters
        # process the header parameters
        if x_operator_id is not None:
            _header_params['x-operator-id'] = x_operator_id
        if x_tenant_id is not None:
            _header_params['X-Tenant-Id'] = x_tenant_id
        # process the form parameters
        # process the body parameter
        if post_v3_projectplan_createscenariofields_request is not None:
            _body_params = post_v3_projectplan_createscenariofields_request


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )

        # set the HTTP header `Content-Type`
        if _content_type:
            _header_params['Content-Type'] = _content_type
        else:
            _default_content_type = (
                self.api_client.select_header_content_type(
                    [
                        'application/json'
                    ]
                )
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = [
            'appToken'
        ]

        # Build the full URL
        url = _host + "/v3/projectplan/{projectPlanId}/createScenariofields"
        url = url.replace('{' + 'projectPlanId' + '}', str(project_plan_id))

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/v3/projectplan/{projectPlanId}/createScenariofields',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )


    @validate_call
    def post_v3_projectplan_project_plans(
        self,
        project_id: Annotated[StrictStr, Field(description="项目ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        post_v3_projectplan_project_plans_request: Optional[PostV3ProjectplanProjectPlansRequest] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> PostV3ProjectplanProjectPlansResponse:
        """创建计划

        创建计划

        :param project_id: 项目ID (required)
        :type project_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param post_v3_projectplan_project_plans_request: 
        :type post_v3_projectplan_project_plans_request: PostV3ProjectplanProjectPlansRequest
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._post_v3_projectplan_project_plans_serialize(
            project_id=project_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            post_v3_projectplan_project_plans_request=post_v3_projectplan_project_plans_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "PostV3ProjectplanProjectPlansResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    def post_v3_projectplan_project_plans_with_http_info(
        self,
        project_id: Annotated[StrictStr, Field(description="项目ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        post_v3_projectplan_project_plans_request: Optional[PostV3ProjectplanProjectPlansRequest] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[PostV3ProjectplanProjectPlansResponse]:
        """创建计划

        创建计划

        :param project_id: 项目ID (required)
        :type project_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param post_v3_projectplan_project_plans_request: 
        :type post_v3_projectplan_project_plans_request: PostV3ProjectplanProjectPlansRequest
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._post_v3_projectplan_project_plans_serialize(
            project_id=project_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            post_v3_projectplan_project_plans_request=post_v3_projectplan_project_plans_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "PostV3ProjectplanProjectPlansResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    def post_v3_projectplan_project_plans_without_preload_content(
        self,
        project_id: Annotated[StrictStr, Field(description="项目ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        post_v3_projectplan_project_plans_request: Optional[PostV3ProjectplanProjectPlansRequest] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """创建计划

        创建计划

        :param project_id: 项目ID (required)
        :type project_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param post_v3_projectplan_project_plans_request: 
        :type post_v3_projectplan_project_plans_request: PostV3ProjectplanProjectPlansRequest
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._post_v3_projectplan_project_plans_serialize(
            project_id=project_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            post_v3_projectplan_project_plans_request=post_v3_projectplan_project_plans_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "PostV3ProjectplanProjectPlansResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        return response_data.response

    def _post_v3_projectplan_project_plans_serialize(
        self,
        project_id,
        x_operator_id,
        x_tenant_id,
        post_v3_projectplan_project_plans_request,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = 'https://open.teambition.com/api'  

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if project_id is not None:
            _path_params['projectId'] = project_id
        # process the query parameters
        # process the header parameters
        if x_operator_id is not None:
            _header_params['x-operator-id'] = x_operator_id
        if x_tenant_id is not None:
            _header_params['X-Tenant-Id'] = x_tenant_id
        # process the form parameters
        # process the body parameter
        if post_v3_projectplan_project_plans_request is not None:
            _body_params = post_v3_projectplan_project_plans_request


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )

        # set the HTTP header `Content-Type`
        if _content_type:
            _header_params['Content-Type'] = _content_type
        else:
            _default_content_type = (
                self.api_client.select_header_content_type(
                    [
                        'application/json'
                    ]
                )
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = [
            'appToken'
        ]

        # Build the full URL
        url = _host + "/v3/projectplan/project/{projectId}/plans"
        url = url.replace('{' + 'projectId' + '}', str(project_id))

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/v3/projectplan/project/{projectId}/plans',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )


    @validate_call
    def post_v3_projectplan_scenariofield_update(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划id")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        post_v3_projectplan_createscenariofields_request: Optional[PostV3ProjectplanCreatescenariofieldsRequest] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> PostV3ProjectplanCreatescenariofieldsResponse:
        """关联计划自定义字段

        关联计划自定义字段

        :param project_plan_id: 计划id (required)
        :type project_plan_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param post_v3_projectplan_createscenariofields_request: 
        :type post_v3_projectplan_createscenariofields_request: PostV3ProjectplanCreatescenariofieldsRequest
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._post_v3_projectplan_scenariofield_update_serialize(
            project_plan_id=project_plan_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            post_v3_projectplan_createscenariofields_request=post_v3_projectplan_createscenariofields_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "PostV3ProjectplanCreatescenariofieldsResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    def post_v3_projectplan_scenariofield_update_with_http_info(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划id")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        post_v3_projectplan_createscenariofields_request: Optional[PostV3ProjectplanCreatescenariofieldsRequest] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[PostV3ProjectplanCreatescenariofieldsResponse]:
        """关联计划自定义字段

        关联计划自定义字段

        :param project_plan_id: 计划id (required)
        :type project_plan_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param post_v3_projectplan_createscenariofields_request: 
        :type post_v3_projectplan_createscenariofields_request: PostV3ProjectplanCreatescenariofieldsRequest
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._post_v3_projectplan_scenariofield_update_serialize(
            project_plan_id=project_plan_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            post_v3_projectplan_createscenariofields_request=post_v3_projectplan_createscenariofields_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "PostV3ProjectplanCreatescenariofieldsResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    def post_v3_projectplan_scenariofield_update_without_preload_content(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划id")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        post_v3_projectplan_createscenariofields_request: Optional[PostV3ProjectplanCreatescenariofieldsRequest] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """关联计划自定义字段

        关联计划自定义字段

        :param project_plan_id: 计划id (required)
        :type project_plan_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param post_v3_projectplan_createscenariofields_request: 
        :type post_v3_projectplan_createscenariofields_request: PostV3ProjectplanCreatescenariofieldsRequest
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._post_v3_projectplan_scenariofield_update_serialize(
            project_plan_id=project_plan_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            post_v3_projectplan_createscenariofields_request=post_v3_projectplan_createscenariofields_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "PostV3ProjectplanCreatescenariofieldsResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        return response_data.response

    def _post_v3_projectplan_scenariofield_update_serialize(
        self,
        project_plan_id,
        x_operator_id,
        x_tenant_id,
        post_v3_projectplan_createscenariofields_request,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = 'https://open.teambition.com/api'  

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if project_plan_id is not None:
            _path_params['projectPlanId'] = project_plan_id
        # process the query parameters
        # process the header parameters
        if x_operator_id is not None:
            _header_params['x-operator-id'] = x_operator_id
        if x_tenant_id is not None:
            _header_params['X-Tenant-Id'] = x_tenant_id
        # process the form parameters
        # process the body parameter
        if post_v3_projectplan_createscenariofields_request is not None:
            _body_params = post_v3_projectplan_createscenariofields_request


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )

        # set the HTTP header `Content-Type`
        if _content_type:
            _header_params['Content-Type'] = _content_type
        else:
            _default_content_type = (
                self.api_client.select_header_content_type(
                    [
                        'application/json'
                    ]
                )
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = [
            'appToken'
        ]

        # Build the full URL
        url = _host + "/v3/projectplan/{projectPlanId}/scenariofield/update"
        url = url.replace('{' + 'projectPlanId' + '}', str(project_plan_id))

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/v3/projectplan/{projectPlanId}/scenariofield/update',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )


    @validate_call
    def post_v3_projectplan_task_access_policy_update(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        task_id: Annotated[StrictStr, Field(description="计划任务ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        update_task_lock_v3_request: Optional[UpdateTaskLockV3Request] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> CheckUserVisibleInAppResponse:
        """更新计划任务加锁/解锁动作

        更新计划任务加锁/解锁动作

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param task_id: 计划任务ID (required)
        :type task_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param update_task_lock_v3_request: 
        :type update_task_lock_v3_request: UpdateTaskLockV3Request
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._post_v3_projectplan_task_access_policy_update_serialize(
            project_plan_id=project_plan_id,
            task_id=task_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            update_task_lock_v3_request=update_task_lock_v3_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "CheckUserVisibleInAppResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    def post_v3_projectplan_task_access_policy_update_with_http_info(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        task_id: Annotated[StrictStr, Field(description="计划任务ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        update_task_lock_v3_request: Optional[UpdateTaskLockV3Request] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[CheckUserVisibleInAppResponse]:
        """更新计划任务加锁/解锁动作

        更新计划任务加锁/解锁动作

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param task_id: 计划任务ID (required)
        :type task_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param update_task_lock_v3_request: 
        :type update_task_lock_v3_request: UpdateTaskLockV3Request
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._post_v3_projectplan_task_access_policy_update_serialize(
            project_plan_id=project_plan_id,
            task_id=task_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            update_task_lock_v3_request=update_task_lock_v3_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "CheckUserVisibleInAppResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    def post_v3_projectplan_task_access_policy_update_without_preload_content(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        task_id: Annotated[StrictStr, Field(description="计划任务ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        update_task_lock_v3_request: Optional[UpdateTaskLockV3Request] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """更新计划任务加锁/解锁动作

        更新计划任务加锁/解锁动作

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param task_id: 计划任务ID (required)
        :type task_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param update_task_lock_v3_request: 
        :type update_task_lock_v3_request: UpdateTaskLockV3Request
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._post_v3_projectplan_task_access_policy_update_serialize(
            project_plan_id=project_plan_id,
            task_id=task_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            update_task_lock_v3_request=update_task_lock_v3_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "CheckUserVisibleInAppResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        return response_data.response

    def _post_v3_projectplan_task_access_policy_update_serialize(
        self,
        project_plan_id,
        task_id,
        x_operator_id,
        x_tenant_id,
        update_task_lock_v3_request,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = 'https://open.teambition.com/api'  

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if project_plan_id is not None:
            _path_params['projectPlanId'] = project_plan_id
        if task_id is not None:
            _path_params['taskId'] = task_id
        # process the query parameters
        # process the header parameters
        if x_operator_id is not None:
            _header_params['x-operator-id'] = x_operator_id
        if x_tenant_id is not None:
            _header_params['X-Tenant-Id'] = x_tenant_id
        # process the form parameters
        # process the body parameter
        if update_task_lock_v3_request is not None:
            _body_params = update_task_lock_v3_request


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )

        # set the HTTP header `Content-Type`
        if _content_type:
            _header_params['Content-Type'] = _content_type
        else:
            _default_content_type = (
                self.api_client.select_header_content_type(
                    [
                        'application/json'
                    ]
                )
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = [
            'appToken'
        ]

        # Build the full URL
        url = _host + "/v3/projectplan/{projectPlanId}/task/{taskId}/access-policy/update"
        url = url.replace('{' + 'projectPlanId' + '}', str(project_plan_id))
        url = url.replace('{' + 'taskId' + '}', str(task_id))

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/v3/projectplan/{projectPlanId}/task/{taskId}/access-policy/update',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )


    @validate_call
    def post_v3_projectplan_task_plans_addexisttasks(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        post_v3_projectplan_task_plans_addexisttasks_request: Optional[PostV3ProjectplanTaskPlansAddexisttasksRequest] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> PostV3ProjectplanTaskPlansAddexisttasksResponse:
        """将项目任务加入到计划

        将项目任务加入到计划

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param post_v3_projectplan_task_plans_addexisttasks_request: 
        :type post_v3_projectplan_task_plans_addexisttasks_request: PostV3ProjectplanTaskPlansAddexisttasksRequest
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._post_v3_projectplan_task_plans_addexisttasks_serialize(
            project_plan_id=project_plan_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            post_v3_projectplan_task_plans_addexisttasks_request=post_v3_projectplan_task_plans_addexisttasks_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "PostV3ProjectplanTaskPlansAddexisttasksResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    def post_v3_projectplan_task_plans_addexisttasks_with_http_info(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        post_v3_projectplan_task_plans_addexisttasks_request: Optional[PostV3ProjectplanTaskPlansAddexisttasksRequest] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[PostV3ProjectplanTaskPlansAddexisttasksResponse]:
        """将项目任务加入到计划

        将项目任务加入到计划

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param post_v3_projectplan_task_plans_addexisttasks_request: 
        :type post_v3_projectplan_task_plans_addexisttasks_request: PostV3ProjectplanTaskPlansAddexisttasksRequest
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._post_v3_projectplan_task_plans_addexisttasks_serialize(
            project_plan_id=project_plan_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            post_v3_projectplan_task_plans_addexisttasks_request=post_v3_projectplan_task_plans_addexisttasks_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "PostV3ProjectplanTaskPlansAddexisttasksResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    def post_v3_projectplan_task_plans_addexisttasks_without_preload_content(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        post_v3_projectplan_task_plans_addexisttasks_request: Optional[PostV3ProjectplanTaskPlansAddexisttasksRequest] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """将项目任务加入到计划

        将项目任务加入到计划

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param post_v3_projectplan_task_plans_addexisttasks_request: 
        :type post_v3_projectplan_task_plans_addexisttasks_request: PostV3ProjectplanTaskPlansAddexisttasksRequest
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._post_v3_projectplan_task_plans_addexisttasks_serialize(
            project_plan_id=project_plan_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            post_v3_projectplan_task_plans_addexisttasks_request=post_v3_projectplan_task_plans_addexisttasks_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "PostV3ProjectplanTaskPlansAddexisttasksResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        return response_data.response

    def _post_v3_projectplan_task_plans_addexisttasks_serialize(
        self,
        project_plan_id,
        x_operator_id,
        x_tenant_id,
        post_v3_projectplan_task_plans_addexisttasks_request,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = 'https://open.teambition.com/api'  

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if project_plan_id is not None:
            _path_params['projectPlanId'] = project_plan_id
        # process the query parameters
        # process the header parameters
        if x_operator_id is not None:
            _header_params['x-operator-id'] = x_operator_id
        if x_tenant_id is not None:
            _header_params['X-Tenant-Id'] = x_tenant_id
        # process the form parameters
        # process the body parameter
        if post_v3_projectplan_task_plans_addexisttasks_request is not None:
            _body_params = post_v3_projectplan_task_plans_addexisttasks_request


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )

        # set the HTTP header `Content-Type`
        if _content_type:
            _header_params['Content-Type'] = _content_type
        else:
            _default_content_type = (
                self.api_client.select_header_content_type(
                    [
                        'application/json'
                    ]
                )
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = [
            'appToken'
        ]

        # Build the full URL
        url = _host + "/v3/projectplan-task/plans/{projectPlanId}/addExistTasks"
        url = url.replace('{' + 'projectPlanId' + '}', str(project_plan_id))

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/v3/projectplan-task/plans/{projectPlanId}/addExistTasks',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )


    @validate_call
    def post_v3_projectplan_task_plans_tasks(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        post_v3_projectplan_task_plans_tasks_request: Optional[PostV3ProjectplanTaskPlansTasksRequest] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> PostV3ProjectplanTaskPlansTasksResponse:
        """创建计划任务

        创建计划任务

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param post_v3_projectplan_task_plans_tasks_request: 
        :type post_v3_projectplan_task_plans_tasks_request: PostV3ProjectplanTaskPlansTasksRequest
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._post_v3_projectplan_task_plans_tasks_serialize(
            project_plan_id=project_plan_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            post_v3_projectplan_task_plans_tasks_request=post_v3_projectplan_task_plans_tasks_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "PostV3ProjectplanTaskPlansTasksResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    def post_v3_projectplan_task_plans_tasks_with_http_info(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        post_v3_projectplan_task_plans_tasks_request: Optional[PostV3ProjectplanTaskPlansTasksRequest] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[PostV3ProjectplanTaskPlansTasksResponse]:
        """创建计划任务

        创建计划任务

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param post_v3_projectplan_task_plans_tasks_request: 
        :type post_v3_projectplan_task_plans_tasks_request: PostV3ProjectplanTaskPlansTasksRequest
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._post_v3_projectplan_task_plans_tasks_serialize(
            project_plan_id=project_plan_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            post_v3_projectplan_task_plans_tasks_request=post_v3_projectplan_task_plans_tasks_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "PostV3ProjectplanTaskPlansTasksResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    def post_v3_projectplan_task_plans_tasks_without_preload_content(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        post_v3_projectplan_task_plans_tasks_request: Optional[PostV3ProjectplanTaskPlansTasksRequest] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """创建计划任务

        创建计划任务

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param post_v3_projectplan_task_plans_tasks_request: 
        :type post_v3_projectplan_task_plans_tasks_request: PostV3ProjectplanTaskPlansTasksRequest
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._post_v3_projectplan_task_plans_tasks_serialize(
            project_plan_id=project_plan_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            post_v3_projectplan_task_plans_tasks_request=post_v3_projectplan_task_plans_tasks_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "PostV3ProjectplanTaskPlansTasksResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        return response_data.response

    def _post_v3_projectplan_task_plans_tasks_serialize(
        self,
        project_plan_id,
        x_operator_id,
        x_tenant_id,
        post_v3_projectplan_task_plans_tasks_request,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = 'https://open.teambition.com/api'  

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if project_plan_id is not None:
            _path_params['projectPlanId'] = project_plan_id
        # process the query parameters
        # process the header parameters
        if x_operator_id is not None:
            _header_params['x-operator-id'] = x_operator_id
        if x_tenant_id is not None:
            _header_params['X-Tenant-Id'] = x_tenant_id
        # process the form parameters
        # process the body parameter
        if post_v3_projectplan_task_plans_tasks_request is not None:
            _body_params = post_v3_projectplan_task_plans_tasks_request


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )

        # set the HTTP header `Content-Type`
        if _content_type:
            _header_params['Content-Type'] = _content_type
        else:
            _default_content_type = (
                self.api_client.select_header_content_type(
                    [
                        'application/json'
                    ]
                )
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = [
            'appToken'
        ]

        # Build the full URL
        url = _host + "/v3/projectplan-task/plans/{projectPlanId}/tasks"
        url = url.replace('{' + 'projectPlanId' + '}', str(project_plan_id))

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/v3/projectplan-task/plans/{projectPlanId}/tasks',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )


    @validate_call
    def post_v3_projectplan_task_plans_tasks_archive(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        task_id: Annotated[StrictStr, Field(description="任务ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ArchiveTaskV3Response:
        """删除计划任务

        删除计划任务

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param task_id: 任务ID (required)
        :type task_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._post_v3_projectplan_task_plans_tasks_archive_serialize(
            project_plan_id=project_plan_id,
            task_id=task_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ArchiveTaskV3Response",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    def post_v3_projectplan_task_plans_tasks_archive_with_http_info(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        task_id: Annotated[StrictStr, Field(description="任务ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[ArchiveTaskV3Response]:
        """删除计划任务

        删除计划任务

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param task_id: 任务ID (required)
        :type task_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._post_v3_projectplan_task_plans_tasks_archive_serialize(
            project_plan_id=project_plan_id,
            task_id=task_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ArchiveTaskV3Response",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    def post_v3_projectplan_task_plans_tasks_archive_without_preload_content(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        task_id: Annotated[StrictStr, Field(description="任务ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """删除计划任务

        删除计划任务

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param task_id: 任务ID (required)
        :type task_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._post_v3_projectplan_task_plans_tasks_archive_serialize(
            project_plan_id=project_plan_id,
            task_id=task_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ArchiveTaskV3Response",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        return response_data.response

    def _post_v3_projectplan_task_plans_tasks_archive_serialize(
        self,
        project_plan_id,
        task_id,
        x_operator_id,
        x_tenant_id,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = 'https://open.teambition.com/api'  

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if project_plan_id is not None:
            _path_params['projectPlanId'] = project_plan_id
        if task_id is not None:
            _path_params['taskId'] = task_id
        # process the query parameters
        # process the header parameters
        if x_operator_id is not None:
            _header_params['x-operator-id'] = x_operator_id
        if x_tenant_id is not None:
            _header_params['X-Tenant-Id'] = x_tenant_id
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'appToken'
        ]

        # Build the full URL
        url = _host + "/v3/projectplan-task/plans/{projectPlanId}/tasks/{taskId}/archive"
        url = url.replace('{' + 'projectPlanId' + '}', str(project_plan_id))
        url = url.replace('{' + 'taskId' + '}', str(task_id))

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/v3/projectplan-task/plans/{projectPlanId}/tasks/{taskId}/archive',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )


    @validate_call
    def put_v3_projectplan_scenariofield_value_update(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划id")],
        scenariofield_id: Annotated[StrictStr, Field(description="该字段值在计划中的场景字段id")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        put_v3_projectplan_scenariofields_updatescenariofieldvalue_request: Optional[PutV3ProjectplanScenariofieldsUpdatescenariofieldvalueRequest] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> PutV3ProjectplanScenariofieldsUpdatescenariofieldvalueResponse:
        """更新字段值

        更新字段值

        :param project_plan_id: 计划id (required)
        :type project_plan_id: str
        :param scenariofield_id: 该字段值在计划中的场景字段id (required)
        :type scenariofield_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param put_v3_projectplan_scenariofields_updatescenariofieldvalue_request: 
        :type put_v3_projectplan_scenariofields_updatescenariofieldvalue_request: PutV3ProjectplanScenariofieldsUpdatescenariofieldvalueRequest
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._put_v3_projectplan_scenariofield_value_update_serialize(
            project_plan_id=project_plan_id,
            scenariofield_id=scenariofield_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            put_v3_projectplan_scenariofields_updatescenariofieldvalue_request=put_v3_projectplan_scenariofields_updatescenariofieldvalue_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "PutV3ProjectplanScenariofieldsUpdatescenariofieldvalueResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    def put_v3_projectplan_scenariofield_value_update_with_http_info(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划id")],
        scenariofield_id: Annotated[StrictStr, Field(description="该字段值在计划中的场景字段id")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        put_v3_projectplan_scenariofields_updatescenariofieldvalue_request: Optional[PutV3ProjectplanScenariofieldsUpdatescenariofieldvalueRequest] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[PutV3ProjectplanScenariofieldsUpdatescenariofieldvalueResponse]:
        """更新字段值

        更新字段值

        :param project_plan_id: 计划id (required)
        :type project_plan_id: str
        :param scenariofield_id: 该字段值在计划中的场景字段id (required)
        :type scenariofield_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param put_v3_projectplan_scenariofields_updatescenariofieldvalue_request: 
        :type put_v3_projectplan_scenariofields_updatescenariofieldvalue_request: PutV3ProjectplanScenariofieldsUpdatescenariofieldvalueRequest
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._put_v3_projectplan_scenariofield_value_update_serialize(
            project_plan_id=project_plan_id,
            scenariofield_id=scenariofield_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            put_v3_projectplan_scenariofields_updatescenariofieldvalue_request=put_v3_projectplan_scenariofields_updatescenariofieldvalue_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "PutV3ProjectplanScenariofieldsUpdatescenariofieldvalueResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    def put_v3_projectplan_scenariofield_value_update_without_preload_content(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划id")],
        scenariofield_id: Annotated[StrictStr, Field(description="该字段值在计划中的场景字段id")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        put_v3_projectplan_scenariofields_updatescenariofieldvalue_request: Optional[PutV3ProjectplanScenariofieldsUpdatescenariofieldvalueRequest] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """更新字段值

        更新字段值

        :param project_plan_id: 计划id (required)
        :type project_plan_id: str
        :param scenariofield_id: 该字段值在计划中的场景字段id (required)
        :type scenariofield_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param put_v3_projectplan_scenariofields_updatescenariofieldvalue_request: 
        :type put_v3_projectplan_scenariofields_updatescenariofieldvalue_request: PutV3ProjectplanScenariofieldsUpdatescenariofieldvalueRequest
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._put_v3_projectplan_scenariofield_value_update_serialize(
            project_plan_id=project_plan_id,
            scenariofield_id=scenariofield_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            put_v3_projectplan_scenariofields_updatescenariofieldvalue_request=put_v3_projectplan_scenariofields_updatescenariofieldvalue_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "PutV3ProjectplanScenariofieldsUpdatescenariofieldvalueResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        return response_data.response

    def _put_v3_projectplan_scenariofield_value_update_serialize(
        self,
        project_plan_id,
        scenariofield_id,
        x_operator_id,
        x_tenant_id,
        put_v3_projectplan_scenariofields_updatescenariofieldvalue_request,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = 'https://open.teambition.com/api'  

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if project_plan_id is not None:
            _path_params['projectPlanId'] = project_plan_id
        if scenariofield_id is not None:
            _path_params['scenariofieldId'] = scenariofield_id
        # process the query parameters
        # process the header parameters
        if x_operator_id is not None:
            _header_params['x-operator-id'] = x_operator_id
        if x_tenant_id is not None:
            _header_params['X-Tenant-Id'] = x_tenant_id
        # process the form parameters
        # process the body parameter
        if put_v3_projectplan_scenariofields_updatescenariofieldvalue_request is not None:
            _body_params = put_v3_projectplan_scenariofields_updatescenariofieldvalue_request


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )

        # set the HTTP header `Content-Type`
        if _content_type:
            _header_params['Content-Type'] = _content_type
        else:
            _default_content_type = (
                self.api_client.select_header_content_type(
                    [
                        'application/json'
                    ]
                )
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = [
            'appToken'
        ]

        # Build the full URL
        url = _host + "/v3/projectplan/{projectPlanId}/scenariofield/{scenariofieldId}/value/update"
        url = url.replace('{' + 'projectPlanId' + '}', str(project_plan_id))
        url = url.replace('{' + 'scenariofieldId' + '}', str(scenariofield_id))

        return self.api_client.param_serialize(
            method='PUT',
            resource_path='/v3/projectplan/{projectPlanId}/scenariofield/{scenariofieldId}/value/update',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )


    @validate_call
    def put_v3_projectplan_scenariofields_updatescenariofieldvalue(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划id")],
        scenariofield_id: Annotated[StrictStr, Field(description="该字段值在计划中的场景字段id")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        put_v3_projectplan_scenariofields_updatescenariofieldvalue_request: Optional[PutV3ProjectplanScenariofieldsUpdatescenariofieldvalueRequest] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> PutV3ProjectplanScenariofieldsUpdatescenariofieldvalueResponse:
        """更新字段值

        更新字段值

        :param project_plan_id: 计划id (required)
        :type project_plan_id: str
        :param scenariofield_id: 该字段值在计划中的场景字段id (required)
        :type scenariofield_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param put_v3_projectplan_scenariofields_updatescenariofieldvalue_request: 
        :type put_v3_projectplan_scenariofields_updatescenariofieldvalue_request: PutV3ProjectplanScenariofieldsUpdatescenariofieldvalueRequest
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._put_v3_projectplan_scenariofields_updatescenariofieldvalue_serialize(
            project_plan_id=project_plan_id,
            scenariofield_id=scenariofield_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            put_v3_projectplan_scenariofields_updatescenariofieldvalue_request=put_v3_projectplan_scenariofields_updatescenariofieldvalue_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "PutV3ProjectplanScenariofieldsUpdatescenariofieldvalueResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    def put_v3_projectplan_scenariofields_updatescenariofieldvalue_with_http_info(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划id")],
        scenariofield_id: Annotated[StrictStr, Field(description="该字段值在计划中的场景字段id")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        put_v3_projectplan_scenariofields_updatescenariofieldvalue_request: Optional[PutV3ProjectplanScenariofieldsUpdatescenariofieldvalueRequest] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[PutV3ProjectplanScenariofieldsUpdatescenariofieldvalueResponse]:
        """更新字段值

        更新字段值

        :param project_plan_id: 计划id (required)
        :type project_plan_id: str
        :param scenariofield_id: 该字段值在计划中的场景字段id (required)
        :type scenariofield_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param put_v3_projectplan_scenariofields_updatescenariofieldvalue_request: 
        :type put_v3_projectplan_scenariofields_updatescenariofieldvalue_request: PutV3ProjectplanScenariofieldsUpdatescenariofieldvalueRequest
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._put_v3_projectplan_scenariofields_updatescenariofieldvalue_serialize(
            project_plan_id=project_plan_id,
            scenariofield_id=scenariofield_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            put_v3_projectplan_scenariofields_updatescenariofieldvalue_request=put_v3_projectplan_scenariofields_updatescenariofieldvalue_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "PutV3ProjectplanScenariofieldsUpdatescenariofieldvalueResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    def put_v3_projectplan_scenariofields_updatescenariofieldvalue_without_preload_content(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划id")],
        scenariofield_id: Annotated[StrictStr, Field(description="该字段值在计划中的场景字段id")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        put_v3_projectplan_scenariofields_updatescenariofieldvalue_request: Optional[PutV3ProjectplanScenariofieldsUpdatescenariofieldvalueRequest] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """更新字段值

        更新字段值

        :param project_plan_id: 计划id (required)
        :type project_plan_id: str
        :param scenariofield_id: 该字段值在计划中的场景字段id (required)
        :type scenariofield_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param put_v3_projectplan_scenariofields_updatescenariofieldvalue_request: 
        :type put_v3_projectplan_scenariofields_updatescenariofieldvalue_request: PutV3ProjectplanScenariofieldsUpdatescenariofieldvalueRequest
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._put_v3_projectplan_scenariofields_updatescenariofieldvalue_serialize(
            project_plan_id=project_plan_id,
            scenariofield_id=scenariofield_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            put_v3_projectplan_scenariofields_updatescenariofieldvalue_request=put_v3_projectplan_scenariofields_updatescenariofieldvalue_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "PutV3ProjectplanScenariofieldsUpdatescenariofieldvalueResponse",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        return response_data.response

    def _put_v3_projectplan_scenariofields_updatescenariofieldvalue_serialize(
        self,
        project_plan_id,
        scenariofield_id,
        x_operator_id,
        x_tenant_id,
        put_v3_projectplan_scenariofields_updatescenariofieldvalue_request,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = 'https://open.teambition.com/api'  

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if project_plan_id is not None:
            _path_params['projectPlanId'] = project_plan_id
        if scenariofield_id is not None:
            _path_params['scenariofieldId'] = scenariofield_id
        # process the query parameters
        # process the header parameters
        if x_operator_id is not None:
            _header_params['x-operator-id'] = x_operator_id
        if x_tenant_id is not None:
            _header_params['X-Tenant-Id'] = x_tenant_id
        # process the form parameters
        # process the body parameter
        if put_v3_projectplan_scenariofields_updatescenariofieldvalue_request is not None:
            _body_params = put_v3_projectplan_scenariofields_updatescenariofieldvalue_request


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )

        # set the HTTP header `Content-Type`
        if _content_type:
            _header_params['Content-Type'] = _content_type
        else:
            _default_content_type = (
                self.api_client.select_header_content_type(
                    [
                        'application/json'
                    ]
                )
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = [
            'appToken'
        ]

        # Build the full URL
        url = _host + "/v3/projectplan/{projectPlanId}/scenariofields/{scenariofieldId}/updateScenariofieldValue"
        url = url.replace('{' + 'projectPlanId' + '}', str(project_plan_id))
        url = url.replace('{' + 'scenariofieldId' + '}', str(scenariofield_id))

        return self.api_client.param_serialize(
            method='PUT',
            resource_path='/v3/projectplan/{projectPlanId}/scenariofields/{scenariofieldId}/updateScenariofieldValue',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )


    @validate_call
    def put_v3_projectplan_task_plans_tasks_executorid(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        task_id: Annotated[StrictStr, Field(description="任务ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        put_v3_projectplan_task_plans_tasks_executorid_request: Optional[PutV3ProjectplanTaskPlansTasksExecutoridRequest] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> UpdateTaskExecutorV3Response:
        """更新计划任务执行者

        更新计划任务执行者

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param task_id: 任务ID (required)
        :type task_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param put_v3_projectplan_task_plans_tasks_executorid_request: 
        :type put_v3_projectplan_task_plans_tasks_executorid_request: PutV3ProjectplanTaskPlansTasksExecutoridRequest
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._put_v3_projectplan_task_plans_tasks_executorid_serialize(
            project_plan_id=project_plan_id,
            task_id=task_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            put_v3_projectplan_task_plans_tasks_executorid_request=put_v3_projectplan_task_plans_tasks_executorid_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "UpdateTaskExecutorV3Response",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    def put_v3_projectplan_task_plans_tasks_executorid_with_http_info(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        task_id: Annotated[StrictStr, Field(description="任务ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        put_v3_projectplan_task_plans_tasks_executorid_request: Optional[PutV3ProjectplanTaskPlansTasksExecutoridRequest] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[UpdateTaskExecutorV3Response]:
        """更新计划任务执行者

        更新计划任务执行者

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param task_id: 任务ID (required)
        :type task_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param put_v3_projectplan_task_plans_tasks_executorid_request: 
        :type put_v3_projectplan_task_plans_tasks_executorid_request: PutV3ProjectplanTaskPlansTasksExecutoridRequest
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._put_v3_projectplan_task_plans_tasks_executorid_serialize(
            project_plan_id=project_plan_id,
            task_id=task_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            put_v3_projectplan_task_plans_tasks_executorid_request=put_v3_projectplan_task_plans_tasks_executorid_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "UpdateTaskExecutorV3Response",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    def put_v3_projectplan_task_plans_tasks_executorid_without_preload_content(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        task_id: Annotated[StrictStr, Field(description="任务ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        put_v3_projectplan_task_plans_tasks_executorid_request: Optional[PutV3ProjectplanTaskPlansTasksExecutoridRequest] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """更新计划任务执行者

        更新计划任务执行者

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param task_id: 任务ID (required)
        :type task_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param put_v3_projectplan_task_plans_tasks_executorid_request: 
        :type put_v3_projectplan_task_plans_tasks_executorid_request: PutV3ProjectplanTaskPlansTasksExecutoridRequest
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._put_v3_projectplan_task_plans_tasks_executorid_serialize(
            project_plan_id=project_plan_id,
            task_id=task_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            put_v3_projectplan_task_plans_tasks_executorid_request=put_v3_projectplan_task_plans_tasks_executorid_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "UpdateTaskExecutorV3Response",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        return response_data.response

    def _put_v3_projectplan_task_plans_tasks_executorid_serialize(
        self,
        project_plan_id,
        task_id,
        x_operator_id,
        x_tenant_id,
        put_v3_projectplan_task_plans_tasks_executorid_request,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = 'https://open.teambition.com/api'  

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if project_plan_id is not None:
            _path_params['projectPlanId'] = project_plan_id
        if task_id is not None:
            _path_params['taskId'] = task_id
        # process the query parameters
        # process the header parameters
        if x_operator_id is not None:
            _header_params['x-operator-id'] = x_operator_id
        if x_tenant_id is not None:
            _header_params['X-Tenant-Id'] = x_tenant_id
        # process the form parameters
        # process the body parameter
        if put_v3_projectplan_task_plans_tasks_executorid_request is not None:
            _body_params = put_v3_projectplan_task_plans_tasks_executorid_request


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )

        # set the HTTP header `Content-Type`
        if _content_type:
            _header_params['Content-Type'] = _content_type
        else:
            _default_content_type = (
                self.api_client.select_header_content_type(
                    [
                        'application/json'
                    ]
                )
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = [
            'appToken'
        ]

        # Build the full URL
        url = _host + "/v3/projectplan-task/plans/{projectPlanId}/tasks/{taskId}/executorId"
        url = url.replace('{' + 'projectPlanId' + '}', str(project_plan_id))
        url = url.replace('{' + 'taskId' + '}', str(task_id))

        return self.api_client.param_serialize(
            method='PUT',
            resource_path='/v3/projectplan-task/plans/{projectPlanId}/tasks/{taskId}/executorId',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )


    @validate_call
    def search_project_plan_tasks_v3(
        self,
        project_id: Annotated[StrictStr, Field(description="项目ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        tql: Annotated[Optional[StrictStr], Field(description="企业下任务搜索TQL语句")] = None,
        page_size: Annotated[Optional[StrictInt], Field(description="分页长度")] = None,
        page_token: Annotated[Optional[StrictStr], Field(description="分页标")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> SearchProjectPlanTasksV3Response:
        """通过TQL搜索项目计划任务

        通过TQL搜索项目计划任务

        :param project_id: 项目ID (required)
        :type project_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param tql: 企业下任务搜索TQL语句
        :type tql: str
        :param page_size: 分页长度
        :type page_size: int
        :param page_token: 分页标
        :type page_token: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._search_project_plan_tasks_v3_serialize(
            project_id=project_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            tql=tql,
            page_size=page_size,
            page_token=page_token,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "SearchProjectPlanTasksV3Response",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    def search_project_plan_tasks_v3_with_http_info(
        self,
        project_id: Annotated[StrictStr, Field(description="项目ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        tql: Annotated[Optional[StrictStr], Field(description="企业下任务搜索TQL语句")] = None,
        page_size: Annotated[Optional[StrictInt], Field(description="分页长度")] = None,
        page_token: Annotated[Optional[StrictStr], Field(description="分页标")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[SearchProjectPlanTasksV3Response]:
        """通过TQL搜索项目计划任务

        通过TQL搜索项目计划任务

        :param project_id: 项目ID (required)
        :type project_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param tql: 企业下任务搜索TQL语句
        :type tql: str
        :param page_size: 分页长度
        :type page_size: int
        :param page_token: 分页标
        :type page_token: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._search_project_plan_tasks_v3_serialize(
            project_id=project_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            tql=tql,
            page_size=page_size,
            page_token=page_token,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "SearchProjectPlanTasksV3Response",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    def search_project_plan_tasks_v3_without_preload_content(
        self,
        project_id: Annotated[StrictStr, Field(description="项目ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        tql: Annotated[Optional[StrictStr], Field(description="企业下任务搜索TQL语句")] = None,
        page_size: Annotated[Optional[StrictInt], Field(description="分页长度")] = None,
        page_token: Annotated[Optional[StrictStr], Field(description="分页标")] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """通过TQL搜索项目计划任务

        通过TQL搜索项目计划任务

        :param project_id: 项目ID (required)
        :type project_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param tql: 企业下任务搜索TQL语句
        :type tql: str
        :param page_size: 分页长度
        :type page_size: int
        :param page_token: 分页标
        :type page_token: str
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._search_project_plan_tasks_v3_serialize(
            project_id=project_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            tql=tql,
            page_size=page_size,
            page_token=page_token,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "SearchProjectPlanTasksV3Response",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        return response_data.response

    def _search_project_plan_tasks_v3_serialize(
        self,
        project_id,
        x_operator_id,
        x_tenant_id,
        tql,
        page_size,
        page_token,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = 'https://open.teambition.com/api'  

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if project_id is not None:
            _path_params['projectId'] = project_id
        # process the query parameters
        if tql is not None:
            
            _query_params.append(('tql', tql))
            
        if page_size is not None:
            
            _query_params.append(('pageSize', page_size))
            
        if page_token is not None:
            
            _query_params.append(('pageToken', page_token))
            
        # process the header parameters
        if x_operator_id is not None:
            _header_params['x-operator-id'] = x_operator_id
        if x_tenant_id is not None:
            _header_params['X-Tenant-Id'] = x_tenant_id
        # process the form parameters
        # process the body parameter


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )


        # authentication setting
        _auth_settings: List[str] = [
            'appToken'
        ]

        # Build the full URL
        url = _host + "/v3/project/{projectId}/plan-task/search"
        url = url.replace('{' + 'projectId' + '}', str(project_id))

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/v3/project/{projectId}/plan-task/search',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )


    @validate_call
    def update_plan_approval_v3(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="租户 ID")] = None,
        x_operator_id: Annotated[Optional[StrictStr], Field(description=" 操作者ID")] = None,
        update_plan_approval_v3_request: Optional[UpdatePlanApprovalV3Request] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ExecutePlanEventV3Response:
        """更新计划审批信息

        更新计划审批信息

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param x_tenant_id: 租户 ID
        :type x_tenant_id: str
        :param x_operator_id:  操作者ID
        :type x_operator_id: str
        :param update_plan_approval_v3_request: 
        :type update_plan_approval_v3_request: UpdatePlanApprovalV3Request
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._update_plan_approval_v3_serialize(
            project_plan_id=project_plan_id,
            x_tenant_id=x_tenant_id,
            x_operator_id=x_operator_id,
            update_plan_approval_v3_request=update_plan_approval_v3_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ExecutePlanEventV3Response",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    def update_plan_approval_v3_with_http_info(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="租户 ID")] = None,
        x_operator_id: Annotated[Optional[StrictStr], Field(description=" 操作者ID")] = None,
        update_plan_approval_v3_request: Optional[UpdatePlanApprovalV3Request] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[ExecutePlanEventV3Response]:
        """更新计划审批信息

        更新计划审批信息

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param x_tenant_id: 租户 ID
        :type x_tenant_id: str
        :param x_operator_id:  操作者ID
        :type x_operator_id: str
        :param update_plan_approval_v3_request: 
        :type update_plan_approval_v3_request: UpdatePlanApprovalV3Request
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._update_plan_approval_v3_serialize(
            project_plan_id=project_plan_id,
            x_tenant_id=x_tenant_id,
            x_operator_id=x_operator_id,
            update_plan_approval_v3_request=update_plan_approval_v3_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ExecutePlanEventV3Response",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    def update_plan_approval_v3_without_preload_content(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="租户 ID")] = None,
        x_operator_id: Annotated[Optional[StrictStr], Field(description=" 操作者ID")] = None,
        update_plan_approval_v3_request: Optional[UpdatePlanApprovalV3Request] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """更新计划审批信息

        更新计划审批信息

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param x_tenant_id: 租户 ID
        :type x_tenant_id: str
        :param x_operator_id:  操作者ID
        :type x_operator_id: str
        :param update_plan_approval_v3_request: 
        :type update_plan_approval_v3_request: UpdatePlanApprovalV3Request
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._update_plan_approval_v3_serialize(
            project_plan_id=project_plan_id,
            x_tenant_id=x_tenant_id,
            x_operator_id=x_operator_id,
            update_plan_approval_v3_request=update_plan_approval_v3_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "ExecutePlanEventV3Response",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        return response_data.response

    def _update_plan_approval_v3_serialize(
        self,
        project_plan_id,
        x_tenant_id,
        x_operator_id,
        update_plan_approval_v3_request,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = 'https://open.teambition.com/api'  

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if project_plan_id is not None:
            _path_params['projectPlanId'] = project_plan_id
        # process the query parameters
        # process the header parameters
        if x_tenant_id is not None:
            _header_params['X-Tenant-Id'] = x_tenant_id
        if x_operator_id is not None:
            _header_params['X-Operator-Id'] = x_operator_id
        # process the form parameters
        # process the body parameter
        if update_plan_approval_v3_request is not None:
            _body_params = update_plan_approval_v3_request


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )

        # set the HTTP header `Content-Type`
        if _content_type:
            _header_params['Content-Type'] = _content_type
        else:
            _default_content_type = (
                self.api_client.select_header_content_type(
                    [
                        'application/json'
                    ]
                )
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = [
            'appToken'
        ]

        # Build the full URL
        url = _host + "/v3/projectplan/plans/{projectPlanId}/approve"
        url = url.replace('{' + 'projectPlanId' + '}', str(project_plan_id))

        return self.api_client.param_serialize(
            method='PUT',
            resource_path='/v3/projectplan/plans/{projectPlanId}/approve',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )


    @validate_call
    def update_plan_custom_status_v3(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作人ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        update_plan_custom_status_v3_request: Optional[UpdatePlanCustomStatusV3Request] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> UpdatePlanCustomStatusV3Response:
        """配置计划自定义状态

        配置计划自定义状态

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param x_operator_id: 操作人ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param update_plan_custom_status_v3_request: 
        :type update_plan_custom_status_v3_request: UpdatePlanCustomStatusV3Request
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._update_plan_custom_status_v3_serialize(
            project_plan_id=project_plan_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            update_plan_custom_status_v3_request=update_plan_custom_status_v3_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "UpdatePlanCustomStatusV3Response",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    def update_plan_custom_status_v3_with_http_info(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作人ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        update_plan_custom_status_v3_request: Optional[UpdatePlanCustomStatusV3Request] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[UpdatePlanCustomStatusV3Response]:
        """配置计划自定义状态

        配置计划自定义状态

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param x_operator_id: 操作人ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param update_plan_custom_status_v3_request: 
        :type update_plan_custom_status_v3_request: UpdatePlanCustomStatusV3Request
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._update_plan_custom_status_v3_serialize(
            project_plan_id=project_plan_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            update_plan_custom_status_v3_request=update_plan_custom_status_v3_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "UpdatePlanCustomStatusV3Response",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    def update_plan_custom_status_v3_without_preload_content(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作人ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        update_plan_custom_status_v3_request: Optional[UpdatePlanCustomStatusV3Request] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """配置计划自定义状态

        配置计划自定义状态

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param x_operator_id: 操作人ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param update_plan_custom_status_v3_request: 
        :type update_plan_custom_status_v3_request: UpdatePlanCustomStatusV3Request
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._update_plan_custom_status_v3_serialize(
            project_plan_id=project_plan_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            update_plan_custom_status_v3_request=update_plan_custom_status_v3_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "UpdatePlanCustomStatusV3Response",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        return response_data.response

    def _update_plan_custom_status_v3_serialize(
        self,
        project_plan_id,
        x_operator_id,
        x_tenant_id,
        update_plan_custom_status_v3_request,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = 'https://open.teambition.com/api'  

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if project_plan_id is not None:
            _path_params['projectPlanId'] = project_plan_id
        # process the query parameters
        # process the header parameters
        if x_operator_id is not None:
            _header_params['x-operator-id'] = x_operator_id
        if x_tenant_id is not None:
            _header_params['X-Tenant-Id'] = x_tenant_id
        # process the form parameters
        # process the body parameter
        if update_plan_custom_status_v3_request is not None:
            _body_params = update_plan_custom_status_v3_request


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )

        # set the HTTP header `Content-Type`
        if _content_type:
            _header_params['Content-Type'] = _content_type
        else:
            _default_content_type = (
                self.api_client.select_header_content_type(
                    [
                        'application/json'
                    ]
                )
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = [
            'appToken'
        ]

        # Build the full URL
        url = _host + "/v3/projectplan/plans/{projectPlanId}/customStatus"
        url = url.replace('{' + 'projectPlanId' + '}', str(project_plan_id))

        return self.api_client.param_serialize(
            method='PUT',
            resource_path='/v3/projectplan/plans/{projectPlanId}/customStatus',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )


    @validate_call
    def update_plan_member_role_v3(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        update_plan_member_role_v3_request: Optional[UpdatePlanMemberRoleV3Request] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> UpdatePlanMemberRoleV3Response:
        """修改计划成员角色

        修改计划成员角色

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param update_plan_member_role_v3_request: 
        :type update_plan_member_role_v3_request: UpdatePlanMemberRoleV3Request
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._update_plan_member_role_v3_serialize(
            project_plan_id=project_plan_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            update_plan_member_role_v3_request=update_plan_member_role_v3_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "UpdatePlanMemberRoleV3Response",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    def update_plan_member_role_v3_with_http_info(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        update_plan_member_role_v3_request: Optional[UpdatePlanMemberRoleV3Request] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[UpdatePlanMemberRoleV3Response]:
        """修改计划成员角色

        修改计划成员角色

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param update_plan_member_role_v3_request: 
        :type update_plan_member_role_v3_request: UpdatePlanMemberRoleV3Request
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._update_plan_member_role_v3_serialize(
            project_plan_id=project_plan_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            update_plan_member_role_v3_request=update_plan_member_role_v3_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "UpdatePlanMemberRoleV3Response",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    def update_plan_member_role_v3_without_preload_content(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        update_plan_member_role_v3_request: Optional[UpdatePlanMemberRoleV3Request] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """修改计划成员角色

        修改计划成员角色

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param update_plan_member_role_v3_request: 
        :type update_plan_member_role_v3_request: UpdatePlanMemberRoleV3Request
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._update_plan_member_role_v3_serialize(
            project_plan_id=project_plan_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            update_plan_member_role_v3_request=update_plan_member_role_v3_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "UpdatePlanMemberRoleV3Response",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        return response_data.response

    def _update_plan_member_role_v3_serialize(
        self,
        project_plan_id,
        x_operator_id,
        x_tenant_id,
        update_plan_member_role_v3_request,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = 'https://open.teambition.com/api'  

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if project_plan_id is not None:
            _path_params['projectPlanId'] = project_plan_id
        # process the query parameters
        # process the header parameters
        if x_operator_id is not None:
            _header_params['x-operator-id'] = x_operator_id
        if x_tenant_id is not None:
            _header_params['X-Tenant-Id'] = x_tenant_id
        # process the form parameters
        # process the body parameter
        if update_plan_member_role_v3_request is not None:
            _body_params = update_plan_member_role_v3_request


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )

        # set the HTTP header `Content-Type`
        if _content_type:
            _header_params['Content-Type'] = _content_type
        else:
            _default_content_type = (
                self.api_client.select_header_content_type(
                    [
                        'application/json'
                    ]
                )
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = [
            'appToken'
        ]

        # Build the full URL
        url = _host + "/v3/projectplan/plans/{projectPlanId}/members"
        url = url.replace('{' + 'projectPlanId' + '}', str(project_plan_id))

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/v3/projectplan/plans/{projectPlanId}/members',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )


    @validate_call
    def update_project_plan_task_v3(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        task_id: Annotated[StrictStr, Field(description="任务ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        update_project_plan_task_v3_request: Optional[UpdateProjectPlanTaskV3Request] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> UpdateProjectPlanTaskV3Response:
        """更新计划任务（标题、开始时间、截止时间）

        更新计划任务（标题、开始时间、截止时间）

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param task_id: 任务ID (required)
        :type task_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param update_project_plan_task_v3_request: 
        :type update_project_plan_task_v3_request: UpdateProjectPlanTaskV3Request
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._update_project_plan_task_v3_serialize(
            project_plan_id=project_plan_id,
            task_id=task_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            update_project_plan_task_v3_request=update_project_plan_task_v3_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "UpdateProjectPlanTaskV3Response",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        ).data

    @validate_call
    def update_project_plan_task_v3_with_http_info(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        task_id: Annotated[StrictStr, Field(description="任务ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        update_project_plan_task_v3_request: Optional[UpdateProjectPlanTaskV3Request] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[UpdateProjectPlanTaskV3Response]:
        """更新计划任务（标题、开始时间、截止时间）

        更新计划任务（标题、开始时间、截止时间）

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param task_id: 任务ID (required)
        :type task_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param update_project_plan_task_v3_request: 
        :type update_project_plan_task_v3_request: UpdateProjectPlanTaskV3Request
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._update_project_plan_task_v3_serialize(
            project_plan_id=project_plan_id,
            task_id=task_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            update_project_plan_task_v3_request=update_project_plan_task_v3_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "UpdateProjectPlanTaskV3Response",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        response_data.read()
        return self.api_client.response_deserialize(
            response_data=response_data,
            response_types_map=_response_types_map,
        )

    @validate_call
    def update_project_plan_task_v3_without_preload_content(
        self,
        project_plan_id: Annotated[StrictStr, Field(description="计划ID")],
        task_id: Annotated[StrictStr, Field(description="任务ID")],
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作者ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        update_project_plan_task_v3_request: Optional[UpdateProjectPlanTaskV3Request] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """更新计划任务（标题、开始时间、截止时间）

        更新计划任务（标题、开始时间、截止时间）

        :param project_plan_id: 计划ID (required)
        :type project_plan_id: str
        :param task_id: 任务ID (required)
        :type task_id: str
        :param x_operator_id: 操作者ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param update_project_plan_task_v3_request: 
        :type update_project_plan_task_v3_request: UpdateProjectPlanTaskV3Request
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._update_project_plan_task_v3_serialize(
            project_plan_id=project_plan_id,
            task_id=task_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            update_project_plan_task_v3_request=update_project_plan_task_v3_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "UpdateProjectPlanTaskV3Response",
        }

        method, url, header_params, body, post_params = _param
        response_data = self.api_client.call_api(
            method=method,
            url=url,
            header_params=header_params,
            body=body,
            post_params=post_params,
            _request_timeout=_request_timeout
        )
        return response_data.response

    def _update_project_plan_task_v3_serialize(
        self,
        project_plan_id,
        task_id,
        x_operator_id,
        x_tenant_id,
        update_project_plan_task_v3_request,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = 'https://open.teambition.com/api'  

        _collection_formats: Dict[str, str] = {
        }

        _path_params: Dict[str, str] = {}
        _query_params: List[Tuple[str, str]] = []
        _header_params: Dict[str, Optional[str]] = _headers or {}
        _form_params: List[Tuple[str, str]] = []
        _files: Dict[
            str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
        ] = {}
        _body_params: Optional[bytes] = None

        # process the path parameters
        if project_plan_id is not None:
            _path_params['projectPlanId'] = project_plan_id
        if task_id is not None:
            _path_params['taskId'] = task_id
        # process the query parameters
        # process the header parameters
        if x_operator_id is not None:
            _header_params['x-operator-id'] = x_operator_id
        if x_tenant_id is not None:
            _header_params['X-Tenant-Id'] = x_tenant_id
        # process the form parameters
        # process the body parameter
        if update_project_plan_task_v3_request is not None:
            _body_params = update_project_plan_task_v3_request


        # set the HTTP header `Accept`
        if 'Accept' not in _header_params:
            _header_params['Accept'] = self.api_client.select_header_accept(
                [
                    'application/json'
                ]
            )

        # set the HTTP header `Content-Type`
        if _content_type:
            _header_params['Content-Type'] = _content_type
        else:
            _default_content_type = (
                self.api_client.select_header_content_type(
                    [
                        'application/json'
                    ]
                )
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = [
            'appToken'
        ]

        # Build the full URL
        url = _host + "/v3/projectplan-task/plans/{projectPlanId}/tasks/{taskId}"
        url = url.replace('{' + 'projectPlanId' + '}', str(project_plan_id))
        url = url.replace('{' + 'taskId' + '}', str(task_id))

        return self.api_client.param_serialize(
            method='PUT',
            resource_path='/v3/projectplan-task/plans/{projectPlanId}/tasks/{taskId}',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )

