I have generated the latest API!
This commit is contained in:
File diff suppressed because one or more lines are too long
@ -4,6 +4,8 @@ import httpx
|
||||
|
||||
from ...client import Client
|
||||
from ...models.file_conversion import FileConversion
|
||||
from ...models.file2_d_vector_conversion import File2DVectorConversion
|
||||
from ...models.file3_d_conversion import File3DConversion
|
||||
from ...models.file_center_of_mass import FileCenterOfMass
|
||||
from ...models.file_mass import FileMass
|
||||
from ...models.file_volume import FileVolume
|
||||
@ -30,7 +32,7 @@ def _get_kwargs(
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileConversion, File2DVectorConversion, File3DConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
if response.status_code == 200:
|
||||
data = response.json()
|
||||
try:
|
||||
@ -40,6 +42,20 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileConv
|
||||
return option
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
option = File2DVectorConversion.from_dict(data)
|
||||
return option
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
option = File3DConversion.from_dict(data)
|
||||
return option
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
@ -84,7 +100,7 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileConv
|
||||
return None
|
||||
|
||||
|
||||
def _build_response(*, response: httpx.Response) -> Response[Union[Any, FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
def _build_response(*, response: httpx.Response) -> Response[Union[Any, FileConversion, File2DVectorConversion, File3DConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -97,7 +113,7 @@ def sync_detailed(
|
||||
id: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Union[Any, FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
) -> Response[Union[Any, FileConversion, File2DVectorConversion, File3DConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
id=id,
|
||||
client=client,
|
||||
@ -115,7 +131,7 @@ def sync(
|
||||
id: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Any, FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
) -> Optional[Union[Any, FileConversion, File2DVectorConversion, File3DConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
""" Get the status and output of an async operation.
|
||||
This endpoint requires authentication by any KittyCAD user. It returns details of the requested async operation for the user.
|
||||
If the user is not authenticated to view the specified async operation, then it is not returned.
|
||||
@ -131,7 +147,7 @@ async def asyncio_detailed(
|
||||
id: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Union[Any, FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
) -> Response[Union[Any, FileConversion, File2DVectorConversion, File3DConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
id=id,
|
||||
client=client,
|
||||
@ -147,7 +163,7 @@ async def asyncio(
|
||||
id: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Any, FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
) -> Optional[Union[Any, FileConversion, File2DVectorConversion, File3DConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
""" Get the status and output of an async operation.
|
||||
This endpoint requires authentication by any KittyCAD user. It returns details of the requested async operation for the user.
|
||||
If the user is not authenticated to view the specified async operation, then it is not returned.
|
||||
|
@ -5,12 +5,12 @@ import httpx
|
||||
from ...client import Client
|
||||
from ...models.file_center_of_mass import FileCenterOfMass
|
||||
from ...models.error import Error
|
||||
from ...models.file_source_format import FileSourceFormat
|
||||
from ...models.file3_d_import_format import File3DImportFormat
|
||||
from ...types import Response
|
||||
|
||||
def _get_kwargs(
|
||||
material_density: float,
|
||||
src_format: FileSourceFormat,
|
||||
src_format: File3DImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
@ -53,7 +53,7 @@ def _build_response(*, response: httpx.Response) -> Response[Union[Any, FileCent
|
||||
|
||||
def sync_detailed(
|
||||
material_density: float,
|
||||
src_format: FileSourceFormat,
|
||||
src_format: File3DImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
@ -75,7 +75,7 @@ def sync_detailed(
|
||||
|
||||
def sync(
|
||||
material_density: float,
|
||||
src_format: FileSourceFormat,
|
||||
src_format: File3DImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
@ -93,7 +93,7 @@ If the operation is performed asynchronously, the `id` of the operation will be
|
||||
|
||||
async def asyncio_detailed(
|
||||
material_density: float,
|
||||
src_format: FileSourceFormat,
|
||||
src_format: File3DImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
@ -113,7 +113,7 @@ async def asyncio_detailed(
|
||||
|
||||
async def asyncio(
|
||||
material_density: float,
|
||||
src_format: FileSourceFormat,
|
||||
src_format: File3DImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
|
@ -5,13 +5,13 @@ import httpx
|
||||
from ...client import Client
|
||||
from ...models.file_conversion import FileConversion
|
||||
from ...models.error import Error
|
||||
from ...models.file_output_format import FileOutputFormat
|
||||
from ...models.file_source_format import FileSourceFormat
|
||||
from ...models.file_export_format import FileExportFormat
|
||||
from ...models.file_import_format import FileImportFormat
|
||||
from ...types import Response
|
||||
|
||||
def _get_kwargs(
|
||||
output_format: FileOutputFormat,
|
||||
src_format: FileSourceFormat,
|
||||
output_format: FileExportFormat,
|
||||
src_format: FileImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
@ -53,8 +53,8 @@ def _build_response(*, response: httpx.Response) -> Response[Union[Any, FileConv
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
output_format: FileOutputFormat,
|
||||
src_format: FileSourceFormat,
|
||||
output_format: FileExportFormat,
|
||||
src_format: FileImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
@ -75,8 +75,8 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
output_format: FileOutputFormat,
|
||||
src_format: FileSourceFormat,
|
||||
output_format: FileExportFormat,
|
||||
src_format: FileImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
@ -94,8 +94,8 @@ If the operation is performed asynchronously, the `id` of the operation will be
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
output_format: FileOutputFormat,
|
||||
src_format: FileSourceFormat,
|
||||
output_format: FileExportFormat,
|
||||
src_format: FileImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
@ -114,8 +114,8 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
output_format: FileOutputFormat,
|
||||
src_format: FileSourceFormat,
|
||||
output_format: FileExportFormat,
|
||||
src_format: FileImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
|
@ -5,12 +5,12 @@ import httpx
|
||||
from ...client import Client
|
||||
from ...models.file_density import FileDensity
|
||||
from ...models.error import Error
|
||||
from ...models.file_source_format import FileSourceFormat
|
||||
from ...models.file3_d_import_format import File3DImportFormat
|
||||
from ...types import Response
|
||||
|
||||
def _get_kwargs(
|
||||
material_mass: float,
|
||||
src_format: FileSourceFormat,
|
||||
src_format: File3DImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
@ -53,7 +53,7 @@ def _build_response(*, response: httpx.Response) -> Response[Union[Any, FileDens
|
||||
|
||||
def sync_detailed(
|
||||
material_mass: float,
|
||||
src_format: FileSourceFormat,
|
||||
src_format: File3DImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
@ -75,7 +75,7 @@ def sync_detailed(
|
||||
|
||||
def sync(
|
||||
material_mass: float,
|
||||
src_format: FileSourceFormat,
|
||||
src_format: File3DImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
@ -93,7 +93,7 @@ If the operation is performed asynchronously, the `id` of the operation will be
|
||||
|
||||
async def asyncio_detailed(
|
||||
material_mass: float,
|
||||
src_format: FileSourceFormat,
|
||||
src_format: File3DImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
@ -113,7 +113,7 @@ async def asyncio_detailed(
|
||||
|
||||
async def asyncio(
|
||||
material_mass: float,
|
||||
src_format: FileSourceFormat,
|
||||
src_format: File3DImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
|
@ -5,12 +5,12 @@ import httpx
|
||||
from ...client import Client
|
||||
from ...models.file_mass import FileMass
|
||||
from ...models.error import Error
|
||||
from ...models.file_source_format import FileSourceFormat
|
||||
from ...models.file3_d_import_format import File3DImportFormat
|
||||
from ...types import Response
|
||||
|
||||
def _get_kwargs(
|
||||
material_density: float,
|
||||
src_format: FileSourceFormat,
|
||||
src_format: File3DImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
@ -53,7 +53,7 @@ def _build_response(*, response: httpx.Response) -> Response[Union[Any, FileMass
|
||||
|
||||
def sync_detailed(
|
||||
material_density: float,
|
||||
src_format: FileSourceFormat,
|
||||
src_format: File3DImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
@ -75,7 +75,7 @@ def sync_detailed(
|
||||
|
||||
def sync(
|
||||
material_density: float,
|
||||
src_format: FileSourceFormat,
|
||||
src_format: File3DImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
@ -93,7 +93,7 @@ If the operation is performed asynchronously, the `id` of the operation will be
|
||||
|
||||
async def asyncio_detailed(
|
||||
material_density: float,
|
||||
src_format: FileSourceFormat,
|
||||
src_format: File3DImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
@ -113,7 +113,7 @@ async def asyncio_detailed(
|
||||
|
||||
async def asyncio(
|
||||
material_density: float,
|
||||
src_format: FileSourceFormat,
|
||||
src_format: File3DImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
|
@ -5,11 +5,11 @@ import httpx
|
||||
from ...client import Client
|
||||
from ...models.file_surface_area import FileSurfaceArea
|
||||
from ...models.error import Error
|
||||
from ...models.file_source_format import FileSourceFormat
|
||||
from ...models.file3_d_import_format import File3DImportFormat
|
||||
from ...types import Response
|
||||
|
||||
def _get_kwargs(
|
||||
src_format: FileSourceFormat,
|
||||
src_format: File3DImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
@ -51,7 +51,7 @@ def _build_response(*, response: httpx.Response) -> Response[Union[Any, FileSurf
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
src_format: FileSourceFormat,
|
||||
src_format: File3DImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
@ -71,7 +71,7 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
src_format: FileSourceFormat,
|
||||
src_format: File3DImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
@ -87,7 +87,7 @@ If the operation is performed asynchronously, the `id` of the operation will be
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
src_format: FileSourceFormat,
|
||||
src_format: File3DImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
@ -105,7 +105,7 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
src_format: FileSourceFormat,
|
||||
src_format: File3DImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
|
@ -5,11 +5,11 @@ import httpx
|
||||
from ...client import Client
|
||||
from ...models.file_volume import FileVolume
|
||||
from ...models.error import Error
|
||||
from ...models.file_source_format import FileSourceFormat
|
||||
from ...models.file3_d_import_format import File3DImportFormat
|
||||
from ...types import Response
|
||||
|
||||
def _get_kwargs(
|
||||
src_format: FileSourceFormat,
|
||||
src_format: File3DImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
@ -51,7 +51,7 @@ def _build_response(*, response: httpx.Response) -> Response[Union[Any, FileVolu
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
src_format: FileSourceFormat,
|
||||
src_format: File3DImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
@ -71,7 +71,7 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
src_format: FileSourceFormat,
|
||||
src_format: File3DImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
@ -87,7 +87,7 @@ If the operation is performed asynchronously, the `id` of the operation will be
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
src_format: FileSourceFormat,
|
||||
src_format: File3DImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
@ -105,7 +105,7 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
src_format: FileSourceFormat,
|
||||
src_format: File3DImportFormat,
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
|
@ -4,6 +4,8 @@ import httpx
|
||||
|
||||
from ...client import Client
|
||||
from ...models.file_conversion import FileConversion
|
||||
from ...models.file2_d_vector_conversion import File2DVectorConversion
|
||||
from ...models.file3_d_conversion import File3DConversion
|
||||
from ...models.file_center_of_mass import FileCenterOfMass
|
||||
from ...models.file_mass import FileMass
|
||||
from ...models.file_volume import FileVolume
|
||||
@ -30,7 +32,7 @@ def _get_kwargs(
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileConversion, File2DVectorConversion, File3DConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
if response.status_code == 200:
|
||||
data = response.json()
|
||||
try:
|
||||
@ -40,6 +42,20 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileConv
|
||||
return option
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
option = File2DVectorConversion.from_dict(data)
|
||||
return option
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
option = File3DConversion.from_dict(data)
|
||||
return option
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
@ -84,7 +100,7 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileConv
|
||||
return None
|
||||
|
||||
|
||||
def _build_response(*, response: httpx.Response) -> Response[Union[Any, FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
def _build_response(*, response: httpx.Response) -> Response[Union[Any, FileConversion, File2DVectorConversion, File3DConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -97,7 +113,7 @@ def sync_detailed(
|
||||
id: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Union[Any, FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
) -> Response[Union[Any, FileConversion, File2DVectorConversion, File3DConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
id=id,
|
||||
client=client,
|
||||
@ -115,7 +131,7 @@ def sync(
|
||||
id: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Any, FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
) -> Optional[Union[Any, FileConversion, File2DVectorConversion, File3DConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
""" Get the status and output of an async file conversion.
|
||||
This endpoint requires authentication by any KittyCAD user. It returns details of the requested file conversion for the user.
|
||||
If the user is not authenticated to view the specified file conversion, then it is not returned.
|
||||
@ -131,7 +147,7 @@ async def asyncio_detailed(
|
||||
id: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Union[Any, FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
) -> Response[Union[Any, FileConversion, File2DVectorConversion, File3DConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
id=id,
|
||||
client=client,
|
||||
@ -147,7 +163,7 @@ async def asyncio(
|
||||
id: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Any, FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
) -> Optional[Union[Any, FileConversion, File2DVectorConversion, File3DConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
""" Get the status and output of an async file conversion.
|
||||
This endpoint requires authentication by any KittyCAD user. It returns details of the requested file conversion for the user.
|
||||
If the user is not authenticated to view the specified file conversion, then it is not returned.
|
||||
|
@ -4,6 +4,8 @@ import httpx
|
||||
|
||||
from ...client import Client
|
||||
from ...models.file_conversion import FileConversion
|
||||
from ...models.file2_d_vector_conversion import File2DVectorConversion
|
||||
from ...models.file3_d_conversion import File3DConversion
|
||||
from ...models.file_center_of_mass import FileCenterOfMass
|
||||
from ...models.file_mass import FileMass
|
||||
from ...models.file_volume import FileVolume
|
||||
@ -30,7 +32,7 @@ def _get_kwargs(
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileConversion, File2DVectorConversion, File3DConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
if response.status_code == 200:
|
||||
data = response.json()
|
||||
try:
|
||||
@ -40,6 +42,20 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileConv
|
||||
return option
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
option = File2DVectorConversion.from_dict(data)
|
||||
return option
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
option = File3DConversion.from_dict(data)
|
||||
return option
|
||||
except:
|
||||
pass
|
||||
try:
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
@ -84,7 +100,7 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileConv
|
||||
return None
|
||||
|
||||
|
||||
def _build_response(*, response: httpx.Response) -> Response[Union[Any, FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
def _build_response(*, response: httpx.Response) -> Response[Union[Any, FileConversion, File2DVectorConversion, File3DConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -97,7 +113,7 @@ def sync_detailed(
|
||||
id: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Union[Any, FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
) -> Response[Union[Any, FileConversion, File2DVectorConversion, File3DConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
id=id,
|
||||
client=client,
|
||||
@ -115,7 +131,7 @@ def sync(
|
||||
id: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Any, FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
) -> Optional[Union[Any, FileConversion, File2DVectorConversion, File3DConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
""" Get the status and output of an async file conversion. If completed, the contents of the converted file (`output`) will be returned as a base64 encoded string.
|
||||
This endpoint requires authentication by any KittyCAD user. It returns details of the requested file conversion for the user. """
|
||||
|
||||
@ -129,7 +145,7 @@ async def asyncio_detailed(
|
||||
id: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Union[Any, FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
) -> Response[Union[Any, FileConversion, File2DVectorConversion, File3DConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
id=id,
|
||||
client=client,
|
||||
@ -145,7 +161,7 @@ async def asyncio(
|
||||
id: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Any, FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
) -> Optional[Union[Any, FileConversion, File2DVectorConversion, File3DConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]:
|
||||
""" Get the status and output of an async file conversion. If completed, the contents of the converted file (`output`) will be returned as a base64 encoded string.
|
||||
This endpoint requires authentication by any KittyCAD user. It returns details of the requested file conversion for the user. """
|
||||
|
||||
|
100
kittycad/api/users/get_user_front_hash_self.py
Normal file
100
kittycad/api/users/get_user_front_hash_self.py
Normal file
@ -0,0 +1,100 @@
|
||||
from typing import Any, Dict, Optional, Union, cast
|
||||
|
||||
import httpx
|
||||
|
||||
from ...client import Client
|
||||
from ...models.str import str
|
||||
from ...models.error import Error
|
||||
from ...types import Response
|
||||
|
||||
def _get_kwargs(
|
||||
*,
|
||||
client: Client,
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/user/front-hash".format(client.base_url)
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
|
||||
return {
|
||||
"url": url,
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, str, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = response.text
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return None
|
||||
|
||||
|
||||
def _build_response(*, response: httpx.Response) -> Response[Union[Any, str, Error]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
headers=response.headers,
|
||||
parsed=_parse_response(response=response),
|
||||
)
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Union[Any, str, Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
client=client,
|
||||
)
|
||||
|
||||
response = httpx.get(
|
||||
verify=client.verify_ssl,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
return _build_response(response=response)
|
||||
|
||||
|
||||
def sync(
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Any, str, Error]]:
|
||||
""" This info is sent to front when initialing the front chat, it prevents impersonations using js hacks in the browser """
|
||||
|
||||
return sync_detailed(
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Union[Any, str, Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
client=client,
|
||||
)
|
||||
|
||||
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
||||
response = await _client.get(**kwargs)
|
||||
|
||||
return _build_response(response=response)
|
||||
|
||||
|
||||
async def asyncio(
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Any, str, Error]]:
|
||||
""" This info is sent to front when initialing the front chat, it prevents impersonations using js hacks in the browser """
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
100
kittycad/api/users/get_user_onboarding_self.py
Normal file
100
kittycad/api/users/get_user_onboarding_self.py
Normal file
@ -0,0 +1,100 @@
|
||||
from typing import Any, Dict, Optional, Union, cast
|
||||
|
||||
import httpx
|
||||
|
||||
from ...client import Client
|
||||
from ...models.onboarding import Onboarding
|
||||
from ...models.error import Error
|
||||
from ...types import Response
|
||||
|
||||
def _get_kwargs(
|
||||
*,
|
||||
client: Client,
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/user/onboarding".format(client.base_url)
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
|
||||
return {
|
||||
"url": url,
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, Onboarding, Error]]:
|
||||
if response.status_code == 200:
|
||||
response_200 = Onboarding.from_dict(response.json())
|
||||
return response_200
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return None
|
||||
|
||||
|
||||
def _build_response(*, response: httpx.Response) -> Response[Union[Any, Onboarding, Error]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
headers=response.headers,
|
||||
parsed=_parse_response(response=response),
|
||||
)
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Union[Any, Onboarding, Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
client=client,
|
||||
)
|
||||
|
||||
response = httpx.get(
|
||||
verify=client.verify_ssl,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
return _build_response(response=response)
|
||||
|
||||
|
||||
def sync(
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Any, Onboarding, Error]]:
|
||||
""" Checks key part of their api usage to determine their onboarding progress """
|
||||
|
||||
return sync_detailed(
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Union[Any, Onboarding, Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
client=client,
|
||||
)
|
||||
|
||||
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
||||
response = await _client.get(**kwargs)
|
||||
|
||||
return _build_response(response=response)
|
||||
|
||||
|
||||
async def asyncio(
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Any, Onboarding, Error]]:
|
||||
""" Checks key part of their api usage to determine their onboarding progress """
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
@ -35,12 +35,16 @@ from .error import Error
|
||||
from .executor_metadata import ExecutorMetadata
|
||||
from .extended_user import ExtendedUser
|
||||
from .extended_user_results_page import ExtendedUserResultsPage
|
||||
from .file2_d_vector_export_format import File2DVectorExportFormat
|
||||
from .file2_d_vector_import_format import File2DVectorImportFormat
|
||||
from .file3_d_export_format import File3DExportFormat
|
||||
from .file3_d_import_format import File3DImportFormat
|
||||
from .file_center_of_mass import FileCenterOfMass
|
||||
from .file_conversion import FileConversion
|
||||
from .file_density import FileDensity
|
||||
from .file_export_format import FileExportFormat
|
||||
from .file_import_format import FileImportFormat
|
||||
from .file_mass import FileMass
|
||||
from .file_output_format import FileOutputFormat
|
||||
from .file_source_format import FileSourceFormat
|
||||
from .file_surface_area import FileSurfaceArea
|
||||
from .file_system_metadata import FileSystemMetadata
|
||||
from .file_volume import FileVolume
|
||||
@ -60,6 +64,7 @@ from .method import Method
|
||||
from .new_address import NewAddress
|
||||
from .o_auth2_client_info import OAuth2ClientInfo
|
||||
from .o_auth2_grant_type import OAuth2GrantType
|
||||
from .onboarding import Onboarding
|
||||
from .output_file import OutputFile
|
||||
from .payment_intent import PaymentIntent
|
||||
from .payment_method import PaymentMethod
|
||||
|
@ -3,6 +3,8 @@ from enum import Enum
|
||||
|
||||
class AsyncApiCallType(str, Enum):
|
||||
FILE_CONVERSION = 'FileConversion'
|
||||
FILE2_D_VECTOR_CONVERSION = 'File2DVectorConversion'
|
||||
FILE3_D_CONVERSION = 'File3DConversion'
|
||||
FILE_VOLUME = 'FileVolume'
|
||||
FILE_CENTER_OF_MASS = 'FileCenterOfMass'
|
||||
FILE_MASS = 'FileMass'
|
||||
|
@ -18,6 +18,7 @@ class ExtendedUser:
|
||||
email: Union[Unset, str] = UNSET
|
||||
email_verified: Union[Unset, datetime.datetime] = UNSET
|
||||
first_name: Union[Unset, str] = UNSET
|
||||
front_id: Union[Unset, str] = UNSET
|
||||
github: Union[Unset, str] = UNSET
|
||||
id: Union[Unset, str] = UNSET
|
||||
image: Union[Unset, str] = UNSET
|
||||
@ -42,6 +43,7 @@ class ExtendedUser:
|
||||
if not isinstance(self.email_verified, Unset):
|
||||
email_verified = self.email_verified.isoformat()
|
||||
first_name = self.first_name
|
||||
front_id = self.front_id
|
||||
github = self.github
|
||||
id = self.id
|
||||
image = self.image
|
||||
@ -70,6 +72,8 @@ class ExtendedUser:
|
||||
field_dict['email_verified'] = email_verified
|
||||
if first_name is not UNSET:
|
||||
field_dict['first_name'] = first_name
|
||||
if front_id is not UNSET:
|
||||
field_dict['front_id'] = front_id
|
||||
if github is not UNSET:
|
||||
field_dict['github'] = github
|
||||
if id is not UNSET:
|
||||
@ -118,6 +122,8 @@ class ExtendedUser:
|
||||
|
||||
first_name = d.pop("first_name", UNSET)
|
||||
|
||||
front_id = d.pop("front_id", UNSET)
|
||||
|
||||
github = d.pop("github", UNSET)
|
||||
|
||||
id = d.pop("id", UNSET)
|
||||
@ -150,6 +156,7 @@ class ExtendedUser:
|
||||
email=email,
|
||||
email_verified=email_verified,
|
||||
first_name=first_name,
|
||||
front_id=front_id,
|
||||
github=github,
|
||||
id=id,
|
||||
image=image,
|
||||
|
10
kittycad/models/file2_d_vector_export_format.py
Normal file
10
kittycad/models/file2_d_vector_export_format.py
Normal file
@ -0,0 +1,10 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class File2DVectorExportFormat(str, Enum):
|
||||
DXF = 'dxf'
|
||||
JSON = 'json'
|
||||
SVG = 'svg'
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
9
kittycad/models/file2_d_vector_import_format.py
Normal file
9
kittycad/models/file2_d_vector_import_format.py
Normal file
@ -0,0 +1,9 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class File2DVectorImportFormat(str, Enum):
|
||||
DXF = 'dxf'
|
||||
SVG = 'svg'
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
@ -1,13 +1,14 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class FileOutputFormat(str, Enum):
|
||||
STL = 'stl'
|
||||
OBJ = 'obj'
|
||||
class File3DExportFormat(str, Enum):
|
||||
DAE = 'dae'
|
||||
STEP = 'step'
|
||||
FBX = 'fbx'
|
||||
FBXB = 'fbxb'
|
||||
OBJ = 'obj'
|
||||
OBJ_NOMTL = 'obj_nomtl'
|
||||
STEP = 'step'
|
||||
STL = 'stl'
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
@ -1,12 +1,13 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class FileSourceFormat(str, Enum):
|
||||
STL = 'stl'
|
||||
OBJ = 'obj'
|
||||
class File3DImportFormat(str, Enum):
|
||||
DAE = 'dae'
|
||||
STEP = 'step'
|
||||
FBX = 'fbx'
|
||||
OBJ = 'obj'
|
||||
OBJ_NOMTL = 'obj_nomtl'
|
||||
STEP = 'step'
|
||||
STL = 'stl'
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
@ -5,7 +5,7 @@ import attr
|
||||
from dateutil.parser import isoparse
|
||||
|
||||
from ..models.uuid import Uuid
|
||||
from ..models.file_source_format import FileSourceFormat
|
||||
from ..models.file3_d_import_format import File3DImportFormat
|
||||
from ..models.api_call_status import ApiCallStatus
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
@ -21,7 +21,7 @@ class FileCenterOfMass:
|
||||
error: Union[Unset, str] = UNSET
|
||||
id: Union[Unset, str] = UNSET
|
||||
material_density: Union[Unset, float] = UNSET
|
||||
src_format: Union[Unset, FileSourceFormat] = UNSET
|
||||
src_format: Union[Unset, File3DImportFormat] = UNSET
|
||||
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||
@ -110,11 +110,11 @@ class FileCenterOfMass:
|
||||
material_density = d.pop("material_density", UNSET)
|
||||
|
||||
_src_format = d.pop("src_format", UNSET)
|
||||
src_format: Union[Unset, FileSourceFormat]
|
||||
src_format: Union[Unset, File3DImportFormat]
|
||||
if isinstance(_src_format, Unset):
|
||||
src_format = UNSET
|
||||
else:
|
||||
src_format = FileSourceFormat(_src_format)
|
||||
src_format = File3DImportFormat(_src_format)
|
||||
|
||||
_started_at = d.pop("started_at", UNSET)
|
||||
started_at: Union[Unset, datetime.datetime]
|
||||
|
@ -5,8 +5,8 @@ import attr
|
||||
from dateutil.parser import isoparse
|
||||
|
||||
from ..models.uuid import Uuid
|
||||
from ..models.file_output_format import FileOutputFormat
|
||||
from ..models.file_source_format import FileSourceFormat
|
||||
from ..models.file_export_format import FileExportFormat
|
||||
from ..models.file_import_format import FileImportFormat
|
||||
from ..models.api_call_status import ApiCallStatus
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
@ -21,8 +21,8 @@ class FileConversion:
|
||||
error: Union[Unset, str] = UNSET
|
||||
id: Union[Unset, str] = UNSET
|
||||
output: Union[Unset, str] = UNSET
|
||||
output_format: Union[Unset, FileOutputFormat] = UNSET
|
||||
src_format: Union[Unset, FileSourceFormat] = UNSET
|
||||
output_format: Union[Unset, FileExportFormat] = UNSET
|
||||
src_format: Union[Unset, FileImportFormat] = UNSET
|
||||
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||
@ -109,18 +109,18 @@ class FileConversion:
|
||||
output = d.pop("output", UNSET)
|
||||
|
||||
_output_format = d.pop("output_format", UNSET)
|
||||
output_format: Union[Unset, FileOutputFormat]
|
||||
output_format: Union[Unset, FileExportFormat]
|
||||
if isinstance(_output_format, Unset):
|
||||
output_format = UNSET
|
||||
else:
|
||||
output_format = FileOutputFormat(_output_format)
|
||||
output_format = FileExportFormat(_output_format)
|
||||
|
||||
_src_format = d.pop("src_format", UNSET)
|
||||
src_format: Union[Unset, FileSourceFormat]
|
||||
src_format: Union[Unset, FileImportFormat]
|
||||
if isinstance(_src_format, Unset):
|
||||
src_format = UNSET
|
||||
else:
|
||||
src_format = FileSourceFormat(_src_format)
|
||||
src_format = FileImportFormat(_src_format)
|
||||
|
||||
_started_at = d.pop("started_at", UNSET)
|
||||
started_at: Union[Unset, datetime.datetime]
|
||||
|
@ -5,7 +5,7 @@ import attr
|
||||
from dateutil.parser import isoparse
|
||||
|
||||
from ..models.uuid import Uuid
|
||||
from ..models.file_source_format import FileSourceFormat
|
||||
from ..models.file3_d_import_format import File3DImportFormat
|
||||
from ..models.api_call_status import ApiCallStatus
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
@ -21,7 +21,7 @@ class FileDensity:
|
||||
error: Union[Unset, str] = UNSET
|
||||
id: Union[Unset, str] = UNSET
|
||||
material_mass: Union[Unset, float] = UNSET
|
||||
src_format: Union[Unset, FileSourceFormat] = UNSET
|
||||
src_format: Union[Unset, File3DImportFormat] = UNSET
|
||||
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||
@ -108,11 +108,11 @@ class FileDensity:
|
||||
material_mass = d.pop("material_mass", UNSET)
|
||||
|
||||
_src_format = d.pop("src_format", UNSET)
|
||||
src_format: Union[Unset, FileSourceFormat]
|
||||
src_format: Union[Unset, File3DImportFormat]
|
||||
if isinstance(_src_format, Unset):
|
||||
src_format = UNSET
|
||||
else:
|
||||
src_format = FileSourceFormat(_src_format)
|
||||
src_format = File3DImportFormat(_src_format)
|
||||
|
||||
_started_at = d.pop("started_at", UNSET)
|
||||
started_at: Union[Unset, datetime.datetime]
|
||||
|
17
kittycad/models/file_export_format.py
Normal file
17
kittycad/models/file_export_format.py
Normal file
@ -0,0 +1,17 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class FileExportFormat(str, Enum):
|
||||
DAE = 'dae'
|
||||
DXF = 'dxf'
|
||||
FBX = 'fbx'
|
||||
FBXB = 'fbxb'
|
||||
JSON = 'json'
|
||||
OBJ = 'obj'
|
||||
OBJ_NOMTL = 'obj_nomtl'
|
||||
STEP = 'step'
|
||||
STL = 'stl'
|
||||
SVG = 'svg'
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
15
kittycad/models/file_import_format.py
Normal file
15
kittycad/models/file_import_format.py
Normal file
@ -0,0 +1,15 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class FileImportFormat(str, Enum):
|
||||
DAE = 'dae'
|
||||
DXF = 'dxf'
|
||||
FBX = 'fbx'
|
||||
OBJ = 'obj'
|
||||
OBJ_NOMTL = 'obj_nomtl'
|
||||
STEP = 'step'
|
||||
STL = 'stl'
|
||||
SVG = 'svg'
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
@ -5,7 +5,7 @@ import attr
|
||||
from dateutil.parser import isoparse
|
||||
|
||||
from ..models.uuid import Uuid
|
||||
from ..models.file_source_format import FileSourceFormat
|
||||
from ..models.file3_d_import_format import File3DImportFormat
|
||||
from ..models.api_call_status import ApiCallStatus
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
@ -21,7 +21,7 @@ class FileMass:
|
||||
id: Union[Unset, str] = UNSET
|
||||
mass: Union[Unset, float] = UNSET
|
||||
material_density: Union[Unset, float] = UNSET
|
||||
src_format: Union[Unset, FileSourceFormat] = UNSET
|
||||
src_format: Union[Unset, File3DImportFormat] = UNSET
|
||||
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||
@ -108,11 +108,11 @@ class FileMass:
|
||||
material_density = d.pop("material_density", UNSET)
|
||||
|
||||
_src_format = d.pop("src_format", UNSET)
|
||||
src_format: Union[Unset, FileSourceFormat]
|
||||
src_format: Union[Unset, File3DImportFormat]
|
||||
if isinstance(_src_format, Unset):
|
||||
src_format = UNSET
|
||||
else:
|
||||
src_format = FileSourceFormat(_src_format)
|
||||
src_format = File3DImportFormat(_src_format)
|
||||
|
||||
_started_at = d.pop("started_at", UNSET)
|
||||
started_at: Union[Unset, datetime.datetime]
|
||||
|
@ -5,7 +5,7 @@ import attr
|
||||
from dateutil.parser import isoparse
|
||||
|
||||
from ..models.uuid import Uuid
|
||||
from ..models.file_source_format import FileSourceFormat
|
||||
from ..models.file3_d_import_format import File3DImportFormat
|
||||
from ..models.api_call_status import ApiCallStatus
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
@ -19,7 +19,7 @@ class FileSurfaceArea:
|
||||
created_at: Union[Unset, datetime.datetime] = UNSET
|
||||
error: Union[Unset, str] = UNSET
|
||||
id: Union[Unset, str] = UNSET
|
||||
src_format: Union[Unset, FileSourceFormat] = UNSET
|
||||
src_format: Union[Unset, File3DImportFormat] = UNSET
|
||||
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
surface_area: Union[Unset, float] = UNSET
|
||||
@ -100,11 +100,11 @@ class FileSurfaceArea:
|
||||
id = d.pop("id", UNSET)
|
||||
|
||||
_src_format = d.pop("src_format", UNSET)
|
||||
src_format: Union[Unset, FileSourceFormat]
|
||||
src_format: Union[Unset, File3DImportFormat]
|
||||
if isinstance(_src_format, Unset):
|
||||
src_format = UNSET
|
||||
else:
|
||||
src_format = FileSourceFormat(_src_format)
|
||||
src_format = File3DImportFormat(_src_format)
|
||||
|
||||
_started_at = d.pop("started_at", UNSET)
|
||||
started_at: Union[Unset, datetime.datetime]
|
||||
|
@ -5,7 +5,7 @@ import attr
|
||||
from dateutil.parser import isoparse
|
||||
|
||||
from ..models.uuid import Uuid
|
||||
from ..models.file_source_format import FileSourceFormat
|
||||
from ..models.file3_d_import_format import File3DImportFormat
|
||||
from ..models.api_call_status import ApiCallStatus
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
@ -19,7 +19,7 @@ class FileVolume:
|
||||
created_at: Union[Unset, datetime.datetime] = UNSET
|
||||
error: Union[Unset, str] = UNSET
|
||||
id: Union[Unset, str] = UNSET
|
||||
src_format: Union[Unset, FileSourceFormat] = UNSET
|
||||
src_format: Union[Unset, File3DImportFormat] = UNSET
|
||||
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||
@ -100,11 +100,11 @@ class FileVolume:
|
||||
id = d.pop("id", UNSET)
|
||||
|
||||
_src_format = d.pop("src_format", UNSET)
|
||||
src_format: Union[Unset, FileSourceFormat]
|
||||
src_format: Union[Unset, File3DImportFormat]
|
||||
if isinstance(_src_format, Unset):
|
||||
src_format = UNSET
|
||||
else:
|
||||
src_format = FileSourceFormat(_src_format)
|
||||
src_format = File3DImportFormat(_src_format)
|
||||
|
||||
_started_at = d.pop("started_at", UNSET)
|
||||
started_at: Union[Unset, datetime.datetime]
|
||||
|
70
kittycad/models/onboarding.py
Normal file
70
kittycad/models/onboarding.py
Normal file
@ -0,0 +1,70 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
|
||||
import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="Onboarding")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class Onboarding:
|
||||
""" """
|
||||
first_call_from_their_machine_date: Union[Unset, str] = UNSET
|
||||
first_litterbox_execute_date: Union[Unset, str] = UNSET
|
||||
first_token_date: Union[Unset, str] = UNSET
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
first_call_from_their_machine_date = self.first_call_from_their_machine_date
|
||||
first_litterbox_execute_date = self.first_litterbox_execute_date
|
||||
first_token_date = self.first_token_date
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if first_call_from_their_machine_date is not UNSET:
|
||||
field_dict['first_call_from_their_machine_date'] = first_call_from_their_machine_date
|
||||
if first_litterbox_execute_date is not UNSET:
|
||||
field_dict['first_litterbox_execute_date'] = first_litterbox_execute_date
|
||||
if first_token_date is not UNSET:
|
||||
field_dict['first_token_date'] = first_token_date
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
first_call_from_their_machine_date = d.pop(
|
||||
"first_call_from_their_machine_date", UNSET)
|
||||
|
||||
first_litterbox_execute_date = d.pop(
|
||||
"first_litterbox_execute_date", UNSET)
|
||||
|
||||
first_token_date = d.pop("first_token_date", UNSET)
|
||||
|
||||
onboarding = cls(
|
||||
first_call_from_their_machine_date=first_call_from_their_machine_date,
|
||||
first_litterbox_execute_date=first_litterbox_execute_date,
|
||||
first_token_date=first_token_date,
|
||||
)
|
||||
|
||||
onboarding.additional_properties = d
|
||||
return onboarding
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
@ -6,9 +6,9 @@ class PhysicsConstantName(str, Enum):
|
||||
C = 'c'
|
||||
SPEED_OF_LIGHT = 'speed_of_light'
|
||||
G = 'G'
|
||||
NEWTONIAN_GRAVIATION = 'newtonian_graviation'
|
||||
NEWTONIAN_GRAVITATION = 'newtonian_gravitation'
|
||||
H = 'h'
|
||||
PLANK_CONST = 'plank_const'
|
||||
PLANCK_CONST = 'planck_const'
|
||||
MU_0 = 'mu_0'
|
||||
VACUUM_PERMEABILITY = 'vacuum_permeability'
|
||||
E_0 = 'E_0'
|
||||
|
@ -2,11 +2,9 @@ from enum import Enum
|
||||
|
||||
|
||||
class UnitLengthFormat(str, Enum):
|
||||
MILLIMETER = 'millimeter'
|
||||
CENTIMETER = 'centimeter'
|
||||
METER = 'meter'
|
||||
KILOMTER = 'kilomter'
|
||||
FOOT = 'foot'
|
||||
MIL = 'mil'
|
||||
INCH = 'inch'
|
||||
MILE = 'mile'
|
||||
NAUTICAL_MILE = 'nautical_mile'
|
||||
@ -19,6 +17,9 @@ class UnitLengthFormat(str, Enum):
|
||||
LEAGUE = 'league'
|
||||
NAUTICAL_LEAGUE = 'nautical_league'
|
||||
YARD = 'yard'
|
||||
MILLIMETER = 'millimeter'
|
||||
CENTIMETER = 'centimeter'
|
||||
KILOMETER = 'kilometer'
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
|
@ -3,7 +3,6 @@ from enum import Enum
|
||||
|
||||
class UnitMassFormat(str, Enum):
|
||||
GRAM = 'gram'
|
||||
KILOGRAM = 'kilogram'
|
||||
METRIC_TON = 'metric_ton'
|
||||
POUND = 'pound'
|
||||
LONG_TON = 'long_ton'
|
||||
@ -12,6 +11,7 @@ class UnitMassFormat(str, Enum):
|
||||
OUNCE = 'ounce'
|
||||
CARAT = 'carat'
|
||||
SLUG = 'slug'
|
||||
KILOGRAM = 'kilogram'
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
|
@ -10,7 +10,7 @@ class UnitMetricPower(str, Enum):
|
||||
MILLI = 'milli'
|
||||
CENTI = 'centi'
|
||||
DECI = 'deci'
|
||||
METRIC_UNIT = 'metric_unit'
|
||||
UNIT = 'unit'
|
||||
DECA = 'deca'
|
||||
HECTO = 'hecto'
|
||||
KILO = 'kilo'
|
||||
|
@ -2,14 +2,14 @@ from enum import Enum
|
||||
|
||||
|
||||
class UnitVolumeFormat(str, Enum):
|
||||
CUBIC_MILLIMETER = 'cubic_millimeter'
|
||||
CUBIC_CENTIMETER = 'cubic_centimeter'
|
||||
CUBIC_METER = 'cubic_meter'
|
||||
CUBIC_MILLIMETER = 'cubic_millimeter'
|
||||
CUBIC_KILOMETER = 'cubic_kilometer'
|
||||
LITER = 'liter'
|
||||
CUBIC_FOOT = 'cubic_foot'
|
||||
CUBIC_YARD = 'cubic_yard'
|
||||
CUBIC_MILE = 'cubic_mile'
|
||||
CUBIC_CENTIMETER = 'cubic_centimeter'
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
|
Reference in New Issue
Block a user