# 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
from typing_extensions import Annotated
from openapi_client.models.create_step_request_body import CreateStepRequestBody
from openapi_client.models.create_step_response import CreateStepResponse
from openapi_client.models.file_response import FileResponse
from openapi_client.models.step_response import StepResponse
from openapi_client.models.test_steps_response import TestStepsResponse
from openapi_client.models.update_step_request_body import UpdateStepRequestBody

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


class TestStepApi:
    """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_test_test_key_step_put(
        self,
        test_key: Annotated[StrictStr, Field(description="The key of the test issue, e.g., CALC-562")],
        create_step_request_body: CreateStepRequestBody,
        _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,
    ) -> CreateStepResponse:
        """call_10_api_test_test_key_step_put

        Create a new test step. All step fields values are listed under _fields_ and identified by the name and a list of attachments to add to the step. The field values should follow a certain format according to the 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 /> The remaining field types values do not required a specific validation. For instance, for a Single Line Custom field a valid value would be _\"Perform Action B\"_. <br /><br /> If some value is not valid for a certain custom field type, an error will be return stating the field with the incorrect value. Furthermore, **all required step fields must be provided**.

        :param test_key: The key of the test issue, e.g., CALC-562 (required)
        :type test_key: str
        :param create_step_request_body: (required)
        :type create_step_request_body: CreateStepRequestBody
        :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_test_test_key_step_put_serialize(
            test_key=test_key,
            create_step_request_body=create_step_request_body,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '201': "CreateStepResponse",
            '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_test_test_key_step_put_with_http_info(
        self,
        test_key: Annotated[StrictStr, Field(description="The key of the test issue, e.g., CALC-562")],
        create_step_request_body: CreateStepRequestBody,
        _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[CreateStepResponse]:
        """call_10_api_test_test_key_step_put

        Create a new test step. All step fields values are listed under _fields_ and identified by the name and a list of attachments to add to the step. The field values should follow a certain format according to the 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 /> The remaining field types values do not required a specific validation. For instance, for a Single Line Custom field a valid value would be _\"Perform Action B\"_. <br /><br /> If some value is not valid for a certain custom field type, an error will be return stating the field with the incorrect value. Furthermore, **all required step fields must be provided**.

        :param test_key: The key of the test issue, e.g., CALC-562 (required)
        :type test_key: str
        :param create_step_request_body: (required)
        :type create_step_request_body: CreateStepRequestBody
        :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_test_test_key_step_put_serialize(
            test_key=test_key,
            create_step_request_body=create_step_request_body,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '201': "CreateStepResponse",
            '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_test_test_key_step_put_without_preload_content(
        self,
        test_key: Annotated[StrictStr, Field(description="The key of the test issue, e.g., CALC-562")],
        create_step_request_body: CreateStepRequestBody,
        _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_test_test_key_step_put

        Create a new test step. All step fields values are listed under _fields_ and identified by the name and a list of attachments to add to the step. The field values should follow a certain format according to the 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 /> The remaining field types values do not required a specific validation. For instance, for a Single Line Custom field a valid value would be _\"Perform Action B\"_. <br /><br /> If some value is not valid for a certain custom field type, an error will be return stating the field with the incorrect value. Furthermore, **all required step fields must be provided**.

        :param test_key: The key of the test issue, e.g., CALC-562 (required)
        :type test_key: str
        :param create_step_request_body: (required)
        :type create_step_request_body: CreateStepRequestBody
        :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_test_test_key_step_put_serialize(
            test_key=test_key,
            create_step_request_body=create_step_request_body,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

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


    def _call_10_api_test_test_key_step_put_serialize(
        self,
        test_key,
        create_step_request_body,
        _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 test_key is not None:
            _path_params['testKey'] = test_key
        # process the query parameters
        # process the header parameters
        # process the form parameters
        # process the body parameter
        if create_step_request_body is not None:
            _body_params = create_step_request_body


        # 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/test/{testKey}/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_test_test_key_steps_get(
        self,
        test_key: Annotated[StrictStr, Field(description="The key of the test issue, e.g., CALC-562")],
        _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,
    ) -> TestStepsResponse:
        """call_10_api_test_test_key_steps_get

        Returns all the steps of a test issue given the key. The response contains for each step the corresponding id, index, fields and the attachments. <br /> <br /> The Test Step fields are identified by their name and can be of type _Data_ (Toggle, Number, Date and Date Time fields), _Option_ (Single Select, Multiple Select and Radio Button fields), _Wiki_ (Native fields, Single and Multiple Line fields). <br /> <br /> The value of step fields of type _Wiki_ have a raw and rendered value. _Option_ fields value will be an array containing the information of the selected options (the option id and its value).

        :param test_key: The key of the test issue, e.g., CALC-562 (required)
        :type test_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_test_test_key_steps_get_serialize(
            test_key=test_key,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "TestStepsResponse",
            '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_test_test_key_steps_get_with_http_info(
        self,
        test_key: Annotated[StrictStr, Field(description="The key of the test issue, e.g., CALC-562")],
        _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[TestStepsResponse]:
        """call_10_api_test_test_key_steps_get

        Returns all the steps of a test issue given the key. The response contains for each step the corresponding id, index, fields and the attachments. <br /> <br /> The Test Step fields are identified by their name and can be of type _Data_ (Toggle, Number, Date and Date Time fields), _Option_ (Single Select, Multiple Select and Radio Button fields), _Wiki_ (Native fields, Single and Multiple Line fields). <br /> <br /> The value of step fields of type _Wiki_ have a raw and rendered value. _Option_ fields value will be an array containing the information of the selected options (the option id and its value).

        :param test_key: The key of the test issue, e.g., CALC-562 (required)
        :type test_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_test_test_key_steps_get_serialize(
            test_key=test_key,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "TestStepsResponse",
            '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_test_test_key_steps_get_without_preload_content(
        self,
        test_key: Annotated[StrictStr, Field(description="The key of the test issue, e.g., CALC-562")],
        _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_test_test_key_steps_get

        Returns all the steps of a test issue given the key. The response contains for each step the corresponding id, index, fields and the attachments. <br /> <br /> The Test Step fields are identified by their name and can be of type _Data_ (Toggle, Number, Date and Date Time fields), _Option_ (Single Select, Multiple Select and Radio Button fields), _Wiki_ (Native fields, Single and Multiple Line fields). <br /> <br /> The value of step fields of type _Wiki_ have a raw and rendered value. _Option_ fields value will be an array containing the information of the selected options (the option id and its value).

        :param test_key: The key of the test issue, e.g., CALC-562 (required)
        :type test_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_test_test_key_steps_get_serialize(
            test_key=test_key,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

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


    def _call_10_api_test_test_key_steps_get_serialize(
        self,
        test_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
        if test_key is not None:
            _path_params['testKey'] = test_key
        # 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/test/{testKey}/steps',
            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_test_test_key_steps_step_id_attachment_attachment_id_delete(
        self,
        test_key: Annotated[StrictStr, Field(description="Test with key CALC-123 does not exist or is not a manual test.")],
        step_id: Annotated[StrictInt, Field(description="The id of the test step")],
        attachment_id: Annotated[StrictInt, Field(description="The id of the attachment")],
        _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_test_test_key_steps_step_id_attachment_attachment_id_delete

        Deletes a test step attachment, given the test key and step and attachment ids.

        :param test_key: Test with key CALC-123 does not exist or is not a manual test. (required)
        :type test_key: str
        :param step_id: The id of the test step (required)
        :type step_id: int
        :param attachment_id: The id of the attachment (required)
        :type attachment_id: 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._call_10_api_test_test_key_steps_step_id_attachment_attachment_id_delete_serialize(
            test_key=test_key,
            step_id=step_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,
            '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_test_test_key_steps_step_id_attachment_attachment_id_delete_with_http_info(
        self,
        test_key: Annotated[StrictStr, Field(description="Test with key CALC-123 does not exist or is not a manual test.")],
        step_id: Annotated[StrictInt, Field(description="The id of the test step")],
        attachment_id: Annotated[StrictInt, Field(description="The id of the attachment")],
        _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_test_test_key_steps_step_id_attachment_attachment_id_delete

        Deletes a test step attachment, given the test key and step and attachment ids.

        :param test_key: Test with key CALC-123 does not exist or is not a manual test. (required)
        :type test_key: str
        :param step_id: The id of the test step (required)
        :type step_id: int
        :param attachment_id: The id of the attachment (required)
        :type attachment_id: 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._call_10_api_test_test_key_steps_step_id_attachment_attachment_id_delete_serialize(
            test_key=test_key,
            step_id=step_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,
            '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_test_test_key_steps_step_id_attachment_attachment_id_delete_without_preload_content(
        self,
        test_key: Annotated[StrictStr, Field(description="Test with key CALC-123 does not exist or is not a manual test.")],
        step_id: Annotated[StrictInt, Field(description="The id of the test step")],
        attachment_id: Annotated[StrictInt, Field(description="The id of the attachment")],
        _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_test_test_key_steps_step_id_attachment_attachment_id_delete

        Deletes a test step attachment, given the test key and step and attachment ids.

        :param test_key: Test with key CALC-123 does not exist or is not a manual test. (required)
        :type test_key: str
        :param step_id: The id of the test step (required)
        :type step_id: int
        :param attachment_id: The id of the attachment (required)
        :type attachment_id: 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._call_10_api_test_test_key_steps_step_id_attachment_attachment_id_delete_serialize(
            test_key=test_key,
            step_id=step_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,
            '400': "Error",
            '500': "Error",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _call_10_api_test_test_key_steps_step_id_attachment_attachment_id_delete_serialize(
        self,
        test_key,
        step_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 test_key is not None:
            _path_params['testKey'] = test_key
        if step_id is not None:
            _path_params['stepId'] = step_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/test/{testKey}/steps/{stepId}/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_test_test_key_steps_step_id_attachments_get(
        self,
        test_key: Annotated[StrictStr, Field(description="Test with key CALC-123 does not exist or is not a manual test.")],
        step_id: Annotated[StrictInt, Field(description="The id of the test step")],
        _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_test_test_key_steps_step_id_attachments_get

        Returns all the attachments of a test step, given the test key and step id.

        :param test_key: Test with key CALC-123 does not exist or is not a manual test. (required)
        :type test_key: str
        :param step_id: The id of the test step (required)
        :type step_id: 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._call_10_api_test_test_key_steps_step_id_attachments_get_serialize(
            test_key=test_key,
            step_id=step_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]",
            '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_test_test_key_steps_step_id_attachments_get_with_http_info(
        self,
        test_key: Annotated[StrictStr, Field(description="Test with key CALC-123 does not exist or is not a manual test.")],
        step_id: Annotated[StrictInt, Field(description="The id of the test step")],
        _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_test_test_key_steps_step_id_attachments_get

        Returns all the attachments of a test step, given the test key and step id.

        :param test_key: Test with key CALC-123 does not exist or is not a manual test. (required)
        :type test_key: str
        :param step_id: The id of the test step (required)
        :type step_id: 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._call_10_api_test_test_key_steps_step_id_attachments_get_serialize(
            test_key=test_key,
            step_id=step_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]",
            '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_test_test_key_steps_step_id_attachments_get_without_preload_content(
        self,
        test_key: Annotated[StrictStr, Field(description="Test with key CALC-123 does not exist or is not a manual test.")],
        step_id: Annotated[StrictInt, Field(description="The id of the test step")],
        _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_test_test_key_steps_step_id_attachments_get

        Returns all the attachments of a test step, given the test key and step id.

        :param test_key: Test with key CALC-123 does not exist or is not a manual test. (required)
        :type test_key: str
        :param step_id: The id of the test step (required)
        :type step_id: 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._call_10_api_test_test_key_steps_step_id_attachments_get_serialize(
            test_key=test_key,
            step_id=step_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]",
            '400': "Error",
            '500': "Error",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _call_10_api_test_test_key_steps_step_id_attachments_get_serialize(
        self,
        test_key,
        step_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 test_key is not None:
            _path_params['testKey'] = test_key
        if step_id is not None:
            _path_params['stepId'] = step_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/test/{testKey}/steps/{stepId}/attachments',
            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_test_test_key_steps_step_id_delete(
        self,
        test_key: Annotated[StrictStr, Field(description="The key of the test issue, e.g., CALC-562")],
        step_id: Annotated[StrictInt, Field(description="The id of the test step")],
        _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_test_test_key_steps_step_id_delete

        Deletes a test step given the test key and the step id.

        :param test_key: The key of the test issue, e.g., CALC-562 (required)
        :type test_key: str
        :param step_id: The id of the test step (required)
        :type step_id: 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._call_10_api_test_test_key_steps_step_id_delete_serialize(
            test_key=test_key,
            step_id=step_id,
            _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': "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_test_test_key_steps_step_id_delete_with_http_info(
        self,
        test_key: Annotated[StrictStr, Field(description="The key of the test issue, e.g., CALC-562")],
        step_id: Annotated[StrictInt, Field(description="The id of the test step")],
        _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_test_test_key_steps_step_id_delete

        Deletes a test step given the test key and the step id.

        :param test_key: The key of the test issue, e.g., CALC-562 (required)
        :type test_key: str
        :param step_id: The id of the test step (required)
        :type step_id: 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._call_10_api_test_test_key_steps_step_id_delete_serialize(
            test_key=test_key,
            step_id=step_id,
            _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': "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_test_test_key_steps_step_id_delete_without_preload_content(
        self,
        test_key: Annotated[StrictStr, Field(description="The key of the test issue, e.g., CALC-562")],
        step_id: Annotated[StrictInt, Field(description="The id of the test step")],
        _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_test_test_key_steps_step_id_delete

        Deletes a test step given the test key and the step id.

        :param test_key: The key of the test issue, e.g., CALC-562 (required)
        :type test_key: str
        :param step_id: The id of the test step (required)
        :type step_id: 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._call_10_api_test_test_key_steps_step_id_delete_serialize(
            test_key=test_key,
            step_id=step_id,
            _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': "Error",
        }
        response_data = self.api_client.call_api(
            *_param,
            _request_timeout=_request_timeout
        )
        return response_data.response


    def _call_10_api_test_test_key_steps_step_id_delete_serialize(
        self,
        test_key,
        step_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 test_key is not None:
            _path_params['testKey'] = test_key
        if step_id is not None:
            _path_params['stepId'] = step_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/test/{testKey}/steps/{stepId}',
            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_test_test_key_steps_step_id_get(
        self,
        test_key: Annotated[StrictStr, Field(description="The key of the test issue, e.g., CALC-562")],
        step_id: Annotated[StrictInt, Field(description="The id of the test step")],
        _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,
    ) -> StepResponse:
        """call_10_api_test_test_key_steps_step_id_get

        Returns the values of a single test step, given the test key and the step id. The response follows the same format as the previous endpoints, containing the step id, index, fields and the attachments. <br /> <br /> The Test Step fields are identified by their name and can be of type _Data_ (Toggle, Number, Date and Date Time fields), _Option_ (Single Select, Multiple Select and Radio Button fields), _Wiki_ (Native fields, Single and Multiple Line fields). <br /> <br /> The value of step fields of type _Wiki_ have a raw and rendered value. _Option_ fields value will be an array containing the information of the selected options (the option id and its value).

        :param test_key: The key of the test issue, e.g., CALC-562 (required)
        :type test_key: str
        :param step_id: The id of the test step (required)
        :type step_id: 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._call_10_api_test_test_key_steps_step_id_get_serialize(
            test_key=test_key,
            step_id=step_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "StepResponse",
            '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_test_test_key_steps_step_id_get_with_http_info(
        self,
        test_key: Annotated[StrictStr, Field(description="The key of the test issue, e.g., CALC-562")],
        step_id: Annotated[StrictInt, Field(description="The id of the test step")],
        _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[StepResponse]:
        """call_10_api_test_test_key_steps_step_id_get

        Returns the values of a single test step, given the test key and the step id. The response follows the same format as the previous endpoints, containing the step id, index, fields and the attachments. <br /> <br /> The Test Step fields are identified by their name and can be of type _Data_ (Toggle, Number, Date and Date Time fields), _Option_ (Single Select, Multiple Select and Radio Button fields), _Wiki_ (Native fields, Single and Multiple Line fields). <br /> <br /> The value of step fields of type _Wiki_ have a raw and rendered value. _Option_ fields value will be an array containing the information of the selected options (the option id and its value).

        :param test_key: The key of the test issue, e.g., CALC-562 (required)
        :type test_key: str
        :param step_id: The id of the test step (required)
        :type step_id: 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._call_10_api_test_test_key_steps_step_id_get_serialize(
            test_key=test_key,
            step_id=step_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "StepResponse",
            '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_test_test_key_steps_step_id_get_without_preload_content(
        self,
        test_key: Annotated[StrictStr, Field(description="The key of the test issue, e.g., CALC-562")],
        step_id: Annotated[StrictInt, Field(description="The id of the test step")],
        _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_test_test_key_steps_step_id_get

        Returns the values of a single test step, given the test key and the step id. The response follows the same format as the previous endpoints, containing the step id, index, fields and the attachments. <br /> <br /> The Test Step fields are identified by their name and can be of type _Data_ (Toggle, Number, Date and Date Time fields), _Option_ (Single Select, Multiple Select and Radio Button fields), _Wiki_ (Native fields, Single and Multiple Line fields). <br /> <br /> The value of step fields of type _Wiki_ have a raw and rendered value. _Option_ fields value will be an array containing the information of the selected options (the option id and its value).

        :param test_key: The key of the test issue, e.g., CALC-562 (required)
        :type test_key: str
        :param step_id: The id of the test step (required)
        :type step_id: 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._call_10_api_test_test_key_steps_step_id_get_serialize(
            test_key=test_key,
            step_id=step_id,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

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


    def _call_10_api_test_test_key_steps_step_id_get_serialize(
        self,
        test_key,
        step_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 test_key is not None:
            _path_params['testKey'] = test_key
        if step_id is not None:
            _path_params['stepId'] = step_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/test/{testKey}/steps/{stepId}',
            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_test_test_key_steps_step_id_put(
        self,
        test_key: Annotated[StrictStr, Field(description="Test Key")],
        step_id: Annotated[StrictInt, Field(description="The id of the test step")],
        update_step_request_body: UpdateStepRequestBody,
        _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,
    ) -> CreateStepResponse:
        """call_10_api_test_test_key_steps_step_id_put

        Updates the values of an existing test step, given the test key and step id. The user can update the field values and the attachments of a step. The values should follow a specific format similar to the step creation. <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 /> The remaining field types values do not required a specific validation. For instance, for a Single Line Custom field a valid value would be _\"Perform Action B\"_. <br /><br /> If some value is not valid for a certain custom field type, an error will be return stating the field with the incorrect value. A field value can be deleted sending an empty value, such as _\"\"_ or _[]_, or by sending _null_. **It is not possible to delete the value of a required field.**

        :param test_key: Test Key (required)
        :type test_key: str
        :param step_id: The id of the test step (required)
        :type step_id: int
        :param update_step_request_body: (required)
        :type update_step_request_body: UpdateStepRequestBody
        :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_test_test_key_steps_step_id_put_serialize(
            test_key=test_key,
            step_id=step_id,
            update_step_request_body=update_step_request_body,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "CreateStepResponse",
            '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_test_test_key_steps_step_id_put_with_http_info(
        self,
        test_key: Annotated[StrictStr, Field(description="Test Key")],
        step_id: Annotated[StrictInt, Field(description="The id of the test step")],
        update_step_request_body: UpdateStepRequestBody,
        _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[CreateStepResponse]:
        """call_10_api_test_test_key_steps_step_id_put

        Updates the values of an existing test step, given the test key and step id. The user can update the field values and the attachments of a step. The values should follow a specific format similar to the step creation. <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 /> The remaining field types values do not required a specific validation. For instance, for a Single Line Custom field a valid value would be _\"Perform Action B\"_. <br /><br /> If some value is not valid for a certain custom field type, an error will be return stating the field with the incorrect value. A field value can be deleted sending an empty value, such as _\"\"_ or _[]_, or by sending _null_. **It is not possible to delete the value of a required field.**

        :param test_key: Test Key (required)
        :type test_key: str
        :param step_id: The id of the test step (required)
        :type step_id: int
        :param update_step_request_body: (required)
        :type update_step_request_body: UpdateStepRequestBody
        :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_test_test_key_steps_step_id_put_serialize(
            test_key=test_key,
            step_id=step_id,
            update_step_request_body=update_step_request_body,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "CreateStepResponse",
            '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_test_test_key_steps_step_id_put_without_preload_content(
        self,
        test_key: Annotated[StrictStr, Field(description="Test Key")],
        step_id: Annotated[StrictInt, Field(description="The id of the test step")],
        update_step_request_body: UpdateStepRequestBody,
        _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_test_test_key_steps_step_id_put

        Updates the values of an existing test step, given the test key and step id. The user can update the field values and the attachments of a step. The values should follow a specific format similar to the step creation. <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 /> The remaining field types values do not required a specific validation. For instance, for a Single Line Custom field a valid value would be _\"Perform Action B\"_. <br /><br /> If some value is not valid for a certain custom field type, an error will be return stating the field with the incorrect value. A field value can be deleted sending an empty value, such as _\"\"_ or _[]_, or by sending _null_. **It is not possible to delete the value of a required field.**

        :param test_key: Test Key (required)
        :type test_key: str
        :param step_id: The id of the test step (required)
        :type step_id: int
        :param update_step_request_body: (required)
        :type update_step_request_body: UpdateStepRequestBody
        :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_test_test_key_steps_step_id_put_serialize(
            test_key=test_key,
            step_id=step_id,
            update_step_request_body=update_step_request_body,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

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


    def _call_10_api_test_test_key_steps_step_id_put_serialize(
        self,
        test_key,
        step_id,
        update_step_request_body,
        _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 test_key is not None:
            _path_params['testKey'] = test_key
        if step_id is not None:
            _path_params['stepId'] = step_id
        # process the query parameters
        # process the header parameters
        # process the form parameters
        # process the body parameter
        if update_step_request_body is not None:
            _body_params = update_step_request_body


        # 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/test/{testKey}/steps/{stepId}',
            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
        )


