# coding: utf-8

"""
    Xray REST API

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

    The version of the OpenAPI document: 2.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, StrictInt, StrictStr
from typing import List, Optional
from typing_extensions import Annotated
from openapi_client.models.file_response import FileResponse
from openapi_client.models.get_testruns200_response_inner import GetTestruns200ResponseInner
from openapi_client.models.model10_api_testrun_id_customfield_custom_field_id_put_request import Model10ApiTestrunIdCustomfieldCustomFieldIdPutRequest
from openapi_client.models.model10_api_testrun_id_iteration_iteration_id_step_step_result_id_status_get200_response import Model10ApiTestrunIdIterationIterationIdStepStepResultIdStatusGet200Response
from openapi_client.models.step_result import StepResult
from openapi_client.models.step_results_response import StepResultsResponse
from openapi_client.models.test_run_custom_field_response import TestRunCustomFieldResponse
from openapi_client.models.test_run_iteration_information import TestRunIterationInformation
from openapi_client.models.test_run_response import TestRunResponse
from openapi_client.models.test_step_result_evidence_input import TestStepResultEvidenceInput
from openapi_client.models.update_iteration import UpdateIteration
from openapi_client.models.update_iteration_response import UpdateIterationResponse
from openapi_client.models.update_step_result import UpdateStepResult
from openapi_client.models.update_test_run import UpdateTestRun
from openapi_client.models.update_test_run_response import UpdateTestRunResponse

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


class TestRunApi:
    """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 call_10_api_testrun_get(
        self,
        test_exec_issue_key: Annotated[StrictStr, Field(description="The key of the Test Execution")],
        test_issue_key: Annotated[StrictStr, Field(description="The key of the Test")],
        _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,
    ) -> TestRunResponse:
        """call_10_api_testrun_get

        Retrieves a Test Run given the Test Execution and Test keys. <br/> The response will contain all information related to a Test Run, e.g., status, created and finish dates, step results, test environments, defects, Test Run Custom fields, and so on. <br/>  In case the Test Run has iterations, steps will not appear. However, if it has parameters but executed one time, it will show the steps and the parameters info. <br/>

        :param test_exec_issue_key: The key of the Test Execution (required)
        :type test_exec_issue_key: str
        :param test_issue_key: The key of the Test (required)
        :type test_issue_key: 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._call_10_api_testrun_get_serialize(
            test_exec_issue_key=test_exec_issue_key,
            test_issue_key=test_issue_key,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "TestRunResponse",
            '400': "Error",
            '500': "Error",
        }
        response_data = self.api_client.call_api(
            *_param,
            _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 call_10_api_testrun_get_with_http_info(
        self,
        test_exec_issue_key: Annotated[StrictStr, Field(description="The key of the Test Execution")],
        test_issue_key: Annotated[StrictStr, Field(description="The key of the Test")],
        _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[TestRunResponse]:
        """call_10_api_testrun_get

        Retrieves a Test Run given the Test Execution and Test keys. <br/> The response will contain all information related to a Test Run, e.g., status, created and finish dates, step results, test environments, defects, Test Run Custom fields, and so on. <br/>  In case the Test Run has iterations, steps will not appear. However, if it has parameters but executed one time, it will show the steps and the parameters info. <br/>

        :param test_exec_issue_key: The key of the Test Execution (required)
        :type test_exec_issue_key: str
        :param test_issue_key: The key of the Test (required)
        :type test_issue_key: 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._call_10_api_testrun_get_serialize(
            test_exec_issue_key=test_exec_issue_key,
            test_issue_key=test_issue_key,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "TestRunResponse",
            '400': "Error",
            '500': "Error",
        }
        response_data = self.api_client.call_api(
            *_param,
            _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 call_10_api_testrun_get_without_preload_content(
        self,
        test_exec_issue_key: Annotated[StrictStr, Field(description="The key of the Test Execution")],
        test_issue_key: Annotated[StrictStr, Field(description="The key of the Test")],
        _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:
        """call_10_api_testrun_get

        Retrieves a Test Run given the Test Execution and Test keys. <br/> The response will contain all information related to a Test Run, e.g., status, created and finish dates, step results, test environments, defects, Test Run Custom fields, and so on. <br/>  In case the Test Run has iterations, steps will not appear. However, if it has parameters but executed one time, it will show the steps and the parameters info. <br/>

        :param test_exec_issue_key: The key of the Test Execution (required)
        :type test_exec_issue_key: str
        :param test_issue_key: The key of the Test (required)
        :type test_issue_key: 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._call_10_api_testrun_get_serialize(
            test_exec_issue_key=test_exec_issue_key,
            test_issue_key=test_issue_key,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "TestRunResponse",
            '400': "Error",
            '500': "Error",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _call_10_api_testrun_get_serialize(
        self,
        test_exec_issue_key,
        test_issue_key,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _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 test_exec_issue_key is not None:
            
            _query_params.append(('testExecIssueKey', test_exec_issue_key))
            
        if test_issue_key is not None:
            
            _query_params.append(('testIssueKey', test_issue_key))
            
        # process the header parameters
        # 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] = [
            'BasicAuth', 
            'bearerAuth'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/1.0/api/testrun',
            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 call_10_api_testrun_id_customfield_custom_field_id_get(
        self,
        id: Annotated[StrictStr, Field(description="The id of the Test Run")],
        custom_field_id: Annotated[StrictStr, Field(description="The id of the Test Run Custom Field")],
        _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,
    ) -> TestRunCustomFieldResponse:
        """call_10_api_testrun_id_customfield_custom_field_id_get

        Retrieves a Test Run Custom Field, given the Test Run and the Test Run Custom Field ids.

        :param id: The id of the Test Run (required)
        :type id: str
        :param custom_field_id: The id of the Test Run Custom Field (required)
        :type custom_field_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._call_10_api_testrun_id_customfield_custom_field_id_get_serialize(
            id=id,
            custom_field_id=custom_field_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "TestRunCustomFieldResponse",
            '400': "Error",
            '500': "Error",
        }
        response_data = self.api_client.call_api(
            *_param,
            _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 call_10_api_testrun_id_customfield_custom_field_id_get_with_http_info(
        self,
        id: Annotated[StrictStr, Field(description="The id of the Test Run")],
        custom_field_id: Annotated[StrictStr, Field(description="The id of the Test Run Custom Field")],
        _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[TestRunCustomFieldResponse]:
        """call_10_api_testrun_id_customfield_custom_field_id_get

        Retrieves a Test Run Custom Field, given the Test Run and the Test Run Custom Field ids.

        :param id: The id of the Test Run (required)
        :type id: str
        :param custom_field_id: The id of the Test Run Custom Field (required)
        :type custom_field_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._call_10_api_testrun_id_customfield_custom_field_id_get_serialize(
            id=id,
            custom_field_id=custom_field_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "TestRunCustomFieldResponse",
            '400': "Error",
            '500': "Error",
        }
        response_data = self.api_client.call_api(
            *_param,
            _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 call_10_api_testrun_id_customfield_custom_field_id_get_without_preload_content(
        self,
        id: Annotated[StrictStr, Field(description="The id of the Test Run")],
        custom_field_id: Annotated[StrictStr, Field(description="The id of the Test Run Custom Field")],
        _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:
        """call_10_api_testrun_id_customfield_custom_field_id_get

        Retrieves a Test Run Custom Field, given the Test Run and the Test Run Custom Field ids.

        :param id: The id of the Test Run (required)
        :type id: str
        :param custom_field_id: The id of the Test Run Custom Field (required)
        :type custom_field_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._call_10_api_testrun_id_customfield_custom_field_id_get_serialize(
            id=id,
            custom_field_id=custom_field_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "TestRunCustomFieldResponse",
            '400': "Error",
            '500': "Error",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _call_10_api_testrun_id_customfield_custom_field_id_get_serialize(
        self,
        id,
        custom_field_id,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _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 id is not None:
            _path_params['id'] = id
        if custom_field_id is not None:
            _path_params['customFieldId'] = custom_field_id
        # process the query parameters
        # process the header parameters
        # 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] = [
            'BasicAuth', 
            'bearerAuth'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/1.0/api/testrun/{id}/customfield/{customFieldId}',
            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 call_10_api_testrun_id_customfield_custom_field_id_put(
        self,
        id: Annotated[StrictStr, Field(description="The id of the Test Run")],
        custom_field_id: Annotated[StrictStr, Field(description="The id of the Test Run Custom Field")],
        model10_api_testrun_id_customfield_custom_field_id_put_request: Model10ApiTestrunIdCustomfieldCustomFieldIdPutRequest,
        _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,
    ) -> None:
        """call_10_api_testrun_id_customfield_custom_field_id_put

        Updates the value of a test run custom field, given the Test Run and the Test Run Custom Field ids. The custom field value should be a valid value according to the field type. <br/><br/> - **Toggle Fields** values should be _\"true\"_, _\"false\"_, _\"0\"_ or _\"1\"_ <br /><br /> - **Number Fields** values should be a string containing a number, e.g. _\"320\"_. Decimal Number are also accepted,for instance, \"320.5\". The decimal places are always separated by a _\".\"_  <br /> <br /> - **Single Select and Radio Button Fields** values should be a single string containing the option value, e.g. _\"Option A\"_. The value should be a valid option for that custom field. The values are not case sensitive. <br /><br /> - **Multiple Select Fields** values should be an array of the string of option values, e.g. _[\"Option A\", \"Option B\"]_. All the selected values should be valid for that custom field. The option values are not case sensitive. <br /><br /> - **Date Fields** should follow the ISO format _yyyy-MM-dd_, where _yyyy_ represents the year, _MM_ the month in year and _dd_ the day in the month. For instance, a valid value would be _\"2020-05-02\"_. <br /><br /> - **Date Time fields** should be in UTC following the ISO format _yyyy-MM-dd'T'HH:mm'Z'_. The date part follows the same date format, while _HH_ represents the hours (0-24), _mm_ the minutes in hour and _Z_ indicates the hour in UTC. For instance, a valid date time value would be _\"2020-05-02T10:30Z\"_. <br /><br /> An error will be returned when there are invalid custom field values. It is also possible to delete a Test Run custom field value by providing a _null_ or empty value (e.g., _\"\"_ or _[]_). **It is not possible to delete a value of a required Test Run Custom Field value.** <br/>

        :param id: The id of the Test Run (required)
        :type id: str
        :param custom_field_id: The id of the Test Run Custom Field (required)
        :type custom_field_id: str
        :param model10_api_testrun_id_customfield_custom_field_id_put_request: (required)
        :type model10_api_testrun_id_customfield_custom_field_id_put_request: Model10ApiTestrunIdCustomfieldCustomFieldIdPutRequest
        :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._call_10_api_testrun_id_customfield_custom_field_id_put_serialize(
            id=id,
            custom_field_id=custom_field_id,
            model10_api_testrun_id_customfield_custom_field_id_put_request=model10_api_testrun_id_customfield_custom_field_id_put_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '204': None,
            '400': "Error",
            '500': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            _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 call_10_api_testrun_id_customfield_custom_field_id_put_with_http_info(
        self,
        id: Annotated[StrictStr, Field(description="The id of the Test Run")],
        custom_field_id: Annotated[StrictStr, Field(description="The id of the Test Run Custom Field")],
        model10_api_testrun_id_customfield_custom_field_id_put_request: Model10ApiTestrunIdCustomfieldCustomFieldIdPutRequest,
        _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[None]:
        """call_10_api_testrun_id_customfield_custom_field_id_put

        Updates the value of a test run custom field, given the Test Run and the Test Run Custom Field ids. The custom field value should be a valid value according to the field type. <br/><br/> - **Toggle Fields** values should be _\"true\"_, _\"false\"_, _\"0\"_ or _\"1\"_ <br /><br /> - **Number Fields** values should be a string containing a number, e.g. _\"320\"_. Decimal Number are also accepted,for instance, \"320.5\". The decimal places are always separated by a _\".\"_  <br /> <br /> - **Single Select and Radio Button Fields** values should be a single string containing the option value, e.g. _\"Option A\"_. The value should be a valid option for that custom field. The values are not case sensitive. <br /><br /> - **Multiple Select Fields** values should be an array of the string of option values, e.g. _[\"Option A\", \"Option B\"]_. All the selected values should be valid for that custom field. The option values are not case sensitive. <br /><br /> - **Date Fields** should follow the ISO format _yyyy-MM-dd_, where _yyyy_ represents the year, _MM_ the month in year and _dd_ the day in the month. For instance, a valid value would be _\"2020-05-02\"_. <br /><br /> - **Date Time fields** should be in UTC following the ISO format _yyyy-MM-dd'T'HH:mm'Z'_. The date part follows the same date format, while _HH_ represents the hours (0-24), _mm_ the minutes in hour and _Z_ indicates the hour in UTC. For instance, a valid date time value would be _\"2020-05-02T10:30Z\"_. <br /><br /> An error will be returned when there are invalid custom field values. It is also possible to delete a Test Run custom field value by providing a _null_ or empty value (e.g., _\"\"_ or _[]_). **It is not possible to delete a value of a required Test Run Custom Field value.** <br/>

        :param id: The id of the Test Run (required)
        :type id: str
        :param custom_field_id: The id of the Test Run Custom Field (required)
        :type custom_field_id: str
        :param model10_api_testrun_id_customfield_custom_field_id_put_request: (required)
        :type model10_api_testrun_id_customfield_custom_field_id_put_request: Model10ApiTestrunIdCustomfieldCustomFieldIdPutRequest
        :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._call_10_api_testrun_id_customfield_custom_field_id_put_serialize(
            id=id,
            custom_field_id=custom_field_id,
            model10_api_testrun_id_customfield_custom_field_id_put_request=model10_api_testrun_id_customfield_custom_field_id_put_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '204': None,
            '400': "Error",
            '500': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            _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 call_10_api_testrun_id_customfield_custom_field_id_put_without_preload_content(
        self,
        id: Annotated[StrictStr, Field(description="The id of the Test Run")],
        custom_field_id: Annotated[StrictStr, Field(description="The id of the Test Run Custom Field")],
        model10_api_testrun_id_customfield_custom_field_id_put_request: Model10ApiTestrunIdCustomfieldCustomFieldIdPutRequest,
        _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:
        """call_10_api_testrun_id_customfield_custom_field_id_put

        Updates the value of a test run custom field, given the Test Run and the Test Run Custom Field ids. The custom field value should be a valid value according to the field type. <br/><br/> - **Toggle Fields** values should be _\"true\"_, _\"false\"_, _\"0\"_ or _\"1\"_ <br /><br /> - **Number Fields** values should be a string containing a number, e.g. _\"320\"_. Decimal Number are also accepted,for instance, \"320.5\". The decimal places are always separated by a _\".\"_  <br /> <br /> - **Single Select and Radio Button Fields** values should be a single string containing the option value, e.g. _\"Option A\"_. The value should be a valid option for that custom field. The values are not case sensitive. <br /><br /> - **Multiple Select Fields** values should be an array of the string of option values, e.g. _[\"Option A\", \"Option B\"]_. All the selected values should be valid for that custom field. The option values are not case sensitive. <br /><br /> - **Date Fields** should follow the ISO format _yyyy-MM-dd_, where _yyyy_ represents the year, _MM_ the month in year and _dd_ the day in the month. For instance, a valid value would be _\"2020-05-02\"_. <br /><br /> - **Date Time fields** should be in UTC following the ISO format _yyyy-MM-dd'T'HH:mm'Z'_. The date part follows the same date format, while _HH_ represents the hours (0-24), _mm_ the minutes in hour and _Z_ indicates the hour in UTC. For instance, a valid date time value would be _\"2020-05-02T10:30Z\"_. <br /><br /> An error will be returned when there are invalid custom field values. It is also possible to delete a Test Run custom field value by providing a _null_ or empty value (e.g., _\"\"_ or _[]_). **It is not possible to delete a value of a required Test Run Custom Field value.** <br/>

        :param id: The id of the Test Run (required)
        :type id: str
        :param custom_field_id: The id of the Test Run Custom Field (required)
        :type custom_field_id: str
        :param model10_api_testrun_id_customfield_custom_field_id_put_request: (required)
        :type model10_api_testrun_id_customfield_custom_field_id_put_request: Model10ApiTestrunIdCustomfieldCustomFieldIdPutRequest
        :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._call_10_api_testrun_id_customfield_custom_field_id_put_serialize(
            id=id,
            custom_field_id=custom_field_id,
            model10_api_testrun_id_customfield_custom_field_id_put_request=model10_api_testrun_id_customfield_custom_field_id_put_request,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '204': None,
            '400': "Error",
            '500': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _call_10_api_testrun_id_customfield_custom_field_id_put_serialize(
        self,
        id,
        custom_field_id,
        model10_api_testrun_id_customfield_custom_field_id_put_request,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _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 id is not None:
            _path_params['id'] = id
        if custom_field_id is not None:
            _path_params['customFieldId'] = custom_field_id
        # process the query parameters
        # process the header parameters
        # process the form parameters
        # process the body parameter
        if model10_api_testrun_id_customfield_custom_field_id_put_request is not None:
            _body_params = model10_api_testrun_id_customfield_custom_field_id_put_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] = [
            'BasicAuth', 
            'bearerAuth'
        ]

        return self.api_client.param_serialize(
            method='PUT',
            resource_path='/1.0/api/testrun/{id}/customfield/{customFieldId}',
            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 call_10_api_testrun_id_get(
        self,
        id: Annotated[StrictStr, Field(description="The id of the Test Run")],
        _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,
    ) -> TestRunResponse:
        """call_10_api_testrun_id_get

        Retrieves a Test Run given the Test Execution and Test keys. <br/> The response will contain all information related to a Test Run, e.g., status, created and finish dates, step results, test environments, defects, Test Run Custom fields, and so on. <br/>  In case the Test Run has iterations, steps will not appear. However, if it has parameters but executed one time, it will show the steps and the parameters info. <br/>

        :param id: The id of the Test Run (required)
        :type 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._call_10_api_testrun_id_get_serialize(
            id=id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "TestRunResponse",
            '400': "Error",
            '500': "Error",
        }
        response_data = self.api_client.call_api(
            *_param,
            _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 call_10_api_testrun_id_get_with_http_info(
        self,
        id: Annotated[StrictStr, Field(description="The id of the Test Run")],
        _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[TestRunResponse]:
        """call_10_api_testrun_id_get

        Retrieves a Test Run given the Test Execution and Test keys. <br/> The response will contain all information related to a Test Run, e.g., status, created and finish dates, step results, test environments, defects, Test Run Custom fields, and so on. <br/>  In case the Test Run has iterations, steps will not appear. However, if it has parameters but executed one time, it will show the steps and the parameters info. <br/>

        :param id: The id of the Test Run (required)
        :type 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._call_10_api_testrun_id_get_serialize(
            id=id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "TestRunResponse",
            '400': "Error",
            '500': "Error",
        }
        response_data = self.api_client.call_api(
            *_param,
            _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 call_10_api_testrun_id_get_without_preload_content(
        self,
        id: Annotated[StrictStr, Field(description="The id of the Test Run")],
        _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:
        """call_10_api_testrun_id_get

        Retrieves a Test Run given the Test Execution and Test keys. <br/> The response will contain all information related to a Test Run, e.g., status, created and finish dates, step results, test environments, defects, Test Run Custom fields, and so on. <br/>  In case the Test Run has iterations, steps will not appear. However, if it has parameters but executed one time, it will show the steps and the parameters info. <br/>

        :param id: The id of the Test Run (required)
        :type 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._call_10_api_testrun_id_get_serialize(
            id=id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "TestRunResponse",
            '400': "Error",
            '500': "Error",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _call_10_api_testrun_id_get_serialize(
        self,
        id,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _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 id is not None:
            _path_params['id'] = id
        # process the query parameters
        # process the header parameters
        # 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] = [
            'BasicAuth', 
            'bearerAuth'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/1.0/api/testrun/{id}',
            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 call_10_api_testrun_id_iteration_iteration_id_get(
        self,
        id: Annotated[StrictStr, Field(description="The id of the Test Run")],
        iteration_id: Annotated[StrictStr, Field(description="The id of the iteration")],
        _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,
    ) -> TestRunIterationInformation:
        """call_10_api_testrun_id_iteration_iteration_id_get

        Retrieves an iteration given the Test Run id and the id of the iteration. <br/> The response will contain all the information regarding the iteration (status, parameters, and the steps). The steps will appear with the parameters converted to their value if the resolved dataset does not have a parameter referenced on a  step it will be displayed like ${parameter_name}. <br/>

        :param id: The id of the Test Run (required)
        :type id: str
        :param iteration_id: The id of the iteration (required)
        :type iteration_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._call_10_api_testrun_id_iteration_iteration_id_get_serialize(
            id=id,
            iteration_id=iteration_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "TestRunIterationInformation",
            '400': "Error",
            '500': "Error",
        }
        response_data = self.api_client.call_api(
            *_param,
            _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 call_10_api_testrun_id_iteration_iteration_id_get_with_http_info(
        self,
        id: Annotated[StrictStr, Field(description="The id of the Test Run")],
        iteration_id: Annotated[StrictStr, Field(description="The id of the iteration")],
        _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[TestRunIterationInformation]:
        """call_10_api_testrun_id_iteration_iteration_id_get

        Retrieves an iteration given the Test Run id and the id of the iteration. <br/> The response will contain all the information regarding the iteration (status, parameters, and the steps). The steps will appear with the parameters converted to their value if the resolved dataset does not have a parameter referenced on a  step it will be displayed like ${parameter_name}. <br/>

        :param id: The id of the Test Run (required)
        :type id: str
        :param iteration_id: The id of the iteration (required)
        :type iteration_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._call_10_api_testrun_id_iteration_iteration_id_get_serialize(
            id=id,
            iteration_id=iteration_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "TestRunIterationInformation",
            '400': "Error",
            '500': "Error",
        }
        response_data = self.api_client.call_api(
            *_param,
            _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 call_10_api_testrun_id_iteration_iteration_id_get_without_preload_content(
        self,
        id: Annotated[StrictStr, Field(description="The id of the Test Run")],
        iteration_id: Annotated[StrictStr, Field(description="The id of the iteration")],
        _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:
        """call_10_api_testrun_id_iteration_iteration_id_get

        Retrieves an iteration given the Test Run id and the id of the iteration. <br/> The response will contain all the information regarding the iteration (status, parameters, and the steps). The steps will appear with the parameters converted to their value if the resolved dataset does not have a parameter referenced on a  step it will be displayed like ${parameter_name}. <br/>

        :param id: The id of the Test Run (required)
        :type id: str
        :param iteration_id: The id of the iteration (required)
        :type iteration_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._call_10_api_testrun_id_iteration_iteration_id_get_serialize(
            id=id,
            iteration_id=iteration_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "TestRunIterationInformation",
            '400': "Error",
            '500': "Error",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _call_10_api_testrun_id_iteration_iteration_id_get_serialize(
        self,
        id,
        iteration_id,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _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 id is not None:
            _path_params['id'] = id
        if iteration_id is not None:
            _path_params['iterationId'] = iteration_id
        # process the query parameters
        # process the header parameters
        # 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] = [
            'BasicAuth', 
            'bearerAuth'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/1.0/api/testrun/{id}/iteration/{iterationId}',
            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 call_10_api_testrun_id_iteration_iteration_id_put(
        self,
        id: Annotated[StrictStr, Field(description="The id of the Test Run")],
        iteration_id: Annotated[StrictStr, Field(description="The id of the iteration")],
        update_iteration: UpdateIteration,
        _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,
    ) -> UpdateIterationResponse:
        """call_10_api_testrun_id_iteration_iteration_id_put

        Update all values from an iteration in a Test Run.<br/> The user can update the iteration status and the Test Step results of that iteration.

        :param id: The id of the Test Run (required)
        :type id: str
        :param iteration_id: The id of the iteration (required)
        :type iteration_id: str
        :param update_iteration: (required)
        :type update_iteration: UpdateIteration
        :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._call_10_api_testrun_id_iteration_iteration_id_put_serialize(
            id=id,
            iteration_id=iteration_id,
            update_iteration=update_iteration,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "UpdateIterationResponse",
            '400': "Error",
            '500': "Error",
        }
        response_data = self.api_client.call_api(
            *_param,
            _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 call_10_api_testrun_id_iteration_iteration_id_put_with_http_info(
        self,
        id: Annotated[StrictStr, Field(description="The id of the Test Run")],
        iteration_id: Annotated[StrictStr, Field(description="The id of the iteration")],
        update_iteration: UpdateIteration,
        _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[UpdateIterationResponse]:
        """call_10_api_testrun_id_iteration_iteration_id_put

        Update all values from an iteration in a Test Run.<br/> The user can update the iteration status and the Test Step results of that iteration.

        :param id: The id of the Test Run (required)
        :type id: str
        :param iteration_id: The id of the iteration (required)
        :type iteration_id: str
        :param update_iteration: (required)
        :type update_iteration: UpdateIteration
        :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._call_10_api_testrun_id_iteration_iteration_id_put_serialize(
            id=id,
            iteration_id=iteration_id,
            update_iteration=update_iteration,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "UpdateIterationResponse",
            '400': "Error",
            '500': "Error",
        }
        response_data = self.api_client.call_api(
            *_param,
            _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 call_10_api_testrun_id_iteration_iteration_id_put_without_preload_content(
        self,
        id: Annotated[StrictStr, Field(description="The id of the Test Run")],
        iteration_id: Annotated[StrictStr, Field(description="The id of the iteration")],
        update_iteration: UpdateIteration,
        _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:
        """call_10_api_testrun_id_iteration_iteration_id_put

        Update all values from an iteration in a Test Run.<br/> The user can update the iteration status and the Test Step results of that iteration.

        :param id: The id of the Test Run (required)
        :type id: str
        :param iteration_id: The id of the iteration (required)
        :type iteration_id: str
        :param update_iteration: (required)
        :type update_iteration: UpdateIteration
        :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._call_10_api_testrun_id_iteration_iteration_id_put_serialize(
            id=id,
            iteration_id=iteration_id,
            update_iteration=update_iteration,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "UpdateIterationResponse",
            '400': "Error",
            '500': "Error",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _call_10_api_testrun_id_iteration_iteration_id_put_serialize(
        self,
        id,
        iteration_id,
        update_iteration,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _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 id is not None:
            _path_params['id'] = id
        if iteration_id is not None:
            _path_params['iterationId'] = iteration_id
        # process the query parameters
        # process the header parameters
        # process the form parameters
        # process the body parameter
        if update_iteration is not None:
            _body_params = update_iteration


        # 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] = [
            'BasicAuth', 
            'bearerAuth'
        ]

        return self.api_client.param_serialize(
            method='PUT',
            resource_path='/1.0/api/testrun/{id}/iteration/{iterationId}',
            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 call_10_api_testrun_id_iteration_iteration_id_step_get(
        self,
        id: Annotated[StrictStr, Field(description="The id of the Test Run")],
        iteration_id: Annotated[StrictStr, Field(description="The id of the iteration")],
        _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,
    ) -> List[StepResult]:
        """call_10_api_testrun_id_iteration_iteration_id_step_get

        Retrieves all Test Step results for the given iteration.

        :param id: The id of the Test Run (required)
        :type id: str
        :param iteration_id: The id of the iteration (required)
        :type iteration_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._call_10_api_testrun_id_iteration_iteration_id_step_get_serialize(
            id=id,
            iteration_id=iteration_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "List[StepResult]",
            '404': "Error",
            '500': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            _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 call_10_api_testrun_id_iteration_iteration_id_step_get_with_http_info(
        self,
        id: Annotated[StrictStr, Field(description="The id of the Test Run")],
        iteration_id: Annotated[StrictStr, Field(description="The id of the iteration")],
        _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[List[StepResult]]:
        """call_10_api_testrun_id_iteration_iteration_id_step_get

        Retrieves all Test Step results for the given iteration.

        :param id: The id of the Test Run (required)
        :type id: str
        :param iteration_id: The id of the iteration (required)
        :type iteration_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._call_10_api_testrun_id_iteration_iteration_id_step_get_serialize(
            id=id,
            iteration_id=iteration_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "List[StepResult]",
            '404': "Error",
            '500': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            _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 call_10_api_testrun_id_iteration_iteration_id_step_get_without_preload_content(
        self,
        id: Annotated[StrictStr, Field(description="The id of the Test Run")],
        iteration_id: Annotated[StrictStr, Field(description="The id of the iteration")],
        _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:
        """call_10_api_testrun_id_iteration_iteration_id_step_get

        Retrieves all Test Step results for the given iteration.

        :param id: The id of the Test Run (required)
        :type id: str
        :param iteration_id: The id of the iteration (required)
        :type iteration_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._call_10_api_testrun_id_iteration_iteration_id_step_get_serialize(
            id=id,
            iteration_id=iteration_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "List[StepResult]",
            '404': "Error",
            '500': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _call_10_api_testrun_id_iteration_iteration_id_step_get_serialize(
        self,
        id,
        iteration_id,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _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 id is not None:
            _path_params['id'] = id
        if iteration_id is not None:
            _path_params['iterationId'] = iteration_id
        # process the query parameters
        # process the header parameters
        # 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] = [
            'BasicAuth', 
            'bearerAuth'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/1.0/api/testrun/{id}/iteration/{iterationId}/step',
            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 call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_attachment_attachment_id_delete(
        self,
        id: Annotated[StrictStr, Field(description="The id of the Test Run")],
        iteration_id: Annotated[StrictStr, Field(description="The id of the iteration")],
        step_result_id: Annotated[StrictStr, Field(description="The id of the Test Step result")],
        attachment_id: Annotated[StrictStr, Field(description="The id of the attachment to be deleted")],
        _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,
    ) -> None:
        """call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_attachment_attachment_id_delete

        Remove an evidence from a Test Step result within an iteration.

        :param id: The id of the Test Run (required)
        :type id: str
        :param iteration_id: The id of the iteration (required)
        :type iteration_id: str
        :param step_result_id: The id of the Test Step result (required)
        :type step_result_id: str
        :param attachment_id: The id of the attachment to be deleted (required)
        :type attachment_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._call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_attachment_attachment_id_delete_serialize(
            id=id,
            iteration_id=iteration_id,
            step_result_id=step_result_id,
            attachment_id=attachment_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '204': None,
            '404': "Error",
            '500': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            _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 call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_attachment_attachment_id_delete_with_http_info(
        self,
        id: Annotated[StrictStr, Field(description="The id of the Test Run")],
        iteration_id: Annotated[StrictStr, Field(description="The id of the iteration")],
        step_result_id: Annotated[StrictStr, Field(description="The id of the Test Step result")],
        attachment_id: Annotated[StrictStr, Field(description="The id of the attachment to be deleted")],
        _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[None]:
        """call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_attachment_attachment_id_delete

        Remove an evidence from a Test Step result within an iteration.

        :param id: The id of the Test Run (required)
        :type id: str
        :param iteration_id: The id of the iteration (required)
        :type iteration_id: str
        :param step_result_id: The id of the Test Step result (required)
        :type step_result_id: str
        :param attachment_id: The id of the attachment to be deleted (required)
        :type attachment_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._call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_attachment_attachment_id_delete_serialize(
            id=id,
            iteration_id=iteration_id,
            step_result_id=step_result_id,
            attachment_id=attachment_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '204': None,
            '404': "Error",
            '500': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            _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 call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_attachment_attachment_id_delete_without_preload_content(
        self,
        id: Annotated[StrictStr, Field(description="The id of the Test Run")],
        iteration_id: Annotated[StrictStr, Field(description="The id of the iteration")],
        step_result_id: Annotated[StrictStr, Field(description="The id of the Test Step result")],
        attachment_id: Annotated[StrictStr, Field(description="The id of the attachment to be deleted")],
        _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:
        """call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_attachment_attachment_id_delete

        Remove an evidence from a Test Step result within an iteration.

        :param id: The id of the Test Run (required)
        :type id: str
        :param iteration_id: The id of the iteration (required)
        :type iteration_id: str
        :param step_result_id: The id of the Test Step result (required)
        :type step_result_id: str
        :param attachment_id: The id of the attachment to be deleted (required)
        :type attachment_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._call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_attachment_attachment_id_delete_serialize(
            id=id,
            iteration_id=iteration_id,
            step_result_id=step_result_id,
            attachment_id=attachment_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '204': None,
            '404': "Error",
            '500': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_attachment_attachment_id_delete_serialize(
        self,
        id,
        iteration_id,
        step_result_id,
        attachment_id,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _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 id is not None:
            _path_params['id'] = id
        if iteration_id is not None:
            _path_params['iterationId'] = iteration_id
        if step_result_id is not None:
            _path_params['stepResultId'] = step_result_id
        if attachment_id is not None:
            _path_params['attachmentId'] = attachment_id
        # process the query parameters
        # process the header parameters
        # 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] = [
            'BasicAuth', 
            'bearerAuth'
        ]

        return self.api_client.param_serialize(
            method='DELETE',
            resource_path='/1.0/api/testrun/{id}/iteration/{iterationId}/step/{stepResultId}/attachment/{attachmentId}',
            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 call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_attachment_delete(
        self,
        id: Annotated[StrictStr, Field(description="The id of the Test Run")],
        iteration_id: Annotated[StrictStr, Field(description="The id of the iteration")],
        step_result_id: Annotated[StrictStr, Field(description="The id of the Test Step result")],
        filename: Annotated[StrictStr, Field(description="The name of the attachment to be deleted")],
        _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,
    ) -> None:
        """call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_attachment_delete

        Remove all evidences with the same filename from the Test step result within an iteration.

        :param id: The id of the Test Run (required)
        :type id: str
        :param iteration_id: The id of the iteration (required)
        :type iteration_id: str
        :param step_result_id: The id of the Test Step result (required)
        :type step_result_id: str
        :param filename: The name of the attachment to be deleted (required)
        :type filename: 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._call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_attachment_delete_serialize(
            id=id,
            iteration_id=iteration_id,
            step_result_id=step_result_id,
            filename=filename,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '204': None,
            '404': "Error",
            '500': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            _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 call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_attachment_delete_with_http_info(
        self,
        id: Annotated[StrictStr, Field(description="The id of the Test Run")],
        iteration_id: Annotated[StrictStr, Field(description="The id of the iteration")],
        step_result_id: Annotated[StrictStr, Field(description="The id of the Test Step result")],
        filename: Annotated[StrictStr, Field(description="The name of the attachment to be deleted")],
        _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[None]:
        """call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_attachment_delete

        Remove all evidences with the same filename from the Test step result within an iteration.

        :param id: The id of the Test Run (required)
        :type id: str
        :param iteration_id: The id of the iteration (required)
        :type iteration_id: str
        :param step_result_id: The id of the Test Step result (required)
        :type step_result_id: str
        :param filename: The name of the attachment to be deleted (required)
        :type filename: 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._call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_attachment_delete_serialize(
            id=id,
            iteration_id=iteration_id,
            step_result_id=step_result_id,
            filename=filename,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '204': None,
            '404': "Error",
            '500': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            _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 call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_attachment_delete_without_preload_content(
        self,
        id: Annotated[StrictStr, Field(description="The id of the Test Run")],
        iteration_id: Annotated[StrictStr, Field(description="The id of the iteration")],
        step_result_id: Annotated[StrictStr, Field(description="The id of the Test Step result")],
        filename: Annotated[StrictStr, Field(description="The name of the attachment to be deleted")],
        _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:
        """call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_attachment_delete

        Remove all evidences with the same filename from the Test step result within an iteration.

        :param id: The id of the Test Run (required)
        :type id: str
        :param iteration_id: The id of the iteration (required)
        :type iteration_id: str
        :param step_result_id: The id of the Test Step result (required)
        :type step_result_id: str
        :param filename: The name of the attachment to be deleted (required)
        :type filename: 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._call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_attachment_delete_serialize(
            id=id,
            iteration_id=iteration_id,
            step_result_id=step_result_id,
            filename=filename,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '204': None,
            '404': "Error",
            '500': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_attachment_delete_serialize(
        self,
        id,
        iteration_id,
        step_result_id,
        filename,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _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 id is not None:
            _path_params['id'] = id
        if iteration_id is not None:
            _path_params['iterationId'] = iteration_id
        if step_result_id is not None:
            _path_params['stepResultId'] = step_result_id
        # process the query parameters
        if filename is not None:
            
            _query_params.append(('filename', filename))
            
        # process the header parameters
        # 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] = [
            'BasicAuth', 
            'bearerAuth'
        ]

        return self.api_client.param_serialize(
            method='DELETE',
            resource_path='/1.0/api/testrun/{id}/iteration/{iterationId}/step/{stepResultId}/attachment',
            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 call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_attachment_get(
        self,
        id: Annotated[StrictStr, Field(description="The id of the Test Run")],
        iteration_id: Annotated[StrictStr, Field(description="The id of the iteration")],
        step_result_id: Annotated[StrictStr, Field(description="The id of the Test Step result")],
        _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,
    ) -> List[FileResponse]:
        """call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_attachment_get

        Return a json that contains an array with all the execution evidences the Test Step has within an iteration.

        :param id: The id of the Test Run (required)
        :type id: str
        :param iteration_id: The id of the iteration (required)
        :type iteration_id: str
        :param step_result_id: The id of the Test Step result (required)
        :type step_result_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._call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_attachment_get_serialize(
            id=id,
            iteration_id=iteration_id,
            step_result_id=step_result_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "List[FileResponse]",
            '404': "Error",
            '500': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            _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 call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_attachment_get_with_http_info(
        self,
        id: Annotated[StrictStr, Field(description="The id of the Test Run")],
        iteration_id: Annotated[StrictStr, Field(description="The id of the iteration")],
        step_result_id: Annotated[StrictStr, Field(description="The id of the Test Step result")],
        _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[List[FileResponse]]:
        """call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_attachment_get

        Return a json that contains an array with all the execution evidences the Test Step has within an iteration.

        :param id: The id of the Test Run (required)
        :type id: str
        :param iteration_id: The id of the iteration (required)
        :type iteration_id: str
        :param step_result_id: The id of the Test Step result (required)
        :type step_result_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._call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_attachment_get_serialize(
            id=id,
            iteration_id=iteration_id,
            step_result_id=step_result_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "List[FileResponse]",
            '404': "Error",
            '500': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            _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 call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_attachment_get_without_preload_content(
        self,
        id: Annotated[StrictStr, Field(description="The id of the Test Run")],
        iteration_id: Annotated[StrictStr, Field(description="The id of the iteration")],
        step_result_id: Annotated[StrictStr, Field(description="The id of the Test Step result")],
        _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:
        """call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_attachment_get

        Return a json that contains an array with all the execution evidences the Test Step has within an iteration.

        :param id: The id of the Test Run (required)
        :type id: str
        :param iteration_id: The id of the iteration (required)
        :type iteration_id: str
        :param step_result_id: The id of the Test Step result (required)
        :type step_result_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._call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_attachment_get_serialize(
            id=id,
            iteration_id=iteration_id,
            step_result_id=step_result_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "List[FileResponse]",
            '404': "Error",
            '500': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_attachment_get_serialize(
        self,
        id,
        iteration_id,
        step_result_id,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _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 id is not None:
            _path_params['id'] = id
        if iteration_id is not None:
            _path_params['iterationId'] = iteration_id
        if step_result_id is not None:
            _path_params['stepResultId'] = step_result_id
        # process the query parameters
        # process the header parameters
        # 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] = [
            'BasicAuth', 
            'bearerAuth'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/1.0/api/testrun/{id}/iteration/{iterationId}/step/{stepResultId}/attachment',
            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 call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_attachment_post(
        self,
        id: Annotated[StrictStr, Field(description="The id of the Test Run")],
        iteration_id: Annotated[StrictStr, Field(description="The id of the iteration")],
        step_result_id: Annotated[StrictStr, Field(description="The id of the Test Step result")],
        test_step_result_evidence_input: Optional[TestStepResultEvidenceInput] = 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,
    ) -> None:
        """call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_attachment_post

        Add a new evidence to the Test Step result within an iteration.

        :param id: The id of the Test Run (required)
        :type id: str
        :param iteration_id: The id of the iteration (required)
        :type iteration_id: str
        :param step_result_id: The id of the Test Step result (required)
        :type step_result_id: str
        :param test_step_result_evidence_input:
        :type test_step_result_evidence_input: TestStepResultEvidenceInput
        :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._call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_attachment_post_serialize(
            id=id,
            iteration_id=iteration_id,
            step_result_id=step_result_id,
            test_step_result_evidence_input=test_step_result_evidence_input,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '204': None,
            '404': "Error",
            '500': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            _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 call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_attachment_post_with_http_info(
        self,
        id: Annotated[StrictStr, Field(description="The id of the Test Run")],
        iteration_id: Annotated[StrictStr, Field(description="The id of the iteration")],
        step_result_id: Annotated[StrictStr, Field(description="The id of the Test Step result")],
        test_step_result_evidence_input: Optional[TestStepResultEvidenceInput] = 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[None]:
        """call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_attachment_post

        Add a new evidence to the Test Step result within an iteration.

        :param id: The id of the Test Run (required)
        :type id: str
        :param iteration_id: The id of the iteration (required)
        :type iteration_id: str
        :param step_result_id: The id of the Test Step result (required)
        :type step_result_id: str
        :param test_step_result_evidence_input:
        :type test_step_result_evidence_input: TestStepResultEvidenceInput
        :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._call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_attachment_post_serialize(
            id=id,
            iteration_id=iteration_id,
            step_result_id=step_result_id,
            test_step_result_evidence_input=test_step_result_evidence_input,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '204': None,
            '404': "Error",
            '500': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            _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 call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_attachment_post_without_preload_content(
        self,
        id: Annotated[StrictStr, Field(description="The id of the Test Run")],
        iteration_id: Annotated[StrictStr, Field(description="The id of the iteration")],
        step_result_id: Annotated[StrictStr, Field(description="The id of the Test Step result")],
        test_step_result_evidence_input: Optional[TestStepResultEvidenceInput] = 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:
        """call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_attachment_post

        Add a new evidence to the Test Step result within an iteration.

        :param id: The id of the Test Run (required)
        :type id: str
        :param iteration_id: The id of the iteration (required)
        :type iteration_id: str
        :param step_result_id: The id of the Test Step result (required)
        :type step_result_id: str
        :param test_step_result_evidence_input:
        :type test_step_result_evidence_input: TestStepResultEvidenceInput
        :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._call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_attachment_post_serialize(
            id=id,
            iteration_id=iteration_id,
            step_result_id=step_result_id,
            test_step_result_evidence_input=test_step_result_evidence_input,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '204': None,
            '404': "Error",
            '500': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_attachment_post_serialize(
        self,
        id,
        iteration_id,
        step_result_id,
        test_step_result_evidence_input,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _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 id is not None:
            _path_params['id'] = id
        if iteration_id is not None:
            _path_params['iterationId'] = iteration_id
        if step_result_id is not None:
            _path_params['stepResultId'] = step_result_id
        # process the query parameters
        # process the header parameters
        # process the form parameters
        # process the body parameter
        if test_step_result_evidence_input is not None:
            _body_params = test_step_result_evidence_input


        # 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] = [
            'BasicAuth', 
            'bearerAuth'
        ]

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/1.0/api/testrun/{id}/iteration/{iterationId}/step/{stepResultId}/attachment',
            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 call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_get(
        self,
        id: Annotated[StrictStr, Field(description="The id of the Test Run")],
        iteration_id: Annotated[StrictStr, Field(description="The id of the iteration")],
        step_result_id: Annotated[StrictStr, Field(description="The id of the Test Step result")],
        _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,
    ) -> StepResult:
        """call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_get

        Retrieves all the information for the given Test Step result within an iteration.

        :param id: The id of the Test Run (required)
        :type id: str
        :param iteration_id: The id of the iteration (required)
        :type iteration_id: str
        :param step_result_id: The id of the Test Step result (required)
        :type step_result_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._call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_get_serialize(
            id=id,
            iteration_id=iteration_id,
            step_result_id=step_result_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "StepResult",
            '404': "Error",
            '500': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            _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 call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_get_with_http_info(
        self,
        id: Annotated[StrictStr, Field(description="The id of the Test Run")],
        iteration_id: Annotated[StrictStr, Field(description="The id of the iteration")],
        step_result_id: Annotated[StrictStr, Field(description="The id of the Test Step result")],
        _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[StepResult]:
        """call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_get

        Retrieves all the information for the given Test Step result within an iteration.

        :param id: The id of the Test Run (required)
        :type id: str
        :param iteration_id: The id of the iteration (required)
        :type iteration_id: str
        :param step_result_id: The id of the Test Step result (required)
        :type step_result_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._call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_get_serialize(
            id=id,
            iteration_id=iteration_id,
            step_result_id=step_result_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "StepResult",
            '404': "Error",
            '500': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            _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 call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_get_without_preload_content(
        self,
        id: Annotated[StrictStr, Field(description="The id of the Test Run")],
        iteration_id: Annotated[StrictStr, Field(description="The id of the iteration")],
        step_result_id: Annotated[StrictStr, Field(description="The id of the Test Step result")],
        _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:
        """call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_get

        Retrieves all the information for the given Test Step result within an iteration.

        :param id: The id of the Test Run (required)
        :type id: str
        :param iteration_id: The id of the iteration (required)
        :type iteration_id: str
        :param step_result_id: The id of the Test Step result (required)
        :type step_result_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._call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_get_serialize(
            id=id,
            iteration_id=iteration_id,
            step_result_id=step_result_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "StepResult",
            '404': "Error",
            '500': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_get_serialize(
        self,
        id,
        iteration_id,
        step_result_id,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _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 id is not None:
            _path_params['id'] = id
        if iteration_id is not None:
            _path_params['iterationId'] = iteration_id
        if step_result_id is not None:
            _path_params['stepResultId'] = step_result_id
        # process the query parameters
        # process the header parameters
        # 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] = [
            'BasicAuth', 
            'bearerAuth'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/1.0/api/testrun/{id}/iteration/{iterationId}/step/{stepResultId}',
            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 call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_put(
        self,
        id: Annotated[StrictStr, Field(description="The id of the Test Run")],
        iteration_id: Annotated[StrictStr, Field(description="The id of the iteration")],
        step_result_id: Annotated[StrictStr, Field(description="The id of the Test Step result")],
        update_step_result: UpdateStepResult,
        _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,
    ) -> StepResultsResponse:
        """call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_put

        Updates the Test Step result within an iteration.

        :param id: The id of the Test Run (required)
        :type id: str
        :param iteration_id: The id of the iteration (required)
        :type iteration_id: str
        :param step_result_id: The id of the Test Step result (required)
        :type step_result_id: str
        :param update_step_result: (required)
        :type update_step_result: UpdateStepResult
        :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._call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_put_serialize(
            id=id,
            iteration_id=iteration_id,
            step_result_id=step_result_id,
            update_step_result=update_step_result,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "StepResultsResponse",
            '404': "Error",
            '500': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            _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 call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_put_with_http_info(
        self,
        id: Annotated[StrictStr, Field(description="The id of the Test Run")],
        iteration_id: Annotated[StrictStr, Field(description="The id of the iteration")],
        step_result_id: Annotated[StrictStr, Field(description="The id of the Test Step result")],
        update_step_result: UpdateStepResult,
        _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[StepResultsResponse]:
        """call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_put

        Updates the Test Step result within an iteration.

        :param id: The id of the Test Run (required)
        :type id: str
        :param iteration_id: The id of the iteration (required)
        :type iteration_id: str
        :param step_result_id: The id of the Test Step result (required)
        :type step_result_id: str
        :param update_step_result: (required)
        :type update_step_result: UpdateStepResult
        :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._call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_put_serialize(
            id=id,
            iteration_id=iteration_id,
            step_result_id=step_result_id,
            update_step_result=update_step_result,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "StepResultsResponse",
            '404': "Error",
            '500': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            _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 call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_put_without_preload_content(
        self,
        id: Annotated[StrictStr, Field(description="The id of the Test Run")],
        iteration_id: Annotated[StrictStr, Field(description="The id of the iteration")],
        step_result_id: Annotated[StrictStr, Field(description="The id of the Test Step result")],
        update_step_result: UpdateStepResult,
        _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:
        """call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_put

        Updates the Test Step result within an iteration.

        :param id: The id of the Test Run (required)
        :type id: str
        :param iteration_id: The id of the iteration (required)
        :type iteration_id: str
        :param step_result_id: The id of the Test Step result (required)
        :type step_result_id: str
        :param update_step_result: (required)
        :type update_step_result: UpdateStepResult
        :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._call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_put_serialize(
            id=id,
            iteration_id=iteration_id,
            step_result_id=step_result_id,
            update_step_result=update_step_result,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "StepResultsResponse",
            '404': "Error",
            '500': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_put_serialize(
        self,
        id,
        iteration_id,
        step_result_id,
        update_step_result,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _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 id is not None:
            _path_params['id'] = id
        if iteration_id is not None:
            _path_params['iterationId'] = iteration_id
        if step_result_id is not None:
            _path_params['stepResultId'] = step_result_id
        # process the query parameters
        # process the header parameters
        # process the form parameters
        # process the body parameter
        if update_step_result is not None:
            _body_params = update_step_result


        # 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] = [
            'BasicAuth', 
            'bearerAuth'
        ]

        return self.api_client.param_serialize(
            method='PUT',
            resource_path='/1.0/api/testrun/{id}/iteration/{iterationId}/step/{stepResultId}',
            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 call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_status_get(
        self,
        id: Annotated[StrictStr, Field(description="The id of the Test Run")],
        iteration_id: Annotated[StrictStr, Field(description="The id of the iteration")],
        step_result_id: Annotated[StrictStr, Field(description="The id of the Test Step result")],
        _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,
    ) -> Model10ApiTestrunIdIterationIterationIdStepStepResultIdStatusGet200Response:
        """call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_status_get

        Retrieves the Test Step status of a Test Step Result within an iteration.

        :param id: The id of the Test Run (required)
        :type id: str
        :param iteration_id: The id of the iteration (required)
        :type iteration_id: str
        :param step_result_id: The id of the Test Step result (required)
        :type step_result_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._call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_status_get_serialize(
            id=id,
            iteration_id=iteration_id,
            step_result_id=step_result_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "Model10ApiTestrunIdIterationIterationIdStepStepResultIdStatusGet200Response",
            '404': "Error",
            '500': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            _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 call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_status_get_with_http_info(
        self,
        id: Annotated[StrictStr, Field(description="The id of the Test Run")],
        iteration_id: Annotated[StrictStr, Field(description="The id of the iteration")],
        step_result_id: Annotated[StrictStr, Field(description="The id of the Test Step result")],
        _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[Model10ApiTestrunIdIterationIterationIdStepStepResultIdStatusGet200Response]:
        """call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_status_get

        Retrieves the Test Step status of a Test Step Result within an iteration.

        :param id: The id of the Test Run (required)
        :type id: str
        :param iteration_id: The id of the iteration (required)
        :type iteration_id: str
        :param step_result_id: The id of the Test Step result (required)
        :type step_result_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._call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_status_get_serialize(
            id=id,
            iteration_id=iteration_id,
            step_result_id=step_result_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "Model10ApiTestrunIdIterationIterationIdStepStepResultIdStatusGet200Response",
            '404': "Error",
            '500': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            _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 call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_status_get_without_preload_content(
        self,
        id: Annotated[StrictStr, Field(description="The id of the Test Run")],
        iteration_id: Annotated[StrictStr, Field(description="The id of the iteration")],
        step_result_id: Annotated[StrictStr, Field(description="The id of the Test Step result")],
        _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:
        """call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_status_get

        Retrieves the Test Step status of a Test Step Result within an iteration.

        :param id: The id of the Test Run (required)
        :type id: str
        :param iteration_id: The id of the iteration (required)
        :type iteration_id: str
        :param step_result_id: The id of the Test Step result (required)
        :type step_result_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._call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_status_get_serialize(
            id=id,
            iteration_id=iteration_id,
            step_result_id=step_result_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "Model10ApiTestrunIdIterationIterationIdStepStepResultIdStatusGet200Response",
            '404': "Error",
            '500': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_status_get_serialize(
        self,
        id,
        iteration_id,
        step_result_id,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _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 id is not None:
            _path_params['id'] = id
        if iteration_id is not None:
            _path_params['iterationId'] = iteration_id
        if step_result_id is not None:
            _path_params['stepResultId'] = step_result_id
        # process the query parameters
        # process the header parameters
        # 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] = [
            'BasicAuth', 
            'bearerAuth'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/1.0/api/testrun/{id}/iteration/{iterationId}/step/{stepResultId}/status',
            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 call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_status_put(
        self,
        id: Annotated[StrictStr, Field(description="The id of the Test Run")],
        iteration_id: Annotated[StrictStr, Field(description="The id of the iteration")],
        step_result_id: Annotated[StrictStr, Field(description="The id of the Test Step result")],
        status: Annotated[StrictStr, Field(description="The status we want the test step to have")],
        _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,
    ) -> None:
        """call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_status_put

        Updates the Test Step status within an iteration.

        :param id: The id of the Test Run (required)
        :type id: str
        :param iteration_id: The id of the iteration (required)
        :type iteration_id: str
        :param step_result_id: The id of the Test Step result (required)
        :type step_result_id: str
        :param status: The status we want the test step to have (required)
        :type status: 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._call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_status_put_serialize(
            id=id,
            iteration_id=iteration_id,
            step_result_id=step_result_id,
            status=status,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '204': None,
            '404': "Error",
            '500': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            _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 call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_status_put_with_http_info(
        self,
        id: Annotated[StrictStr, Field(description="The id of the Test Run")],
        iteration_id: Annotated[StrictStr, Field(description="The id of the iteration")],
        step_result_id: Annotated[StrictStr, Field(description="The id of the Test Step result")],
        status: Annotated[StrictStr, Field(description="The status we want the test step to have")],
        _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[None]:
        """call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_status_put

        Updates the Test Step status within an iteration.

        :param id: The id of the Test Run (required)
        :type id: str
        :param iteration_id: The id of the iteration (required)
        :type iteration_id: str
        :param step_result_id: The id of the Test Step result (required)
        :type step_result_id: str
        :param status: The status we want the test step to have (required)
        :type status: 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._call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_status_put_serialize(
            id=id,
            iteration_id=iteration_id,
            step_result_id=step_result_id,
            status=status,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '204': None,
            '404': "Error",
            '500': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            _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 call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_status_put_without_preload_content(
        self,
        id: Annotated[StrictStr, Field(description="The id of the Test Run")],
        iteration_id: Annotated[StrictStr, Field(description="The id of the iteration")],
        step_result_id: Annotated[StrictStr, Field(description="The id of the Test Step result")],
        status: Annotated[StrictStr, Field(description="The status we want the test step to have")],
        _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:
        """call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_status_put

        Updates the Test Step status within an iteration.

        :param id: The id of the Test Run (required)
        :type id: str
        :param iteration_id: The id of the iteration (required)
        :type iteration_id: str
        :param step_result_id: The id of the Test Step result (required)
        :type step_result_id: str
        :param status: The status we want the test step to have (required)
        :type status: 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._call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_status_put_serialize(
            id=id,
            iteration_id=iteration_id,
            step_result_id=step_result_id,
            status=status,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '204': None,
            '404': "Error",
            '500': None,
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _call_10_api_testrun_id_iteration_iteration_id_step_step_result_id_status_put_serialize(
        self,
        id,
        iteration_id,
        step_result_id,
        status,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _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 id is not None:
            _path_params['id'] = id
        if iteration_id is not None:
            _path_params['iterationId'] = iteration_id
        if step_result_id is not None:
            _path_params['stepResultId'] = step_result_id
        # process the query parameters
        if status is not None:
            
            _query_params.append(('status', status))
            
        # process the header parameters
        # 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] = [
            'BasicAuth', 
            'bearerAuth'
        ]

        return self.api_client.param_serialize(
            method='PUT',
            resource_path='/1.0/api/testrun/{id}/iteration/{iterationId}/step/{stepResultId}/status',
            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 call_10_api_testrun_id_put(
        self,
        id: Annotated[StrictStr, Field(description="The id of the Test Run")],
        update_test_run: UpdateTestRun,
        _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,
    ) -> UpdateTestRunResponse:
        """call_10_api_testrun_id_put

        Update all the values of a Test Run.<br/> The user can update the values of the overall status, step results, assignee, test environments, add defects and evidences and so on. <br/> <br/> To update the value of a Test Run custom field, the id of the field must be provided as well as a valid value for that custom field type. <br/><br/> - **Toggle Fields** values should be _\"true\"_, _\"false\"_, _\"0\"_ or _\"1\"_ <br /><br /> - **Number Fields** values should be a string containing a number, e.g. _\"320\"_. Decimal Number are also accepted,for instance, \"320.5\". The decimal places are always separated by a _\".\"_  <br /> <br /> - **Single Select and Radio Button Fields** values should be a single string containing the option value, e.g. _\"Option A\"_. The value should be a valid option for that custom field. The values are not case sensitive. <br /><br /> - **Multiple Select Fields** values should be an array of the string of option values, e.g. _[\"Option A\", \"Option B\"]_. All the selected values should be valid for that custom field. The option values are not case sensitive. <br /><br /> - **Date Fields** should follow the ISO format _yyyy-MM-dd_, where _yyyy_ represents the year, _MM_ the month in year and _dd_ the day in the month. For instance, a valid value would be _\"2020-05-02\"_. <br /><br /> - **Date Time fields** should be in UTC following the ISO format _yyyy-MM-dd'T'HH:mm'Z'_. The date part follows the same date format, while _HH_ represents the hours (0-24), _mm_ the minutes in hour and _Z_ indicates the hour in UTC. For instance, a valid date time value would be _\"2020-05-02T10:30Z\"_. <br /><br /> An error will be returned when there are invalid custom field values. It is also possible to delete a Test Run custom field value by providing a _null_ or empty value (e.g., _\"\"_ or _[]_). **It is not possible to delete a value of a required Test Run Custom Field value.** <br/> Also, **it is not possible to change the Test Run to a final status when there are required Test Run custom fields with empty values.** <br/> <br/> In the case of a Test Run of a manual Test type, it is possible to update the steps only if there are zero or one iterations. If there are multiple iterations, it is not possible to update the steps through this endpoint, only the iterations.

        :param id: The id of the Test Run (required)
        :type id: str
        :param update_test_run: (required)
        :type update_test_run: UpdateTestRun
        :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._call_10_api_testrun_id_put_serialize(
            id=id,
            update_test_run=update_test_run,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "UpdateTestRunResponse",
            '400': "Error",
            '500': "Error",
        }
        response_data = self.api_client.call_api(
            *_param,
            _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 call_10_api_testrun_id_put_with_http_info(
        self,
        id: Annotated[StrictStr, Field(description="The id of the Test Run")],
        update_test_run: UpdateTestRun,
        _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[UpdateTestRunResponse]:
        """call_10_api_testrun_id_put

        Update all the values of a Test Run.<br/> The user can update the values of the overall status, step results, assignee, test environments, add defects and evidences and so on. <br/> <br/> To update the value of a Test Run custom field, the id of the field must be provided as well as a valid value for that custom field type. <br/><br/> - **Toggle Fields** values should be _\"true\"_, _\"false\"_, _\"0\"_ or _\"1\"_ <br /><br /> - **Number Fields** values should be a string containing a number, e.g. _\"320\"_. Decimal Number are also accepted,for instance, \"320.5\". The decimal places are always separated by a _\".\"_  <br /> <br /> - **Single Select and Radio Button Fields** values should be a single string containing the option value, e.g. _\"Option A\"_. The value should be a valid option for that custom field. The values are not case sensitive. <br /><br /> - **Multiple Select Fields** values should be an array of the string of option values, e.g. _[\"Option A\", \"Option B\"]_. All the selected values should be valid for that custom field. The option values are not case sensitive. <br /><br /> - **Date Fields** should follow the ISO format _yyyy-MM-dd_, where _yyyy_ represents the year, _MM_ the month in year and _dd_ the day in the month. For instance, a valid value would be _\"2020-05-02\"_. <br /><br /> - **Date Time fields** should be in UTC following the ISO format _yyyy-MM-dd'T'HH:mm'Z'_. The date part follows the same date format, while _HH_ represents the hours (0-24), _mm_ the minutes in hour and _Z_ indicates the hour in UTC. For instance, a valid date time value would be _\"2020-05-02T10:30Z\"_. <br /><br /> An error will be returned when there are invalid custom field values. It is also possible to delete a Test Run custom field value by providing a _null_ or empty value (e.g., _\"\"_ or _[]_). **It is not possible to delete a value of a required Test Run Custom Field value.** <br/> Also, **it is not possible to change the Test Run to a final status when there are required Test Run custom fields with empty values.** <br/> <br/> In the case of a Test Run of a manual Test type, it is possible to update the steps only if there are zero or one iterations. If there are multiple iterations, it is not possible to update the steps through this endpoint, only the iterations.

        :param id: The id of the Test Run (required)
        :type id: str
        :param update_test_run: (required)
        :type update_test_run: UpdateTestRun
        :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._call_10_api_testrun_id_put_serialize(
            id=id,
            update_test_run=update_test_run,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "UpdateTestRunResponse",
            '400': "Error",
            '500': "Error",
        }
        response_data = self.api_client.call_api(
            *_param,
            _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 call_10_api_testrun_id_put_without_preload_content(
        self,
        id: Annotated[StrictStr, Field(description="The id of the Test Run")],
        update_test_run: UpdateTestRun,
        _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:
        """call_10_api_testrun_id_put

        Update all the values of a Test Run.<br/> The user can update the values of the overall status, step results, assignee, test environments, add defects and evidences and so on. <br/> <br/> To update the value of a Test Run custom field, the id of the field must be provided as well as a valid value for that custom field type. <br/><br/> - **Toggle Fields** values should be _\"true\"_, _\"false\"_, _\"0\"_ or _\"1\"_ <br /><br /> - **Number Fields** values should be a string containing a number, e.g. _\"320\"_. Decimal Number are also accepted,for instance, \"320.5\". The decimal places are always separated by a _\".\"_  <br /> <br /> - **Single Select and Radio Button Fields** values should be a single string containing the option value, e.g. _\"Option A\"_. The value should be a valid option for that custom field. The values are not case sensitive. <br /><br /> - **Multiple Select Fields** values should be an array of the string of option values, e.g. _[\"Option A\", \"Option B\"]_. All the selected values should be valid for that custom field. The option values are not case sensitive. <br /><br /> - **Date Fields** should follow the ISO format _yyyy-MM-dd_, where _yyyy_ represents the year, _MM_ the month in year and _dd_ the day in the month. For instance, a valid value would be _\"2020-05-02\"_. <br /><br /> - **Date Time fields** should be in UTC following the ISO format _yyyy-MM-dd'T'HH:mm'Z'_. The date part follows the same date format, while _HH_ represents the hours (0-24), _mm_ the minutes in hour and _Z_ indicates the hour in UTC. For instance, a valid date time value would be _\"2020-05-02T10:30Z\"_. <br /><br /> An error will be returned when there are invalid custom field values. It is also possible to delete a Test Run custom field value by providing a _null_ or empty value (e.g., _\"\"_ or _[]_). **It is not possible to delete a value of a required Test Run Custom Field value.** <br/> Also, **it is not possible to change the Test Run to a final status when there are required Test Run custom fields with empty values.** <br/> <br/> In the case of a Test Run of a manual Test type, it is possible to update the steps only if there are zero or one iterations. If there are multiple iterations, it is not possible to update the steps through this endpoint, only the iterations.

        :param id: The id of the Test Run (required)
        :type id: str
        :param update_test_run: (required)
        :type update_test_run: UpdateTestRun
        :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._call_10_api_testrun_id_put_serialize(
            id=id,
            update_test_run=update_test_run,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "UpdateTestRunResponse",
            '400': "Error",
            '500': "Error",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _call_10_api_testrun_id_put_serialize(
        self,
        id,
        update_test_run,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _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 id is not None:
            _path_params['id'] = id
        # process the query parameters
        # process the header parameters
        # process the form parameters
        # process the body parameter
        if update_test_run is not None:
            _body_params = update_test_run


        # 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] = [
            'BasicAuth', 
            'bearerAuth'
        ]

        return self.api_client.param_serialize(
            method='PUT',
            resource_path='/1.0/api/testrun/{id}',
            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_testruns(
        self,
        test_exec_key: Annotated[Optional[StrictStr], Field(description="The Test Execution issue key")] = None,
        test_key: Annotated[Optional[StrictStr], Field(description="The Test issue key (may only be used when using the \"testExecKey\"  param)")] = None,
        test_plan_key: Annotated[Optional[StrictStr], Field(description="The Test Plan issue key")] = None,
        include_test_fields: Annotated[Optional[StrictStr], Field(description="List of custom fields of the Test issue to be return in the responde (several custom fields can be requested by separating them with ',')")] = None,
        saved_filter_id: Annotated[Optional[StrictStr], Field(description="The Jira JQL filter ID or name containing Test Executions issues")] = None,
        limit: Annotated[Optional[StrictInt], Field(description="The number of maximum Test Runs to be returned")] = None,
        page: Annotated[Optional[StrictInt], Field(description="The number of the results page")] = 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,
    ) -> List[GetTestruns200ResponseInner]:
        """

        Retrieves all the Test Runs from a given context. With this endpoint you can obtain all the Test Runs (paginated) in one of the following contexts: - In a Test Execution issue. A Test issue key can be used in order to return a single TestRun from the Test Execution issue - In a Test Plan issue - In a JQL filter that returns several Test Execution issue  In case the Test Run has iterations, steps will not appear. However, if the Test has parameters but executed one time, it will show the steps and the parameters info. <br/>

        :param test_exec_key: The Test Execution issue key
        :type test_exec_key: str
        :param test_key: The Test issue key (may only be used when using the \"testExecKey\"  param)
        :type test_key: str
        :param test_plan_key: The Test Plan issue key
        :type test_plan_key: str
        :param include_test_fields: List of custom fields of the Test issue to be return in the responde (several custom fields can be requested by separating them with ',')
        :type include_test_fields: str
        :param saved_filter_id: The Jira JQL filter ID or name containing Test Executions issues
        :type saved_filter_id: str
        :param limit: The number of maximum Test Runs to be returned
        :type limit: int
        :param page: The number of the results page
        :type page: 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._get_testruns_serialize(
            test_exec_key=test_exec_key,
            test_key=test_key,
            test_plan_key=test_plan_key,
            include_test_fields=include_test_fields,
            saved_filter_id=saved_filter_id,
            limit=limit,
            page=page,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "List[GetTestruns200ResponseInner]",
            '400': "Error",
            '500': "Error",
        }
        response_data = self.api_client.call_api(
            *_param,
            _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_testruns_with_http_info(
        self,
        test_exec_key: Annotated[Optional[StrictStr], Field(description="The Test Execution issue key")] = None,
        test_key: Annotated[Optional[StrictStr], Field(description="The Test issue key (may only be used when using the \"testExecKey\"  param)")] = None,
        test_plan_key: Annotated[Optional[StrictStr], Field(description="The Test Plan issue key")] = None,
        include_test_fields: Annotated[Optional[StrictStr], Field(description="List of custom fields of the Test issue to be return in the responde (several custom fields can be requested by separating them with ',')")] = None,
        saved_filter_id: Annotated[Optional[StrictStr], Field(description="The Jira JQL filter ID or name containing Test Executions issues")] = None,
        limit: Annotated[Optional[StrictInt], Field(description="The number of maximum Test Runs to be returned")] = None,
        page: Annotated[Optional[StrictInt], Field(description="The number of the results page")] = 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[List[GetTestruns200ResponseInner]]:
        """

        Retrieves all the Test Runs from a given context. With this endpoint you can obtain all the Test Runs (paginated) in one of the following contexts: - In a Test Execution issue. A Test issue key can be used in order to return a single TestRun from the Test Execution issue - In a Test Plan issue - In a JQL filter that returns several Test Execution issue  In case the Test Run has iterations, steps will not appear. However, if the Test has parameters but executed one time, it will show the steps and the parameters info. <br/>

        :param test_exec_key: The Test Execution issue key
        :type test_exec_key: str
        :param test_key: The Test issue key (may only be used when using the \"testExecKey\"  param)
        :type test_key: str
        :param test_plan_key: The Test Plan issue key
        :type test_plan_key: str
        :param include_test_fields: List of custom fields of the Test issue to be return in the responde (several custom fields can be requested by separating them with ',')
        :type include_test_fields: str
        :param saved_filter_id: The Jira JQL filter ID or name containing Test Executions issues
        :type saved_filter_id: str
        :param limit: The number of maximum Test Runs to be returned
        :type limit: int
        :param page: The number of the results page
        :type page: 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._get_testruns_serialize(
            test_exec_key=test_exec_key,
            test_key=test_key,
            test_plan_key=test_plan_key,
            include_test_fields=include_test_fields,
            saved_filter_id=saved_filter_id,
            limit=limit,
            page=page,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "List[GetTestruns200ResponseInner]",
            '400': "Error",
            '500': "Error",
        }
        response_data = self.api_client.call_api(
            *_param,
            _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_testruns_without_preload_content(
        self,
        test_exec_key: Annotated[Optional[StrictStr], Field(description="The Test Execution issue key")] = None,
        test_key: Annotated[Optional[StrictStr], Field(description="The Test issue key (may only be used when using the \"testExecKey\"  param)")] = None,
        test_plan_key: Annotated[Optional[StrictStr], Field(description="The Test Plan issue key")] = None,
        include_test_fields: Annotated[Optional[StrictStr], Field(description="List of custom fields of the Test issue to be return in the responde (several custom fields can be requested by separating them with ',')")] = None,
        saved_filter_id: Annotated[Optional[StrictStr], Field(description="The Jira JQL filter ID or name containing Test Executions issues")] = None,
        limit: Annotated[Optional[StrictInt], Field(description="The number of maximum Test Runs to be returned")] = None,
        page: Annotated[Optional[StrictInt], Field(description="The number of the results page")] = 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:
        """

        Retrieves all the Test Runs from a given context. With this endpoint you can obtain all the Test Runs (paginated) in one of the following contexts: - In a Test Execution issue. A Test issue key can be used in order to return a single TestRun from the Test Execution issue - In a Test Plan issue - In a JQL filter that returns several Test Execution issue  In case the Test Run has iterations, steps will not appear. However, if the Test has parameters but executed one time, it will show the steps and the parameters info. <br/>

        :param test_exec_key: The Test Execution issue key
        :type test_exec_key: str
        :param test_key: The Test issue key (may only be used when using the \"testExecKey\"  param)
        :type test_key: str
        :param test_plan_key: The Test Plan issue key
        :type test_plan_key: str
        :param include_test_fields: List of custom fields of the Test issue to be return in the responde (several custom fields can be requested by separating them with ',')
        :type include_test_fields: str
        :param saved_filter_id: The Jira JQL filter ID or name containing Test Executions issues
        :type saved_filter_id: str
        :param limit: The number of maximum Test Runs to be returned
        :type limit: int
        :param page: The number of the results page
        :type page: 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._get_testruns_serialize(
            test_exec_key=test_exec_key,
            test_key=test_key,
            test_plan_key=test_plan_key,
            include_test_fields=include_test_fields,
            saved_filter_id=saved_filter_id,
            limit=limit,
            page=page,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "List[GetTestruns200ResponseInner]",
            '400': "Error",
            '500': "Error",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _get_testruns_serialize(
        self,
        test_exec_key,
        test_key,
        test_plan_key,
        include_test_fields,
        saved_filter_id,
        limit,
        page,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _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 test_exec_key is not None:
            
            _query_params.append(('testExecKey', test_exec_key))
            
        if test_key is not None:
            
            _query_params.append(('testKey', test_key))
            
        if test_plan_key is not None:
            
            _query_params.append(('testPlanKey', test_plan_key))
            
        if include_test_fields is not None:
            
            _query_params.append(('includeTestFields', include_test_fields))
            
        if saved_filter_id is not None:
            
            _query_params.append(('savedFilterId', saved_filter_id))
            
        if limit is not None:
            
            _query_params.append(('limit', limit))
            
        if page is not None:
            
            _query_params.append(('page', page))
            
        # process the header parameters
        # 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] = [
            'BasicAuth', 
            'bearerAuth'
        ]

        return self.api_client.param_serialize(
            method='GET',
            resource_path='/1.0/api/testruns',
            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
        )


