initial fixing

Signed-off-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
Jess Frazelle
2022-06-11 17:26:20 -07:00
parent 4631ca24cb
commit 9dc390a64d
58 changed files with 9685 additions and 6732 deletions

View File

@ -3,15 +3,15 @@ from typing import Any, Dict, Optional, Union, cast
import httpx
from ...client import Client
from ...models.file_conversion_with_output import FileConversionWithOutput
from ...models.file_conversion import FileConversion
from ...models.error import Error
from ...models.file_conversion_output_format import FileConversionOutputFormat
from ...models.file_conversion_source_format import FileConversionSourceFormat
from ...models.file_output_format import FileOutputFormat
from ...models.file_source_format import FileSourceFormat
from ...types import Response
def _get_kwargs(
output_format: FileConversionOutputFormat,
src_format: FileConversionSourceFormat,
output_format: FileOutputFormat,
src_format: FileSourceFormat,
body: bytes,
*,
client: Client,
@ -30,9 +30,9 @@ def _get_kwargs(
}
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileConversionWithOutput, Error]]:
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileConversion, Error]]:
if response.status_code == 201:
response_201 = FileConversionWithOutput.from_dict(response.json())
response_201 = FileConversion.from_dict(response.json())
return response_201
if response.status_code == 400:
response_4XX = Error.from_dict(response.json())
@ -43,7 +43,7 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileConv
return None
def _build_response(*, response: httpx.Response) -> Response[Union[Any, FileConversionWithOutput, Error]]:
def _build_response(*, response: httpx.Response) -> Response[Union[Any, FileConversion, Error]]:
return Response(
status_code=response.status_code,
content=response.content,
@ -53,12 +53,12 @@ def _build_response(*, response: httpx.Response) -> Response[Union[Any, FileConv
def sync_detailed(
output_format: FileConversionOutputFormat,
src_format: FileConversionSourceFormat,
output_format: FileOutputFormat,
src_format: FileSourceFormat,
body: bytes,
*,
client: Client,
) -> Response[Union[Any, FileConversionWithOutput, Error]]:
) -> Response[Union[Any, FileConversion, Error]]:
kwargs = _get_kwargs(
output_format=output_format,
src_format=src_format,
@ -75,15 +75,15 @@ def sync_detailed(
def sync(
output_format: FileConversionOutputFormat,
src_format: FileConversionSourceFormat,
output_format: FileOutputFormat,
src_format: FileSourceFormat,
body: bytes,
*,
client: Client,
) -> Optional[Union[Any, FileConversionWithOutput, Error]]:
) -> Optional[Union[Any, FileConversion, Error]]:
""" Convert a CAD file from one format to another. If the file being converted is larger than 30MB, 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 conversion is performed asynchronously, the `id` of the conversion will be returned. You can use the `id` returned from the request to get status information about the async conversion from the `/file/conversions/{id}` endpoint. """
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. """
return sync_detailed(
output_format=output_format,
@ -94,12 +94,12 @@ If the conversion is performed asynchronously, the `id` of the conversion will b
async def asyncio_detailed(
output_format: FileConversionOutputFormat,
src_format: FileConversionSourceFormat,
output_format: FileOutputFormat,
src_format: FileSourceFormat,
body: bytes,
*,
client: Client,
) -> Response[Union[Any, FileConversionWithOutput, Error]]:
) -> Response[Union[Any, FileConversion, Error]]:
kwargs = _get_kwargs(
output_format=output_format,
src_format=src_format,
@ -114,15 +114,15 @@ async def asyncio_detailed(
async def asyncio(
output_format: FileConversionOutputFormat,
src_format: FileConversionSourceFormat,
output_format: FileOutputFormat,
src_format: FileSourceFormat,
body: bytes,
*,
client: Client,
) -> Optional[Union[Any, FileConversionWithOutput, Error]]:
) -> Optional[Union[Any, FileConversion, Error]]:
""" Convert a CAD file from one format to another. If the file being converted is larger than 30MB, 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 conversion is performed asynchronously, the `id` of the conversion will be returned. You can use the `id` returned from the request to get status information about the async conversion from the `/file/conversions/{id}` endpoint. """
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. """
return (
await asyncio_detailed(