# 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, StrictInt, StrictStr
from typing import Optional
from typing_extensions import Annotated
from teambition_oapi_sdk.model.add_program_members_v3_request import AddProgramMembersV3Request
from teambition_oapi_sdk.model.add_program_members_v3_response import AddProgramMembersV3Response
from teambition_oapi_sdk.model.add_program_projects_v3_request import AddProgramProjectsV3Request
from teambition_oapi_sdk.model.add_program_projects_v3_response import AddProgramProjectsV3Response
from teambition_oapi_sdk.model.create_program_status_custom_field_v3_request import CreateProgramStatusCustomFieldV3Request
from teambition_oapi_sdk.model.create_program_status_custom_field_v3_response import CreateProgramStatusCustomFieldV3Response
from teambition_oapi_sdk.model.create_program_status_v3_request import CreateProgramStatusV3Request
from teambition_oapi_sdk.model.create_program_status_v3_response import CreateProgramStatusV3Response
from teambition_oapi_sdk.model.create_program_v3_request import CreateProgramV3Request
from teambition_oapi_sdk.model.create_program_v3_response import CreateProgramV3Response
from teambition_oapi_sdk.model.delete_program_status_custom_field_v3_request import DeleteProgramStatusCustomFieldV3Request
from teambition_oapi_sdk.model.delete_program_status_custom_field_v3_response import DeleteProgramStatusCustomFieldV3Response
from teambition_oapi_sdk.model.delete_program_status_v3_request import DeleteProgramStatusV3Request
from teambition_oapi_sdk.model.delete_program_status_v3_response import DeleteProgramStatusV3Response
from teambition_oapi_sdk.model.delete_program_v3_response import DeleteProgramV3Response
from teambition_oapi_sdk.model.get_programs_v3_response import GetProgramsV3Response
from teambition_oapi_sdk.model.list_program_members_v3_response import ListProgramMembersV3Response
from teambition_oapi_sdk.model.list_program_projects_v3_response import ListProgramProjectsV3Response
from teambition_oapi_sdk.model.list_program_status_custom_fields_v3_response import ListProgramStatusCustomFieldsV3Response
from teambition_oapi_sdk.model.list_program_statuses_v3_response import ListProgramStatusesV3Response
from teambition_oapi_sdk.model.post_v3_program_update_request import PostV3ProgramUpdateRequest
from teambition_oapi_sdk.model.post_v3_program_update_response import PostV3ProgramUpdateResponse
from teambition_oapi_sdk.model.remove_program_project_v3_response import RemoveProgramProjectV3Response

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 ProgramApi:
    """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 add_program_members_v3(
        self,
        program_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,
        add_program_members_v3_request: Optional[AddProgramMembersV3Request] = 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,
    ) -> AddProgramMembersV3Response:
        """批量添加成员到项目集

        批量添加成员到项目集

        :param program_id: 项目集 ID (required)
        :type program_id: str
        :param x_operator_id: 操作人 ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param add_program_members_v3_request: 
        :type add_program_members_v3_request: AddProgramMembersV3Request
        :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._add_program_members_v3_serialize(
            program_id=program_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            add_program_members_v3_request=add_program_members_v3_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

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

        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 add_program_members_v3_with_http_info(
        self,
        program_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,
        add_program_members_v3_request: Optional[AddProgramMembersV3Request] = 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[AddProgramMembersV3Response]:
        """批量添加成员到项目集

        批量添加成员到项目集

        :param program_id: 项目集 ID (required)
        :type program_id: str
        :param x_operator_id: 操作人 ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param add_program_members_v3_request: 
        :type add_program_members_v3_request: AddProgramMembersV3Request
        :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._add_program_members_v3_serialize(
            program_id=program_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            add_program_members_v3_request=add_program_members_v3_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

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

        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 add_program_members_v3_without_preload_content(
        self,
        program_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,
        add_program_members_v3_request: Optional[AddProgramMembersV3Request] = 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 program_id: 项目集 ID (required)
        :type program_id: str
        :param x_operator_id: 操作人 ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param add_program_members_v3_request: 
        :type add_program_members_v3_request: AddProgramMembersV3Request
        :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._add_program_members_v3_serialize(
            program_id=program_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            add_program_members_v3_request=add_program_members_v3_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

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

        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 _add_program_members_v3_serialize(
        self,
        program_id,
        x_operator_id,
        x_tenant_id,
        add_program_members_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 program_id is not None:
            _path_params['programId'] = program_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 add_program_members_v3_request is not None:
            _body_params = add_program_members_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/program/{programId}/member/create"
        url = url.replace('{' + 'programId' + '}', str(program_id))

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/v3/program/{programId}/member/create',
            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 add_program_projects_v3(
        self,
        program_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,
        add_program_projects_v3_request: Optional[AddProgramProjectsV3Request] = 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,
    ) -> AddProgramProjectsV3Response:
        """批量添加项目到项目集

        批量添加项目到项目集

        :param program_id: 项目集 ID (required)
        :type program_id: str
        :param x_operator_id: 操作人 ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param add_program_projects_v3_request: 
        :type add_program_projects_v3_request: AddProgramProjectsV3Request
        :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._add_program_projects_v3_serialize(
            program_id=program_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            add_program_projects_v3_request=add_program_projects_v3_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

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

        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 add_program_projects_v3_with_http_info(
        self,
        program_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,
        add_program_projects_v3_request: Optional[AddProgramProjectsV3Request] = 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[AddProgramProjectsV3Response]:
        """批量添加项目到项目集

        批量添加项目到项目集

        :param program_id: 项目集 ID (required)
        :type program_id: str
        :param x_operator_id: 操作人 ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param add_program_projects_v3_request: 
        :type add_program_projects_v3_request: AddProgramProjectsV3Request
        :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._add_program_projects_v3_serialize(
            program_id=program_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            add_program_projects_v3_request=add_program_projects_v3_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

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

        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 add_program_projects_v3_without_preload_content(
        self,
        program_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,
        add_program_projects_v3_request: Optional[AddProgramProjectsV3Request] = 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 program_id: 项目集 ID (required)
        :type program_id: str
        :param x_operator_id: 操作人 ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param add_program_projects_v3_request: 
        :type add_program_projects_v3_request: AddProgramProjectsV3Request
        :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._add_program_projects_v3_serialize(
            program_id=program_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            add_program_projects_v3_request=add_program_projects_v3_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

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

        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 _add_program_projects_v3_serialize(
        self,
        program_id,
        x_operator_id,
        x_tenant_id,
        add_program_projects_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 program_id is not None:
            _path_params['programId'] = program_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 add_program_projects_v3_request is not None:
            _body_params = add_program_projects_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/program/{programId}/project/create"
        url = url.replace('{' + 'programId' + '}', str(program_id))

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/v3/program/{programId}/project/create',
            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_program_status_custom_field_v3(
        self,
        program_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_program_status_custom_field_v3_request: Optional[CreateProgramStatusCustomFieldV3Request] = 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,
    ) -> CreateProgramStatusCustomFieldV3Response:
        """更新项目集概览自定义字段值

        更新项目集概览自定义字段值

        :param program_id: 项目集 ID (required)
        :type program_id: str
        :param x_operator_id: 操作者 ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param create_program_status_custom_field_v3_request: 
        :type create_program_status_custom_field_v3_request: CreateProgramStatusCustomFieldV3Request
        :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_program_status_custom_field_v3_serialize(
            program_id=program_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            create_program_status_custom_field_v3_request=create_program_status_custom_field_v3_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

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

        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_program_status_custom_field_v3_with_http_info(
        self,
        program_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_program_status_custom_field_v3_request: Optional[CreateProgramStatusCustomFieldV3Request] = 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[CreateProgramStatusCustomFieldV3Response]:
        """更新项目集概览自定义字段值

        更新项目集概览自定义字段值

        :param program_id: 项目集 ID (required)
        :type program_id: str
        :param x_operator_id: 操作者 ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param create_program_status_custom_field_v3_request: 
        :type create_program_status_custom_field_v3_request: CreateProgramStatusCustomFieldV3Request
        :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_program_status_custom_field_v3_serialize(
            program_id=program_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            create_program_status_custom_field_v3_request=create_program_status_custom_field_v3_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

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

        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_program_status_custom_field_v3_without_preload_content(
        self,
        program_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_program_status_custom_field_v3_request: Optional[CreateProgramStatusCustomFieldV3Request] = 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 program_id: 项目集 ID (required)
        :type program_id: str
        :param x_operator_id: 操作者 ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param create_program_status_custom_field_v3_request: 
        :type create_program_status_custom_field_v3_request: CreateProgramStatusCustomFieldV3Request
        :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_program_status_custom_field_v3_serialize(
            program_id=program_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            create_program_status_custom_field_v3_request=create_program_status_custom_field_v3_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

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

        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_program_status_custom_field_v3_serialize(
        self,
        program_id,
        x_operator_id,
        x_tenant_id,
        create_program_status_custom_field_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 program_id is not None:
            _path_params['programId'] = program_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_program_status_custom_field_v3_request is not None:
            _body_params = create_program_status_custom_field_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/program/{programId}/status/customfield/create"
        url = url.replace('{' + 'programId' + '}', str(program_id))

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/v3/program/{programId}/status/customfield/create',
            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_program_status_v3(
        self,
        program_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_program_status_v3_request: Optional[CreateProgramStatusV3Request] = 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,
    ) -> CreateProgramStatusV3Response:
        """创建项目集状态

        创建项目集状态

        :param program_id: 项目集 ID (required)
        :type program_id: str
        :param x_operator_id: 操作者 ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param create_program_status_v3_request: 
        :type create_program_status_v3_request: CreateProgramStatusV3Request
        :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_program_status_v3_serialize(
            program_id=program_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            create_program_status_v3_request=create_program_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': "CreateProgramStatusV3Response",
        }

        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_program_status_v3_with_http_info(
        self,
        program_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_program_status_v3_request: Optional[CreateProgramStatusV3Request] = 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[CreateProgramStatusV3Response]:
        """创建项目集状态

        创建项目集状态

        :param program_id: 项目集 ID (required)
        :type program_id: str
        :param x_operator_id: 操作者 ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param create_program_status_v3_request: 
        :type create_program_status_v3_request: CreateProgramStatusV3Request
        :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_program_status_v3_serialize(
            program_id=program_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            create_program_status_v3_request=create_program_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': "CreateProgramStatusV3Response",
        }

        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_program_status_v3_without_preload_content(
        self,
        program_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_program_status_v3_request: Optional[CreateProgramStatusV3Request] = 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 program_id: 项目集 ID (required)
        :type program_id: str
        :param x_operator_id: 操作者 ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param create_program_status_v3_request: 
        :type create_program_status_v3_request: CreateProgramStatusV3Request
        :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_program_status_v3_serialize(
            program_id=program_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            create_program_status_v3_request=create_program_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': "CreateProgramStatusV3Response",
        }

        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_program_status_v3_serialize(
        self,
        program_id,
        x_operator_id,
        x_tenant_id,
        create_program_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 program_id is not None:
            _path_params['programId'] = program_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_program_status_v3_request is not None:
            _body_params = create_program_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/program/{programId}/status/create"
        url = url.replace('{' + 'programId' + '}', str(program_id))

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/v3/program/{programId}/status/create',
            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_program_v3(
        self,
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作人 ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        create_program_v3_request: Optional[CreateProgramV3Request] = 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,
    ) -> CreateProgramV3Response:
        """创建项目集

        创建项目集

        :param x_operator_id: 操作人 ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param create_program_v3_request: 
        :type create_program_v3_request: CreateProgramV3Request
        :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_program_v3_serialize(
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            create_program_v3_request=create_program_v3_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

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

        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_program_v3_with_http_info(
        self,
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作人 ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        create_program_v3_request: Optional[CreateProgramV3Request] = 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[CreateProgramV3Response]:
        """创建项目集

        创建项目集

        :param x_operator_id: 操作人 ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param create_program_v3_request: 
        :type create_program_v3_request: CreateProgramV3Request
        :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_program_v3_serialize(
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            create_program_v3_request=create_program_v3_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

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

        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_program_v3_without_preload_content(
        self,
        x_operator_id: Annotated[Optional[StrictStr], Field(description="操作人 ID")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        create_program_v3_request: Optional[CreateProgramV3Request] = 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 x_operator_id: 操作人 ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param create_program_v3_request: 
        :type create_program_v3_request: CreateProgramV3Request
        :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_program_v3_serialize(
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            create_program_v3_request=create_program_v3_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

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

        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_program_v3_serialize(
        self,
        x_operator_id,
        x_tenant_id,
        create_program_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
        # 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_program_v3_request is not None:
            _body_params = create_program_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/program/create"

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/v3/program/create',
            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_program_status_custom_field_v3(
        self,
        program_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,
        delete_program_status_custom_field_v3_request: Optional[DeleteProgramStatusCustomFieldV3Request] = 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,
    ) -> DeleteProgramStatusCustomFieldV3Response:
        """删除项目集概览自定义字段

        删除项目集概览自定义字段

        :param program_id: 项目集 ID (required)
        :type program_id: str
        :param x_operator_id: 操作者 ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param delete_program_status_custom_field_v3_request: 
        :type delete_program_status_custom_field_v3_request: DeleteProgramStatusCustomFieldV3Request
        :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_program_status_custom_field_v3_serialize(
            program_id=program_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            delete_program_status_custom_field_v3_request=delete_program_status_custom_field_v3_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

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

        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_program_status_custom_field_v3_with_http_info(
        self,
        program_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,
        delete_program_status_custom_field_v3_request: Optional[DeleteProgramStatusCustomFieldV3Request] = 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[DeleteProgramStatusCustomFieldV3Response]:
        """删除项目集概览自定义字段

        删除项目集概览自定义字段

        :param program_id: 项目集 ID (required)
        :type program_id: str
        :param x_operator_id: 操作者 ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param delete_program_status_custom_field_v3_request: 
        :type delete_program_status_custom_field_v3_request: DeleteProgramStatusCustomFieldV3Request
        :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_program_status_custom_field_v3_serialize(
            program_id=program_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            delete_program_status_custom_field_v3_request=delete_program_status_custom_field_v3_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

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

        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_program_status_custom_field_v3_without_preload_content(
        self,
        program_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,
        delete_program_status_custom_field_v3_request: Optional[DeleteProgramStatusCustomFieldV3Request] = 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 program_id: 项目集 ID (required)
        :type program_id: str
        :param x_operator_id: 操作者 ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param delete_program_status_custom_field_v3_request: 
        :type delete_program_status_custom_field_v3_request: DeleteProgramStatusCustomFieldV3Request
        :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_program_status_custom_field_v3_serialize(
            program_id=program_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            delete_program_status_custom_field_v3_request=delete_program_status_custom_field_v3_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

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

        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_program_status_custom_field_v3_serialize(
        self,
        program_id,
        x_operator_id,
        x_tenant_id,
        delete_program_status_custom_field_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 program_id is not None:
            _path_params['programId'] = program_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 delete_program_status_custom_field_v3_request is not None:
            _body_params = delete_program_status_custom_field_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/program/{programId}/status/customfield/delete"
        url = url.replace('{' + 'programId' + '}', str(program_id))

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/v3/program/{programId}/status/customfield/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_program_status_v3(
        self,
        program_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,
        delete_program_status_v3_request: Optional[DeleteProgramStatusV3Request] = 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,
    ) -> DeleteProgramStatusV3Response:
        """删除项目集状态

        删除项目集状态

        :param program_id: 项目集 ID (required)
        :type program_id: str
        :param x_operator_id: 操作者 ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param delete_program_status_v3_request: 
        :type delete_program_status_v3_request: DeleteProgramStatusV3Request
        :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_program_status_v3_serialize(
            program_id=program_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            delete_program_status_v3_request=delete_program_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': "DeleteProgramStatusV3Response",
        }

        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_program_status_v3_with_http_info(
        self,
        program_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,
        delete_program_status_v3_request: Optional[DeleteProgramStatusV3Request] = 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[DeleteProgramStatusV3Response]:
        """删除项目集状态

        删除项目集状态

        :param program_id: 项目集 ID (required)
        :type program_id: str
        :param x_operator_id: 操作者 ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param delete_program_status_v3_request: 
        :type delete_program_status_v3_request: DeleteProgramStatusV3Request
        :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_program_status_v3_serialize(
            program_id=program_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            delete_program_status_v3_request=delete_program_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': "DeleteProgramStatusV3Response",
        }

        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_program_status_v3_without_preload_content(
        self,
        program_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,
        delete_program_status_v3_request: Optional[DeleteProgramStatusV3Request] = 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 program_id: 项目集 ID (required)
        :type program_id: str
        :param x_operator_id: 操作者 ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param delete_program_status_v3_request: 
        :type delete_program_status_v3_request: DeleteProgramStatusV3Request
        :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_program_status_v3_serialize(
            program_id=program_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            delete_program_status_v3_request=delete_program_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': "DeleteProgramStatusV3Response",
        }

        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_program_status_v3_serialize(
        self,
        program_id,
        x_operator_id,
        x_tenant_id,
        delete_program_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 program_id is not None:
            _path_params['programId'] = program_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 delete_program_status_v3_request is not None:
            _body_params = delete_program_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/program/{programId}/status/delete"
        url = url.replace('{' + 'programId' + '}', str(program_id))

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/v3/program/{programId}/status/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_program_v3(
        self,
        program_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,
    ) -> DeleteProgramV3Response:
        """删除项目集

        删除项目集

        :param program_id: 项目集 ID (required)
        :type program_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_program_v3_serialize(
            program_id=program_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': "DeleteProgramV3Response",
        }

        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_program_v3_with_http_info(
        self,
        program_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[DeleteProgramV3Response]:
        """删除项目集

        删除项目集

        :param program_id: 项目集 ID (required)
        :type program_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_program_v3_serialize(
            program_id=program_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': "DeleteProgramV3Response",
        }

        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_program_v3_without_preload_content(
        self,
        program_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 program_id: 项目集 ID (required)
        :type program_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_program_v3_serialize(
            program_id=program_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': "DeleteProgramV3Response",
        }

        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_program_v3_serialize(
        self,
        program_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 program_id is not None:
            _path_params['programId'] = program_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/program/{programId}/delete"
        url = url.replace('{' + 'programId' + '}', str(program_id))

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/v3/program/{programId}/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 get_programs_v3(
        self,
        x_operator_id: Annotated[Optional[StrictStr], Field(description="查询人ID, 如果存在会检查该成员可见的任务")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        program_ids: Annotated[Optional[StrictStr], Field(description="项目集 ID 列表, 逗号分隔，最多50个，和parentId冲突(选其一)")] = None,
        parent_id: Annotated[Optional[StrictStr], Field(description="父项目集 ID, 和programIds冲突(选其一)")] = None,
        virtual_project_ids: Annotated[Optional[StrictStr], Field(description="虚拟项目 ID 列表, 逗号分隔，最多50个")] = None,
        q: Annotated[Optional[StrictStr], Field(description="搜索项目集标题关键词")] = None,
        order_by: Optional[StrictStr] = 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,
    ) -> GetProgramsV3Response:
        """查询项目集

        查询项目集

        :param x_operator_id: 查询人ID, 如果存在会检查该成员可见的任务
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param program_ids: 项目集 ID 列表, 逗号分隔，最多50个，和parentId冲突(选其一)
        :type program_ids: str
        :param parent_id: 父项目集 ID, 和programIds冲突(选其一)
        :type parent_id: str
        :param virtual_project_ids: 虚拟项目 ID 列表, 逗号分隔，最多50个
        :type virtual_project_ids: str
        :param q: 搜索项目集标题关键词
        :type q: str
        :param order_by: 
        :type order_by: 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._get_programs_v3_serialize(
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            program_ids=program_ids,
            parent_id=parent_id,
            virtual_project_ids=virtual_project_ids,
            q=q,
            order_by=order_by,
            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': "GetProgramsV3Response",
        }

        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_programs_v3_with_http_info(
        self,
        x_operator_id: Annotated[Optional[StrictStr], Field(description="查询人ID, 如果存在会检查该成员可见的任务")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        program_ids: Annotated[Optional[StrictStr], Field(description="项目集 ID 列表, 逗号分隔，最多50个，和parentId冲突(选其一)")] = None,
        parent_id: Annotated[Optional[StrictStr], Field(description="父项目集 ID, 和programIds冲突(选其一)")] = None,
        virtual_project_ids: Annotated[Optional[StrictStr], Field(description="虚拟项目 ID 列表, 逗号分隔，最多50个")] = None,
        q: Annotated[Optional[StrictStr], Field(description="搜索项目集标题关键词")] = None,
        order_by: Optional[StrictStr] = 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[GetProgramsV3Response]:
        """查询项目集

        查询项目集

        :param x_operator_id: 查询人ID, 如果存在会检查该成员可见的任务
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param program_ids: 项目集 ID 列表, 逗号分隔，最多50个，和parentId冲突(选其一)
        :type program_ids: str
        :param parent_id: 父项目集 ID, 和programIds冲突(选其一)
        :type parent_id: str
        :param virtual_project_ids: 虚拟项目 ID 列表, 逗号分隔，最多50个
        :type virtual_project_ids: str
        :param q: 搜索项目集标题关键词
        :type q: str
        :param order_by: 
        :type order_by: 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._get_programs_v3_serialize(
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            program_ids=program_ids,
            parent_id=parent_id,
            virtual_project_ids=virtual_project_ids,
            q=q,
            order_by=order_by,
            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': "GetProgramsV3Response",
        }

        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_programs_v3_without_preload_content(
        self,
        x_operator_id: Annotated[Optional[StrictStr], Field(description="查询人ID, 如果存在会检查该成员可见的任务")] = None,
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = None,
        program_ids: Annotated[Optional[StrictStr], Field(description="项目集 ID 列表, 逗号分隔，最多50个，和parentId冲突(选其一)")] = None,
        parent_id: Annotated[Optional[StrictStr], Field(description="父项目集 ID, 和programIds冲突(选其一)")] = None,
        virtual_project_ids: Annotated[Optional[StrictStr], Field(description="虚拟项目 ID 列表, 逗号分隔，最多50个")] = None,
        q: Annotated[Optional[StrictStr], Field(description="搜索项目集标题关键词")] = None,
        order_by: Optional[StrictStr] = 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:
        """查询项目集

        查询项目集

        :param x_operator_id: 查询人ID, 如果存在会检查该成员可见的任务
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param program_ids: 项目集 ID 列表, 逗号分隔，最多50个，和parentId冲突(选其一)
        :type program_ids: str
        :param parent_id: 父项目集 ID, 和programIds冲突(选其一)
        :type parent_id: str
        :param virtual_project_ids: 虚拟项目 ID 列表, 逗号分隔，最多50个
        :type virtual_project_ids: str
        :param q: 搜索项目集标题关键词
        :type q: str
        :param order_by: 
        :type order_by: 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._get_programs_v3_serialize(
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            program_ids=program_ids,
            parent_id=parent_id,
            virtual_project_ids=virtual_project_ids,
            q=q,
            order_by=order_by,
            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': "GetProgramsV3Response",
        }

        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_programs_v3_serialize(
        self,
        x_operator_id,
        x_tenant_id,
        program_ids,
        parent_id,
        virtual_project_ids,
        q,
        order_by,
        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
        # process the query parameters
        if program_ids is not None:
            
            _query_params.append(('programIds', program_ids))
            
        if parent_id is not None:
            
            _query_params.append(('parentId', parent_id))
            
        if virtual_project_ids is not None:
            
            _query_params.append(('virtualProjectIds', virtual_project_ids))
            
        if q is not None:
            
            _query_params.append(('q', q))
            
        if order_by is not None:
            
            _query_params.append(('orderBy', order_by))
            
        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/program/query"

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/v3/program/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 list_program_members_v3(
        self,
        program_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,
        user_ids: Annotated[Optional[StrictStr], Field(description="用户 ID 列表, 逗号分隔，最多50个")] = 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,
    ) -> ListProgramMembersV3Response:
        """查询项目集内成员

        查询项目集内成员

        :param program_id: 项目集 ID (required)
        :type program_id: str
        :param x_operator_id: 操作者 ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param user_ids: 用户 ID 列表, 逗号分隔，最多50个
        :type user_ids: 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._list_program_members_v3_serialize(
            program_id=program_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            user_ids=user_ids,
            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': "ListProgramMembersV3Response",
        }

        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_program_members_v3_with_http_info(
        self,
        program_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,
        user_ids: Annotated[Optional[StrictStr], Field(description="用户 ID 列表, 逗号分隔，最多50个")] = 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[ListProgramMembersV3Response]:
        """查询项目集内成员

        查询项目集内成员

        :param program_id: 项目集 ID (required)
        :type program_id: str
        :param x_operator_id: 操作者 ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param user_ids: 用户 ID 列表, 逗号分隔，最多50个
        :type user_ids: 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._list_program_members_v3_serialize(
            program_id=program_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            user_ids=user_ids,
            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': "ListProgramMembersV3Response",
        }

        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_program_members_v3_without_preload_content(
        self,
        program_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,
        user_ids: Annotated[Optional[StrictStr], Field(description="用户 ID 列表, 逗号分隔，最多50个")] = 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:
        """查询项目集内成员

        查询项目集内成员

        :param program_id: 项目集 ID (required)
        :type program_id: str
        :param x_operator_id: 操作者 ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param user_ids: 用户 ID 列表, 逗号分隔，最多50个
        :type user_ids: 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._list_program_members_v3_serialize(
            program_id=program_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            user_ids=user_ids,
            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': "ListProgramMembersV3Response",
        }

        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_program_members_v3_serialize(
        self,
        program_id,
        x_operator_id,
        x_tenant_id,
        user_ids,
        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 program_id is not None:
            _path_params['programId'] = program_id
        # process the query parameters
        if user_ids is not None:
            
            _query_params.append(('userIds', user_ids))
            
        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/program/{programId}/member"
        url = url.replace('{' + 'programId' + '}', str(program_id))

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/v3/program/{programId}/member',
            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_program_projects_v3(
        self,
        program_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_size: Annotated[Optional[StrictInt], Field(description="每页项目数")] = None,
        page_token: Annotated[Optional[StrictStr], Field(description="页码标识")] = None,
        with_sub_programs: Annotated[Optional[StrictBool], Field(description="是否包含子项目集")] = None,
        tql: 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,
    ) -> ListProgramProjectsV3Response:
        """查询项目集内项目

        查询项目集内项目

        :param program_id: 项目集 ID (required)
        :type program_id: str
        :param x_operator_id: 操作者 ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param page_size: 每页项目数
        :type page_size: int
        :param page_token: 页码标识
        :type page_token: str
        :param with_sub_programs: 是否包含子项目集
        :type with_sub_programs: bool
        :param tql: 查询语言
        :type tql: 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_program_projects_v3_serialize(
            program_id=program_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            page_size=page_size,
            page_token=page_token,
            with_sub_programs=with_sub_programs,
            tql=tql,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

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

        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_program_projects_v3_with_http_info(
        self,
        program_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_size: Annotated[Optional[StrictInt], Field(description="每页项目数")] = None,
        page_token: Annotated[Optional[StrictStr], Field(description="页码标识")] = None,
        with_sub_programs: Annotated[Optional[StrictBool], Field(description="是否包含子项目集")] = None,
        tql: 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[ListProgramProjectsV3Response]:
        """查询项目集内项目

        查询项目集内项目

        :param program_id: 项目集 ID (required)
        :type program_id: str
        :param x_operator_id: 操作者 ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param page_size: 每页项目数
        :type page_size: int
        :param page_token: 页码标识
        :type page_token: str
        :param with_sub_programs: 是否包含子项目集
        :type with_sub_programs: bool
        :param tql: 查询语言
        :type tql: 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_program_projects_v3_serialize(
            program_id=program_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            page_size=page_size,
            page_token=page_token,
            with_sub_programs=with_sub_programs,
            tql=tql,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

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

        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_program_projects_v3_without_preload_content(
        self,
        program_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_size: Annotated[Optional[StrictInt], Field(description="每页项目数")] = None,
        page_token: Annotated[Optional[StrictStr], Field(description="页码标识")] = None,
        with_sub_programs: Annotated[Optional[StrictBool], Field(description="是否包含子项目集")] = None,
        tql: 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:
        """查询项目集内项目

        查询项目集内项目

        :param program_id: 项目集 ID (required)
        :type program_id: str
        :param x_operator_id: 操作者 ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param page_size: 每页项目数
        :type page_size: int
        :param page_token: 页码标识
        :type page_token: str
        :param with_sub_programs: 是否包含子项目集
        :type with_sub_programs: bool
        :param tql: 查询语言
        :type tql: 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_program_projects_v3_serialize(
            program_id=program_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            page_size=page_size,
            page_token=page_token,
            with_sub_programs=with_sub_programs,
            tql=tql,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

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

        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_program_projects_v3_serialize(
        self,
        program_id,
        x_operator_id,
        x_tenant_id,
        page_size,
        page_token,
        with_sub_programs,
        tql,
        _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 program_id is not None:
            _path_params['programId'] = program_id
        # process the query parameters
        if page_size is not None:
            
            _query_params.append(('pageSize', page_size))
            
        if page_token is not None:
            
            _query_params.append(('pageToken', page_token))
            
        if with_sub_programs is not None:
            
            _query_params.append(('withSubPrograms', with_sub_programs))
            
        if tql is not None:
            
            _query_params.append(('tql', tql))
            
        # 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/program/{programId}/projects"
        url = url.replace('{' + 'programId' + '}', str(program_id))

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/v3/program/{programId}/projects',
            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_program_status_custom_fields_v3(
        self,
        program_id: Annotated[StrictStr, Field(description="项目集 ID")],
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = 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,
    ) -> ListProgramStatusCustomFieldsV3Response:
        """查询项目集概览自定义字段列表

        查询项目集概览自定义字段列表

        :param program_id: 项目集 ID (required)
        :type program_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: 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._list_program_status_custom_fields_v3_serialize(
            program_id=program_id,
            x_tenant_id=x_tenant_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': "ListProgramStatusCustomFieldsV3Response",
        }

        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_program_status_custom_fields_v3_with_http_info(
        self,
        program_id: Annotated[StrictStr, Field(description="项目集 ID")],
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = 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[ListProgramStatusCustomFieldsV3Response]:
        """查询项目集概览自定义字段列表

        查询项目集概览自定义字段列表

        :param program_id: 项目集 ID (required)
        :type program_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: 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._list_program_status_custom_fields_v3_serialize(
            program_id=program_id,
            x_tenant_id=x_tenant_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': "ListProgramStatusCustomFieldsV3Response",
        }

        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_program_status_custom_fields_v3_without_preload_content(
        self,
        program_id: Annotated[StrictStr, Field(description="项目集 ID")],
        x_tenant_id: Annotated[Optional[StrictStr], Field(description="企业 ID")] = 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:
        """查询项目集概览自定义字段列表

        查询项目集概览自定义字段列表

        :param program_id: 项目集 ID (required)
        :type program_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: 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._list_program_status_custom_fields_v3_serialize(
            program_id=program_id,
            x_tenant_id=x_tenant_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': "ListProgramStatusCustomFieldsV3Response",
        }

        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_program_status_custom_fields_v3_serialize(
        self,
        program_id,
        x_tenant_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 program_id is not None:
            _path_params['programId'] = program_id
        # process the query parameters
        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_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/program/{programId}/status/customfield/list"
        url = url.replace('{' + 'programId' + '}', str(program_id))

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/v3/program/{programId}/status/customfield/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_program_statuses_v3(
        self,
        program_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[StrictInt], Field(description="分页大小")] = None,
        render_html: Annotated[Optional[StrictBool], Field(description="是否对富文本内容html渲染，仅对白名单的应用开放")] = None,
        html_expire_seconds: Annotated[Optional[StrictInt], Field(description="渲染html时内容过期时间，默认为 1800(秒)")] = 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,
    ) -> ListProgramStatusesV3Response:
        """查询项目集状态和状态历史

        查询项目集状态和状态历史

        :param program_id: 项目集 ID (required)
        :type program_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: int
        :param render_html: 是否对富文本内容html渲染，仅对白名单的应用开放
        :type render_html: bool
        :param html_expire_seconds: 渲染html时内容过期时间，默认为 1800(秒)
        :type html_expire_seconds: int
        :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_program_statuses_v3_serialize(
            program_id=program_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            page_token=page_token,
            page_size=page_size,
            render_html=render_html,
            html_expire_seconds=html_expire_seconds,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

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

        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_program_statuses_v3_with_http_info(
        self,
        program_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[StrictInt], Field(description="分页大小")] = None,
        render_html: Annotated[Optional[StrictBool], Field(description="是否对富文本内容html渲染，仅对白名单的应用开放")] = None,
        html_expire_seconds: Annotated[Optional[StrictInt], Field(description="渲染html时内容过期时间，默认为 1800(秒)")] = 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[ListProgramStatusesV3Response]:
        """查询项目集状态和状态历史

        查询项目集状态和状态历史

        :param program_id: 项目集 ID (required)
        :type program_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: int
        :param render_html: 是否对富文本内容html渲染，仅对白名单的应用开放
        :type render_html: bool
        :param html_expire_seconds: 渲染html时内容过期时间，默认为 1800(秒)
        :type html_expire_seconds: int
        :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_program_statuses_v3_serialize(
            program_id=program_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            page_token=page_token,
            page_size=page_size,
            render_html=render_html,
            html_expire_seconds=html_expire_seconds,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

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

        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_program_statuses_v3_without_preload_content(
        self,
        program_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[StrictInt], Field(description="分页大小")] = None,
        render_html: Annotated[Optional[StrictBool], Field(description="是否对富文本内容html渲染，仅对白名单的应用开放")] = None,
        html_expire_seconds: Annotated[Optional[StrictInt], Field(description="渲染html时内容过期时间，默认为 1800(秒)")] = 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 program_id: 项目集 ID (required)
        :type program_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: int
        :param render_html: 是否对富文本内容html渲染，仅对白名单的应用开放
        :type render_html: bool
        :param html_expire_seconds: 渲染html时内容过期时间，默认为 1800(秒)
        :type html_expire_seconds: int
        :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_program_statuses_v3_serialize(
            program_id=program_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            page_token=page_token,
            page_size=page_size,
            render_html=render_html,
            html_expire_seconds=html_expire_seconds,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

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

        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_program_statuses_v3_serialize(
        self,
        program_id,
        x_operator_id,
        x_tenant_id,
        page_token,
        page_size,
        render_html,
        html_expire_seconds,
        _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 program_id is not None:
            _path_params['programId'] = program_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 render_html is not None:
            
            _query_params.append(('renderHtml', render_html))
            
        if html_expire_seconds is not None:
            
            _query_params.append(('htmlExpireSeconds', html_expire_seconds))
            
        # 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/program/{programId}/status/list"
        url = url.replace('{' + 'programId' + '}', str(program_id))

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/v3/program/{programId}/status/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_program_update(
        self,
        program_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_program_update_request: Optional[PostV3ProgramUpdateRequest] = 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,
    ) -> PostV3ProgramUpdateResponse:
        """更新项目集信息

        更新项目集信息

        :param program_id: 项目集 ID (required)
        :type program_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_program_update_request: 
        :type post_v3_program_update_request: PostV3ProgramUpdateRequest
        :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_program_update_serialize(
            program_id=program_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            post_v3_program_update_request=post_v3_program_update_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

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

        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_program_update_with_http_info(
        self,
        program_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_program_update_request: Optional[PostV3ProgramUpdateRequest] = 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[PostV3ProgramUpdateResponse]:
        """更新项目集信息

        更新项目集信息

        :param program_id: 项目集 ID (required)
        :type program_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_program_update_request: 
        :type post_v3_program_update_request: PostV3ProgramUpdateRequest
        :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_program_update_serialize(
            program_id=program_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            post_v3_program_update_request=post_v3_program_update_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

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

        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_program_update_without_preload_content(
        self,
        program_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_program_update_request: Optional[PostV3ProgramUpdateRequest] = 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 program_id: 项目集 ID (required)
        :type program_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_program_update_request: 
        :type post_v3_program_update_request: PostV3ProgramUpdateRequest
        :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_program_update_serialize(
            program_id=program_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            post_v3_program_update_request=post_v3_program_update_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

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

        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_program_update_serialize(
        self,
        program_id,
        x_operator_id,
        x_tenant_id,
        post_v3_program_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 program_id is not None:
            _path_params['programId'] = program_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_program_update_request is not None:
            _body_params = post_v3_program_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/program/{programId}/update"
        url = url.replace('{' + 'programId' + '}', str(program_id))

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/v3/program/{programId}/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 remove_program_members_v3(
        self,
        program_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,
        add_program_members_v3_request: Optional[AddProgramMembersV3Request] = 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,
    ) -> AddProgramMembersV3Response:
        """批量删除项目集内的成员

        批量删除项目集内的成员

        :param program_id: 项目集 ID (required)
        :type program_id: str
        :param x_operator_id: 操作人 ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param add_program_members_v3_request: 
        :type add_program_members_v3_request: AddProgramMembersV3Request
        :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._remove_program_members_v3_serialize(
            program_id=program_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            add_program_members_v3_request=add_program_members_v3_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

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

        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 remove_program_members_v3_with_http_info(
        self,
        program_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,
        add_program_members_v3_request: Optional[AddProgramMembersV3Request] = 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[AddProgramMembersV3Response]:
        """批量删除项目集内的成员

        批量删除项目集内的成员

        :param program_id: 项目集 ID (required)
        :type program_id: str
        :param x_operator_id: 操作人 ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param add_program_members_v3_request: 
        :type add_program_members_v3_request: AddProgramMembersV3Request
        :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._remove_program_members_v3_serialize(
            program_id=program_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            add_program_members_v3_request=add_program_members_v3_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

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

        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 remove_program_members_v3_without_preload_content(
        self,
        program_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,
        add_program_members_v3_request: Optional[AddProgramMembersV3Request] = 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 program_id: 项目集 ID (required)
        :type program_id: str
        :param x_operator_id: 操作人 ID
        :type x_operator_id: str
        :param x_tenant_id: 企业 ID
        :type x_tenant_id: str
        :param add_program_members_v3_request: 
        :type add_program_members_v3_request: AddProgramMembersV3Request
        :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._remove_program_members_v3_serialize(
            program_id=program_id,
            x_operator_id=x_operator_id,
            x_tenant_id=x_tenant_id,
            add_program_members_v3_request=add_program_members_v3_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

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

        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 _remove_program_members_v3_serialize(
        self,
        program_id,
        x_operator_id,
        x_tenant_id,
        add_program_members_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 program_id is not None:
            _path_params['programId'] = program_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 add_program_members_v3_request is not None:
            _body_params = add_program_members_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/program/{programId}/member/delete"
        url = url.replace('{' + 'programId' + '}', str(program_id))

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/v3/program/{programId}/member/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 remove_program_project_v3(
        self,
        program_id: Annotated[StrictStr, Field(description="项目集 ID")],
        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,
    ) -> RemoveProgramProjectV3Response:
        """删除项目集内的项目

        删除项目集内的项目

        :param program_id: 项目集 ID (required)
        :type program_id: str
        :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._remove_program_project_v3_serialize(
            program_id=program_id,
            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': "RemoveProgramProjectV3Response",
        }

        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 remove_program_project_v3_with_http_info(
        self,
        program_id: Annotated[StrictStr, Field(description="项目集 ID")],
        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[RemoveProgramProjectV3Response]:
        """删除项目集内的项目

        删除项目集内的项目

        :param program_id: 项目集 ID (required)
        :type program_id: str
        :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._remove_program_project_v3_serialize(
            program_id=program_id,
            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': "RemoveProgramProjectV3Response",
        }

        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 remove_program_project_v3_without_preload_content(
        self,
        program_id: Annotated[StrictStr, Field(description="项目集 ID")],
        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 program_id: 项目集 ID (required)
        :type program_id: str
        :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._remove_program_project_v3_serialize(
            program_id=program_id,
            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': "RemoveProgramProjectV3Response",
        }

        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 _remove_program_project_v3_serialize(
        self,
        program_id,
        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 program_id is not None:
            _path_params['programId'] = program_id
        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/program/{programId}/project/{projectId}/delete"
        url = url.replace('{' + 'programId' + '}', str(program_id))
        url = url.replace('{' + 'projectId' + '}', str(project_id))

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/v3/program/{programId}/project/{projectId}/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
        )

