# coding: utf-8

"""
    asset-lake-api-server

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

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

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


import io
import re  # noqa: F401
import warnings
from typing import Optional

from pydantic.v1 import (
    StrictBool,
    StrictInt,
    StrictStr,
    ValidationError,
    validate_arguments,
)

from clients.asset_lake.api_client import ApiClient
from clients.asset_lake.api_response import ApiResponse
from clients.asset_lake.exceptions import ApiTypeError, ApiValueError  # noqa: F401
from clients.asset_lake.models.asset_type import AssetType
from clients.asset_lake.models.base_engine import BaseEngine
from clients.asset_lake.models.complete_asset_upload_request import (
    CompleteAssetUploadRequest,
)
from clients.asset_lake.models.complete_asset_upload_response import (
    CompleteAssetUploadResponse,
)
from clients.asset_lake.models.create_asset_request import CreateAssetRequest
from clients.asset_lake.models.create_asset_response import CreateAssetResponse
from clients.asset_lake.models.data_type import DataType
from clients.asset_lake.models.delete_asset_response import DeleteAssetResponse
from clients.asset_lake.models.list_assets_response import ListAssetsResponse
from clients.asset_lake.models.retrieve_asset_response import RetrieveAssetResponse
from clients.asset_lake.models.transfer_api_type import TransferApiType


class AssetsApi:
    """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_arguments
    def complete_asset_upload_v1_assets_asset_id_complete_upload_post(
        self,
        asset_id: StrictStr,
        complete_asset_upload_request: CompleteAssetUploadRequest,
        **kwargs
    ) -> CompleteAssetUploadResponse:  # noqa: E501
        """Complete Asset Upload  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.complete_asset_upload_v1_assets_asset_id_complete_upload_post(asset_id, complete_asset_upload_request, async_req=True)
        >>> result = thread.get()

        :param asset_id: (required)
        :type asset_id: str
        :param complete_asset_upload_request: (required)
        :type complete_asset_upload_request: CompleteAssetUploadRequest
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :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.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: CompleteAssetUploadResponse
        """
        kwargs["_return_http_data_only"] = True
        if "_preload_content" in kwargs:
            message = "Error! Please call the complete_asset_upload_v1_assets_asset_id_complete_upload_post_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data"  # noqa: E501
            raise ValueError(message)
        return self.complete_asset_upload_v1_assets_asset_id_complete_upload_post_with_http_info(
            asset_id, complete_asset_upload_request, **kwargs
        )  # noqa: E501

    @validate_arguments
    def complete_asset_upload_v1_assets_asset_id_complete_upload_post_with_http_info(
        self,
        asset_id: StrictStr,
        complete_asset_upload_request: CompleteAssetUploadRequest,
        **kwargs
    ) -> ApiResponse:  # noqa: E501
        """Complete Asset Upload  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.complete_asset_upload_v1_assets_asset_id_complete_upload_post_with_http_info(asset_id, complete_asset_upload_request, async_req=True)
        >>> result = thread.get()

        :param asset_id: (required)
        :type asset_id: str
        :param complete_asset_upload_request: (required)
        :type complete_asset_upload_request: CompleteAssetUploadRequest
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the ApiResponse.data will
                                 be set to none and raw_data will store the
                                 HTTP response body without reading/decoding.
                                 Default is True.
        :type _preload_content: bool, optional
        :param _return_http_data_only: response data instead of ApiResponse
                                       object with status code, headers, etc
        :type _return_http_data_only: bool, optional
        :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.
        :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
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(CompleteAssetUploadResponse, status_code(int), headers(HTTPHeaderDict))
        """

        _params = locals()

        _all_params = ["asset_id", "complete_asset_upload_request"]
        _all_params.extend(
            [
                "async_req",
                "_return_http_data_only",
                "_preload_content",
                "_request_timeout",
                "_request_auth",
                "_content_type",
                "_headers",
            ]
        )

        # validate the arguments
        for _key, _val in _params["kwargs"].items():
            if _key not in _all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method complete_asset_upload_v1_assets_asset_id_complete_upload_post"
                    % _key
                )
            _params[_key] = _val
        del _params["kwargs"]

        _collection_formats = {}

        # process the path parameters
        _path_params = {}
        if _params["asset_id"]:
            _path_params["asset_id"] = _params["asset_id"]

        # process the query parameters
        _query_params = []
        # process the header parameters
        _header_params = dict(_params.get("_headers", {}))
        # process the form parameters
        _form_params = []
        _files = {}
        # process the body parameter
        _body_params = None
        if _params["complete_asset_upload_request"] is not None:
            _body_params = _params["complete_asset_upload_request"]

        # set the HTTP header `Accept`
        _header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json"]
        )  # noqa: E501

        # set the HTTP header `Content-Type`
        _content_types_list = _params.get(
            "_content_type",
            self.api_client.select_header_content_type(["application/json"]),
        )
        if _content_types_list:
            _header_params["Content-Type"] = _content_types_list

        # authentication setting
        _auth_settings = []  # noqa: E501

        _response_types_map = {
            "200": "CompleteAssetUploadResponse",
            "422": "HTTPValidationError",
        }

        return self.api_client.call_api(
            "/v1/assets/{asset_id}/complete-upload",
            "POST",
            _path_params,
            _query_params,
            _header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            response_types_map=_response_types_map,
            auth_settings=_auth_settings,
            async_req=_params.get("async_req"),
            _return_http_data_only=_params.get("_return_http_data_only"),  # noqa: E501
            _preload_content=_params.get("_preload_content", True),
            _request_timeout=_params.get("_request_timeout"),
            collection_formats=_collection_formats,
            _request_auth=_params.get("_request_auth"),
        )

    @validate_arguments
    def create_asset_v1_assets_post(
        self, create_asset_request: CreateAssetRequest, **kwargs
    ) -> CreateAssetResponse:  # noqa: E501
        """Create Asset  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.create_asset_v1_assets_post(create_asset_request, async_req=True)
        >>> result = thread.get()

        :param create_asset_request: (required)
        :type create_asset_request: CreateAssetRequest
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :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.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: CreateAssetResponse
        """
        kwargs["_return_http_data_only"] = True
        if "_preload_content" in kwargs:
            message = "Error! Please call the create_asset_v1_assets_post_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data"  # noqa: E501
            raise ValueError(message)
        return self.create_asset_v1_assets_post_with_http_info(
            create_asset_request, **kwargs
        )  # noqa: E501

    @validate_arguments
    def create_asset_v1_assets_post_with_http_info(
        self, create_asset_request: CreateAssetRequest, **kwargs
    ) -> ApiResponse:  # noqa: E501
        """Create Asset  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.create_asset_v1_assets_post_with_http_info(create_asset_request, async_req=True)
        >>> result = thread.get()

        :param create_asset_request: (required)
        :type create_asset_request: CreateAssetRequest
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the ApiResponse.data will
                                 be set to none and raw_data will store the
                                 HTTP response body without reading/decoding.
                                 Default is True.
        :type _preload_content: bool, optional
        :param _return_http_data_only: response data instead of ApiResponse
                                       object with status code, headers, etc
        :type _return_http_data_only: bool, optional
        :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.
        :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
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(CreateAssetResponse, status_code(int), headers(HTTPHeaderDict))
        """

        _params = locals()

        _all_params = ["create_asset_request"]
        _all_params.extend(
            [
                "async_req",
                "_return_http_data_only",
                "_preload_content",
                "_request_timeout",
                "_request_auth",
                "_content_type",
                "_headers",
            ]
        )

        # validate the arguments
        for _key, _val in _params["kwargs"].items():
            if _key not in _all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method create_asset_v1_assets_post" % _key
                )
            _params[_key] = _val
        del _params["kwargs"]

        _collection_formats = {}

        # process the path parameters
        _path_params = {}

        # process the query parameters
        _query_params = []
        # process the header parameters
        _header_params = dict(_params.get("_headers", {}))
        # process the form parameters
        _form_params = []
        _files = {}
        # process the body parameter
        _body_params = None
        if _params["create_asset_request"] is not None:
            _body_params = _params["create_asset_request"]

        # set the HTTP header `Accept`
        _header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json"]
        )  # noqa: E501

        # set the HTTP header `Content-Type`
        _content_types_list = _params.get(
            "_content_type",
            self.api_client.select_header_content_type(["application/json"]),
        )
        if _content_types_list:
            _header_params["Content-Type"] = _content_types_list

        # authentication setting
        _auth_settings = []  # noqa: E501

        _response_types_map = {
            "200": "CreateAssetResponse",
            "422": "HTTPValidationError",
        }

        return self.api_client.call_api(
            "/v1/assets",
            "POST",
            _path_params,
            _query_params,
            _header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            response_types_map=_response_types_map,
            auth_settings=_auth_settings,
            async_req=_params.get("async_req"),
            _return_http_data_only=_params.get("_return_http_data_only"),  # noqa: E501
            _preload_content=_params.get("_preload_content", True),
            _request_timeout=_params.get("_request_timeout"),
            collection_formats=_collection_formats,
            _request_auth=_params.get("_request_auth"),
        )

    @validate_arguments
    def delete_asset_v1_assets_asset_id_delete(
        self, asset_id: StrictStr, **kwargs
    ) -> DeleteAssetResponse:  # noqa: E501
        """Delete Asset  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.delete_asset_v1_assets_asset_id_delete(asset_id, async_req=True)
        >>> result = thread.get()

        :param asset_id: (required)
        :type asset_id: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :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.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: DeleteAssetResponse
        """
        kwargs["_return_http_data_only"] = True
        if "_preload_content" in kwargs:
            message = "Error! Please call the delete_asset_v1_assets_asset_id_delete_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data"  # noqa: E501
            raise ValueError(message)
        return self.delete_asset_v1_assets_asset_id_delete_with_http_info(
            asset_id, **kwargs
        )  # noqa: E501

    @validate_arguments
    def delete_asset_v1_assets_asset_id_delete_with_http_info(
        self, asset_id: StrictStr, **kwargs
    ) -> ApiResponse:  # noqa: E501
        """Delete Asset  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.delete_asset_v1_assets_asset_id_delete_with_http_info(asset_id, async_req=True)
        >>> result = thread.get()

        :param asset_id: (required)
        :type asset_id: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the ApiResponse.data will
                                 be set to none and raw_data will store the
                                 HTTP response body without reading/decoding.
                                 Default is True.
        :type _preload_content: bool, optional
        :param _return_http_data_only: response data instead of ApiResponse
                                       object with status code, headers, etc
        :type _return_http_data_only: bool, optional
        :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.
        :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
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(DeleteAssetResponse, status_code(int), headers(HTTPHeaderDict))
        """

        _params = locals()

        _all_params = ["asset_id"]
        _all_params.extend(
            [
                "async_req",
                "_return_http_data_only",
                "_preload_content",
                "_request_timeout",
                "_request_auth",
                "_content_type",
                "_headers",
            ]
        )

        # validate the arguments
        for _key, _val in _params["kwargs"].items():
            if _key not in _all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method delete_asset_v1_assets_asset_id_delete" % _key
                )
            _params[_key] = _val
        del _params["kwargs"]

        _collection_formats = {}

        # process the path parameters
        _path_params = {}
        if _params["asset_id"]:
            _path_params["asset_id"] = _params["asset_id"]

        # process the query parameters
        _query_params = []
        # process the header parameters
        _header_params = dict(_params.get("_headers", {}))
        # process the form parameters
        _form_params = []
        _files = {}
        # process the body parameter
        _body_params = None
        # set the HTTP header `Accept`
        _header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json"]
        )  # noqa: E501

        # authentication setting
        _auth_settings = []  # noqa: E501

        _response_types_map = {
            "200": "DeleteAssetResponse",
            "422": "HTTPValidationError",
        }

        return self.api_client.call_api(
            "/v1/assets/{asset_id}",
            "DELETE",
            _path_params,
            _query_params,
            _header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            response_types_map=_response_types_map,
            auth_settings=_auth_settings,
            async_req=_params.get("async_req"),
            _return_http_data_only=_params.get("_return_http_data_only"),  # noqa: E501
            _preload_content=_params.get("_preload_content", True),
            _request_timeout=_params.get("_request_timeout"),
            collection_formats=_collection_formats,
            _request_auth=_params.get("_request_auth"),
        )

    @validate_arguments
    def list_assets_v1_assets_get(
        self,
        name: Optional[StrictStr] = None,
        is_public: Optional[StrictBool] = None,
        data_type: Optional[DataType] = None,
        asset_type: Optional[AssetType] = None,
        engine: Optional[BaseEngine] = None,
        limit: Optional[StrictInt] = None,
        offset: Optional[StrictInt] = None,
        owner: Optional[StrictStr] = None,
        asset_id: Optional[StrictStr] = None,
        **kwargs
    ) -> ListAssetsResponse:  # noqa: E501
        """List Assets  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.list_assets_v1_assets_get(name, is_public, data_type, asset_type, engine, limit, offset, owner, asset_id, async_req=True)
        >>> result = thread.get()

        :param name:
        :type name: str
        :param is_public:
        :type is_public: bool
        :param data_type:
        :type data_type: DataType
        :param asset_type:
        :type asset_type: AssetType
        :param engine:
        :type engine: BaseEngine
        :param limit:
        :type limit: int
        :param offset:
        :type offset: int
        :param owner:
        :type owner: str
        :param asset_id:
        :type asset_id: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :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.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: ListAssetsResponse
        """
        kwargs["_return_http_data_only"] = True
        if "_preload_content" in kwargs:
            message = "Error! Please call the list_assets_v1_assets_get_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data"  # noqa: E501
            raise ValueError(message)
        return self.list_assets_v1_assets_get_with_http_info(
            name,
            is_public,
            data_type,
            asset_type,
            engine,
            limit,
            offset,
            owner,
            asset_id,
            **kwargs
        )  # noqa: E501

    @validate_arguments
    def list_assets_v1_assets_get_with_http_info(
        self,
        name: Optional[StrictStr] = None,
        is_public: Optional[StrictBool] = None,
        data_type: Optional[DataType] = None,
        asset_type: Optional[AssetType] = None,
        engine: Optional[BaseEngine] = None,
        limit: Optional[StrictInt] = None,
        offset: Optional[StrictInt] = None,
        owner: Optional[StrictStr] = None,
        asset_id: Optional[StrictStr] = None,
        **kwargs
    ) -> ApiResponse:  # noqa: E501
        """List Assets  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.list_assets_v1_assets_get_with_http_info(name, is_public, data_type, asset_type, engine, limit, offset, owner, asset_id, async_req=True)
        >>> result = thread.get()

        :param name:
        :type name: str
        :param is_public:
        :type is_public: bool
        :param data_type:
        :type data_type: DataType
        :param asset_type:
        :type asset_type: AssetType
        :param engine:
        :type engine: BaseEngine
        :param limit:
        :type limit: int
        :param offset:
        :type offset: int
        :param owner:
        :type owner: str
        :param asset_id:
        :type asset_id: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the ApiResponse.data will
                                 be set to none and raw_data will store the
                                 HTTP response body without reading/decoding.
                                 Default is True.
        :type _preload_content: bool, optional
        :param _return_http_data_only: response data instead of ApiResponse
                                       object with status code, headers, etc
        :type _return_http_data_only: bool, optional
        :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.
        :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
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(ListAssetsResponse, status_code(int), headers(HTTPHeaderDict))
        """

        _params = locals()

        _all_params = [
            "name",
            "is_public",
            "data_type",
            "asset_type",
            "engine",
            "limit",
            "offset",
            "owner",
            "asset_id",
        ]
        _all_params.extend(
            [
                "async_req",
                "_return_http_data_only",
                "_preload_content",
                "_request_timeout",
                "_request_auth",
                "_content_type",
                "_headers",
            ]
        )

        # validate the arguments
        for _key, _val in _params["kwargs"].items():
            if _key not in _all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method list_assets_v1_assets_get" % _key
                )
            _params[_key] = _val
        del _params["kwargs"]

        _collection_formats = {}

        # process the path parameters
        _path_params = {}

        # process the query parameters
        _query_params = []
        if _params.get("name") is not None:  # noqa: E501
            _query_params.append(("name", _params["name"]))

        if _params.get("is_public") is not None:  # noqa: E501
            _query_params.append(("is_public", _params["is_public"]))

        if _params.get("data_type") is not None:  # noqa: E501
            _query_params.append(("data_type", _params["data_type"].value))

        if _params.get("asset_type") is not None:  # noqa: E501
            _query_params.append(("asset_type", _params["asset_type"].value))

        if _params.get("engine") is not None:  # noqa: E501
            _query_params.append(("engine", _params["engine"].value))

        if _params.get("limit") is not None:  # noqa: E501
            _query_params.append(("limit", _params["limit"]))

        if _params.get("offset") is not None:  # noqa: E501
            _query_params.append(("offset", _params["offset"]))

        if _params.get("owner") is not None:  # noqa: E501
            _query_params.append(("owner", _params["owner"]))

        if _params.get("asset_id") is not None:  # noqa: E501
            _query_params.append(("asset_id", _params["asset_id"]))

        # process the header parameters
        _header_params = dict(_params.get("_headers", {}))
        # process the form parameters
        _form_params = []
        _files = {}
        # process the body parameter
        _body_params = None
        # set the HTTP header `Accept`
        _header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json"]
        )  # noqa: E501

        # authentication setting
        _auth_settings = []  # noqa: E501

        _response_types_map = {
            "200": "ListAssetsResponse",
            "422": "HTTPValidationError",
        }

        return self.api_client.call_api(
            "/v1/assets",
            "GET",
            _path_params,
            _query_params,
            _header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            response_types_map=_response_types_map,
            auth_settings=_auth_settings,
            async_req=_params.get("async_req"),
            _return_http_data_only=_params.get("_return_http_data_only"),  # noqa: E501
            _preload_content=_params.get("_preload_content", True),
            _request_timeout=_params.get("_request_timeout"),
            collection_formats=_collection_formats,
            _request_auth=_params.get("_request_auth"),
        )

    @validate_arguments
    def retrieve_asset_v1_assets_asset_owner_and_name_or_id_get(
        self,
        asset_owner_and_name_or_id: StrictStr,
        transfer_api_type: Optional[TransferApiType] = None,
        **kwargs
    ) -> RetrieveAssetResponse:  # noqa: E501
        """Retrieve Asset  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.retrieve_asset_v1_assets_asset_owner_and_name_or_id_get(asset_owner_and_name_or_id, transfer_api_type, async_req=True)
        >>> result = thread.get()

        :param asset_owner_and_name_or_id: (required)
        :type asset_owner_and_name_or_id: str
        :param transfer_api_type:
        :type transfer_api_type: TransferApiType
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :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.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: RetrieveAssetResponse
        """
        kwargs["_return_http_data_only"] = True
        if "_preload_content" in kwargs:
            message = "Error! Please call the retrieve_asset_v1_assets_asset_owner_and_name_or_id_get_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data"  # noqa: E501
            raise ValueError(message)
        return (
            self.retrieve_asset_v1_assets_asset_owner_and_name_or_id_get_with_http_info(
                asset_owner_and_name_or_id, transfer_api_type, **kwargs
            )
        )  # noqa: E501

    @validate_arguments
    def retrieve_asset_v1_assets_asset_owner_and_name_or_id_get_with_http_info(
        self,
        asset_owner_and_name_or_id: StrictStr,
        transfer_api_type: Optional[TransferApiType] = None,
        **kwargs
    ) -> ApiResponse:  # noqa: E501
        """Retrieve Asset  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.retrieve_asset_v1_assets_asset_owner_and_name_or_id_get_with_http_info(asset_owner_and_name_or_id, transfer_api_type, async_req=True)
        >>> result = thread.get()

        :param asset_owner_and_name_or_id: (required)
        :type asset_owner_and_name_or_id: str
        :param transfer_api_type:
        :type transfer_api_type: TransferApiType
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the ApiResponse.data will
                                 be set to none and raw_data will store the
                                 HTTP response body without reading/decoding.
                                 Default is True.
        :type _preload_content: bool, optional
        :param _return_http_data_only: response data instead of ApiResponse
                                       object with status code, headers, etc
        :type _return_http_data_only: bool, optional
        :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.
        :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
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(RetrieveAssetResponse, status_code(int), headers(HTTPHeaderDict))
        """

        _params = locals()

        _all_params = ["asset_owner_and_name_or_id", "transfer_api_type"]
        _all_params.extend(
            [
                "async_req",
                "_return_http_data_only",
                "_preload_content",
                "_request_timeout",
                "_request_auth",
                "_content_type",
                "_headers",
            ]
        )

        # validate the arguments
        for _key, _val in _params["kwargs"].items():
            if _key not in _all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method retrieve_asset_v1_assets_asset_owner_and_name_or_id_get"
                    % _key
                )
            _params[_key] = _val
        del _params["kwargs"]

        _collection_formats = {}

        # process the path parameters
        _path_params = {}
        if _params["asset_owner_and_name_or_id"]:
            _path_params["asset_owner_and_name_or_id"] = _params[
                "asset_owner_and_name_or_id"
            ]

        # process the query parameters
        _query_params = []
        if _params.get("transfer_api_type") is not None:  # noqa: E501
            _query_params.append(
                ("transfer_api_type", _params["transfer_api_type"].value)
            )

        # process the header parameters
        _header_params = dict(_params.get("_headers", {}))
        # process the form parameters
        _form_params = []
        _files = {}
        # process the body parameter
        _body_params = None
        # set the HTTP header `Accept`
        _header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json"]
        )  # noqa: E501

        # authentication setting
        _auth_settings = []  # noqa: E501

        _response_types_map = {
            "200": "RetrieveAssetResponse",
            "422": "HTTPValidationError",
        }

        return self.api_client.call_api(
            "/v1/assets/{asset_owner_and_name_or_id}",
            "GET",
            _path_params,
            _query_params,
            _header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            response_types_map=_response_types_map,
            auth_settings=_auth_settings,
            async_req=_params.get("async_req"),
            _return_http_data_only=_params.get("_return_http_data_only"),  # noqa: E501
            _preload_content=_params.get("_preload_content", True),
            _request_timeout=_params.get("_request_timeout"),
            collection_formats=_collection_formats,
            _request_auth=_params.get("_request_auth"),
        )
