# coding: utf-8

"""
    Onshape REST API

    The Onshape REST API consumed by all clients.  # noqa: E501

    OpenAPI spec version: 1.96
    Contact: api-support@onshape.zendesk.com
    Generated by: https://openapi-generator.tech
"""


from __future__ import absolute_import

import re  # noqa: F401

# python 2 and python 3 compatibility library
import six

from onshape_client.api_client import ApiClient


class ElementsApi(object):
    """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):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

    def copy_element_from_source_document1(self, did, wid, bt_copy_element_params, **kwargs):  # noqa: E501
        """copy_element_from_source_document1  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.copy_element_from_source_document1(did, wid, bt_copy_element_params, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str did: (required)
        :param str wid: (required)
        :param BTCopyElementParams bt_copy_element_params: (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.copy_element_from_source_document1_with_http_info(did, wid, bt_copy_element_params, **kwargs)  # noqa: E501
        else:
            (data) = self.copy_element_from_source_document1_with_http_info(did, wid, bt_copy_element_params, **kwargs)  # noqa: E501
            return data

    def copy_element_from_source_document1_with_http_info(self, did, wid, bt_copy_element_params, **kwargs):  # noqa: E501
        """copy_element_from_source_document1  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.copy_element_from_source_document1_with_http_info(did, wid, bt_copy_element_params, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str did: (required)
        :param str wid: (required)
        :param BTCopyElementParams bt_copy_element_params: (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['did', 'wid', 'bt_copy_element_params']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}
        if 'did' in local_var_params:
            path_params['did'] = local_var_params['did']  # noqa: E501
        if 'wid' in local_var_params:
            path_params['wid'] = local_var_params['wid']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'bt_copy_element_params' in local_var_params:
            body_params = local_var_params['bt_copy_element_params']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/vnd.onshape.v1+json;charset=UTF-8; qs=0.1', 'application/json;charset=UTF-8; qs=0.9'])  # noqa: E501

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

        # Authentication setting
        auth_settings = ['OAuth2']  # noqa: E501

        return self.api_client.call_api(
            '/api/elements/copyelement/{did}/workspace/{wid}', 'POST',
            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_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def decode_configuration(self, did, wvm, wvmid, eid, cid, **kwargs):  # noqa: E501
        """decode_configuration  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.decode_configuration(did, wvm, wvmid, eid, cid, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str did: (required)
        :param str wvm: (required)
        :param str wvmid: (required)
        :param str eid: (required)
        :param str cid: (required)
        :param str link_document_id:
        :param bool include_display:
        :param bool configuration_is_id:
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.decode_configuration_with_http_info(did, wvm, wvmid, eid, cid, **kwargs)  # noqa: E501
        else:
            (data) = self.decode_configuration_with_http_info(did, wvm, wvmid, eid, cid, **kwargs)  # noqa: E501
            return data

    def decode_configuration_with_http_info(self, did, wvm, wvmid, eid, cid, **kwargs):  # noqa: E501
        """decode_configuration  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.decode_configuration_with_http_info(did, wvm, wvmid, eid, cid, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str did: (required)
        :param str wvm: (required)
        :param str wvmid: (required)
        :param str eid: (required)
        :param str cid: (required)
        :param str link_document_id:
        :param bool include_display:
        :param bool configuration_is_id:
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['did', 'wvm', 'wvmid', 'eid', 'cid', 'link_document_id', 'include_display', 'configuration_is_id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}
        if 'did' in local_var_params:
            path_params['did'] = local_var_params['did']  # noqa: E501
        if 'wvm' in local_var_params:
            path_params['wvm'] = local_var_params['wvm']  # noqa: E501
        if 'wvmid' in local_var_params:
            path_params['wvmid'] = local_var_params['wvmid']  # noqa: E501
        if 'eid' in local_var_params:
            path_params['eid'] = local_var_params['eid']  # noqa: E501
        if 'cid' in local_var_params:
            path_params['cid'] = local_var_params['cid']  # noqa: E501

        query_params = []
        if 'link_document_id' in local_var_params:
            query_params.append(('linkDocumentId', local_var_params['link_document_id']))  # noqa: E501
        if 'include_display' in local_var_params:
            query_params.append(('includeDisplay', local_var_params['include_display']))  # noqa: E501
        if 'configuration_is_id' in local_var_params:
            query_params.append(('configurationIsId', local_var_params['configuration_is_id']))  # 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/vnd.onshape.v1+json;charset=UTF-8; qs=0.1', 'application/json;charset=UTF-8; qs=0.9'])  # noqa: E501

        # Authentication setting
        auth_settings = ['OAuth2']  # noqa: E501

        return self.api_client.call_api(
            '/api/elements/d/{did}/{wvm}/{wvmid}/e/{eid}/configurationencodings/{cid}', 'GET',
            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_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def delete8(self, did, wid, eid, **kwargs):  # noqa: E501
        """delete8  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete8(did, wid, eid, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str did: (required)
        :param str wid: (required)
        :param str eid: (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.delete8_with_http_info(did, wid, eid, **kwargs)  # noqa: E501
        else:
            (data) = self.delete8_with_http_info(did, wid, eid, **kwargs)  # noqa: E501
            return data

    def delete8_with_http_info(self, did, wid, eid, **kwargs):  # noqa: E501
        """delete8  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete8_with_http_info(did, wid, eid, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str did: (required)
        :param str wid: (required)
        :param str eid: (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['did', 'wid', 'eid']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}
        if 'did' in local_var_params:
            path_params['did'] = local_var_params['did']  # noqa: E501
        if 'wid' in local_var_params:
            path_params['wid'] = local_var_params['wid']  # noqa: E501
        if 'eid' in local_var_params:
            path_params['eid'] = local_var_params['eid']  # 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/vnd.onshape.v1+json;charset=UTF-8; qs=0.1', 'application/json;charset=UTF-8; qs=0.9'])  # noqa: E501

        # Authentication setting
        auth_settings = ['OAuth2']  # noqa: E501

        return self.api_client.call_api(
            '/api/elements/d/{did}/w/{wid}/e/{eid}', '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_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def encode_configuration_map(self, did, eid, bt_configuration_params, **kwargs):  # noqa: E501
        """encode_configuration_map  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.encode_configuration_map(did, eid, bt_configuration_params, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str did: (required)
        :param str eid: (required)
        :param BTConfigurationParams bt_configuration_params: (required)
        :param str version_id:
        :param str link_document_id:
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.encode_configuration_map_with_http_info(did, eid, bt_configuration_params, **kwargs)  # noqa: E501
        else:
            (data) = self.encode_configuration_map_with_http_info(did, eid, bt_configuration_params, **kwargs)  # noqa: E501
            return data

    def encode_configuration_map_with_http_info(self, did, eid, bt_configuration_params, **kwargs):  # noqa: E501
        """encode_configuration_map  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.encode_configuration_map_with_http_info(did, eid, bt_configuration_params, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str did: (required)
        :param str eid: (required)
        :param BTConfigurationParams bt_configuration_params: (required)
        :param str version_id:
        :param str link_document_id:
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['did', 'eid', 'bt_configuration_params', 'version_id', 'link_document_id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}
        if 'did' in local_var_params:
            path_params['did'] = local_var_params['did']  # noqa: E501
        if 'eid' in local_var_params:
            path_params['eid'] = local_var_params['eid']  # noqa: E501

        query_params = []
        if 'version_id' in local_var_params:
            query_params.append(('versionId', local_var_params['version_id']))  # noqa: E501
        if 'link_document_id' in local_var_params:
            query_params.append(('linkDocumentId', local_var_params['link_document_id']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'bt_configuration_params' in local_var_params:
            body_params = local_var_params['bt_configuration_params']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/vnd.onshape.v1+json;charset=UTF-8; qs=0.1', 'application/json;charset=UTF-8; qs=0.9'])  # noqa: E501

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

        # Authentication setting
        auth_settings = ['OAuth2']  # noqa: E501

        return self.api_client.call_api(
            '/api/elements/d/{did}/e/{eid}/configurationencodings', 'POST',
            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_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_configuration3(self, did, wvm, wvmid, eid, **kwargs):  # noqa: E501
        """get_configuration3  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_configuration3(did, wvm, wvmid, eid, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str did: (required)
        :param str wvm: (required)
        :param str wvmid: (required)
        :param str eid: (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_configuration3_with_http_info(did, wvm, wvmid, eid, **kwargs)  # noqa: E501
        else:
            (data) = self.get_configuration3_with_http_info(did, wvm, wvmid, eid, **kwargs)  # noqa: E501
            return data

    def get_configuration3_with_http_info(self, did, wvm, wvmid, eid, **kwargs):  # noqa: E501
        """get_configuration3  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_configuration3_with_http_info(did, wvm, wvmid, eid, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str did: (required)
        :param str wvm: (required)
        :param str wvmid: (required)
        :param str eid: (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['did', 'wvm', 'wvmid', 'eid']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}
        if 'did' in local_var_params:
            path_params['did'] = local_var_params['did']  # noqa: E501
        if 'wvm' in local_var_params:
            path_params['wvm'] = local_var_params['wvm']  # noqa: E501
        if 'wvmid' in local_var_params:
            path_params['wvmid'] = local_var_params['wvmid']  # noqa: E501
        if 'eid' in local_var_params:
            path_params['eid'] = local_var_params['eid']  # 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/vnd.onshape.v1+json;charset=UTF-8; qs=0.1', 'application/json;charset=UTF-8; qs=0.9'])  # noqa: E501

        # Authentication setting
        auth_settings = ['OAuth2']  # noqa: E501

        return self.api_client.call_api(
            '/api/elements/d/{did}/{wvm}/{wvmid}/e/{eid}/configuration', 'GET',
            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_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_element_by_version_deprecated(self, did, vid, **kwargs):  # noqa: E501
        """get_element_by_version_deprecated  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_element_by_version_deprecated(did, vid, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str did: (required)
        :param str vid: (required)
        :param bool with_thumbnails:
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_element_by_version_deprecated_with_http_info(did, vid, **kwargs)  # noqa: E501
        else:
            (data) = self.get_element_by_version_deprecated_with_http_info(did, vid, **kwargs)  # noqa: E501
            return data

    def get_element_by_version_deprecated_with_http_info(self, did, vid, **kwargs):  # noqa: E501
        """get_element_by_version_deprecated  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_element_by_version_deprecated_with_http_info(did, vid, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str did: (required)
        :param str vid: (required)
        :param bool with_thumbnails:
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['did', 'vid', 'with_thumbnails']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}
        if 'did' in local_var_params:
            path_params['did'] = local_var_params['did']  # noqa: E501
        if 'vid' in local_var_params:
            path_params['vid'] = local_var_params['vid']  # noqa: E501

        query_params = []
        if 'with_thumbnails' in local_var_params:
            query_params.append(('withThumbnails', local_var_params['with_thumbnails']))  # 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/vnd.onshape.v1+json;charset=UTF-8; qs=0.1', 'application/json;charset=UTF-8; qs=0.9'])  # noqa: E501

        # Authentication setting
        auth_settings = ['OAuth2']  # noqa: E501

        return self.api_client.call_api(
            '/api/elements/{did}/version/{vid}', 'GET',
            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_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_element_by_workspace_deprecated(self, did, wid, **kwargs):  # noqa: E501
        """get_element_by_workspace_deprecated  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_element_by_workspace_deprecated(did, wid, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str did: (required)
        :param str wid: (required)
        :param bool with_thumbnails:
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_element_by_workspace_deprecated_with_http_info(did, wid, **kwargs)  # noqa: E501
        else:
            (data) = self.get_element_by_workspace_deprecated_with_http_info(did, wid, **kwargs)  # noqa: E501
            return data

    def get_element_by_workspace_deprecated_with_http_info(self, did, wid, **kwargs):  # noqa: E501
        """get_element_by_workspace_deprecated  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_element_by_workspace_deprecated_with_http_info(did, wid, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str did: (required)
        :param str wid: (required)
        :param bool with_thumbnails:
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['did', 'wid', 'with_thumbnails']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}
        if 'did' in local_var_params:
            path_params['did'] = local_var_params['did']  # noqa: E501
        if 'wid' in local_var_params:
            path_params['wid'] = local_var_params['wid']  # noqa: E501

        query_params = []
        if 'with_thumbnails' in local_var_params:
            query_params.append(('withThumbnails', local_var_params['with_thumbnails']))  # 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/vnd.onshape.v1+json;charset=UTF-8; qs=0.1', 'application/json;charset=UTF-8; qs=0.9'])  # noqa: E501

        # Authentication setting
        auth_settings = ['OAuth2']  # noqa: E501

        return self.api_client.call_api(
            '/api/elements/{did}/workspace/{wid}', 'GET',
            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_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_element_metadata(self, did, wv, wvid, eid, **kwargs):  # noqa: E501
        """get_element_metadata  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_element_metadata(did, wv, wvid, eid, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str did: (required)
        :param str wv: (required)
        :param str wvid: (required)
        :param str eid: (required)
        :param str link_document_id:
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_element_metadata_with_http_info(did, wv, wvid, eid, **kwargs)  # noqa: E501
        else:
            (data) = self.get_element_metadata_with_http_info(did, wv, wvid, eid, **kwargs)  # noqa: E501
            return data

    def get_element_metadata_with_http_info(self, did, wv, wvid, eid, **kwargs):  # noqa: E501
        """get_element_metadata  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_element_metadata_with_http_info(did, wv, wvid, eid, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str did: (required)
        :param str wv: (required)
        :param str wvid: (required)
        :param str eid: (required)
        :param str link_document_id:
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['did', 'wv', 'wvid', 'eid', 'link_document_id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}
        if 'did' in local_var_params:
            path_params['did'] = local_var_params['did']  # noqa: E501
        if 'wv' in local_var_params:
            path_params['wv'] = local_var_params['wv']  # noqa: E501
        if 'wvid' in local_var_params:
            path_params['wvid'] = local_var_params['wvid']  # noqa: E501
        if 'eid' in local_var_params:
            path_params['eid'] = local_var_params['eid']  # noqa: E501

        query_params = []
        if 'link_document_id' in local_var_params:
            query_params.append(('linkDocumentId', local_var_params['link_document_id']))  # 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/vnd.onshape.v1+json;charset=UTF-8; qs=0.1', 'application/json;charset=UTF-8; qs=0.9'])  # noqa: E501

        # Authentication setting
        auth_settings = ['OAuth2']  # noqa: E501

        return self.api_client.call_api(
            '/api/elements/d/{did}/{wv}/{wvid}/e/{eid}/metadata', 'GET',
            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_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_element_metadata_deprecated(self, emid, **kwargs):  # noqa: E501
        """get_element_metadata_deprecated  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_element_metadata_deprecated(emid, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str emid: (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_element_metadata_deprecated_with_http_info(emid, **kwargs)  # noqa: E501
        else:
            (data) = self.get_element_metadata_deprecated_with_http_info(emid, **kwargs)  # noqa: E501
            return data

    def get_element_metadata_deprecated_with_http_info(self, emid, **kwargs):  # noqa: E501
        """get_element_metadata_deprecated  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_element_metadata_deprecated_with_http_info(emid, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str emid: (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

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

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

        collection_formats = {}

        path_params = {}
        if 'emid' in local_var_params:
            path_params['emid'] = local_var_params['emid']  # 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/vnd.onshape.v1+json;charset=UTF-8; qs=0.1', 'application/json;charset=UTF-8; qs=0.9'])  # noqa: E501

        # Authentication setting
        auth_settings = ['OAuth2']  # noqa: E501

        return self.api_client.call_api(
            '/api/elements/{emid}', 'GET',
            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_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_element_translator_formats1(self, did, wid, eid, **kwargs):  # noqa: E501
        """get_element_translator_formats1  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_element_translator_formats1(did, wid, eid, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str did: (required)
        :param str wid: (required)
        :param str eid: (required)
        :param bool check_content:
        :param str configuration:
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_element_translator_formats1_with_http_info(did, wid, eid, **kwargs)  # noqa: E501
        else:
            (data) = self.get_element_translator_formats1_with_http_info(did, wid, eid, **kwargs)  # noqa: E501
            return data

    def get_element_translator_formats1_with_http_info(self, did, wid, eid, **kwargs):  # noqa: E501
        """get_element_translator_formats1  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_element_translator_formats1_with_http_info(did, wid, eid, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str did: (required)
        :param str wid: (required)
        :param str eid: (required)
        :param bool check_content:
        :param str configuration:
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['did', 'wid', 'eid', 'check_content', 'configuration']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}
        if 'did' in local_var_params:
            path_params['did'] = local_var_params['did']  # noqa: E501
        if 'wid' in local_var_params:
            path_params['wid'] = local_var_params['wid']  # noqa: E501
        if 'eid' in local_var_params:
            path_params['eid'] = local_var_params['eid']  # noqa: E501

        query_params = []
        if 'check_content' in local_var_params:
            query_params.append(('checkContent', local_var_params['check_content']))  # noqa: E501
        if 'configuration' in local_var_params:
            query_params.append(('configuration', local_var_params['configuration']))  # 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/vnd.onshape.v1+json;charset=UTF-8; qs=0.1', 'application/json;charset=UTF-8; qs=0.9'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/api/elements/translatorFormats/{did}/{wid}/{eid}', 'GET',
            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_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def get_translator_formats3(self, **kwargs):  # noqa: E501
        """get_translator_formats3  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_translator_formats3(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_translator_formats3_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.get_translator_formats3_with_http_info(**kwargs)  # noqa: E501
            return data

    def get_translator_formats3_with_http_info(self, **kwargs):  # noqa: E501
        """get_translator_formats3  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_translator_formats3_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

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

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

        collection_formats = {}

        path_params = {}

        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/vnd.onshape.v1+json;charset=UTF-8; qs=0.1', 'application/json;charset=UTF-8; qs=0.9'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/api/elements/translatorFormats', 'GET',
            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_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def update_configuration2(self, did, wvm, wvmid, eid, **kwargs):  # noqa: E501
        """update_configuration2  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_configuration2(did, wvm, wvmid, eid, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str did: (required)
        :param str wvm: (required)
        :param str wvmid: (required)
        :param str eid: (required)
        :param str body:
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.update_configuration2_with_http_info(did, wvm, wvmid, eid, **kwargs)  # noqa: E501
        else:
            (data) = self.update_configuration2_with_http_info(did, wvm, wvmid, eid, **kwargs)  # noqa: E501
            return data

    def update_configuration2_with_http_info(self, did, wvm, wvmid, eid, **kwargs):  # noqa: E501
        """update_configuration2  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_configuration2_with_http_info(did, wvm, wvmid, eid, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str did: (required)
        :param str wvm: (required)
        :param str wvmid: (required)
        :param str eid: (required)
        :param str body:
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['did', 'wvm', 'wvmid', 'eid', 'body']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}
        if 'did' in local_var_params:
            path_params['did'] = local_var_params['did']  # noqa: E501
        if 'wvm' in local_var_params:
            path_params['wvm'] = local_var_params['wvm']  # noqa: E501
        if 'wvmid' in local_var_params:
            path_params['wvmid'] = local_var_params['wvmid']  # noqa: E501
        if 'eid' in local_var_params:
            path_params['eid'] = local_var_params['eid']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in local_var_params:
            body_params = local_var_params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/vnd.onshape.v1+json;charset=UTF-8; qs=0.1', 'application/json;charset=UTF-8; qs=0.9'])  # noqa: E501

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

        # Authentication setting
        auth_settings = ['OAuth2']  # noqa: E501

        return self.api_client.call_api(
            '/api/elements/d/{did}/{wvm}/{wvmid}/e/{eid}/configuration', 'POST',
            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_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def update_element_metadata(self, did, wv, wvid, eid, btpdm_metadata_params, **kwargs):  # noqa: E501
        """update_element_metadata  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_element_metadata(did, wv, wvid, eid, btpdm_metadata_params, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str did: (required)
        :param str wv: (required)
        :param str wvid: (required)
        :param str eid: (required)
        :param BTPDMMetadataParams btpdm_metadata_params: (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.update_element_metadata_with_http_info(did, wv, wvid, eid, btpdm_metadata_params, **kwargs)  # noqa: E501
        else:
            (data) = self.update_element_metadata_with_http_info(did, wv, wvid, eid, btpdm_metadata_params, **kwargs)  # noqa: E501
            return data

    def update_element_metadata_with_http_info(self, did, wv, wvid, eid, btpdm_metadata_params, **kwargs):  # noqa: E501
        """update_element_metadata  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_element_metadata_with_http_info(did, wv, wvid, eid, btpdm_metadata_params, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str did: (required)
        :param str wv: (required)
        :param str wvid: (required)
        :param str eid: (required)
        :param BTPDMMetadataParams btpdm_metadata_params: (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['did', 'wv', 'wvid', 'eid', 'btpdm_metadata_params']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}
        if 'did' in local_var_params:
            path_params['did'] = local_var_params['did']  # noqa: E501
        if 'wv' in local_var_params:
            path_params['wv'] = local_var_params['wv']  # noqa: E501
        if 'wvid' in local_var_params:
            path_params['wvid'] = local_var_params['wvid']  # noqa: E501
        if 'eid' in local_var_params:
            path_params['eid'] = local_var_params['eid']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'btpdm_metadata_params' in local_var_params:
            body_params = local_var_params['btpdm_metadata_params']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/vnd.onshape.v1+json;charset=UTF-8; qs=0.1', 'application/json;charset=UTF-8; qs=0.9'])  # noqa: E501

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

        # Authentication setting
        auth_settings = ['OAuth2']  # noqa: E501

        return self.api_client.call_api(
            '/api/elements/d/{did}/{wv}/{wvid}/e/{eid}/metadata', 'POST',
            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_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def update_references1(self, did, wid, eid, bt_update_reference_params, **kwargs):  # noqa: E501
        """update_references1  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_references1(did, wid, eid, bt_update_reference_params, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str did: (required)
        :param str wid: (required)
        :param str eid: (required)
        :param BTUpdateReferenceParams bt_update_reference_params: (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.update_references1_with_http_info(did, wid, eid, bt_update_reference_params, **kwargs)  # noqa: E501
        else:
            (data) = self.update_references1_with_http_info(did, wid, eid, bt_update_reference_params, **kwargs)  # noqa: E501
            return data

    def update_references1_with_http_info(self, did, wid, eid, bt_update_reference_params, **kwargs):  # noqa: E501
        """update_references1  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_references1_with_http_info(did, wid, eid, bt_update_reference_params, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str did: (required)
        :param str wid: (required)
        :param str eid: (required)
        :param BTUpdateReferenceParams bt_update_reference_params: (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['did', 'wid', 'eid', 'bt_update_reference_params']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}
        if 'did' in local_var_params:
            path_params['did'] = local_var_params['did']  # noqa: E501
        if 'wid' in local_var_params:
            path_params['wid'] = local_var_params['wid']  # noqa: E501
        if 'eid' in local_var_params:
            path_params['eid'] = local_var_params['eid']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'bt_update_reference_params' in local_var_params:
            body_params = local_var_params['bt_update_reference_params']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/vnd.onshape.v1+json;charset=UTF-8; qs=0.1', 'application/json;charset=UTF-8; qs=0.9'])  # noqa: E501

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

        # Authentication setting
        auth_settings = ['OAuth2']  # noqa: E501

        return self.api_client.call_api(
            '/api/elements/d/{did}/w/{wid}/e/{eid}/updatereferences', 'POST',
            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_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)

    def upload_file2(self, did, **kwargs):  # noqa: E501
        """upload_file2  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.upload_file2(did, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str did: (required)
        :param str element_id:
        :param str workspace_id:
        :param ContentDisposition content_disposition:
        :param object entity:
        :param BodyPartHeaders headers:
        :param BodyPartMediaType media_type:
        :param MessageBodyWorkers message_body_workers:
        :param MultiPart parent:
        :param object providers:
        :param list[BodyPart] body_parts:
        :param BodyPartHeaders parameterized_headers:
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.upload_file2_with_http_info(did, **kwargs)  # noqa: E501
        else:
            (data) = self.upload_file2_with_http_info(did, **kwargs)  # noqa: E501
            return data

    def upload_file2_with_http_info(self, did, **kwargs):  # noqa: E501
        """upload_file2  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.upload_file2_with_http_info(did, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str did: (required)
        :param str element_id:
        :param str workspace_id:
        :param ContentDisposition content_disposition:
        :param object entity:
        :param BodyPartHeaders headers:
        :param BodyPartMediaType media_type:
        :param MessageBodyWorkers message_body_workers:
        :param MultiPart parent:
        :param object providers:
        :param list[BodyPart] body_parts:
        :param BodyPartHeaders parameterized_headers:
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ['did', 'element_id', 'workspace_id', 'content_disposition', 'entity', 'headers', 'media_type', 'message_body_workers', 'parent', 'providers', 'body_parts', 'parameterized_headers']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}
        if 'did' in local_var_params:
            path_params['did'] = local_var_params['did']  # noqa: E501

        query_params = []
        if 'element_id' in local_var_params:
            query_params.append(('elementId', local_var_params['element_id']))  # noqa: E501
        if 'workspace_id' in local_var_params:
            query_params.append(('workspaceId', local_var_params['workspace_id']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}
        if 'content_disposition' in local_var_params:
            form_params.append(('contentDisposition', local_var_params['content_disposition']))  # noqa: E501
        if 'entity' in local_var_params:
            form_params.append(('entity', local_var_params['entity']))  # noqa: E501
        if 'headers' in local_var_params:
            form_params.append(('headers', local_var_params['headers']))  # noqa: E501
        if 'media_type' in local_var_params:
            form_params.append(('mediaType', local_var_params['media_type']))  # noqa: E501
        if 'message_body_workers' in local_var_params:
            form_params.append(('messageBodyWorkers', local_var_params['message_body_workers']))  # noqa: E501
        if 'parent' in local_var_params:
            form_params.append(('parent', local_var_params['parent']))  # noqa: E501
        if 'providers' in local_var_params:
            form_params.append(('providers', local_var_params['providers']))  # noqa: E501
        if 'body_parts' in local_var_params:
            form_params.append(('bodyParts', local_var_params['body_parts']))  # noqa: E501
            collection_formats['bodyParts'] = 'csv'  # noqa: E501
        if 'parameterized_headers' in local_var_params:
            form_params.append(('parameterizedHeaders', local_var_params['parameterized_headers']))  # noqa: E501

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/vnd.onshape.v1+json;charset=UTF-8; qs=0.1', 'application/json;charset=UTF-8; qs=0.9'])  # noqa: E501

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

        # Authentication setting
        auth_settings = ['OAuth2']  # noqa: E501

        return self.api_client.call_api(
            '/api/elements/upload/{did}', 'POST',
            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_req=local_var_params.get('async_req'),
            _return_http_data_only=local_var_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=local_var_params.get('_preload_content', True),
            _request_timeout=local_var_params.get('_request_timeout'),
            collection_formats=collection_formats)
