# 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, field_validator
from typing import Optional, Tuple, Union
from typing_extensions import Annotated
from openapi_client.models.rest_api_success_response import RestApiSuccessResponse
from openapi_client.models.xray_json_import_execution import XrayJsonImportExecution

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


class ImportApi:
    """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 post_import_execution(
        self,
        xray_json_import_execution: Optional[XrayJsonImportExecution] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RestApiSuccessResponse:
        """

        Endpoint used to import Test results in the Xray JSON format. <br></br> Updating an existing Test Run using Xray format REST API will reset all dataset related fields. This means that all current iteration data and dataset present in the Test Run will be replaced with the new information given in the REST API request.

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

        _param = self._post_import_execution_serialize(
            xray_json_import_execution=xray_json_import_execution,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "RestApiSuccessResponse",
            '400': "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 post_import_execution_with_http_info(
        self,
        xray_json_import_execution: Optional[XrayJsonImportExecution] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> ApiResponse[RestApiSuccessResponse]:
        """

        Endpoint used to import Test results in the Xray JSON format. <br></br> Updating an existing Test Run using Xray format REST API will reset all dataset related fields. This means that all current iteration data and dataset present in the Test Run will be replaced with the new information given in the REST API request.

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

        _param = self._post_import_execution_serialize(
            xray_json_import_execution=xray_json_import_execution,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "RestApiSuccessResponse",
            '400': "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 post_import_execution_without_preload_content(
        self,
        xray_json_import_execution: Optional[XrayJsonImportExecution] = None,
        _request_timeout: Union[
            None,
            Annotated[StrictFloat, Field(gt=0)],
            Tuple[
                Annotated[StrictFloat, Field(gt=0)],
                Annotated[StrictFloat, Field(gt=0)]
            ]
        ] = None,
        _request_auth: Optional[Dict[StrictStr, Any]] = None,
        _content_type: Optional[StrictStr] = None,
        _headers: Optional[Dict[StrictStr, Any]] = None,
        _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
    ) -> RESTResponseType:
        """

        Endpoint used to import Test results in the Xray JSON format. <br></br> Updating an existing Test Run using Xray format REST API will reset all dataset related fields. This means that all current iteration data and dataset present in the Test Run will be replaced with the new information given in the REST API request.

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

        _param = self._post_import_execution_serialize(
            xray_json_import_execution=xray_json_import_execution,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

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


    def _post_import_execution_serialize(
        self,
        xray_json_import_execution,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
        }

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

        # process the path parameters
        # process the query parameters
        # process the header parameters
        # process the form parameters
        # process the body parameter
        if xray_json_import_execution is not None:
            _body_params = xray_json_import_execution


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

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

        # authentication setting
        _auth_settings: List[str] = [
            'BasicAuth', 
            'bearerAuth'
        ]

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/1.0/api/import/execution',
            path_params=_path_params,
            query_params=_query_params,
            header_params=_header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            auth_settings=_auth_settings,
            collection_formats=_collection_formats,
            _host=_host,
            _request_auth=_request_auth
        )




    @validate_call
    def post_import_execution_multipart(
        self,
        result: Annotated[Union[Annotated[bytes, Field(strict=True)], Annotated[str, Field(strict=True)], Tuple[str, Annotated[bytes, Field(strict=True)]]], Field(description="The Xray JSON file, same as described in the `POST /import/execution` ([link](https://docs.getxray.app/display/XRAY420/v2.0#/Import/post-import-execution)). This file **must** be of type `application/json`.  <details> <summary>Example 1 (Create new Test Execution issue)</summary>  ``` {   \\\"info\\\": {     \\\"summary\\\": \\\"Execution of automated tests for release v1.3\\\",     \\\"description\\\": \\\"This execution is automatically created when importing execution results from an external source\\\",     \\\"version\\\": \\\"v1.3\\\",     \\\"user\\\": \\\"admin\\\",     \\\"revision\\\": \\\"1.0.42134\\\",     \\\"startDate\\\": \\\"2014-08-30T11:47:35+01:00\\\",     \\\"finishDate\\\": \\\"2014-08-30T11:53:00+01:00\\\",     \\\"testPlanKey\\\": \\\"DEMO-100\\\",     \\\"testEnvironments\\\": [       \\\"iOS\\\",       \\\"Android\\\"     ]   },   \\\"tests\\\": [     {       \\\"testKey\\\": \\\"DEMO-6\\\",       \\\"start\\\": \\\"2014-08-30T11:47:35+01:00\\\",       \\\"finish\\\": \\\"2014-08-30T11:50:56+01:00\\\",       \\\"comment\\\": \\\"Successful execution\\\",       \\\"status\\\": \\\"PASS\\\"     },     {       \\\"testKey\\\": \\\"DEMO-7\\\",       \\\"start\\\": \\\"2014-08-30T11:51:00+01:00\\\",       \\\"finish\\\": \\\"2014-08-30T11:52:30+01:00\\\",       \\\"comment\\\": \\\"Execution failed. Example #5 FAIL.\\\",       \\\"status\\\": \\\"FAIL\\\",       \\\"customFields\\\": [         {           \\\"id\\\": 321,           \\\"value\\\": [             \\\"option A\\\",             \\\"option B\\\"           ]         }       ],       \\\"evidences\\\": [         {           \\\"data\\\": \\\"iVBORw0KGgoAAAANSUhEUgAABkIAAAO9CAYAAADezXv6AAAAEn(...base64 file enconding)\\\",           \\\"filename\\\": \\\"image21.jpg\\\",           \\\"contentType\\\": \\\"image/jpeg\\\"         }       ],       \\\"examples\\\": [         \\\"PASS\\\",         \\\"PASS\\\",         \\\"PASS\\\",         \\\"PASS\\\",         \\\"FAIL\\\"       ],       \\\"steps\\\": [         {           \\\"status\\\": \\\"PASS\\\",           \\\"comment\\\": \\\"Coment on Test Step Result 1\\\",           \\\"evidences\\\": [             {               \\\"data\\\": \\\"iVBORw0KGgoAAAANSUhEUgAABkIAAAO9CAYAAADezXv6AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAEn(...base64 file enconding)\\\",               \\\"filename\\\": \\\"image22.jpg\\\",               \\\"contentType\\\": \\\"image/jpeg\\\"             }           ],           \\\"actualResult\\\": \\\"Actual result on Test Step 1\\\"         }       ],       \\\"defects\\\": [         \\\"DEMO-10\\\",         \\\"DEMO-11\\\"       ]     }   ] } ``` </details>  <details> <summary>Example 2 (Update Existing Test Execution)</summary>  ``` {     \\\"testExecutionKey\\\": \\\"DEMO-1206\\\",     \\\"tests\\\" : [         {             \\\"testKey\\\" : \\\"DEMO-6\\\",             \\\"start\\\" : \\\"2014-08-30T11:47:35+01:00\\\",             \\\"finish\\\" : \\\"2014-08-30T11:50:56+01:00\\\",             \\\"comment\\\" : \\\"Successful execution\\\",             \\\"status\\\" : \\\"PASS\\\"         }      ] } ``` </details>  ")],
        info: Annotated[Union[Annotated[bytes, Field(strict=True)], Annotated[str, Field(strict=True)], Tuple[str, Annotated[bytes, Field(strict=True)]]], Field(description="Should follow the same format as the \\\"fields\\\" part, described in the [official Jira REST API](https://docs.atlassian.com/software/jira/docs/api/REST/latest/#api/2/issue-createIssue). This file **must** be of type `application/json`.  <details> <summary>Example 1 (Fields for a new Test Execution)</summary>  ``` {     \\\"fields\\\": {         \\\"project\\\": {             \\\"id\\\": \\\"10402\\\"         },         \\\"summary\\\": \\\"Brand new Test execution\\\",         \\\"issuetype\\\": {             \\\"id\\\": \\\"10007\\\"         },         \\\"components\\\" : [             {             \\\"name\\\":\\\"Interface\\\"             },             {             \\\"name\\\":\\\"Core\\\"             }         ],         \\\"customfield_10032\\\" : [             \\\"TES-38\\\"         ]     } } ``` </details>  <details> <summary>Example 2 (Fields for updating a Test Execution)</summary>  ``` {     \\\"fields\\\": {         \\\"customfield_10032\\\" : [             \\\"a_label\\\"         ],         \\\"description\\\": \\\"update the issue description\\\"     } } ```  </details>  ")],
        _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,
    ) -> RestApiSuccessResponse:
        """

        Endpoint used to import Test results in the Xray JSON format with Test Execution issue data.  <br></br> Updating an existing Test Run using Xray format REST API will reset all dataset related fields. This means that all current iteration data and dataset present in the Test Run will be replaced with the new information given in the REST API request.

        :param result: The Xray JSON file, same as described in the `POST /import/execution` ([link](https://docs.getxray.app/display/XRAY420/v2.0#/Import/post-import-execution)). This file **must** be of type `application/json`.  <details> <summary>Example 1 (Create new Test Execution issue)</summary>  ``` {   \\\"info\\\": {     \\\"summary\\\": \\\"Execution of automated tests for release v1.3\\\",     \\\"description\\\": \\\"This execution is automatically created when importing execution results from an external source\\\",     \\\"version\\\": \\\"v1.3\\\",     \\\"user\\\": \\\"admin\\\",     \\\"revision\\\": \\\"1.0.42134\\\",     \\\"startDate\\\": \\\"2014-08-30T11:47:35+01:00\\\",     \\\"finishDate\\\": \\\"2014-08-30T11:53:00+01:00\\\",     \\\"testPlanKey\\\": \\\"DEMO-100\\\",     \\\"testEnvironments\\\": [       \\\"iOS\\\",       \\\"Android\\\"     ]   },   \\\"tests\\\": [     {       \\\"testKey\\\": \\\"DEMO-6\\\",       \\\"start\\\": \\\"2014-08-30T11:47:35+01:00\\\",       \\\"finish\\\": \\\"2014-08-30T11:50:56+01:00\\\",       \\\"comment\\\": \\\"Successful execution\\\",       \\\"status\\\": \\\"PASS\\\"     },     {       \\\"testKey\\\": \\\"DEMO-7\\\",       \\\"start\\\": \\\"2014-08-30T11:51:00+01:00\\\",       \\\"finish\\\": \\\"2014-08-30T11:52:30+01:00\\\",       \\\"comment\\\": \\\"Execution failed. Example #5 FAIL.\\\",       \\\"status\\\": \\\"FAIL\\\",       \\\"customFields\\\": [         {           \\\"id\\\": 321,           \\\"value\\\": [             \\\"option A\\\",             \\\"option B\\\"           ]         }       ],       \\\"evidences\\\": [         {           \\\"data\\\": \\\"iVBORw0KGgoAAAANSUhEUgAABkIAAAO9CAYAAADezXv6AAAAEn(...base64 file enconding)\\\",           \\\"filename\\\": \\\"image21.jpg\\\",           \\\"contentType\\\": \\\"image/jpeg\\\"         }       ],       \\\"examples\\\": [         \\\"PASS\\\",         \\\"PASS\\\",         \\\"PASS\\\",         \\\"PASS\\\",         \\\"FAIL\\\"       ],       \\\"steps\\\": [         {           \\\"status\\\": \\\"PASS\\\",           \\\"comment\\\": \\\"Coment on Test Step Result 1\\\",           \\\"evidences\\\": [             {               \\\"data\\\": \\\"iVBORw0KGgoAAAANSUhEUgAABkIAAAO9CAYAAADezXv6AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAEn(...base64 file enconding)\\\",               \\\"filename\\\": \\\"image22.jpg\\\",               \\\"contentType\\\": \\\"image/jpeg\\\"             }           ],           \\\"actualResult\\\": \\\"Actual result on Test Step 1\\\"         }       ],       \\\"defects\\\": [         \\\"DEMO-10\\\",         \\\"DEMO-11\\\"       ]     }   ] } ``` </details>  <details> <summary>Example 2 (Update Existing Test Execution)</summary>  ``` {     \\\"testExecutionKey\\\": \\\"DEMO-1206\\\",     \\\"tests\\\" : [         {             \\\"testKey\\\" : \\\"DEMO-6\\\",             \\\"start\\\" : \\\"2014-08-30T11:47:35+01:00\\\",             \\\"finish\\\" : \\\"2014-08-30T11:50:56+01:00\\\",             \\\"comment\\\" : \\\"Successful execution\\\",             \\\"status\\\" : \\\"PASS\\\"         }      ] } ``` </details>   (required)
        :type result: bytearray
        :param info: Should follow the same format as the \\\"fields\\\" part, described in the [official Jira REST API](https://docs.atlassian.com/software/jira/docs/api/REST/latest/#api/2/issue-createIssue). This file **must** be of type `application/json`.  <details> <summary>Example 1 (Fields for a new Test Execution)</summary>  ``` {     \\\"fields\\\": {         \\\"project\\\": {             \\\"id\\\": \\\"10402\\\"         },         \\\"summary\\\": \\\"Brand new Test execution\\\",         \\\"issuetype\\\": {             \\\"id\\\": \\\"10007\\\"         },         \\\"components\\\" : [             {             \\\"name\\\":\\\"Interface\\\"             },             {             \\\"name\\\":\\\"Core\\\"             }         ],         \\\"customfield_10032\\\" : [             \\\"TES-38\\\"         ]     } } ``` </details>  <details> <summary>Example 2 (Fields for updating a Test Execution)</summary>  ``` {     \\\"fields\\\": {         \\\"customfield_10032\\\" : [             \\\"a_label\\\"         ],         \\\"description\\\": \\\"update the issue description\\\"     } } ```  </details>   (required)
        :type info: bytearray
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._post_import_execution_multipart_serialize(
            result=result,
            info=info,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "RestApiSuccessResponse",
            '400': "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 post_import_execution_multipart_with_http_info(
        self,
        result: Annotated[Union[Annotated[bytes, Field(strict=True)], Annotated[str, Field(strict=True)], Tuple[str, Annotated[bytes, Field(strict=True)]]], Field(description="The Xray JSON file, same as described in the `POST /import/execution` ([link](https://docs.getxray.app/display/XRAY420/v2.0#/Import/post-import-execution)). This file **must** be of type `application/json`.  <details> <summary>Example 1 (Create new Test Execution issue)</summary>  ``` {   \\\"info\\\": {     \\\"summary\\\": \\\"Execution of automated tests for release v1.3\\\",     \\\"description\\\": \\\"This execution is automatically created when importing execution results from an external source\\\",     \\\"version\\\": \\\"v1.3\\\",     \\\"user\\\": \\\"admin\\\",     \\\"revision\\\": \\\"1.0.42134\\\",     \\\"startDate\\\": \\\"2014-08-30T11:47:35+01:00\\\",     \\\"finishDate\\\": \\\"2014-08-30T11:53:00+01:00\\\",     \\\"testPlanKey\\\": \\\"DEMO-100\\\",     \\\"testEnvironments\\\": [       \\\"iOS\\\",       \\\"Android\\\"     ]   },   \\\"tests\\\": [     {       \\\"testKey\\\": \\\"DEMO-6\\\",       \\\"start\\\": \\\"2014-08-30T11:47:35+01:00\\\",       \\\"finish\\\": \\\"2014-08-30T11:50:56+01:00\\\",       \\\"comment\\\": \\\"Successful execution\\\",       \\\"status\\\": \\\"PASS\\\"     },     {       \\\"testKey\\\": \\\"DEMO-7\\\",       \\\"start\\\": \\\"2014-08-30T11:51:00+01:00\\\",       \\\"finish\\\": \\\"2014-08-30T11:52:30+01:00\\\",       \\\"comment\\\": \\\"Execution failed. Example #5 FAIL.\\\",       \\\"status\\\": \\\"FAIL\\\",       \\\"customFields\\\": [         {           \\\"id\\\": 321,           \\\"value\\\": [             \\\"option A\\\",             \\\"option B\\\"           ]         }       ],       \\\"evidences\\\": [         {           \\\"data\\\": \\\"iVBORw0KGgoAAAANSUhEUgAABkIAAAO9CAYAAADezXv6AAAAEn(...base64 file enconding)\\\",           \\\"filename\\\": \\\"image21.jpg\\\",           \\\"contentType\\\": \\\"image/jpeg\\\"         }       ],       \\\"examples\\\": [         \\\"PASS\\\",         \\\"PASS\\\",         \\\"PASS\\\",         \\\"PASS\\\",         \\\"FAIL\\\"       ],       \\\"steps\\\": [         {           \\\"status\\\": \\\"PASS\\\",           \\\"comment\\\": \\\"Coment on Test Step Result 1\\\",           \\\"evidences\\\": [             {               \\\"data\\\": \\\"iVBORw0KGgoAAAANSUhEUgAABkIAAAO9CAYAAADezXv6AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAEn(...base64 file enconding)\\\",               \\\"filename\\\": \\\"image22.jpg\\\",               \\\"contentType\\\": \\\"image/jpeg\\\"             }           ],           \\\"actualResult\\\": \\\"Actual result on Test Step 1\\\"         }       ],       \\\"defects\\\": [         \\\"DEMO-10\\\",         \\\"DEMO-11\\\"       ]     }   ] } ``` </details>  <details> <summary>Example 2 (Update Existing Test Execution)</summary>  ``` {     \\\"testExecutionKey\\\": \\\"DEMO-1206\\\",     \\\"tests\\\" : [         {             \\\"testKey\\\" : \\\"DEMO-6\\\",             \\\"start\\\" : \\\"2014-08-30T11:47:35+01:00\\\",             \\\"finish\\\" : \\\"2014-08-30T11:50:56+01:00\\\",             \\\"comment\\\" : \\\"Successful execution\\\",             \\\"status\\\" : \\\"PASS\\\"         }      ] } ``` </details>  ")],
        info: Annotated[Union[Annotated[bytes, Field(strict=True)], Annotated[str, Field(strict=True)], Tuple[str, Annotated[bytes, Field(strict=True)]]], Field(description="Should follow the same format as the \\\"fields\\\" part, described in the [official Jira REST API](https://docs.atlassian.com/software/jira/docs/api/REST/latest/#api/2/issue-createIssue). This file **must** be of type `application/json`.  <details> <summary>Example 1 (Fields for a new Test Execution)</summary>  ``` {     \\\"fields\\\": {         \\\"project\\\": {             \\\"id\\\": \\\"10402\\\"         },         \\\"summary\\\": \\\"Brand new Test execution\\\",         \\\"issuetype\\\": {             \\\"id\\\": \\\"10007\\\"         },         \\\"components\\\" : [             {             \\\"name\\\":\\\"Interface\\\"             },             {             \\\"name\\\":\\\"Core\\\"             }         ],         \\\"customfield_10032\\\" : [             \\\"TES-38\\\"         ]     } } ``` </details>  <details> <summary>Example 2 (Fields for updating a Test Execution)</summary>  ``` {     \\\"fields\\\": {         \\\"customfield_10032\\\" : [             \\\"a_label\\\"         ],         \\\"description\\\": \\\"update the issue description\\\"     } } ```  </details>  ")],
        _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[RestApiSuccessResponse]:
        """

        Endpoint used to import Test results in the Xray JSON format with Test Execution issue data.  <br></br> Updating an existing Test Run using Xray format REST API will reset all dataset related fields. This means that all current iteration data and dataset present in the Test Run will be replaced with the new information given in the REST API request.

        :param result: The Xray JSON file, same as described in the `POST /import/execution` ([link](https://docs.getxray.app/display/XRAY420/v2.0#/Import/post-import-execution)). This file **must** be of type `application/json`.  <details> <summary>Example 1 (Create new Test Execution issue)</summary>  ``` {   \\\"info\\\": {     \\\"summary\\\": \\\"Execution of automated tests for release v1.3\\\",     \\\"description\\\": \\\"This execution is automatically created when importing execution results from an external source\\\",     \\\"version\\\": \\\"v1.3\\\",     \\\"user\\\": \\\"admin\\\",     \\\"revision\\\": \\\"1.0.42134\\\",     \\\"startDate\\\": \\\"2014-08-30T11:47:35+01:00\\\",     \\\"finishDate\\\": \\\"2014-08-30T11:53:00+01:00\\\",     \\\"testPlanKey\\\": \\\"DEMO-100\\\",     \\\"testEnvironments\\\": [       \\\"iOS\\\",       \\\"Android\\\"     ]   },   \\\"tests\\\": [     {       \\\"testKey\\\": \\\"DEMO-6\\\",       \\\"start\\\": \\\"2014-08-30T11:47:35+01:00\\\",       \\\"finish\\\": \\\"2014-08-30T11:50:56+01:00\\\",       \\\"comment\\\": \\\"Successful execution\\\",       \\\"status\\\": \\\"PASS\\\"     },     {       \\\"testKey\\\": \\\"DEMO-7\\\",       \\\"start\\\": \\\"2014-08-30T11:51:00+01:00\\\",       \\\"finish\\\": \\\"2014-08-30T11:52:30+01:00\\\",       \\\"comment\\\": \\\"Execution failed. Example #5 FAIL.\\\",       \\\"status\\\": \\\"FAIL\\\",       \\\"customFields\\\": [         {           \\\"id\\\": 321,           \\\"value\\\": [             \\\"option A\\\",             \\\"option B\\\"           ]         }       ],       \\\"evidences\\\": [         {           \\\"data\\\": \\\"iVBORw0KGgoAAAANSUhEUgAABkIAAAO9CAYAAADezXv6AAAAEn(...base64 file enconding)\\\",           \\\"filename\\\": \\\"image21.jpg\\\",           \\\"contentType\\\": \\\"image/jpeg\\\"         }       ],       \\\"examples\\\": [         \\\"PASS\\\",         \\\"PASS\\\",         \\\"PASS\\\",         \\\"PASS\\\",         \\\"FAIL\\\"       ],       \\\"steps\\\": [         {           \\\"status\\\": \\\"PASS\\\",           \\\"comment\\\": \\\"Coment on Test Step Result 1\\\",           \\\"evidences\\\": [             {               \\\"data\\\": \\\"iVBORw0KGgoAAAANSUhEUgAABkIAAAO9CAYAAADezXv6AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAEn(...base64 file enconding)\\\",               \\\"filename\\\": \\\"image22.jpg\\\",               \\\"contentType\\\": \\\"image/jpeg\\\"             }           ],           \\\"actualResult\\\": \\\"Actual result on Test Step 1\\\"         }       ],       \\\"defects\\\": [         \\\"DEMO-10\\\",         \\\"DEMO-11\\\"       ]     }   ] } ``` </details>  <details> <summary>Example 2 (Update Existing Test Execution)</summary>  ``` {     \\\"testExecutionKey\\\": \\\"DEMO-1206\\\",     \\\"tests\\\" : [         {             \\\"testKey\\\" : \\\"DEMO-6\\\",             \\\"start\\\" : \\\"2014-08-30T11:47:35+01:00\\\",             \\\"finish\\\" : \\\"2014-08-30T11:50:56+01:00\\\",             \\\"comment\\\" : \\\"Successful execution\\\",             \\\"status\\\" : \\\"PASS\\\"         }      ] } ``` </details>   (required)
        :type result: bytearray
        :param info: Should follow the same format as the \\\"fields\\\" part, described in the [official Jira REST API](https://docs.atlassian.com/software/jira/docs/api/REST/latest/#api/2/issue-createIssue). This file **must** be of type `application/json`.  <details> <summary>Example 1 (Fields for a new Test Execution)</summary>  ``` {     \\\"fields\\\": {         \\\"project\\\": {             \\\"id\\\": \\\"10402\\\"         },         \\\"summary\\\": \\\"Brand new Test execution\\\",         \\\"issuetype\\\": {             \\\"id\\\": \\\"10007\\\"         },         \\\"components\\\" : [             {             \\\"name\\\":\\\"Interface\\\"             },             {             \\\"name\\\":\\\"Core\\\"             }         ],         \\\"customfield_10032\\\" : [             \\\"TES-38\\\"         ]     } } ``` </details>  <details> <summary>Example 2 (Fields for updating a Test Execution)</summary>  ``` {     \\\"fields\\\": {         \\\"customfield_10032\\\" : [             \\\"a_label\\\"         ],         \\\"description\\\": \\\"update the issue description\\\"     } } ```  </details>   (required)
        :type info: bytearray
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._post_import_execution_multipart_serialize(
            result=result,
            info=info,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

        _response_types_map: Dict[str, Optional[str]] = {
            '200': "RestApiSuccessResponse",
            '400': "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 post_import_execution_multipart_without_preload_content(
        self,
        result: Annotated[Union[Annotated[bytes, Field(strict=True)], Annotated[str, Field(strict=True)], Tuple[str, Annotated[bytes, Field(strict=True)]]], Field(description="The Xray JSON file, same as described in the `POST /import/execution` ([link](https://docs.getxray.app/display/XRAY420/v2.0#/Import/post-import-execution)). This file **must** be of type `application/json`.  <details> <summary>Example 1 (Create new Test Execution issue)</summary>  ``` {   \\\"info\\\": {     \\\"summary\\\": \\\"Execution of automated tests for release v1.3\\\",     \\\"description\\\": \\\"This execution is automatically created when importing execution results from an external source\\\",     \\\"version\\\": \\\"v1.3\\\",     \\\"user\\\": \\\"admin\\\",     \\\"revision\\\": \\\"1.0.42134\\\",     \\\"startDate\\\": \\\"2014-08-30T11:47:35+01:00\\\",     \\\"finishDate\\\": \\\"2014-08-30T11:53:00+01:00\\\",     \\\"testPlanKey\\\": \\\"DEMO-100\\\",     \\\"testEnvironments\\\": [       \\\"iOS\\\",       \\\"Android\\\"     ]   },   \\\"tests\\\": [     {       \\\"testKey\\\": \\\"DEMO-6\\\",       \\\"start\\\": \\\"2014-08-30T11:47:35+01:00\\\",       \\\"finish\\\": \\\"2014-08-30T11:50:56+01:00\\\",       \\\"comment\\\": \\\"Successful execution\\\",       \\\"status\\\": \\\"PASS\\\"     },     {       \\\"testKey\\\": \\\"DEMO-7\\\",       \\\"start\\\": \\\"2014-08-30T11:51:00+01:00\\\",       \\\"finish\\\": \\\"2014-08-30T11:52:30+01:00\\\",       \\\"comment\\\": \\\"Execution failed. Example #5 FAIL.\\\",       \\\"status\\\": \\\"FAIL\\\",       \\\"customFields\\\": [         {           \\\"id\\\": 321,           \\\"value\\\": [             \\\"option A\\\",             \\\"option B\\\"           ]         }       ],       \\\"evidences\\\": [         {           \\\"data\\\": \\\"iVBORw0KGgoAAAANSUhEUgAABkIAAAO9CAYAAADezXv6AAAAEn(...base64 file enconding)\\\",           \\\"filename\\\": \\\"image21.jpg\\\",           \\\"contentType\\\": \\\"image/jpeg\\\"         }       ],       \\\"examples\\\": [         \\\"PASS\\\",         \\\"PASS\\\",         \\\"PASS\\\",         \\\"PASS\\\",         \\\"FAIL\\\"       ],       \\\"steps\\\": [         {           \\\"status\\\": \\\"PASS\\\",           \\\"comment\\\": \\\"Coment on Test Step Result 1\\\",           \\\"evidences\\\": [             {               \\\"data\\\": \\\"iVBORw0KGgoAAAANSUhEUgAABkIAAAO9CAYAAADezXv6AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAEn(...base64 file enconding)\\\",               \\\"filename\\\": \\\"image22.jpg\\\",               \\\"contentType\\\": \\\"image/jpeg\\\"             }           ],           \\\"actualResult\\\": \\\"Actual result on Test Step 1\\\"         }       ],       \\\"defects\\\": [         \\\"DEMO-10\\\",         \\\"DEMO-11\\\"       ]     }   ] } ``` </details>  <details> <summary>Example 2 (Update Existing Test Execution)</summary>  ``` {     \\\"testExecutionKey\\\": \\\"DEMO-1206\\\",     \\\"tests\\\" : [         {             \\\"testKey\\\" : \\\"DEMO-6\\\",             \\\"start\\\" : \\\"2014-08-30T11:47:35+01:00\\\",             \\\"finish\\\" : \\\"2014-08-30T11:50:56+01:00\\\",             \\\"comment\\\" : \\\"Successful execution\\\",             \\\"status\\\" : \\\"PASS\\\"         }      ] } ``` </details>  ")],
        info: Annotated[Union[Annotated[bytes, Field(strict=True)], Annotated[str, Field(strict=True)], Tuple[str, Annotated[bytes, Field(strict=True)]]], Field(description="Should follow the same format as the \\\"fields\\\" part, described in the [official Jira REST API](https://docs.atlassian.com/software/jira/docs/api/REST/latest/#api/2/issue-createIssue). This file **must** be of type `application/json`.  <details> <summary>Example 1 (Fields for a new Test Execution)</summary>  ``` {     \\\"fields\\\": {         \\\"project\\\": {             \\\"id\\\": \\\"10402\\\"         },         \\\"summary\\\": \\\"Brand new Test execution\\\",         \\\"issuetype\\\": {             \\\"id\\\": \\\"10007\\\"         },         \\\"components\\\" : [             {             \\\"name\\\":\\\"Interface\\\"             },             {             \\\"name\\\":\\\"Core\\\"             }         ],         \\\"customfield_10032\\\" : [             \\\"TES-38\\\"         ]     } } ``` </details>  <details> <summary>Example 2 (Fields for updating a Test Execution)</summary>  ``` {     \\\"fields\\\": {         \\\"customfield_10032\\\" : [             \\\"a_label\\\"         ],         \\\"description\\\": \\\"update the issue description\\\"     } } ```  </details>  ")],
        _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:
        """

        Endpoint used to import Test results in the Xray JSON format with Test Execution issue data.  <br></br> Updating an existing Test Run using Xray format REST API will reset all dataset related fields. This means that all current iteration data and dataset present in the Test Run will be replaced with the new information given in the REST API request.

        :param result: The Xray JSON file, same as described in the `POST /import/execution` ([link](https://docs.getxray.app/display/XRAY420/v2.0#/Import/post-import-execution)). This file **must** be of type `application/json`.  <details> <summary>Example 1 (Create new Test Execution issue)</summary>  ``` {   \\\"info\\\": {     \\\"summary\\\": \\\"Execution of automated tests for release v1.3\\\",     \\\"description\\\": \\\"This execution is automatically created when importing execution results from an external source\\\",     \\\"version\\\": \\\"v1.3\\\",     \\\"user\\\": \\\"admin\\\",     \\\"revision\\\": \\\"1.0.42134\\\",     \\\"startDate\\\": \\\"2014-08-30T11:47:35+01:00\\\",     \\\"finishDate\\\": \\\"2014-08-30T11:53:00+01:00\\\",     \\\"testPlanKey\\\": \\\"DEMO-100\\\",     \\\"testEnvironments\\\": [       \\\"iOS\\\",       \\\"Android\\\"     ]   },   \\\"tests\\\": [     {       \\\"testKey\\\": \\\"DEMO-6\\\",       \\\"start\\\": \\\"2014-08-30T11:47:35+01:00\\\",       \\\"finish\\\": \\\"2014-08-30T11:50:56+01:00\\\",       \\\"comment\\\": \\\"Successful execution\\\",       \\\"status\\\": \\\"PASS\\\"     },     {       \\\"testKey\\\": \\\"DEMO-7\\\",       \\\"start\\\": \\\"2014-08-30T11:51:00+01:00\\\",       \\\"finish\\\": \\\"2014-08-30T11:52:30+01:00\\\",       \\\"comment\\\": \\\"Execution failed. Example #5 FAIL.\\\",       \\\"status\\\": \\\"FAIL\\\",       \\\"customFields\\\": [         {           \\\"id\\\": 321,           \\\"value\\\": [             \\\"option A\\\",             \\\"option B\\\"           ]         }       ],       \\\"evidences\\\": [         {           \\\"data\\\": \\\"iVBORw0KGgoAAAANSUhEUgAABkIAAAO9CAYAAADezXv6AAAAEn(...base64 file enconding)\\\",           \\\"filename\\\": \\\"image21.jpg\\\",           \\\"contentType\\\": \\\"image/jpeg\\\"         }       ],       \\\"examples\\\": [         \\\"PASS\\\",         \\\"PASS\\\",         \\\"PASS\\\",         \\\"PASS\\\",         \\\"FAIL\\\"       ],       \\\"steps\\\": [         {           \\\"status\\\": \\\"PASS\\\",           \\\"comment\\\": \\\"Coment on Test Step Result 1\\\",           \\\"evidences\\\": [             {               \\\"data\\\": \\\"iVBORw0KGgoAAAANSUhEUgAABkIAAAO9CAYAAADezXv6AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAEn(...base64 file enconding)\\\",               \\\"filename\\\": \\\"image22.jpg\\\",               \\\"contentType\\\": \\\"image/jpeg\\\"             }           ],           \\\"actualResult\\\": \\\"Actual result on Test Step 1\\\"         }       ],       \\\"defects\\\": [         \\\"DEMO-10\\\",         \\\"DEMO-11\\\"       ]     }   ] } ``` </details>  <details> <summary>Example 2 (Update Existing Test Execution)</summary>  ``` {     \\\"testExecutionKey\\\": \\\"DEMO-1206\\\",     \\\"tests\\\" : [         {             \\\"testKey\\\" : \\\"DEMO-6\\\",             \\\"start\\\" : \\\"2014-08-30T11:47:35+01:00\\\",             \\\"finish\\\" : \\\"2014-08-30T11:50:56+01:00\\\",             \\\"comment\\\" : \\\"Successful execution\\\",             \\\"status\\\" : \\\"PASS\\\"         }      ] } ``` </details>   (required)
        :type result: bytearray
        :param info: Should follow the same format as the \\\"fields\\\" part, described in the [official Jira REST API](https://docs.atlassian.com/software/jira/docs/api/REST/latest/#api/2/issue-createIssue). This file **must** be of type `application/json`.  <details> <summary>Example 1 (Fields for a new Test Execution)</summary>  ``` {     \\\"fields\\\": {         \\\"project\\\": {             \\\"id\\\": \\\"10402\\\"         },         \\\"summary\\\": \\\"Brand new Test execution\\\",         \\\"issuetype\\\": {             \\\"id\\\": \\\"10007\\\"         },         \\\"components\\\" : [             {             \\\"name\\\":\\\"Interface\\\"             },             {             \\\"name\\\":\\\"Core\\\"             }         ],         \\\"customfield_10032\\\" : [             \\\"TES-38\\\"         ]     } } ``` </details>  <details> <summary>Example 2 (Fields for updating a Test Execution)</summary>  ``` {     \\\"fields\\\": {         \\\"customfield_10032\\\" : [             \\\"a_label\\\"         ],         \\\"description\\\": \\\"update the issue description\\\"     } } ```  </details>   (required)
        :type info: bytearray
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :type _request_timeout: int, tuple(int, int), optional
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the
                              authentication in the spec for a single request.
        :type _request_auth: dict, optional
        :param _content_type: force content-type for the request.
        :type _content_type: str, Optional
        :param _headers: set to override the headers for a single
                         request; this effectively ignores the headers
                         in the spec for a single request.
        :type _headers: dict, optional
        :param _host_index: set to override the host_index for a single
                            request; this effectively ignores the host_index
                            in the spec for a single request.
        :type _host_index: int, optional
        :return: Returns the result object.
        """ # noqa: E501

        _param = self._post_import_execution_multipart_serialize(
            result=result,
            info=info,
            _request_auth=_request_auth,
            _content_type=_content_type,
            _headers=_headers,
            _host_index=_host_index
        )

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


    def _post_import_execution_multipart_serialize(
        self,
        result,
        info,
        _request_auth,
        _content_type,
        _headers,
        _host_index,
    ) -> RequestSerialized:

        _host = None

        _collection_formats: Dict[str, str] = {
        }

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

        # process the path parameters
        # process the query parameters
        # process the header parameters
        # process the form parameters
        if result is not None:
            _files['result'] = result
        if info is not None:
            _files['info'] = info
        # 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'
                ]
            )

        # 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(
                    [
                        'multipart/form-data'
                    ]
                )
            )
            if _default_content_type is not None:
                _header_params['Content-Type'] = _default_content_type

        # authentication setting
        _auth_settings: List[str] = [
            'BasicAuth', 
            'bearerAuth'
        ]

        return self.api_client.param_serialize(
            method='POST',
            resource_path='/1.0/api/import/execution/multipart',
            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
        )


