# coding: utf-8

"""
    Onshape REST API

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

    The version of the OpenAPI document: 1.111
    Contact: api-support@onshape.zendesk.com
    Generated by: https://openapi-generator.tech
"""

from __future__ import absolute_import

# python 2 and python 3 compatibility library
import six
from onshape_client.oas.api_client import ApiClient
from onshape_client.oas.exceptions import ApiTypeError, ApiValueError
from onshape_client.oas.model_utils import (  # noqa: F401
    check_allowed_values,
    check_validations,
    file_type,
    int,
    none_type,
    str,
    validate_and_convert_types,
)
from onshape_client.oas.models import bt_bounding_box_info
from onshape_client.oas.models import bt_export_model_bodies_response734
from onshape_client.oas.models import bt_export_tessellated_edges_response327
from onshape_client.oas.models import bt_export_tessellated_faces_response898
from onshape_client.oas.models import bt_mass_properties_bulk_info
from onshape_client.oas.models import bt_part_metadata_info
from onshape_client.oas.models import bt_shaded_views_info
from onshape_client.oas.models import bt_table_response1546
from onshape_client.oas.models import bt_workspace_part_params


class PartsApi(object):
    """NOTE: This class is auto generated by OpenAPI Generator
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

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

        def __export_ps(self, did, wvm, wvmid, eid, partid, **kwargs):
            """Export Part to Parasolid.  # noqa: E501

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

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

            Keyword Args:
                version (str): [optional] if omitted the server will use the default value of '0'
                configuration (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["wvm"] = wvm
            kwargs["wvmid"] = wvmid
            kwargs["eid"] = eid
            kwargs["partid"] = partid
            return self.call_with_http_info(**kwargs)

        self.export_ps = Endpoint(
            settings={
                "response_type": (file_type,),
                "auth": ["OAuth2"],
                "endpoint_path": "/api/parts/d/{did}/{wvm}/{wvmid}/e/{eid}/partid/{partid}/parasolid",
                "operation_id": "export_ps",
                "http_method": "GET",
                "servers": [],
            },
            params_map={
                "all": [
                    "did",
                    "wvm",
                    "wvmid",
                    "eid",
                    "partid",
                    "version",
                    "configuration",
                    "link_document_id",
                ],
                "required": ["did", "wvm", "wvmid", "eid", "partid",],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "did": (str,),
                    "wvm": (str,),
                    "wvmid": (str,),
                    "eid": (str,),
                    "partid": (str,),
                    "version": (str,),
                    "configuration": (str,),
                    "link_document_id": (str,),
                },
                "attribute_map": {
                    "did": "did",
                    "wvm": "wvm",
                    "wvmid": "wvmid",
                    "eid": "eid",
                    "partid": "partid",
                    "version": "version",
                    "configuration": "configuration",
                    "link_document_id": "linkDocumentId",
                },
                "location_map": {
                    "did": "path",
                    "wvm": "path",
                    "wvmid": "path",
                    "eid": "path",
                    "partid": "path",
                    "version": "query",
                    "configuration": "query",
                    "link_document_id": "query",
                },
                "collection_format_map": {},
            },
            headers_map={
                "accept": [
                    "application/vnd.onshape.v1+octet-stream;charset=UTF-8;qs=0.1",
                    "application/json;charset=UTF-8; qs=0.09",
                ],
                "content_type": [],
            },
            api_client=api_client,
            callable=__export_ps,
        )

        def __get_bend_table(self, did, wvm, wvmid, eid, partid, **kwargs):
            """Get Sheet Metal Bend Table.  # 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_bend_table(did, wvm, wvmid, eid, partid, async_req=True)
            >>> result = thread.get()

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

            Keyword Args:
                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_table_response1546.BTTableResponse1546
                    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["partid"] = partid
            return self.call_with_http_info(**kwargs)

        self.get_bend_table = Endpoint(
            settings={
                "response_type": (bt_table_response1546.BTTableResponse1546,),
                "auth": ["OAuth2"],
                "endpoint_path": "/api/parts/d/{did}/{wvm}/{wvmid}/e/{eid}/partid/{partid}/sheetmetal/bendtable",
                "operation_id": "get_bend_table",
                "http_method": "GET",
                "servers": [],
            },
            params_map={
                "all": ["did", "wvm", "wvmid", "eid", "partid", "link_document_id",],
                "required": ["did", "wvm", "wvmid", "eid", "partid",],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "did": (str,),
                    "wvm": (str,),
                    "wvmid": (str,),
                    "eid": (str,),
                    "partid": (str,),
                    "link_document_id": (str,),
                },
                "attribute_map": {
                    "did": "did",
                    "wvm": "wvm",
                    "wvmid": "wvmid",
                    "eid": "eid",
                    "partid": "partid",
                    "link_document_id": "linkDocumentId",
                },
                "location_map": {
                    "did": "path",
                    "wvm": "path",
                    "wvmid": "path",
                    "eid": "path",
                    "partid": "path",
                    "link_document_id": "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_bend_table,
        )

        def __get_body_details(self, did, wvm, wvmid, eid, partid, **kwargs):
            """get_body_details  # 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_body_details(did, wvm, wvmid, eid, partid, async_req=True)
            >>> result = thread.get()

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

            Keyword Args:
                configuration (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_export_model_bodies_response734.BTExportModelBodiesResponse734
                    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["partid"] = partid
            return self.call_with_http_info(**kwargs)

        self.get_body_details = Endpoint(
            settings={
                "response_type": (
                    bt_export_model_bodies_response734.BTExportModelBodiesResponse734,
                ),
                "auth": ["OAuth2"],
                "endpoint_path": "/api/parts/d/{did}/{wvm}/{wvmid}/e/{eid}/partid/{partid}/bodydetails",
                "operation_id": "get_body_details",
                "http_method": "GET",
                "servers": [],
            },
            params_map={
                "all": [
                    "did",
                    "wvm",
                    "wvmid",
                    "eid",
                    "partid",
                    "configuration",
                    "link_document_id",
                ],
                "required": ["did", "wvm", "wvmid", "eid", "partid",],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "did": (str,),
                    "wvm": (str,),
                    "wvmid": (str,),
                    "eid": (str,),
                    "partid": (str,),
                    "configuration": (str,),
                    "link_document_id": (str,),
                },
                "attribute_map": {
                    "did": "did",
                    "wvm": "wvm",
                    "wvmid": "wvmid",
                    "eid": "eid",
                    "partid": "partid",
                    "configuration": "configuration",
                    "link_document_id": "linkDocumentId",
                },
                "location_map": {
                    "did": "path",
                    "wvm": "path",
                    "wvmid": "path",
                    "eid": "path",
                    "partid": "path",
                    "configuration": "query",
                    "link_document_id": "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_body_details,
        )

        def __get_bounding_boxes(self, did, wvm, wvmid, eid, partid, **kwargs):
            """get_bounding_boxes  # 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_bounding_boxes(did, wvm, wvmid, eid, partid, async_req=True)
            >>> result = thread.get()

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

            Keyword Args:
                include_hidden (bool): [optional] if omitted the server will use the default value of False
                configuration (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_bounding_box_info.BTBoundingBoxInfo
                    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["partid"] = partid
            return self.call_with_http_info(**kwargs)

        self.get_bounding_boxes = Endpoint(
            settings={
                "response_type": (bt_bounding_box_info.BTBoundingBoxInfo,),
                "auth": ["OAuth2"],
                "endpoint_path": "/api/parts/d/{did}/{wvm}/{wvmid}/e/{eid}/partid/{partid}/boundingboxes",
                "operation_id": "get_bounding_boxes",
                "http_method": "GET",
                "servers": [],
            },
            params_map={
                "all": [
                    "did",
                    "wvm",
                    "wvmid",
                    "eid",
                    "partid",
                    "include_hidden",
                    "configuration",
                    "link_document_id",
                ],
                "required": ["did", "wvm", "wvmid", "eid", "partid",],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "did": (str,),
                    "wvm": (str,),
                    "wvmid": (str,),
                    "eid": (str,),
                    "partid": (str,),
                    "include_hidden": (bool,),
                    "configuration": (str,),
                    "link_document_id": (str,),
                },
                "attribute_map": {
                    "did": "did",
                    "wvm": "wvm",
                    "wvmid": "wvmid",
                    "eid": "eid",
                    "partid": "partid",
                    "include_hidden": "includeHidden",
                    "configuration": "configuration",
                    "link_document_id": "linkDocumentId",
                },
                "location_map": {
                    "did": "path",
                    "wvm": "path",
                    "wvmid": "path",
                    "eid": "path",
                    "partid": "path",
                    "include_hidden": "query",
                    "configuration": "query",
                    "link_document_id": "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_bounding_boxes,
        )

        def __get_edges(self, did, wvm, wvmid, eid, partid, **kwargs):
            """Tessellated Edges  # 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_edges(did, wvm, wvmid, eid, partid, async_req=True)
            >>> result = thread.get()

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

            Keyword Args:
                angle_tolerance (float): [optional]
                chord_tolerance (float): [optional]
                edge_id ([str]): [optional]
                configuration (str): [optional]
                link_document_id (str): [optional]
                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_export_tessellated_edges_response327.BTExportTessellatedEdgesResponse327
                    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["partid"] = partid
            return self.call_with_http_info(**kwargs)

        self.get_edges = Endpoint(
            settings={
                "response_type": (
                    bt_export_tessellated_edges_response327.BTExportTessellatedEdgesResponse327,
                ),
                "auth": ["OAuth2"],
                "endpoint_path": "/api/parts/d/{did}/{wvm}/{wvmid}/e/{eid}/partid/{partid}/tessellatededges",
                "operation_id": "get_edges",
                "http_method": "GET",
                "servers": [],
            },
            params_map={
                "all": [
                    "did",
                    "wvm",
                    "wvmid",
                    "eid",
                    "partid",
                    "angle_tolerance",
                    "chord_tolerance",
                    "edge_id",
                    "configuration",
                    "link_document_id",
                    "body",
                ],
                "required": ["did", "wvm", "wvmid", "eid", "partid",],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "did": (str,),
                    "wvm": (str,),
                    "wvmid": (str,),
                    "eid": (str,),
                    "partid": (str,),
                    "angle_tolerance": (float,),
                    "chord_tolerance": (float,),
                    "edge_id": ([str],),
                    "configuration": (str,),
                    "link_document_id": (str,),
                    "body": (str,),
                },
                "attribute_map": {
                    "did": "did",
                    "wvm": "wvm",
                    "wvmid": "wvmid",
                    "eid": "eid",
                    "partid": "partid",
                    "angle_tolerance": "angleTolerance",
                    "chord_tolerance": "chordTolerance",
                    "edge_id": "edgeId",
                    "configuration": "configuration",
                    "link_document_id": "linkDocumentId",
                },
                "location_map": {
                    "did": "path",
                    "wvm": "path",
                    "wvmid": "path",
                    "eid": "path",
                    "partid": "path",
                    "angle_tolerance": "query",
                    "chord_tolerance": "query",
                    "edge_id": "query",
                    "configuration": "query",
                    "link_document_id": "query",
                    "body": "body",
                },
                "collection_format_map": {"edge_id": "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": ["application/json;charset=UTF-8; qs=0.09"],
            },
            api_client=api_client,
            callable=__get_edges,
        )

        def __get_faces1(self, did, wvm, wvmid, eid, partid, **kwargs):
            """Get Tessellated Faces  # 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_faces1(did, wvm, wvmid, eid, partid, async_req=True)
            >>> result = thread.get()

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

            Keyword Args:
                angle_tolerance (float): [optional]
                chord_tolerance (float): [optional]
                max_facet_width (float): [optional]
                output_vertex_normals (bool): [optional] if omitted the server will use the default value of False
                output_facet_normals (bool): [optional] if omitted the server will use the default value of True
                output_texture_coordinates (bool): [optional] if omitted the server will use the default value of False
                output_face_appearances (bool): [optional] if omitted the server will use the default value of False
                output_index_table (bool): [optional] if omitted the server will use the default value of False
                face_id ([str]): [optional]
                configuration (str): [optional]
                output_error_faces (bool): [optional] if omitted the server will use the default value of False
                link_document_id (str): [optional]
                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_export_tessellated_faces_response898.BTExportTessellatedFacesResponse898
                    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["partid"] = partid
            return self.call_with_http_info(**kwargs)

        self.get_faces1 = Endpoint(
            settings={
                "response_type": (
                    bt_export_tessellated_faces_response898.BTExportTessellatedFacesResponse898,
                ),
                "auth": ["OAuth2"],
                "endpoint_path": "/api/parts/d/{did}/{wvm}/{wvmid}/e/{eid}/partid/{partid}/tessellatedfaces",
                "operation_id": "get_faces1",
                "http_method": "GET",
                "servers": [],
            },
            params_map={
                "all": [
                    "did",
                    "wvm",
                    "wvmid",
                    "eid",
                    "partid",
                    "angle_tolerance",
                    "chord_tolerance",
                    "max_facet_width",
                    "output_vertex_normals",
                    "output_facet_normals",
                    "output_texture_coordinates",
                    "output_face_appearances",
                    "output_index_table",
                    "face_id",
                    "configuration",
                    "output_error_faces",
                    "link_document_id",
                    "body",
                ],
                "required": ["did", "wvm", "wvmid", "eid", "partid",],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "did": (str,),
                    "wvm": (str,),
                    "wvmid": (str,),
                    "eid": (str,),
                    "partid": (str,),
                    "angle_tolerance": (float,),
                    "chord_tolerance": (float,),
                    "max_facet_width": (float,),
                    "output_vertex_normals": (bool,),
                    "output_facet_normals": (bool,),
                    "output_texture_coordinates": (bool,),
                    "output_face_appearances": (bool,),
                    "output_index_table": (bool,),
                    "face_id": ([str],),
                    "configuration": (str,),
                    "output_error_faces": (bool,),
                    "link_document_id": (str,),
                    "body": (str,),
                },
                "attribute_map": {
                    "did": "did",
                    "wvm": "wvm",
                    "wvmid": "wvmid",
                    "eid": "eid",
                    "partid": "partid",
                    "angle_tolerance": "angleTolerance",
                    "chord_tolerance": "chordTolerance",
                    "max_facet_width": "maxFacetWidth",
                    "output_vertex_normals": "outputVertexNormals",
                    "output_facet_normals": "outputFacetNormals",
                    "output_texture_coordinates": "outputTextureCoordinates",
                    "output_face_appearances": "outputFaceAppearances",
                    "output_index_table": "outputIndexTable",
                    "face_id": "faceId",
                    "configuration": "configuration",
                    "output_error_faces": "outputErrorFaces",
                    "link_document_id": "linkDocumentId",
                },
                "location_map": {
                    "did": "path",
                    "wvm": "path",
                    "wvmid": "path",
                    "eid": "path",
                    "partid": "path",
                    "angle_tolerance": "query",
                    "chord_tolerance": "query",
                    "max_facet_width": "query",
                    "output_vertex_normals": "query",
                    "output_facet_normals": "query",
                    "output_texture_coordinates": "query",
                    "output_face_appearances": "query",
                    "output_index_table": "query",
                    "face_id": "query",
                    "configuration": "query",
                    "output_error_faces": "query",
                    "link_document_id": "query",
                    "body": "body",
                },
                "collection_format_map": {"face_id": "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": ["application/json;charset=UTF-8; qs=0.09"],
            },
            api_client=api_client,
            callable=__get_faces1,
        )

        def __get_mass_properties(self, did, wvm, wvmid, eid, partid, **kwargs):
            """get_mass_properties  # 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_mass_properties(did, wvm, wvmid, eid, partid, async_req=True)
            >>> result = thread.get()

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

            Keyword Args:
                infer_metadata_owner (bool): [optional] if omitted the server will use the default value of True
                link_document_id (str): [optional]
                configuration (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_mass_properties_bulk_info.BTMassPropertiesBulkInfo
                    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["partid"] = partid
            return self.call_with_http_info(**kwargs)

        self.get_mass_properties = Endpoint(
            settings={
                "response_type": (
                    bt_mass_properties_bulk_info.BTMassPropertiesBulkInfo,
                ),
                "auth": ["OAuth2"],
                "endpoint_path": "/api/parts/d/{did}/{wvm}/{wvmid}/e/{eid}/partid/{partid}/massproperties",
                "operation_id": "get_mass_properties",
                "http_method": "GET",
                "servers": [],
            },
            params_map={
                "all": [
                    "did",
                    "wvm",
                    "wvmid",
                    "eid",
                    "partid",
                    "infer_metadata_owner",
                    "link_document_id",
                    "configuration",
                ],
                "required": ["did", "wvm", "wvmid", "eid", "partid",],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "did": (str,),
                    "wvm": (str,),
                    "wvmid": (str,),
                    "eid": (str,),
                    "partid": (str,),
                    "infer_metadata_owner": (bool,),
                    "link_document_id": (str,),
                    "configuration": (str,),
                },
                "attribute_map": {
                    "did": "did",
                    "wvm": "wvm",
                    "wvmid": "wvmid",
                    "eid": "eid",
                    "partid": "partid",
                    "infer_metadata_owner": "inferMetadataOwner",
                    "link_document_id": "linkDocumentId",
                    "configuration": "configuration",
                },
                "location_map": {
                    "did": "path",
                    "wvm": "path",
                    "wvmid": "path",
                    "eid": "path",
                    "partid": "path",
                    "infer_metadata_owner": "query",
                    "link_document_id": "query",
                    "configuration": "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_mass_properties,
        )

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

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

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

            Keyword Args:
                infer_metadata_owner (bool): [optional] if omitted the server will use the default value of False
                include_property_defaults (bool): [optional] if omitted the server will use the default value of False
                friendly_user_ids (bool): [optional] if omitted the server will use the default value of False
                configuration (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_part_metadata_info.BTPartMetadataInfo
                    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["partid"] = partid
            return self.call_with_http_info(**kwargs)

        self.get_part_metadata = Endpoint(
            settings={
                "response_type": (bt_part_metadata_info.BTPartMetadataInfo,),
                "auth": ["OAuth2"],
                "endpoint_path": "/api/parts/d/{did}/{wvm}/{wvmid}/e/{eid}/partid/{partid}/metadata",
                "operation_id": "get_part_metadata",
                "http_method": "GET",
                "servers": [],
            },
            params_map={
                "all": [
                    "did",
                    "wvm",
                    "wvmid",
                    "eid",
                    "partid",
                    "infer_metadata_owner",
                    "include_property_defaults",
                    "friendly_user_ids",
                    "configuration",
                    "link_document_id",
                ],
                "required": ["did", "wvm", "wvmid", "eid", "partid",],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "did": (str,),
                    "wvm": (str,),
                    "wvmid": (str,),
                    "eid": (str,),
                    "partid": (str,),
                    "infer_metadata_owner": (bool,),
                    "include_property_defaults": (bool,),
                    "friendly_user_ids": (bool,),
                    "configuration": (str,),
                    "link_document_id": (str,),
                },
                "attribute_map": {
                    "did": "did",
                    "wvm": "wvm",
                    "wvmid": "wvmid",
                    "eid": "eid",
                    "partid": "partid",
                    "infer_metadata_owner": "inferMetadataOwner",
                    "include_property_defaults": "includePropertyDefaults",
                    "friendly_user_ids": "friendlyUserIds",
                    "configuration": "configuration",
                    "link_document_id": "linkDocumentId",
                },
                "location_map": {
                    "did": "path",
                    "wvm": "path",
                    "wvmid": "path",
                    "eid": "path",
                    "partid": "path",
                    "infer_metadata_owner": "query",
                    "include_property_defaults": "query",
                    "friendly_user_ids": "query",
                    "configuration": "query",
                    "link_document_id": "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_part_metadata,
        )

        def __get_parts_wmv(self, did, wvm, wvmid, **kwargs):
            """Get list of parts  # 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_parts_wmv(did, wvm, wvmid, async_req=True)
            >>> result = thread.get()

            Args:
                did (str): Document ID.
                wvm (str): One of w or v or m corresponding to whether a workspace or version or microversion was entered.
                wvmid (str): Workspace (w), Version (v) or Microversion (m) ID.

            Keyword Args:
                element_id (str): Element ID. [optional]
                with_thumbnails (bool): Whether or not to include thumbnails (not supported for microversion). [optional] if omitted the server will use the default value of False
                include_property_defaults (bool): If true, include metadata schema property defaults in response. [optional] if omitted the server will use the default value of False
                link_document_id (str): Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.. [optional]
                configuration (str): Configuration string.. [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_part_metadata_info.BTPartMetadataInfo]
                    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
            return self.call_with_http_info(**kwargs)

        self.get_parts_wmv = Endpoint(
            settings={
                "response_type": ([bt_part_metadata_info.BTPartMetadataInfo],),
                "auth": ["OAuth2"],
                "endpoint_path": "/api/parts/d/{did}/{wvm}/{wvmid}",
                "operation_id": "get_parts_wmv",
                "http_method": "GET",
                "servers": [],
            },
            params_map={
                "all": [
                    "did",
                    "wvm",
                    "wvmid",
                    "element_id",
                    "with_thumbnails",
                    "include_property_defaults",
                    "link_document_id",
                    "configuration",
                ],
                "required": ["did", "wvm", "wvmid",],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "did": (str,),
                    "wvm": (str,),
                    "wvmid": (str,),
                    "element_id": (str,),
                    "with_thumbnails": (bool,),
                    "include_property_defaults": (bool,),
                    "link_document_id": (str,),
                    "configuration": (str,),
                },
                "attribute_map": {
                    "did": "did",
                    "wvm": "wvm",
                    "wvmid": "wvmid",
                    "element_id": "elementId",
                    "with_thumbnails": "withThumbnails",
                    "include_property_defaults": "includePropertyDefaults",
                    "link_document_id": "linkDocumentId",
                    "configuration": "configuration",
                },
                "location_map": {
                    "did": "path",
                    "wvm": "path",
                    "wvmid": "path",
                    "element_id": "query",
                    "with_thumbnails": "query",
                    "include_property_defaults": "query",
                    "link_document_id": "query",
                    "configuration": "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_parts_wmv,
        )

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

            Args:
                did (str): Document ID.
                wvm (str): One of w or v or m corresponding to whether a workspace or version or microversion was entered.
                wvmid (str): Workspace (w), Version (v) or Microversion (m) ID.
                eid (str): Element ID.

            Keyword Args:
                with_thumbnails (bool): Whether or not to include thumbnails (not supported for microversion). [optional] if omitted the server will use the default value of False
                include_property_defaults (bool): If true, include metadata schema property defaults in response. [optional] if omitted the server will use the default value of False
                configuration (str): Configuration string.. [optional]
                link_document_id (str): Id of document that links to the document being accessed. This may provide additional access rights to the document. Allowed only with version (v) path parameter.. [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_part_metadata_info.BTPartMetadataInfo]
                    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_parts_wmve = Endpoint(
            settings={
                "response_type": ([bt_part_metadata_info.BTPartMetadataInfo],),
                "auth": ["OAuth2"],
                "endpoint_path": "/api/parts/d/{did}/{wvm}/{wvmid}/e/{eid}",
                "operation_id": "get_parts_wmve",
                "http_method": "GET",
                "servers": [],
            },
            params_map={
                "all": [
                    "did",
                    "wvm",
                    "wvmid",
                    "eid",
                    "with_thumbnails",
                    "include_property_defaults",
                    "configuration",
                    "link_document_id",
                ],
                "required": ["did", "wvm", "wvmid", "eid",],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "did": (str,),
                    "wvm": (str,),
                    "wvmid": (str,),
                    "eid": (str,),
                    "with_thumbnails": (bool,),
                    "include_property_defaults": (bool,),
                    "configuration": (str,),
                    "link_document_id": (str,),
                },
                "attribute_map": {
                    "did": "did",
                    "wvm": "wvm",
                    "wvmid": "wvmid",
                    "eid": "eid",
                    "with_thumbnails": "withThumbnails",
                    "include_property_defaults": "includePropertyDefaults",
                    "configuration": "configuration",
                    "link_document_id": "linkDocumentId",
                },
                "location_map": {
                    "did": "path",
                    "wvm": "path",
                    "wvmid": "path",
                    "eid": "path",
                    "with_thumbnails": "query",
                    "include_property_defaults": "query",
                    "configuration": "query",
                    "link_document_id": "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_parts_wmve,
        )

        def __get_shaded_views1(self, did, wvm, wvmid, eid, partid, **kwargs):
            """get_shaded_views1  # 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_shaded_views1(did, wvm, wvmid, eid, partid, async_req=True)
            >>> result = thread.get()

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

            Keyword Args:
                view_matrix (str): [optional] if omitted the server will use the default value of 'front'
                output_height (int): [optional] if omitted the server will use the default value of 500
                output_width (int): [optional] if omitted the server will use the default value of 500
                pixel_size (float): [optional] if omitted the server will use the default value of 0.003
                edges (str): [optional] if omitted the server will use the default value of 'show'
                use_anti_aliasing (bool): [optional] if omitted the server will use the default value of False
                configuration (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_shaded_views_info.BTShadedViewsInfo
                    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["partid"] = partid
            return self.call_with_http_info(**kwargs)

        self.get_shaded_views1 = Endpoint(
            settings={
                "response_type": (bt_shaded_views_info.BTShadedViewsInfo,),
                "auth": ["OAuth2"],
                "endpoint_path": "/api/parts/d/{did}/{wvm}/{wvmid}/e/{eid}/partid/{partid}/shadedviews",
                "operation_id": "get_shaded_views1",
                "http_method": "GET",
                "servers": [],
            },
            params_map={
                "all": [
                    "did",
                    "wvm",
                    "wvmid",
                    "eid",
                    "partid",
                    "view_matrix",
                    "output_height",
                    "output_width",
                    "pixel_size",
                    "edges",
                    "use_anti_aliasing",
                    "configuration",
                    "link_document_id",
                ],
                "required": ["did", "wvm", "wvmid", "eid", "partid",],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "did": (str,),
                    "wvm": (str,),
                    "wvmid": (str,),
                    "eid": (str,),
                    "partid": (str,),
                    "view_matrix": (str,),
                    "output_height": (int,),
                    "output_width": (int,),
                    "pixel_size": (float,),
                    "edges": (str,),
                    "use_anti_aliasing": (bool,),
                    "configuration": (str,),
                    "link_document_id": (str,),
                },
                "attribute_map": {
                    "did": "did",
                    "wvm": "wvm",
                    "wvmid": "wvmid",
                    "eid": "eid",
                    "partid": "partid",
                    "view_matrix": "viewMatrix",
                    "output_height": "outputHeight",
                    "output_width": "outputWidth",
                    "pixel_size": "pixelSize",
                    "edges": "edges",
                    "use_anti_aliasing": "useAntiAliasing",
                    "configuration": "configuration",
                    "link_document_id": "linkDocumentId",
                },
                "location_map": {
                    "did": "path",
                    "wvm": "path",
                    "wvmid": "path",
                    "eid": "path",
                    "partid": "path",
                    "view_matrix": "query",
                    "output_height": "query",
                    "output_width": "query",
                    "pixel_size": "query",
                    "edges": "query",
                    "use_anti_aliasing": "query",
                    "configuration": "query",
                    "link_document_id": "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_shaded_views1,
        )

        def __get_standard_content_part_metadata(
            self, did, vid, eid, otype, oid, partid, **kwargs
        ):
            """get_standard_content_part_metadata  # noqa: E501

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

            Args:
                did (str):
                vid (str):
                eid (str):
                otype (str):
                oid (str):
                partid (str):

            Keyword Args:
                include_property_defaults (bool): [optional] if omitted the server will use the default value of False
                configuration (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_part_metadata_info.BTPartMetadataInfo
                    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["vid"] = vid
            kwargs["eid"] = eid
            kwargs["otype"] = otype
            kwargs["oid"] = oid
            kwargs["partid"] = partid
            return self.call_with_http_info(**kwargs)

        self.get_standard_content_part_metadata = Endpoint(
            settings={
                "response_type": (bt_part_metadata_info.BTPartMetadataInfo,),
                "auth": ["OAuth2"],
                "endpoint_path": "/api/parts/standardcontent/d/{did}/v/{vid}/e/{eid}/{otype}/{oid}/partid/{partid}/metadata",
                "operation_id": "get_standard_content_part_metadata",
                "http_method": "GET",
                "servers": [],
            },
            params_map={
                "all": [
                    "did",
                    "vid",
                    "eid",
                    "otype",
                    "oid",
                    "partid",
                    "include_property_defaults",
                    "configuration",
                    "link_document_id",
                ],
                "required": ["did", "vid", "eid", "otype", "oid", "partid",],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "did": (str,),
                    "vid": (str,),
                    "eid": (str,),
                    "otype": (str,),
                    "oid": (str,),
                    "partid": (str,),
                    "include_property_defaults": (bool,),
                    "configuration": (str,),
                    "link_document_id": (str,),
                },
                "attribute_map": {
                    "did": "did",
                    "vid": "vid",
                    "eid": "eid",
                    "otype": "otype",
                    "oid": "oid",
                    "partid": "partid",
                    "include_property_defaults": "includePropertyDefaults",
                    "configuration": "configuration",
                    "link_document_id": "linkDocumentId",
                },
                "location_map": {
                    "did": "path",
                    "vid": "path",
                    "eid": "path",
                    "otype": "path",
                    "oid": "path",
                    "partid": "path",
                    "include_property_defaults": "query",
                    "configuration": "query",
                    "link_document_id": "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_standard_content_part_metadata,
        )

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

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

            Args:
                did (str):
                wvm (str):
                wvmid (str):
                eid (str):
                partid (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_part_metadata_info.BTPartMetadataInfo
                    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["partid"] = partid
            return self.call_with_http_info(**kwargs)

        self.update_part_metadata = Endpoint(
            settings={
                "response_type": (bt_part_metadata_info.BTPartMetadataInfo,),
                "auth": ["OAuth2"],
                "endpoint_path": "/api/parts/d/{did}/{wvm}/{wvmid}/e/{eid}/partid/{partid}/metadata",
                "operation_id": "update_part_metadata",
                "http_method": "POST",
                "servers": [],
            },
            params_map={
                "all": ["did", "wvm", "wvmid", "eid", "partid", "body",],
                "required": ["did", "wvm", "wvmid", "eid", "partid",],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "did": (str,),
                    "wvm": (str,),
                    "wvmid": (str,),
                    "eid": (str,),
                    "partid": (str,),
                    "body": (str,),
                },
                "attribute_map": {
                    "did": "did",
                    "wvm": "wvm",
                    "wvmid": "wvmid",
                    "eid": "eid",
                    "partid": "partid",
                },
                "location_map": {
                    "did": "path",
                    "wvm": "path",
                    "wvmid": "path",
                    "eid": "path",
                    "partid": "path",
                    "body": "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_part_metadata,
        )

        def __update_standard_content_part_metadata(
            self, did, vid, eid, otype, oid, partid, **kwargs
        ):
            """update_standard_content_part_metadata  # noqa: E501

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

            Args:
                did (str):
                vid (str):
                eid (str):
                otype (str):
                oid (str):
                partid (str):

            Keyword Args:
                link_document_id (str): [optional]
                include_property_defaults (bool): [optional] if omitted the server will use the default value of False
                bt_workspace_part_params (bt_workspace_part_params.BTWorkspacePartParams): [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_part_metadata_info.BTPartMetadataInfo
                    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["vid"] = vid
            kwargs["eid"] = eid
            kwargs["otype"] = otype
            kwargs["oid"] = oid
            kwargs["partid"] = partid
            return self.call_with_http_info(**kwargs)

        self.update_standard_content_part_metadata = Endpoint(
            settings={
                "response_type": (bt_part_metadata_info.BTPartMetadataInfo,),
                "auth": ["OAuth2"],
                "endpoint_path": "/api/parts/standardcontent/d/{did}/v/{vid}/e/{eid}/{otype}/{oid}/partid/{partid}/metadata",
                "operation_id": "update_standard_content_part_metadata",
                "http_method": "POST",
                "servers": [],
            },
            params_map={
                "all": [
                    "did",
                    "vid",
                    "eid",
                    "otype",
                    "oid",
                    "partid",
                    "link_document_id",
                    "include_property_defaults",
                    "bt_workspace_part_params",
                ],
                "required": ["did", "vid", "eid", "otype", "oid", "partid",],
                "nullable": [],
                "enum": [],
                "validation": [],
            },
            root_map={
                "validations": {},
                "allowed_values": {},
                "openapi_types": {
                    "did": (str,),
                    "vid": (str,),
                    "eid": (str,),
                    "otype": (str,),
                    "oid": (str,),
                    "partid": (str,),
                    "link_document_id": (str,),
                    "include_property_defaults": (bool,),
                    "bt_workspace_part_params": (
                        bt_workspace_part_params.BTWorkspacePartParams,
                    ),
                },
                "attribute_map": {
                    "did": "did",
                    "vid": "vid",
                    "eid": "eid",
                    "otype": "otype",
                    "oid": "oid",
                    "partid": "partid",
                    "link_document_id": "linkDocumentId",
                    "include_property_defaults": "includePropertyDefaults",
                },
                "location_map": {
                    "did": "path",
                    "vid": "path",
                    "eid": "path",
                    "otype": "path",
                    "oid": "path",
                    "partid": "path",
                    "link_document_id": "query",
                    "include_property_defaults": "query",
                    "bt_workspace_part_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_standard_content_part_metadata,
        )


class Endpoint(object):
    def __init__(
        self,
        settings=None,
        params_map=None,
        root_map=None,
        headers_map=None,
        api_client=None,
        callable=None,
    ):
        """Creates an endpoint

        Args:
            settings (dict): see below key value pairs
                'response_type' (tuple/None): response type
                'auth' (list): a list of auth type keys
                'endpoint_path' (str): the endpoint path
                'operation_id' (str): endpoint string identifier
                'http_method' (str): POST/PUT/PATCH/GET etc
                'servers' (list): list of str servers that this endpoint is at
            params_map (dict): see below key value pairs
                'all' (list): list of str endpoint parameter names
                'required' (list): list of required parameter names
                'nullable' (list): list of nullable parameter names
                'enum' (list): list of parameters with enum values
                'validation' (list): list of parameters with validations
            root_map
                'validations' (dict): the dict mapping endpoint parameter tuple
                    paths to their validation dictionaries
                'allowed_values' (dict): the dict mapping endpoint parameter
                    tuple paths to their allowed_values (enum) dictionaries
                'openapi_types' (dict): param_name to openapi type
                'attribute_map' (dict): param_name to camelCase name
                'location_map' (dict): param_name to  'body', 'file', 'form',
                    'header', 'path', 'query'
                collection_format_map (dict): param_name to `csv` etc.
            headers_map (dict): see below key value pairs
                'accept' (list): list of Accept header strings
                'content_type' (list): list of Content-Type header strings
            api_client (ApiClient) api client instance
            callable (function): the function which is invoked when the
                Endpoint is called
        """
        self.settings = settings
        self.params_map = params_map
        self.params_map["all"].extend(
            [
                "async_req",
                "_host_index",
                "_preload_content",
                "_request_timeout",
                "_return_http_data_only",
                "_check_input_type",
                "_check_return_type",
            ]
        )
        self.params_map["nullable"].extend(["_request_timeout"])
        self.validations = root_map["validations"]
        self.allowed_values = root_map["allowed_values"]
        self.openapi_types = root_map["openapi_types"]
        extra_types = {
            "async_req": (bool,),
            "_host_index": (int,),
            "_preload_content": (bool,),
            "_request_timeout": (none_type, int, (int,), [int]),
            "_return_http_data_only": (bool,),
            "_check_input_type": (bool,),
            "_check_return_type": (bool,),
        }
        self.openapi_types.update(extra_types)
        self.attribute_map = root_map["attribute_map"]
        self.location_map = root_map["location_map"]
        self.collection_format_map = root_map["collection_format_map"]
        self.headers_map = headers_map
        self.api_client = api_client
        self.callable = callable

    def __validate_inputs(self, kwargs):
        for param in self.params_map["enum"]:
            if param in kwargs:
                check_allowed_values(self.allowed_values, (param,), kwargs[param])

        for param in self.params_map["validation"]:
            if param in kwargs:
                check_validations(self.validations, (param,), kwargs[param])

        if kwargs["_check_input_type"] is False:
            return

        for key, value in six.iteritems(kwargs):
            fixed_val = validate_and_convert_types(
                value,
                self.openapi_types[key],
                [key],
                False,
                kwargs["_check_input_type"],
                configuration=self.api_client.configuration,
            )
            kwargs[key] = fixed_val

    def __gather_params(self, kwargs):
        params = {
            "body": None,
            "collection_format": {},
            "file": {},
            "form": [],
            "header": {},
            "path": {},
            "query": [],
        }

        for param_name, param_value in six.iteritems(kwargs):
            param_location = self.location_map.get(param_name)
            if param_location is None:
                continue
            if param_location:
                if param_location == "body":
                    params["body"] = param_value
                    continue
                base_name = self.attribute_map[param_name]
                if param_location == "form" and self.openapi_types[param_name] == (
                    file_type,
                ):
                    params["file"][param_name] = [param_value]
                elif param_location == "form" and self.openapi_types[param_name] == (
                    [file_type],
                ):
                    # param_value is already a list
                    params["file"][param_name] = param_value
                elif param_location in {"form", "query"}:
                    param_value_full = (base_name, param_value)
                    params[param_location].append(param_value_full)
                if param_location not in {"form", "query"}:
                    params[param_location][base_name] = param_value
                collection_format = self.collection_format_map.get(param_name)
                if collection_format:
                    params["collection_format"][base_name] = collection_format

        return params

    def __call__(self, *args, **kwargs):
        """ This method is invoked when endpoints are called
        Example:
        pet_api = PetApi()
        pet_api.add_pet  # this is an instance of the class Endpoint
        pet_api.add_pet()  # this invokes pet_api.add_pet.__call__()
        which then invokes the callable functions stored in that endpoint at
        pet_api.add_pet.callable or self.callable in this class
        """
        return self.callable(self, *args, **kwargs)

    def call_with_http_info(self, **kwargs):

        try:
            _host = self.settings["servers"][kwargs["_host_index"]]
        except IndexError:
            if self.settings["servers"]:
                raise ApiValueError(
                    "Invalid host index. Must be 0 <= index < %s"
                    % len(self.settings["servers"])
                )
            _host = None

        for key, value in six.iteritems(kwargs):
            if key not in self.params_map["all"]:
                raise ApiTypeError(
                    "Got an unexpected parameter '%s'"
                    " to method `%s`" % (key, self.settings["operation_id"])
                )
            # only throw this nullable ApiValueError if _check_input_type
            # is False, if _check_input_type==True we catch this case
            # in self.__validate_inputs
            if (
                key not in self.params_map["nullable"]
                and value is None
                and kwargs["_check_input_type"] is False
            ):
                raise ApiValueError(
                    "Value may not be None for non-nullable parameter `%s`"
                    " when calling `%s`" % (key, self.settings["operation_id"])
                )

        for key in self.params_map["required"]:
            if key not in kwargs.keys():
                raise ApiValueError(
                    "Missing the required parameter `%s` when calling "
                    "`%s`" % (key, self.settings["operation_id"])
                )

        self.__validate_inputs(kwargs)

        params = self.__gather_params(kwargs)

        accept_headers_list = self.headers_map["accept"]
        if accept_headers_list:
            params["header"]["Accept"] = self.api_client.select_header_accept(
                accept_headers_list
            )

        content_type_headers_list = self.headers_map["content_type"]
        if content_type_headers_list:
            header_list = self.api_client.select_header_content_type(
                content_type_headers_list
            )
            params["header"]["Content-Type"] = header_list

        return self.api_client.call_api(
            self.settings["endpoint_path"],
            self.settings["http_method"],
            params["path"],
            params["query"],
            params["header"],
            body=params["body"],
            post_params=params["form"],
            files=params["file"],
            response_type=self.settings["response_type"],
            auth_settings=self.settings["auth"],
            async_req=kwargs["async_req"],
            _check_type=kwargs["_check_return_type"],
            _return_http_data_only=kwargs["_return_http_data_only"],
            _preload_content=kwargs["_preload_content"],
            _request_timeout=kwargs["_request_timeout"],
            _host=_host,
            collection_formats=params["collection_format"],
        )
