Exemplo n.º 1
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __create_drawing_translation(self, did, wv, wvid, eid,
                                         bt_translate_format_params, **kwargs):
            """Create Drawing translation  # noqa: E501

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

            Args:
                did (str):
                wv (str):
                wvid (str):
                eid (str):
                bt_translate_format_params (bt_translate_format_params.BTTranslateFormatParams):

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_translation_request_info.BTTranslationRequestInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get('async_req', False)
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True)
            kwargs['_preload_content'] = kwargs.get('_preload_content', True)
            kwargs['_request_timeout'] = kwargs.get('_request_timeout', None)
            kwargs['_check_input_type'] = kwargs.get('_check_input_type', True)
            kwargs['_check_return_type'] = kwargs.get('_check_return_type',
                                                      True)
            kwargs['_host_index'] = kwargs.get('_host_index', 0)
            kwargs['did'] = \
                did
            kwargs['wv'] = \
                wv
            kwargs['wvid'] = \
                wvid
            kwargs['eid'] = \
                eid
            kwargs['bt_translate_format_params'] = \
                bt_translate_format_params
            return self.call_with_http_info(**kwargs)

        self.create_drawing_translation = Endpoint(
            settings={
                'response_type':
                (bt_translation_request_info.BTTranslationRequestInfo, ),
                'auth': ['OAuth2'],
                'endpoint_path':
                '/api/drawings/d/{did}/{wv}/{wvid}/e/{eid}/translations',
                'operation_id':
                'create_drawing_translation',
                'http_method':
                'POST',
                'servers': [],
            },
            params_map={
                'all': [
                    'did',
                    'wv',
                    'wvid',
                    'eid',
                    'bt_translate_format_params',
                ],
                'required': [
                    'did',
                    'wv',
                    'wvid',
                    'eid',
                    'bt_translate_format_params',
                ],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'did': (str, ),
                    'wv': (str, ),
                    'wvid': (str, ),
                    'eid': (str, ),
                    'bt_translate_format_params':
                    (bt_translate_format_params.BTTranslateFormatParams, ),
                },
                'attribute_map': {
                    'did': 'did',
                    'wv': 'wv',
                    'wvid': 'wvid',
                    'eid': 'eid',
                },
                'location_map': {
                    'did': 'path',
                    'wv': 'path',
                    'wvid': 'path',
                    'eid': 'path',
                    'bt_translate_format_params': 'body',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept': [
                    'application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1',
                    'application/json;charset=UTF-8; qs=0.09'
                ],
                'content_type': ['application/json;charset=UTF-8; qs=0.09']
            },
            api_client=api_client,
            callable=__create_drawing_translation)

        def __get_drawing_translator_formats(self, did, wid, eid, **kwargs):
            """get_drawing_translator_formats  # 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_drawing_translator_formats(did, wid, eid, async_req=True)
            >>> result = thread.get()

            Args:
                did (str):
                wid (str):
                eid (str):

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                [bt_model_format_info.BTModelFormatInfo]
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get('async_req', False)
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True)
            kwargs['_preload_content'] = kwargs.get('_preload_content', True)
            kwargs['_request_timeout'] = kwargs.get('_request_timeout', None)
            kwargs['_check_input_type'] = kwargs.get('_check_input_type', True)
            kwargs['_check_return_type'] = kwargs.get('_check_return_type',
                                                      True)
            kwargs['_host_index'] = kwargs.get('_host_index', 0)
            kwargs['did'] = \
                did
            kwargs['wid'] = \
                wid
            kwargs['eid'] = \
                eid
            return self.call_with_http_info(**kwargs)

        self.get_drawing_translator_formats = Endpoint(
            settings={
                'response_type': ([bt_model_format_info.BTModelFormatInfo], ),
                'auth': [],
                'endpoint_path':
                '/api/drawings/d/{did}/w/{wid}/e/{eid}/translationformats',
                'operation_id': 'get_drawing_translator_formats',
                'http_method': 'GET',
                'servers': [],
            },
            params_map={
                'all': [
                    'did',
                    'wid',
                    'eid',
                ],
                'required': [
                    'did',
                    'wid',
                    'eid',
                ],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'did': (str, ),
                    'wid': (str, ),
                    'eid': (str, ),
                },
                'attribute_map': {
                    'did': 'did',
                    'wid': 'wid',
                    'eid': 'eid',
                },
                'location_map': {
                    'did': 'path',
                    'wid': 'path',
                    'eid': 'path',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept': [
                    'application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1',
                    'application/json;charset=UTF-8; qs=0.09'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__get_drawing_translator_formats)
Exemplo n.º 2
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __create_obsoletion_package(
            self,
            wfid,
            **kwargs
        ):
            """create_obsoletion_package  # noqa: E501

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

            Args:
                wfid (str):

            Keyword Args:
                revision_id (str): [optional]
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                None
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get(
                'async_req', False
            )
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True
            )
            kwargs['_preload_content'] = kwargs.get(
                '_preload_content', True
            )
            kwargs['_request_timeout'] = kwargs.get(
                '_request_timeout', None
            )
            kwargs['_check_input_type'] = kwargs.get(
                '_check_input_type', True
            )
            kwargs['_check_return_type'] = kwargs.get(
                '_check_return_type', True
            )
            kwargs['_host_index'] = kwargs.get('_host_index', 0)
            kwargs['wfid'] = \
                wfid
            return self.call_with_http_info(**kwargs)

        self.create_obsoletion_package = Endpoint(
            settings={
                'response_type': None,
                'auth': [
                    'OAuth2'
                ],
                'endpoint_path': '/api/releasepackages/obsoletion/{wfid}',
                'operation_id': 'create_obsoletion_package',
                'http_method': 'POST',
                'servers': [],
            },
            params_map={
                'all': [
                    'wfid',
                    'revision_id',
                ],
                'required': [
                    'wfid',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'wfid':
                        (str,),
                    'revision_id':
                        (str,),
                },
                'attribute_map': {
                    'wfid': 'wfid',
                    'revision_id': 'revisionId',
                },
                'location_map': {
                    'wfid': 'path',
                    'revision_id': 'query',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__create_obsoletion_package
        )

        def __create_release_package(
            self,
            wfid,
            bt_release_package_params,
            **kwargs
        ):
            """create_release_package  # noqa: E501

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

            Args:
                wfid (str):
                bt_release_package_params (bt_release_package_params.BTReleasePackageParams):

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                None
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get(
                'async_req', False
            )
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True
            )
            kwargs['_preload_content'] = kwargs.get(
                '_preload_content', True
            )
            kwargs['_request_timeout'] = kwargs.get(
                '_request_timeout', None
            )
            kwargs['_check_input_type'] = kwargs.get(
                '_check_input_type', True
            )
            kwargs['_check_return_type'] = kwargs.get(
                '_check_return_type', True
            )
            kwargs['_host_index'] = kwargs.get('_host_index', 0)
            kwargs['wfid'] = \
                wfid
            kwargs['bt_release_package_params'] = \
                bt_release_package_params
            return self.call_with_http_info(**kwargs)

        self.create_release_package = Endpoint(
            settings={
                'response_type': None,
                'auth': [
                    'OAuth2'
                ],
                'endpoint_path': '/api/releasepackages/release/{wfid}',
                'operation_id': 'create_release_package',
                'http_method': 'POST',
                'servers': [],
            },
            params_map={
                'all': [
                    'wfid',
                    'bt_release_package_params',
                ],
                'required': [
                    'wfid',
                    'bt_release_package_params',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'wfid':
                        (str,),
                    'bt_release_package_params':
                        (bt_release_package_params.BTReleasePackageParams,),
                },
                'attribute_map': {
                    'wfid': 'wfid',
                },
                'location_map': {
                    'wfid': 'path',
                    'bt_release_package_params': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1'
                ],
                'content_type': [
                    'application/json;charset=UTF-8; qs=0.09'
                ]
            },
            api_client=api_client,
            callable=__create_release_package
        )

        def __get_company_release_workflow(
            self,
            **kwargs
        ):
            """get_company_release_workflow  # 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_company_release_workflow(async_req=True)
            >>> result = thread.get()


            Keyword Args:
                document_id (str): [optional]
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_active_workflow_info.BTActiveWorkflowInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get(
                'async_req', False
            )
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True
            )
            kwargs['_preload_content'] = kwargs.get(
                '_preload_content', True
            )
            kwargs['_request_timeout'] = kwargs.get(
                '_request_timeout', None
            )
            kwargs['_check_input_type'] = kwargs.get(
                '_check_input_type', True
            )
            kwargs['_check_return_type'] = kwargs.get(
                '_check_return_type', True
            )
            kwargs['_host_index'] = kwargs.get('_host_index', 0)
            return self.call_with_http_info(**kwargs)

        self.get_company_release_workflow = Endpoint(
            settings={
                'response_type': (bt_active_workflow_info.BTActiveWorkflowInfo,),
                'auth': [
                    'OAuth2'
                ],
                'endpoint_path': '/api/releasepackages/companyreleaseworkflow',
                'operation_id': 'get_company_release_workflow',
                'http_method': 'GET',
                'servers': [],
            },
            params_map={
                'all': [
                    'document_id',
                ],
                'required': [],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'document_id':
                        (str,),
                },
                'attribute_map': {
                    'document_id': 'documentId',
                },
                'location_map': {
                    'document_id': 'query',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__get_company_release_workflow
        )

        def __get_release_package(
            self,
            rpid,
            **kwargs
        ):
            """get_release_package  # 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_release_package(rpid, async_req=True)
            >>> result = thread.get()

            Args:
                rpid (str):

            Keyword Args:
                detailed (bool): [optional] if omitted the server will use the default value of False
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_release_package_info.BTReleasePackageInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get(
                'async_req', False
            )
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True
            )
            kwargs['_preload_content'] = kwargs.get(
                '_preload_content', True
            )
            kwargs['_request_timeout'] = kwargs.get(
                '_request_timeout', None
            )
            kwargs['_check_input_type'] = kwargs.get(
                '_check_input_type', True
            )
            kwargs['_check_return_type'] = kwargs.get(
                '_check_return_type', True
            )
            kwargs['_host_index'] = kwargs.get('_host_index', 0)
            kwargs['rpid'] = \
                rpid
            return self.call_with_http_info(**kwargs)

        self.get_release_package = Endpoint(
            settings={
                'response_type': (bt_release_package_info.BTReleasePackageInfo,),
                'auth': [
                    'OAuth2'
                ],
                'endpoint_path': '/api/releasepackages/{rpid}',
                'operation_id': 'get_release_package',
                'http_method': 'GET',
                'servers': [],
            },
            params_map={
                'all': [
                    'rpid',
                    'detailed',
                ],
                'required': [
                    'rpid',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'rpid':
                        (str,),
                    'detailed':
                        (bool,),
                },
                'attribute_map': {
                    'rpid': 'rpid',
                    'detailed': 'detailed',
                },
                'location_map': {
                    'rpid': 'path',
                    'detailed': 'query',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__get_release_package
        )

        def __update_release_package(
            self,
            rpid,
            bt_update_release_package_params,
            **kwargs
        ):
            """update_release_package  # 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_release_package(rpid, bt_update_release_package_params, async_req=True)
            >>> result = thread.get()

            Args:
                rpid (str):
                bt_update_release_package_params (bt_update_release_package_params.BTUpdateReleasePackageParams):

            Keyword Args:
                action (str): [optional] if omitted the server will use the default value of 'UPDATE'
                wfaction (str): [optional]
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_release_package_info.BTReleasePackageInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get(
                'async_req', False
            )
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True
            )
            kwargs['_preload_content'] = kwargs.get(
                '_preload_content', True
            )
            kwargs['_request_timeout'] = kwargs.get(
                '_request_timeout', None
            )
            kwargs['_check_input_type'] = kwargs.get(
                '_check_input_type', True
            )
            kwargs['_check_return_type'] = kwargs.get(
                '_check_return_type', True
            )
            kwargs['_host_index'] = kwargs.get('_host_index', 0)
            kwargs['rpid'] = \
                rpid
            kwargs['bt_update_release_package_params'] = \
                bt_update_release_package_params
            return self.call_with_http_info(**kwargs)

        self.update_release_package = Endpoint(
            settings={
                'response_type': (bt_release_package_info.BTReleasePackageInfo,),
                'auth': [
                    'OAuth2'
                ],
                'endpoint_path': '/api/releasepackages/{rpid}',
                'operation_id': 'update_release_package',
                'http_method': 'POST',
                'servers': [],
            },
            params_map={
                'all': [
                    'rpid',
                    'bt_update_release_package_params',
                    'action',
                    'wfaction',
                ],
                'required': [
                    'rpid',
                    'bt_update_release_package_params',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'rpid':
                        (str,),
                    'bt_update_release_package_params':
                        (bt_update_release_package_params.BTUpdateReleasePackageParams,),
                    'action':
                        (str,),
                    'wfaction':
                        (str,),
                },
                'attribute_map': {
                    'rpid': 'rpid',
                    'action': 'action',
                    'wfaction': 'wfaction',
                },
                'location_map': {
                    'rpid': 'path',
                    'bt_update_release_package_params': 'body',
                    'action': 'query',
                    'wfaction': 'query',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1'
                ],
                'content_type': [
                    'application/json;charset=UTF-8; qs=0.09'
                ]
            },
            api_client=api_client,
            callable=__update_release_package
        )
Exemplo n.º 3
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __copy_element_from_source_document(
            self, did, wid, bt_copy_element_params, **kwargs
        ):
            """Copy Element  # 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_document(did, wid, bt_copy_element_params, async_req=True)
            >>> result = thread.get()

            Args:
                did (str):
                wid (str):
                bt_copy_element_params (bt_copy_element_params.BTCopyElementParams):

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_document_element_info.BTDocumentElementInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs["async_req"] = kwargs.get("async_req", False)
            kwargs["_return_http_data_only"] = kwargs.get(
                "_return_http_data_only", True
            )
            kwargs["_preload_content"] = kwargs.get("_preload_content", True)
            kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
            kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
            kwargs["_check_return_type"] = kwargs.get("_check_return_type", True)
            kwargs["_host_index"] = kwargs.get("_host_index", 0)
            kwargs["did"] = did
            kwargs["wid"] = wid
            kwargs["bt_copy_element_params"] = bt_copy_element_params
            return self.call_with_http_info(**kwargs)

        self.copy_element_from_source_document = Endpoint(
            settings={
                "response_type": (bt_document_element_info.BTDocumentElementInfo,),
                "auth": ["OAuth2"],
                "endpoint_path": "/api/elements/copyelement/{did}/workspace/{wid}",
                "operation_id": "copy_element_from_source_document",
                "http_method": "POST",
                "servers": [],
            },
            params_map={
                "all": ["did", "wid", "bt_copy_element_params",],
                "required": ["did", "wid", "bt_copy_element_params",],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "did": (str,),
                    "wid": (str,),
                    "bt_copy_element_params": (
                        bt_copy_element_params.BTCopyElementParams,
                    ),
                },
                "attribute_map": {"did": "did", "wid": "wid",},
                "location_map": {
                    "did": "path",
                    "wid": "path",
                    "bt_copy_element_params": "body",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1"],
                "content_type": ["application/json;charset=UTF-8; qs=0.09"],
            },
            api_client=api_client,
            callable=__copy_element_from_source_document,
        )

        def __decode_configuration(self, did, wvm, wvmid, eid, cid, **kwargs):
            """Decode Configuration String  # 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()

            Args:
                did (str):
                wvm (str):
                wvmid (str):
                eid (str):
                cid (str):

            Keyword Args:
                link_document_id (str): [optional]
                include_display (bool): [optional] if omitted the server will use the default value of False
                configuration_is_id (bool): [optional] if omitted the server will use the default value of False
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_configuration_info.BTConfigurationInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs["async_req"] = kwargs.get("async_req", False)
            kwargs["_return_http_data_only"] = kwargs.get(
                "_return_http_data_only", True
            )
            kwargs["_preload_content"] = kwargs.get("_preload_content", True)
            kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
            kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
            kwargs["_check_return_type"] = kwargs.get("_check_return_type", True)
            kwargs["_host_index"] = kwargs.get("_host_index", 0)
            kwargs["did"] = did
            kwargs["wvm"] = wvm
            kwargs["wvmid"] = wvmid
            kwargs["eid"] = eid
            kwargs["cid"] = cid
            return self.call_with_http_info(**kwargs)

        self.decode_configuration = Endpoint(
            settings={
                "response_type": (bt_configuration_info.BTConfigurationInfo,),
                "auth": ["OAuth2"],
                "endpoint_path": "/api/elements/d/{did}/{wvm}/{wvmid}/e/{eid}/configurationencodings/{cid}",
                "operation_id": "decode_configuration",
                "http_method": "GET",
                "servers": [],
            },
            params_map={
                "all": [
                    "did",
                    "wvm",
                    "wvmid",
                    "eid",
                    "cid",
                    "link_document_id",
                    "include_display",
                    "configuration_is_id",
                ],
                "required": ["did", "wvm", "wvmid", "eid", "cid",],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "did": (str,),
                    "wvm": (str,),
                    "wvmid": (str,),
                    "eid": (str,),
                    "cid": (str,),
                    "link_document_id": (str,),
                    "include_display": (bool,),
                    "configuration_is_id": (bool,),
                },
                "attribute_map": {
                    "did": "did",
                    "wvm": "wvm",
                    "wvmid": "wvmid",
                    "eid": "eid",
                    "cid": "cid",
                    "link_document_id": "linkDocumentId",
                    "include_display": "includeDisplay",
                    "configuration_is_id": "configurationIsId",
                },
                "location_map": {
                    "did": "path",
                    "wvm": "path",
                    "wvmid": "path",
                    "eid": "path",
                    "cid": "path",
                    "link_document_id": "query",
                    "include_display": "query",
                    "configuration_is_id": "query",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1"],
                "content_type": [],
            },
            api_client=api_client,
            callable=__decode_configuration,
        )

        def __delete_element(self, did, wid, eid, **kwargs):
            """Delete Element  # noqa: E501

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

            Args:
                did (str):
                wid (str):
                eid (str):

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                None
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs["async_req"] = kwargs.get("async_req", False)
            kwargs["_return_http_data_only"] = kwargs.get(
                "_return_http_data_only", True
            )
            kwargs["_preload_content"] = kwargs.get("_preload_content", True)
            kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
            kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
            kwargs["_check_return_type"] = kwargs.get("_check_return_type", True)
            kwargs["_host_index"] = kwargs.get("_host_index", 0)
            kwargs["did"] = did
            kwargs["wid"] = wid
            kwargs["eid"] = eid
            return self.call_with_http_info(**kwargs)

        self.delete_element = Endpoint(
            settings={
                "response_type": None,
                "auth": ["OAuth2"],
                "endpoint_path": "/api/elements/d/{did}/w/{wid}/e/{eid}",
                "operation_id": "delete_element",
                "http_method": "DELETE",
                "servers": [],
            },
            params_map={
                "all": ["did", "wid", "eid",],
                "required": ["did", "wid", "eid",],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {"did": (str,), "wid": (str,), "eid": (str,),},
                "attribute_map": {"did": "did", "wid": "wid", "eid": "eid",},
                "location_map": {"did": "path", "wid": "path", "eid": "path",},
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1"],
                "content_type": [],
            },
            api_client=api_client,
            callable=__delete_element,
        )

        def __encode_configuration_map(
            self, did, eid, bt_configuration_params, **kwargs
        ):
            """Encode 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.encode_configuration_map(did, eid, bt_configuration_params, async_req=True)
            >>> result = thread.get()

            Args:
                did (str):
                eid (str):
                bt_configuration_params (bt_configuration_params.BTConfigurationParams):

            Keyword Args:
                version_id (str): [optional]
                link_document_id (str): [optional]
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_encoded_configuration_info.BTEncodedConfigurationInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs["async_req"] = kwargs.get("async_req", False)
            kwargs["_return_http_data_only"] = kwargs.get(
                "_return_http_data_only", True
            )
            kwargs["_preload_content"] = kwargs.get("_preload_content", True)
            kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
            kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
            kwargs["_check_return_type"] = kwargs.get("_check_return_type", True)
            kwargs["_host_index"] = kwargs.get("_host_index", 0)
            kwargs["did"] = did
            kwargs["eid"] = eid
            kwargs["bt_configuration_params"] = bt_configuration_params
            return self.call_with_http_info(**kwargs)

        self.encode_configuration_map = Endpoint(
            settings={
                "response_type": (
                    bt_encoded_configuration_info.BTEncodedConfigurationInfo,
                ),
                "auth": ["OAuth2"],
                "endpoint_path": "/api/elements/d/{did}/e/{eid}/configurationencodings",
                "operation_id": "encode_configuration_map",
                "http_method": "POST",
                "servers": [],
            },
            params_map={
                "all": [
                    "did",
                    "eid",
                    "bt_configuration_params",
                    "version_id",
                    "link_document_id",
                ],
                "required": ["did", "eid", "bt_configuration_params",],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "did": (str,),
                    "eid": (str,),
                    "bt_configuration_params": (
                        bt_configuration_params.BTConfigurationParams,
                    ),
                    "version_id": (str,),
                    "link_document_id": (str,),
                },
                "attribute_map": {
                    "did": "did",
                    "eid": "eid",
                    "version_id": "versionId",
                    "link_document_id": "linkDocumentId",
                },
                "location_map": {
                    "did": "path",
                    "eid": "path",
                    "bt_configuration_params": "body",
                    "version_id": "query",
                    "link_document_id": "query",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1"],
                "content_type": ["application/json;charset=UTF-8; qs=0.09"],
            },
            api_client=api_client,
            callable=__encode_configuration_map,
        )

        def __get_configuration(self, did, wvm, wvmid, eid, **kwargs):
            """Get 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.get_configuration(did, wvm, wvmid, eid, async_req=True)
            >>> result = thread.get()

            Args:
                did (str):
                wvm (str):
                wvmid (str):
                eid (str):

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_configuration_info.BTConfigurationInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs["async_req"] = kwargs.get("async_req", False)
            kwargs["_return_http_data_only"] = kwargs.get(
                "_return_http_data_only", True
            )
            kwargs["_preload_content"] = kwargs.get("_preload_content", True)
            kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
            kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
            kwargs["_check_return_type"] = kwargs.get("_check_return_type", True)
            kwargs["_host_index"] = kwargs.get("_host_index", 0)
            kwargs["did"] = did
            kwargs["wvm"] = wvm
            kwargs["wvmid"] = wvmid
            kwargs["eid"] = eid
            return self.call_with_http_info(**kwargs)

        self.get_configuration = Endpoint(
            settings={
                "response_type": (bt_configuration_info.BTConfigurationInfo,),
                "auth": ["OAuth2"],
                "endpoint_path": "/api/elements/d/{did}/{wvm}/{wvmid}/e/{eid}/configuration",
                "operation_id": "get_configuration",
                "http_method": "GET",
                "servers": [],
            },
            params_map={
                "all": ["did", "wvm", "wvmid", "eid",],
                "required": ["did", "wvm", "wvmid", "eid",],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "did": (str,),
                    "wvm": (str,),
                    "wvmid": (str,),
                    "eid": (str,),
                },
                "attribute_map": {
                    "did": "did",
                    "wvm": "wvm",
                    "wvmid": "wvmid",
                    "eid": "eid",
                },
                "location_map": {
                    "did": "path",
                    "wvm": "path",
                    "wvmid": "path",
                    "eid": "path",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1"],
                "content_type": [],
            },
            api_client=api_client,
            callable=__get_configuration,
        )

        def __get_element_translator_formats_by_version_or_workspace(
            self, did, wv, wvid, eid, **kwargs
        ):
            """Get Element Translator Formats  # 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_formats_by_version_or_workspace(did, wv, wvid, eid, async_req=True)
            >>> result = thread.get()

            Args:
                did (str):
                wv (str):
                wvid (str):
                eid (str):

            Keyword Args:
                check_content (bool): [optional] if omitted the server will use the default value of True
                configuration (str): [optional] if omitted the server will use the default value of ''
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                [bt_model_format_info.BTModelFormatInfo]
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs["async_req"] = kwargs.get("async_req", False)
            kwargs["_return_http_data_only"] = kwargs.get(
                "_return_http_data_only", True
            )
            kwargs["_preload_content"] = kwargs.get("_preload_content", True)
            kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
            kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
            kwargs["_check_return_type"] = kwargs.get("_check_return_type", True)
            kwargs["_host_index"] = kwargs.get("_host_index", 0)
            kwargs["did"] = did
            kwargs["wv"] = wv
            kwargs["wvid"] = wvid
            kwargs["eid"] = eid
            return self.call_with_http_info(**kwargs)

        self.get_element_translator_formats_by_version_or_workspace = Endpoint(
            settings={
                "response_type": ([bt_model_format_info.BTModelFormatInfo],),
                "auth": [],
                "endpoint_path": "/api/elements/translatorFormats/{did}/{wv}/{wvid}/{eid}",
                "operation_id": "get_element_translator_formats_by_version_or_workspace",
                "http_method": "GET",
                "servers": [],
            },
            params_map={
                "all": ["did", "wv", "wvid", "eid", "check_content", "configuration",],
                "required": ["did", "wv", "wvid", "eid",],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "did": (str,),
                    "wv": (str,),
                    "wvid": (str,),
                    "eid": (str,),
                    "check_content": (bool,),
                    "configuration": (str,),
                },
                "attribute_map": {
                    "did": "did",
                    "wv": "wv",
                    "wvid": "wvid",
                    "eid": "eid",
                    "check_content": "checkContent",
                    "configuration": "configuration",
                },
                "location_map": {
                    "did": "path",
                    "wv": "path",
                    "wvid": "path",
                    "eid": "path",
                    "check_content": "query",
                    "configuration": "query",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1"],
                "content_type": [],
            },
            api_client=api_client,
            callable=__get_element_translator_formats_by_version_or_workspace,
        )

        def __update_configuration(self, did, wvm, wvmid, eid, **kwargs):
            """Update 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.update_configuration(did, wvm, wvmid, eid, async_req=True)
            >>> result = thread.get()

            Args:
                did (str):
                wvm (str):
                wvmid (str):
                eid (str):

            Keyword Args:
                body (str): [optional]
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_configuration_info.BTConfigurationInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs["async_req"] = kwargs.get("async_req", False)
            kwargs["_return_http_data_only"] = kwargs.get(
                "_return_http_data_only", True
            )
            kwargs["_preload_content"] = kwargs.get("_preload_content", True)
            kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
            kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
            kwargs["_check_return_type"] = kwargs.get("_check_return_type", True)
            kwargs["_host_index"] = kwargs.get("_host_index", 0)
            kwargs["did"] = did
            kwargs["wvm"] = wvm
            kwargs["wvmid"] = wvmid
            kwargs["eid"] = eid
            return self.call_with_http_info(**kwargs)

        self.update_configuration = Endpoint(
            settings={
                "response_type": (bt_configuration_info.BTConfigurationInfo,),
                "auth": ["OAuth2"],
                "endpoint_path": "/api/elements/d/{did}/{wvm}/{wvmid}/e/{eid}/configuration",
                "operation_id": "update_configuration",
                "http_method": "POST",
                "servers": [],
            },
            params_map={
                "all": ["did", "wvm", "wvmid", "eid", "body",],
                "required": ["did", "wvm", "wvmid", "eid",],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "did": (str,),
                    "wvm": (str,),
                    "wvmid": (str,),
                    "eid": (str,),
                    "body": (str,),
                },
                "attribute_map": {
                    "did": "did",
                    "wvm": "wvm",
                    "wvmid": "wvmid",
                    "eid": "eid",
                },
                "location_map": {
                    "did": "path",
                    "wvm": "path",
                    "wvmid": "path",
                    "eid": "path",
                    "body": "body",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1"],
                "content_type": ["application/json;charset=UTF-8; qs=0.09"],
            },
            api_client=api_client,
            callable=__update_configuration,
        )

        def __update_references(
            self, did, wid, eid, bt_update_reference_params, **kwargs
        ):
            """Update or replace node references  # 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_references(did, wid, eid, bt_update_reference_params, async_req=True)
            >>> result = thread.get()

            Args:
                did (str):
                wid (str):
                eid (str):
                bt_update_reference_params (bt_update_reference_params.BTUpdateReferenceParams):

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                None
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs["async_req"] = kwargs.get("async_req", False)
            kwargs["_return_http_data_only"] = kwargs.get(
                "_return_http_data_only", True
            )
            kwargs["_preload_content"] = kwargs.get("_preload_content", True)
            kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
            kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
            kwargs["_check_return_type"] = kwargs.get("_check_return_type", True)
            kwargs["_host_index"] = kwargs.get("_host_index", 0)
            kwargs["did"] = did
            kwargs["wid"] = wid
            kwargs["eid"] = eid
            kwargs["bt_update_reference_params"] = bt_update_reference_params
            return self.call_with_http_info(**kwargs)

        self.update_references = Endpoint(
            settings={
                "response_type": None,
                "auth": ["OAuth2"],
                "endpoint_path": "/api/elements/d/{did}/w/{wid}/e/{eid}/updatereferences",
                "operation_id": "update_references",
                "http_method": "POST",
                "servers": [],
            },
            params_map={
                "all": ["did", "wid", "eid", "bt_update_reference_params",],
                "required": ["did", "wid", "eid", "bt_update_reference_params",],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "did": (str,),
                    "wid": (str,),
                    "eid": (str,),
                    "bt_update_reference_params": (
                        bt_update_reference_params.BTUpdateReferenceParams,
                    ),
                },
                "attribute_map": {"did": "did", "wid": "wid", "eid": "eid",},
                "location_map": {
                    "did": "path",
                    "wid": "path",
                    "eid": "path",
                    "bt_update_reference_params": "body",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1"],
                "content_type": ["application/json;charset=UTF-8; qs=0.09"],
            },
            api_client=api_client,
            callable=__update_references,
        )
 def __init__(self, api_client=None):
     if api_client is None:
         api_client = ApiClient()
     self.api_client = api_client
Exemplo n.º 5
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __get_folder_acl(self, fid, **kwargs):
            """Get Access Control List  # 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_folder_acl(fid, async_req=True)
            >>> result = thread.get()

            Args:
                fid (str):

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_acl_info.BTAclInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get('async_req', False)
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True)
            kwargs['_preload_content'] = kwargs.get('_preload_content', True)
            kwargs['_request_timeout'] = kwargs.get('_request_timeout', None)
            kwargs['_check_input_type'] = kwargs.get('_check_input_type', True)
            kwargs['_check_return_type'] = kwargs.get('_check_return_type',
                                                      True)
            kwargs['_host_index'] = kwargs.get('_host_index', 0)
            kwargs['fid'] = \
                fid
            return self.call_with_http_info(**kwargs)

        self.get_folder_acl = Endpoint(
            settings={
                'response_type': (bt_acl_info.BTAclInfo, ),
                'auth': ['OAuth2'],
                'endpoint_path': '/api/folders/{fid}/acl',
                'operation_id': 'get_folder_acl',
                'http_method': 'GET',
                'servers': [],
            },
            params_map={
                'all': [
                    'fid',
                ],
                'required': [
                    'fid',
                ],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'fid': (str, ),
                },
                'attribute_map': {
                    'fid': 'fid',
                },
                'location_map': {
                    'fid': 'path',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept': [
                    'application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1',
                    'application/json;charset=UTF-8; qs=0.09'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__get_folder_acl)

        def __share(self, fid, bt_share_params, **kwargs):
            """Share Folder  # noqa: E501

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

            Args:
                fid (str):
                bt_share_params (bt_share_params.BTShareParams):

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_acl_info.BTAclInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get('async_req', False)
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True)
            kwargs['_preload_content'] = kwargs.get('_preload_content', True)
            kwargs['_request_timeout'] = kwargs.get('_request_timeout', None)
            kwargs['_check_input_type'] = kwargs.get('_check_input_type', True)
            kwargs['_check_return_type'] = kwargs.get('_check_return_type',
                                                      True)
            kwargs['_host_index'] = kwargs.get('_host_index', 0)
            kwargs['fid'] = \
                fid
            kwargs['bt_share_params'] = \
                bt_share_params
            return self.call_with_http_info(**kwargs)

        self.share = Endpoint(
            settings={
                'response_type': (bt_acl_info.BTAclInfo, ),
                'auth': ['OAuth2'],
                'endpoint_path': '/api/folders/{fid}/share',
                'operation_id': 'share',
                'http_method': 'POST',
                'servers': [],
            },
            params_map={
                'all': [
                    'fid',
                    'bt_share_params',
                ],
                'required': [
                    'fid',
                    'bt_share_params',
                ],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'fid': (str, ),
                    'bt_share_params': (bt_share_params.BTShareParams, ),
                },
                'attribute_map': {
                    'fid': 'fid',
                },
                'location_map': {
                    'fid': 'path',
                    'bt_share_params': 'body',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept': [
                    'application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1',
                    'application/json;charset=UTF-8; qs=0.09'
                ],
                'content_type': ['application/json;charset=UTF-8; qs=0.09']
            },
            api_client=api_client,
            callable=__share)

        def __un_share(self, fid, eid, **kwargs):
            """Unshare Folder  # noqa: E501

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

            Args:
                fid (str):
                eid (str):

            Keyword Args:
                entry_type (int): [optional] if omitted the server will use the default value of 0
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                None
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get('async_req', False)
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True)
            kwargs['_preload_content'] = kwargs.get('_preload_content', True)
            kwargs['_request_timeout'] = kwargs.get('_request_timeout', None)
            kwargs['_check_input_type'] = kwargs.get('_check_input_type', True)
            kwargs['_check_return_type'] = kwargs.get('_check_return_type',
                                                      True)
            kwargs['_host_index'] = kwargs.get('_host_index', 0)
            kwargs['fid'] = \
                fid
            kwargs['eid'] = \
                eid
            return self.call_with_http_info(**kwargs)

        self.un_share = Endpoint(
            settings={
                'response_type': None,
                'auth': ['OAuth2'],
                'endpoint_path': '/api/folders/{fid}/share/{eid}',
                'operation_id': 'un_share',
                'http_method': 'DELETE',
                'servers': [],
            },
            params_map={
                'all': [
                    'fid',
                    'eid',
                    'entry_type',
                ],
                'required': [
                    'fid',
                    'eid',
                ],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'fid': (str, ),
                    'eid': (str, ),
                    'entry_type': (int, ),
                },
                'attribute_map': {
                    'fid': 'fid',
                    'eid': 'eid',
                    'entry_type': 'entryType',
                },
                'location_map': {
                    'fid': 'path',
                    'eid': 'path',
                    'entry_type': 'query',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept': [
                    'application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1',
                    'application/json;charset=UTF-8; qs=0.09'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__un_share)
Exemplo n.º 6
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __delete_app_settings(self, uid, cid, **kwargs):
            """Delete Application Settings  # noqa: E501

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

            Args:
                uid (str):
                cid (str):

            Keyword Args:
                key ([str]): [optional]
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                None
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs["async_req"] = kwargs.get("async_req", False)
            kwargs["_return_http_data_only"] = kwargs.get(
                "_return_http_data_only", True)
            kwargs["_preload_content"] = kwargs.get("_preload_content", True)
            kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
            kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
            kwargs["_check_return_type"] = kwargs.get("_check_return_type",
                                                      True)
            kwargs["_host_index"] = kwargs.get("_host_index", 0)
            kwargs["uid"] = uid
            kwargs["cid"] = cid
            return self.call_with_http_info(**kwargs)

        self.delete_app_settings = Endpoint(
            settings={
                "response_type": None,
                "auth": [],
                "endpoint_path":
                "/api/applications/clients/{cid}/settings/users/{uid}",
                "operation_id": "delete_app_settings",
                "http_method": "DELETE",
                "servers": [],
            },
            params_map={
                "all": [
                    "uid",
                    "cid",
                    "key",
                ],
                "required": [
                    "uid",
                    "cid",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "uid": (str, ),
                    "cid": (str, ),
                    "key": ([str], ),
                },
                "attribute_map": {
                    "uid": "uid",
                    "cid": "cid",
                    "key": "key",
                },
                "location_map": {
                    "uid": "path",
                    "cid": "path",
                    "key": "query",
                },
                "collection_format_map": {
                    "key": "multi",
                },
            },
            headers_map={
                "accept": [],
                "content_type": [],
            },
            api_client=api_client,
            callable=__delete_app_settings,
        )

        def __get_user_app_settings(self, uid, cid, **kwargs):
            """Get User Application Settings  # 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_user_app_settings(uid, cid, async_req=True)
            >>> result = thread.get()

            Args:
                uid (str):
                cid (str):

            Keyword Args:
                key ([str]): [optional]
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_user_app_settings_info.BTUserAppSettingsInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs["async_req"] = kwargs.get("async_req", False)
            kwargs["_return_http_data_only"] = kwargs.get(
                "_return_http_data_only", True)
            kwargs["_preload_content"] = kwargs.get("_preload_content", True)
            kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
            kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
            kwargs["_check_return_type"] = kwargs.get("_check_return_type",
                                                      True)
            kwargs["_host_index"] = kwargs.get("_host_index", 0)
            kwargs["uid"] = uid
            kwargs["cid"] = cid
            return self.call_with_http_info(**kwargs)

        self.get_user_app_settings = Endpoint(
            settings={
                "response_type":
                (bt_user_app_settings_info.BTUserAppSettingsInfo, ),
                "auth": [],
                "endpoint_path":
                "/api/applications/clients/{cid}/settings/users/{uid}",
                "operation_id": "get_user_app_settings",
                "http_method": "GET",
                "servers": [],
            },
            params_map={
                "all": [
                    "uid",
                    "cid",
                    "key",
                ],
                "required": [
                    "uid",
                    "cid",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "uid": (str, ),
                    "cid": (str, ),
                    "key": ([str], ),
                },
                "attribute_map": {
                    "uid": "uid",
                    "cid": "cid",
                    "key": "key",
                },
                "location_map": {
                    "uid": "path",
                    "cid": "path",
                    "key": "query",
                },
                "collection_format_map": {
                    "key": "multi",
                },
            },
            headers_map={
                "accept":
                ["application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1"],
                "content_type": [],
            },
            api_client=api_client,
            callable=__get_user_app_settings,
        )

        def __update_app_settings(self, uid, cid, bt_user_app_settings_params,
                                  **kwargs):
            """Update Application Settings  # 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_app_settings(uid, cid, bt_user_app_settings_params, async_req=True)
            >>> result = thread.get()

            Args:
                uid (str):
                cid (str):
                bt_user_app_settings_params (bt_user_app_settings_params.BTUserAppSettingsParams):

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                None
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs["async_req"] = kwargs.get("async_req", False)
            kwargs["_return_http_data_only"] = kwargs.get(
                "_return_http_data_only", True)
            kwargs["_preload_content"] = kwargs.get("_preload_content", True)
            kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
            kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
            kwargs["_check_return_type"] = kwargs.get("_check_return_type",
                                                      True)
            kwargs["_host_index"] = kwargs.get("_host_index", 0)
            kwargs["uid"] = uid
            kwargs["cid"] = cid
            kwargs["bt_user_app_settings_params"] = bt_user_app_settings_params
            return self.call_with_http_info(**kwargs)

        self.update_app_settings = Endpoint(
            settings={
                "response_type": None,
                "auth": [],
                "endpoint_path":
                "/api/applications/clients/{cid}/settings/users/{uid}",
                "operation_id": "update_app_settings",
                "http_method": "POST",
                "servers": [],
            },
            params_map={
                "all": [
                    "uid",
                    "cid",
                    "bt_user_app_settings_params",
                ],
                "required": [
                    "uid",
                    "cid",
                    "bt_user_app_settings_params",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "uid": (str, ),
                    "cid": (str, ),
                    "bt_user_app_settings_params":
                    (bt_user_app_settings_params.BTUserAppSettingsParams, ),
                },
                "attribute_map": {
                    "uid": "uid",
                    "cid": "cid",
                },
                "location_map": {
                    "uid": "path",
                    "cid": "path",
                    "bt_user_app_settings_params": "body",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept": [],
                "content_type": ["application/json;charset=UTF-8; qs=0.09"],
            },
            api_client=api_client,
            callable=__update_app_settings,
        )
Exemplo n.º 7
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __get_user_settings(self, uid, **kwargs):
            """get_user_settings  # 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_user_settings(uid, async_req=True)
            >>> result = thread.get()

            Args:
                uid (str):

            Keyword Args:
                includematerials (bool): [optional] if omitted the server will use the default value of True
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_user_settings_info.BTUserSettingsInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs["async_req"] = kwargs.get("async_req", False)
            kwargs["_return_http_data_only"] = kwargs.get(
                "_return_http_data_only", True)
            kwargs["_preload_content"] = kwargs.get("_preload_content", True)
            kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
            kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
            kwargs["_check_return_type"] = kwargs.get("_check_return_type",
                                                      True)
            kwargs["_host_index"] = kwargs.get("_host_index", 0)
            kwargs["uid"] = uid
            return self.call_with_http_info(**kwargs)

        self.get_user_settings = Endpoint(
            settings={
                "response_type": (bt_user_settings_info.BTUserSettingsInfo, ),
                "auth": [],
                "endpoint_path": "/api/users/{uid}/settings",
                "operation_id": "get_user_settings",
                "http_method": "GET",
                "servers": [],
            },
            params_map={
                "all": [
                    "uid",
                    "includematerials",
                ],
                "required": [
                    "uid",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "uid": (str, ),
                    "includematerials": (bool, ),
                },
                "attribute_map": {
                    "uid": "uid",
                    "includematerials": "includematerials",
                },
                "location_map": {
                    "uid": "path",
                    "includematerials": "query",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept":
                ["application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1"],
                "content_type": [],
            },
            api_client=api_client,
            callable=__get_user_settings,
        )

        def __get_user_settings_current_logged_in_user(self, **kwargs):
            """get_user_settings_current_logged_in_user  # 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_user_settings_current_logged_in_user(async_req=True)
            >>> result = thread.get()


            Keyword Args:
                includematerials (bool): [optional] if omitted the server will use the default value of True
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_user_settings_info.BTUserSettingsInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs["async_req"] = kwargs.get("async_req", False)
            kwargs["_return_http_data_only"] = kwargs.get(
                "_return_http_data_only", True)
            kwargs["_preload_content"] = kwargs.get("_preload_content", True)
            kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
            kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
            kwargs["_check_return_type"] = kwargs.get("_check_return_type",
                                                      True)
            kwargs["_host_index"] = kwargs.get("_host_index", 0)
            return self.call_with_http_info(**kwargs)

        self.get_user_settings_current_logged_in_user = Endpoint(
            settings={
                "response_type": (bt_user_settings_info.BTUserSettingsInfo, ),
                "auth": [],
                "endpoint_path": "/api/users/settings",
                "operation_id": "get_user_settings_current_logged_in_user",
                "http_method": "GET",
                "servers": [],
            },
            params_map={
                "all": [
                    "includematerials",
                ],
                "required": [],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "includematerials": (bool, ),
                },
                "attribute_map": {
                    "includematerials": "includematerials",
                },
                "location_map": {
                    "includematerials": "query",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept":
                ["application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1"],
                "content_type": [],
            },
            api_client=api_client,
            callable=__get_user_settings_current_logged_in_user,
        )

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

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


            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_user_o_auth2_summary_info.BTUserOAuth2SummaryInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs["async_req"] = kwargs.get("async_req", False)
            kwargs["_return_http_data_only"] = kwargs.get(
                "_return_http_data_only", True)
            kwargs["_preload_content"] = kwargs.get("_preload_content", True)
            kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
            kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
            kwargs["_check_return_type"] = kwargs.get("_check_return_type",
                                                      True)
            kwargs["_host_index"] = kwargs.get("_host_index", 0)
            return self.call_with_http_info(**kwargs)

        self.session_info = Endpoint(
            settings={
                "response_type":
                (bt_user_o_auth2_summary_info.BTUserOAuth2SummaryInfo, ),
                "auth": [],
                "endpoint_path":
                "/api/users/sessioninfo",
                "operation_id":
                "session_info",
                "http_method":
                "GET",
                "servers": [],
            },
            params_map={
                "all": [],
                "required": [],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {},
                "attribute_map": {},
                "location_map": {},
                "collection_format_map": {},
            },
            headers_map={
                "accept":
                ["application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1"],
                "content_type": [],
            },
            api_client=api_client,
            callable=__session_info,
        )
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __create_obsoletion_package(self, wfid, **kwargs):
            """create_obsoletion_package  # noqa: E501

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

            Args:
                wfid (str):

            Keyword Args:
                revision_id (str): [optional]
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                None
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs["async_req"] = kwargs.get("async_req", False)
            kwargs["_return_http_data_only"] = kwargs.get(
                "_return_http_data_only", True)
            kwargs["_preload_content"] = kwargs.get("_preload_content", True)
            kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
            kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
            kwargs["_check_return_type"] = kwargs.get("_check_return_type",
                                                      True)
            kwargs["_host_index"] = kwargs.get("_host_index", 0)
            kwargs["wfid"] = wfid
            return self.call_with_http_info(**kwargs)

        self.create_obsoletion_package = Endpoint(
            settings={
                "response_type": None,
                "auth": ["OAuth2"],
                "endpoint_path": "/api/releasepackages/obsoletion/{wfid}",
                "operation_id": "create_obsoletion_package",
                "http_method": "POST",
                "servers": [],
            },
            params_map={
                "all": [
                    "wfid",
                    "revision_id",
                ],
                "required": [
                    "wfid",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "wfid": (str, ),
                    "revision_id": (str, ),
                },
                "attribute_map": {
                    "wfid": "wfid",
                    "revision_id": "revisionId",
                },
                "location_map": {
                    "wfid": "path",
                    "revision_id": "query",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept":
                ["application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1"],
                "content_type": [],
            },
            api_client=api_client,
            callable=__create_obsoletion_package,
        )

        def __create_release_package(self, wfid, bt_release_package_params,
                                     **kwargs):
            """create_release_package  # noqa: E501

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

            Args:
                wfid (str):
                bt_release_package_params (bt_release_package_params.BTReleasePackageParams):

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                None
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs["async_req"] = kwargs.get("async_req", False)
            kwargs["_return_http_data_only"] = kwargs.get(
                "_return_http_data_only", True)
            kwargs["_preload_content"] = kwargs.get("_preload_content", True)
            kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
            kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
            kwargs["_check_return_type"] = kwargs.get("_check_return_type",
                                                      True)
            kwargs["_host_index"] = kwargs.get("_host_index", 0)
            kwargs["wfid"] = wfid
            kwargs["bt_release_package_params"] = bt_release_package_params
            return self.call_with_http_info(**kwargs)

        self.create_release_package = Endpoint(
            settings={
                "response_type": None,
                "auth": ["OAuth2"],
                "endpoint_path": "/api/releasepackages/release/{wfid}",
                "operation_id": "create_release_package",
                "http_method": "POST",
                "servers": [],
            },
            params_map={
                "all": [
                    "wfid",
                    "bt_release_package_params",
                ],
                "required": [
                    "wfid",
                    "bt_release_package_params",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "wfid": (str, ),
                    "bt_release_package_params":
                    (bt_release_package_params.BTReleasePackageParams, ),
                },
                "attribute_map": {
                    "wfid": "wfid",
                },
                "location_map": {
                    "wfid": "path",
                    "bt_release_package_params": "body",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept":
                ["application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1"],
                "content_type": ["application/json;charset=UTF-8; qs=0.09"],
            },
            api_client=api_client,
            callable=__create_release_package,
        )

        def __get_company_release_workflow(self, **kwargs):
            """get_company_release_workflow  # 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_company_release_workflow(async_req=True)
            >>> result = thread.get()


            Keyword Args:
                document_id (str): [optional]
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_active_workflow_info.BTActiveWorkflowInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs["async_req"] = kwargs.get("async_req", False)
            kwargs["_return_http_data_only"] = kwargs.get(
                "_return_http_data_only", True)
            kwargs["_preload_content"] = kwargs.get("_preload_content", True)
            kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
            kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
            kwargs["_check_return_type"] = kwargs.get("_check_return_type",
                                                      True)
            kwargs["_host_index"] = kwargs.get("_host_index", 0)
            return self.call_with_http_info(**kwargs)

        self.get_company_release_workflow = Endpoint(
            settings={
                "response_type":
                (bt_active_workflow_info.BTActiveWorkflowInfo, ),
                "auth": ["OAuth2"],
                "endpoint_path": "/api/releasepackages/companyreleaseworkflow",
                "operation_id": "get_company_release_workflow",
                "http_method": "GET",
                "servers": [],
            },
            params_map={
                "all": [
                    "document_id",
                ],
                "required": [],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "document_id": (str, ),
                },
                "attribute_map": {
                    "document_id": "documentId",
                },
                "location_map": {
                    "document_id": "query",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept":
                ["application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1"],
                "content_type": [],
            },
            api_client=api_client,
            callable=__get_company_release_workflow,
        )

        def __get_release_package(self, rpid, **kwargs):
            """get_release_package  # 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_release_package(rpid, async_req=True)
            >>> result = thread.get()

            Args:
                rpid (str):

            Keyword Args:
                detailed (bool): [optional] if omitted the server will use the default value of False
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_release_package_info.BTReleasePackageInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs["async_req"] = kwargs.get("async_req", False)
            kwargs["_return_http_data_only"] = kwargs.get(
                "_return_http_data_only", True)
            kwargs["_preload_content"] = kwargs.get("_preload_content", True)
            kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
            kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
            kwargs["_check_return_type"] = kwargs.get("_check_return_type",
                                                      True)
            kwargs["_host_index"] = kwargs.get("_host_index", 0)
            kwargs["rpid"] = rpid
            return self.call_with_http_info(**kwargs)

        self.get_release_package = Endpoint(
            settings={
                "response_type":
                (bt_release_package_info.BTReleasePackageInfo, ),
                "auth": ["OAuth2"],
                "endpoint_path": "/api/releasepackages/{rpid}",
                "operation_id": "get_release_package",
                "http_method": "GET",
                "servers": [],
            },
            params_map={
                "all": [
                    "rpid",
                    "detailed",
                ],
                "required": [
                    "rpid",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "rpid": (str, ),
                    "detailed": (bool, ),
                },
                "attribute_map": {
                    "rpid": "rpid",
                    "detailed": "detailed",
                },
                "location_map": {
                    "rpid": "path",
                    "detailed": "query",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept":
                ["application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1"],
                "content_type": [],
            },
            api_client=api_client,
            callable=__get_release_package,
        )

        def __update_release_package(self, rpid,
                                     bt_update_release_package_params,
                                     **kwargs):
            """update_release_package  # 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_release_package(rpid, bt_update_release_package_params, async_req=True)
            >>> result = thread.get()

            Args:
                rpid (str):
                bt_update_release_package_params (bt_update_release_package_params.BTUpdateReleasePackageParams):

            Keyword Args:
                action (str): [optional] if omitted the server will use the default value of 'UPDATE'
                wfaction (str): [optional]
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_release_package_info.BTReleasePackageInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs["async_req"] = kwargs.get("async_req", False)
            kwargs["_return_http_data_only"] = kwargs.get(
                "_return_http_data_only", True)
            kwargs["_preload_content"] = kwargs.get("_preload_content", True)
            kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
            kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
            kwargs["_check_return_type"] = kwargs.get("_check_return_type",
                                                      True)
            kwargs["_host_index"] = kwargs.get("_host_index", 0)
            kwargs["rpid"] = rpid
            kwargs[
                "bt_update_release_package_params"] = bt_update_release_package_params
            return self.call_with_http_info(**kwargs)

        self.update_release_package = Endpoint(
            settings={
                "response_type":
                (bt_release_package_info.BTReleasePackageInfo, ),
                "auth": ["OAuth2"],
                "endpoint_path": "/api/releasepackages/{rpid}",
                "operation_id": "update_release_package",
                "http_method": "POST",
                "servers": [],
            },
            params_map={
                "all": [
                    "rpid",
                    "bt_update_release_package_params",
                    "action",
                    "wfaction",
                ],
                "required": [
                    "rpid",
                    "bt_update_release_package_params",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "rpid": (str, ),
                    "bt_update_release_package_params":
                    (bt_update_release_package_params.
                     BTUpdateReleasePackageParams, ),
                    "action": (str, ),
                    "wfaction": (str, ),
                },
                "attribute_map": {
                    "rpid": "rpid",
                    "action": "action",
                    "wfaction": "wfaction",
                },
                "location_map": {
                    "rpid": "path",
                    "bt_update_release_package_params": "body",
                    "action": "query",
                    "wfaction": "query",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept":
                ["application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1"],
                "content_type": ["application/json;charset=UTF-8; qs=0.09"],
            },
            api_client=api_client,
            callable=__update_release_package,
        )
Exemplo n.º 9
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __delete_app_settings(self, uid, cid, **kwargs):
            """Delete Application Settings  # noqa: E501

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

            Args:
                uid (str):
                cid (str):

            Keyword Args:
                key ([str]): [optional]
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                None
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get('async_req', False)
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True)
            kwargs['_preload_content'] = kwargs.get('_preload_content', True)
            kwargs['_request_timeout'] = kwargs.get('_request_timeout', None)
            kwargs['_check_input_type'] = kwargs.get('_check_input_type', True)
            kwargs['_check_return_type'] = kwargs.get('_check_return_type',
                                                      True)
            kwargs['_host_index'] = kwargs.get('_host_index', 0)
            kwargs['uid'] = \
                uid
            kwargs['cid'] = \
                cid
            return self.call_with_http_info(**kwargs)

        self.delete_app_settings = Endpoint(settings={
            'response_type': None,
            'auth': [],
            'endpoint_path':
            '/api/applications/clients/{cid}/settings/users/{uid}',
            'operation_id': 'delete_app_settings',
            'http_method': 'DELETE',
            'servers': [],
        },
                                            params_map={
                                                'all': [
                                                    'uid',
                                                    'cid',
                                                    'key',
                                                ],
                                                'required': [
                                                    'uid',
                                                    'cid',
                                                ],
                                                'nullable': [],
                                                'enum': [],
                                                'validation': []
                                            },
                                            root_map={
                                                'validations': {},
                                                'allowed_values': {},
                                                'openapi_types': {
                                                    'uid': (str, ),
                                                    'cid': (str, ),
                                                    'key': ([str], ),
                                                },
                                                'attribute_map': {
                                                    'uid': 'uid',
                                                    'cid': 'cid',
                                                    'key': 'key',
                                                },
                                                'location_map': {
                                                    'uid': 'path',
                                                    'cid': 'path',
                                                    'key': 'query',
                                                },
                                                'collection_format_map': {
                                                    'key': 'multi',
                                                }
                                            },
                                            headers_map={
                                                'accept': [],
                                                'content_type': [],
                                            },
                                            api_client=api_client,
                                            callable=__delete_app_settings)

        def __get_user_app_settings(self, uid, cid, **kwargs):
            """Get User Application Settings  # 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_user_app_settings(uid, cid, async_req=True)
            >>> result = thread.get()

            Args:
                uid (str):
                cid (str):

            Keyword Args:
                key ([str]): [optional]
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_user_app_settings_info.BTUserAppSettingsInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get('async_req', False)
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True)
            kwargs['_preload_content'] = kwargs.get('_preload_content', True)
            kwargs['_request_timeout'] = kwargs.get('_request_timeout', None)
            kwargs['_check_input_type'] = kwargs.get('_check_input_type', True)
            kwargs['_check_return_type'] = kwargs.get('_check_return_type',
                                                      True)
            kwargs['_host_index'] = kwargs.get('_host_index', 0)
            kwargs['uid'] = \
                uid
            kwargs['cid'] = \
                cid
            return self.call_with_http_info(**kwargs)

        self.get_user_app_settings = Endpoint(
            settings={
                'response_type':
                (bt_user_app_settings_info.BTUserAppSettingsInfo, ),
                'auth': [],
                'endpoint_path':
                '/api/applications/clients/{cid}/settings/users/{uid}',
                'operation_id': 'get_user_app_settings',
                'http_method': 'GET',
                'servers': [],
            },
            params_map={
                'all': [
                    'uid',
                    'cid',
                    'key',
                ],
                'required': [
                    'uid',
                    'cid',
                ],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'uid': (str, ),
                    'cid': (str, ),
                    'key': ([str], ),
                },
                'attribute_map': {
                    'uid': 'uid',
                    'cid': 'cid',
                    'key': 'key',
                },
                'location_map': {
                    'uid': 'path',
                    'cid': 'path',
                    'key': 'query',
                },
                'collection_format_map': {
                    'key': 'multi',
                }
            },
            headers_map={
                'accept': [
                    'application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1',
                    'application/json;charset=UTF-8; qs=0.09'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__get_user_app_settings)

        def __update_app_settings(self, uid, cid, bt_user_app_settings_params,
                                  **kwargs):
            """Update Application Settings  # 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_app_settings(uid, cid, bt_user_app_settings_params, async_req=True)
            >>> result = thread.get()

            Args:
                uid (str):
                cid (str):
                bt_user_app_settings_params (bt_user_app_settings_params.BTUserAppSettingsParams):

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                None
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get('async_req', False)
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True)
            kwargs['_preload_content'] = kwargs.get('_preload_content', True)
            kwargs['_request_timeout'] = kwargs.get('_request_timeout', None)
            kwargs['_check_input_type'] = kwargs.get('_check_input_type', True)
            kwargs['_check_return_type'] = kwargs.get('_check_return_type',
                                                      True)
            kwargs['_host_index'] = kwargs.get('_host_index', 0)
            kwargs['uid'] = \
                uid
            kwargs['cid'] = \
                cid
            kwargs['bt_user_app_settings_params'] = \
                bt_user_app_settings_params
            return self.call_with_http_info(**kwargs)

        self.update_app_settings = Endpoint(
            settings={
                'response_type': None,
                'auth': [],
                'endpoint_path':
                '/api/applications/clients/{cid}/settings/users/{uid}',
                'operation_id': 'update_app_settings',
                'http_method': 'POST',
                'servers': [],
            },
            params_map={
                'all': [
                    'uid',
                    'cid',
                    'bt_user_app_settings_params',
                ],
                'required': [
                    'uid',
                    'cid',
                    'bt_user_app_settings_params',
                ],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'uid': (str, ),
                    'cid': (str, ),
                    'bt_user_app_settings_params':
                    (bt_user_app_settings_params.BTUserAppSettingsParams, ),
                },
                'attribute_map': {
                    'uid': 'uid',
                    'cid': 'cid',
                },
                'location_map': {
                    'uid': 'path',
                    'cid': 'path',
                    'bt_user_app_settings_params': 'body',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept': [],
                'content_type': ['application/json;charset=UTF-8; qs=0.09']
            },
            api_client=api_client,
            callable=__update_app_settings)
Exemplo n.º 10
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __get_client_plans(self, cid, **kwargs):
            """Get billing plans for client.  # 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_client_plans(cid, async_req=True)
            >>> result = thread.get()

            Args:
                cid (str):

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                None
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get('async_req', False)
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True)
            kwargs['_preload_content'] = kwargs.get('_preload_content', True)
            kwargs['_request_timeout'] = kwargs.get('_request_timeout', None)
            kwargs['_check_input_type'] = kwargs.get('_check_input_type', True)
            kwargs['_check_return_type'] = kwargs.get('_check_return_type',
                                                      True)
            kwargs['_host_index'] = kwargs.get('_host_index', 0)
            kwargs['cid'] = \
                cid
            return self.call_with_http_info(**kwargs)

        self.get_client_plans = Endpoint(settings={
            'response_type': None,
            'auth': [],
            'endpoint_path': '/api/billing/plans/client/{cid}',
            'operation_id': 'get_client_plans',
            'http_method': 'GET',
            'servers': [],
        },
                                         params_map={
                                             'all': [
                                                 'cid',
                                             ],
                                             'required': [
                                                 'cid',
                                             ],
                                             'nullable': [],
                                             'enum': [],
                                             'validation': []
                                         },
                                         root_map={
                                             'validations': {},
                                             'allowed_values': {},
                                             'openapi_types': {
                                                 'cid': (str, ),
                                             },
                                             'attribute_map': {
                                                 'cid': 'cid',
                                             },
                                             'location_map': {
                                                 'cid': 'path',
                                             },
                                             'collection_format_map': {}
                                         },
                                         headers_map={
                                             'accept': [],
                                             'content_type': [],
                                         },
                                         api_client=api_client,
                                         callable=__get_client_plans)
Exemplo n.º 11
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __get_folder_acl(self, fid, **kwargs):
            """Get Access Control List  # 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_folder_acl(fid, async_req=True)
            >>> result = thread.get()

            Args:
                fid (str):

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_acl_info.BTAclInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs["async_req"] = kwargs.get("async_req", False)
            kwargs["_return_http_data_only"] = kwargs.get(
                "_return_http_data_only", True)
            kwargs["_preload_content"] = kwargs.get("_preload_content", True)
            kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
            kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
            kwargs["_check_return_type"] = kwargs.get("_check_return_type",
                                                      True)
            kwargs["_host_index"] = kwargs.get("_host_index", 0)
            kwargs["fid"] = fid
            return self.call_with_http_info(**kwargs)

        self.get_folder_acl = Endpoint(
            settings={
                "response_type": (bt_acl_info.BTAclInfo, ),
                "auth": ["OAuth2"],
                "endpoint_path": "/api/folders/{fid}/acl",
                "operation_id": "get_folder_acl",
                "http_method": "GET",
                "servers": [],
            },
            params_map={
                "all": [
                    "fid",
                ],
                "required": [
                    "fid",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "fid": (str, ),
                },
                "attribute_map": {
                    "fid": "fid",
                },
                "location_map": {
                    "fid": "path",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept":
                ["application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1"],
                "content_type": [],
            },
            api_client=api_client,
            callable=__get_folder_acl,
        )

        def __share(self, fid, bt_share_params, **kwargs):
            """Share Folder  # noqa: E501

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

            Args:
                fid (str):
                bt_share_params (bt_share_params.BTShareParams):

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_acl_info.BTAclInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs["async_req"] = kwargs.get("async_req", False)
            kwargs["_return_http_data_only"] = kwargs.get(
                "_return_http_data_only", True)
            kwargs["_preload_content"] = kwargs.get("_preload_content", True)
            kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
            kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
            kwargs["_check_return_type"] = kwargs.get("_check_return_type",
                                                      True)
            kwargs["_host_index"] = kwargs.get("_host_index", 0)
            kwargs["fid"] = fid
            kwargs["bt_share_params"] = bt_share_params
            return self.call_with_http_info(**kwargs)

        self.share = Endpoint(
            settings={
                "response_type": (bt_acl_info.BTAclInfo, ),
                "auth": ["OAuth2"],
                "endpoint_path": "/api/folders/{fid}/share",
                "operation_id": "share",
                "http_method": "POST",
                "servers": [],
            },
            params_map={
                "all": [
                    "fid",
                    "bt_share_params",
                ],
                "required": [
                    "fid",
                    "bt_share_params",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "fid": (str, ),
                    "bt_share_params": (bt_share_params.BTShareParams, ),
                },
                "attribute_map": {
                    "fid": "fid",
                },
                "location_map": {
                    "fid": "path",
                    "bt_share_params": "body",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept":
                ["application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1"],
                "content_type": ["application/json;charset=UTF-8; qs=0.09"],
            },
            api_client=api_client,
            callable=__share,
        )

        def __un_share(self, fid, eid, **kwargs):
            """Unshare Folder  # noqa: E501

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

            Args:
                fid (str):
                eid (str):

            Keyword Args:
                entry_type (int): [optional] if omitted the server will use the default value of 0
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                None
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs["async_req"] = kwargs.get("async_req", False)
            kwargs["_return_http_data_only"] = kwargs.get(
                "_return_http_data_only", True)
            kwargs["_preload_content"] = kwargs.get("_preload_content", True)
            kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
            kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
            kwargs["_check_return_type"] = kwargs.get("_check_return_type",
                                                      True)
            kwargs["_host_index"] = kwargs.get("_host_index", 0)
            kwargs["fid"] = fid
            kwargs["eid"] = eid
            return self.call_with_http_info(**kwargs)

        self.un_share = Endpoint(
            settings={
                "response_type": None,
                "auth": ["OAuth2"],
                "endpoint_path": "/api/folders/{fid}/share/{eid}",
                "operation_id": "un_share",
                "http_method": "DELETE",
                "servers": [],
            },
            params_map={
                "all": [
                    "fid",
                    "eid",
                    "entry_type",
                ],
                "required": [
                    "fid",
                    "eid",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "fid": (str, ),
                    "eid": (str, ),
                    "entry_type": (int, ),
                },
                "attribute_map": {
                    "fid": "fid",
                    "eid": "eid",
                    "entry_type": "entryType",
                },
                "location_map": {
                    "fid": "path",
                    "eid": "path",
                    "entry_type": "query",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept":
                ["application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1"],
                "content_type": [],
            },
            api_client=api_client,
            callable=__un_share,
        )
Exemplo n.º 12
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __enumerate_revisions(
            self,
            cid,
            **kwargs
        ):
            """enumerate_revisions  # noqa: E501

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

            Args:
                cid (str):

            Keyword Args:
                element_type (int): [optional]
                limit (int): [optional] if omitted the server will use the default value of 20
                offset (int): [optional] if omitted the server will use the default value of 0
                latest_only (bool): [optional] if omitted the server will use the default value of False
                after (int): [optional]
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_list_response_bt_revision_info.BTListResponseBTRevisionInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get(
                'async_req', False
            )
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True
            )
            kwargs['_preload_content'] = kwargs.get(
                '_preload_content', True
            )
            kwargs['_request_timeout'] = kwargs.get(
                '_request_timeout', None
            )
            kwargs['_check_input_type'] = kwargs.get(
                '_check_input_type', True
            )
            kwargs['_check_return_type'] = kwargs.get(
                '_check_return_type', True
            )
            kwargs['_host_index'] = kwargs.get('_host_index', 0)
            kwargs['cid'] = \
                cid
            return self.call_with_http_info(**kwargs)

        self.enumerate_revisions = Endpoint(
            settings={
                'response_type': (bt_list_response_bt_revision_info.BTListResponseBTRevisionInfo,),
                'auth': [
                    'OAuth2'
                ],
                'endpoint_path': '/api/revisions/companies/{cid}',
                'operation_id': 'enumerate_revisions',
                'http_method': 'GET',
                'servers': [],
            },
            params_map={
                'all': [
                    'cid',
                    'element_type',
                    'limit',
                    'offset',
                    'latest_only',
                    'after',
                ],
                'required': [
                    'cid',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'cid':
                        (str,),
                    'element_type':
                        (int,),
                    'limit':
                        (int,),
                    'offset':
                        (int,),
                    'latest_only':
                        (bool,),
                    'after':
                        (int,),
                },
                'attribute_map': {
                    'cid': 'cid',
                    'element_type': 'elementType',
                    'limit': 'limit',
                    'offset': 'offset',
                    'latest_only': 'latestOnly',
                    'after': 'after',
                },
                'location_map': {
                    'cid': 'path',
                    'element_type': 'query',
                    'limit': 'query',
                    'offset': 'query',
                    'latest_only': 'query',
                    'after': 'query',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1',
                    'application/json;charset=UTF-8; qs=0.09'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__enumerate_revisions
        )

        def __get_latest_in_document_or_company(
            self,
            cd,
            cdid,
            pnum,
            **kwargs
        ):
            """get_latest_in_document_or_company  # 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_latest_in_document_or_company(cd, cdid, pnum, async_req=True)
            >>> result = thread.get()

            Args:
                cd (str):
                cdid (str):
                pnum (str):

            Keyword Args:
                et (str): [optional]
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_revision_info.BTRevisionInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get(
                'async_req', False
            )
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True
            )
            kwargs['_preload_content'] = kwargs.get(
                '_preload_content', True
            )
            kwargs['_request_timeout'] = kwargs.get(
                '_request_timeout', None
            )
            kwargs['_check_input_type'] = kwargs.get(
                '_check_input_type', True
            )
            kwargs['_check_return_type'] = kwargs.get(
                '_check_return_type', True
            )
            kwargs['_host_index'] = kwargs.get('_host_index', 0)
            kwargs['cd'] = \
                cd
            kwargs['cdid'] = \
                cdid
            kwargs['pnum'] = \
                pnum
            return self.call_with_http_info(**kwargs)

        self.get_latest_in_document_or_company = Endpoint(
            settings={
                'response_type': (bt_revision_info.BTRevisionInfo,),
                'auth': [
                    'OAuth2'
                ],
                'endpoint_path': '/api/revisions/{cd}/{cdid}/p/{pnum}/latest',
                'operation_id': 'get_latest_in_document_or_company',
                'http_method': 'GET',
                'servers': [],
            },
            params_map={
                'all': [
                    'cd',
                    'cdid',
                    'pnum',
                    'et',
                ],
                'required': [
                    'cd',
                    'cdid',
                    'pnum',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'cd':
                        (str,),
                    'cdid':
                        (str,),
                    'pnum':
                        (str,),
                    'et':
                        (str,),
                },
                'attribute_map': {
                    'cd': 'cd',
                    'cdid': 'cdid',
                    'pnum': 'pnum',
                    'et': 'et',
                },
                'location_map': {
                    'cd': 'path',
                    'cdid': 'path',
                    'pnum': 'path',
                    'et': 'query',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1',
                    'application/json;charset=UTF-8; qs=0.09'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__get_latest_in_document_or_company
        )

        def __get_revision_history_in_company(
            self,
            cid,
            pnum,
            **kwargs
        ):
            """get_revision_history_in_company  # 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_revision_history_in_company(cid, pnum, async_req=True)
            >>> result = thread.get()

            Args:
                cid (str):
                pnum (str):

            Keyword Args:
                element_type (str): [optional]
                fill_approvers (bool): [optional] if omitted the server will use the default value of False
                fill_export_permission (bool): [optional] if omitted the server will use the default value of False
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_list_response_bt_revision_info.BTListResponseBTRevisionInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get(
                'async_req', False
            )
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True
            )
            kwargs['_preload_content'] = kwargs.get(
                '_preload_content', True
            )
            kwargs['_request_timeout'] = kwargs.get(
                '_request_timeout', None
            )
            kwargs['_check_input_type'] = kwargs.get(
                '_check_input_type', True
            )
            kwargs['_check_return_type'] = kwargs.get(
                '_check_return_type', True
            )
            kwargs['_host_index'] = kwargs.get('_host_index', 0)
            kwargs['cid'] = \
                cid
            kwargs['pnum'] = \
                pnum
            return self.call_with_http_info(**kwargs)

        self.get_revision_history_in_company = Endpoint(
            settings={
                'response_type': (bt_list_response_bt_revision_info.BTListResponseBTRevisionInfo,),
                'auth': [
                    'OAuth2'
                ],
                'endpoint_path': '/api/revisions/companies/{cid}/partnumber/{pnum}',
                'operation_id': 'get_revision_history_in_company',
                'http_method': 'GET',
                'servers': [],
            },
            params_map={
                'all': [
                    'cid',
                    'pnum',
                    'element_type',
                    'fill_approvers',
                    'fill_export_permission',
                ],
                'required': [
                    'cid',
                    'pnum',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'cid':
                        (str,),
                    'pnum':
                        (str,),
                    'element_type':
                        (str,),
                    'fill_approvers':
                        (bool,),
                    'fill_export_permission':
                        (bool,),
                },
                'attribute_map': {
                    'cid': 'cid',
                    'pnum': 'pnum',
                    'element_type': 'elementType',
                    'fill_approvers': 'fillApprovers',
                    'fill_export_permission': 'fillExportPermission',
                },
                'location_map': {
                    'cid': 'path',
                    'pnum': 'path',
                    'element_type': 'query',
                    'fill_approvers': 'query',
                    'fill_export_permission': 'query',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1',
                    'application/json;charset=UTF-8; qs=0.09'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__get_revision_history_in_company
        )
Exemplo n.º 13
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

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

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


            Keyword Args:
                prefix (str): [optional] if omitted the server will use the default value of ''
                uid (str): [optional]
                company_id (str): [optional]
                include_company_owned_teams (bool): [optional] if omitted the server will use the default value of True
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_global_tree_node_list_response_bt_team_info.BTGlobalTreeNodeListResponseBTTeamInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs["async_req"] = kwargs.get("async_req", False)
            kwargs["_return_http_data_only"] = kwargs.get(
                "_return_http_data_only", True
            )
            kwargs["_preload_content"] = kwargs.get("_preload_content", True)
            kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
            kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
            kwargs["_check_return_type"] = kwargs.get("_check_return_type", True)
            kwargs["_host_index"] = kwargs.get("_host_index", 0)
            return self.call_with_http_info(**kwargs)

        self.find = Endpoint(
            settings={
                "response_type": (
                    bt_global_tree_node_list_response_bt_team_info.BTGlobalTreeNodeListResponseBTTeamInfo,
                ),
                "auth": ["OAuth2"],
                "endpoint_path": "/api/teams",
                "operation_id": "find",
                "http_method": "GET",
                "servers": [],
            },
            params_map={
                "all": ["prefix", "uid", "company_id", "include_company_owned_teams",],
                "required": [],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "prefix": (str,),
                    "uid": (str,),
                    "company_id": (str,),
                    "include_company_owned_teams": (bool,),
                },
                "attribute_map": {
                    "prefix": "prefix",
                    "uid": "uid",
                    "company_id": "companyId",
                    "include_company_owned_teams": "includeCompanyOwnedTeams",
                },
                "location_map": {
                    "prefix": "query",
                    "uid": "query",
                    "company_id": "query",
                    "include_company_owned_teams": "query",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1"],
                "content_type": [],
            },
            api_client=api_client,
            callable=__find,
        )

        def __get_team(self, tid, **kwargs):
            """get_team  # 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_team(tid, async_req=True)
            >>> result = thread.get()

            Args:
                tid (str):

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_team_info.BTTeamInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs["async_req"] = kwargs.get("async_req", False)
            kwargs["_return_http_data_only"] = kwargs.get(
                "_return_http_data_only", True
            )
            kwargs["_preload_content"] = kwargs.get("_preload_content", True)
            kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
            kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
            kwargs["_check_return_type"] = kwargs.get("_check_return_type", True)
            kwargs["_host_index"] = kwargs.get("_host_index", 0)
            kwargs["tid"] = tid
            return self.call_with_http_info(**kwargs)

        self.get_team = Endpoint(
            settings={
                "response_type": (bt_team_info.BTTeamInfo,),
                "auth": ["OAuth2"],
                "endpoint_path": "/api/teams/{tid}",
                "operation_id": "get_team",
                "http_method": "GET",
                "servers": [],
            },
            params_map={
                "all": ["tid",],
                "required": ["tid",],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {"tid": (str,),},
                "attribute_map": {"tid": "tid",},
                "location_map": {"tid": "path",},
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1"],
                "content_type": [],
            },
            api_client=api_client,
            callable=__get_team,
        )
Exemplo n.º 14
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __get_client_plans(self, cid, **kwargs):
            """Get billing plans for client.  # 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_client_plans(cid, async_req=True)
            >>> result = thread.get()

            Args:
                cid (str):

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                None
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs["async_req"] = kwargs.get("async_req", False)
            kwargs["_return_http_data_only"] = kwargs.get(
                "_return_http_data_only", True
            )
            kwargs["_preload_content"] = kwargs.get("_preload_content", True)
            kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
            kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
            kwargs["_check_return_type"] = kwargs.get("_check_return_type", True)
            kwargs["_host_index"] = kwargs.get("_host_index", 0)
            kwargs["cid"] = cid
            return self.call_with_http_info(**kwargs)

        self.get_client_plans = Endpoint(
            settings={
                "response_type": None,
                "auth": [],
                "endpoint_path": "/api/billing/plans/client/{cid}",
                "operation_id": "get_client_plans",
                "http_method": "GET",
                "servers": [],
            },
            params_map={
                "all": ["cid",],
                "required": ["cid",],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {"cid": (str,),},
                "attribute_map": {"cid": "cid",},
                "location_map": {"cid": "path",},
                "collection_format_map": {},
            },
            headers_map={"accept": [], "content_type": [],},
            api_client=api_client,
            callable=__get_client_plans,
        )
Exemplo n.º 15
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __create_translation(self, did, wid, **kwargs):
            """Create translation from upload.  # noqa: E501

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

            Args:
                did (str):
                wid (str):

            Keyword Args:
                allow_faulty_parts (bool): [optional]
                create_composite (bool): [optional]
                create_drawing_if_possible (bool): [optional]
                encoded_filename (str): [optional]
                extract_assembly_hierarchy (bool): [optional]
                file (file_type): [optional]
                file_body_with_details (form_data_body_part.FormDataBodyPart): [optional]
                file_content_length (int): [optional]
                file_detail (form_data_content_disposition.FormDataContentDisposition): [optional]
                flatten_assemblies (bool): [optional]
                format_name (str): [optional]
                isy_axis_is_up (bool): [optional]
                join_adjacent_surfaces (bool): [optional]
                location_element_id (str): [optional]
                location_group_id (str): [optional]
                location_position (int): [optional]
                notify_user (bool): [optional]
                owner_id (str): [optional]
                owner_type (str): [optional]
                parent_id (str): [optional]
                project_id (str): [optional]
                public (bool): [optional]
                split_assemblies_into_multiple_documents (bool): [optional]
                store_in_document (bool): [optional]
                translate (bool): [optional]
                unit (str): [optional]
                upload_id (str): [optional]
                version_string (str): [optional]
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_translation_request_info.BTTranslationRequestInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs["async_req"] = kwargs.get("async_req", False)
            kwargs["_return_http_data_only"] = kwargs.get(
                "_return_http_data_only", True
            )
            kwargs["_preload_content"] = kwargs.get("_preload_content", True)
            kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
            kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
            kwargs["_check_return_type"] = kwargs.get("_check_return_type", True)
            kwargs["_host_index"] = kwargs.get("_host_index", 0)
            kwargs["did"] = did
            kwargs["wid"] = wid
            return self.call_with_http_info(**kwargs)

        self.create_translation = Endpoint(
            settings={
                "response_type": (
                    bt_translation_request_info.BTTranslationRequestInfo,
                ),
                "auth": ["OAuth2"],
                "endpoint_path": "/api/translations/d/{did}/w/{wid}",
                "operation_id": "create_translation",
                "http_method": "POST",
                "servers": [],
            },
            params_map={
                "all": [
                    "did",
                    "wid",
                    "allow_faulty_parts",
                    "create_composite",
                    "create_drawing_if_possible",
                    "encoded_filename",
                    "extract_assembly_hierarchy",
                    "file",
                    "file_body_with_details",
                    "file_content_length",
                    "file_detail",
                    "flatten_assemblies",
                    "format_name",
                    "isy_axis_is_up",
                    "join_adjacent_surfaces",
                    "location_element_id",
                    "location_group_id",
                    "location_position",
                    "notify_user",
                    "owner_id",
                    "owner_type",
                    "parent_id",
                    "project_id",
                    "public",
                    "split_assemblies_into_multiple_documents",
                    "store_in_document",
                    "translate",
                    "unit",
                    "upload_id",
                    "version_string",
                ],
                "required": ["did", "wid",],
                "nullable": [],
                "enum": ["owner_type",],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {
                    ("owner_type",): {
                        "USER": "******",
                        "COMPANY": "COMPANY",
                        "ONSHAPE": "ONSHAPE",
                    },
                },
                "openapi_types": {
                    "did": (str,),
                    "wid": (str,),
                    "allow_faulty_parts": (bool,),
                    "create_composite": (bool,),
                    "create_drawing_if_possible": (bool,),
                    "encoded_filename": (str,),
                    "extract_assembly_hierarchy": (bool,),
                    "file": (file_type,),
                    "file_body_with_details": (form_data_body_part.FormDataBodyPart,),
                    "file_content_length": (int,),
                    "file_detail": (
                        form_data_content_disposition.FormDataContentDisposition,
                    ),
                    "flatten_assemblies": (bool,),
                    "format_name": (str,),
                    "isy_axis_is_up": (bool,),
                    "join_adjacent_surfaces": (bool,),
                    "location_element_id": (str,),
                    "location_group_id": (str,),
                    "location_position": (int,),
                    "notify_user": (bool,),
                    "owner_id": (str,),
                    "owner_type": (str,),
                    "parent_id": (str,),
                    "project_id": (str,),
                    "public": (bool,),
                    "split_assemblies_into_multiple_documents": (bool,),
                    "store_in_document": (bool,),
                    "translate": (bool,),
                    "unit": (str,),
                    "upload_id": (str,),
                    "version_string": (str,),
                },
                "attribute_map": {
                    "did": "did",
                    "wid": "wid",
                    "allow_faulty_parts": "allowFaultyParts",
                    "create_composite": "createComposite",
                    "create_drawing_if_possible": "createDrawingIfPossible",
                    "encoded_filename": "encodedFilename",
                    "extract_assembly_hierarchy": "extractAssemblyHierarchy",
                    "file": "file",
                    "file_body_with_details": "fileBodyWithDetails",
                    "file_content_length": "fileContentLength",
                    "file_detail": "fileDetail",
                    "flatten_assemblies": "flattenAssemblies",
                    "format_name": "formatName",
                    "isy_axis_is_up": "isyAxisIsUp",
                    "join_adjacent_surfaces": "joinAdjacentSurfaces",
                    "location_element_id": "locationElementId",
                    "location_group_id": "locationGroupId",
                    "location_position": "locationPosition",
                    "notify_user": "******",
                    "owner_id": "ownerId",
                    "owner_type": "ownerType",
                    "parent_id": "parentId",
                    "project_id": "projectId",
                    "public": "public",
                    "split_assemblies_into_multiple_documents": "splitAssembliesIntoMultipleDocuments",
                    "store_in_document": "storeInDocument",
                    "translate": "translate",
                    "unit": "unit",
                    "upload_id": "uploadId",
                    "version_string": "versionString",
                },
                "location_map": {
                    "did": "path",
                    "wid": "path",
                    "allow_faulty_parts": "form",
                    "create_composite": "form",
                    "create_drawing_if_possible": "form",
                    "encoded_filename": "form",
                    "extract_assembly_hierarchy": "form",
                    "file": "form",
                    "file_body_with_details": "form",
                    "file_content_length": "form",
                    "file_detail": "form",
                    "flatten_assemblies": "form",
                    "format_name": "form",
                    "isy_axis_is_up": "form",
                    "join_adjacent_surfaces": "form",
                    "location_element_id": "form",
                    "location_group_id": "form",
                    "location_position": "form",
                    "notify_user": "******",
                    "owner_id": "form",
                    "owner_type": "form",
                    "parent_id": "form",
                    "project_id": "form",
                    "public": "form",
                    "split_assemblies_into_multiple_documents": "form",
                    "store_in_document": "form",
                    "translate": "form",
                    "unit": "form",
                    "upload_id": "form",
                    "version_string": "form",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1"],
                "content_type": ["multipart/form-data"],
            },
            api_client=api_client,
            callable=__create_translation,
        )

        def __delete_translation(self, tid, **kwargs):
            """delete_translation  # noqa: E501

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

            Args:
                tid (str):

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                None
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs["async_req"] = kwargs.get("async_req", False)
            kwargs["_return_http_data_only"] = kwargs.get(
                "_return_http_data_only", True
            )
            kwargs["_preload_content"] = kwargs.get("_preload_content", True)
            kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
            kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
            kwargs["_check_return_type"] = kwargs.get("_check_return_type", True)
            kwargs["_host_index"] = kwargs.get("_host_index", 0)
            kwargs["tid"] = tid
            return self.call_with_http_info(**kwargs)

        self.delete_translation = Endpoint(
            settings={
                "response_type": None,
                "auth": ["OAuth2"],
                "endpoint_path": "/api/translations/{tid}",
                "operation_id": "delete_translation",
                "http_method": "DELETE",
                "servers": [],
            },
            params_map={
                "all": ["tid",],
                "required": ["tid",],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {"tid": (str,),},
                "attribute_map": {"tid": "tid",},
                "location_map": {"tid": "path",},
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1"],
                "content_type": [],
            },
            api_client=api_client,
            callable=__delete_translation,
        )

        def __get_all_translator_formats(self, **kwargs):
            """get_all_translator_formats  # 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_all_translator_formats(async_req=True)
            >>> result = thread.get()


            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                [bt_model_format_full_info.BTModelFormatFullInfo]
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs["async_req"] = kwargs.get("async_req", False)
            kwargs["_return_http_data_only"] = kwargs.get(
                "_return_http_data_only", True
            )
            kwargs["_preload_content"] = kwargs.get("_preload_content", True)
            kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
            kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
            kwargs["_check_return_type"] = kwargs.get("_check_return_type", True)
            kwargs["_host_index"] = kwargs.get("_host_index", 0)
            return self.call_with_http_info(**kwargs)

        self.get_all_translator_formats = Endpoint(
            settings={
                "response_type": ([bt_model_format_full_info.BTModelFormatFullInfo],),
                "auth": [],
                "endpoint_path": "/api/translations/translationformats",
                "operation_id": "get_all_translator_formats",
                "http_method": "GET",
                "servers": [],
            },
            params_map={
                "all": [],
                "required": [],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {},
                "attribute_map": {},
                "location_map": {},
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1"],
                "content_type": [],
            },
            api_client=api_client,
            callable=__get_all_translator_formats,
        )

        def __get_document_translations(self, did, **kwargs):
            """get_document_translations  # 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_document_translations(did, async_req=True)
            >>> result = thread.get()

            Args:
                did (str):

            Keyword Args:
                offset (int): [optional] if omitted the server will use the default value of 0
                limit (int): [optional] if omitted the server will use the default value of 20
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_list_response_bt_translation_request_info.BTListResponseBTTranslationRequestInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs["async_req"] = kwargs.get("async_req", False)
            kwargs["_return_http_data_only"] = kwargs.get(
                "_return_http_data_only", True
            )
            kwargs["_preload_content"] = kwargs.get("_preload_content", True)
            kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
            kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
            kwargs["_check_return_type"] = kwargs.get("_check_return_type", True)
            kwargs["_host_index"] = kwargs.get("_host_index", 0)
            kwargs["did"] = did
            return self.call_with_http_info(**kwargs)

        self.get_document_translations = Endpoint(
            settings={
                "response_type": (
                    bt_list_response_bt_translation_request_info.BTListResponseBTTranslationRequestInfo,
                ),
                "auth": ["OAuth2"],
                "endpoint_path": "/api/translations/d/{did}",
                "operation_id": "get_document_translations",
                "http_method": "GET",
                "servers": [],
            },
            params_map={
                "all": ["did", "offset", "limit",],
                "required": ["did",],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {"did": (str,), "offset": (int,), "limit": (int,),},
                "attribute_map": {"did": "did", "offset": "offset", "limit": "limit",},
                "location_map": {"did": "path", "offset": "query", "limit": "query",},
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1"],
                "content_type": [],
            },
            api_client=api_client,
            callable=__get_document_translations,
        )

        def __get_translation(self, tid, **kwargs):
            """get_translation  # 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_translation(tid, async_req=True)
            >>> result = thread.get()

            Args:
                tid (str):

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_translation_request_info.BTTranslationRequestInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs["async_req"] = kwargs.get("async_req", False)
            kwargs["_return_http_data_only"] = kwargs.get(
                "_return_http_data_only", True
            )
            kwargs["_preload_content"] = kwargs.get("_preload_content", True)
            kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
            kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
            kwargs["_check_return_type"] = kwargs.get("_check_return_type", True)
            kwargs["_host_index"] = kwargs.get("_host_index", 0)
            kwargs["tid"] = tid
            return self.call_with_http_info(**kwargs)

        self.get_translation = Endpoint(
            settings={
                "response_type": (
                    bt_translation_request_info.BTTranslationRequestInfo,
                ),
                "auth": ["OAuth2"],
                "endpoint_path": "/api/translations/{tid}",
                "operation_id": "get_translation",
                "http_method": "GET",
                "servers": [],
            },
            params_map={
                "all": ["tid",],
                "required": ["tid",],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {"tid": (str,),},
                "attribute_map": {"tid": "tid",},
                "location_map": {"tid": "path",},
                "collection_format_map": {},
            },
            headers_map={
                "accept": ["application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1"],
                "content_type": [],
            },
            api_client=api_client,
            callable=__get_translation,
        )
Exemplo n.º 16
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __enumerate_revisions(self, cid, **kwargs):
            """enumerate_revisions  # noqa: E501

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

            Args:
                cid (str):

            Keyword Args:
                element_type (int): [optional]
                limit (int): [optional] if omitted the server will use the default value of 20
                offset (int): [optional] if omitted the server will use the default value of 0
                latest_only (bool): [optional] if omitted the server will use the default value of False
                after (int): [optional]
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_list_response_bt_revision_info.BTListResponseBTRevisionInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs["async_req"] = kwargs.get("async_req", False)
            kwargs["_return_http_data_only"] = kwargs.get(
                "_return_http_data_only", True)
            kwargs["_preload_content"] = kwargs.get("_preload_content", True)
            kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
            kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
            kwargs["_check_return_type"] = kwargs.get("_check_return_type",
                                                      True)
            kwargs["_host_index"] = kwargs.get("_host_index", 0)
            kwargs["cid"] = cid
            return self.call_with_http_info(**kwargs)

        self.enumerate_revisions = Endpoint(
            settings={
                "response_type": (bt_list_response_bt_revision_info.
                                  BTListResponseBTRevisionInfo, ),
                "auth": ["OAuth2"],
                "endpoint_path":
                "/api/revisions/companies/{cid}",
                "operation_id":
                "enumerate_revisions",
                "http_method":
                "GET",
                "servers": [],
            },
            params_map={
                "all": [
                    "cid",
                    "element_type",
                    "limit",
                    "offset",
                    "latest_only",
                    "after",
                ],
                "required": [
                    "cid",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "cid": (str, ),
                    "element_type": (int, ),
                    "limit": (int, ),
                    "offset": (int, ),
                    "latest_only": (bool, ),
                    "after": (int, ),
                },
                "attribute_map": {
                    "cid": "cid",
                    "element_type": "elementType",
                    "limit": "limit",
                    "offset": "offset",
                    "latest_only": "latestOnly",
                    "after": "after",
                },
                "location_map": {
                    "cid": "path",
                    "element_type": "query",
                    "limit": "query",
                    "offset": "query",
                    "latest_only": "query",
                    "after": "query",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept":
                ["application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1"],
                "content_type": [],
            },
            api_client=api_client,
            callable=__enumerate_revisions,
        )

        def __get_latest_in_document_or_company(self, cd, cdid, pnum,
                                                **kwargs):
            """get_latest_in_document_or_company  # 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_latest_in_document_or_company(cd, cdid, pnum, async_req=True)
            >>> result = thread.get()

            Args:
                cd (str):
                cdid (str):
                pnum (str):

            Keyword Args:
                et (str): [optional]
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_revision_info.BTRevisionInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs["async_req"] = kwargs.get("async_req", False)
            kwargs["_return_http_data_only"] = kwargs.get(
                "_return_http_data_only", True)
            kwargs["_preload_content"] = kwargs.get("_preload_content", True)
            kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
            kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
            kwargs["_check_return_type"] = kwargs.get("_check_return_type",
                                                      True)
            kwargs["_host_index"] = kwargs.get("_host_index", 0)
            kwargs["cd"] = cd
            kwargs["cdid"] = cdid
            kwargs["pnum"] = pnum
            return self.call_with_http_info(**kwargs)

        self.get_latest_in_document_or_company = Endpoint(
            settings={
                "response_type": (bt_revision_info.BTRevisionInfo, ),
                "auth": ["OAuth2"],
                "endpoint_path": "/api/revisions/{cd}/{cdid}/p/{pnum}/latest",
                "operation_id": "get_latest_in_document_or_company",
                "http_method": "GET",
                "servers": [],
            },
            params_map={
                "all": [
                    "cd",
                    "cdid",
                    "pnum",
                    "et",
                ],
                "required": [
                    "cd",
                    "cdid",
                    "pnum",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "cd": (str, ),
                    "cdid": (str, ),
                    "pnum": (str, ),
                    "et": (str, ),
                },
                "attribute_map": {
                    "cd": "cd",
                    "cdid": "cdid",
                    "pnum": "pnum",
                    "et": "et",
                },
                "location_map": {
                    "cd": "path",
                    "cdid": "path",
                    "pnum": "path",
                    "et": "query",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept":
                ["application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1"],
                "content_type": [],
            },
            api_client=api_client,
            callable=__get_latest_in_document_or_company,
        )

        def __get_revision_history_in_company(self, cid, pnum, **kwargs):
            """get_revision_history_in_company  # 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_revision_history_in_company(cid, pnum, async_req=True)
            >>> result = thread.get()

            Args:
                cid (str):
                pnum (str):

            Keyword Args:
                element_type (str): [optional]
                fill_approvers (bool): [optional] if omitted the server will use the default value of False
                fill_export_permission (bool): [optional] if omitted the server will use the default value of False
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_list_response_bt_revision_info.BTListResponseBTRevisionInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs["async_req"] = kwargs.get("async_req", False)
            kwargs["_return_http_data_only"] = kwargs.get(
                "_return_http_data_only", True)
            kwargs["_preload_content"] = kwargs.get("_preload_content", True)
            kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
            kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
            kwargs["_check_return_type"] = kwargs.get("_check_return_type",
                                                      True)
            kwargs["_host_index"] = kwargs.get("_host_index", 0)
            kwargs["cid"] = cid
            kwargs["pnum"] = pnum
            return self.call_with_http_info(**kwargs)

        self.get_revision_history_in_company = Endpoint(
            settings={
                "response_type": (bt_list_response_bt_revision_info.
                                  BTListResponseBTRevisionInfo, ),
                "auth": ["OAuth2"],
                "endpoint_path":
                "/api/revisions/companies/{cid}/partnumber/{pnum}",
                "operation_id":
                "get_revision_history_in_company",
                "http_method":
                "GET",
                "servers": [],
            },
            params_map={
                "all": [
                    "cid",
                    "pnum",
                    "element_type",
                    "fill_approvers",
                    "fill_export_permission",
                ],
                "required": [
                    "cid",
                    "pnum",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "cid": (str, ),
                    "pnum": (str, ),
                    "element_type": (str, ),
                    "fill_approvers": (bool, ),
                    "fill_export_permission": (bool, ),
                },
                "attribute_map": {
                    "cid": "cid",
                    "pnum": "pnum",
                    "element_type": "elementType",
                    "fill_approvers": "fillApprovers",
                    "fill_export_permission": "fillExportPermission",
                },
                "location_map": {
                    "cid": "path",
                    "pnum": "path",
                    "element_type": "query",
                    "fill_approvers": "query",
                    "fill_export_permission": "query",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept":
                ["application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1"],
                "content_type": [],
            },
            api_client=api_client,
            callable=__get_revision_history_in_company,
        )
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __create_blob_translation(self, did, wv, wvid, eid,
                                      bt_translate_format_params, **kwargs):
            """Create Translation.  # noqa: E501

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

            Args:
                did (str):
                wv (str):
                wvid (str):
                eid (str):
                bt_translate_format_params (bt_translate_format_params.BTTranslateFormatParams):

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_translation_request_info.BTTranslationRequestInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get('async_req', False)
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True)
            kwargs['_preload_content'] = kwargs.get('_preload_content', True)
            kwargs['_request_timeout'] = kwargs.get('_request_timeout', None)
            kwargs['_check_input_type'] = kwargs.get('_check_input_type', True)
            kwargs['_check_return_type'] = kwargs.get('_check_return_type',
                                                      True)
            kwargs['_host_index'] = kwargs.get('_host_index', 0)
            kwargs['did'] = \
                did
            kwargs['wv'] = \
                wv
            kwargs['wvid'] = \
                wvid
            kwargs['eid'] = \
                eid
            kwargs['bt_translate_format_params'] = \
                bt_translate_format_params
            return self.call_with_http_info(**kwargs)

        self.create_blob_translation = Endpoint(
            settings={
                'response_type':
                (bt_translation_request_info.BTTranslationRequestInfo, ),
                'auth': ['OAuth2'],
                'endpoint_path':
                '/api/blobelements/d/{did}/{wv}/{wvid}/e/{eid}/translations',
                'operation_id':
                'create_blob_translation',
                'http_method':
                'POST',
                'servers': [],
            },
            params_map={
                'all': [
                    'did',
                    'wv',
                    'wvid',
                    'eid',
                    'bt_translate_format_params',
                ],
                'required': [
                    'did',
                    'wv',
                    'wvid',
                    'eid',
                    'bt_translate_format_params',
                ],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'did': (str, ),
                    'wv': (str, ),
                    'wvid': (str, ),
                    'eid': (str, ),
                    'bt_translate_format_params':
                    (bt_translate_format_params.BTTranslateFormatParams, ),
                },
                'attribute_map': {
                    'did': 'did',
                    'wv': 'wv',
                    'wvid': 'wvid',
                    'eid': 'eid',
                },
                'location_map': {
                    'did': 'path',
                    'wv': 'path',
                    'wvid': 'path',
                    'eid': 'path',
                    'bt_translate_format_params': 'body',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept':
                ['application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1'],
                'content_type': ['application/json;charset=UTF-8; qs=0.09']
            },
            api_client=api_client,
            callable=__create_blob_translation)

        def __download_file_workspace(self, did, wid, eid, **kwargs):
            """Download File From Blob Element.  # noqa: E501

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

            Args:
                did (str):
                wid (str):
                eid (str):

            Keyword Args:
                content_disposition (str): [optional]
                if_none_match (str): [optional]
                link_document_id (str): [optional]
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                file_type
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get('async_req', False)
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True)
            kwargs['_preload_content'] = kwargs.get('_preload_content', True)
            kwargs['_request_timeout'] = kwargs.get('_request_timeout', None)
            kwargs['_check_input_type'] = kwargs.get('_check_input_type', True)
            kwargs['_check_return_type'] = kwargs.get('_check_return_type',
                                                      True)
            kwargs['_host_index'] = kwargs.get('_host_index', 0)
            kwargs['did'] = \
                did
            kwargs['wid'] = \
                wid
            kwargs['eid'] = \
                eid
            return self.call_with_http_info(**kwargs)

        self.download_file_workspace = Endpoint(
            settings={
                'response_type': (file_type, ),
                'auth': ['OAuth2'],
                'endpoint_path': '/api/blobelements/d/{did}/w/{wid}/e/{eid}',
                'operation_id': 'download_file_workspace',
                'http_method': 'GET',
                'servers': [],
            },
            params_map={
                'all': [
                    'did',
                    'wid',
                    'eid',
                    'content_disposition',
                    'if_none_match',
                    'link_document_id',
                ],
                'required': [
                    'did',
                    'wid',
                    'eid',
                ],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'did': (str, ),
                    'wid': (str, ),
                    'eid': (str, ),
                    'content_disposition': (str, ),
                    'if_none_match': (str, ),
                    'link_document_id': (str, ),
                },
                'attribute_map': {
                    'did': 'did',
                    'wid': 'wid',
                    'eid': 'eid',
                    'content_disposition': 'contentDisposition',
                    'if_none_match': 'If-None-Match',
                    'link_document_id': 'linkDocumentId',
                },
                'location_map': {
                    'did': 'path',
                    'wid': 'path',
                    'eid': 'path',
                    'content_disposition': 'query',
                    'if_none_match': 'header',
                    'link_document_id': 'query',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept': ['application/octet-stream'],
                'content_type': [],
            },
            api_client=api_client,
            callable=__download_file_workspace)

        def __update_units(self, did, eid, wid, bt_update_mesh_units_params,
                           **kwargs):
            """Update Mesh Units.  # 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_units(did, eid, wid, bt_update_mesh_units_params, async_req=True)
            >>> result = thread.get()

            Args:
                did (str):
                eid (str):
                wid (str):
                bt_update_mesh_units_params (bt_update_mesh_units_params.BTUpdateMeshUnitsParams):

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_document_element_processing_info.BTDocumentElementProcessingInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get('async_req', False)
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True)
            kwargs['_preload_content'] = kwargs.get('_preload_content', True)
            kwargs['_request_timeout'] = kwargs.get('_request_timeout', None)
            kwargs['_check_input_type'] = kwargs.get('_check_input_type', True)
            kwargs['_check_return_type'] = kwargs.get('_check_return_type',
                                                      True)
            kwargs['_host_index'] = kwargs.get('_host_index', 0)
            kwargs['did'] = \
                did
            kwargs['eid'] = \
                eid
            kwargs['wid'] = \
                wid
            kwargs['bt_update_mesh_units_params'] = \
                bt_update_mesh_units_params
            return self.call_with_http_info(**kwargs)

        self.update_units = Endpoint(
            settings={
                'response_type': (bt_document_element_processing_info.
                                  BTDocumentElementProcessingInfo, ),
                'auth': ['OAuth2'],
                'endpoint_path':
                '/api/blobelements/d/{did}/w/{wid}/e/{eid}/units',
                'operation_id':
                'update_units',
                'http_method':
                'POST',
                'servers': [],
            },
            params_map={
                'all': [
                    'did',
                    'eid',
                    'wid',
                    'bt_update_mesh_units_params',
                ],
                'required': [
                    'did',
                    'eid',
                    'wid',
                    'bt_update_mesh_units_params',
                ],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'did': (str, ),
                    'eid': (str, ),
                    'wid': (str, ),
                    'bt_update_mesh_units_params':
                    (bt_update_mesh_units_params.BTUpdateMeshUnitsParams, ),
                },
                'attribute_map': {
                    'did': 'did',
                    'eid': 'eid',
                    'wid': 'wid',
                },
                'location_map': {
                    'did': 'path',
                    'eid': 'path',
                    'wid': 'path',
                    'bt_update_mesh_units_params': 'body',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept':
                ['application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1'],
                'content_type': ['application/json;charset=UTF-8; qs=0.09']
            },
            api_client=api_client,
            callable=__update_units)

        def __upload_file_create_element(self, did, wid, **kwargs):
            """Upload file to new element.  # 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_file_create_element(did, wid, async_req=True)
            >>> result = thread.get()

            Args:
                did (str):
                wid (str):

            Keyword Args:
                allow_faulty_parts (bool): [optional]
                create_composite (bool): [optional]
                create_drawing_if_possible (bool): [optional]
                encoded_filename (str): [optional]
                extract_assembly_hierarchy (bool): [optional]
                file (file_type): [optional]
                file_body_with_details (form_data_body_part.FormDataBodyPart): [optional]
                file_content_length (int): [optional]
                file_detail (form_data_content_disposition.FormDataContentDisposition): [optional]
                flatten_assemblies (bool): [optional]
                format_name (str): [optional]
                isy_axis_is_up (bool): [optional]
                join_adjacent_surfaces (bool): [optional]
                location_element_id (str): [optional]
                location_group_id (str): [optional]
                location_position (int): [optional]
                notify_user (bool): [optional]
                owner_id (str): [optional]
                owner_type (str): [optional]
                parent_id (str): [optional]
                project_id (str): [optional]
                public (bool): [optional]
                split_assemblies_into_multiple_documents (bool): [optional]
                store_in_document (bool): [optional]
                translate (bool): [optional]
                unit (str): [optional]
                upload_id (str): [optional]
                version_string (str): [optional]
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_document_element_processing_info.BTDocumentElementProcessingInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get('async_req', False)
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True)
            kwargs['_preload_content'] = kwargs.get('_preload_content', True)
            kwargs['_request_timeout'] = kwargs.get('_request_timeout', None)
            kwargs['_check_input_type'] = kwargs.get('_check_input_type', True)
            kwargs['_check_return_type'] = kwargs.get('_check_return_type',
                                                      True)
            kwargs['_host_index'] = kwargs.get('_host_index', 0)
            kwargs['did'] = \
                did
            kwargs['wid'] = \
                wid
            return self.call_with_http_info(**kwargs)

        self.upload_file_create_element = Endpoint(
            settings={
                'response_type': (bt_document_element_processing_info.
                                  BTDocumentElementProcessingInfo, ),
                'auth': ['OAuth2'],
                'endpoint_path':
                '/api/blobelements/d/{did}/w/{wid}',
                'operation_id':
                'upload_file_create_element',
                'http_method':
                'POST',
                'servers': [],
            },
            params_map={
                'all': [
                    'did',
                    'wid',
                    'allow_faulty_parts',
                    'create_composite',
                    'create_drawing_if_possible',
                    'encoded_filename',
                    'extract_assembly_hierarchy',
                    'file',
                    'file_body_with_details',
                    'file_content_length',
                    'file_detail',
                    'flatten_assemblies',
                    'format_name',
                    'isy_axis_is_up',
                    'join_adjacent_surfaces',
                    'location_element_id',
                    'location_group_id',
                    'location_position',
                    'notify_user',
                    'owner_id',
                    'owner_type',
                    'parent_id',
                    'project_id',
                    'public',
                    'split_assemblies_into_multiple_documents',
                    'store_in_document',
                    'translate',
                    'unit',
                    'upload_id',
                    'version_string',
                ],
                'required': [
                    'did',
                    'wid',
                ],
                'nullable': [],
                'enum': [
                    'owner_type',
                ],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {
                    ('owner_type', ): {
                        "USER": "******",
                        "COMPANY": "COMPANY",
                        "ONSHAPE": "ONSHAPE"
                    },
                },
                'openapi_types': {
                    'did': (str, ),
                    'wid': (str, ),
                    'allow_faulty_parts': (bool, ),
                    'create_composite': (bool, ),
                    'create_drawing_if_possible': (bool, ),
                    'encoded_filename': (str, ),
                    'extract_assembly_hierarchy': (bool, ),
                    'file': (file_type, ),
                    'file_body_with_details':
                    (form_data_body_part.FormDataBodyPart, ),
                    'file_content_length': (int, ),
                    'file_detail':
                    (form_data_content_disposition.FormDataContentDisposition,
                     ),
                    'flatten_assemblies': (bool, ),
                    'format_name': (str, ),
                    'isy_axis_is_up': (bool, ),
                    'join_adjacent_surfaces': (bool, ),
                    'location_element_id': (str, ),
                    'location_group_id': (str, ),
                    'location_position': (int, ),
                    'notify_user': (bool, ),
                    'owner_id': (str, ),
                    'owner_type': (str, ),
                    'parent_id': (str, ),
                    'project_id': (str, ),
                    'public': (bool, ),
                    'split_assemblies_into_multiple_documents': (bool, ),
                    'store_in_document': (bool, ),
                    'translate': (bool, ),
                    'unit': (str, ),
                    'upload_id': (str, ),
                    'version_string': (str, ),
                },
                'attribute_map': {
                    'did': 'did',
                    'wid': 'wid',
                    'allow_faulty_parts': 'allowFaultyParts',
                    'create_composite': 'createComposite',
                    'create_drawing_if_possible': 'createDrawingIfPossible',
                    'encoded_filename': 'encodedFilename',
                    'extract_assembly_hierarchy': 'extractAssemblyHierarchy',
                    'file': 'file',
                    'file_body_with_details': 'fileBodyWithDetails',
                    'file_content_length': 'fileContentLength',
                    'file_detail': 'fileDetail',
                    'flatten_assemblies': 'flattenAssemblies',
                    'format_name': 'formatName',
                    'isy_axis_is_up': 'isyAxisIsUp',
                    'join_adjacent_surfaces': 'joinAdjacentSurfaces',
                    'location_element_id': 'locationElementId',
                    'location_group_id': 'locationGroupId',
                    'location_position': 'locationPosition',
                    'notify_user': '******',
                    'owner_id': 'ownerId',
                    'owner_type': 'ownerType',
                    'parent_id': 'parentId',
                    'project_id': 'projectId',
                    'public': 'public',
                    'split_assemblies_into_multiple_documents':
                    'splitAssembliesIntoMultipleDocuments',
                    'store_in_document': 'storeInDocument',
                    'translate': 'translate',
                    'unit': 'unit',
                    'upload_id': 'uploadId',
                    'version_string': 'versionString',
                },
                'location_map': {
                    'did': 'path',
                    'wid': 'path',
                    'allow_faulty_parts': 'form',
                    'create_composite': 'form',
                    'create_drawing_if_possible': 'form',
                    'encoded_filename': 'form',
                    'extract_assembly_hierarchy': 'form',
                    'file': 'form',
                    'file_body_with_details': 'form',
                    'file_content_length': 'form',
                    'file_detail': 'form',
                    'flatten_assemblies': 'form',
                    'format_name': 'form',
                    'isy_axis_is_up': 'form',
                    'join_adjacent_surfaces': 'form',
                    'location_element_id': 'form',
                    'location_group_id': 'form',
                    'location_position': 'form',
                    'notify_user': '******',
                    'owner_id': 'form',
                    'owner_type': 'form',
                    'parent_id': 'form',
                    'project_id': 'form',
                    'public': 'form',
                    'split_assemblies_into_multiple_documents': 'form',
                    'store_in_document': 'form',
                    'translate': 'form',
                    'unit': 'form',
                    'upload_id': 'form',
                    'version_string': 'form',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept':
                ['application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1'],
                'content_type': ['multipart/form-data']
            },
            api_client=api_client,
            callable=__upload_file_create_element)

        def __upload_file_update_element(self, did, eid, wid, **kwargs):
            """Update Blob Element.  # 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_file_update_element(did, eid, wid, async_req=True)
            >>> result = thread.get()

            Args:
                did (str):
                eid (str):
                wid (str):

            Keyword Args:
                parent_change_id (str): [optional]
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_document_element_processing_info.BTDocumentElementProcessingInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get('async_req', False)
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True)
            kwargs['_preload_content'] = kwargs.get('_preload_content', True)
            kwargs['_request_timeout'] = kwargs.get('_request_timeout', None)
            kwargs['_check_input_type'] = kwargs.get('_check_input_type', True)
            kwargs['_check_return_type'] = kwargs.get('_check_return_type',
                                                      True)
            kwargs['_host_index'] = kwargs.get('_host_index', 0)
            kwargs['did'] = \
                did
            kwargs['eid'] = \
                eid
            kwargs['wid'] = \
                wid
            return self.call_with_http_info(**kwargs)

        self.upload_file_update_element = Endpoint(
            settings={
                'response_type': (bt_document_element_processing_info.
                                  BTDocumentElementProcessingInfo, ),
                'auth': ['OAuth2'],
                'endpoint_path':
                '/api/blobelements/d/{did}/w/{wid}/e/{eid}',
                'operation_id':
                'upload_file_update_element',
                'http_method':
                'POST',
                'servers': [],
            },
            params_map={
                'all': [
                    'did',
                    'eid',
                    'wid',
                    'parent_change_id',
                ],
                'required': [
                    'did',
                    'eid',
                    'wid',
                ],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'did': (str, ),
                    'eid': (str, ),
                    'wid': (str, ),
                    'parent_change_id': (str, ),
                },
                'attribute_map': {
                    'did': 'did',
                    'eid': 'eid',
                    'wid': 'wid',
                    'parent_change_id': 'parentChangeId',
                },
                'location_map': {
                    'did': 'path',
                    'eid': 'path',
                    'wid': 'path',
                    'parent_change_id': 'query',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept':
                ['application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1'],
                'content_type': [],
            },
            api_client=api_client,
            callable=__upload_file_update_element)
Exemplo n.º 18
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __cancel_purchase_new(
            self,
            aid,
            pid,
            **kwargs
        ):
            """Cancel Recurring Subscription  # noqa: E501

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

            Args:
                aid (str):
                pid (str):

            Keyword Args:
                cancel_immediately (bool): [optional] if omitted the server will use the default value of False
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                None
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get(
                'async_req', False
            )
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True
            )
            kwargs['_preload_content'] = kwargs.get(
                '_preload_content', True
            )
            kwargs['_request_timeout'] = kwargs.get(
                '_request_timeout', None
            )
            kwargs['_check_input_type'] = kwargs.get(
                '_check_input_type', True
            )
            kwargs['_check_return_type'] = kwargs.get(
                '_check_return_type', True
            )
            kwargs['_host_index'] = kwargs.get('_host_index', 0)
            kwargs['aid'] = \
                aid
            kwargs['pid'] = \
                pid
            return self.call_with_http_info(**kwargs)

        self.cancel_purchase_new = Endpoint(
            settings={
                'response_type': None,
                'auth': [
                    'OAuth2'
                ],
                'endpoint_path': '/api/accounts/{aid}/purchases/{pid}',
                'operation_id': 'cancel_purchase_new',
                'http_method': 'DELETE',
                'servers': [],
            },
            params_map={
                'all': [
                    'aid',
                    'pid',
                    'cancel_immediately',
                ],
                'required': [
                    'aid',
                    'pid',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'aid':
                        (str,),
                    'pid':
                        (str,),
                    'cancel_immediately':
                        (bool,),
                },
                'attribute_map': {
                    'aid': 'aid',
                    'pid': 'pid',
                    'cancel_immediately': 'cancelImmediately',
                },
                'location_map': {
                    'aid': 'path',
                    'pid': 'path',
                    'cancel_immediately': 'query',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1',
                    'application/json;charset=UTF-8; qs=0.09'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__cancel_purchase_new
        )

        def __consume_purchase(
            self,
            pid,
            **kwargs
        ):
            """Mark Purchase Consumed For User  # noqa: E501

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

            Args:
                pid (str):

            Keyword Args:
                bt_purchase_user_params (bt_purchase_user_params.BTPurchaseUserParams): [optional]
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_purchase_info.BTPurchaseInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get(
                'async_req', False
            )
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True
            )
            kwargs['_preload_content'] = kwargs.get(
                '_preload_content', True
            )
            kwargs['_request_timeout'] = kwargs.get(
                '_request_timeout', None
            )
            kwargs['_check_input_type'] = kwargs.get(
                '_check_input_type', True
            )
            kwargs['_check_return_type'] = kwargs.get(
                '_check_return_type', True
            )
            kwargs['_host_index'] = kwargs.get('_host_index', 0)
            kwargs['pid'] = \
                pid
            return self.call_with_http_info(**kwargs)

        self.consume_purchase = Endpoint(
            settings={
                'response_type': (bt_purchase_info.BTPurchaseInfo,),
                'auth': [
                    'OAuth2'
                ],
                'endpoint_path': '/api/accounts/purchases/{pid}/consume',
                'operation_id': 'consume_purchase',
                'http_method': 'POST',
                'servers': [],
            },
            params_map={
                'all': [
                    'pid',
                    'bt_purchase_user_params',
                ],
                'required': [
                    'pid',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'pid':
                        (str,),
                    'bt_purchase_user_params':
                        (bt_purchase_user_params.BTPurchaseUserParams,),
                },
                'attribute_map': {
                    'pid': 'pid',
                },
                'location_map': {
                    'pid': 'path',
                    'bt_purchase_user_params': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1',
                    'application/json;charset=UTF-8; qs=0.09'
                ],
                'content_type': [
                    'application/json;charset=UTF-8; qs=0.09'
                ]
            },
            api_client=api_client,
            callable=__consume_purchase
        )

        def __get_plan_purchases(
            self,
            plan_id,
            **kwargs
        ):
            """Get Plan Purchases  # 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_plan_purchases(plan_id, async_req=True)
            >>> result = thread.get()

            Args:
                plan_id (str):

            Keyword Args:
                offset (int): [optional] if omitted the server will use the default value of 0
                limit (int): [optional] if omitted the server will use the default value of 20
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_list_response_bt_purchase_info.BTListResponseBTPurchaseInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get(
                'async_req', False
            )
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True
            )
            kwargs['_preload_content'] = kwargs.get(
                '_preload_content', True
            )
            kwargs['_request_timeout'] = kwargs.get(
                '_request_timeout', None
            )
            kwargs['_check_input_type'] = kwargs.get(
                '_check_input_type', True
            )
            kwargs['_check_return_type'] = kwargs.get(
                '_check_return_type', True
            )
            kwargs['_host_index'] = kwargs.get('_host_index', 0)
            kwargs['plan_id'] = \
                plan_id
            return self.call_with_http_info(**kwargs)

        self.get_plan_purchases = Endpoint(
            settings={
                'response_type': (bt_list_response_bt_purchase_info.BTListResponseBTPurchaseInfo,),
                'auth': [],
                'endpoint_path': '/api/accounts/plans/{planId}/purchases',
                'operation_id': 'get_plan_purchases',
                'http_method': 'GET',
                'servers': [],
            },
            params_map={
                'all': [
                    'plan_id',
                    'offset',
                    'limit',
                ],
                'required': [
                    'plan_id',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'plan_id':
                        (str,),
                    'offset':
                        (int,),
                    'limit':
                        (int,),
                },
                'attribute_map': {
                    'plan_id': 'planId',
                    'offset': 'offset',
                    'limit': 'limit',
                },
                'location_map': {
                    'plan_id': 'path',
                    'offset': 'query',
                    'limit': 'query',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1',
                    'application/json;charset=UTF-8; qs=0.09'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__get_plan_purchases
        )

        def __get_purchases(
            self,
            **kwargs
        ):
            """Get User's Appstore Purchases.  # 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_purchases(async_req=True)
            >>> result = thread.get()


            Keyword Args:
                all (bool): [optional] if omitted the server will use the default value of False
                own_purchase_only (bool): [optional] if omitted the server will use the default value of False
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                [bt_purchase_info.BTPurchaseInfo]
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get(
                'async_req', False
            )
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True
            )
            kwargs['_preload_content'] = kwargs.get(
                '_preload_content', True
            )
            kwargs['_request_timeout'] = kwargs.get(
                '_request_timeout', None
            )
            kwargs['_check_input_type'] = kwargs.get(
                '_check_input_type', True
            )
            kwargs['_check_return_type'] = kwargs.get(
                '_check_return_type', True
            )
            kwargs['_host_index'] = kwargs.get('_host_index', 0)
            return self.call_with_http_info(**kwargs)

        self.get_purchases = Endpoint(
            settings={
                'response_type': ([bt_purchase_info.BTPurchaseInfo],),
                'auth': [],
                'endpoint_path': '/api/accounts/purchases',
                'operation_id': 'get_purchases',
                'http_method': 'GET',
                'servers': [],
            },
            params_map={
                'all': [
                    'all',
                    'own_purchase_only',
                ],
                'required': [],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'all':
                        (bool,),
                    'own_purchase_only':
                        (bool,),
                },
                'attribute_map': {
                    'all': 'all',
                    'own_purchase_only': 'ownPurchaseOnly',
                },
                'location_map': {
                    'all': 'query',
                    'own_purchase_only': 'query',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1',
                    'application/json;charset=UTF-8; qs=0.09'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__get_purchases
        )
Exemplo n.º 19
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __get_open_api(self, **kwargs):
            """OpenAPI spec documentation for the Onshape REST API.  # 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_open_api(async_req=True)
            >>> result = thread.get()


            Keyword Args:
                excluded_tags (str): If an operation contains an excluded tag, it is not returned from this endpoint.. [optional]
                included_tags (str): Return only operations with tags included in includedTags.. [optional]
                include_deprecated (bool): Include deprecated endpoints.. [optional]
                documentation_status ([str]): Only return endpoints that have the specified document status. Default is to return all the endpoints the user should have access to.. [optional]
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                None
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs["async_req"] = kwargs.get("async_req", False)
            kwargs["_return_http_data_only"] = kwargs.get(
                "_return_http_data_only", True
            )
            kwargs["_preload_content"] = kwargs.get("_preload_content", True)
            kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
            kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
            kwargs["_check_return_type"] = kwargs.get("_check_return_type", True)
            kwargs["_host_index"] = kwargs.get("_host_index", 0)
            return self.call_with_http_info(**kwargs)

        self.get_open_api = Endpoint(
            settings={
                "response_type": None,
                "auth": [],
                "endpoint_path": "/api/openapi",
                "operation_id": "get_open_api",
                "http_method": "GET",
                "servers": [],
            },
            params_map={
                "all": [
                    "excluded_tags",
                    "included_tags",
                    "include_deprecated",
                    "documentation_status",
                ],
                "required": [],
                "nullable": [],
                "enum": ["documentation_status",],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {
                    ("documentation_status",): {
                        "DEVELOPMENT": "DEVELOPMENT",
                        "PRODUCTION": "PRODUCTION",
                        "STAGING": "STAGING",
                        "EVP": "EVP",
                        "UNSET": "UNSET",
                        "INTERNAL": "INTERNAL",
                    },
                },
                "openapi_types": {
                    "excluded_tags": (str,),
                    "included_tags": (str,),
                    "include_deprecated": (bool,),
                    "documentation_status": ([str],),
                },
                "attribute_map": {
                    "excluded_tags": "excludedTags",
                    "included_tags": "includedTags",
                    "include_deprecated": "includeDeprecated",
                    "documentation_status": "documentationStatus",
                },
                "location_map": {
                    "excluded_tags": "query",
                    "included_tags": "query",
                    "include_deprecated": "query",
                    "documentation_status": "query",
                },
                "collection_format_map": {"documentation_status": "multi",},
            },
            headers_map={"accept": [], "content_type": [],},
            api_client=api_client,
            callable=__get_open_api,
        )
Exemplo n.º 20
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

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

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


            Keyword Args:
                bt_webhook_params (bt_webhook_params.BTWebhookParams): [optional]
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_webhook_info.BTWebhookInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs["async_req"] = kwargs.get("async_req", False)
            kwargs["_return_http_data_only"] = kwargs.get(
                "_return_http_data_only", True)
            kwargs["_preload_content"] = kwargs.get("_preload_content", True)
            kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
            kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
            kwargs["_check_return_type"] = kwargs.get("_check_return_type",
                                                      True)
            kwargs["_host_index"] = kwargs.get("_host_index", 0)
            return self.call_with_http_info(**kwargs)

        self.create_webhook = Endpoint(
            settings={
                "response_type": (bt_webhook_info.BTWebhookInfo, ),
                "auth": ["OAuth2"],
                "endpoint_path": "/api/webhooks",
                "operation_id": "create_webhook",
                "http_method": "POST",
                "servers": [],
            },
            params_map={
                "all": [
                    "bt_webhook_params",
                ],
                "required": [],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "bt_webhook_params": (bt_webhook_params.BTWebhookParams, ),
                },
                "attribute_map": {},
                "location_map": {
                    "bt_webhook_params": "body",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept":
                ["application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1"],
                "content_type": ["application/json;charset=UTF-8; qs=0.09"],
            },
            api_client=api_client,
            callable=__create_webhook,
        )

        def __get_webhook(self, webhookid, **kwargs):
            """get_webhook  # 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_webhook(webhookid, async_req=True)
            >>> result = thread.get()

            Args:
                webhookid (str):

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_webhook_info.BTWebhookInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs["async_req"] = kwargs.get("async_req", False)
            kwargs["_return_http_data_only"] = kwargs.get(
                "_return_http_data_only", True)
            kwargs["_preload_content"] = kwargs.get("_preload_content", True)
            kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
            kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
            kwargs["_check_return_type"] = kwargs.get("_check_return_type",
                                                      True)
            kwargs["_host_index"] = kwargs.get("_host_index", 0)
            kwargs["webhookid"] = webhookid
            return self.call_with_http_info(**kwargs)

        self.get_webhook = Endpoint(
            settings={
                "response_type": (bt_webhook_info.BTWebhookInfo, ),
                "auth": ["OAuth2"],
                "endpoint_path": "/api/webhooks/{webhookid}",
                "operation_id": "get_webhook",
                "http_method": "GET",
                "servers": [],
            },
            params_map={
                "all": [
                    "webhookid",
                ],
                "required": [
                    "webhookid",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "webhookid": (str, ),
                },
                "attribute_map": {
                    "webhookid": "webhookid",
                },
                "location_map": {
                    "webhookid": "path",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept":
                ["application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1"],
                "content_type": [],
            },
            api_client=api_client,
            callable=__get_webhook,
        )

        def __get_webhooks(self, **kwargs):
            """get_webhooks  # 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_webhooks(async_req=True)
            >>> result = thread.get()


            Keyword Args:
                company (str): [optional] if omitted the server will use the default value of ''
                user (str): [optional]
                offset (int): [optional] if omitted the server will use the default value of 0
                limit (int): [optional] if omitted the server will use the default value of 20
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_list_response_bt_webhook_info.BTListResponseBTWebhookInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs["async_req"] = kwargs.get("async_req", False)
            kwargs["_return_http_data_only"] = kwargs.get(
                "_return_http_data_only", True)
            kwargs["_preload_content"] = kwargs.get("_preload_content", True)
            kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
            kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
            kwargs["_check_return_type"] = kwargs.get("_check_return_type",
                                                      True)
            kwargs["_host_index"] = kwargs.get("_host_index", 0)
            return self.call_with_http_info(**kwargs)

        self.get_webhooks = Endpoint(
            settings={
                "response_type":
                (bt_list_response_bt_webhook_info.BTListResponseBTWebhookInfo,
                 ),
                "auth": ["OAuth2"],
                "endpoint_path":
                "/api/webhooks",
                "operation_id":
                "get_webhooks",
                "http_method":
                "GET",
                "servers": [],
            },
            params_map={
                "all": [
                    "company",
                    "user",
                    "offset",
                    "limit",
                ],
                "required": [],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "company": (str, ),
                    "user": (str, ),
                    "offset": (int, ),
                    "limit": (int, ),
                },
                "attribute_map": {
                    "company": "company",
                    "user": "******",
                    "offset": "offset",
                    "limit": "limit",
                },
                "location_map": {
                    "company": "query",
                    "user": "******",
                    "offset": "query",
                    "limit": "query",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept":
                ["application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1"],
                "content_type": [],
            },
            api_client=api_client,
            callable=__get_webhooks,
        )

        def __ping_webhook(self, webhookid, **kwargs):
            """ping_webhook  # noqa: E501

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

            Args:
                webhookid (str):

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                None
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs["async_req"] = kwargs.get("async_req", False)
            kwargs["_return_http_data_only"] = kwargs.get(
                "_return_http_data_only", True)
            kwargs["_preload_content"] = kwargs.get("_preload_content", True)
            kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
            kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
            kwargs["_check_return_type"] = kwargs.get("_check_return_type",
                                                      True)
            kwargs["_host_index"] = kwargs.get("_host_index", 0)
            kwargs["webhookid"] = webhookid
            return self.call_with_http_info(**kwargs)

        self.ping_webhook = Endpoint(
            settings={
                "response_type": None,
                "auth": ["OAuth2"],
                "endpoint_path": "/api/webhooks/{webhookid}/ping",
                "operation_id": "ping_webhook",
                "http_method": "POST",
                "servers": [],
            },
            params_map={
                "all": [
                    "webhookid",
                ],
                "required": [
                    "webhookid",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "webhookid": (str, ),
                },
                "attribute_map": {
                    "webhookid": "webhookid",
                },
                "location_map": {
                    "webhookid": "path",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept":
                ["application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1"],
                "content_type": [],
            },
            api_client=api_client,
            callable=__ping_webhook,
        )

        def __unregister_webhook(self, webhookid, **kwargs):
            """unregister_webhook  # noqa: E501

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

            Args:
                webhookid (str):

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                None
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs["async_req"] = kwargs.get("async_req", False)
            kwargs["_return_http_data_only"] = kwargs.get(
                "_return_http_data_only", True)
            kwargs["_preload_content"] = kwargs.get("_preload_content", True)
            kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
            kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
            kwargs["_check_return_type"] = kwargs.get("_check_return_type",
                                                      True)
            kwargs["_host_index"] = kwargs.get("_host_index", 0)
            kwargs["webhookid"] = webhookid
            return self.call_with_http_info(**kwargs)

        self.unregister_webhook = Endpoint(
            settings={
                "response_type": None,
                "auth": ["OAuth2"],
                "endpoint_path": "/api/webhooks/{webhookid}",
                "operation_id": "unregister_webhook",
                "http_method": "DELETE",
                "servers": [],
            },
            params_map={
                "all": [
                    "webhookid",
                ],
                "required": [
                    "webhookid",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "webhookid": (str, ),
                },
                "attribute_map": {
                    "webhookid": "webhookid",
                },
                "location_map": {
                    "webhookid": "path",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept":
                ["application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1"],
                "content_type": [],
            },
            api_client=api_client,
            callable=__unregister_webhook,
        )

        def __update_webhook(self, webhookid, **kwargs):
            """update_webhook  # 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_webhook(webhookid, async_req=True)
            >>> result = thread.get()

            Args:
                webhookid (str):

            Keyword Args:
                bt_webhook_params (bt_webhook_params.BTWebhookParams): [optional]
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_webhook_info.BTWebhookInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs["async_req"] = kwargs.get("async_req", False)
            kwargs["_return_http_data_only"] = kwargs.get(
                "_return_http_data_only", True)
            kwargs["_preload_content"] = kwargs.get("_preload_content", True)
            kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
            kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
            kwargs["_check_return_type"] = kwargs.get("_check_return_type",
                                                      True)
            kwargs["_host_index"] = kwargs.get("_host_index", 0)
            kwargs["webhookid"] = webhookid
            return self.call_with_http_info(**kwargs)

        self.update_webhook = Endpoint(
            settings={
                "response_type": (bt_webhook_info.BTWebhookInfo, ),
                "auth": ["OAuth2"],
                "endpoint_path": "/api/webhooks/{webhookid}",
                "operation_id": "update_webhook",
                "http_method": "POST",
                "servers": [],
            },
            params_map={
                "all": [
                    "webhookid",
                    "bt_webhook_params",
                ],
                "required": [
                    "webhookid",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "webhookid": (str, ),
                    "bt_webhook_params": (bt_webhook_params.BTWebhookParams, ),
                },
                "attribute_map": {
                    "webhookid": "webhookid",
                },
                "location_map": {
                    "webhookid": "path",
                    "bt_webhook_params": "body",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept":
                ["application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1"],
                "content_type": ["application/json;charset=UTF-8; qs=0.09"],
            },
            api_client=api_client,
            callable=__update_webhook,
        )
Exemplo n.º 21
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __create_feature_studio(self, did, wid, bt_model_element_params,
                                    **kwargs):
            """Create Feature Studio  # noqa: E501

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

            Args:
                did (str):
                wid (str):
                bt_model_element_params (bt_model_element_params.BTModelElementParams):

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_document_element_info.BTDocumentElementInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs["async_req"] = kwargs.get("async_req", False)
            kwargs["_return_http_data_only"] = kwargs.get(
                "_return_http_data_only", True)
            kwargs["_preload_content"] = kwargs.get("_preload_content", True)
            kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
            kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
            kwargs["_check_return_type"] = kwargs.get("_check_return_type",
                                                      True)
            kwargs["_host_index"] = kwargs.get("_host_index", 0)
            kwargs["did"] = did
            kwargs["wid"] = wid
            kwargs["bt_model_element_params"] = bt_model_element_params
            return self.call_with_http_info(**kwargs)

        self.create_feature_studio = Endpoint(
            settings={
                "response_type":
                (bt_document_element_info.BTDocumentElementInfo, ),
                "auth": ["OAuth2"],
                "endpoint_path": "/api/featurestudios/d/{did}/w/{wid}",
                "operation_id": "create_feature_studio",
                "http_method": "POST",
                "servers": [],
            },
            params_map={
                "all": [
                    "did",
                    "wid",
                    "bt_model_element_params",
                ],
                "required": [
                    "did",
                    "wid",
                    "bt_model_element_params",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "did": (str, ),
                    "wid": (str, ),
                    "bt_model_element_params":
                    (bt_model_element_params.BTModelElementParams, ),
                },
                "attribute_map": {
                    "did": "did",
                    "wid": "wid",
                },
                "location_map": {
                    "did": "path",
                    "wid": "path",
                    "bt_model_element_params": "body",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept":
                ["application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1"],
                "content_type": ["application/json;charset=UTF-8; qs=0.09"],
            },
            api_client=api_client,
            callable=__create_feature_studio,
        )

        def __get_feature_studio_contents(self, did, wvm, wvmid, eid,
                                          **kwargs):
            """Get Feature Studio Contents.  # 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_feature_studio_contents(did, wvm, wvmid, eid, async_req=True)
            >>> result = thread.get()

            Args:
                did (str):
                wvm (str):
                wvmid (str):
                eid (str):

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_feature_studio_contents2239.BTFeatureStudioContents2239
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs["async_req"] = kwargs.get("async_req", False)
            kwargs["_return_http_data_only"] = kwargs.get(
                "_return_http_data_only", True)
            kwargs["_preload_content"] = kwargs.get("_preload_content", True)
            kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
            kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
            kwargs["_check_return_type"] = kwargs.get("_check_return_type",
                                                      True)
            kwargs["_host_index"] = kwargs.get("_host_index", 0)
            kwargs["did"] = did
            kwargs["wvm"] = wvm
            kwargs["wvmid"] = wvmid
            kwargs["eid"] = eid
            return self.call_with_http_info(**kwargs)

        self.get_feature_studio_contents = Endpoint(
            settings={
                "response_type":
                (bt_feature_studio_contents2239.BTFeatureStudioContents2239, ),
                "auth": ["OAuth2"],
                "endpoint_path":
                "/api/featurestudios/d/{did}/{wvm}/{wvmid}/e/{eid}",
                "operation_id":
                "get_feature_studio_contents",
                "http_method":
                "GET",
                "servers": [],
            },
            params_map={
                "all": [
                    "did",
                    "wvm",
                    "wvmid",
                    "eid",
                ],
                "required": [
                    "did",
                    "wvm",
                    "wvmid",
                    "eid",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "did": (str, ),
                    "wvm": (str, ),
                    "wvmid": (str, ),
                    "eid": (str, ),
                },
                "attribute_map": {
                    "did": "did",
                    "wvm": "wvm",
                    "wvmid": "wvmid",
                    "eid": "eid",
                },
                "location_map": {
                    "did": "path",
                    "wvm": "path",
                    "wvmid": "path",
                    "eid": "path",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept":
                ["application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1"],
                "content_type": [],
            },
            api_client=api_client,
            callable=__get_feature_studio_contents,
        )

        def __get_feature_studio_specs(self, did, wvm, wvmid, eid, **kwargs):
            """Get Feature Studio Specs  # 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_feature_studio_specs(did, wvm, wvmid, eid, async_req=True)
            >>> result = thread.get()

            Args:
                did (str):
                wvm (str):
                wvmid (str):
                eid (str):

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_feature_specs_response664.BTFeatureSpecsResponse664
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs["async_req"] = kwargs.get("async_req", False)
            kwargs["_return_http_data_only"] = kwargs.get(
                "_return_http_data_only", True)
            kwargs["_preload_content"] = kwargs.get("_preload_content", True)
            kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
            kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
            kwargs["_check_return_type"] = kwargs.get("_check_return_type",
                                                      True)
            kwargs["_host_index"] = kwargs.get("_host_index", 0)
            kwargs["did"] = did
            kwargs["wvm"] = wvm
            kwargs["wvmid"] = wvmid
            kwargs["eid"] = eid
            return self.call_with_http_info(**kwargs)

        self.get_feature_studio_specs = Endpoint(
            settings={
                "response_type":
                (bt_feature_specs_response664.BTFeatureSpecsResponse664, ),
                "auth": ["OAuth2"],
                "endpoint_path":
                "/api/featurestudios/d/{did}/{wvm}/{wvmid}/e/{eid}/featurespecs",
                "operation_id":
                "get_feature_studio_specs",
                "http_method":
                "GET",
                "servers": [],
            },
            params_map={
                "all": [
                    "did",
                    "wvm",
                    "wvmid",
                    "eid",
                ],
                "required": [
                    "did",
                    "wvm",
                    "wvmid",
                    "eid",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "did": (str, ),
                    "wvm": (str, ),
                    "wvmid": (str, ),
                    "eid": (str, ),
                },
                "attribute_map": {
                    "did": "did",
                    "wvm": "wvm",
                    "wvmid": "wvmid",
                    "eid": "eid",
                },
                "location_map": {
                    "did": "path",
                    "wvm": "path",
                    "wvmid": "path",
                    "eid": "path",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept":
                ["application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1"],
                "content_type": [],
            },
            api_client=api_client,
            callable=__get_feature_studio_specs,
        )

        def __update_feature_studio_contents(self, did, wvm, wvmid, eid,
                                             **kwargs):
            """Update Feature Studio contents  # 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_feature_studio_contents(did, wvm, wvmid, eid, async_req=True)
            >>> result = thread.get()

            Args:
                did (str):
                wvm (str):
                wvmid (str):
                eid (str):

            Keyword Args:
                body (str): [optional]
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_feature_studio_contents2239.BTFeatureStudioContents2239
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs["async_req"] = kwargs.get("async_req", False)
            kwargs["_return_http_data_only"] = kwargs.get(
                "_return_http_data_only", True)
            kwargs["_preload_content"] = kwargs.get("_preload_content", True)
            kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
            kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
            kwargs["_check_return_type"] = kwargs.get("_check_return_type",
                                                      True)
            kwargs["_host_index"] = kwargs.get("_host_index", 0)
            kwargs["did"] = did
            kwargs["wvm"] = wvm
            kwargs["wvmid"] = wvmid
            kwargs["eid"] = eid
            return self.call_with_http_info(**kwargs)

        self.update_feature_studio_contents = Endpoint(
            settings={
                "response_type":
                (bt_feature_studio_contents2239.BTFeatureStudioContents2239, ),
                "auth": ["OAuth2"],
                "endpoint_path":
                "/api/featurestudios/d/{did}/{wvm}/{wvmid}/e/{eid}",
                "operation_id":
                "update_feature_studio_contents",
                "http_method":
                "POST",
                "servers": [],
            },
            params_map={
                "all": [
                    "did",
                    "wvm",
                    "wvmid",
                    "eid",
                    "body",
                ],
                "required": [
                    "did",
                    "wvm",
                    "wvmid",
                    "eid",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "did": (str, ),
                    "wvm": (str, ),
                    "wvmid": (str, ),
                    "eid": (str, ),
                    "body": (str, ),
                },
                "attribute_map": {
                    "did": "did",
                    "wvm": "wvm",
                    "wvmid": "wvmid",
                    "eid": "eid",
                },
                "location_map": {
                    "did": "path",
                    "wvm": "path",
                    "wvmid": "path",
                    "eid": "path",
                    "body": "body",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept":
                ["application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1"],
                "content_type": ["application/json;charset=UTF-8; qs=0.09"],
            },
            api_client=api_client,
            callable=__update_feature_studio_contents,
        )
Exemplo n.º 22
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __cancel_purchase_new(self, aid, pid, **kwargs):
            """Cancel Recurring Subscription  # noqa: E501

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

            Args:
                aid (str):
                pid (str):

            Keyword Args:
                cancel_immediately (bool): [optional] if omitted the server will use the default value of False
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                None
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs["async_req"] = kwargs.get("async_req", False)
            kwargs["_return_http_data_only"] = kwargs.get(
                "_return_http_data_only", True)
            kwargs["_preload_content"] = kwargs.get("_preload_content", True)
            kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
            kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
            kwargs["_check_return_type"] = kwargs.get("_check_return_type",
                                                      True)
            kwargs["_host_index"] = kwargs.get("_host_index", 0)
            kwargs["aid"] = aid
            kwargs["pid"] = pid
            return self.call_with_http_info(**kwargs)

        self.cancel_purchase_new = Endpoint(
            settings={
                "response_type": None,
                "auth": ["OAuth2"],
                "endpoint_path": "/api/accounts/{aid}/purchases/{pid}",
                "operation_id": "cancel_purchase_new",
                "http_method": "DELETE",
                "servers": [],
            },
            params_map={
                "all": [
                    "aid",
                    "pid",
                    "cancel_immediately",
                ],
                "required": [
                    "aid",
                    "pid",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "aid": (str, ),
                    "pid": (str, ),
                    "cancel_immediately": (bool, ),
                },
                "attribute_map": {
                    "aid": "aid",
                    "pid": "pid",
                    "cancel_immediately": "cancelImmediately",
                },
                "location_map": {
                    "aid": "path",
                    "pid": "path",
                    "cancel_immediately": "query",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept":
                ["application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1"],
                "content_type": [],
            },
            api_client=api_client,
            callable=__cancel_purchase_new,
        )

        def __consume_purchase(self, pid, **kwargs):
            """Mark Purchase Consumed For User  # noqa: E501

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

            Args:
                pid (str):

            Keyword Args:
                bt_purchase_user_params (bt_purchase_user_params.BTPurchaseUserParams): [optional]
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_purchase_info.BTPurchaseInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs["async_req"] = kwargs.get("async_req", False)
            kwargs["_return_http_data_only"] = kwargs.get(
                "_return_http_data_only", True)
            kwargs["_preload_content"] = kwargs.get("_preload_content", True)
            kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
            kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
            kwargs["_check_return_type"] = kwargs.get("_check_return_type",
                                                      True)
            kwargs["_host_index"] = kwargs.get("_host_index", 0)
            kwargs["pid"] = pid
            return self.call_with_http_info(**kwargs)

        self.consume_purchase = Endpoint(
            settings={
                "response_type": (bt_purchase_info.BTPurchaseInfo, ),
                "auth": ["OAuth2"],
                "endpoint_path": "/api/accounts/purchases/{pid}/consume",
                "operation_id": "consume_purchase",
                "http_method": "POST",
                "servers": [],
            },
            params_map={
                "all": [
                    "pid",
                    "bt_purchase_user_params",
                ],
                "required": [
                    "pid",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "pid": (str, ),
                    "bt_purchase_user_params":
                    (bt_purchase_user_params.BTPurchaseUserParams, ),
                },
                "attribute_map": {
                    "pid": "pid",
                },
                "location_map": {
                    "pid": "path",
                    "bt_purchase_user_params": "body",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept":
                ["application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1"],
                "content_type": ["application/json;charset=UTF-8; qs=0.09"],
            },
            api_client=api_client,
            callable=__consume_purchase,
        )

        def __get_plan_purchases(self, plan_id, **kwargs):
            """Get Plan Purchases  # 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_plan_purchases(plan_id, async_req=True)
            >>> result = thread.get()

            Args:
                plan_id (str):

            Keyword Args:
                offset (int): [optional] if omitted the server will use the default value of 0
                limit (int): [optional] if omitted the server will use the default value of 20
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_list_response_bt_purchase_info.BTListResponseBTPurchaseInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs["async_req"] = kwargs.get("async_req", False)
            kwargs["_return_http_data_only"] = kwargs.get(
                "_return_http_data_only", True)
            kwargs["_preload_content"] = kwargs.get("_preload_content", True)
            kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
            kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
            kwargs["_check_return_type"] = kwargs.get("_check_return_type",
                                                      True)
            kwargs["_host_index"] = kwargs.get("_host_index", 0)
            kwargs["plan_id"] = plan_id
            return self.call_with_http_info(**kwargs)

        self.get_plan_purchases = Endpoint(
            settings={
                "response_type": (bt_list_response_bt_purchase_info.
                                  BTListResponseBTPurchaseInfo, ),
                "auth": [],
                "endpoint_path":
                "/api/accounts/plans/{planId}/purchases",
                "operation_id":
                "get_plan_purchases",
                "http_method":
                "GET",
                "servers": [],
            },
            params_map={
                "all": [
                    "plan_id",
                    "offset",
                    "limit",
                ],
                "required": [
                    "plan_id",
                ],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "plan_id": (str, ),
                    "offset": (int, ),
                    "limit": (int, ),
                },
                "attribute_map": {
                    "plan_id": "planId",
                    "offset": "offset",
                    "limit": "limit",
                },
                "location_map": {
                    "plan_id": "path",
                    "offset": "query",
                    "limit": "query",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept":
                ["application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1"],
                "content_type": [],
            },
            api_client=api_client,
            callable=__get_plan_purchases,
        )

        def __get_purchases(self, **kwargs):
            """Get User's Appstore Purchases.  # 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_purchases(async_req=True)
            >>> result = thread.get()


            Keyword Args:
                all (bool): [optional] if omitted the server will use the default value of False
                own_purchase_only (bool): [optional] if omitted the server will use the default value of False
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                [bt_purchase_info.BTPurchaseInfo]
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs["async_req"] = kwargs.get("async_req", False)
            kwargs["_return_http_data_only"] = kwargs.get(
                "_return_http_data_only", True)
            kwargs["_preload_content"] = kwargs.get("_preload_content", True)
            kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
            kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
            kwargs["_check_return_type"] = kwargs.get("_check_return_type",
                                                      True)
            kwargs["_host_index"] = kwargs.get("_host_index", 0)
            return self.call_with_http_info(**kwargs)

        self.get_purchases = Endpoint(
            settings={
                "response_type": ([bt_purchase_info.BTPurchaseInfo], ),
                "auth": [],
                "endpoint_path": "/api/accounts/purchases",
                "operation_id": "get_purchases",
                "http_method": "GET",
                "servers": [],
            },
            params_map={
                "all": [
                    "all",
                    "own_purchase_only",
                ],
                "required": [],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "all": (bool, ),
                    "own_purchase_only": (bool, ),
                },
                "attribute_map": {
                    "all": "all",
                    "own_purchase_only": "ownPurchaseOnly",
                },
                "location_map": {
                    "all": "query",
                    "own_purchase_only": "query",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept":
                ["application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1"],
                "content_type": [],
            },
            api_client=api_client,
            callable=__get_purchases,
        )
Exemplo n.º 23
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

        def __find_company(self, **kwargs):
            """Get User companies.  # noqa: E501

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


            Keyword Args:
                uid (str): [optional]
                active_only (bool): [optional] if omitted the server will use the default value of True
                include_all (bool): [optional] if omitted the server will use the default value of False
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_list_response_bt_company_info.BTListResponseBTCompanyInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get('async_req', False)
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True)
            kwargs['_preload_content'] = kwargs.get('_preload_content', True)
            kwargs['_request_timeout'] = kwargs.get('_request_timeout', None)
            kwargs['_check_input_type'] = kwargs.get('_check_input_type', True)
            kwargs['_check_return_type'] = kwargs.get('_check_return_type',
                                                      True)
            kwargs['_host_index'] = kwargs.get('_host_index', 0)
            return self.call_with_http_info(**kwargs)

        self.find_company = Endpoint(
            settings={
                'response_type':
                (bt_list_response_bt_company_info.BTListResponseBTCompanyInfo,
                 ),
                'auth': [],
                'endpoint_path':
                '/api/companies',
                'operation_id':
                'find_company',
                'http_method':
                'GET',
                'servers': [],
            },
            params_map={
                'all': [
                    'uid',
                    'active_only',
                    'include_all',
                ],
                'required': [],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'uid': (str, ),
                    'active_only': (bool, ),
                    'include_all': (bool, ),
                },
                'attribute_map': {
                    'uid': 'uid',
                    'active_only': 'activeOnly',
                    'include_all': 'includeAll',
                },
                'location_map': {
                    'uid': 'query',
                    'active_only': 'query',
                    'include_all': 'query',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept':
                ['application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1'],
                'content_type': [],
            },
            api_client=api_client,
            callable=__find_company)

        def __get_company(self, cid, **kwargs):
            """Get company.  # 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_company(cid, async_req=True)
            >>> result = thread.get()

            Args:
                cid (str):

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_company_info.BTCompanyInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get('async_req', False)
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True)
            kwargs['_preload_content'] = kwargs.get('_preload_content', True)
            kwargs['_request_timeout'] = kwargs.get('_request_timeout', None)
            kwargs['_check_input_type'] = kwargs.get('_check_input_type', True)
            kwargs['_check_return_type'] = kwargs.get('_check_return_type',
                                                      True)
            kwargs['_host_index'] = kwargs.get('_host_index', 0)
            kwargs['cid'] = \
                cid
            return self.call_with_http_info(**kwargs)

        self.get_company = Endpoint(
            settings={
                'response_type': (bt_company_info.BTCompanyInfo, ),
                'auth': [],
                'endpoint_path': '/api/companies/{cid}',
                'operation_id': 'get_company',
                'http_method': 'GET',
                'servers': [],
            },
            params_map={
                'all': [
                    'cid',
                ],
                'required': [
                    'cid',
                ],
                'nullable': [],
                'enum': [],
                'validation': []
            },
            root_map={
                'validations': {},
                'allowed_values': {},
                'openapi_types': {
                    'cid': (str, ),
                },
                'attribute_map': {
                    'cid': 'cid',
                },
                'location_map': {
                    'cid': 'path',
                },
                'collection_format_map': {}
            },
            headers_map={
                'accept':
                ['application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1'],
                'content_type': [],
            },
            api_client=api_client,
            callable=__get_company)
Exemplo n.º 24
0
    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

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

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


            Keyword Args:
                bt_webhook_params (bt_webhook_params.BTWebhookParams): [optional]
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_webhook_info.BTWebhookInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get(
                'async_req', False
            )
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True
            )
            kwargs['_preload_content'] = kwargs.get(
                '_preload_content', True
            )
            kwargs['_request_timeout'] = kwargs.get(
                '_request_timeout', None
            )
            kwargs['_check_input_type'] = kwargs.get(
                '_check_input_type', True
            )
            kwargs['_check_return_type'] = kwargs.get(
                '_check_return_type', True
            )
            kwargs['_host_index'] = kwargs.get('_host_index', 0)
            return self.call_with_http_info(**kwargs)

        self.create_webhook = Endpoint(
            settings={
                'response_type': (bt_webhook_info.BTWebhookInfo,),
                'auth': [
                    'OAuth2'
                ],
                'endpoint_path': '/api/webhooks',
                'operation_id': 'create_webhook',
                'http_method': 'POST',
                'servers': [],
            },
            params_map={
                'all': [
                    'bt_webhook_params',
                ],
                'required': [],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'bt_webhook_params':
                        (bt_webhook_params.BTWebhookParams,),
                },
                'attribute_map': {
                },
                'location_map': {
                    'bt_webhook_params': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1',
                    'application/json;charset=UTF-8; qs=0.09'
                ],
                'content_type': [
                    'application/json;charset=UTF-8; qs=0.09'
                ]
            },
            api_client=api_client,
            callable=__create_webhook
        )

        def __get_webhook(
            self,
            webhookid,
            **kwargs
        ):
            """get_webhook  # 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_webhook(webhookid, async_req=True)
            >>> result = thread.get()

            Args:
                webhookid (str):

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_webhook_info.BTWebhookInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get(
                'async_req', False
            )
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True
            )
            kwargs['_preload_content'] = kwargs.get(
                '_preload_content', True
            )
            kwargs['_request_timeout'] = kwargs.get(
                '_request_timeout', None
            )
            kwargs['_check_input_type'] = kwargs.get(
                '_check_input_type', True
            )
            kwargs['_check_return_type'] = kwargs.get(
                '_check_return_type', True
            )
            kwargs['_host_index'] = kwargs.get('_host_index', 0)
            kwargs['webhookid'] = \
                webhookid
            return self.call_with_http_info(**kwargs)

        self.get_webhook = Endpoint(
            settings={
                'response_type': (bt_webhook_info.BTWebhookInfo,),
                'auth': [
                    'OAuth2'
                ],
                'endpoint_path': '/api/webhooks/{webhookid}',
                'operation_id': 'get_webhook',
                'http_method': 'GET',
                'servers': [],
            },
            params_map={
                'all': [
                    'webhookid',
                ],
                'required': [
                    'webhookid',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'webhookid':
                        (str,),
                },
                'attribute_map': {
                    'webhookid': 'webhookid',
                },
                'location_map': {
                    'webhookid': 'path',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1',
                    'application/json;charset=UTF-8; qs=0.09'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__get_webhook
        )

        def __get_webhooks(
            self,
            **kwargs
        ):
            """get_webhooks  # 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_webhooks(async_req=True)
            >>> result = thread.get()


            Keyword Args:
                company (str): [optional] if omitted the server will use the default value of ''
                user (str): [optional]
                offset (int): [optional] if omitted the server will use the default value of 0
                limit (int): [optional] if omitted the server will use the default value of 20
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_list_response_bt_webhook_info.BTListResponseBTWebhookInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get(
                'async_req', False
            )
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True
            )
            kwargs['_preload_content'] = kwargs.get(
                '_preload_content', True
            )
            kwargs['_request_timeout'] = kwargs.get(
                '_request_timeout', None
            )
            kwargs['_check_input_type'] = kwargs.get(
                '_check_input_type', True
            )
            kwargs['_check_return_type'] = kwargs.get(
                '_check_return_type', True
            )
            kwargs['_host_index'] = kwargs.get('_host_index', 0)
            return self.call_with_http_info(**kwargs)

        self.get_webhooks = Endpoint(
            settings={
                'response_type': (bt_list_response_bt_webhook_info.BTListResponseBTWebhookInfo,),
                'auth': [
                    'OAuth2'
                ],
                'endpoint_path': '/api/webhooks',
                'operation_id': 'get_webhooks',
                'http_method': 'GET',
                'servers': [],
            },
            params_map={
                'all': [
                    'company',
                    'user',
                    'offset',
                    'limit',
                ],
                'required': [],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'company':
                        (str,),
                    'user':
                        (str,),
                    'offset':
                        (int,),
                    'limit':
                        (int,),
                },
                'attribute_map': {
                    'company': 'company',
                    'user': '******',
                    'offset': 'offset',
                    'limit': 'limit',
                },
                'location_map': {
                    'company': 'query',
                    'user': '******',
                    'offset': 'query',
                    'limit': 'query',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1',
                    'application/json;charset=UTF-8; qs=0.09'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__get_webhooks
        )

        def __ping_webhook(
            self,
            webhookid,
            **kwargs
        ):
            """ping_webhook  # noqa: E501

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

            Args:
                webhookid (str):

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                None
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get(
                'async_req', False
            )
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True
            )
            kwargs['_preload_content'] = kwargs.get(
                '_preload_content', True
            )
            kwargs['_request_timeout'] = kwargs.get(
                '_request_timeout', None
            )
            kwargs['_check_input_type'] = kwargs.get(
                '_check_input_type', True
            )
            kwargs['_check_return_type'] = kwargs.get(
                '_check_return_type', True
            )
            kwargs['_host_index'] = kwargs.get('_host_index', 0)
            kwargs['webhookid'] = \
                webhookid
            return self.call_with_http_info(**kwargs)

        self.ping_webhook = Endpoint(
            settings={
                'response_type': None,
                'auth': [
                    'OAuth2'
                ],
                'endpoint_path': '/api/webhooks/{webhookid}/ping',
                'operation_id': 'ping_webhook',
                'http_method': 'POST',
                'servers': [],
            },
            params_map={
                'all': [
                    'webhookid',
                ],
                'required': [
                    'webhookid',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'webhookid':
                        (str,),
                },
                'attribute_map': {
                    'webhookid': 'webhookid',
                },
                'location_map': {
                    'webhookid': 'path',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1',
                    'application/json;charset=UTF-8; qs=0.09'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__ping_webhook
        )

        def __unregister_webhook(
            self,
            webhookid,
            **kwargs
        ):
            """unregister_webhook  # noqa: E501

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

            Args:
                webhookid (str):

            Keyword Args:
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                None
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get(
                'async_req', False
            )
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True
            )
            kwargs['_preload_content'] = kwargs.get(
                '_preload_content', True
            )
            kwargs['_request_timeout'] = kwargs.get(
                '_request_timeout', None
            )
            kwargs['_check_input_type'] = kwargs.get(
                '_check_input_type', True
            )
            kwargs['_check_return_type'] = kwargs.get(
                '_check_return_type', True
            )
            kwargs['_host_index'] = kwargs.get('_host_index', 0)
            kwargs['webhookid'] = \
                webhookid
            return self.call_with_http_info(**kwargs)

        self.unregister_webhook = Endpoint(
            settings={
                'response_type': None,
                'auth': [
                    'OAuth2'
                ],
                'endpoint_path': '/api/webhooks/{webhookid}',
                'operation_id': 'unregister_webhook',
                'http_method': 'DELETE',
                'servers': [],
            },
            params_map={
                'all': [
                    'webhookid',
                ],
                'required': [
                    'webhookid',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'webhookid':
                        (str,),
                },
                'attribute_map': {
                    'webhookid': 'webhookid',
                },
                'location_map': {
                    'webhookid': 'path',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1',
                    'application/json;charset=UTF-8; qs=0.09'
                ],
                'content_type': [],
            },
            api_client=api_client,
            callable=__unregister_webhook
        )

        def __update_webhook(
            self,
            webhookid,
            **kwargs
        ):
            """update_webhook  # 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_webhook(webhookid, async_req=True)
            >>> result = thread.get()

            Args:
                webhookid (str):

            Keyword Args:
                bt_webhook_params (bt_webhook_params.BTWebhookParams): [optional]
                _return_http_data_only (bool): response data without head status
                    code and headers. Default is True.
                _preload_content (bool): if False, the urllib3.HTTPResponse object
                    will be returned without reading/decoding response data.
                    Default is True.
                _request_timeout (float/tuple): timeout setting for this request. If one
                    number provided, it will be total request timeout. It can also
                    be a pair (tuple) of (connection, read) timeouts.
                    Default is None.
                _check_input_type (bool): specifies if type checking
                    should be done one the data sent to the server.
                    Default is True.
                _check_return_type (bool): specifies if type checking
                    should be done one the data received from the server.
                    Default is True.
                _host_index (int): specifies the index of the server
                    that we want to use.
                    Default is 0.
                async_req (bool): execute request asynchronously

            Returns:
                bt_webhook_info.BTWebhookInfo
                    If the method is called asynchronously, returns the request
                    thread.
            """
            kwargs['async_req'] = kwargs.get(
                'async_req', False
            )
            kwargs['_return_http_data_only'] = kwargs.get(
                '_return_http_data_only', True
            )
            kwargs['_preload_content'] = kwargs.get(
                '_preload_content', True
            )
            kwargs['_request_timeout'] = kwargs.get(
                '_request_timeout', None
            )
            kwargs['_check_input_type'] = kwargs.get(
                '_check_input_type', True
            )
            kwargs['_check_return_type'] = kwargs.get(
                '_check_return_type', True
            )
            kwargs['_host_index'] = kwargs.get('_host_index', 0)
            kwargs['webhookid'] = \
                webhookid
            return self.call_with_http_info(**kwargs)

        self.update_webhook = Endpoint(
            settings={
                'response_type': (bt_webhook_info.BTWebhookInfo,),
                'auth': [
                    'OAuth2'
                ],
                'endpoint_path': '/api/webhooks/{webhookid}',
                'operation_id': 'update_webhook',
                'http_method': 'POST',
                'servers': [],
            },
            params_map={
                'all': [
                    'webhookid',
                    'bt_webhook_params',
                ],
                'required': [
                    'webhookid',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                ]
            },
            root_map={
                'validations': {
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'webhookid':
                        (str,),
                    'bt_webhook_params':
                        (bt_webhook_params.BTWebhookParams,),
                },
                'attribute_map': {
                    'webhookid': 'webhookid',
                },
                'location_map': {
                    'webhookid': 'path',
                    'bt_webhook_params': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/vnd.onshape.v1+json;charset=UTF-8;qs=0.1',
                    'application/json;charset=UTF-8; qs=0.09'
                ],
                'content_type': [
                    'application/json;charset=UTF-8; qs=0.09'
                ]
            },
            api_client=api_client,
            callable=__update_webhook
        )