Fixes (#115)
* regenerate Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes and cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> * I have generated the latest API! --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
		@ -6,16 +6,23 @@ from ...client import Client
 | 
			
		||||
from ...models.error import Error
 | 
			
		||||
from ...models.file_center_of_mass import FileCenterOfMass
 | 
			
		||||
from ...models.file_import_format import FileImportFormat
 | 
			
		||||
from ...models.unit_length import UnitLength
 | 
			
		||||
from ...types import Response
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    output_unit: UnitLength,
 | 
			
		||||
    src_format: FileImportFormat,
 | 
			
		||||
    body: bytes,
 | 
			
		||||
    *,
 | 
			
		||||
    client: Client,
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    url = "{}/file/center-of-mass".format(client.base_url)  # noqa: E501
 | 
			
		||||
    if output_unit is not None:
 | 
			
		||||
        if "?" in url:
 | 
			
		||||
            url = url + "&output_unit=" + str(output_unit)
 | 
			
		||||
        else:
 | 
			
		||||
            url = url + "?output_unit=" + str(output_unit)
 | 
			
		||||
    if src_format is not None:
 | 
			
		||||
        if "?" in url:
 | 
			
		||||
            url = url + "&src_format=" + str(src_format)
 | 
			
		||||
@ -61,12 +68,14 @@ def _build_response(
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    output_unit: UnitLength,
 | 
			
		||||
    src_format: FileImportFormat,
 | 
			
		||||
    body: bytes,
 | 
			
		||||
    *,
 | 
			
		||||
    client: Client,
 | 
			
		||||
) -> Response[Optional[Union[FileCenterOfMass, Error]]]:
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        output_unit=output_unit,
 | 
			
		||||
        src_format=src_format,
 | 
			
		||||
        body=body,
 | 
			
		||||
        client=client,
 | 
			
		||||
@ -81,6 +90,7 @@ def sync_detailed(
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    output_unit: UnitLength,
 | 
			
		||||
    src_format: FileImportFormat,
 | 
			
		||||
    body: bytes,
 | 
			
		||||
    *,
 | 
			
		||||
@ -90,9 +100,11 @@ def sync(
 | 
			
		||||
    Currently, this endpoint returns the cartesian co-ordinate in world space measure units.
 | 
			
		||||
    In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.
 | 
			
		||||
    Get the center of mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.
 | 
			
		||||
    If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint."""  # noqa: E501
 | 
			
		||||
    If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
 | 
			
		||||
    """  # noqa: E501
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        output_unit=output_unit,
 | 
			
		||||
        src_format=src_format,
 | 
			
		||||
        body=body,
 | 
			
		||||
        client=client,
 | 
			
		||||
@ -100,12 +112,14 @@ def sync(
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    output_unit: UnitLength,
 | 
			
		||||
    src_format: FileImportFormat,
 | 
			
		||||
    body: bytes,
 | 
			
		||||
    *,
 | 
			
		||||
    client: Client,
 | 
			
		||||
) -> Response[Optional[Union[FileCenterOfMass, Error]]]:
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        output_unit=output_unit,
 | 
			
		||||
        src_format=src_format,
 | 
			
		||||
        body=body,
 | 
			
		||||
        client=client,
 | 
			
		||||
@ -118,6 +132,7 @@ async def asyncio_detailed(
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
async def asyncio(
 | 
			
		||||
    output_unit: UnitLength,
 | 
			
		||||
    src_format: FileImportFormat,
 | 
			
		||||
    body: bytes,
 | 
			
		||||
    *,
 | 
			
		||||
@ -127,10 +142,12 @@ async def asyncio(
 | 
			
		||||
    Currently, this endpoint returns the cartesian co-ordinate in world space measure units.
 | 
			
		||||
    In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.
 | 
			
		||||
    Get the center of mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.
 | 
			
		||||
    If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint."""  # noqa: E501
 | 
			
		||||
    If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
 | 
			
		||||
    """  # noqa: E501
 | 
			
		||||
 | 
			
		||||
    return (
 | 
			
		||||
        await asyncio_detailed(
 | 
			
		||||
            output_unit=output_unit,
 | 
			
		||||
            src_format=src_format,
 | 
			
		||||
            body=body,
 | 
			
		||||
            client=client,
 | 
			
		||||
 | 
			
		||||
@ -91,7 +91,8 @@ def sync(
 | 
			
		||||
    """If you wish to specify the conversion options, use the `/file/conversion` endpoint instead.
 | 
			
		||||
    Convert a CAD file from one format to another. If the file being converted is larger than 25MB, it will be performed asynchronously.
 | 
			
		||||
    If the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string.
 | 
			
		||||
    If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint."""  # noqa: E501
 | 
			
		||||
    If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
 | 
			
		||||
    """  # noqa: E501
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        output_format=output_format,
 | 
			
		||||
@ -131,7 +132,8 @@ async def asyncio(
 | 
			
		||||
    """If you wish to specify the conversion options, use the `/file/conversion` endpoint instead.
 | 
			
		||||
    Convert a CAD file from one format to another. If the file being converted is larger than 25MB, it will be performed asynchronously.
 | 
			
		||||
    If the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string.
 | 
			
		||||
    If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint."""  # noqa: E501
 | 
			
		||||
    If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
 | 
			
		||||
    """  # noqa: E501
 | 
			
		||||
 | 
			
		||||
    return (
 | 
			
		||||
        await asyncio_detailed(
 | 
			
		||||
 | 
			
		||||
@ -6,11 +6,15 @@ from ...client import Client
 | 
			
		||||
from ...models.error import Error
 | 
			
		||||
from ...models.file_density import FileDensity
 | 
			
		||||
from ...models.file_import_format import FileImportFormat
 | 
			
		||||
from ...models.unit_density import UnitDensity
 | 
			
		||||
from ...models.unit_mass import UnitMass
 | 
			
		||||
from ...types import Response
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    material_mass: float,
 | 
			
		||||
    material_mass_unit: UnitMass,
 | 
			
		||||
    output_unit: UnitDensity,
 | 
			
		||||
    src_format: FileImportFormat,
 | 
			
		||||
    body: bytes,
 | 
			
		||||
    *,
 | 
			
		||||
@ -22,6 +26,16 @@ def _get_kwargs(
 | 
			
		||||
            url = url + "&material_mass=" + str(material_mass)
 | 
			
		||||
        else:
 | 
			
		||||
            url = url + "?material_mass=" + str(material_mass)
 | 
			
		||||
    if material_mass_unit is not None:
 | 
			
		||||
        if "?" in url:
 | 
			
		||||
            url = url + "&material_mass_unit=" + str(material_mass_unit)
 | 
			
		||||
        else:
 | 
			
		||||
            url = url + "?material_mass_unit=" + str(material_mass_unit)
 | 
			
		||||
    if output_unit is not None:
 | 
			
		||||
        if "?" in url:
 | 
			
		||||
            url = url + "&output_unit=" + str(output_unit)
 | 
			
		||||
        else:
 | 
			
		||||
            url = url + "?output_unit=" + str(output_unit)
 | 
			
		||||
    if src_format is not None:
 | 
			
		||||
        if "?" in url:
 | 
			
		||||
            url = url + "&src_format=" + str(src_format)
 | 
			
		||||
@ -66,6 +80,8 @@ def _build_response(
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    material_mass: float,
 | 
			
		||||
    material_mass_unit: UnitMass,
 | 
			
		||||
    output_unit: UnitDensity,
 | 
			
		||||
    src_format: FileImportFormat,
 | 
			
		||||
    body: bytes,
 | 
			
		||||
    *,
 | 
			
		||||
@ -73,6 +89,8 @@ def sync_detailed(
 | 
			
		||||
) -> Response[Optional[Union[FileDensity, Error]]]:
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        material_mass=material_mass,
 | 
			
		||||
        material_mass_unit=material_mass_unit,
 | 
			
		||||
        output_unit=output_unit,
 | 
			
		||||
        src_format=src_format,
 | 
			
		||||
        body=body,
 | 
			
		||||
        client=client,
 | 
			
		||||
@ -88,6 +106,8 @@ def sync_detailed(
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    material_mass: float,
 | 
			
		||||
    material_mass_unit: UnitMass,
 | 
			
		||||
    output_unit: UnitDensity,
 | 
			
		||||
    src_format: FileImportFormat,
 | 
			
		||||
    body: bytes,
 | 
			
		||||
    *,
 | 
			
		||||
@ -97,10 +117,13 @@ def sync(
 | 
			
		||||
    Currently, this endpoint assumes if you are giving a material mass in a specific mass units, we return a density in mass unit per cubic measure unit.
 | 
			
		||||
    In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.
 | 
			
		||||
    Get the density of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.
 | 
			
		||||
    If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint."""  # noqa: E501
 | 
			
		||||
    If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
 | 
			
		||||
    """  # noqa: E501
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        material_mass=material_mass,
 | 
			
		||||
        material_mass_unit=material_mass_unit,
 | 
			
		||||
        output_unit=output_unit,
 | 
			
		||||
        src_format=src_format,
 | 
			
		||||
        body=body,
 | 
			
		||||
        client=client,
 | 
			
		||||
@ -109,6 +132,8 @@ def sync(
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    material_mass: float,
 | 
			
		||||
    material_mass_unit: UnitMass,
 | 
			
		||||
    output_unit: UnitDensity,
 | 
			
		||||
    src_format: FileImportFormat,
 | 
			
		||||
    body: bytes,
 | 
			
		||||
    *,
 | 
			
		||||
@ -116,6 +141,8 @@ async def asyncio_detailed(
 | 
			
		||||
) -> Response[Optional[Union[FileDensity, Error]]]:
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        material_mass=material_mass,
 | 
			
		||||
        material_mass_unit=material_mass_unit,
 | 
			
		||||
        output_unit=output_unit,
 | 
			
		||||
        src_format=src_format,
 | 
			
		||||
        body=body,
 | 
			
		||||
        client=client,
 | 
			
		||||
@ -129,6 +156,8 @@ async def asyncio_detailed(
 | 
			
		||||
 | 
			
		||||
async def asyncio(
 | 
			
		||||
    material_mass: float,
 | 
			
		||||
    material_mass_unit: UnitMass,
 | 
			
		||||
    output_unit: UnitDensity,
 | 
			
		||||
    src_format: FileImportFormat,
 | 
			
		||||
    body: bytes,
 | 
			
		||||
    *,
 | 
			
		||||
@ -138,11 +167,14 @@ async def asyncio(
 | 
			
		||||
    Currently, this endpoint assumes if you are giving a material mass in a specific mass units, we return a density in mass unit per cubic measure unit.
 | 
			
		||||
    In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.
 | 
			
		||||
    Get the density of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.
 | 
			
		||||
    If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint."""  # noqa: E501
 | 
			
		||||
    If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
 | 
			
		||||
    """  # noqa: E501
 | 
			
		||||
 | 
			
		||||
    return (
 | 
			
		||||
        await asyncio_detailed(
 | 
			
		||||
            material_mass=material_mass,
 | 
			
		||||
            material_mass_unit=material_mass_unit,
 | 
			
		||||
            output_unit=output_unit,
 | 
			
		||||
            src_format=src_format,
 | 
			
		||||
            body=body,
 | 
			
		||||
            client=client,
 | 
			
		||||
 | 
			
		||||
@ -6,11 +6,15 @@ from ...client import Client
 | 
			
		||||
from ...models.error import Error
 | 
			
		||||
from ...models.file_import_format import FileImportFormat
 | 
			
		||||
from ...models.file_mass import FileMass
 | 
			
		||||
from ...models.unit_density import UnitDensity
 | 
			
		||||
from ...models.unit_mass import UnitMass
 | 
			
		||||
from ...types import Response
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    material_density: float,
 | 
			
		||||
    material_density_unit: UnitDensity,
 | 
			
		||||
    output_unit: UnitMass,
 | 
			
		||||
    src_format: FileImportFormat,
 | 
			
		||||
    body: bytes,
 | 
			
		||||
    *,
 | 
			
		||||
@ -22,6 +26,16 @@ def _get_kwargs(
 | 
			
		||||
            url = url + "&material_density=" + str(material_density)
 | 
			
		||||
        else:
 | 
			
		||||
            url = url + "?material_density=" + str(material_density)
 | 
			
		||||
    if material_density_unit is not None:
 | 
			
		||||
        if "?" in url:
 | 
			
		||||
            url = url + "&material_density_unit=" + str(material_density_unit)
 | 
			
		||||
        else:
 | 
			
		||||
            url = url + "?material_density_unit=" + str(material_density_unit)
 | 
			
		||||
    if output_unit is not None:
 | 
			
		||||
        if "?" in url:
 | 
			
		||||
            url = url + "&output_unit=" + str(output_unit)
 | 
			
		||||
        else:
 | 
			
		||||
            url = url + "?output_unit=" + str(output_unit)
 | 
			
		||||
    if src_format is not None:
 | 
			
		||||
        if "?" in url:
 | 
			
		||||
            url = url + "&src_format=" + str(src_format)
 | 
			
		||||
@ -66,6 +80,8 @@ def _build_response(
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    material_density: float,
 | 
			
		||||
    material_density_unit: UnitDensity,
 | 
			
		||||
    output_unit: UnitMass,
 | 
			
		||||
    src_format: FileImportFormat,
 | 
			
		||||
    body: bytes,
 | 
			
		||||
    *,
 | 
			
		||||
@ -73,6 +89,8 @@ def sync_detailed(
 | 
			
		||||
) -> Response[Optional[Union[FileMass, Error]]]:
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        material_density=material_density,
 | 
			
		||||
        material_density_unit=material_density_unit,
 | 
			
		||||
        output_unit=output_unit,
 | 
			
		||||
        src_format=src_format,
 | 
			
		||||
        body=body,
 | 
			
		||||
        client=client,
 | 
			
		||||
@ -88,6 +106,8 @@ def sync_detailed(
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    material_density: float,
 | 
			
		||||
    material_density_unit: UnitDensity,
 | 
			
		||||
    output_unit: UnitMass,
 | 
			
		||||
    src_format: FileImportFormat,
 | 
			
		||||
    body: bytes,
 | 
			
		||||
    *,
 | 
			
		||||
@ -97,10 +117,13 @@ def sync(
 | 
			
		||||
    Currently, this endpoint assumes if you are giving a material density in a specific mass unit per cubic measure unit, we return a mass in mass units. The same mass units as passed in the material density.
 | 
			
		||||
    In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.
 | 
			
		||||
    Get the mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.
 | 
			
		||||
    If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint."""  # noqa: E501
 | 
			
		||||
    If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
 | 
			
		||||
    """  # noqa: E501
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        material_density=material_density,
 | 
			
		||||
        material_density_unit=material_density_unit,
 | 
			
		||||
        output_unit=output_unit,
 | 
			
		||||
        src_format=src_format,
 | 
			
		||||
        body=body,
 | 
			
		||||
        client=client,
 | 
			
		||||
@ -109,6 +132,8 @@ def sync(
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    material_density: float,
 | 
			
		||||
    material_density_unit: UnitDensity,
 | 
			
		||||
    output_unit: UnitMass,
 | 
			
		||||
    src_format: FileImportFormat,
 | 
			
		||||
    body: bytes,
 | 
			
		||||
    *,
 | 
			
		||||
@ -116,6 +141,8 @@ async def asyncio_detailed(
 | 
			
		||||
) -> Response[Optional[Union[FileMass, Error]]]:
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        material_density=material_density,
 | 
			
		||||
        material_density_unit=material_density_unit,
 | 
			
		||||
        output_unit=output_unit,
 | 
			
		||||
        src_format=src_format,
 | 
			
		||||
        body=body,
 | 
			
		||||
        client=client,
 | 
			
		||||
@ -129,6 +156,8 @@ async def asyncio_detailed(
 | 
			
		||||
 | 
			
		||||
async def asyncio(
 | 
			
		||||
    material_density: float,
 | 
			
		||||
    material_density_unit: UnitDensity,
 | 
			
		||||
    output_unit: UnitMass,
 | 
			
		||||
    src_format: FileImportFormat,
 | 
			
		||||
    body: bytes,
 | 
			
		||||
    *,
 | 
			
		||||
@ -138,11 +167,14 @@ async def asyncio(
 | 
			
		||||
    Currently, this endpoint assumes if you are giving a material density in a specific mass unit per cubic measure unit, we return a mass in mass units. The same mass units as passed in the material density.
 | 
			
		||||
    In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.
 | 
			
		||||
    Get the mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.
 | 
			
		||||
    If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint."""  # noqa: E501
 | 
			
		||||
    If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
 | 
			
		||||
    """  # noqa: E501
 | 
			
		||||
 | 
			
		||||
    return (
 | 
			
		||||
        await asyncio_detailed(
 | 
			
		||||
            material_density=material_density,
 | 
			
		||||
            material_density_unit=material_density_unit,
 | 
			
		||||
            output_unit=output_unit,
 | 
			
		||||
            src_format=src_format,
 | 
			
		||||
            body=body,
 | 
			
		||||
            client=client,
 | 
			
		||||
 | 
			
		||||
@ -6,16 +6,23 @@ from ...client import Client
 | 
			
		||||
from ...models.error import Error
 | 
			
		||||
from ...models.file_import_format import FileImportFormat
 | 
			
		||||
from ...models.file_surface_area import FileSurfaceArea
 | 
			
		||||
from ...models.unit_area import UnitArea
 | 
			
		||||
from ...types import Response
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    output_unit: UnitArea,
 | 
			
		||||
    src_format: FileImportFormat,
 | 
			
		||||
    body: bytes,
 | 
			
		||||
    *,
 | 
			
		||||
    client: Client,
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    url = "{}/file/surface-area".format(client.base_url)  # noqa: E501
 | 
			
		||||
    if output_unit is not None:
 | 
			
		||||
        if "?" in url:
 | 
			
		||||
            url = url + "&output_unit=" + str(output_unit)
 | 
			
		||||
        else:
 | 
			
		||||
            url = url + "?output_unit=" + str(output_unit)
 | 
			
		||||
    if src_format is not None:
 | 
			
		||||
        if "?" in url:
 | 
			
		||||
            url = url + "&src_format=" + str(src_format)
 | 
			
		||||
@ -61,12 +68,14 @@ def _build_response(
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    output_unit: UnitArea,
 | 
			
		||||
    src_format: FileImportFormat,
 | 
			
		||||
    body: bytes,
 | 
			
		||||
    *,
 | 
			
		||||
    client: Client,
 | 
			
		||||
) -> Response[Optional[Union[FileSurfaceArea, Error]]]:
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        output_unit=output_unit,
 | 
			
		||||
        src_format=src_format,
 | 
			
		||||
        body=body,
 | 
			
		||||
        client=client,
 | 
			
		||||
@ -81,6 +90,7 @@ def sync_detailed(
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    output_unit: UnitArea,
 | 
			
		||||
    src_format: FileImportFormat,
 | 
			
		||||
    body: bytes,
 | 
			
		||||
    *,
 | 
			
		||||
@ -90,9 +100,11 @@ def sync(
 | 
			
		||||
    Currently, this endpoint returns the square measure units.
 | 
			
		||||
    In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.
 | 
			
		||||
    Get the surface area of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.
 | 
			
		||||
    If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint."""  # noqa: E501
 | 
			
		||||
    If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
 | 
			
		||||
    """  # noqa: E501
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        output_unit=output_unit,
 | 
			
		||||
        src_format=src_format,
 | 
			
		||||
        body=body,
 | 
			
		||||
        client=client,
 | 
			
		||||
@ -100,12 +112,14 @@ def sync(
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    output_unit: UnitArea,
 | 
			
		||||
    src_format: FileImportFormat,
 | 
			
		||||
    body: bytes,
 | 
			
		||||
    *,
 | 
			
		||||
    client: Client,
 | 
			
		||||
) -> Response[Optional[Union[FileSurfaceArea, Error]]]:
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        output_unit=output_unit,
 | 
			
		||||
        src_format=src_format,
 | 
			
		||||
        body=body,
 | 
			
		||||
        client=client,
 | 
			
		||||
@ -118,6 +132,7 @@ async def asyncio_detailed(
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
async def asyncio(
 | 
			
		||||
    output_unit: UnitArea,
 | 
			
		||||
    src_format: FileImportFormat,
 | 
			
		||||
    body: bytes,
 | 
			
		||||
    *,
 | 
			
		||||
@ -127,10 +142,12 @@ async def asyncio(
 | 
			
		||||
    Currently, this endpoint returns the square measure units.
 | 
			
		||||
    In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.
 | 
			
		||||
    Get the surface area of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.
 | 
			
		||||
    If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint."""  # noqa: E501
 | 
			
		||||
    If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
 | 
			
		||||
    """  # noqa: E501
 | 
			
		||||
 | 
			
		||||
    return (
 | 
			
		||||
        await asyncio_detailed(
 | 
			
		||||
            output_unit=output_unit,
 | 
			
		||||
            src_format=src_format,
 | 
			
		||||
            body=body,
 | 
			
		||||
            client=client,
 | 
			
		||||
 | 
			
		||||
@ -6,16 +6,23 @@ from ...client import Client
 | 
			
		||||
from ...models.error import Error
 | 
			
		||||
from ...models.file_import_format import FileImportFormat
 | 
			
		||||
from ...models.file_volume import FileVolume
 | 
			
		||||
from ...models.unit_volume import UnitVolume
 | 
			
		||||
from ...types import Response
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def _get_kwargs(
 | 
			
		||||
    output_unit: UnitVolume,
 | 
			
		||||
    src_format: FileImportFormat,
 | 
			
		||||
    body: bytes,
 | 
			
		||||
    *,
 | 
			
		||||
    client: Client,
 | 
			
		||||
) -> Dict[str, Any]:
 | 
			
		||||
    url = "{}/file/volume".format(client.base_url)  # noqa: E501
 | 
			
		||||
    if output_unit is not None:
 | 
			
		||||
        if "?" in url:
 | 
			
		||||
            url = url + "&output_unit=" + str(output_unit)
 | 
			
		||||
        else:
 | 
			
		||||
            url = url + "?output_unit=" + str(output_unit)
 | 
			
		||||
    if src_format is not None:
 | 
			
		||||
        if "?" in url:
 | 
			
		||||
            url = url + "&src_format=" + str(src_format)
 | 
			
		||||
@ -59,12 +66,14 @@ def _build_response(
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync_detailed(
 | 
			
		||||
    output_unit: UnitVolume,
 | 
			
		||||
    src_format: FileImportFormat,
 | 
			
		||||
    body: bytes,
 | 
			
		||||
    *,
 | 
			
		||||
    client: Client,
 | 
			
		||||
) -> Response[Optional[Union[FileVolume, Error]]]:
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        output_unit=output_unit,
 | 
			
		||||
        src_format=src_format,
 | 
			
		||||
        body=body,
 | 
			
		||||
        client=client,
 | 
			
		||||
@ -79,6 +88,7 @@ def sync_detailed(
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def sync(
 | 
			
		||||
    output_unit: UnitVolume,
 | 
			
		||||
    src_format: FileImportFormat,
 | 
			
		||||
    body: bytes,
 | 
			
		||||
    *,
 | 
			
		||||
@ -88,9 +98,11 @@ def sync(
 | 
			
		||||
    Currently, this endpoint returns the cubic measure units.
 | 
			
		||||
    In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.
 | 
			
		||||
    Get the volume of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.
 | 
			
		||||
    If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint."""  # noqa: E501
 | 
			
		||||
    If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
 | 
			
		||||
    """  # noqa: E501
 | 
			
		||||
 | 
			
		||||
    return sync_detailed(
 | 
			
		||||
        output_unit=output_unit,
 | 
			
		||||
        src_format=src_format,
 | 
			
		||||
        body=body,
 | 
			
		||||
        client=client,
 | 
			
		||||
@ -98,12 +110,14 @@ def sync(
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
async def asyncio_detailed(
 | 
			
		||||
    output_unit: UnitVolume,
 | 
			
		||||
    src_format: FileImportFormat,
 | 
			
		||||
    body: bytes,
 | 
			
		||||
    *,
 | 
			
		||||
    client: Client,
 | 
			
		||||
) -> Response[Optional[Union[FileVolume, Error]]]:
 | 
			
		||||
    kwargs = _get_kwargs(
 | 
			
		||||
        output_unit=output_unit,
 | 
			
		||||
        src_format=src_format,
 | 
			
		||||
        body=body,
 | 
			
		||||
        client=client,
 | 
			
		||||
@ -116,6 +130,7 @@ async def asyncio_detailed(
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
async def asyncio(
 | 
			
		||||
    output_unit: UnitVolume,
 | 
			
		||||
    src_format: FileImportFormat,
 | 
			
		||||
    body: bytes,
 | 
			
		||||
    *,
 | 
			
		||||
@ -125,10 +140,12 @@ async def asyncio(
 | 
			
		||||
    Currently, this endpoint returns the cubic measure units.
 | 
			
		||||
    In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.
 | 
			
		||||
    Get the volume of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.
 | 
			
		||||
    If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint."""  # noqa: E501
 | 
			
		||||
    If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
 | 
			
		||||
    """  # noqa: E501
 | 
			
		||||
 | 
			
		||||
    return (
 | 
			
		||||
        await asyncio_detailed(
 | 
			
		||||
            output_unit=output_unit,
 | 
			
		||||
            src_format=src_format,
 | 
			
		||||
            body=body,
 | 
			
		||||
            client=client,
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user