# coding: utf-8

"""
    \"Data Governance Center: REST API v2\"

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

    OpenAPI spec version: 2.0
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from __future__ import absolute_import

import re  # noqa: F401

# python 2 and python 3 compatibility library
import six

from swagger_client.api_client import ApiClient


class AssetsApi(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    Ref: https://github.com/swagger-api/swagger-codegen
    """

    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

    def resource_asset_resource_add_asset_post(self, **kwargs):  # noqa: E501
        """Adds a new asset into a domain.  # noqa: E501

        Adds a new asset into a domain.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.resource_asset_resource_add_asset_post(async=True)
        >>> result = thread.get()

        :param async bool
        :param JsonAddAssetRequest body: the properties of the asset to be added
        :return: JsonAssetImpl
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.resource_asset_resource_add_asset_post_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.resource_asset_resource_add_asset_post_with_http_info(**kwargs)  # noqa: E501
            return data

    def resource_asset_resource_add_asset_post_with_http_info(self, **kwargs):  # noqa: E501
        """Adds a new asset into a domain.  # noqa: E501

        Adds a new asset into a domain.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.resource_asset_resource_add_asset_post_with_http_info(async=True)
        >>> result = thread.get()

        :param async bool
        :param JsonAddAssetRequest body: the properties of the asset to be added
        :return: JsonAssetImpl
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body']  # noqa: E501
        all_params.append('async')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method resource_asset_resource_add_asset_post" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/assets', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='JsonAssetImpl',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def resource_asset_resource_add_assets_post(self, **kwargs):  # noqa: E501
        """Adds multiple assets.  # noqa: E501

        Adds multiple assets.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.resource_asset_resource_add_assets_post(async=True)
        >>> result = thread.get()

        :param async bool
        :param list[JsonAddAssetRequest] body: the properties of the assets to be added
        :return: list[JsonAssetImpl]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.resource_asset_resource_add_assets_post_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.resource_asset_resource_add_assets_post_with_http_info(**kwargs)  # noqa: E501
            return data

    def resource_asset_resource_add_assets_post_with_http_info(self, **kwargs):  # noqa: E501
        """Adds multiple assets.  # noqa: E501

        Adds multiple assets.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.resource_asset_resource_add_assets_post_with_http_info(async=True)
        >>> result = thread.get()

        :param async bool
        :param list[JsonAddAssetRequest] body: the properties of the assets to be added
        :return: list[JsonAssetImpl]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body']  # noqa: E501
        all_params.append('async')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method resource_asset_resource_add_assets_post" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/assets/bulk', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[JsonAssetImpl]',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def resource_asset_resource_add_tags_to_asset_post(self, asset_id, **kwargs):  # noqa: E501
        """Adds tags to given asset.  # noqa: E501

        Adds tags to given asset.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.resource_asset_resource_add_tags_to_asset_post(asset_id, async=True)
        >>> result = thread.get()

        :param async bool
        :param str asset_id: the <code>id</code> of the asset (required)
        :param JsonAddAssetTagsRequest body: the tags to be added to given asset
        :return: list[JsonTagImpl]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.resource_asset_resource_add_tags_to_asset_post_with_http_info(asset_id, **kwargs)  # noqa: E501
        else:
            (data) = self.resource_asset_resource_add_tags_to_asset_post_with_http_info(asset_id, **kwargs)  # noqa: E501
            return data

    def resource_asset_resource_add_tags_to_asset_post_with_http_info(self, asset_id, **kwargs):  # noqa: E501
        """Adds tags to given asset.  # noqa: E501

        Adds tags to given asset.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.resource_asset_resource_add_tags_to_asset_post_with_http_info(asset_id, async=True)
        >>> result = thread.get()

        :param async bool
        :param str asset_id: the <code>id</code> of the asset (required)
        :param JsonAddAssetTagsRequest body: the tags to be added to given asset
        :return: list[JsonTagImpl]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['asset_id', 'body']  # noqa: E501
        all_params.append('async')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method resource_asset_resource_add_tags_to_asset_post" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'asset_id' is set
        if ('asset_id' not in params or
                params['asset_id'] is None):
            raise ValueError("Missing the required parameter `asset_id` when calling `resource_asset_resource_add_tags_to_asset_post`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'asset_id' in params:
            path_params['assetId'] = params['asset_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/assets/{assetId}/tags', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[JsonTagImpl]',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def resource_asset_resource_change_asset_patch(self, asset_id, **kwargs):  # noqa: E501
        """Change the asset with the information that is present in the request.  # noqa: E501

        Change the asset with the information that is present in the request. Only properties that are specified in this request and have not <code>null</code> values are updated. All other properties are ignored.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.resource_asset_resource_change_asset_patch(asset_id, async=True)
        >>> result = thread.get()

        :param async bool
        :param str asset_id: the <code>id</code> of the asset to be changed. (required)
        :param JsonChangeAssetRequest body: the properties of the asset to be changed
        :return: JsonAssetImpl
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.resource_asset_resource_change_asset_patch_with_http_info(asset_id, **kwargs)  # noqa: E501
        else:
            (data) = self.resource_asset_resource_change_asset_patch_with_http_info(asset_id, **kwargs)  # noqa: E501
            return data

    def resource_asset_resource_change_asset_patch_with_http_info(self, asset_id, **kwargs):  # noqa: E501
        """Change the asset with the information that is present in the request.  # noqa: E501

        Change the asset with the information that is present in the request. Only properties that are specified in this request and have not <code>null</code> values are updated. All other properties are ignored.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.resource_asset_resource_change_asset_patch_with_http_info(asset_id, async=True)
        >>> result = thread.get()

        :param async bool
        :param str asset_id: the <code>id</code> of the asset to be changed. (required)
        :param JsonChangeAssetRequest body: the properties of the asset to be changed
        :return: JsonAssetImpl
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['asset_id', 'body']  # noqa: E501
        all_params.append('async')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method resource_asset_resource_change_asset_patch" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'asset_id' is set
        if ('asset_id' not in params or
                params['asset_id'] is None):
            raise ValueError("Missing the required parameter `asset_id` when calling `resource_asset_resource_change_asset_patch`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'asset_id' in params:
            path_params['assetId'] = params['asset_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/assets/{assetId}', 'PATCH',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='JsonAssetImpl',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def resource_asset_resource_change_assets_patch(self, **kwargs):  # noqa: E501
        """Changes multiple assets.  # noqa: E501

        Changes multiple assets.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.resource_asset_resource_change_assets_patch(async=True)
        >>> result = thread.get()

        :param async bool
        :param list[JsonChangeAssetRequest] body: the properties of the assets to be changed
        :return: list[JsonAssetImpl]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.resource_asset_resource_change_assets_patch_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.resource_asset_resource_change_assets_patch_with_http_info(**kwargs)  # noqa: E501
            return data

    def resource_asset_resource_change_assets_patch_with_http_info(self, **kwargs):  # noqa: E501
        """Changes multiple assets.  # noqa: E501

        Changes multiple assets.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.resource_asset_resource_change_assets_patch_with_http_info(async=True)
        >>> result = thread.get()

        :param async bool
        :param list[JsonChangeAssetRequest] body: the properties of the assets to be changed
        :return: list[JsonAssetImpl]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body']  # noqa: E501
        all_params.append('async')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method resource_asset_resource_change_assets_patch" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/assets/bulk', 'PATCH',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[JsonAssetImpl]',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def resource_asset_resource_find_assets_get(self, **kwargs):  # noqa: E501
        """Returns assets matching the given search criteria.  # noqa: E501

        Returns assets matching the given search criteria. Only parameters that are specified in this request and have not <code>null</code> values are used for filtering. All other parameters are ignored. The returned assets satisfy all constraints that are specified in this search criteria. By default a result containing 1000 assets is returned.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.resource_asset_resource_find_assets_get(async=True)
        >>> result = thread.get()

        :param async bool
        :param str community_id: The <code>id</code> of the community to find the assets in
        :param str domain_id: The <code>id</code> of the domain to find the assets in
        :param bool exclude_meta: The exclude meta flag. If this is set to true then the assets from meta domains will not be returned (meta domains are the domains which were not created by the user manually)
        :param int limit: The maximum number of results to retrieve. If not set (value = <tt>0</tt>), the default limit will be used
        :param str name: The name of the asset to search for
        :param str name_match_mode: The match mode used to compare <code>name</code>
        :param int offset: The first result to retrieve. If not set (value = <tt>0</tt>), results will be retrieved starting from row <tt>0</tt>
        :param list[str] status_id: The list of <code>ids</code> of the statuses. The returned assets have one of statuses specified by this parameter
        :param list[str] tag_names: The list of names of tags. The returned assets have one of tags with names specified by this parameter
        :param list[str] type_id: The list of <code>ids</code> of the asset types. The returned assets are of one of types specified by this parameter
        :param bool type_inheritance: Whether the type inheritance for the asset type filtering should be applied or not
        :return: JsonPagedResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.resource_asset_resource_find_assets_get_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.resource_asset_resource_find_assets_get_with_http_info(**kwargs)  # noqa: E501
            return data

    def resource_asset_resource_find_assets_get_with_http_info(self, **kwargs):  # noqa: E501
        """Returns assets matching the given search criteria.  # noqa: E501

        Returns assets matching the given search criteria. Only parameters that are specified in this request and have not <code>null</code> values are used for filtering. All other parameters are ignored. The returned assets satisfy all constraints that are specified in this search criteria. By default a result containing 1000 assets is returned.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.resource_asset_resource_find_assets_get_with_http_info(async=True)
        >>> result = thread.get()

        :param async bool
        :param str community_id: The <code>id</code> of the community to find the assets in
        :param str domain_id: The <code>id</code> of the domain to find the assets in
        :param bool exclude_meta: The exclude meta flag. If this is set to true then the assets from meta domains will not be returned (meta domains are the domains which were not created by the user manually)
        :param int limit: The maximum number of results to retrieve. If not set (value = <tt>0</tt>), the default limit will be used
        :param str name: The name of the asset to search for
        :param str name_match_mode: The match mode used to compare <code>name</code>
        :param int offset: The first result to retrieve. If not set (value = <tt>0</tt>), results will be retrieved starting from row <tt>0</tt>
        :param list[str] status_id: The list of <code>ids</code> of the statuses. The returned assets have one of statuses specified by this parameter
        :param list[str] tag_names: The list of names of tags. The returned assets have one of tags with names specified by this parameter
        :param list[str] type_id: The list of <code>ids</code> of the asset types. The returned assets are of one of types specified by this parameter
        :param bool type_inheritance: Whether the type inheritance for the asset type filtering should be applied or not
        :return: JsonPagedResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['community_id', 'domain_id', 'exclude_meta', 'limit', 'name', 'name_match_mode', 'offset', 'status_id', 'tag_names', 'type_id', 'type_inheritance']  # noqa: E501
        all_params.append('async')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method resource_asset_resource_find_assets_get" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'community_id' in params:
            query_params.append(('communityId', params['community_id']))  # noqa: E501
        if 'domain_id' in params:
            query_params.append(('domainId', params['domain_id']))  # noqa: E501
        if 'exclude_meta' in params:
            query_params.append(('excludeMeta', params['exclude_meta']))  # noqa: E501
        if 'limit' in params:
            query_params.append(('limit', params['limit']))  # noqa: E501
        if 'name' in params:
            query_params.append(('name', params['name']))  # noqa: E501
        if 'name_match_mode' in params:
            query_params.append(('nameMatchMode', params['name_match_mode']))  # noqa: E501
        if 'offset' in params:
            query_params.append(('offset', params['offset']))  # noqa: E501
        if 'status_id' in params:
            query_params.append(('statusId', params['status_id']))  # noqa: E501
            collection_formats['statusId'] = 'multi'  # noqa: E501
        if 'tag_names' in params:
            query_params.append(('tagNames', params['tag_names']))  # noqa: E501
            collection_formats['tagNames'] = 'multi'  # noqa: E501
        if 'type_id' in params:
            query_params.append(('typeId', params['type_id']))  # noqa: E501
            collection_formats['typeId'] = 'multi'  # noqa: E501
        if 'type_inheritance' in params:
            query_params.append(('typeInheritance', params['type_inheritance']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/assets', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='JsonPagedResponse',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def resource_asset_resource_get_asset_get(self, asset_id, **kwargs):  # noqa: E501
        """Returns an asset identified by given id.  # noqa: E501

        Returns an asset identified by given id.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.resource_asset_resource_get_asset_get(asset_id, async=True)
        >>> result = thread.get()

        :param async bool
        :param str asset_id: the <code>id</code> of the asset (required)
        :return: JsonAssetImpl
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.resource_asset_resource_get_asset_get_with_http_info(asset_id, **kwargs)  # noqa: E501
        else:
            (data) = self.resource_asset_resource_get_asset_get_with_http_info(asset_id, **kwargs)  # noqa: E501
            return data

    def resource_asset_resource_get_asset_get_with_http_info(self, asset_id, **kwargs):  # noqa: E501
        """Returns an asset identified by given id.  # noqa: E501

        Returns an asset identified by given id.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.resource_asset_resource_get_asset_get_with_http_info(asset_id, async=True)
        >>> result = thread.get()

        :param async bool
        :param str asset_id: the <code>id</code> of the asset (required)
        :return: JsonAssetImpl
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['asset_id']  # noqa: E501
        all_params.append('async')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method resource_asset_resource_get_asset_get" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'asset_id' is set
        if ('asset_id' not in params or
                params['asset_id'] is None):
            raise ValueError("Missing the required parameter `asset_id` when calling `resource_asset_resource_get_asset_get`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'asset_id' in params:
            path_params['assetId'] = params['asset_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/assets/{assetId}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='JsonAssetImpl',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def resource_asset_resource_get_asset_tags_get(self, asset_id, **kwargs):  # noqa: E501
        """Returns all tags of given asset.  # noqa: E501

        Returns all tags of given asset.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.resource_asset_resource_get_asset_tags_get(asset_id, async=True)
        >>> result = thread.get()

        :param async bool
        :param str asset_id: the <code>id</code> of the asset (required)
        :return: list[JsonTagImpl]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.resource_asset_resource_get_asset_tags_get_with_http_info(asset_id, **kwargs)  # noqa: E501
        else:
            (data) = self.resource_asset_resource_get_asset_tags_get_with_http_info(asset_id, **kwargs)  # noqa: E501
            return data

    def resource_asset_resource_get_asset_tags_get_with_http_info(self, asset_id, **kwargs):  # noqa: E501
        """Returns all tags of given asset.  # noqa: E501

        Returns all tags of given asset.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.resource_asset_resource_get_asset_tags_get_with_http_info(asset_id, async=True)
        >>> result = thread.get()

        :param async bool
        :param str asset_id: the <code>id</code> of the asset (required)
        :return: list[JsonTagImpl]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['asset_id']  # noqa: E501
        all_params.append('async')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method resource_asset_resource_get_asset_tags_get" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'asset_id' is set
        if ('asset_id' not in params or
                params['asset_id'] is None):
            raise ValueError("Missing the required parameter `asset_id` when calling `resource_asset_resource_get_asset_tags_get`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'asset_id' in params:
            path_params['assetId'] = params['asset_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/assets/{assetId}/tags', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[JsonTagImpl]',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def resource_asset_resource_remove_asset_delete(self, asset_id, **kwargs):  # noqa: E501
        """Removes an asset identified by given id.  # noqa: E501

        Removes an asset identified by given id.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.resource_asset_resource_remove_asset_delete(asset_id, async=True)
        >>> result = thread.get()

        :param async bool
        :param str asset_id: the <code>id</code> of the asset to remove (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.resource_asset_resource_remove_asset_delete_with_http_info(asset_id, **kwargs)  # noqa: E501
        else:
            (data) = self.resource_asset_resource_remove_asset_delete_with_http_info(asset_id, **kwargs)  # noqa: E501
            return data

    def resource_asset_resource_remove_asset_delete_with_http_info(self, asset_id, **kwargs):  # noqa: E501
        """Removes an asset identified by given id.  # noqa: E501

        Removes an asset identified by given id.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.resource_asset_resource_remove_asset_delete_with_http_info(asset_id, async=True)
        >>> result = thread.get()

        :param async bool
        :param str asset_id: the <code>id</code> of the asset to remove (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['asset_id']  # noqa: E501
        all_params.append('async')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method resource_asset_resource_remove_asset_delete" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'asset_id' is set
        if ('asset_id' not in params or
                params['asset_id'] is None):
            raise ValueError("Missing the required parameter `asset_id` when calling `resource_asset_resource_remove_asset_delete`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'asset_id' in params:
            path_params['assetId'] = params['asset_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/assets/{assetId}', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def resource_asset_resource_remove_assets_delete(self, **kwargs):  # noqa: E501
        """Removes multiple assets.  # noqa: E501

        Removes multiple assets.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.resource_asset_resource_remove_assets_delete(async=True)
        >>> result = thread.get()

        :param async bool
        :param list[str] body: the <code>id</code>s of the assets to be removed, i.e. [“6f685f90-1036-4d30-983a-a9bbcdd7b8f6”,\"174b6334-9804-495d-b659-43f53a5de8b8\"]
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.resource_asset_resource_remove_assets_delete_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.resource_asset_resource_remove_assets_delete_with_http_info(**kwargs)  # noqa: E501
            return data

    def resource_asset_resource_remove_assets_delete_with_http_info(self, **kwargs):  # noqa: E501
        """Removes multiple assets.  # noqa: E501

        Removes multiple assets.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.resource_asset_resource_remove_assets_delete_with_http_info(async=True)
        >>> result = thread.get()

        :param async bool
        :param list[str] body: the <code>id</code>s of the assets to be removed, i.e. [“6f685f90-1036-4d30-983a-a9bbcdd7b8f6”,\"174b6334-9804-495d-b659-43f53a5de8b8\"]
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body']  # noqa: E501
        all_params.append('async')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method resource_asset_resource_remove_assets_delete" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/assets/bulk', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def resource_asset_resource_remove_tags_from_asset_delete(self, asset_id, **kwargs):  # noqa: E501
        """Remove tags from given asset.  # noqa: E501

        Remove tags from given asset.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.resource_asset_resource_remove_tags_from_asset_delete(asset_id, async=True)
        >>> result = thread.get()

        :param async bool
        :param str asset_id: the <code>id</code> of the asset (required)
        :param JsonRemoveAssetTagsRequest body: the tags to be removed from given asset
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.resource_asset_resource_remove_tags_from_asset_delete_with_http_info(asset_id, **kwargs)  # noqa: E501
        else:
            (data) = self.resource_asset_resource_remove_tags_from_asset_delete_with_http_info(asset_id, **kwargs)  # noqa: E501
            return data

    def resource_asset_resource_remove_tags_from_asset_delete_with_http_info(self, asset_id, **kwargs):  # noqa: E501
        """Remove tags from given asset.  # noqa: E501

        Remove tags from given asset.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.resource_asset_resource_remove_tags_from_asset_delete_with_http_info(asset_id, async=True)
        >>> result = thread.get()

        :param async bool
        :param str asset_id: the <code>id</code> of the asset (required)
        :param JsonRemoveAssetTagsRequest body: the tags to be removed from given asset
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['asset_id', 'body']  # noqa: E501
        all_params.append('async')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method resource_asset_resource_remove_tags_from_asset_delete" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'asset_id' is set
        if ('asset_id' not in params or
                params['asset_id'] is None):
            raise ValueError("Missing the required parameter `asset_id` when calling `resource_asset_resource_remove_tags_from_asset_delete`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'asset_id' in params:
            path_params['assetId'] = params['asset_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/assets/{assetId}/tags', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def resource_asset_resource_set_asset_attributes_put(self, asset_id, **kwargs):  # noqa: E501
        """Replaces all the attributes of the asset (of given attribute type) with the attributes from the request, except matching attributes, these are retained.  # noqa: E501

        Replaces all the attributes of the asset (of given attribute type) with the attributes from the request, except matching attributes, these are retained.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.resource_asset_resource_set_asset_attributes_put(asset_id, async=True)
        >>> result = thread.get()

        :param async bool
        :param str asset_id:  (required)
        :param JsonSetAssetAttributesRequest body: the attributes to be set on given asset
        :return: list[JsonAttributeImpl]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.resource_asset_resource_set_asset_attributes_put_with_http_info(asset_id, **kwargs)  # noqa: E501
        else:
            (data) = self.resource_asset_resource_set_asset_attributes_put_with_http_info(asset_id, **kwargs)  # noqa: E501
            return data

    def resource_asset_resource_set_asset_attributes_put_with_http_info(self, asset_id, **kwargs):  # noqa: E501
        """Replaces all the attributes of the asset (of given attribute type) with the attributes from the request, except matching attributes, these are retained.  # noqa: E501

        Replaces all the attributes of the asset (of given attribute type) with the attributes from the request, except matching attributes, these are retained.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.resource_asset_resource_set_asset_attributes_put_with_http_info(asset_id, async=True)
        >>> result = thread.get()

        :param async bool
        :param str asset_id:  (required)
        :param JsonSetAssetAttributesRequest body: the attributes to be set on given asset
        :return: list[JsonAttributeImpl]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['asset_id', 'body']  # noqa: E501
        all_params.append('async')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method resource_asset_resource_set_asset_attributes_put" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'asset_id' is set
        if ('asset_id' not in params or
                params['asset_id'] is None):
            raise ValueError("Missing the required parameter `asset_id` when calling `resource_asset_resource_set_asset_attributes_put`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'asset_id' in params:
            path_params['assetId'] = params['asset_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/assets/{assetId}/attributes', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[JsonAttributeImpl]',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def resource_asset_resource_set_asset_relations_put(self, asset_id, **kwargs):  # noqa: E501
        """Sets relations for given asset.  # noqa: E501

        Sets relations for given asset. All the relations described by this request will replace the existing ones (identified with asset as one end, relation type and direction of the relation).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.resource_asset_resource_set_asset_relations_put(asset_id, async=True)
        >>> result = thread.get()

        :param async bool
        :param str asset_id:  (required)
        :param JsonSetAssetRelationsRequest body: the relations to be set on given asset
        :return: list[JsonRelationImpl]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.resource_asset_resource_set_asset_relations_put_with_http_info(asset_id, **kwargs)  # noqa: E501
        else:
            (data) = self.resource_asset_resource_set_asset_relations_put_with_http_info(asset_id, **kwargs)  # noqa: E501
            return data

    def resource_asset_resource_set_asset_relations_put_with_http_info(self, asset_id, **kwargs):  # noqa: E501
        """Sets relations for given asset.  # noqa: E501

        Sets relations for given asset. All the relations described by this request will replace the existing ones (identified with asset as one end, relation type and direction of the relation).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.resource_asset_resource_set_asset_relations_put_with_http_info(asset_id, async=True)
        >>> result = thread.get()

        :param async bool
        :param str asset_id:  (required)
        :param JsonSetAssetRelationsRequest body: the relations to be set on given asset
        :return: list[JsonRelationImpl]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['asset_id', 'body']  # noqa: E501
        all_params.append('async')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method resource_asset_resource_set_asset_relations_put" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'asset_id' is set
        if ('asset_id' not in params or
                params['asset_id'] is None):
            raise ValueError("Missing the required parameter `asset_id` when calling `resource_asset_resource_set_asset_relations_put`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'asset_id' in params:
            path_params['assetId'] = params['asset_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/assets/{assetId}/relations', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[JsonRelationImpl]',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def resource_asset_resource_set_asset_responsibilities_put(self, asset_id, **kwargs):  # noqa: E501
        """Sets responsibilities for given asset.  # noqa: E501

        Sets responsibilities for given asset. All the relations described by this request will replace the existing ones (identified with asset as one end, relation type and direction of the relation).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.resource_asset_resource_set_asset_responsibilities_put(asset_id, async=True)
        >>> result = thread.get()

        :param async bool
        :param str asset_id:  (required)
        :param JsonSetAssetResponsibilitiesRequest body: the relations to be set on given asset
        :return: list[JsonResponsibilityImpl]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.resource_asset_resource_set_asset_responsibilities_put_with_http_info(asset_id, **kwargs)  # noqa: E501
        else:
            (data) = self.resource_asset_resource_set_asset_responsibilities_put_with_http_info(asset_id, **kwargs)  # noqa: E501
            return data

    def resource_asset_resource_set_asset_responsibilities_put_with_http_info(self, asset_id, **kwargs):  # noqa: E501
        """Sets responsibilities for given asset.  # noqa: E501

        Sets responsibilities for given asset. All the relations described by this request will replace the existing ones (identified with asset as one end, relation type and direction of the relation).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.resource_asset_resource_set_asset_responsibilities_put_with_http_info(asset_id, async=True)
        >>> result = thread.get()

        :param async bool
        :param str asset_id:  (required)
        :param JsonSetAssetResponsibilitiesRequest body: the relations to be set on given asset
        :return: list[JsonResponsibilityImpl]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['asset_id', 'body']  # noqa: E501
        all_params.append('async')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method resource_asset_resource_set_asset_responsibilities_put" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'asset_id' is set
        if ('asset_id' not in params or
                params['asset_id'] is None):
            raise ValueError("Missing the required parameter `asset_id` when calling `resource_asset_resource_set_asset_responsibilities_put`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'asset_id' in params:
            path_params['assetId'] = params['asset_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/assets/{assetId}/responsibilities', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[JsonResponsibilityImpl]',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def resource_asset_resource_set_tags_for_asset_put(self, asset_id, **kwargs):  # noqa: E501
        """Sets tags for given asset.  # noqa: E501

        Sets tags for given asset. Given asset will contain only tags that are present in this request after the request is performed.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.resource_asset_resource_set_tags_for_asset_put(asset_id, async=True)
        >>> result = thread.get()

        :param async bool
        :param str asset_id: the <code>id</code> of the asset (required)
        :param JsonSetAssetTagsRequest body: the tags to be set on given asset
        :return: list[JsonTagImpl]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async'):
            return self.resource_asset_resource_set_tags_for_asset_put_with_http_info(asset_id, **kwargs)  # noqa: E501
        else:
            (data) = self.resource_asset_resource_set_tags_for_asset_put_with_http_info(asset_id, **kwargs)  # noqa: E501
            return data

    def resource_asset_resource_set_tags_for_asset_put_with_http_info(self, asset_id, **kwargs):  # noqa: E501
        """Sets tags for given asset.  # noqa: E501

        Sets tags for given asset. Given asset will contain only tags that are present in this request after the request is performed.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async=True
        >>> thread = api.resource_asset_resource_set_tags_for_asset_put_with_http_info(asset_id, async=True)
        >>> result = thread.get()

        :param async bool
        :param str asset_id: the <code>id</code> of the asset (required)
        :param JsonSetAssetTagsRequest body: the tags to be set on given asset
        :return: list[JsonTagImpl]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['asset_id', 'body']  # noqa: E501
        all_params.append('async')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method resource_asset_resource_set_tags_for_asset_put" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'asset_id' is set
        if ('asset_id' not in params or
                params['asset_id'] is None):
            raise ValueError("Missing the required parameter `asset_id` when calling `resource_asset_resource_set_tags_for_asset_put`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'asset_id' in params:
            path_params['assetId'] = params['asset_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/assets/{assetId}/tags', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[JsonTagImpl]',  # noqa: E501
            auth_settings=auth_settings,
            async=params.get('async'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)
