I have generated the latest API!
This commit is contained in:
File diff suppressed because one or more lines are too long
109
kittycad/api/apps/apps_github_webhook.py
Normal file
109
kittycad/api/apps/apps_github_webhook.py
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
from typing import Any, Dict, Optional, Union, cast
|
||||||
|
|
||||||
|
import httpx
|
||||||
|
|
||||||
|
from ...client import Client
|
||||||
|
from ...models.error import Error
|
||||||
|
from ...types import Response
|
||||||
|
|
||||||
|
def _get_kwargs(
|
||||||
|
body: bytes,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Dict[str, Any]:
|
||||||
|
url = "{}/apps/github/webhook".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(),
|
||||||
|
"content": body,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, Error]]:
|
||||||
|
if response.status_code == 204:
|
||||||
|
response_204 = None
|
||||||
|
return response_204
|
||||||
|
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, Error]]:
|
||||||
|
return Response(
|
||||||
|
status_code=response.status_code,
|
||||||
|
content=response.content,
|
||||||
|
headers=response.headers,
|
||||||
|
parsed=_parse_response(response=response),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def sync_detailed(
|
||||||
|
body: bytes,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
body=body,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
|
||||||
|
response = httpx.post(
|
||||||
|
verify=client.verify_ssl,
|
||||||
|
**kwargs,
|
||||||
|
)
|
||||||
|
|
||||||
|
return _build_response(response=response)
|
||||||
|
|
||||||
|
|
||||||
|
def sync(
|
||||||
|
body: bytes,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, Error]]:
|
||||||
|
""" These come from the GitHub app. """
|
||||||
|
|
||||||
|
return sync_detailed(
|
||||||
|
body=body,
|
||||||
|
client=client,
|
||||||
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
|
async def asyncio_detailed(
|
||||||
|
body: bytes,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
body=body,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
|
||||||
|
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
||||||
|
response = await _client.post(**kwargs)
|
||||||
|
|
||||||
|
return _build_response(response=response)
|
||||||
|
|
||||||
|
|
||||||
|
async def asyncio(
|
||||||
|
body: bytes,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, Error]]:
|
||||||
|
""" These come from the GitHub app. """
|
||||||
|
|
||||||
|
return (
|
||||||
|
await asyncio_detailed(
|
||||||
|
body=body,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
).parsed
|
129
kittycad/api/unit/get_acceleration_unit_conversion.py
Normal file
129
kittycad/api/unit/get_acceleration_unit_conversion.py
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
from typing import Any, Dict, Optional, Union, cast
|
||||||
|
|
||||||
|
import httpx
|
||||||
|
|
||||||
|
from ...client import Client
|
||||||
|
from ...models.unit_acceleration_conversion import UnitAccelerationConversion
|
||||||
|
from ...models.error import Error
|
||||||
|
from ...models.unit_acceleration_format import UnitAccelerationFormat
|
||||||
|
from ...models.unit_acceleration_format import UnitAccelerationFormat
|
||||||
|
from ...types import Response
|
||||||
|
|
||||||
|
def _get_kwargs(
|
||||||
|
output_format: UnitAccelerationFormat,
|
||||||
|
src_format: UnitAccelerationFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Dict[str, Any]:
|
||||||
|
url = "{}/unit/conversion/acceleration/{src_format}/{output_format}?value={value}".format(client.base_url, output_format=output_format, src_format=src_format, value=value)
|
||||||
|
|
||||||
|
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, UnitAccelerationConversion, Error]]:
|
||||||
|
if response.status_code == 200:
|
||||||
|
response_200 = UnitAccelerationConversion.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, UnitAccelerationConversion, Error]]:
|
||||||
|
return Response(
|
||||||
|
status_code=response.status_code,
|
||||||
|
content=response.content,
|
||||||
|
headers=response.headers,
|
||||||
|
parsed=_parse_response(response=response),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def sync_detailed(
|
||||||
|
output_format: UnitAccelerationFormat,
|
||||||
|
src_format: UnitAccelerationFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, UnitAccelerationConversion, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
|
||||||
|
response = httpx.get(
|
||||||
|
verify=client.verify_ssl,
|
||||||
|
**kwargs,
|
||||||
|
)
|
||||||
|
|
||||||
|
return _build_response(response=response)
|
||||||
|
|
||||||
|
|
||||||
|
def sync(
|
||||||
|
output_format: UnitAccelerationFormat,
|
||||||
|
src_format: UnitAccelerationFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, UnitAccelerationConversion, Error]]:
|
||||||
|
""" Convert a unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
||||||
|
|
||||||
|
return sync_detailed(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
|
async def asyncio_detailed(
|
||||||
|
output_format: UnitAccelerationFormat,
|
||||||
|
src_format: UnitAccelerationFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, UnitAccelerationConversion, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
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(
|
||||||
|
output_format: UnitAccelerationFormat,
|
||||||
|
src_format: UnitAccelerationFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, UnitAccelerationConversion, Error]]:
|
||||||
|
""" Convert a unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
||||||
|
|
||||||
|
return (
|
||||||
|
await asyncio_detailed(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
).parsed
|
129
kittycad/api/unit/get_angle_unit_conversion.py
Normal file
129
kittycad/api/unit/get_angle_unit_conversion.py
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
from typing import Any, Dict, Optional, Union, cast
|
||||||
|
|
||||||
|
import httpx
|
||||||
|
|
||||||
|
from ...client import Client
|
||||||
|
from ...models.unit_angle_conversion import UnitAngleConversion
|
||||||
|
from ...models.error import Error
|
||||||
|
from ...models.unit_angle_format import UnitAngleFormat
|
||||||
|
from ...models.unit_angle_format import UnitAngleFormat
|
||||||
|
from ...types import Response
|
||||||
|
|
||||||
|
def _get_kwargs(
|
||||||
|
output_format: UnitAngleFormat,
|
||||||
|
src_format: UnitAngleFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Dict[str, Any]:
|
||||||
|
url = "{}/unit/conversion/angle/{src_format}/{output_format}?value={value}".format(client.base_url, output_format=output_format, src_format=src_format, value=value)
|
||||||
|
|
||||||
|
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, UnitAngleConversion, Error]]:
|
||||||
|
if response.status_code == 200:
|
||||||
|
response_200 = UnitAngleConversion.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, UnitAngleConversion, Error]]:
|
||||||
|
return Response(
|
||||||
|
status_code=response.status_code,
|
||||||
|
content=response.content,
|
||||||
|
headers=response.headers,
|
||||||
|
parsed=_parse_response(response=response),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def sync_detailed(
|
||||||
|
output_format: UnitAngleFormat,
|
||||||
|
src_format: UnitAngleFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, UnitAngleConversion, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
|
||||||
|
response = httpx.get(
|
||||||
|
verify=client.verify_ssl,
|
||||||
|
**kwargs,
|
||||||
|
)
|
||||||
|
|
||||||
|
return _build_response(response=response)
|
||||||
|
|
||||||
|
|
||||||
|
def sync(
|
||||||
|
output_format: UnitAngleFormat,
|
||||||
|
src_format: UnitAngleFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, UnitAngleConversion, Error]]:
|
||||||
|
""" Convert a unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
||||||
|
|
||||||
|
return sync_detailed(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
|
async def asyncio_detailed(
|
||||||
|
output_format: UnitAngleFormat,
|
||||||
|
src_format: UnitAngleFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, UnitAngleConversion, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
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(
|
||||||
|
output_format: UnitAngleFormat,
|
||||||
|
src_format: UnitAngleFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, UnitAngleConversion, Error]]:
|
||||||
|
""" Convert a unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
||||||
|
|
||||||
|
return (
|
||||||
|
await asyncio_detailed(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
).parsed
|
129
kittycad/api/unit/get_angular_velocity_unit_conversion.py
Normal file
129
kittycad/api/unit/get_angular_velocity_unit_conversion.py
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
from typing import Any, Dict, Optional, Union, cast
|
||||||
|
|
||||||
|
import httpx
|
||||||
|
|
||||||
|
from ...client import Client
|
||||||
|
from ...models.unit_angular_velocity_conversion import UnitAngularVelocityConversion
|
||||||
|
from ...models.error import Error
|
||||||
|
from ...models.unit_angular_velocity_format import UnitAngularVelocityFormat
|
||||||
|
from ...models.unit_angular_velocity_format import UnitAngularVelocityFormat
|
||||||
|
from ...types import Response
|
||||||
|
|
||||||
|
def _get_kwargs(
|
||||||
|
output_format: UnitAngularVelocityFormat,
|
||||||
|
src_format: UnitAngularVelocityFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Dict[str, Any]:
|
||||||
|
url = "{}/unit/conversion/angular-velocity/{src_format}/{output_format}?value={value}".format(client.base_url, output_format=output_format, src_format=src_format, value=value)
|
||||||
|
|
||||||
|
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, UnitAngularVelocityConversion, Error]]:
|
||||||
|
if response.status_code == 200:
|
||||||
|
response_200 = UnitAngularVelocityConversion.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, UnitAngularVelocityConversion, Error]]:
|
||||||
|
return Response(
|
||||||
|
status_code=response.status_code,
|
||||||
|
content=response.content,
|
||||||
|
headers=response.headers,
|
||||||
|
parsed=_parse_response(response=response),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def sync_detailed(
|
||||||
|
output_format: UnitAngularVelocityFormat,
|
||||||
|
src_format: UnitAngularVelocityFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, UnitAngularVelocityConversion, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
|
||||||
|
response = httpx.get(
|
||||||
|
verify=client.verify_ssl,
|
||||||
|
**kwargs,
|
||||||
|
)
|
||||||
|
|
||||||
|
return _build_response(response=response)
|
||||||
|
|
||||||
|
|
||||||
|
def sync(
|
||||||
|
output_format: UnitAngularVelocityFormat,
|
||||||
|
src_format: UnitAngularVelocityFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, UnitAngularVelocityConversion, Error]]:
|
||||||
|
""" Convert a unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
||||||
|
|
||||||
|
return sync_detailed(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
|
async def asyncio_detailed(
|
||||||
|
output_format: UnitAngularVelocityFormat,
|
||||||
|
src_format: UnitAngularVelocityFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, UnitAngularVelocityConversion, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
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(
|
||||||
|
output_format: UnitAngularVelocityFormat,
|
||||||
|
src_format: UnitAngularVelocityFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, UnitAngularVelocityConversion, Error]]:
|
||||||
|
""" Convert a unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
||||||
|
|
||||||
|
return (
|
||||||
|
await asyncio_detailed(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
).parsed
|
129
kittycad/api/unit/get_area_unit_conversion.py
Normal file
129
kittycad/api/unit/get_area_unit_conversion.py
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
from typing import Any, Dict, Optional, Union, cast
|
||||||
|
|
||||||
|
import httpx
|
||||||
|
|
||||||
|
from ...client import Client
|
||||||
|
from ...models.unit_area_conversion import UnitAreaConversion
|
||||||
|
from ...models.error import Error
|
||||||
|
from ...models.unit_area_format import UnitAreaFormat
|
||||||
|
from ...models.unit_area_format import UnitAreaFormat
|
||||||
|
from ...types import Response
|
||||||
|
|
||||||
|
def _get_kwargs(
|
||||||
|
output_format: UnitAreaFormat,
|
||||||
|
src_format: UnitAreaFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Dict[str, Any]:
|
||||||
|
url = "{}/unit/conversion/area/{src_format}/{output_format}?value={value}".format(client.base_url, output_format=output_format, src_format=src_format, value=value)
|
||||||
|
|
||||||
|
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, UnitAreaConversion, Error]]:
|
||||||
|
if response.status_code == 200:
|
||||||
|
response_200 = UnitAreaConversion.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, UnitAreaConversion, Error]]:
|
||||||
|
return Response(
|
||||||
|
status_code=response.status_code,
|
||||||
|
content=response.content,
|
||||||
|
headers=response.headers,
|
||||||
|
parsed=_parse_response(response=response),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def sync_detailed(
|
||||||
|
output_format: UnitAreaFormat,
|
||||||
|
src_format: UnitAreaFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, UnitAreaConversion, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
|
||||||
|
response = httpx.get(
|
||||||
|
verify=client.verify_ssl,
|
||||||
|
**kwargs,
|
||||||
|
)
|
||||||
|
|
||||||
|
return _build_response(response=response)
|
||||||
|
|
||||||
|
|
||||||
|
def sync(
|
||||||
|
output_format: UnitAreaFormat,
|
||||||
|
src_format: UnitAreaFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, UnitAreaConversion, Error]]:
|
||||||
|
""" Convert a unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
||||||
|
|
||||||
|
return sync_detailed(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
|
async def asyncio_detailed(
|
||||||
|
output_format: UnitAreaFormat,
|
||||||
|
src_format: UnitAreaFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, UnitAreaConversion, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
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(
|
||||||
|
output_format: UnitAreaFormat,
|
||||||
|
src_format: UnitAreaFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, UnitAreaConversion, Error]]:
|
||||||
|
""" Convert a unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
||||||
|
|
||||||
|
return (
|
||||||
|
await asyncio_detailed(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
).parsed
|
129
kittycad/api/unit/get_charge_unit_conversion.py
Normal file
129
kittycad/api/unit/get_charge_unit_conversion.py
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
from typing import Any, Dict, Optional, Union, cast
|
||||||
|
|
||||||
|
import httpx
|
||||||
|
|
||||||
|
from ...client import Client
|
||||||
|
from ...models.unit_charge_conversion import UnitChargeConversion
|
||||||
|
from ...models.error import Error
|
||||||
|
from ...models.unit_charge_format import UnitChargeFormat
|
||||||
|
from ...models.unit_charge_format import UnitChargeFormat
|
||||||
|
from ...types import Response
|
||||||
|
|
||||||
|
def _get_kwargs(
|
||||||
|
output_format: UnitChargeFormat,
|
||||||
|
src_format: UnitChargeFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Dict[str, Any]:
|
||||||
|
url = "{}/unit/conversion/charge/{src_format}/{output_format}?value={value}".format(client.base_url, output_format=output_format, src_format=src_format, value=value)
|
||||||
|
|
||||||
|
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, UnitChargeConversion, Error]]:
|
||||||
|
if response.status_code == 200:
|
||||||
|
response_200 = UnitChargeConversion.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, UnitChargeConversion, Error]]:
|
||||||
|
return Response(
|
||||||
|
status_code=response.status_code,
|
||||||
|
content=response.content,
|
||||||
|
headers=response.headers,
|
||||||
|
parsed=_parse_response(response=response),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def sync_detailed(
|
||||||
|
output_format: UnitChargeFormat,
|
||||||
|
src_format: UnitChargeFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, UnitChargeConversion, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
|
||||||
|
response = httpx.get(
|
||||||
|
verify=client.verify_ssl,
|
||||||
|
**kwargs,
|
||||||
|
)
|
||||||
|
|
||||||
|
return _build_response(response=response)
|
||||||
|
|
||||||
|
|
||||||
|
def sync(
|
||||||
|
output_format: UnitChargeFormat,
|
||||||
|
src_format: UnitChargeFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, UnitChargeConversion, Error]]:
|
||||||
|
""" Convert a unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
||||||
|
|
||||||
|
return sync_detailed(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
|
async def asyncio_detailed(
|
||||||
|
output_format: UnitChargeFormat,
|
||||||
|
src_format: UnitChargeFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, UnitChargeConversion, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
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(
|
||||||
|
output_format: UnitChargeFormat,
|
||||||
|
src_format: UnitChargeFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, UnitChargeConversion, Error]]:
|
||||||
|
""" Convert a unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
||||||
|
|
||||||
|
return (
|
||||||
|
await asyncio_detailed(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
).parsed
|
129
kittycad/api/unit/get_concentration_unit_conversion.py
Normal file
129
kittycad/api/unit/get_concentration_unit_conversion.py
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
from typing import Any, Dict, Optional, Union, cast
|
||||||
|
|
||||||
|
import httpx
|
||||||
|
|
||||||
|
from ...client import Client
|
||||||
|
from ...models.unit_concentration_conversion import UnitConcentrationConversion
|
||||||
|
from ...models.error import Error
|
||||||
|
from ...models.unit_concentration_format import UnitConcentrationFormat
|
||||||
|
from ...models.unit_concentration_format import UnitConcentrationFormat
|
||||||
|
from ...types import Response
|
||||||
|
|
||||||
|
def _get_kwargs(
|
||||||
|
output_format: UnitConcentrationFormat,
|
||||||
|
src_format: UnitConcentrationFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Dict[str, Any]:
|
||||||
|
url = "{}/unit/conversion/concentration/{src_format}/{output_format}?value={value}".format(client.base_url, output_format=output_format, src_format=src_format, value=value)
|
||||||
|
|
||||||
|
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, UnitConcentrationConversion, Error]]:
|
||||||
|
if response.status_code == 200:
|
||||||
|
response_200 = UnitConcentrationConversion.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, UnitConcentrationConversion, Error]]:
|
||||||
|
return Response(
|
||||||
|
status_code=response.status_code,
|
||||||
|
content=response.content,
|
||||||
|
headers=response.headers,
|
||||||
|
parsed=_parse_response(response=response),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def sync_detailed(
|
||||||
|
output_format: UnitConcentrationFormat,
|
||||||
|
src_format: UnitConcentrationFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, UnitConcentrationConversion, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
|
||||||
|
response = httpx.get(
|
||||||
|
verify=client.verify_ssl,
|
||||||
|
**kwargs,
|
||||||
|
)
|
||||||
|
|
||||||
|
return _build_response(response=response)
|
||||||
|
|
||||||
|
|
||||||
|
def sync(
|
||||||
|
output_format: UnitConcentrationFormat,
|
||||||
|
src_format: UnitConcentrationFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, UnitConcentrationConversion, Error]]:
|
||||||
|
""" Convert a unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
||||||
|
|
||||||
|
return sync_detailed(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
|
async def asyncio_detailed(
|
||||||
|
output_format: UnitConcentrationFormat,
|
||||||
|
src_format: UnitConcentrationFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, UnitConcentrationConversion, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
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(
|
||||||
|
output_format: UnitConcentrationFormat,
|
||||||
|
src_format: UnitConcentrationFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, UnitConcentrationConversion, Error]]:
|
||||||
|
""" Convert a unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
||||||
|
|
||||||
|
return (
|
||||||
|
await asyncio_detailed(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
).parsed
|
129
kittycad/api/unit/get_data_transfer_rate_unit_conversion.py
Normal file
129
kittycad/api/unit/get_data_transfer_rate_unit_conversion.py
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
from typing import Any, Dict, Optional, Union, cast
|
||||||
|
|
||||||
|
import httpx
|
||||||
|
|
||||||
|
from ...client import Client
|
||||||
|
from ...models.unit_data_transfer_rate_conversion import UnitDataTransferRateConversion
|
||||||
|
from ...models.error import Error
|
||||||
|
from ...models.unit_data_transfer_rate_format import UnitDataTransferRateFormat
|
||||||
|
from ...models.unit_data_transfer_rate_format import UnitDataTransferRateFormat
|
||||||
|
from ...types import Response
|
||||||
|
|
||||||
|
def _get_kwargs(
|
||||||
|
output_format: UnitDataTransferRateFormat,
|
||||||
|
src_format: UnitDataTransferRateFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Dict[str, Any]:
|
||||||
|
url = "{}/unit/conversion/data-transfer-rate/{src_format}/{output_format}?value={value}".format(client.base_url, output_format=output_format, src_format=src_format, value=value)
|
||||||
|
|
||||||
|
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, UnitDataTransferRateConversion, Error]]:
|
||||||
|
if response.status_code == 200:
|
||||||
|
response_200 = UnitDataTransferRateConversion.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, UnitDataTransferRateConversion, Error]]:
|
||||||
|
return Response(
|
||||||
|
status_code=response.status_code,
|
||||||
|
content=response.content,
|
||||||
|
headers=response.headers,
|
||||||
|
parsed=_parse_response(response=response),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def sync_detailed(
|
||||||
|
output_format: UnitDataTransferRateFormat,
|
||||||
|
src_format: UnitDataTransferRateFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, UnitDataTransferRateConversion, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
|
||||||
|
response = httpx.get(
|
||||||
|
verify=client.verify_ssl,
|
||||||
|
**kwargs,
|
||||||
|
)
|
||||||
|
|
||||||
|
return _build_response(response=response)
|
||||||
|
|
||||||
|
|
||||||
|
def sync(
|
||||||
|
output_format: UnitDataTransferRateFormat,
|
||||||
|
src_format: UnitDataTransferRateFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, UnitDataTransferRateConversion, Error]]:
|
||||||
|
""" Convert a unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
||||||
|
|
||||||
|
return sync_detailed(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
|
async def asyncio_detailed(
|
||||||
|
output_format: UnitDataTransferRateFormat,
|
||||||
|
src_format: UnitDataTransferRateFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, UnitDataTransferRateConversion, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
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(
|
||||||
|
output_format: UnitDataTransferRateFormat,
|
||||||
|
src_format: UnitDataTransferRateFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, UnitDataTransferRateConversion, Error]]:
|
||||||
|
""" Convert a unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
||||||
|
|
||||||
|
return (
|
||||||
|
await asyncio_detailed(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
).parsed
|
129
kittycad/api/unit/get_data_unit_conversion.py
Normal file
129
kittycad/api/unit/get_data_unit_conversion.py
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
from typing import Any, Dict, Optional, Union, cast
|
||||||
|
|
||||||
|
import httpx
|
||||||
|
|
||||||
|
from ...client import Client
|
||||||
|
from ...models.unit_data_conversion import UnitDataConversion
|
||||||
|
from ...models.error import Error
|
||||||
|
from ...models.unit_data_format import UnitDataFormat
|
||||||
|
from ...models.unit_data_format import UnitDataFormat
|
||||||
|
from ...types import Response
|
||||||
|
|
||||||
|
def _get_kwargs(
|
||||||
|
output_format: UnitDataFormat,
|
||||||
|
src_format: UnitDataFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Dict[str, Any]:
|
||||||
|
url = "{}/unit/conversion/data/{src_format}/{output_format}?value={value}".format(client.base_url, output_format=output_format, src_format=src_format, value=value)
|
||||||
|
|
||||||
|
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, UnitDataConversion, Error]]:
|
||||||
|
if response.status_code == 200:
|
||||||
|
response_200 = UnitDataConversion.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, UnitDataConversion, Error]]:
|
||||||
|
return Response(
|
||||||
|
status_code=response.status_code,
|
||||||
|
content=response.content,
|
||||||
|
headers=response.headers,
|
||||||
|
parsed=_parse_response(response=response),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def sync_detailed(
|
||||||
|
output_format: UnitDataFormat,
|
||||||
|
src_format: UnitDataFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, UnitDataConversion, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
|
||||||
|
response = httpx.get(
|
||||||
|
verify=client.verify_ssl,
|
||||||
|
**kwargs,
|
||||||
|
)
|
||||||
|
|
||||||
|
return _build_response(response=response)
|
||||||
|
|
||||||
|
|
||||||
|
def sync(
|
||||||
|
output_format: UnitDataFormat,
|
||||||
|
src_format: UnitDataFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, UnitDataConversion, Error]]:
|
||||||
|
""" Convert a unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
||||||
|
|
||||||
|
return sync_detailed(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
|
async def asyncio_detailed(
|
||||||
|
output_format: UnitDataFormat,
|
||||||
|
src_format: UnitDataFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, UnitDataConversion, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
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(
|
||||||
|
output_format: UnitDataFormat,
|
||||||
|
src_format: UnitDataFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, UnitDataConversion, Error]]:
|
||||||
|
""" Convert a unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
||||||
|
|
||||||
|
return (
|
||||||
|
await asyncio_detailed(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
).parsed
|
129
kittycad/api/unit/get_density_unit_conversion.py
Normal file
129
kittycad/api/unit/get_density_unit_conversion.py
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
from typing import Any, Dict, Optional, Union, cast
|
||||||
|
|
||||||
|
import httpx
|
||||||
|
|
||||||
|
from ...client import Client
|
||||||
|
from ...models.unit_density_conversion import UnitDensityConversion
|
||||||
|
from ...models.error import Error
|
||||||
|
from ...models.unit_density_format import UnitDensityFormat
|
||||||
|
from ...models.unit_density_format import UnitDensityFormat
|
||||||
|
from ...types import Response
|
||||||
|
|
||||||
|
def _get_kwargs(
|
||||||
|
output_format: UnitDensityFormat,
|
||||||
|
src_format: UnitDensityFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Dict[str, Any]:
|
||||||
|
url = "{}/unit/conversion/density/{src_format}/{output_format}?value={value}".format(client.base_url, output_format=output_format, src_format=src_format, value=value)
|
||||||
|
|
||||||
|
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, UnitDensityConversion, Error]]:
|
||||||
|
if response.status_code == 200:
|
||||||
|
response_200 = UnitDensityConversion.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, UnitDensityConversion, Error]]:
|
||||||
|
return Response(
|
||||||
|
status_code=response.status_code,
|
||||||
|
content=response.content,
|
||||||
|
headers=response.headers,
|
||||||
|
parsed=_parse_response(response=response),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def sync_detailed(
|
||||||
|
output_format: UnitDensityFormat,
|
||||||
|
src_format: UnitDensityFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, UnitDensityConversion, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
|
||||||
|
response = httpx.get(
|
||||||
|
verify=client.verify_ssl,
|
||||||
|
**kwargs,
|
||||||
|
)
|
||||||
|
|
||||||
|
return _build_response(response=response)
|
||||||
|
|
||||||
|
|
||||||
|
def sync(
|
||||||
|
output_format: UnitDensityFormat,
|
||||||
|
src_format: UnitDensityFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, UnitDensityConversion, Error]]:
|
||||||
|
""" Convert a unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
||||||
|
|
||||||
|
return sync_detailed(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
|
async def asyncio_detailed(
|
||||||
|
output_format: UnitDensityFormat,
|
||||||
|
src_format: UnitDensityFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, UnitDensityConversion, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
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(
|
||||||
|
output_format: UnitDensityFormat,
|
||||||
|
src_format: UnitDensityFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, UnitDensityConversion, Error]]:
|
||||||
|
""" Convert a unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
||||||
|
|
||||||
|
return (
|
||||||
|
await asyncio_detailed(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
).parsed
|
129
kittycad/api/unit/get_energy_unit_conversion.py
Normal file
129
kittycad/api/unit/get_energy_unit_conversion.py
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
from typing import Any, Dict, Optional, Union, cast
|
||||||
|
|
||||||
|
import httpx
|
||||||
|
|
||||||
|
from ...client import Client
|
||||||
|
from ...models.unit_energy_conversion import UnitEnergyConversion
|
||||||
|
from ...models.error import Error
|
||||||
|
from ...models.unit_energy_format import UnitEnergyFormat
|
||||||
|
from ...models.unit_energy_format import UnitEnergyFormat
|
||||||
|
from ...types import Response
|
||||||
|
|
||||||
|
def _get_kwargs(
|
||||||
|
output_format: UnitEnergyFormat,
|
||||||
|
src_format: UnitEnergyFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Dict[str, Any]:
|
||||||
|
url = "{}/unit/conversion/energy/{src_format}/{output_format}?value={value}".format(client.base_url, output_format=output_format, src_format=src_format, value=value)
|
||||||
|
|
||||||
|
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, UnitEnergyConversion, Error]]:
|
||||||
|
if response.status_code == 200:
|
||||||
|
response_200 = UnitEnergyConversion.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, UnitEnergyConversion, Error]]:
|
||||||
|
return Response(
|
||||||
|
status_code=response.status_code,
|
||||||
|
content=response.content,
|
||||||
|
headers=response.headers,
|
||||||
|
parsed=_parse_response(response=response),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def sync_detailed(
|
||||||
|
output_format: UnitEnergyFormat,
|
||||||
|
src_format: UnitEnergyFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, UnitEnergyConversion, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
|
||||||
|
response = httpx.get(
|
||||||
|
verify=client.verify_ssl,
|
||||||
|
**kwargs,
|
||||||
|
)
|
||||||
|
|
||||||
|
return _build_response(response=response)
|
||||||
|
|
||||||
|
|
||||||
|
def sync(
|
||||||
|
output_format: UnitEnergyFormat,
|
||||||
|
src_format: UnitEnergyFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, UnitEnergyConversion, Error]]:
|
||||||
|
""" Convert a unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
||||||
|
|
||||||
|
return sync_detailed(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
|
async def asyncio_detailed(
|
||||||
|
output_format: UnitEnergyFormat,
|
||||||
|
src_format: UnitEnergyFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, UnitEnergyConversion, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
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(
|
||||||
|
output_format: UnitEnergyFormat,
|
||||||
|
src_format: UnitEnergyFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, UnitEnergyConversion, Error]]:
|
||||||
|
""" Convert a unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
||||||
|
|
||||||
|
return (
|
||||||
|
await asyncio_detailed(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
).parsed
|
129
kittycad/api/unit/get_force_unit_conversion.py
Normal file
129
kittycad/api/unit/get_force_unit_conversion.py
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
from typing import Any, Dict, Optional, Union, cast
|
||||||
|
|
||||||
|
import httpx
|
||||||
|
|
||||||
|
from ...client import Client
|
||||||
|
from ...models.unit_force_conversion import UnitForceConversion
|
||||||
|
from ...models.error import Error
|
||||||
|
from ...models.unit_force_format import UnitForceFormat
|
||||||
|
from ...models.unit_force_format import UnitForceFormat
|
||||||
|
from ...types import Response
|
||||||
|
|
||||||
|
def _get_kwargs(
|
||||||
|
output_format: UnitForceFormat,
|
||||||
|
src_format: UnitForceFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Dict[str, Any]:
|
||||||
|
url = "{}/unit/conversion/force/{src_format}/{output_format}?value={value}".format(client.base_url, output_format=output_format, src_format=src_format, value=value)
|
||||||
|
|
||||||
|
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, UnitForceConversion, Error]]:
|
||||||
|
if response.status_code == 200:
|
||||||
|
response_200 = UnitForceConversion.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, UnitForceConversion, Error]]:
|
||||||
|
return Response(
|
||||||
|
status_code=response.status_code,
|
||||||
|
content=response.content,
|
||||||
|
headers=response.headers,
|
||||||
|
parsed=_parse_response(response=response),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def sync_detailed(
|
||||||
|
output_format: UnitForceFormat,
|
||||||
|
src_format: UnitForceFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, UnitForceConversion, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
|
||||||
|
response = httpx.get(
|
||||||
|
verify=client.verify_ssl,
|
||||||
|
**kwargs,
|
||||||
|
)
|
||||||
|
|
||||||
|
return _build_response(response=response)
|
||||||
|
|
||||||
|
|
||||||
|
def sync(
|
||||||
|
output_format: UnitForceFormat,
|
||||||
|
src_format: UnitForceFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, UnitForceConversion, Error]]:
|
||||||
|
""" Convert a unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
||||||
|
|
||||||
|
return sync_detailed(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
|
async def asyncio_detailed(
|
||||||
|
output_format: UnitForceFormat,
|
||||||
|
src_format: UnitForceFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, UnitForceConversion, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
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(
|
||||||
|
output_format: UnitForceFormat,
|
||||||
|
src_format: UnitForceFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, UnitForceConversion, Error]]:
|
||||||
|
""" Convert a unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
||||||
|
|
||||||
|
return (
|
||||||
|
await asyncio_detailed(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
).parsed
|
129
kittycad/api/unit/get_illuminance_unit_conversion.py
Normal file
129
kittycad/api/unit/get_illuminance_unit_conversion.py
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
from typing import Any, Dict, Optional, Union, cast
|
||||||
|
|
||||||
|
import httpx
|
||||||
|
|
||||||
|
from ...client import Client
|
||||||
|
from ...models.unit_illuminance_conversion import UnitIlluminanceConversion
|
||||||
|
from ...models.error import Error
|
||||||
|
from ...models.unit_illuminance_format import UnitIlluminanceFormat
|
||||||
|
from ...models.unit_illuminance_format import UnitIlluminanceFormat
|
||||||
|
from ...types import Response
|
||||||
|
|
||||||
|
def _get_kwargs(
|
||||||
|
output_format: UnitIlluminanceFormat,
|
||||||
|
src_format: UnitIlluminanceFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Dict[str, Any]:
|
||||||
|
url = "{}/unit/conversion/illuminance/{src_format}/{output_format}?value={value}".format(client.base_url, output_format=output_format, src_format=src_format, value=value)
|
||||||
|
|
||||||
|
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, UnitIlluminanceConversion, Error]]:
|
||||||
|
if response.status_code == 200:
|
||||||
|
response_200 = UnitIlluminanceConversion.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, UnitIlluminanceConversion, Error]]:
|
||||||
|
return Response(
|
||||||
|
status_code=response.status_code,
|
||||||
|
content=response.content,
|
||||||
|
headers=response.headers,
|
||||||
|
parsed=_parse_response(response=response),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def sync_detailed(
|
||||||
|
output_format: UnitIlluminanceFormat,
|
||||||
|
src_format: UnitIlluminanceFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, UnitIlluminanceConversion, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
|
||||||
|
response = httpx.get(
|
||||||
|
verify=client.verify_ssl,
|
||||||
|
**kwargs,
|
||||||
|
)
|
||||||
|
|
||||||
|
return _build_response(response=response)
|
||||||
|
|
||||||
|
|
||||||
|
def sync(
|
||||||
|
output_format: UnitIlluminanceFormat,
|
||||||
|
src_format: UnitIlluminanceFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, UnitIlluminanceConversion, Error]]:
|
||||||
|
""" Convert a unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
||||||
|
|
||||||
|
return sync_detailed(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
|
async def asyncio_detailed(
|
||||||
|
output_format: UnitIlluminanceFormat,
|
||||||
|
src_format: UnitIlluminanceFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, UnitIlluminanceConversion, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
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(
|
||||||
|
output_format: UnitIlluminanceFormat,
|
||||||
|
src_format: UnitIlluminanceFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, UnitIlluminanceConversion, Error]]:
|
||||||
|
""" Convert a unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
||||||
|
|
||||||
|
return (
|
||||||
|
await asyncio_detailed(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
).parsed
|
129
kittycad/api/unit/get_length_unit_conversion.py
Normal file
129
kittycad/api/unit/get_length_unit_conversion.py
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
from typing import Any, Dict, Optional, Union, cast
|
||||||
|
|
||||||
|
import httpx
|
||||||
|
|
||||||
|
from ...client import Client
|
||||||
|
from ...models.unit_length_conversion import UnitLengthConversion
|
||||||
|
from ...models.error import Error
|
||||||
|
from ...models.unit_length_format import UnitLengthFormat
|
||||||
|
from ...models.unit_length_format import UnitLengthFormat
|
||||||
|
from ...types import Response
|
||||||
|
|
||||||
|
def _get_kwargs(
|
||||||
|
output_format: UnitLengthFormat,
|
||||||
|
src_format: UnitLengthFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Dict[str, Any]:
|
||||||
|
url = "{}/unit/conversion/length/{src_format}/{output_format}?value={value}".format(client.base_url, output_format=output_format, src_format=src_format, value=value)
|
||||||
|
|
||||||
|
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, UnitLengthConversion, Error]]:
|
||||||
|
if response.status_code == 200:
|
||||||
|
response_200 = UnitLengthConversion.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, UnitLengthConversion, Error]]:
|
||||||
|
return Response(
|
||||||
|
status_code=response.status_code,
|
||||||
|
content=response.content,
|
||||||
|
headers=response.headers,
|
||||||
|
parsed=_parse_response(response=response),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def sync_detailed(
|
||||||
|
output_format: UnitLengthFormat,
|
||||||
|
src_format: UnitLengthFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, UnitLengthConversion, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
|
||||||
|
response = httpx.get(
|
||||||
|
verify=client.verify_ssl,
|
||||||
|
**kwargs,
|
||||||
|
)
|
||||||
|
|
||||||
|
return _build_response(response=response)
|
||||||
|
|
||||||
|
|
||||||
|
def sync(
|
||||||
|
output_format: UnitLengthFormat,
|
||||||
|
src_format: UnitLengthFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, UnitLengthConversion, Error]]:
|
||||||
|
""" Convert a unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
||||||
|
|
||||||
|
return sync_detailed(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
|
async def asyncio_detailed(
|
||||||
|
output_format: UnitLengthFormat,
|
||||||
|
src_format: UnitLengthFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, UnitLengthConversion, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
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(
|
||||||
|
output_format: UnitLengthFormat,
|
||||||
|
src_format: UnitLengthFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, UnitLengthConversion, Error]]:
|
||||||
|
""" Convert a unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
||||||
|
|
||||||
|
return (
|
||||||
|
await asyncio_detailed(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
).parsed
|
129
kittycad/api/unit/get_magnetic_field_strength_unit_conversion.py
Normal file
129
kittycad/api/unit/get_magnetic_field_strength_unit_conversion.py
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
from typing import Any, Dict, Optional, Union, cast
|
||||||
|
|
||||||
|
import httpx
|
||||||
|
|
||||||
|
from ...client import Client
|
||||||
|
from ...models.unit_magnetic_field_strength_conversion import UnitMagneticFieldStrengthConversion
|
||||||
|
from ...models.error import Error
|
||||||
|
from ...models.unit_magnetic_field_strength_format import UnitMagneticFieldStrengthFormat
|
||||||
|
from ...models.unit_magnetic_field_strength_format import UnitMagneticFieldStrengthFormat
|
||||||
|
from ...types import Response
|
||||||
|
|
||||||
|
def _get_kwargs(
|
||||||
|
output_format: UnitMagneticFieldStrengthFormat,
|
||||||
|
src_format: UnitMagneticFieldStrengthFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Dict[str, Any]:
|
||||||
|
url = "{}/unit/conversion/magnetic-field-strength/{src_format}/{output_format}?value={value}".format(client.base_url, output_format=output_format, src_format=src_format, value=value)
|
||||||
|
|
||||||
|
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, UnitMagneticFieldStrengthConversion, Error]]:
|
||||||
|
if response.status_code == 200:
|
||||||
|
response_200 = UnitMagneticFieldStrengthConversion.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, UnitMagneticFieldStrengthConversion, Error]]:
|
||||||
|
return Response(
|
||||||
|
status_code=response.status_code,
|
||||||
|
content=response.content,
|
||||||
|
headers=response.headers,
|
||||||
|
parsed=_parse_response(response=response),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def sync_detailed(
|
||||||
|
output_format: UnitMagneticFieldStrengthFormat,
|
||||||
|
src_format: UnitMagneticFieldStrengthFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, UnitMagneticFieldStrengthConversion, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
|
||||||
|
response = httpx.get(
|
||||||
|
verify=client.verify_ssl,
|
||||||
|
**kwargs,
|
||||||
|
)
|
||||||
|
|
||||||
|
return _build_response(response=response)
|
||||||
|
|
||||||
|
|
||||||
|
def sync(
|
||||||
|
output_format: UnitMagneticFieldStrengthFormat,
|
||||||
|
src_format: UnitMagneticFieldStrengthFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, UnitMagneticFieldStrengthConversion, Error]]:
|
||||||
|
""" Convert a unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
||||||
|
|
||||||
|
return sync_detailed(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
|
async def asyncio_detailed(
|
||||||
|
output_format: UnitMagneticFieldStrengthFormat,
|
||||||
|
src_format: UnitMagneticFieldStrengthFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, UnitMagneticFieldStrengthConversion, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
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(
|
||||||
|
output_format: UnitMagneticFieldStrengthFormat,
|
||||||
|
src_format: UnitMagneticFieldStrengthFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, UnitMagneticFieldStrengthConversion, Error]]:
|
||||||
|
""" Convert a unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
||||||
|
|
||||||
|
return (
|
||||||
|
await asyncio_detailed(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
).parsed
|
129
kittycad/api/unit/get_magnetic_flux_unit_conversion.py
Normal file
129
kittycad/api/unit/get_magnetic_flux_unit_conversion.py
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
from typing import Any, Dict, Optional, Union, cast
|
||||||
|
|
||||||
|
import httpx
|
||||||
|
|
||||||
|
from ...client import Client
|
||||||
|
from ...models.unit_magnetic_flux_conversion import UnitMagneticFluxConversion
|
||||||
|
from ...models.error import Error
|
||||||
|
from ...models.unit_magnetic_flux_format import UnitMagneticFluxFormat
|
||||||
|
from ...models.unit_magnetic_flux_format import UnitMagneticFluxFormat
|
||||||
|
from ...types import Response
|
||||||
|
|
||||||
|
def _get_kwargs(
|
||||||
|
output_format: UnitMagneticFluxFormat,
|
||||||
|
src_format: UnitMagneticFluxFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Dict[str, Any]:
|
||||||
|
url = "{}/unit/conversion/magnetic-flux/{src_format}/{output_format}?value={value}".format(client.base_url, output_format=output_format, src_format=src_format, value=value)
|
||||||
|
|
||||||
|
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, UnitMagneticFluxConversion, Error]]:
|
||||||
|
if response.status_code == 200:
|
||||||
|
response_200 = UnitMagneticFluxConversion.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, UnitMagneticFluxConversion, Error]]:
|
||||||
|
return Response(
|
||||||
|
status_code=response.status_code,
|
||||||
|
content=response.content,
|
||||||
|
headers=response.headers,
|
||||||
|
parsed=_parse_response(response=response),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def sync_detailed(
|
||||||
|
output_format: UnitMagneticFluxFormat,
|
||||||
|
src_format: UnitMagneticFluxFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, UnitMagneticFluxConversion, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
|
||||||
|
response = httpx.get(
|
||||||
|
verify=client.verify_ssl,
|
||||||
|
**kwargs,
|
||||||
|
)
|
||||||
|
|
||||||
|
return _build_response(response=response)
|
||||||
|
|
||||||
|
|
||||||
|
def sync(
|
||||||
|
output_format: UnitMagneticFluxFormat,
|
||||||
|
src_format: UnitMagneticFluxFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, UnitMagneticFluxConversion, Error]]:
|
||||||
|
""" Convert a unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
||||||
|
|
||||||
|
return sync_detailed(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
|
async def asyncio_detailed(
|
||||||
|
output_format: UnitMagneticFluxFormat,
|
||||||
|
src_format: UnitMagneticFluxFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, UnitMagneticFluxConversion, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
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(
|
||||||
|
output_format: UnitMagneticFluxFormat,
|
||||||
|
src_format: UnitMagneticFluxFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, UnitMagneticFluxConversion, Error]]:
|
||||||
|
""" Convert a unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
||||||
|
|
||||||
|
return (
|
||||||
|
await asyncio_detailed(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
).parsed
|
129
kittycad/api/unit/get_mass_unit_conversion.py
Normal file
129
kittycad/api/unit/get_mass_unit_conversion.py
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
from typing import Any, Dict, Optional, Union, cast
|
||||||
|
|
||||||
|
import httpx
|
||||||
|
|
||||||
|
from ...client import Client
|
||||||
|
from ...models.unit_mass_conversion import UnitMassConversion
|
||||||
|
from ...models.error import Error
|
||||||
|
from ...models.unit_mass_format import UnitMassFormat
|
||||||
|
from ...models.unit_mass_format import UnitMassFormat
|
||||||
|
from ...types import Response
|
||||||
|
|
||||||
|
def _get_kwargs(
|
||||||
|
output_format: UnitMassFormat,
|
||||||
|
src_format: UnitMassFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Dict[str, Any]:
|
||||||
|
url = "{}/unit/conversion/mass/{src_format}/{output_format}?value={value}".format(client.base_url, output_format=output_format, src_format=src_format, value=value)
|
||||||
|
|
||||||
|
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, UnitMassConversion, Error]]:
|
||||||
|
if response.status_code == 200:
|
||||||
|
response_200 = UnitMassConversion.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, UnitMassConversion, Error]]:
|
||||||
|
return Response(
|
||||||
|
status_code=response.status_code,
|
||||||
|
content=response.content,
|
||||||
|
headers=response.headers,
|
||||||
|
parsed=_parse_response(response=response),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def sync_detailed(
|
||||||
|
output_format: UnitMassFormat,
|
||||||
|
src_format: UnitMassFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, UnitMassConversion, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
|
||||||
|
response = httpx.get(
|
||||||
|
verify=client.verify_ssl,
|
||||||
|
**kwargs,
|
||||||
|
)
|
||||||
|
|
||||||
|
return _build_response(response=response)
|
||||||
|
|
||||||
|
|
||||||
|
def sync(
|
||||||
|
output_format: UnitMassFormat,
|
||||||
|
src_format: UnitMassFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, UnitMassConversion, Error]]:
|
||||||
|
""" Convert a unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
||||||
|
|
||||||
|
return sync_detailed(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
|
async def asyncio_detailed(
|
||||||
|
output_format: UnitMassFormat,
|
||||||
|
src_format: UnitMassFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, UnitMassConversion, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
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(
|
||||||
|
output_format: UnitMassFormat,
|
||||||
|
src_format: UnitMassFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, UnitMassConversion, Error]]:
|
||||||
|
""" Convert a unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
||||||
|
|
||||||
|
return (
|
||||||
|
await asyncio_detailed(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
).parsed
|
@ -3,7 +3,7 @@ from typing import Any, Dict, Optional, Union, cast
|
|||||||
import httpx
|
import httpx
|
||||||
|
|
||||||
from ...client import Client
|
from ...client import Client
|
||||||
from ...models.unit_conversion import UnitConversion
|
from ...models.unit_metric_conversion import UnitMetricConversion
|
||||||
from ...models.error import Error
|
from ...models.error import Error
|
||||||
from ...models.unit_metric_format import UnitMetricFormat
|
from ...models.unit_metric_format import UnitMetricFormat
|
||||||
from ...models.unit_metric_format import UnitMetricFormat
|
from ...models.unit_metric_format import UnitMetricFormat
|
||||||
@ -16,7 +16,7 @@ def _get_kwargs(
|
|||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Dict[str, Any]:
|
) -> Dict[str, Any]:
|
||||||
url = "{}/unit/conversion/{src_format}/{output_format}?value={value}".format(client.base_url, output_format=output_format, src_format=src_format, value=value)
|
url = "{}/unit/conversion/metric/{src_format}/{output_format}?value={value}".format(client.base_url, output_format=output_format, src_format=src_format, value=value)
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
headers: Dict[str, Any] = client.get_headers()
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
cookies: Dict[str, Any] = client.get_cookies()
|
||||||
@ -29,10 +29,10 @@ def _get_kwargs(
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, UnitConversion, Error]]:
|
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, UnitMetricConversion, Error]]:
|
||||||
if response.status_code == 201:
|
if response.status_code == 200:
|
||||||
response_201 = UnitConversion.from_dict(response.json())
|
response_200 = UnitMetricConversion.from_dict(response.json())
|
||||||
return response_201
|
return response_200
|
||||||
if response.status_code == 400:
|
if response.status_code == 400:
|
||||||
response_4XX = Error.from_dict(response.json())
|
response_4XX = Error.from_dict(response.json())
|
||||||
return response_4XX
|
return response_4XX
|
||||||
@ -42,7 +42,7 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, UnitConv
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
def _build_response(*, response: httpx.Response) -> Response[Union[Any, UnitConversion, Error]]:
|
def _build_response(*, response: httpx.Response) -> Response[Union[Any, UnitMetricConversion, Error]]:
|
||||||
return Response(
|
return Response(
|
||||||
status_code=response.status_code,
|
status_code=response.status_code,
|
||||||
content=response.content,
|
content=response.content,
|
||||||
@ -57,7 +57,7 @@ def sync_detailed(
|
|||||||
value: float,
|
value: float,
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Union[Any, UnitConversion, Error]]:
|
) -> Response[Union[Any, UnitMetricConversion, Error]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
output_format=output_format,
|
output_format=output_format,
|
||||||
src_format=src_format,
|
src_format=src_format,
|
||||||
@ -65,7 +65,7 @@ def sync_detailed(
|
|||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
response = httpx.post(
|
response = httpx.get(
|
||||||
verify=client.verify_ssl,
|
verify=client.verify_ssl,
|
||||||
**kwargs,
|
**kwargs,
|
||||||
)
|
)
|
||||||
@ -79,8 +79,8 @@ def sync(
|
|||||||
value: float,
|
value: float,
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Union[Any, UnitConversion, Error]]:
|
) -> Optional[Union[Any, UnitMetricConversion, Error]]:
|
||||||
""" Convert a metric unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
""" Convert a unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
||||||
|
|
||||||
return sync_detailed(
|
return sync_detailed(
|
||||||
output_format=output_format,
|
output_format=output_format,
|
||||||
@ -96,7 +96,7 @@ async def asyncio_detailed(
|
|||||||
value: float,
|
value: float,
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Response[Union[Any, UnitConversion, Error]]:
|
) -> Response[Union[Any, UnitMetricConversion, Error]]:
|
||||||
kwargs = _get_kwargs(
|
kwargs = _get_kwargs(
|
||||||
output_format=output_format,
|
output_format=output_format,
|
||||||
src_format=src_format,
|
src_format=src_format,
|
||||||
@ -105,7 +105,7 @@ async def asyncio_detailed(
|
|||||||
)
|
)
|
||||||
|
|
||||||
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
||||||
response = await _client.post(**kwargs)
|
response = await _client.get(**kwargs)
|
||||||
|
|
||||||
return _build_response(response=response)
|
return _build_response(response=response)
|
||||||
|
|
||||||
@ -116,8 +116,8 @@ async def asyncio(
|
|||||||
value: float,
|
value: float,
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Union[Any, UnitConversion, Error]]:
|
) -> Optional[Union[Any, UnitMetricConversion, Error]]:
|
||||||
""" Convert a metric unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
""" Convert a unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
||||||
|
|
||||||
return (
|
return (
|
||||||
await asyncio_detailed(
|
await asyncio_detailed(
|
129
kittycad/api/unit/get_power_unit_conversion.py
Normal file
129
kittycad/api/unit/get_power_unit_conversion.py
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
from typing import Any, Dict, Optional, Union, cast
|
||||||
|
|
||||||
|
import httpx
|
||||||
|
|
||||||
|
from ...client import Client
|
||||||
|
from ...models.unit_power_conversion import UnitPowerConversion
|
||||||
|
from ...models.error import Error
|
||||||
|
from ...models.unit_power_format import UnitPowerFormat
|
||||||
|
from ...models.unit_power_format import UnitPowerFormat
|
||||||
|
from ...types import Response
|
||||||
|
|
||||||
|
def _get_kwargs(
|
||||||
|
output_format: UnitPowerFormat,
|
||||||
|
src_format: UnitPowerFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Dict[str, Any]:
|
||||||
|
url = "{}/unit/conversion/power/{src_format}/{output_format}?value={value}".format(client.base_url, output_format=output_format, src_format=src_format, value=value)
|
||||||
|
|
||||||
|
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, UnitPowerConversion, Error]]:
|
||||||
|
if response.status_code == 200:
|
||||||
|
response_200 = UnitPowerConversion.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, UnitPowerConversion, Error]]:
|
||||||
|
return Response(
|
||||||
|
status_code=response.status_code,
|
||||||
|
content=response.content,
|
||||||
|
headers=response.headers,
|
||||||
|
parsed=_parse_response(response=response),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def sync_detailed(
|
||||||
|
output_format: UnitPowerFormat,
|
||||||
|
src_format: UnitPowerFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, UnitPowerConversion, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
|
||||||
|
response = httpx.get(
|
||||||
|
verify=client.verify_ssl,
|
||||||
|
**kwargs,
|
||||||
|
)
|
||||||
|
|
||||||
|
return _build_response(response=response)
|
||||||
|
|
||||||
|
|
||||||
|
def sync(
|
||||||
|
output_format: UnitPowerFormat,
|
||||||
|
src_format: UnitPowerFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, UnitPowerConversion, Error]]:
|
||||||
|
""" Convert a unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
||||||
|
|
||||||
|
return sync_detailed(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
|
async def asyncio_detailed(
|
||||||
|
output_format: UnitPowerFormat,
|
||||||
|
src_format: UnitPowerFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, UnitPowerConversion, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
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(
|
||||||
|
output_format: UnitPowerFormat,
|
||||||
|
src_format: UnitPowerFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, UnitPowerConversion, Error]]:
|
||||||
|
""" Convert a unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
||||||
|
|
||||||
|
return (
|
||||||
|
await asyncio_detailed(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
).parsed
|
129
kittycad/api/unit/get_pressure_unit_conversion.py
Normal file
129
kittycad/api/unit/get_pressure_unit_conversion.py
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
from typing import Any, Dict, Optional, Union, cast
|
||||||
|
|
||||||
|
import httpx
|
||||||
|
|
||||||
|
from ...client import Client
|
||||||
|
from ...models.unit_pressure_conversion import UnitPressureConversion
|
||||||
|
from ...models.error import Error
|
||||||
|
from ...models.unit_pressure_format import UnitPressureFormat
|
||||||
|
from ...models.unit_pressure_format import UnitPressureFormat
|
||||||
|
from ...types import Response
|
||||||
|
|
||||||
|
def _get_kwargs(
|
||||||
|
output_format: UnitPressureFormat,
|
||||||
|
src_format: UnitPressureFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Dict[str, Any]:
|
||||||
|
url = "{}/unit/conversion/pressure/{src_format}/{output_format}?value={value}".format(client.base_url, output_format=output_format, src_format=src_format, value=value)
|
||||||
|
|
||||||
|
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, UnitPressureConversion, Error]]:
|
||||||
|
if response.status_code == 200:
|
||||||
|
response_200 = UnitPressureConversion.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, UnitPressureConversion, Error]]:
|
||||||
|
return Response(
|
||||||
|
status_code=response.status_code,
|
||||||
|
content=response.content,
|
||||||
|
headers=response.headers,
|
||||||
|
parsed=_parse_response(response=response),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def sync_detailed(
|
||||||
|
output_format: UnitPressureFormat,
|
||||||
|
src_format: UnitPressureFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, UnitPressureConversion, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
|
||||||
|
response = httpx.get(
|
||||||
|
verify=client.verify_ssl,
|
||||||
|
**kwargs,
|
||||||
|
)
|
||||||
|
|
||||||
|
return _build_response(response=response)
|
||||||
|
|
||||||
|
|
||||||
|
def sync(
|
||||||
|
output_format: UnitPressureFormat,
|
||||||
|
src_format: UnitPressureFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, UnitPressureConversion, Error]]:
|
||||||
|
""" Convert a unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
||||||
|
|
||||||
|
return sync_detailed(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
|
async def asyncio_detailed(
|
||||||
|
output_format: UnitPressureFormat,
|
||||||
|
src_format: UnitPressureFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, UnitPressureConversion, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
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(
|
||||||
|
output_format: UnitPressureFormat,
|
||||||
|
src_format: UnitPressureFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, UnitPressureConversion, Error]]:
|
||||||
|
""" Convert a unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
||||||
|
|
||||||
|
return (
|
||||||
|
await asyncio_detailed(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
).parsed
|
129
kittycad/api/unit/get_radiation_unit_conversion.py
Normal file
129
kittycad/api/unit/get_radiation_unit_conversion.py
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
from typing import Any, Dict, Optional, Union, cast
|
||||||
|
|
||||||
|
import httpx
|
||||||
|
|
||||||
|
from ...client import Client
|
||||||
|
from ...models.unit_radiation_conversion import UnitRadiationConversion
|
||||||
|
from ...models.error import Error
|
||||||
|
from ...models.unit_radiation_format import UnitRadiationFormat
|
||||||
|
from ...models.unit_radiation_format import UnitRadiationFormat
|
||||||
|
from ...types import Response
|
||||||
|
|
||||||
|
def _get_kwargs(
|
||||||
|
output_format: UnitRadiationFormat,
|
||||||
|
src_format: UnitRadiationFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Dict[str, Any]:
|
||||||
|
url = "{}/unit/conversion/radiation/{src_format}/{output_format}?value={value}".format(client.base_url, output_format=output_format, src_format=src_format, value=value)
|
||||||
|
|
||||||
|
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, UnitRadiationConversion, Error]]:
|
||||||
|
if response.status_code == 200:
|
||||||
|
response_200 = UnitRadiationConversion.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, UnitRadiationConversion, Error]]:
|
||||||
|
return Response(
|
||||||
|
status_code=response.status_code,
|
||||||
|
content=response.content,
|
||||||
|
headers=response.headers,
|
||||||
|
parsed=_parse_response(response=response),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def sync_detailed(
|
||||||
|
output_format: UnitRadiationFormat,
|
||||||
|
src_format: UnitRadiationFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, UnitRadiationConversion, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
|
||||||
|
response = httpx.get(
|
||||||
|
verify=client.verify_ssl,
|
||||||
|
**kwargs,
|
||||||
|
)
|
||||||
|
|
||||||
|
return _build_response(response=response)
|
||||||
|
|
||||||
|
|
||||||
|
def sync(
|
||||||
|
output_format: UnitRadiationFormat,
|
||||||
|
src_format: UnitRadiationFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, UnitRadiationConversion, Error]]:
|
||||||
|
""" Convert a unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
||||||
|
|
||||||
|
return sync_detailed(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
|
async def asyncio_detailed(
|
||||||
|
output_format: UnitRadiationFormat,
|
||||||
|
src_format: UnitRadiationFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, UnitRadiationConversion, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
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(
|
||||||
|
output_format: UnitRadiationFormat,
|
||||||
|
src_format: UnitRadiationFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, UnitRadiationConversion, Error]]:
|
||||||
|
""" Convert a unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
||||||
|
|
||||||
|
return (
|
||||||
|
await asyncio_detailed(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
).parsed
|
129
kittycad/api/unit/get_solid_angle_unit_conversion.py
Normal file
129
kittycad/api/unit/get_solid_angle_unit_conversion.py
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
from typing import Any, Dict, Optional, Union, cast
|
||||||
|
|
||||||
|
import httpx
|
||||||
|
|
||||||
|
from ...client import Client
|
||||||
|
from ...models.unit_solid_angle_conversion import UnitSolidAngleConversion
|
||||||
|
from ...models.error import Error
|
||||||
|
from ...models.unit_solid_angle_format import UnitSolidAngleFormat
|
||||||
|
from ...models.unit_solid_angle_format import UnitSolidAngleFormat
|
||||||
|
from ...types import Response
|
||||||
|
|
||||||
|
def _get_kwargs(
|
||||||
|
output_format: UnitSolidAngleFormat,
|
||||||
|
src_format: UnitSolidAngleFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Dict[str, Any]:
|
||||||
|
url = "{}/unit/conversion/solid-angle/{src_format}/{output_format}?value={value}".format(client.base_url, output_format=output_format, src_format=src_format, value=value)
|
||||||
|
|
||||||
|
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, UnitSolidAngleConversion, Error]]:
|
||||||
|
if response.status_code == 200:
|
||||||
|
response_200 = UnitSolidAngleConversion.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, UnitSolidAngleConversion, Error]]:
|
||||||
|
return Response(
|
||||||
|
status_code=response.status_code,
|
||||||
|
content=response.content,
|
||||||
|
headers=response.headers,
|
||||||
|
parsed=_parse_response(response=response),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def sync_detailed(
|
||||||
|
output_format: UnitSolidAngleFormat,
|
||||||
|
src_format: UnitSolidAngleFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, UnitSolidAngleConversion, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
|
||||||
|
response = httpx.get(
|
||||||
|
verify=client.verify_ssl,
|
||||||
|
**kwargs,
|
||||||
|
)
|
||||||
|
|
||||||
|
return _build_response(response=response)
|
||||||
|
|
||||||
|
|
||||||
|
def sync(
|
||||||
|
output_format: UnitSolidAngleFormat,
|
||||||
|
src_format: UnitSolidAngleFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, UnitSolidAngleConversion, Error]]:
|
||||||
|
""" Convert a unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
||||||
|
|
||||||
|
return sync_detailed(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
|
async def asyncio_detailed(
|
||||||
|
output_format: UnitSolidAngleFormat,
|
||||||
|
src_format: UnitSolidAngleFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, UnitSolidAngleConversion, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
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(
|
||||||
|
output_format: UnitSolidAngleFormat,
|
||||||
|
src_format: UnitSolidAngleFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, UnitSolidAngleConversion, Error]]:
|
||||||
|
""" Convert a unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
||||||
|
|
||||||
|
return (
|
||||||
|
await asyncio_detailed(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
).parsed
|
129
kittycad/api/unit/get_temperature_unit_conversion.py
Normal file
129
kittycad/api/unit/get_temperature_unit_conversion.py
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
from typing import Any, Dict, Optional, Union, cast
|
||||||
|
|
||||||
|
import httpx
|
||||||
|
|
||||||
|
from ...client import Client
|
||||||
|
from ...models.unit_temperature_conversion import UnitTemperatureConversion
|
||||||
|
from ...models.error import Error
|
||||||
|
from ...models.unit_temperature_format import UnitTemperatureFormat
|
||||||
|
from ...models.unit_temperature_format import UnitTemperatureFormat
|
||||||
|
from ...types import Response
|
||||||
|
|
||||||
|
def _get_kwargs(
|
||||||
|
output_format: UnitTemperatureFormat,
|
||||||
|
src_format: UnitTemperatureFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Dict[str, Any]:
|
||||||
|
url = "{}/unit/conversion/temperature/{src_format}/{output_format}?value={value}".format(client.base_url, output_format=output_format, src_format=src_format, value=value)
|
||||||
|
|
||||||
|
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, UnitTemperatureConversion, Error]]:
|
||||||
|
if response.status_code == 200:
|
||||||
|
response_200 = UnitTemperatureConversion.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, UnitTemperatureConversion, Error]]:
|
||||||
|
return Response(
|
||||||
|
status_code=response.status_code,
|
||||||
|
content=response.content,
|
||||||
|
headers=response.headers,
|
||||||
|
parsed=_parse_response(response=response),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def sync_detailed(
|
||||||
|
output_format: UnitTemperatureFormat,
|
||||||
|
src_format: UnitTemperatureFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, UnitTemperatureConversion, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
|
||||||
|
response = httpx.get(
|
||||||
|
verify=client.verify_ssl,
|
||||||
|
**kwargs,
|
||||||
|
)
|
||||||
|
|
||||||
|
return _build_response(response=response)
|
||||||
|
|
||||||
|
|
||||||
|
def sync(
|
||||||
|
output_format: UnitTemperatureFormat,
|
||||||
|
src_format: UnitTemperatureFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, UnitTemperatureConversion, Error]]:
|
||||||
|
""" Convert a unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
||||||
|
|
||||||
|
return sync_detailed(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
|
async def asyncio_detailed(
|
||||||
|
output_format: UnitTemperatureFormat,
|
||||||
|
src_format: UnitTemperatureFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, UnitTemperatureConversion, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
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(
|
||||||
|
output_format: UnitTemperatureFormat,
|
||||||
|
src_format: UnitTemperatureFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, UnitTemperatureConversion, Error]]:
|
||||||
|
""" Convert a unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
||||||
|
|
||||||
|
return (
|
||||||
|
await asyncio_detailed(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
).parsed
|
129
kittycad/api/unit/get_time_unit_conversion.py
Normal file
129
kittycad/api/unit/get_time_unit_conversion.py
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
from typing import Any, Dict, Optional, Union, cast
|
||||||
|
|
||||||
|
import httpx
|
||||||
|
|
||||||
|
from ...client import Client
|
||||||
|
from ...models.unit_time_conversion import UnitTimeConversion
|
||||||
|
from ...models.error import Error
|
||||||
|
from ...models.unit_time_format import UnitTimeFormat
|
||||||
|
from ...models.unit_time_format import UnitTimeFormat
|
||||||
|
from ...types import Response
|
||||||
|
|
||||||
|
def _get_kwargs(
|
||||||
|
output_format: UnitTimeFormat,
|
||||||
|
src_format: UnitTimeFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Dict[str, Any]:
|
||||||
|
url = "{}/unit/conversion/time/{src_format}/{output_format}?value={value}".format(client.base_url, output_format=output_format, src_format=src_format, value=value)
|
||||||
|
|
||||||
|
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, UnitTimeConversion, Error]]:
|
||||||
|
if response.status_code == 200:
|
||||||
|
response_200 = UnitTimeConversion.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, UnitTimeConversion, Error]]:
|
||||||
|
return Response(
|
||||||
|
status_code=response.status_code,
|
||||||
|
content=response.content,
|
||||||
|
headers=response.headers,
|
||||||
|
parsed=_parse_response(response=response),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def sync_detailed(
|
||||||
|
output_format: UnitTimeFormat,
|
||||||
|
src_format: UnitTimeFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, UnitTimeConversion, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
|
||||||
|
response = httpx.get(
|
||||||
|
verify=client.verify_ssl,
|
||||||
|
**kwargs,
|
||||||
|
)
|
||||||
|
|
||||||
|
return _build_response(response=response)
|
||||||
|
|
||||||
|
|
||||||
|
def sync(
|
||||||
|
output_format: UnitTimeFormat,
|
||||||
|
src_format: UnitTimeFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, UnitTimeConversion, Error]]:
|
||||||
|
""" Convert a unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
||||||
|
|
||||||
|
return sync_detailed(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
|
async def asyncio_detailed(
|
||||||
|
output_format: UnitTimeFormat,
|
||||||
|
src_format: UnitTimeFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, UnitTimeConversion, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
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(
|
||||||
|
output_format: UnitTimeFormat,
|
||||||
|
src_format: UnitTimeFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, UnitTimeConversion, Error]]:
|
||||||
|
""" Convert a unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
||||||
|
|
||||||
|
return (
|
||||||
|
await asyncio_detailed(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
).parsed
|
129
kittycad/api/unit/get_velocity_unit_conversion.py
Normal file
129
kittycad/api/unit/get_velocity_unit_conversion.py
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
from typing import Any, Dict, Optional, Union, cast
|
||||||
|
|
||||||
|
import httpx
|
||||||
|
|
||||||
|
from ...client import Client
|
||||||
|
from ...models.unit_velocity_conversion import UnitVelocityConversion
|
||||||
|
from ...models.error import Error
|
||||||
|
from ...models.unit_velocity_format import UnitVelocityFormat
|
||||||
|
from ...models.unit_velocity_format import UnitVelocityFormat
|
||||||
|
from ...types import Response
|
||||||
|
|
||||||
|
def _get_kwargs(
|
||||||
|
output_format: UnitVelocityFormat,
|
||||||
|
src_format: UnitVelocityFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Dict[str, Any]:
|
||||||
|
url = "{}/unit/conversion/velocity/{src_format}/{output_format}?value={value}".format(client.base_url, output_format=output_format, src_format=src_format, value=value)
|
||||||
|
|
||||||
|
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, UnitVelocityConversion, Error]]:
|
||||||
|
if response.status_code == 200:
|
||||||
|
response_200 = UnitVelocityConversion.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, UnitVelocityConversion, Error]]:
|
||||||
|
return Response(
|
||||||
|
status_code=response.status_code,
|
||||||
|
content=response.content,
|
||||||
|
headers=response.headers,
|
||||||
|
parsed=_parse_response(response=response),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def sync_detailed(
|
||||||
|
output_format: UnitVelocityFormat,
|
||||||
|
src_format: UnitVelocityFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, UnitVelocityConversion, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
|
||||||
|
response = httpx.get(
|
||||||
|
verify=client.verify_ssl,
|
||||||
|
**kwargs,
|
||||||
|
)
|
||||||
|
|
||||||
|
return _build_response(response=response)
|
||||||
|
|
||||||
|
|
||||||
|
def sync(
|
||||||
|
output_format: UnitVelocityFormat,
|
||||||
|
src_format: UnitVelocityFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, UnitVelocityConversion, Error]]:
|
||||||
|
""" Convert a unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
||||||
|
|
||||||
|
return sync_detailed(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
|
async def asyncio_detailed(
|
||||||
|
output_format: UnitVelocityFormat,
|
||||||
|
src_format: UnitVelocityFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, UnitVelocityConversion, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
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(
|
||||||
|
output_format: UnitVelocityFormat,
|
||||||
|
src_format: UnitVelocityFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, UnitVelocityConversion, Error]]:
|
||||||
|
""" Convert a unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
||||||
|
|
||||||
|
return (
|
||||||
|
await asyncio_detailed(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
).parsed
|
129
kittycad/api/unit/get_voltage_unit_conversion.py
Normal file
129
kittycad/api/unit/get_voltage_unit_conversion.py
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
from typing import Any, Dict, Optional, Union, cast
|
||||||
|
|
||||||
|
import httpx
|
||||||
|
|
||||||
|
from ...client import Client
|
||||||
|
from ...models.unit_voltage_conversion import UnitVoltageConversion
|
||||||
|
from ...models.error import Error
|
||||||
|
from ...models.unit_voltage_format import UnitVoltageFormat
|
||||||
|
from ...models.unit_voltage_format import UnitVoltageFormat
|
||||||
|
from ...types import Response
|
||||||
|
|
||||||
|
def _get_kwargs(
|
||||||
|
output_format: UnitVoltageFormat,
|
||||||
|
src_format: UnitVoltageFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Dict[str, Any]:
|
||||||
|
url = "{}/unit/conversion/voltage/{src_format}/{output_format}?value={value}".format(client.base_url, output_format=output_format, src_format=src_format, value=value)
|
||||||
|
|
||||||
|
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, UnitVoltageConversion, Error]]:
|
||||||
|
if response.status_code == 200:
|
||||||
|
response_200 = UnitVoltageConversion.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, UnitVoltageConversion, Error]]:
|
||||||
|
return Response(
|
||||||
|
status_code=response.status_code,
|
||||||
|
content=response.content,
|
||||||
|
headers=response.headers,
|
||||||
|
parsed=_parse_response(response=response),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def sync_detailed(
|
||||||
|
output_format: UnitVoltageFormat,
|
||||||
|
src_format: UnitVoltageFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, UnitVoltageConversion, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
|
||||||
|
response = httpx.get(
|
||||||
|
verify=client.verify_ssl,
|
||||||
|
**kwargs,
|
||||||
|
)
|
||||||
|
|
||||||
|
return _build_response(response=response)
|
||||||
|
|
||||||
|
|
||||||
|
def sync(
|
||||||
|
output_format: UnitVoltageFormat,
|
||||||
|
src_format: UnitVoltageFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, UnitVoltageConversion, Error]]:
|
||||||
|
""" Convert a unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
||||||
|
|
||||||
|
return sync_detailed(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
|
async def asyncio_detailed(
|
||||||
|
output_format: UnitVoltageFormat,
|
||||||
|
src_format: UnitVoltageFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, UnitVoltageConversion, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
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(
|
||||||
|
output_format: UnitVoltageFormat,
|
||||||
|
src_format: UnitVoltageFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, UnitVoltageConversion, Error]]:
|
||||||
|
""" Convert a unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
||||||
|
|
||||||
|
return (
|
||||||
|
await asyncio_detailed(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
).parsed
|
129
kittycad/api/unit/get_volume_unit_conversion.py
Normal file
129
kittycad/api/unit/get_volume_unit_conversion.py
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
from typing import Any, Dict, Optional, Union, cast
|
||||||
|
|
||||||
|
import httpx
|
||||||
|
|
||||||
|
from ...client import Client
|
||||||
|
from ...models.unit_volume_conversion import UnitVolumeConversion
|
||||||
|
from ...models.error import Error
|
||||||
|
from ...models.unit_volume_format import UnitVolumeFormat
|
||||||
|
from ...models.unit_volume_format import UnitVolumeFormat
|
||||||
|
from ...types import Response
|
||||||
|
|
||||||
|
def _get_kwargs(
|
||||||
|
output_format: UnitVolumeFormat,
|
||||||
|
src_format: UnitVolumeFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Dict[str, Any]:
|
||||||
|
url = "{}/unit/conversion/volume/{src_format}/{output_format}?value={value}".format(client.base_url, output_format=output_format, src_format=src_format, value=value)
|
||||||
|
|
||||||
|
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, UnitVolumeConversion, Error]]:
|
||||||
|
if response.status_code == 200:
|
||||||
|
response_200 = UnitVolumeConversion.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, UnitVolumeConversion, Error]]:
|
||||||
|
return Response(
|
||||||
|
status_code=response.status_code,
|
||||||
|
content=response.content,
|
||||||
|
headers=response.headers,
|
||||||
|
parsed=_parse_response(response=response),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def sync_detailed(
|
||||||
|
output_format: UnitVolumeFormat,
|
||||||
|
src_format: UnitVolumeFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, UnitVolumeConversion, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
|
||||||
|
response = httpx.get(
|
||||||
|
verify=client.verify_ssl,
|
||||||
|
**kwargs,
|
||||||
|
)
|
||||||
|
|
||||||
|
return _build_response(response=response)
|
||||||
|
|
||||||
|
|
||||||
|
def sync(
|
||||||
|
output_format: UnitVolumeFormat,
|
||||||
|
src_format: UnitVolumeFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, UnitVolumeConversion, Error]]:
|
||||||
|
""" Convert a unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
||||||
|
|
||||||
|
return sync_detailed(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
).parsed
|
||||||
|
|
||||||
|
|
||||||
|
async def asyncio_detailed(
|
||||||
|
output_format: UnitVolumeFormat,
|
||||||
|
src_format: UnitVolumeFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Response[Union[Any, UnitVolumeConversion, Error]]:
|
||||||
|
kwargs = _get_kwargs(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
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(
|
||||||
|
output_format: UnitVolumeFormat,
|
||||||
|
src_format: UnitVolumeFormat,
|
||||||
|
value: float,
|
||||||
|
*,
|
||||||
|
client: Client,
|
||||||
|
) -> Optional[Union[Any, UnitVolumeConversion, Error]]:
|
||||||
|
""" Convert a unit value to another metric unit value. This is a nice endpoint to use for helper functions. """
|
||||||
|
|
||||||
|
return (
|
||||||
|
await asyncio_detailed(
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
value=value,
|
||||||
|
client=client,
|
||||||
|
)
|
||||||
|
).parsed
|
@ -72,8 +72,58 @@ from .system_info_cgroup_driver_enum import SystemInfoCgroupDriverEnum
|
|||||||
from .system_info_cgroup_version_enum import SystemInfoCgroupVersionEnum
|
from .system_info_cgroup_version_enum import SystemInfoCgroupVersionEnum
|
||||||
from .system_info_default_address_pools import SystemInfoDefaultAddressPools
|
from .system_info_default_address_pools import SystemInfoDefaultAddressPools
|
||||||
from .system_info_isolation_enum import SystemInfoIsolationEnum
|
from .system_info_isolation_enum import SystemInfoIsolationEnum
|
||||||
from .unit_conversion import UnitConversion
|
from .unit_acceleration_conversion import UnitAccelerationConversion
|
||||||
|
from .unit_acceleration_format import UnitAccelerationFormat
|
||||||
|
from .unit_angle_conversion import UnitAngleConversion
|
||||||
|
from .unit_angle_format import UnitAngleFormat
|
||||||
|
from .unit_angular_velocity_conversion import UnitAngularVelocityConversion
|
||||||
|
from .unit_angular_velocity_format import UnitAngularVelocityFormat
|
||||||
|
from .unit_area_conversion import UnitAreaConversion
|
||||||
|
from .unit_area_format import UnitAreaFormat
|
||||||
|
from .unit_charge_conversion import UnitChargeConversion
|
||||||
|
from .unit_charge_format import UnitChargeFormat
|
||||||
|
from .unit_concentration_conversion import UnitConcentrationConversion
|
||||||
|
from .unit_concentration_format import UnitConcentrationFormat
|
||||||
|
from .unit_data_conversion import UnitDataConversion
|
||||||
|
from .unit_data_format import UnitDataFormat
|
||||||
|
from .unit_data_transfer_rate_conversion import UnitDataTransferRateConversion
|
||||||
|
from .unit_data_transfer_rate_format import UnitDataTransferRateFormat
|
||||||
|
from .unit_density_conversion import UnitDensityConversion
|
||||||
|
from .unit_density_format import UnitDensityFormat
|
||||||
|
from .unit_energy_conversion import UnitEnergyConversion
|
||||||
|
from .unit_energy_format import UnitEnergyFormat
|
||||||
|
from .unit_force_conversion import UnitForceConversion
|
||||||
|
from .unit_force_format import UnitForceFormat
|
||||||
|
from .unit_illuminance_conversion import UnitIlluminanceConversion
|
||||||
|
from .unit_illuminance_format import UnitIlluminanceFormat
|
||||||
|
from .unit_length_conversion import UnitLengthConversion
|
||||||
|
from .unit_length_format import UnitLengthFormat
|
||||||
|
from .unit_magnetic_field_strength_conversion import UnitMagneticFieldStrengthConversion
|
||||||
|
from .unit_magnetic_field_strength_format import UnitMagneticFieldStrengthFormat
|
||||||
|
from .unit_magnetic_flux_conversion import UnitMagneticFluxConversion
|
||||||
|
from .unit_magnetic_flux_format import UnitMagneticFluxFormat
|
||||||
|
from .unit_mass_conversion import UnitMassConversion
|
||||||
|
from .unit_mass_format import UnitMassFormat
|
||||||
|
from .unit_metric_conversion import UnitMetricConversion
|
||||||
from .unit_metric_format import UnitMetricFormat
|
from .unit_metric_format import UnitMetricFormat
|
||||||
|
from .unit_power_conversion import UnitPowerConversion
|
||||||
|
from .unit_power_format import UnitPowerFormat
|
||||||
|
from .unit_pressure_conversion import UnitPressureConversion
|
||||||
|
from .unit_pressure_format import UnitPressureFormat
|
||||||
|
from .unit_radiation_conversion import UnitRadiationConversion
|
||||||
|
from .unit_radiation_format import UnitRadiationFormat
|
||||||
|
from .unit_solid_angle_conversion import UnitSolidAngleConversion
|
||||||
|
from .unit_solid_angle_format import UnitSolidAngleFormat
|
||||||
|
from .unit_temperature_conversion import UnitTemperatureConversion
|
||||||
|
from .unit_temperature_format import UnitTemperatureFormat
|
||||||
|
from .unit_time_conversion import UnitTimeConversion
|
||||||
|
from .unit_time_format import UnitTimeFormat
|
||||||
|
from .unit_velocity_conversion import UnitVelocityConversion
|
||||||
|
from .unit_velocity_format import UnitVelocityFormat
|
||||||
|
from .unit_voltage_conversion import UnitVoltageConversion
|
||||||
|
from .unit_voltage_format import UnitVoltageFormat
|
||||||
|
from .unit_volume_conversion import UnitVolumeConversion
|
||||||
|
from .unit_volume_format import UnitVolumeFormat
|
||||||
from .update_user import UpdateUser
|
from .update_user import UpdateUser
|
||||||
from .user import User
|
from .user import User
|
||||||
from .user_results_page import UserResultsPage
|
from .user_results_page import UserResultsPage
|
||||||
|
185
kittycad/models/unit_acceleration_conversion.py
Normal file
185
kittycad/models/unit_acceleration_conversion.py
Normal file
@ -0,0 +1,185 @@
|
|||||||
|
import datetime
|
||||||
|
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||||
|
|
||||||
|
import attr
|
||||||
|
from dateutil.parser import isoparse
|
||||||
|
|
||||||
|
from ..models.uuid import Uuid
|
||||||
|
from ..models.unit_acceleration_format import UnitAccelerationFormat
|
||||||
|
from ..models.api_call_status import ApiCallStatus
|
||||||
|
from ..types import UNSET, Unset
|
||||||
|
|
||||||
|
T = TypeVar("T", bound="UnitAccelerationConversion")
|
||||||
|
|
||||||
|
|
||||||
|
@attr.s(auto_attribs=True)
|
||||||
|
class UnitAccelerationConversion:
|
||||||
|
""" """
|
||||||
|
completed_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
created_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
error: Union[Unset, str] = UNSET
|
||||||
|
id: Union[Unset, str] = UNSET
|
||||||
|
input: Union[Unset, float] = UNSET
|
||||||
|
output: Union[Unset, float] = UNSET
|
||||||
|
output_format: Union[Unset, UnitAccelerationFormat] = UNSET
|
||||||
|
src_format: Union[Unset, UnitAccelerationFormat] = UNSET
|
||||||
|
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
status: Union[Unset, ApiCallStatus] = UNSET
|
||||||
|
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
user_id: Union[Unset, str] = UNSET
|
||||||
|
|
||||||
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||||
|
|
||||||
|
def to_dict(self) -> Dict[str, Any]:
|
||||||
|
completed_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.completed_at, Unset):
|
||||||
|
completed_at = self.completed_at.isoformat()
|
||||||
|
created_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.created_at, Unset):
|
||||||
|
created_at = self.created_at.isoformat()
|
||||||
|
error = self.error
|
||||||
|
id = self.id
|
||||||
|
input = self.input
|
||||||
|
output = self.output
|
||||||
|
output_format: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.output_format, Unset):
|
||||||
|
output_format = self.output_format.value
|
||||||
|
src_format: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.src_format, Unset):
|
||||||
|
src_format = self.src_format.value
|
||||||
|
started_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.started_at, Unset):
|
||||||
|
started_at = self.started_at.isoformat()
|
||||||
|
status: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.status, Unset):
|
||||||
|
status = self.status.value
|
||||||
|
updated_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.updated_at, Unset):
|
||||||
|
updated_at = self.updated_at.isoformat()
|
||||||
|
user_id = self.user_id
|
||||||
|
|
||||||
|
field_dict: Dict[str, Any] = {}
|
||||||
|
field_dict.update(self.additional_properties)
|
||||||
|
field_dict.update({})
|
||||||
|
if completed_at is not UNSET:
|
||||||
|
field_dict['completed_at'] = completed_at
|
||||||
|
if created_at is not UNSET:
|
||||||
|
field_dict['created_at'] = created_at
|
||||||
|
if error is not UNSET:
|
||||||
|
field_dict['error'] = error
|
||||||
|
if id is not UNSET:
|
||||||
|
field_dict['id'] = id
|
||||||
|
if input is not UNSET:
|
||||||
|
field_dict['input'] = input
|
||||||
|
if output is not UNSET:
|
||||||
|
field_dict['output'] = output
|
||||||
|
if output_format is not UNSET:
|
||||||
|
field_dict['output_format'] = output_format
|
||||||
|
if src_format is not UNSET:
|
||||||
|
field_dict['src_format'] = src_format
|
||||||
|
if started_at is not UNSET:
|
||||||
|
field_dict['started_at'] = started_at
|
||||||
|
if status is not UNSET:
|
||||||
|
field_dict['status'] = status
|
||||||
|
if updated_at is not UNSET:
|
||||||
|
field_dict['updated_at'] = updated_at
|
||||||
|
if user_id is not UNSET:
|
||||||
|
field_dict['user_id'] = user_id
|
||||||
|
|
||||||
|
return field_dict
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||||
|
d = src_dict.copy()
|
||||||
|
_completed_at = d.pop("completed_at", UNSET)
|
||||||
|
completed_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_completed_at, Unset):
|
||||||
|
completed_at = UNSET
|
||||||
|
else:
|
||||||
|
completed_at = isoparse(_completed_at)
|
||||||
|
|
||||||
|
_created_at = d.pop("created_at", UNSET)
|
||||||
|
created_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_created_at, Unset):
|
||||||
|
created_at = UNSET
|
||||||
|
else:
|
||||||
|
created_at = isoparse(_created_at)
|
||||||
|
|
||||||
|
error = d.pop("error", UNSET)
|
||||||
|
|
||||||
|
id = d.pop("id", UNSET)
|
||||||
|
|
||||||
|
input = d.pop("input", UNSET)
|
||||||
|
|
||||||
|
output = d.pop("output", UNSET)
|
||||||
|
|
||||||
|
_output_format = d.pop("output_format", UNSET)
|
||||||
|
output_format: Union[Unset, UnitAccelerationFormat]
|
||||||
|
if isinstance(_output_format, Unset):
|
||||||
|
output_format = UNSET
|
||||||
|
else:
|
||||||
|
output_format = UnitAccelerationFormat(_output_format)
|
||||||
|
|
||||||
|
_src_format = d.pop("src_format", UNSET)
|
||||||
|
src_format: Union[Unset, UnitAccelerationFormat]
|
||||||
|
if isinstance(_src_format, Unset):
|
||||||
|
src_format = UNSET
|
||||||
|
else:
|
||||||
|
src_format = UnitAccelerationFormat(_src_format)
|
||||||
|
|
||||||
|
_started_at = d.pop("started_at", UNSET)
|
||||||
|
started_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_started_at, Unset):
|
||||||
|
started_at = UNSET
|
||||||
|
else:
|
||||||
|
started_at = isoparse(_started_at)
|
||||||
|
|
||||||
|
_status = d.pop("status", UNSET)
|
||||||
|
status: Union[Unset, ApiCallStatus]
|
||||||
|
if isinstance(_status, Unset):
|
||||||
|
status = UNSET
|
||||||
|
else:
|
||||||
|
status = ApiCallStatus(_status)
|
||||||
|
|
||||||
|
_updated_at = d.pop("updated_at", UNSET)
|
||||||
|
updated_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_updated_at, Unset):
|
||||||
|
updated_at = UNSET
|
||||||
|
else:
|
||||||
|
updated_at = isoparse(_updated_at)
|
||||||
|
|
||||||
|
user_id = d.pop("user_id", UNSET)
|
||||||
|
|
||||||
|
unit_acceleration_conversion = cls(
|
||||||
|
completed_at=completed_at,
|
||||||
|
created_at=created_at,
|
||||||
|
error=error,
|
||||||
|
id=id,
|
||||||
|
input=input,
|
||||||
|
output=output,
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
started_at=started_at,
|
||||||
|
status=status,
|
||||||
|
updated_at=updated_at,
|
||||||
|
user_id=user_id,
|
||||||
|
)
|
||||||
|
|
||||||
|
unit_acceleration_conversion.additional_properties = d
|
||||||
|
return unit_acceleration_conversion
|
||||||
|
|
||||||
|
@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
|
10
kittycad/models/unit_acceleration_format.py
Normal file
10
kittycad/models/unit_acceleration_format.py
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
|
||||||
|
class UnitAccelerationFormat(str, Enum):
|
||||||
|
METERS_PER_SECOND_SQUARED = 'meters_per_second_squared'
|
||||||
|
FEET_PER_SECOND_SQUARED = 'feet_per_second_squared'
|
||||||
|
STANDARD_GRAVITY = 'standard_gravity'
|
||||||
|
|
||||||
|
def __str__(self) -> str:
|
||||||
|
return str(self.value)
|
185
kittycad/models/unit_angle_conversion.py
Normal file
185
kittycad/models/unit_angle_conversion.py
Normal file
@ -0,0 +1,185 @@
|
|||||||
|
import datetime
|
||||||
|
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||||
|
|
||||||
|
import attr
|
||||||
|
from dateutil.parser import isoparse
|
||||||
|
|
||||||
|
from ..models.uuid import Uuid
|
||||||
|
from ..models.unit_angle_format import UnitAngleFormat
|
||||||
|
from ..models.api_call_status import ApiCallStatus
|
||||||
|
from ..types import UNSET, Unset
|
||||||
|
|
||||||
|
T = TypeVar("T", bound="UnitAngleConversion")
|
||||||
|
|
||||||
|
|
||||||
|
@attr.s(auto_attribs=True)
|
||||||
|
class UnitAngleConversion:
|
||||||
|
""" """
|
||||||
|
completed_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
created_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
error: Union[Unset, str] = UNSET
|
||||||
|
id: Union[Unset, str] = UNSET
|
||||||
|
input: Union[Unset, float] = UNSET
|
||||||
|
output: Union[Unset, float] = UNSET
|
||||||
|
output_format: Union[Unset, UnitAngleFormat] = UNSET
|
||||||
|
src_format: Union[Unset, UnitAngleFormat] = UNSET
|
||||||
|
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
status: Union[Unset, ApiCallStatus] = UNSET
|
||||||
|
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
user_id: Union[Unset, str] = UNSET
|
||||||
|
|
||||||
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||||
|
|
||||||
|
def to_dict(self) -> Dict[str, Any]:
|
||||||
|
completed_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.completed_at, Unset):
|
||||||
|
completed_at = self.completed_at.isoformat()
|
||||||
|
created_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.created_at, Unset):
|
||||||
|
created_at = self.created_at.isoformat()
|
||||||
|
error = self.error
|
||||||
|
id = self.id
|
||||||
|
input = self.input
|
||||||
|
output = self.output
|
||||||
|
output_format: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.output_format, Unset):
|
||||||
|
output_format = self.output_format.value
|
||||||
|
src_format: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.src_format, Unset):
|
||||||
|
src_format = self.src_format.value
|
||||||
|
started_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.started_at, Unset):
|
||||||
|
started_at = self.started_at.isoformat()
|
||||||
|
status: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.status, Unset):
|
||||||
|
status = self.status.value
|
||||||
|
updated_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.updated_at, Unset):
|
||||||
|
updated_at = self.updated_at.isoformat()
|
||||||
|
user_id = self.user_id
|
||||||
|
|
||||||
|
field_dict: Dict[str, Any] = {}
|
||||||
|
field_dict.update(self.additional_properties)
|
||||||
|
field_dict.update({})
|
||||||
|
if completed_at is not UNSET:
|
||||||
|
field_dict['completed_at'] = completed_at
|
||||||
|
if created_at is not UNSET:
|
||||||
|
field_dict['created_at'] = created_at
|
||||||
|
if error is not UNSET:
|
||||||
|
field_dict['error'] = error
|
||||||
|
if id is not UNSET:
|
||||||
|
field_dict['id'] = id
|
||||||
|
if input is not UNSET:
|
||||||
|
field_dict['input'] = input
|
||||||
|
if output is not UNSET:
|
||||||
|
field_dict['output'] = output
|
||||||
|
if output_format is not UNSET:
|
||||||
|
field_dict['output_format'] = output_format
|
||||||
|
if src_format is not UNSET:
|
||||||
|
field_dict['src_format'] = src_format
|
||||||
|
if started_at is not UNSET:
|
||||||
|
field_dict['started_at'] = started_at
|
||||||
|
if status is not UNSET:
|
||||||
|
field_dict['status'] = status
|
||||||
|
if updated_at is not UNSET:
|
||||||
|
field_dict['updated_at'] = updated_at
|
||||||
|
if user_id is not UNSET:
|
||||||
|
field_dict['user_id'] = user_id
|
||||||
|
|
||||||
|
return field_dict
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||||
|
d = src_dict.copy()
|
||||||
|
_completed_at = d.pop("completed_at", UNSET)
|
||||||
|
completed_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_completed_at, Unset):
|
||||||
|
completed_at = UNSET
|
||||||
|
else:
|
||||||
|
completed_at = isoparse(_completed_at)
|
||||||
|
|
||||||
|
_created_at = d.pop("created_at", UNSET)
|
||||||
|
created_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_created_at, Unset):
|
||||||
|
created_at = UNSET
|
||||||
|
else:
|
||||||
|
created_at = isoparse(_created_at)
|
||||||
|
|
||||||
|
error = d.pop("error", UNSET)
|
||||||
|
|
||||||
|
id = d.pop("id", UNSET)
|
||||||
|
|
||||||
|
input = d.pop("input", UNSET)
|
||||||
|
|
||||||
|
output = d.pop("output", UNSET)
|
||||||
|
|
||||||
|
_output_format = d.pop("output_format", UNSET)
|
||||||
|
output_format: Union[Unset, UnitAngleFormat]
|
||||||
|
if isinstance(_output_format, Unset):
|
||||||
|
output_format = UNSET
|
||||||
|
else:
|
||||||
|
output_format = UnitAngleFormat(_output_format)
|
||||||
|
|
||||||
|
_src_format = d.pop("src_format", UNSET)
|
||||||
|
src_format: Union[Unset, UnitAngleFormat]
|
||||||
|
if isinstance(_src_format, Unset):
|
||||||
|
src_format = UNSET
|
||||||
|
else:
|
||||||
|
src_format = UnitAngleFormat(_src_format)
|
||||||
|
|
||||||
|
_started_at = d.pop("started_at", UNSET)
|
||||||
|
started_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_started_at, Unset):
|
||||||
|
started_at = UNSET
|
||||||
|
else:
|
||||||
|
started_at = isoparse(_started_at)
|
||||||
|
|
||||||
|
_status = d.pop("status", UNSET)
|
||||||
|
status: Union[Unset, ApiCallStatus]
|
||||||
|
if isinstance(_status, Unset):
|
||||||
|
status = UNSET
|
||||||
|
else:
|
||||||
|
status = ApiCallStatus(_status)
|
||||||
|
|
||||||
|
_updated_at = d.pop("updated_at", UNSET)
|
||||||
|
updated_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_updated_at, Unset):
|
||||||
|
updated_at = UNSET
|
||||||
|
else:
|
||||||
|
updated_at = isoparse(_updated_at)
|
||||||
|
|
||||||
|
user_id = d.pop("user_id", UNSET)
|
||||||
|
|
||||||
|
unit_angle_conversion = cls(
|
||||||
|
completed_at=completed_at,
|
||||||
|
created_at=created_at,
|
||||||
|
error=error,
|
||||||
|
id=id,
|
||||||
|
input=input,
|
||||||
|
output=output,
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
started_at=started_at,
|
||||||
|
status=status,
|
||||||
|
updated_at=updated_at,
|
||||||
|
user_id=user_id,
|
||||||
|
)
|
||||||
|
|
||||||
|
unit_angle_conversion.additional_properties = d
|
||||||
|
return unit_angle_conversion
|
||||||
|
|
||||||
|
@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
|
14
kittycad/models/unit_angle_format.py
Normal file
14
kittycad/models/unit_angle_format.py
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
|
||||||
|
class UnitAngleFormat(str, Enum):
|
||||||
|
RADIAN = 'radian'
|
||||||
|
DEGREE = 'degree'
|
||||||
|
ARCMINUTE = 'arcminute'
|
||||||
|
ARCSECOND = 'arcsecond'
|
||||||
|
MILLIARCSECOND = 'milliarcsecond'
|
||||||
|
TURN = 'turn'
|
||||||
|
GRADIAN = 'gradian'
|
||||||
|
|
||||||
|
def __str__(self) -> str:
|
||||||
|
return str(self.value)
|
185
kittycad/models/unit_angular_velocity_conversion.py
Normal file
185
kittycad/models/unit_angular_velocity_conversion.py
Normal file
@ -0,0 +1,185 @@
|
|||||||
|
import datetime
|
||||||
|
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||||
|
|
||||||
|
import attr
|
||||||
|
from dateutil.parser import isoparse
|
||||||
|
|
||||||
|
from ..models.uuid import Uuid
|
||||||
|
from ..models.unit_angular_velocity_format import UnitAngularVelocityFormat
|
||||||
|
from ..models.api_call_status import ApiCallStatus
|
||||||
|
from ..types import UNSET, Unset
|
||||||
|
|
||||||
|
T = TypeVar("T", bound="UnitAngularVelocityConversion")
|
||||||
|
|
||||||
|
|
||||||
|
@attr.s(auto_attribs=True)
|
||||||
|
class UnitAngularVelocityConversion:
|
||||||
|
""" """
|
||||||
|
completed_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
created_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
error: Union[Unset, str] = UNSET
|
||||||
|
id: Union[Unset, str] = UNSET
|
||||||
|
input: Union[Unset, float] = UNSET
|
||||||
|
output: Union[Unset, float] = UNSET
|
||||||
|
output_format: Union[Unset, UnitAngularVelocityFormat] = UNSET
|
||||||
|
src_format: Union[Unset, UnitAngularVelocityFormat] = UNSET
|
||||||
|
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
status: Union[Unset, ApiCallStatus] = UNSET
|
||||||
|
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
user_id: Union[Unset, str] = UNSET
|
||||||
|
|
||||||
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||||
|
|
||||||
|
def to_dict(self) -> Dict[str, Any]:
|
||||||
|
completed_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.completed_at, Unset):
|
||||||
|
completed_at = self.completed_at.isoformat()
|
||||||
|
created_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.created_at, Unset):
|
||||||
|
created_at = self.created_at.isoformat()
|
||||||
|
error = self.error
|
||||||
|
id = self.id
|
||||||
|
input = self.input
|
||||||
|
output = self.output
|
||||||
|
output_format: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.output_format, Unset):
|
||||||
|
output_format = self.output_format.value
|
||||||
|
src_format: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.src_format, Unset):
|
||||||
|
src_format = self.src_format.value
|
||||||
|
started_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.started_at, Unset):
|
||||||
|
started_at = self.started_at.isoformat()
|
||||||
|
status: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.status, Unset):
|
||||||
|
status = self.status.value
|
||||||
|
updated_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.updated_at, Unset):
|
||||||
|
updated_at = self.updated_at.isoformat()
|
||||||
|
user_id = self.user_id
|
||||||
|
|
||||||
|
field_dict: Dict[str, Any] = {}
|
||||||
|
field_dict.update(self.additional_properties)
|
||||||
|
field_dict.update({})
|
||||||
|
if completed_at is not UNSET:
|
||||||
|
field_dict['completed_at'] = completed_at
|
||||||
|
if created_at is not UNSET:
|
||||||
|
field_dict['created_at'] = created_at
|
||||||
|
if error is not UNSET:
|
||||||
|
field_dict['error'] = error
|
||||||
|
if id is not UNSET:
|
||||||
|
field_dict['id'] = id
|
||||||
|
if input is not UNSET:
|
||||||
|
field_dict['input'] = input
|
||||||
|
if output is not UNSET:
|
||||||
|
field_dict['output'] = output
|
||||||
|
if output_format is not UNSET:
|
||||||
|
field_dict['output_format'] = output_format
|
||||||
|
if src_format is not UNSET:
|
||||||
|
field_dict['src_format'] = src_format
|
||||||
|
if started_at is not UNSET:
|
||||||
|
field_dict['started_at'] = started_at
|
||||||
|
if status is not UNSET:
|
||||||
|
field_dict['status'] = status
|
||||||
|
if updated_at is not UNSET:
|
||||||
|
field_dict['updated_at'] = updated_at
|
||||||
|
if user_id is not UNSET:
|
||||||
|
field_dict['user_id'] = user_id
|
||||||
|
|
||||||
|
return field_dict
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||||
|
d = src_dict.copy()
|
||||||
|
_completed_at = d.pop("completed_at", UNSET)
|
||||||
|
completed_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_completed_at, Unset):
|
||||||
|
completed_at = UNSET
|
||||||
|
else:
|
||||||
|
completed_at = isoparse(_completed_at)
|
||||||
|
|
||||||
|
_created_at = d.pop("created_at", UNSET)
|
||||||
|
created_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_created_at, Unset):
|
||||||
|
created_at = UNSET
|
||||||
|
else:
|
||||||
|
created_at = isoparse(_created_at)
|
||||||
|
|
||||||
|
error = d.pop("error", UNSET)
|
||||||
|
|
||||||
|
id = d.pop("id", UNSET)
|
||||||
|
|
||||||
|
input = d.pop("input", UNSET)
|
||||||
|
|
||||||
|
output = d.pop("output", UNSET)
|
||||||
|
|
||||||
|
_output_format = d.pop("output_format", UNSET)
|
||||||
|
output_format: Union[Unset, UnitAngularVelocityFormat]
|
||||||
|
if isinstance(_output_format, Unset):
|
||||||
|
output_format = UNSET
|
||||||
|
else:
|
||||||
|
output_format = UnitAngularVelocityFormat(_output_format)
|
||||||
|
|
||||||
|
_src_format = d.pop("src_format", UNSET)
|
||||||
|
src_format: Union[Unset, UnitAngularVelocityFormat]
|
||||||
|
if isinstance(_src_format, Unset):
|
||||||
|
src_format = UNSET
|
||||||
|
else:
|
||||||
|
src_format = UnitAngularVelocityFormat(_src_format)
|
||||||
|
|
||||||
|
_started_at = d.pop("started_at", UNSET)
|
||||||
|
started_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_started_at, Unset):
|
||||||
|
started_at = UNSET
|
||||||
|
else:
|
||||||
|
started_at = isoparse(_started_at)
|
||||||
|
|
||||||
|
_status = d.pop("status", UNSET)
|
||||||
|
status: Union[Unset, ApiCallStatus]
|
||||||
|
if isinstance(_status, Unset):
|
||||||
|
status = UNSET
|
||||||
|
else:
|
||||||
|
status = ApiCallStatus(_status)
|
||||||
|
|
||||||
|
_updated_at = d.pop("updated_at", UNSET)
|
||||||
|
updated_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_updated_at, Unset):
|
||||||
|
updated_at = UNSET
|
||||||
|
else:
|
||||||
|
updated_at = isoparse(_updated_at)
|
||||||
|
|
||||||
|
user_id = d.pop("user_id", UNSET)
|
||||||
|
|
||||||
|
unit_angular_velocity_conversion = cls(
|
||||||
|
completed_at=completed_at,
|
||||||
|
created_at=created_at,
|
||||||
|
error=error,
|
||||||
|
id=id,
|
||||||
|
input=input,
|
||||||
|
output=output,
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
started_at=started_at,
|
||||||
|
status=status,
|
||||||
|
updated_at=updated_at,
|
||||||
|
user_id=user_id,
|
||||||
|
)
|
||||||
|
|
||||||
|
unit_angular_velocity_conversion.additional_properties = d
|
||||||
|
return unit_angular_velocity_conversion
|
||||||
|
|
||||||
|
@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
|
11
kittycad/models/unit_angular_velocity_format.py
Normal file
11
kittycad/models/unit_angular_velocity_format.py
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
|
||||||
|
class UnitAngularVelocityFormat(str, Enum):
|
||||||
|
RADIANS_PER_SECOND = 'radians_per_second'
|
||||||
|
DEGREES_PER_SECOND = 'degrees_per_second'
|
||||||
|
REVOLUTIONS_PER_MINUTE = 'revolutions_per_minute'
|
||||||
|
MILLIARCSECONDS_PER_YEAR = 'milliarcseconds_per_year'
|
||||||
|
|
||||||
|
def __str__(self) -> str:
|
||||||
|
return str(self.value)
|
185
kittycad/models/unit_area_conversion.py
Normal file
185
kittycad/models/unit_area_conversion.py
Normal file
@ -0,0 +1,185 @@
|
|||||||
|
import datetime
|
||||||
|
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||||
|
|
||||||
|
import attr
|
||||||
|
from dateutil.parser import isoparse
|
||||||
|
|
||||||
|
from ..models.uuid import Uuid
|
||||||
|
from ..models.unit_area_format import UnitAreaFormat
|
||||||
|
from ..models.api_call_status import ApiCallStatus
|
||||||
|
from ..types import UNSET, Unset
|
||||||
|
|
||||||
|
T = TypeVar("T", bound="UnitAreaConversion")
|
||||||
|
|
||||||
|
|
||||||
|
@attr.s(auto_attribs=True)
|
||||||
|
class UnitAreaConversion:
|
||||||
|
""" """
|
||||||
|
completed_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
created_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
error: Union[Unset, str] = UNSET
|
||||||
|
id: Union[Unset, str] = UNSET
|
||||||
|
input: Union[Unset, float] = UNSET
|
||||||
|
output: Union[Unset, float] = UNSET
|
||||||
|
output_format: Union[Unset, UnitAreaFormat] = UNSET
|
||||||
|
src_format: Union[Unset, UnitAreaFormat] = UNSET
|
||||||
|
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
status: Union[Unset, ApiCallStatus] = UNSET
|
||||||
|
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
user_id: Union[Unset, str] = UNSET
|
||||||
|
|
||||||
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||||
|
|
||||||
|
def to_dict(self) -> Dict[str, Any]:
|
||||||
|
completed_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.completed_at, Unset):
|
||||||
|
completed_at = self.completed_at.isoformat()
|
||||||
|
created_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.created_at, Unset):
|
||||||
|
created_at = self.created_at.isoformat()
|
||||||
|
error = self.error
|
||||||
|
id = self.id
|
||||||
|
input = self.input
|
||||||
|
output = self.output
|
||||||
|
output_format: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.output_format, Unset):
|
||||||
|
output_format = self.output_format.value
|
||||||
|
src_format: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.src_format, Unset):
|
||||||
|
src_format = self.src_format.value
|
||||||
|
started_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.started_at, Unset):
|
||||||
|
started_at = self.started_at.isoformat()
|
||||||
|
status: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.status, Unset):
|
||||||
|
status = self.status.value
|
||||||
|
updated_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.updated_at, Unset):
|
||||||
|
updated_at = self.updated_at.isoformat()
|
||||||
|
user_id = self.user_id
|
||||||
|
|
||||||
|
field_dict: Dict[str, Any] = {}
|
||||||
|
field_dict.update(self.additional_properties)
|
||||||
|
field_dict.update({})
|
||||||
|
if completed_at is not UNSET:
|
||||||
|
field_dict['completed_at'] = completed_at
|
||||||
|
if created_at is not UNSET:
|
||||||
|
field_dict['created_at'] = created_at
|
||||||
|
if error is not UNSET:
|
||||||
|
field_dict['error'] = error
|
||||||
|
if id is not UNSET:
|
||||||
|
field_dict['id'] = id
|
||||||
|
if input is not UNSET:
|
||||||
|
field_dict['input'] = input
|
||||||
|
if output is not UNSET:
|
||||||
|
field_dict['output'] = output
|
||||||
|
if output_format is not UNSET:
|
||||||
|
field_dict['output_format'] = output_format
|
||||||
|
if src_format is not UNSET:
|
||||||
|
field_dict['src_format'] = src_format
|
||||||
|
if started_at is not UNSET:
|
||||||
|
field_dict['started_at'] = started_at
|
||||||
|
if status is not UNSET:
|
||||||
|
field_dict['status'] = status
|
||||||
|
if updated_at is not UNSET:
|
||||||
|
field_dict['updated_at'] = updated_at
|
||||||
|
if user_id is not UNSET:
|
||||||
|
field_dict['user_id'] = user_id
|
||||||
|
|
||||||
|
return field_dict
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||||
|
d = src_dict.copy()
|
||||||
|
_completed_at = d.pop("completed_at", UNSET)
|
||||||
|
completed_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_completed_at, Unset):
|
||||||
|
completed_at = UNSET
|
||||||
|
else:
|
||||||
|
completed_at = isoparse(_completed_at)
|
||||||
|
|
||||||
|
_created_at = d.pop("created_at", UNSET)
|
||||||
|
created_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_created_at, Unset):
|
||||||
|
created_at = UNSET
|
||||||
|
else:
|
||||||
|
created_at = isoparse(_created_at)
|
||||||
|
|
||||||
|
error = d.pop("error", UNSET)
|
||||||
|
|
||||||
|
id = d.pop("id", UNSET)
|
||||||
|
|
||||||
|
input = d.pop("input", UNSET)
|
||||||
|
|
||||||
|
output = d.pop("output", UNSET)
|
||||||
|
|
||||||
|
_output_format = d.pop("output_format", UNSET)
|
||||||
|
output_format: Union[Unset, UnitAreaFormat]
|
||||||
|
if isinstance(_output_format, Unset):
|
||||||
|
output_format = UNSET
|
||||||
|
else:
|
||||||
|
output_format = UnitAreaFormat(_output_format)
|
||||||
|
|
||||||
|
_src_format = d.pop("src_format", UNSET)
|
||||||
|
src_format: Union[Unset, UnitAreaFormat]
|
||||||
|
if isinstance(_src_format, Unset):
|
||||||
|
src_format = UNSET
|
||||||
|
else:
|
||||||
|
src_format = UnitAreaFormat(_src_format)
|
||||||
|
|
||||||
|
_started_at = d.pop("started_at", UNSET)
|
||||||
|
started_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_started_at, Unset):
|
||||||
|
started_at = UNSET
|
||||||
|
else:
|
||||||
|
started_at = isoparse(_started_at)
|
||||||
|
|
||||||
|
_status = d.pop("status", UNSET)
|
||||||
|
status: Union[Unset, ApiCallStatus]
|
||||||
|
if isinstance(_status, Unset):
|
||||||
|
status = UNSET
|
||||||
|
else:
|
||||||
|
status = ApiCallStatus(_status)
|
||||||
|
|
||||||
|
_updated_at = d.pop("updated_at", UNSET)
|
||||||
|
updated_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_updated_at, Unset):
|
||||||
|
updated_at = UNSET
|
||||||
|
else:
|
||||||
|
updated_at = isoparse(_updated_at)
|
||||||
|
|
||||||
|
user_id = d.pop("user_id", UNSET)
|
||||||
|
|
||||||
|
unit_area_conversion = cls(
|
||||||
|
completed_at=completed_at,
|
||||||
|
created_at=created_at,
|
||||||
|
error=error,
|
||||||
|
id=id,
|
||||||
|
input=input,
|
||||||
|
output=output,
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
started_at=started_at,
|
||||||
|
status=status,
|
||||||
|
updated_at=updated_at,
|
||||||
|
user_id=user_id,
|
||||||
|
)
|
||||||
|
|
||||||
|
unit_area_conversion.additional_properties = d
|
||||||
|
return unit_area_conversion
|
||||||
|
|
||||||
|
@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
|
14
kittycad/models/unit_area_format.py
Normal file
14
kittycad/models/unit_area_format.py
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
|
||||||
|
class UnitAreaFormat(str, Enum):
|
||||||
|
SQUARE_METER = 'square_meter'
|
||||||
|
SQUARE_FOOT = 'square_foot'
|
||||||
|
SQUARE_INCH = 'square_inch'
|
||||||
|
SQUARE_MILE = 'square_mile'
|
||||||
|
SQUARE_KILOMETER = 'square_kilometer'
|
||||||
|
HECTARE = 'hectare'
|
||||||
|
ACRE = 'acre'
|
||||||
|
|
||||||
|
def __str__(self) -> str:
|
||||||
|
return str(self.value)
|
185
kittycad/models/unit_charge_conversion.py
Normal file
185
kittycad/models/unit_charge_conversion.py
Normal file
@ -0,0 +1,185 @@
|
|||||||
|
import datetime
|
||||||
|
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||||
|
|
||||||
|
import attr
|
||||||
|
from dateutil.parser import isoparse
|
||||||
|
|
||||||
|
from ..models.uuid import Uuid
|
||||||
|
from ..models.unit_charge_format import UnitChargeFormat
|
||||||
|
from ..models.api_call_status import ApiCallStatus
|
||||||
|
from ..types import UNSET, Unset
|
||||||
|
|
||||||
|
T = TypeVar("T", bound="UnitChargeConversion")
|
||||||
|
|
||||||
|
|
||||||
|
@attr.s(auto_attribs=True)
|
||||||
|
class UnitChargeConversion:
|
||||||
|
""" """
|
||||||
|
completed_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
created_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
error: Union[Unset, str] = UNSET
|
||||||
|
id: Union[Unset, str] = UNSET
|
||||||
|
input: Union[Unset, float] = UNSET
|
||||||
|
output: Union[Unset, float] = UNSET
|
||||||
|
output_format: Union[Unset, UnitChargeFormat] = UNSET
|
||||||
|
src_format: Union[Unset, UnitChargeFormat] = UNSET
|
||||||
|
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
status: Union[Unset, ApiCallStatus] = UNSET
|
||||||
|
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
user_id: Union[Unset, str] = UNSET
|
||||||
|
|
||||||
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||||
|
|
||||||
|
def to_dict(self) -> Dict[str, Any]:
|
||||||
|
completed_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.completed_at, Unset):
|
||||||
|
completed_at = self.completed_at.isoformat()
|
||||||
|
created_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.created_at, Unset):
|
||||||
|
created_at = self.created_at.isoformat()
|
||||||
|
error = self.error
|
||||||
|
id = self.id
|
||||||
|
input = self.input
|
||||||
|
output = self.output
|
||||||
|
output_format: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.output_format, Unset):
|
||||||
|
output_format = self.output_format.value
|
||||||
|
src_format: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.src_format, Unset):
|
||||||
|
src_format = self.src_format.value
|
||||||
|
started_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.started_at, Unset):
|
||||||
|
started_at = self.started_at.isoformat()
|
||||||
|
status: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.status, Unset):
|
||||||
|
status = self.status.value
|
||||||
|
updated_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.updated_at, Unset):
|
||||||
|
updated_at = self.updated_at.isoformat()
|
||||||
|
user_id = self.user_id
|
||||||
|
|
||||||
|
field_dict: Dict[str, Any] = {}
|
||||||
|
field_dict.update(self.additional_properties)
|
||||||
|
field_dict.update({})
|
||||||
|
if completed_at is not UNSET:
|
||||||
|
field_dict['completed_at'] = completed_at
|
||||||
|
if created_at is not UNSET:
|
||||||
|
field_dict['created_at'] = created_at
|
||||||
|
if error is not UNSET:
|
||||||
|
field_dict['error'] = error
|
||||||
|
if id is not UNSET:
|
||||||
|
field_dict['id'] = id
|
||||||
|
if input is not UNSET:
|
||||||
|
field_dict['input'] = input
|
||||||
|
if output is not UNSET:
|
||||||
|
field_dict['output'] = output
|
||||||
|
if output_format is not UNSET:
|
||||||
|
field_dict['output_format'] = output_format
|
||||||
|
if src_format is not UNSET:
|
||||||
|
field_dict['src_format'] = src_format
|
||||||
|
if started_at is not UNSET:
|
||||||
|
field_dict['started_at'] = started_at
|
||||||
|
if status is not UNSET:
|
||||||
|
field_dict['status'] = status
|
||||||
|
if updated_at is not UNSET:
|
||||||
|
field_dict['updated_at'] = updated_at
|
||||||
|
if user_id is not UNSET:
|
||||||
|
field_dict['user_id'] = user_id
|
||||||
|
|
||||||
|
return field_dict
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||||
|
d = src_dict.copy()
|
||||||
|
_completed_at = d.pop("completed_at", UNSET)
|
||||||
|
completed_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_completed_at, Unset):
|
||||||
|
completed_at = UNSET
|
||||||
|
else:
|
||||||
|
completed_at = isoparse(_completed_at)
|
||||||
|
|
||||||
|
_created_at = d.pop("created_at", UNSET)
|
||||||
|
created_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_created_at, Unset):
|
||||||
|
created_at = UNSET
|
||||||
|
else:
|
||||||
|
created_at = isoparse(_created_at)
|
||||||
|
|
||||||
|
error = d.pop("error", UNSET)
|
||||||
|
|
||||||
|
id = d.pop("id", UNSET)
|
||||||
|
|
||||||
|
input = d.pop("input", UNSET)
|
||||||
|
|
||||||
|
output = d.pop("output", UNSET)
|
||||||
|
|
||||||
|
_output_format = d.pop("output_format", UNSET)
|
||||||
|
output_format: Union[Unset, UnitChargeFormat]
|
||||||
|
if isinstance(_output_format, Unset):
|
||||||
|
output_format = UNSET
|
||||||
|
else:
|
||||||
|
output_format = UnitChargeFormat(_output_format)
|
||||||
|
|
||||||
|
_src_format = d.pop("src_format", UNSET)
|
||||||
|
src_format: Union[Unset, UnitChargeFormat]
|
||||||
|
if isinstance(_src_format, Unset):
|
||||||
|
src_format = UNSET
|
||||||
|
else:
|
||||||
|
src_format = UnitChargeFormat(_src_format)
|
||||||
|
|
||||||
|
_started_at = d.pop("started_at", UNSET)
|
||||||
|
started_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_started_at, Unset):
|
||||||
|
started_at = UNSET
|
||||||
|
else:
|
||||||
|
started_at = isoparse(_started_at)
|
||||||
|
|
||||||
|
_status = d.pop("status", UNSET)
|
||||||
|
status: Union[Unset, ApiCallStatus]
|
||||||
|
if isinstance(_status, Unset):
|
||||||
|
status = UNSET
|
||||||
|
else:
|
||||||
|
status = ApiCallStatus(_status)
|
||||||
|
|
||||||
|
_updated_at = d.pop("updated_at", UNSET)
|
||||||
|
updated_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_updated_at, Unset):
|
||||||
|
updated_at = UNSET
|
||||||
|
else:
|
||||||
|
updated_at = isoparse(_updated_at)
|
||||||
|
|
||||||
|
user_id = d.pop("user_id", UNSET)
|
||||||
|
|
||||||
|
unit_charge_conversion = cls(
|
||||||
|
completed_at=completed_at,
|
||||||
|
created_at=created_at,
|
||||||
|
error=error,
|
||||||
|
id=id,
|
||||||
|
input=input,
|
||||||
|
output=output,
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
started_at=started_at,
|
||||||
|
status=status,
|
||||||
|
updated_at=updated_at,
|
||||||
|
user_id=user_id,
|
||||||
|
)
|
||||||
|
|
||||||
|
unit_charge_conversion.additional_properties = d
|
||||||
|
return unit_charge_conversion
|
||||||
|
|
||||||
|
@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
|
9
kittycad/models/unit_charge_format.py
Normal file
9
kittycad/models/unit_charge_format.py
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
|
||||||
|
class UnitChargeFormat(str, Enum):
|
||||||
|
COULOMB = 'coulomb'
|
||||||
|
AMPERE_HOUR = 'ampere_hour'
|
||||||
|
|
||||||
|
def __str__(self) -> str:
|
||||||
|
return str(self.value)
|
185
kittycad/models/unit_concentration_conversion.py
Normal file
185
kittycad/models/unit_concentration_conversion.py
Normal file
@ -0,0 +1,185 @@
|
|||||||
|
import datetime
|
||||||
|
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||||
|
|
||||||
|
import attr
|
||||||
|
from dateutil.parser import isoparse
|
||||||
|
|
||||||
|
from ..models.uuid import Uuid
|
||||||
|
from ..models.unit_concentration_format import UnitConcentrationFormat
|
||||||
|
from ..models.api_call_status import ApiCallStatus
|
||||||
|
from ..types import UNSET, Unset
|
||||||
|
|
||||||
|
T = TypeVar("T", bound="UnitConcentrationConversion")
|
||||||
|
|
||||||
|
|
||||||
|
@attr.s(auto_attribs=True)
|
||||||
|
class UnitConcentrationConversion:
|
||||||
|
""" """
|
||||||
|
completed_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
created_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
error: Union[Unset, str] = UNSET
|
||||||
|
id: Union[Unset, str] = UNSET
|
||||||
|
input: Union[Unset, float] = UNSET
|
||||||
|
output: Union[Unset, float] = UNSET
|
||||||
|
output_format: Union[Unset, UnitConcentrationFormat] = UNSET
|
||||||
|
src_format: Union[Unset, UnitConcentrationFormat] = UNSET
|
||||||
|
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
status: Union[Unset, ApiCallStatus] = UNSET
|
||||||
|
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
user_id: Union[Unset, str] = UNSET
|
||||||
|
|
||||||
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||||
|
|
||||||
|
def to_dict(self) -> Dict[str, Any]:
|
||||||
|
completed_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.completed_at, Unset):
|
||||||
|
completed_at = self.completed_at.isoformat()
|
||||||
|
created_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.created_at, Unset):
|
||||||
|
created_at = self.created_at.isoformat()
|
||||||
|
error = self.error
|
||||||
|
id = self.id
|
||||||
|
input = self.input
|
||||||
|
output = self.output
|
||||||
|
output_format: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.output_format, Unset):
|
||||||
|
output_format = self.output_format.value
|
||||||
|
src_format: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.src_format, Unset):
|
||||||
|
src_format = self.src_format.value
|
||||||
|
started_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.started_at, Unset):
|
||||||
|
started_at = self.started_at.isoformat()
|
||||||
|
status: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.status, Unset):
|
||||||
|
status = self.status.value
|
||||||
|
updated_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.updated_at, Unset):
|
||||||
|
updated_at = self.updated_at.isoformat()
|
||||||
|
user_id = self.user_id
|
||||||
|
|
||||||
|
field_dict: Dict[str, Any] = {}
|
||||||
|
field_dict.update(self.additional_properties)
|
||||||
|
field_dict.update({})
|
||||||
|
if completed_at is not UNSET:
|
||||||
|
field_dict['completed_at'] = completed_at
|
||||||
|
if created_at is not UNSET:
|
||||||
|
field_dict['created_at'] = created_at
|
||||||
|
if error is not UNSET:
|
||||||
|
field_dict['error'] = error
|
||||||
|
if id is not UNSET:
|
||||||
|
field_dict['id'] = id
|
||||||
|
if input is not UNSET:
|
||||||
|
field_dict['input'] = input
|
||||||
|
if output is not UNSET:
|
||||||
|
field_dict['output'] = output
|
||||||
|
if output_format is not UNSET:
|
||||||
|
field_dict['output_format'] = output_format
|
||||||
|
if src_format is not UNSET:
|
||||||
|
field_dict['src_format'] = src_format
|
||||||
|
if started_at is not UNSET:
|
||||||
|
field_dict['started_at'] = started_at
|
||||||
|
if status is not UNSET:
|
||||||
|
field_dict['status'] = status
|
||||||
|
if updated_at is not UNSET:
|
||||||
|
field_dict['updated_at'] = updated_at
|
||||||
|
if user_id is not UNSET:
|
||||||
|
field_dict['user_id'] = user_id
|
||||||
|
|
||||||
|
return field_dict
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||||
|
d = src_dict.copy()
|
||||||
|
_completed_at = d.pop("completed_at", UNSET)
|
||||||
|
completed_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_completed_at, Unset):
|
||||||
|
completed_at = UNSET
|
||||||
|
else:
|
||||||
|
completed_at = isoparse(_completed_at)
|
||||||
|
|
||||||
|
_created_at = d.pop("created_at", UNSET)
|
||||||
|
created_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_created_at, Unset):
|
||||||
|
created_at = UNSET
|
||||||
|
else:
|
||||||
|
created_at = isoparse(_created_at)
|
||||||
|
|
||||||
|
error = d.pop("error", UNSET)
|
||||||
|
|
||||||
|
id = d.pop("id", UNSET)
|
||||||
|
|
||||||
|
input = d.pop("input", UNSET)
|
||||||
|
|
||||||
|
output = d.pop("output", UNSET)
|
||||||
|
|
||||||
|
_output_format = d.pop("output_format", UNSET)
|
||||||
|
output_format: Union[Unset, UnitConcentrationFormat]
|
||||||
|
if isinstance(_output_format, Unset):
|
||||||
|
output_format = UNSET
|
||||||
|
else:
|
||||||
|
output_format = UnitConcentrationFormat(_output_format)
|
||||||
|
|
||||||
|
_src_format = d.pop("src_format", UNSET)
|
||||||
|
src_format: Union[Unset, UnitConcentrationFormat]
|
||||||
|
if isinstance(_src_format, Unset):
|
||||||
|
src_format = UNSET
|
||||||
|
else:
|
||||||
|
src_format = UnitConcentrationFormat(_src_format)
|
||||||
|
|
||||||
|
_started_at = d.pop("started_at", UNSET)
|
||||||
|
started_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_started_at, Unset):
|
||||||
|
started_at = UNSET
|
||||||
|
else:
|
||||||
|
started_at = isoparse(_started_at)
|
||||||
|
|
||||||
|
_status = d.pop("status", UNSET)
|
||||||
|
status: Union[Unset, ApiCallStatus]
|
||||||
|
if isinstance(_status, Unset):
|
||||||
|
status = UNSET
|
||||||
|
else:
|
||||||
|
status = ApiCallStatus(_status)
|
||||||
|
|
||||||
|
_updated_at = d.pop("updated_at", UNSET)
|
||||||
|
updated_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_updated_at, Unset):
|
||||||
|
updated_at = UNSET
|
||||||
|
else:
|
||||||
|
updated_at = isoparse(_updated_at)
|
||||||
|
|
||||||
|
user_id = d.pop("user_id", UNSET)
|
||||||
|
|
||||||
|
unit_concentration_conversion = cls(
|
||||||
|
completed_at=completed_at,
|
||||||
|
created_at=created_at,
|
||||||
|
error=error,
|
||||||
|
id=id,
|
||||||
|
input=input,
|
||||||
|
output=output,
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
started_at=started_at,
|
||||||
|
status=status,
|
||||||
|
updated_at=updated_at,
|
||||||
|
user_id=user_id,
|
||||||
|
)
|
||||||
|
|
||||||
|
unit_concentration_conversion.additional_properties = d
|
||||||
|
return unit_concentration_conversion
|
||||||
|
|
||||||
|
@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
|
11
kittycad/models/unit_concentration_format.py
Normal file
11
kittycad/models/unit_concentration_format.py
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
|
||||||
|
class UnitConcentrationFormat(str, Enum):
|
||||||
|
PARTS_PER_MILLION = 'parts_per_million'
|
||||||
|
PARTS_PER_BILLION = 'parts_per_billion'
|
||||||
|
PARTS_PER_TRILLION = 'parts_per_trillion'
|
||||||
|
PERCENT = 'percent'
|
||||||
|
|
||||||
|
def __str__(self) -> str:
|
||||||
|
return str(self.value)
|
185
kittycad/models/unit_data_conversion.py
Normal file
185
kittycad/models/unit_data_conversion.py
Normal file
@ -0,0 +1,185 @@
|
|||||||
|
import datetime
|
||||||
|
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||||
|
|
||||||
|
import attr
|
||||||
|
from dateutil.parser import isoparse
|
||||||
|
|
||||||
|
from ..models.uuid import Uuid
|
||||||
|
from ..models.unit_data_format import UnitDataFormat
|
||||||
|
from ..models.api_call_status import ApiCallStatus
|
||||||
|
from ..types import UNSET, Unset
|
||||||
|
|
||||||
|
T = TypeVar("T", bound="UnitDataConversion")
|
||||||
|
|
||||||
|
|
||||||
|
@attr.s(auto_attribs=True)
|
||||||
|
class UnitDataConversion:
|
||||||
|
""" """
|
||||||
|
completed_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
created_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
error: Union[Unset, str] = UNSET
|
||||||
|
id: Union[Unset, str] = UNSET
|
||||||
|
input: Union[Unset, float] = UNSET
|
||||||
|
output: Union[Unset, float] = UNSET
|
||||||
|
output_format: Union[Unset, UnitDataFormat] = UNSET
|
||||||
|
src_format: Union[Unset, UnitDataFormat] = UNSET
|
||||||
|
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
status: Union[Unset, ApiCallStatus] = UNSET
|
||||||
|
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
user_id: Union[Unset, str] = UNSET
|
||||||
|
|
||||||
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||||
|
|
||||||
|
def to_dict(self) -> Dict[str, Any]:
|
||||||
|
completed_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.completed_at, Unset):
|
||||||
|
completed_at = self.completed_at.isoformat()
|
||||||
|
created_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.created_at, Unset):
|
||||||
|
created_at = self.created_at.isoformat()
|
||||||
|
error = self.error
|
||||||
|
id = self.id
|
||||||
|
input = self.input
|
||||||
|
output = self.output
|
||||||
|
output_format: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.output_format, Unset):
|
||||||
|
output_format = self.output_format.value
|
||||||
|
src_format: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.src_format, Unset):
|
||||||
|
src_format = self.src_format.value
|
||||||
|
started_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.started_at, Unset):
|
||||||
|
started_at = self.started_at.isoformat()
|
||||||
|
status: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.status, Unset):
|
||||||
|
status = self.status.value
|
||||||
|
updated_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.updated_at, Unset):
|
||||||
|
updated_at = self.updated_at.isoformat()
|
||||||
|
user_id = self.user_id
|
||||||
|
|
||||||
|
field_dict: Dict[str, Any] = {}
|
||||||
|
field_dict.update(self.additional_properties)
|
||||||
|
field_dict.update({})
|
||||||
|
if completed_at is not UNSET:
|
||||||
|
field_dict['completed_at'] = completed_at
|
||||||
|
if created_at is not UNSET:
|
||||||
|
field_dict['created_at'] = created_at
|
||||||
|
if error is not UNSET:
|
||||||
|
field_dict['error'] = error
|
||||||
|
if id is not UNSET:
|
||||||
|
field_dict['id'] = id
|
||||||
|
if input is not UNSET:
|
||||||
|
field_dict['input'] = input
|
||||||
|
if output is not UNSET:
|
||||||
|
field_dict['output'] = output
|
||||||
|
if output_format is not UNSET:
|
||||||
|
field_dict['output_format'] = output_format
|
||||||
|
if src_format is not UNSET:
|
||||||
|
field_dict['src_format'] = src_format
|
||||||
|
if started_at is not UNSET:
|
||||||
|
field_dict['started_at'] = started_at
|
||||||
|
if status is not UNSET:
|
||||||
|
field_dict['status'] = status
|
||||||
|
if updated_at is not UNSET:
|
||||||
|
field_dict['updated_at'] = updated_at
|
||||||
|
if user_id is not UNSET:
|
||||||
|
field_dict['user_id'] = user_id
|
||||||
|
|
||||||
|
return field_dict
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||||
|
d = src_dict.copy()
|
||||||
|
_completed_at = d.pop("completed_at", UNSET)
|
||||||
|
completed_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_completed_at, Unset):
|
||||||
|
completed_at = UNSET
|
||||||
|
else:
|
||||||
|
completed_at = isoparse(_completed_at)
|
||||||
|
|
||||||
|
_created_at = d.pop("created_at", UNSET)
|
||||||
|
created_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_created_at, Unset):
|
||||||
|
created_at = UNSET
|
||||||
|
else:
|
||||||
|
created_at = isoparse(_created_at)
|
||||||
|
|
||||||
|
error = d.pop("error", UNSET)
|
||||||
|
|
||||||
|
id = d.pop("id", UNSET)
|
||||||
|
|
||||||
|
input = d.pop("input", UNSET)
|
||||||
|
|
||||||
|
output = d.pop("output", UNSET)
|
||||||
|
|
||||||
|
_output_format = d.pop("output_format", UNSET)
|
||||||
|
output_format: Union[Unset, UnitDataFormat]
|
||||||
|
if isinstance(_output_format, Unset):
|
||||||
|
output_format = UNSET
|
||||||
|
else:
|
||||||
|
output_format = UnitDataFormat(_output_format)
|
||||||
|
|
||||||
|
_src_format = d.pop("src_format", UNSET)
|
||||||
|
src_format: Union[Unset, UnitDataFormat]
|
||||||
|
if isinstance(_src_format, Unset):
|
||||||
|
src_format = UNSET
|
||||||
|
else:
|
||||||
|
src_format = UnitDataFormat(_src_format)
|
||||||
|
|
||||||
|
_started_at = d.pop("started_at", UNSET)
|
||||||
|
started_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_started_at, Unset):
|
||||||
|
started_at = UNSET
|
||||||
|
else:
|
||||||
|
started_at = isoparse(_started_at)
|
||||||
|
|
||||||
|
_status = d.pop("status", UNSET)
|
||||||
|
status: Union[Unset, ApiCallStatus]
|
||||||
|
if isinstance(_status, Unset):
|
||||||
|
status = UNSET
|
||||||
|
else:
|
||||||
|
status = ApiCallStatus(_status)
|
||||||
|
|
||||||
|
_updated_at = d.pop("updated_at", UNSET)
|
||||||
|
updated_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_updated_at, Unset):
|
||||||
|
updated_at = UNSET
|
||||||
|
else:
|
||||||
|
updated_at = isoparse(_updated_at)
|
||||||
|
|
||||||
|
user_id = d.pop("user_id", UNSET)
|
||||||
|
|
||||||
|
unit_data_conversion = cls(
|
||||||
|
completed_at=completed_at,
|
||||||
|
created_at=created_at,
|
||||||
|
error=error,
|
||||||
|
id=id,
|
||||||
|
input=input,
|
||||||
|
output=output,
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
started_at=started_at,
|
||||||
|
status=status,
|
||||||
|
updated_at=updated_at,
|
||||||
|
user_id=user_id,
|
||||||
|
)
|
||||||
|
|
||||||
|
unit_data_conversion.additional_properties = d
|
||||||
|
return unit_data_conversion
|
||||||
|
|
||||||
|
@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
|
11
kittycad/models/unit_data_format.py
Normal file
11
kittycad/models/unit_data_format.py
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
|
||||||
|
class UnitDataFormat(str, Enum):
|
||||||
|
BYTE = 'byte'
|
||||||
|
EXABYTE = 'exabyte'
|
||||||
|
BIT = 'bit'
|
||||||
|
EXABIT = 'exabit'
|
||||||
|
|
||||||
|
def __str__(self) -> str:
|
||||||
|
return str(self.value)
|
185
kittycad/models/unit_data_transfer_rate_conversion.py
Normal file
185
kittycad/models/unit_data_transfer_rate_conversion.py
Normal file
@ -0,0 +1,185 @@
|
|||||||
|
import datetime
|
||||||
|
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||||
|
|
||||||
|
import attr
|
||||||
|
from dateutil.parser import isoparse
|
||||||
|
|
||||||
|
from ..models.uuid import Uuid
|
||||||
|
from ..models.unit_data_transfer_rate_format import UnitDataTransferRateFormat
|
||||||
|
from ..models.api_call_status import ApiCallStatus
|
||||||
|
from ..types import UNSET, Unset
|
||||||
|
|
||||||
|
T = TypeVar("T", bound="UnitDataTransferRateConversion")
|
||||||
|
|
||||||
|
|
||||||
|
@attr.s(auto_attribs=True)
|
||||||
|
class UnitDataTransferRateConversion:
|
||||||
|
""" """
|
||||||
|
completed_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
created_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
error: Union[Unset, str] = UNSET
|
||||||
|
id: Union[Unset, str] = UNSET
|
||||||
|
input: Union[Unset, float] = UNSET
|
||||||
|
output: Union[Unset, float] = UNSET
|
||||||
|
output_format: Union[Unset, UnitDataTransferRateFormat] = UNSET
|
||||||
|
src_format: Union[Unset, UnitDataTransferRateFormat] = UNSET
|
||||||
|
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
status: Union[Unset, ApiCallStatus] = UNSET
|
||||||
|
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
user_id: Union[Unset, str] = UNSET
|
||||||
|
|
||||||
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||||
|
|
||||||
|
def to_dict(self) -> Dict[str, Any]:
|
||||||
|
completed_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.completed_at, Unset):
|
||||||
|
completed_at = self.completed_at.isoformat()
|
||||||
|
created_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.created_at, Unset):
|
||||||
|
created_at = self.created_at.isoformat()
|
||||||
|
error = self.error
|
||||||
|
id = self.id
|
||||||
|
input = self.input
|
||||||
|
output = self.output
|
||||||
|
output_format: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.output_format, Unset):
|
||||||
|
output_format = self.output_format.value
|
||||||
|
src_format: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.src_format, Unset):
|
||||||
|
src_format = self.src_format.value
|
||||||
|
started_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.started_at, Unset):
|
||||||
|
started_at = self.started_at.isoformat()
|
||||||
|
status: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.status, Unset):
|
||||||
|
status = self.status.value
|
||||||
|
updated_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.updated_at, Unset):
|
||||||
|
updated_at = self.updated_at.isoformat()
|
||||||
|
user_id = self.user_id
|
||||||
|
|
||||||
|
field_dict: Dict[str, Any] = {}
|
||||||
|
field_dict.update(self.additional_properties)
|
||||||
|
field_dict.update({})
|
||||||
|
if completed_at is not UNSET:
|
||||||
|
field_dict['completed_at'] = completed_at
|
||||||
|
if created_at is not UNSET:
|
||||||
|
field_dict['created_at'] = created_at
|
||||||
|
if error is not UNSET:
|
||||||
|
field_dict['error'] = error
|
||||||
|
if id is not UNSET:
|
||||||
|
field_dict['id'] = id
|
||||||
|
if input is not UNSET:
|
||||||
|
field_dict['input'] = input
|
||||||
|
if output is not UNSET:
|
||||||
|
field_dict['output'] = output
|
||||||
|
if output_format is not UNSET:
|
||||||
|
field_dict['output_format'] = output_format
|
||||||
|
if src_format is not UNSET:
|
||||||
|
field_dict['src_format'] = src_format
|
||||||
|
if started_at is not UNSET:
|
||||||
|
field_dict['started_at'] = started_at
|
||||||
|
if status is not UNSET:
|
||||||
|
field_dict['status'] = status
|
||||||
|
if updated_at is not UNSET:
|
||||||
|
field_dict['updated_at'] = updated_at
|
||||||
|
if user_id is not UNSET:
|
||||||
|
field_dict['user_id'] = user_id
|
||||||
|
|
||||||
|
return field_dict
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||||
|
d = src_dict.copy()
|
||||||
|
_completed_at = d.pop("completed_at", UNSET)
|
||||||
|
completed_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_completed_at, Unset):
|
||||||
|
completed_at = UNSET
|
||||||
|
else:
|
||||||
|
completed_at = isoparse(_completed_at)
|
||||||
|
|
||||||
|
_created_at = d.pop("created_at", UNSET)
|
||||||
|
created_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_created_at, Unset):
|
||||||
|
created_at = UNSET
|
||||||
|
else:
|
||||||
|
created_at = isoparse(_created_at)
|
||||||
|
|
||||||
|
error = d.pop("error", UNSET)
|
||||||
|
|
||||||
|
id = d.pop("id", UNSET)
|
||||||
|
|
||||||
|
input = d.pop("input", UNSET)
|
||||||
|
|
||||||
|
output = d.pop("output", UNSET)
|
||||||
|
|
||||||
|
_output_format = d.pop("output_format", UNSET)
|
||||||
|
output_format: Union[Unset, UnitDataTransferRateFormat]
|
||||||
|
if isinstance(_output_format, Unset):
|
||||||
|
output_format = UNSET
|
||||||
|
else:
|
||||||
|
output_format = UnitDataTransferRateFormat(_output_format)
|
||||||
|
|
||||||
|
_src_format = d.pop("src_format", UNSET)
|
||||||
|
src_format: Union[Unset, UnitDataTransferRateFormat]
|
||||||
|
if isinstance(_src_format, Unset):
|
||||||
|
src_format = UNSET
|
||||||
|
else:
|
||||||
|
src_format = UnitDataTransferRateFormat(_src_format)
|
||||||
|
|
||||||
|
_started_at = d.pop("started_at", UNSET)
|
||||||
|
started_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_started_at, Unset):
|
||||||
|
started_at = UNSET
|
||||||
|
else:
|
||||||
|
started_at = isoparse(_started_at)
|
||||||
|
|
||||||
|
_status = d.pop("status", UNSET)
|
||||||
|
status: Union[Unset, ApiCallStatus]
|
||||||
|
if isinstance(_status, Unset):
|
||||||
|
status = UNSET
|
||||||
|
else:
|
||||||
|
status = ApiCallStatus(_status)
|
||||||
|
|
||||||
|
_updated_at = d.pop("updated_at", UNSET)
|
||||||
|
updated_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_updated_at, Unset):
|
||||||
|
updated_at = UNSET
|
||||||
|
else:
|
||||||
|
updated_at = isoparse(_updated_at)
|
||||||
|
|
||||||
|
user_id = d.pop("user_id", UNSET)
|
||||||
|
|
||||||
|
unit_data_transfer_rate_conversion = cls(
|
||||||
|
completed_at=completed_at,
|
||||||
|
created_at=created_at,
|
||||||
|
error=error,
|
||||||
|
id=id,
|
||||||
|
input=input,
|
||||||
|
output=output,
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
started_at=started_at,
|
||||||
|
status=status,
|
||||||
|
updated_at=updated_at,
|
||||||
|
user_id=user_id,
|
||||||
|
)
|
||||||
|
|
||||||
|
unit_data_transfer_rate_conversion.additional_properties = d
|
||||||
|
return unit_data_transfer_rate_conversion
|
||||||
|
|
||||||
|
@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
|
11
kittycad/models/unit_data_transfer_rate_format.py
Normal file
11
kittycad/models/unit_data_transfer_rate_format.py
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
|
||||||
|
class UnitDataTransferRateFormat(str, Enum):
|
||||||
|
BYTES_PER_SECOND = 'bytes_per_second'
|
||||||
|
EXABYTES_PER_SECOND = 'exabytes_per_second'
|
||||||
|
BITS_PER_SECOND = 'bits_per_second'
|
||||||
|
EXABITS_PER_SECOND = 'exabits_per_second'
|
||||||
|
|
||||||
|
def __str__(self) -> str:
|
||||||
|
return str(self.value)
|
185
kittycad/models/unit_density_conversion.py
Normal file
185
kittycad/models/unit_density_conversion.py
Normal file
@ -0,0 +1,185 @@
|
|||||||
|
import datetime
|
||||||
|
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||||
|
|
||||||
|
import attr
|
||||||
|
from dateutil.parser import isoparse
|
||||||
|
|
||||||
|
from ..models.uuid import Uuid
|
||||||
|
from ..models.unit_density_format import UnitDensityFormat
|
||||||
|
from ..models.api_call_status import ApiCallStatus
|
||||||
|
from ..types import UNSET, Unset
|
||||||
|
|
||||||
|
T = TypeVar("T", bound="UnitDensityConversion")
|
||||||
|
|
||||||
|
|
||||||
|
@attr.s(auto_attribs=True)
|
||||||
|
class UnitDensityConversion:
|
||||||
|
""" """
|
||||||
|
completed_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
created_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
error: Union[Unset, str] = UNSET
|
||||||
|
id: Union[Unset, str] = UNSET
|
||||||
|
input: Union[Unset, float] = UNSET
|
||||||
|
output: Union[Unset, float] = UNSET
|
||||||
|
output_format: Union[Unset, UnitDensityFormat] = UNSET
|
||||||
|
src_format: Union[Unset, UnitDensityFormat] = UNSET
|
||||||
|
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
status: Union[Unset, ApiCallStatus] = UNSET
|
||||||
|
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
user_id: Union[Unset, str] = UNSET
|
||||||
|
|
||||||
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||||
|
|
||||||
|
def to_dict(self) -> Dict[str, Any]:
|
||||||
|
completed_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.completed_at, Unset):
|
||||||
|
completed_at = self.completed_at.isoformat()
|
||||||
|
created_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.created_at, Unset):
|
||||||
|
created_at = self.created_at.isoformat()
|
||||||
|
error = self.error
|
||||||
|
id = self.id
|
||||||
|
input = self.input
|
||||||
|
output = self.output
|
||||||
|
output_format: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.output_format, Unset):
|
||||||
|
output_format = self.output_format.value
|
||||||
|
src_format: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.src_format, Unset):
|
||||||
|
src_format = self.src_format.value
|
||||||
|
started_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.started_at, Unset):
|
||||||
|
started_at = self.started_at.isoformat()
|
||||||
|
status: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.status, Unset):
|
||||||
|
status = self.status.value
|
||||||
|
updated_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.updated_at, Unset):
|
||||||
|
updated_at = self.updated_at.isoformat()
|
||||||
|
user_id = self.user_id
|
||||||
|
|
||||||
|
field_dict: Dict[str, Any] = {}
|
||||||
|
field_dict.update(self.additional_properties)
|
||||||
|
field_dict.update({})
|
||||||
|
if completed_at is not UNSET:
|
||||||
|
field_dict['completed_at'] = completed_at
|
||||||
|
if created_at is not UNSET:
|
||||||
|
field_dict['created_at'] = created_at
|
||||||
|
if error is not UNSET:
|
||||||
|
field_dict['error'] = error
|
||||||
|
if id is not UNSET:
|
||||||
|
field_dict['id'] = id
|
||||||
|
if input is not UNSET:
|
||||||
|
field_dict['input'] = input
|
||||||
|
if output is not UNSET:
|
||||||
|
field_dict['output'] = output
|
||||||
|
if output_format is not UNSET:
|
||||||
|
field_dict['output_format'] = output_format
|
||||||
|
if src_format is not UNSET:
|
||||||
|
field_dict['src_format'] = src_format
|
||||||
|
if started_at is not UNSET:
|
||||||
|
field_dict['started_at'] = started_at
|
||||||
|
if status is not UNSET:
|
||||||
|
field_dict['status'] = status
|
||||||
|
if updated_at is not UNSET:
|
||||||
|
field_dict['updated_at'] = updated_at
|
||||||
|
if user_id is not UNSET:
|
||||||
|
field_dict['user_id'] = user_id
|
||||||
|
|
||||||
|
return field_dict
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||||
|
d = src_dict.copy()
|
||||||
|
_completed_at = d.pop("completed_at", UNSET)
|
||||||
|
completed_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_completed_at, Unset):
|
||||||
|
completed_at = UNSET
|
||||||
|
else:
|
||||||
|
completed_at = isoparse(_completed_at)
|
||||||
|
|
||||||
|
_created_at = d.pop("created_at", UNSET)
|
||||||
|
created_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_created_at, Unset):
|
||||||
|
created_at = UNSET
|
||||||
|
else:
|
||||||
|
created_at = isoparse(_created_at)
|
||||||
|
|
||||||
|
error = d.pop("error", UNSET)
|
||||||
|
|
||||||
|
id = d.pop("id", UNSET)
|
||||||
|
|
||||||
|
input = d.pop("input", UNSET)
|
||||||
|
|
||||||
|
output = d.pop("output", UNSET)
|
||||||
|
|
||||||
|
_output_format = d.pop("output_format", UNSET)
|
||||||
|
output_format: Union[Unset, UnitDensityFormat]
|
||||||
|
if isinstance(_output_format, Unset):
|
||||||
|
output_format = UNSET
|
||||||
|
else:
|
||||||
|
output_format = UnitDensityFormat(_output_format)
|
||||||
|
|
||||||
|
_src_format = d.pop("src_format", UNSET)
|
||||||
|
src_format: Union[Unset, UnitDensityFormat]
|
||||||
|
if isinstance(_src_format, Unset):
|
||||||
|
src_format = UNSET
|
||||||
|
else:
|
||||||
|
src_format = UnitDensityFormat(_src_format)
|
||||||
|
|
||||||
|
_started_at = d.pop("started_at", UNSET)
|
||||||
|
started_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_started_at, Unset):
|
||||||
|
started_at = UNSET
|
||||||
|
else:
|
||||||
|
started_at = isoparse(_started_at)
|
||||||
|
|
||||||
|
_status = d.pop("status", UNSET)
|
||||||
|
status: Union[Unset, ApiCallStatus]
|
||||||
|
if isinstance(_status, Unset):
|
||||||
|
status = UNSET
|
||||||
|
else:
|
||||||
|
status = ApiCallStatus(_status)
|
||||||
|
|
||||||
|
_updated_at = d.pop("updated_at", UNSET)
|
||||||
|
updated_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_updated_at, Unset):
|
||||||
|
updated_at = UNSET
|
||||||
|
else:
|
||||||
|
updated_at = isoparse(_updated_at)
|
||||||
|
|
||||||
|
user_id = d.pop("user_id", UNSET)
|
||||||
|
|
||||||
|
unit_density_conversion = cls(
|
||||||
|
completed_at=completed_at,
|
||||||
|
created_at=created_at,
|
||||||
|
error=error,
|
||||||
|
id=id,
|
||||||
|
input=input,
|
||||||
|
output=output,
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
started_at=started_at,
|
||||||
|
status=status,
|
||||||
|
updated_at=updated_at,
|
||||||
|
user_id=user_id,
|
||||||
|
)
|
||||||
|
|
||||||
|
unit_density_conversion.additional_properties = d
|
||||||
|
return unit_density_conversion
|
||||||
|
|
||||||
|
@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
|
17
kittycad/models/unit_density_format.py
Normal file
17
kittycad/models/unit_density_format.py
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
|
||||||
|
class UnitDensityFormat(str, Enum):
|
||||||
|
KILOGRAMS_PER_CUBIC_METER = 'kilograms_per_cubic_meter'
|
||||||
|
GRAMS_PER_MILLILITER = 'grams_per_milliliter'
|
||||||
|
KILOGRAMS_PER_LITER = 'kilograms_per_liter'
|
||||||
|
OUNCES_PER_CUBIC_FOOT = 'ounces_per_cubic_foot'
|
||||||
|
OUNCES_PER_CUBIC_INCH = 'ounces_per_cubic_inch'
|
||||||
|
OUNCES_PER_GALLON = 'ounces_per_gallon'
|
||||||
|
POUNDS_PER_CUBIC_FOOT = 'pounds_per_cubic_foot'
|
||||||
|
POUNDS_PER_CUBIC_INCH = 'pounds_per_cubic_inch'
|
||||||
|
POUNDS_PER_GALLON = 'pounds_per_gallon'
|
||||||
|
SLUGS_PER_CUBIC_FOOT = 'slugs_per_cubic_foot'
|
||||||
|
|
||||||
|
def __str__(self) -> str:
|
||||||
|
return str(self.value)
|
185
kittycad/models/unit_energy_conversion.py
Normal file
185
kittycad/models/unit_energy_conversion.py
Normal file
@ -0,0 +1,185 @@
|
|||||||
|
import datetime
|
||||||
|
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||||
|
|
||||||
|
import attr
|
||||||
|
from dateutil.parser import isoparse
|
||||||
|
|
||||||
|
from ..models.uuid import Uuid
|
||||||
|
from ..models.unit_energy_format import UnitEnergyFormat
|
||||||
|
from ..models.api_call_status import ApiCallStatus
|
||||||
|
from ..types import UNSET, Unset
|
||||||
|
|
||||||
|
T = TypeVar("T", bound="UnitEnergyConversion")
|
||||||
|
|
||||||
|
|
||||||
|
@attr.s(auto_attribs=True)
|
||||||
|
class UnitEnergyConversion:
|
||||||
|
""" """
|
||||||
|
completed_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
created_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
error: Union[Unset, str] = UNSET
|
||||||
|
id: Union[Unset, str] = UNSET
|
||||||
|
input: Union[Unset, float] = UNSET
|
||||||
|
output: Union[Unset, float] = UNSET
|
||||||
|
output_format: Union[Unset, UnitEnergyFormat] = UNSET
|
||||||
|
src_format: Union[Unset, UnitEnergyFormat] = UNSET
|
||||||
|
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
status: Union[Unset, ApiCallStatus] = UNSET
|
||||||
|
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
user_id: Union[Unset, str] = UNSET
|
||||||
|
|
||||||
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||||
|
|
||||||
|
def to_dict(self) -> Dict[str, Any]:
|
||||||
|
completed_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.completed_at, Unset):
|
||||||
|
completed_at = self.completed_at.isoformat()
|
||||||
|
created_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.created_at, Unset):
|
||||||
|
created_at = self.created_at.isoformat()
|
||||||
|
error = self.error
|
||||||
|
id = self.id
|
||||||
|
input = self.input
|
||||||
|
output = self.output
|
||||||
|
output_format: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.output_format, Unset):
|
||||||
|
output_format = self.output_format.value
|
||||||
|
src_format: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.src_format, Unset):
|
||||||
|
src_format = self.src_format.value
|
||||||
|
started_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.started_at, Unset):
|
||||||
|
started_at = self.started_at.isoformat()
|
||||||
|
status: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.status, Unset):
|
||||||
|
status = self.status.value
|
||||||
|
updated_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.updated_at, Unset):
|
||||||
|
updated_at = self.updated_at.isoformat()
|
||||||
|
user_id = self.user_id
|
||||||
|
|
||||||
|
field_dict: Dict[str, Any] = {}
|
||||||
|
field_dict.update(self.additional_properties)
|
||||||
|
field_dict.update({})
|
||||||
|
if completed_at is not UNSET:
|
||||||
|
field_dict['completed_at'] = completed_at
|
||||||
|
if created_at is not UNSET:
|
||||||
|
field_dict['created_at'] = created_at
|
||||||
|
if error is not UNSET:
|
||||||
|
field_dict['error'] = error
|
||||||
|
if id is not UNSET:
|
||||||
|
field_dict['id'] = id
|
||||||
|
if input is not UNSET:
|
||||||
|
field_dict['input'] = input
|
||||||
|
if output is not UNSET:
|
||||||
|
field_dict['output'] = output
|
||||||
|
if output_format is not UNSET:
|
||||||
|
field_dict['output_format'] = output_format
|
||||||
|
if src_format is not UNSET:
|
||||||
|
field_dict['src_format'] = src_format
|
||||||
|
if started_at is not UNSET:
|
||||||
|
field_dict['started_at'] = started_at
|
||||||
|
if status is not UNSET:
|
||||||
|
field_dict['status'] = status
|
||||||
|
if updated_at is not UNSET:
|
||||||
|
field_dict['updated_at'] = updated_at
|
||||||
|
if user_id is not UNSET:
|
||||||
|
field_dict['user_id'] = user_id
|
||||||
|
|
||||||
|
return field_dict
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||||
|
d = src_dict.copy()
|
||||||
|
_completed_at = d.pop("completed_at", UNSET)
|
||||||
|
completed_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_completed_at, Unset):
|
||||||
|
completed_at = UNSET
|
||||||
|
else:
|
||||||
|
completed_at = isoparse(_completed_at)
|
||||||
|
|
||||||
|
_created_at = d.pop("created_at", UNSET)
|
||||||
|
created_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_created_at, Unset):
|
||||||
|
created_at = UNSET
|
||||||
|
else:
|
||||||
|
created_at = isoparse(_created_at)
|
||||||
|
|
||||||
|
error = d.pop("error", UNSET)
|
||||||
|
|
||||||
|
id = d.pop("id", UNSET)
|
||||||
|
|
||||||
|
input = d.pop("input", UNSET)
|
||||||
|
|
||||||
|
output = d.pop("output", UNSET)
|
||||||
|
|
||||||
|
_output_format = d.pop("output_format", UNSET)
|
||||||
|
output_format: Union[Unset, UnitEnergyFormat]
|
||||||
|
if isinstance(_output_format, Unset):
|
||||||
|
output_format = UNSET
|
||||||
|
else:
|
||||||
|
output_format = UnitEnergyFormat(_output_format)
|
||||||
|
|
||||||
|
_src_format = d.pop("src_format", UNSET)
|
||||||
|
src_format: Union[Unset, UnitEnergyFormat]
|
||||||
|
if isinstance(_src_format, Unset):
|
||||||
|
src_format = UNSET
|
||||||
|
else:
|
||||||
|
src_format = UnitEnergyFormat(_src_format)
|
||||||
|
|
||||||
|
_started_at = d.pop("started_at", UNSET)
|
||||||
|
started_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_started_at, Unset):
|
||||||
|
started_at = UNSET
|
||||||
|
else:
|
||||||
|
started_at = isoparse(_started_at)
|
||||||
|
|
||||||
|
_status = d.pop("status", UNSET)
|
||||||
|
status: Union[Unset, ApiCallStatus]
|
||||||
|
if isinstance(_status, Unset):
|
||||||
|
status = UNSET
|
||||||
|
else:
|
||||||
|
status = ApiCallStatus(_status)
|
||||||
|
|
||||||
|
_updated_at = d.pop("updated_at", UNSET)
|
||||||
|
updated_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_updated_at, Unset):
|
||||||
|
updated_at = UNSET
|
||||||
|
else:
|
||||||
|
updated_at = isoparse(_updated_at)
|
||||||
|
|
||||||
|
user_id = d.pop("user_id", UNSET)
|
||||||
|
|
||||||
|
unit_energy_conversion = cls(
|
||||||
|
completed_at=completed_at,
|
||||||
|
created_at=created_at,
|
||||||
|
error=error,
|
||||||
|
id=id,
|
||||||
|
input=input,
|
||||||
|
output=output,
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
started_at=started_at,
|
||||||
|
status=status,
|
||||||
|
updated_at=updated_at,
|
||||||
|
user_id=user_id,
|
||||||
|
)
|
||||||
|
|
||||||
|
unit_energy_conversion.additional_properties = d
|
||||||
|
return unit_energy_conversion
|
||||||
|
|
||||||
|
@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
|
13
kittycad/models/unit_energy_format.py
Normal file
13
kittycad/models/unit_energy_format.py
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
|
||||||
|
class UnitEnergyFormat(str, Enum):
|
||||||
|
JOULE = 'joule'
|
||||||
|
CALORIE = 'calorie'
|
||||||
|
BRITISH_THERMAL_UNIT = 'british_thermal_unit'
|
||||||
|
BRITISH_THERMAL_UNIT_ISO = 'british_thermal_unit_iso'
|
||||||
|
BRITISH_THERMAL_UNIT59 = 'british_thermal_unit59'
|
||||||
|
FOOT_POUND = 'foot_pound'
|
||||||
|
|
||||||
|
def __str__(self) -> str:
|
||||||
|
return str(self.value)
|
185
kittycad/models/unit_force_conversion.py
Normal file
185
kittycad/models/unit_force_conversion.py
Normal file
@ -0,0 +1,185 @@
|
|||||||
|
import datetime
|
||||||
|
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||||
|
|
||||||
|
import attr
|
||||||
|
from dateutil.parser import isoparse
|
||||||
|
|
||||||
|
from ..models.uuid import Uuid
|
||||||
|
from ..models.unit_force_format import UnitForceFormat
|
||||||
|
from ..models.api_call_status import ApiCallStatus
|
||||||
|
from ..types import UNSET, Unset
|
||||||
|
|
||||||
|
T = TypeVar("T", bound="UnitForceConversion")
|
||||||
|
|
||||||
|
|
||||||
|
@attr.s(auto_attribs=True)
|
||||||
|
class UnitForceConversion:
|
||||||
|
""" """
|
||||||
|
completed_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
created_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
error: Union[Unset, str] = UNSET
|
||||||
|
id: Union[Unset, str] = UNSET
|
||||||
|
input: Union[Unset, float] = UNSET
|
||||||
|
output: Union[Unset, float] = UNSET
|
||||||
|
output_format: Union[Unset, UnitForceFormat] = UNSET
|
||||||
|
src_format: Union[Unset, UnitForceFormat] = UNSET
|
||||||
|
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
status: Union[Unset, ApiCallStatus] = UNSET
|
||||||
|
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
user_id: Union[Unset, str] = UNSET
|
||||||
|
|
||||||
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||||
|
|
||||||
|
def to_dict(self) -> Dict[str, Any]:
|
||||||
|
completed_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.completed_at, Unset):
|
||||||
|
completed_at = self.completed_at.isoformat()
|
||||||
|
created_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.created_at, Unset):
|
||||||
|
created_at = self.created_at.isoformat()
|
||||||
|
error = self.error
|
||||||
|
id = self.id
|
||||||
|
input = self.input
|
||||||
|
output = self.output
|
||||||
|
output_format: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.output_format, Unset):
|
||||||
|
output_format = self.output_format.value
|
||||||
|
src_format: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.src_format, Unset):
|
||||||
|
src_format = self.src_format.value
|
||||||
|
started_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.started_at, Unset):
|
||||||
|
started_at = self.started_at.isoformat()
|
||||||
|
status: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.status, Unset):
|
||||||
|
status = self.status.value
|
||||||
|
updated_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.updated_at, Unset):
|
||||||
|
updated_at = self.updated_at.isoformat()
|
||||||
|
user_id = self.user_id
|
||||||
|
|
||||||
|
field_dict: Dict[str, Any] = {}
|
||||||
|
field_dict.update(self.additional_properties)
|
||||||
|
field_dict.update({})
|
||||||
|
if completed_at is not UNSET:
|
||||||
|
field_dict['completed_at'] = completed_at
|
||||||
|
if created_at is not UNSET:
|
||||||
|
field_dict['created_at'] = created_at
|
||||||
|
if error is not UNSET:
|
||||||
|
field_dict['error'] = error
|
||||||
|
if id is not UNSET:
|
||||||
|
field_dict['id'] = id
|
||||||
|
if input is not UNSET:
|
||||||
|
field_dict['input'] = input
|
||||||
|
if output is not UNSET:
|
||||||
|
field_dict['output'] = output
|
||||||
|
if output_format is not UNSET:
|
||||||
|
field_dict['output_format'] = output_format
|
||||||
|
if src_format is not UNSET:
|
||||||
|
field_dict['src_format'] = src_format
|
||||||
|
if started_at is not UNSET:
|
||||||
|
field_dict['started_at'] = started_at
|
||||||
|
if status is not UNSET:
|
||||||
|
field_dict['status'] = status
|
||||||
|
if updated_at is not UNSET:
|
||||||
|
field_dict['updated_at'] = updated_at
|
||||||
|
if user_id is not UNSET:
|
||||||
|
field_dict['user_id'] = user_id
|
||||||
|
|
||||||
|
return field_dict
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||||
|
d = src_dict.copy()
|
||||||
|
_completed_at = d.pop("completed_at", UNSET)
|
||||||
|
completed_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_completed_at, Unset):
|
||||||
|
completed_at = UNSET
|
||||||
|
else:
|
||||||
|
completed_at = isoparse(_completed_at)
|
||||||
|
|
||||||
|
_created_at = d.pop("created_at", UNSET)
|
||||||
|
created_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_created_at, Unset):
|
||||||
|
created_at = UNSET
|
||||||
|
else:
|
||||||
|
created_at = isoparse(_created_at)
|
||||||
|
|
||||||
|
error = d.pop("error", UNSET)
|
||||||
|
|
||||||
|
id = d.pop("id", UNSET)
|
||||||
|
|
||||||
|
input = d.pop("input", UNSET)
|
||||||
|
|
||||||
|
output = d.pop("output", UNSET)
|
||||||
|
|
||||||
|
_output_format = d.pop("output_format", UNSET)
|
||||||
|
output_format: Union[Unset, UnitForceFormat]
|
||||||
|
if isinstance(_output_format, Unset):
|
||||||
|
output_format = UNSET
|
||||||
|
else:
|
||||||
|
output_format = UnitForceFormat(_output_format)
|
||||||
|
|
||||||
|
_src_format = d.pop("src_format", UNSET)
|
||||||
|
src_format: Union[Unset, UnitForceFormat]
|
||||||
|
if isinstance(_src_format, Unset):
|
||||||
|
src_format = UNSET
|
||||||
|
else:
|
||||||
|
src_format = UnitForceFormat(_src_format)
|
||||||
|
|
||||||
|
_started_at = d.pop("started_at", UNSET)
|
||||||
|
started_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_started_at, Unset):
|
||||||
|
started_at = UNSET
|
||||||
|
else:
|
||||||
|
started_at = isoparse(_started_at)
|
||||||
|
|
||||||
|
_status = d.pop("status", UNSET)
|
||||||
|
status: Union[Unset, ApiCallStatus]
|
||||||
|
if isinstance(_status, Unset):
|
||||||
|
status = UNSET
|
||||||
|
else:
|
||||||
|
status = ApiCallStatus(_status)
|
||||||
|
|
||||||
|
_updated_at = d.pop("updated_at", UNSET)
|
||||||
|
updated_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_updated_at, Unset):
|
||||||
|
updated_at = UNSET
|
||||||
|
else:
|
||||||
|
updated_at = isoparse(_updated_at)
|
||||||
|
|
||||||
|
user_id = d.pop("user_id", UNSET)
|
||||||
|
|
||||||
|
unit_force_conversion = cls(
|
||||||
|
completed_at=completed_at,
|
||||||
|
created_at=created_at,
|
||||||
|
error=error,
|
||||||
|
id=id,
|
||||||
|
input=input,
|
||||||
|
output=output,
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
started_at=started_at,
|
||||||
|
status=status,
|
||||||
|
updated_at=updated_at,
|
||||||
|
user_id=user_id,
|
||||||
|
)
|
||||||
|
|
||||||
|
unit_force_conversion.additional_properties = d
|
||||||
|
return unit_force_conversion
|
||||||
|
|
||||||
|
@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
|
12
kittycad/models/unit_force_format.py
Normal file
12
kittycad/models/unit_force_format.py
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
|
||||||
|
class UnitForceFormat(str, Enum):
|
||||||
|
NEWTON = 'newton'
|
||||||
|
POUND = 'pound'
|
||||||
|
DYNE = 'dyne'
|
||||||
|
KILOPOUND = 'kilopound'
|
||||||
|
POUNDAL = 'poundal'
|
||||||
|
|
||||||
|
def __str__(self) -> str:
|
||||||
|
return str(self.value)
|
185
kittycad/models/unit_illuminance_conversion.py
Normal file
185
kittycad/models/unit_illuminance_conversion.py
Normal file
@ -0,0 +1,185 @@
|
|||||||
|
import datetime
|
||||||
|
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||||
|
|
||||||
|
import attr
|
||||||
|
from dateutil.parser import isoparse
|
||||||
|
|
||||||
|
from ..models.uuid import Uuid
|
||||||
|
from ..models.unit_illuminance_format import UnitIlluminanceFormat
|
||||||
|
from ..models.api_call_status import ApiCallStatus
|
||||||
|
from ..types import UNSET, Unset
|
||||||
|
|
||||||
|
T = TypeVar("T", bound="UnitIlluminanceConversion")
|
||||||
|
|
||||||
|
|
||||||
|
@attr.s(auto_attribs=True)
|
||||||
|
class UnitIlluminanceConversion:
|
||||||
|
""" """
|
||||||
|
completed_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
created_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
error: Union[Unset, str] = UNSET
|
||||||
|
id: Union[Unset, str] = UNSET
|
||||||
|
input: Union[Unset, float] = UNSET
|
||||||
|
output: Union[Unset, float] = UNSET
|
||||||
|
output_format: Union[Unset, UnitIlluminanceFormat] = UNSET
|
||||||
|
src_format: Union[Unset, UnitIlluminanceFormat] = UNSET
|
||||||
|
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
status: Union[Unset, ApiCallStatus] = UNSET
|
||||||
|
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
user_id: Union[Unset, str] = UNSET
|
||||||
|
|
||||||
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||||
|
|
||||||
|
def to_dict(self) -> Dict[str, Any]:
|
||||||
|
completed_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.completed_at, Unset):
|
||||||
|
completed_at = self.completed_at.isoformat()
|
||||||
|
created_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.created_at, Unset):
|
||||||
|
created_at = self.created_at.isoformat()
|
||||||
|
error = self.error
|
||||||
|
id = self.id
|
||||||
|
input = self.input
|
||||||
|
output = self.output
|
||||||
|
output_format: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.output_format, Unset):
|
||||||
|
output_format = self.output_format.value
|
||||||
|
src_format: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.src_format, Unset):
|
||||||
|
src_format = self.src_format.value
|
||||||
|
started_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.started_at, Unset):
|
||||||
|
started_at = self.started_at.isoformat()
|
||||||
|
status: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.status, Unset):
|
||||||
|
status = self.status.value
|
||||||
|
updated_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.updated_at, Unset):
|
||||||
|
updated_at = self.updated_at.isoformat()
|
||||||
|
user_id = self.user_id
|
||||||
|
|
||||||
|
field_dict: Dict[str, Any] = {}
|
||||||
|
field_dict.update(self.additional_properties)
|
||||||
|
field_dict.update({})
|
||||||
|
if completed_at is not UNSET:
|
||||||
|
field_dict['completed_at'] = completed_at
|
||||||
|
if created_at is not UNSET:
|
||||||
|
field_dict['created_at'] = created_at
|
||||||
|
if error is not UNSET:
|
||||||
|
field_dict['error'] = error
|
||||||
|
if id is not UNSET:
|
||||||
|
field_dict['id'] = id
|
||||||
|
if input is not UNSET:
|
||||||
|
field_dict['input'] = input
|
||||||
|
if output is not UNSET:
|
||||||
|
field_dict['output'] = output
|
||||||
|
if output_format is not UNSET:
|
||||||
|
field_dict['output_format'] = output_format
|
||||||
|
if src_format is not UNSET:
|
||||||
|
field_dict['src_format'] = src_format
|
||||||
|
if started_at is not UNSET:
|
||||||
|
field_dict['started_at'] = started_at
|
||||||
|
if status is not UNSET:
|
||||||
|
field_dict['status'] = status
|
||||||
|
if updated_at is not UNSET:
|
||||||
|
field_dict['updated_at'] = updated_at
|
||||||
|
if user_id is not UNSET:
|
||||||
|
field_dict['user_id'] = user_id
|
||||||
|
|
||||||
|
return field_dict
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||||
|
d = src_dict.copy()
|
||||||
|
_completed_at = d.pop("completed_at", UNSET)
|
||||||
|
completed_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_completed_at, Unset):
|
||||||
|
completed_at = UNSET
|
||||||
|
else:
|
||||||
|
completed_at = isoparse(_completed_at)
|
||||||
|
|
||||||
|
_created_at = d.pop("created_at", UNSET)
|
||||||
|
created_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_created_at, Unset):
|
||||||
|
created_at = UNSET
|
||||||
|
else:
|
||||||
|
created_at = isoparse(_created_at)
|
||||||
|
|
||||||
|
error = d.pop("error", UNSET)
|
||||||
|
|
||||||
|
id = d.pop("id", UNSET)
|
||||||
|
|
||||||
|
input = d.pop("input", UNSET)
|
||||||
|
|
||||||
|
output = d.pop("output", UNSET)
|
||||||
|
|
||||||
|
_output_format = d.pop("output_format", UNSET)
|
||||||
|
output_format: Union[Unset, UnitIlluminanceFormat]
|
||||||
|
if isinstance(_output_format, Unset):
|
||||||
|
output_format = UNSET
|
||||||
|
else:
|
||||||
|
output_format = UnitIlluminanceFormat(_output_format)
|
||||||
|
|
||||||
|
_src_format = d.pop("src_format", UNSET)
|
||||||
|
src_format: Union[Unset, UnitIlluminanceFormat]
|
||||||
|
if isinstance(_src_format, Unset):
|
||||||
|
src_format = UNSET
|
||||||
|
else:
|
||||||
|
src_format = UnitIlluminanceFormat(_src_format)
|
||||||
|
|
||||||
|
_started_at = d.pop("started_at", UNSET)
|
||||||
|
started_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_started_at, Unset):
|
||||||
|
started_at = UNSET
|
||||||
|
else:
|
||||||
|
started_at = isoparse(_started_at)
|
||||||
|
|
||||||
|
_status = d.pop("status", UNSET)
|
||||||
|
status: Union[Unset, ApiCallStatus]
|
||||||
|
if isinstance(_status, Unset):
|
||||||
|
status = UNSET
|
||||||
|
else:
|
||||||
|
status = ApiCallStatus(_status)
|
||||||
|
|
||||||
|
_updated_at = d.pop("updated_at", UNSET)
|
||||||
|
updated_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_updated_at, Unset):
|
||||||
|
updated_at = UNSET
|
||||||
|
else:
|
||||||
|
updated_at = isoparse(_updated_at)
|
||||||
|
|
||||||
|
user_id = d.pop("user_id", UNSET)
|
||||||
|
|
||||||
|
unit_illuminance_conversion = cls(
|
||||||
|
completed_at=completed_at,
|
||||||
|
created_at=created_at,
|
||||||
|
error=error,
|
||||||
|
id=id,
|
||||||
|
input=input,
|
||||||
|
output=output,
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
started_at=started_at,
|
||||||
|
status=status,
|
||||||
|
updated_at=updated_at,
|
||||||
|
user_id=user_id,
|
||||||
|
)
|
||||||
|
|
||||||
|
unit_illuminance_conversion.additional_properties = d
|
||||||
|
return unit_illuminance_conversion
|
||||||
|
|
||||||
|
@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
|
11
kittycad/models/unit_illuminance_format.py
Normal file
11
kittycad/models/unit_illuminance_format.py
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
|
||||||
|
class UnitIlluminanceFormat(str, Enum):
|
||||||
|
LUX = 'lux'
|
||||||
|
FOOTCANDLE = 'footcandle'
|
||||||
|
LUMENS_PER_SQUARE_INCH = 'lumens_per_square_inch'
|
||||||
|
PHOT = 'phot'
|
||||||
|
|
||||||
|
def __str__(self) -> str:
|
||||||
|
return str(self.value)
|
185
kittycad/models/unit_length_conversion.py
Normal file
185
kittycad/models/unit_length_conversion.py
Normal file
@ -0,0 +1,185 @@
|
|||||||
|
import datetime
|
||||||
|
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||||
|
|
||||||
|
import attr
|
||||||
|
from dateutil.parser import isoparse
|
||||||
|
|
||||||
|
from ..models.uuid import Uuid
|
||||||
|
from ..models.unit_length_format import UnitLengthFormat
|
||||||
|
from ..models.api_call_status import ApiCallStatus
|
||||||
|
from ..types import UNSET, Unset
|
||||||
|
|
||||||
|
T = TypeVar("T", bound="UnitLengthConversion")
|
||||||
|
|
||||||
|
|
||||||
|
@attr.s(auto_attribs=True)
|
||||||
|
class UnitLengthConversion:
|
||||||
|
""" """
|
||||||
|
completed_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
created_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
error: Union[Unset, str] = UNSET
|
||||||
|
id: Union[Unset, str] = UNSET
|
||||||
|
input: Union[Unset, float] = UNSET
|
||||||
|
output: Union[Unset, float] = UNSET
|
||||||
|
output_format: Union[Unset, UnitLengthFormat] = UNSET
|
||||||
|
src_format: Union[Unset, UnitLengthFormat] = UNSET
|
||||||
|
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
status: Union[Unset, ApiCallStatus] = UNSET
|
||||||
|
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
user_id: Union[Unset, str] = UNSET
|
||||||
|
|
||||||
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||||
|
|
||||||
|
def to_dict(self) -> Dict[str, Any]:
|
||||||
|
completed_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.completed_at, Unset):
|
||||||
|
completed_at = self.completed_at.isoformat()
|
||||||
|
created_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.created_at, Unset):
|
||||||
|
created_at = self.created_at.isoformat()
|
||||||
|
error = self.error
|
||||||
|
id = self.id
|
||||||
|
input = self.input
|
||||||
|
output = self.output
|
||||||
|
output_format: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.output_format, Unset):
|
||||||
|
output_format = self.output_format.value
|
||||||
|
src_format: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.src_format, Unset):
|
||||||
|
src_format = self.src_format.value
|
||||||
|
started_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.started_at, Unset):
|
||||||
|
started_at = self.started_at.isoformat()
|
||||||
|
status: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.status, Unset):
|
||||||
|
status = self.status.value
|
||||||
|
updated_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.updated_at, Unset):
|
||||||
|
updated_at = self.updated_at.isoformat()
|
||||||
|
user_id = self.user_id
|
||||||
|
|
||||||
|
field_dict: Dict[str, Any] = {}
|
||||||
|
field_dict.update(self.additional_properties)
|
||||||
|
field_dict.update({})
|
||||||
|
if completed_at is not UNSET:
|
||||||
|
field_dict['completed_at'] = completed_at
|
||||||
|
if created_at is not UNSET:
|
||||||
|
field_dict['created_at'] = created_at
|
||||||
|
if error is not UNSET:
|
||||||
|
field_dict['error'] = error
|
||||||
|
if id is not UNSET:
|
||||||
|
field_dict['id'] = id
|
||||||
|
if input is not UNSET:
|
||||||
|
field_dict['input'] = input
|
||||||
|
if output is not UNSET:
|
||||||
|
field_dict['output'] = output
|
||||||
|
if output_format is not UNSET:
|
||||||
|
field_dict['output_format'] = output_format
|
||||||
|
if src_format is not UNSET:
|
||||||
|
field_dict['src_format'] = src_format
|
||||||
|
if started_at is not UNSET:
|
||||||
|
field_dict['started_at'] = started_at
|
||||||
|
if status is not UNSET:
|
||||||
|
field_dict['status'] = status
|
||||||
|
if updated_at is not UNSET:
|
||||||
|
field_dict['updated_at'] = updated_at
|
||||||
|
if user_id is not UNSET:
|
||||||
|
field_dict['user_id'] = user_id
|
||||||
|
|
||||||
|
return field_dict
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||||
|
d = src_dict.copy()
|
||||||
|
_completed_at = d.pop("completed_at", UNSET)
|
||||||
|
completed_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_completed_at, Unset):
|
||||||
|
completed_at = UNSET
|
||||||
|
else:
|
||||||
|
completed_at = isoparse(_completed_at)
|
||||||
|
|
||||||
|
_created_at = d.pop("created_at", UNSET)
|
||||||
|
created_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_created_at, Unset):
|
||||||
|
created_at = UNSET
|
||||||
|
else:
|
||||||
|
created_at = isoparse(_created_at)
|
||||||
|
|
||||||
|
error = d.pop("error", UNSET)
|
||||||
|
|
||||||
|
id = d.pop("id", UNSET)
|
||||||
|
|
||||||
|
input = d.pop("input", UNSET)
|
||||||
|
|
||||||
|
output = d.pop("output", UNSET)
|
||||||
|
|
||||||
|
_output_format = d.pop("output_format", UNSET)
|
||||||
|
output_format: Union[Unset, UnitLengthFormat]
|
||||||
|
if isinstance(_output_format, Unset):
|
||||||
|
output_format = UNSET
|
||||||
|
else:
|
||||||
|
output_format = UnitLengthFormat(_output_format)
|
||||||
|
|
||||||
|
_src_format = d.pop("src_format", UNSET)
|
||||||
|
src_format: Union[Unset, UnitLengthFormat]
|
||||||
|
if isinstance(_src_format, Unset):
|
||||||
|
src_format = UNSET
|
||||||
|
else:
|
||||||
|
src_format = UnitLengthFormat(_src_format)
|
||||||
|
|
||||||
|
_started_at = d.pop("started_at", UNSET)
|
||||||
|
started_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_started_at, Unset):
|
||||||
|
started_at = UNSET
|
||||||
|
else:
|
||||||
|
started_at = isoparse(_started_at)
|
||||||
|
|
||||||
|
_status = d.pop("status", UNSET)
|
||||||
|
status: Union[Unset, ApiCallStatus]
|
||||||
|
if isinstance(_status, Unset):
|
||||||
|
status = UNSET
|
||||||
|
else:
|
||||||
|
status = ApiCallStatus(_status)
|
||||||
|
|
||||||
|
_updated_at = d.pop("updated_at", UNSET)
|
||||||
|
updated_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_updated_at, Unset):
|
||||||
|
updated_at = UNSET
|
||||||
|
else:
|
||||||
|
updated_at = isoparse(_updated_at)
|
||||||
|
|
||||||
|
user_id = d.pop("user_id", UNSET)
|
||||||
|
|
||||||
|
unit_length_conversion = cls(
|
||||||
|
completed_at=completed_at,
|
||||||
|
created_at=created_at,
|
||||||
|
error=error,
|
||||||
|
id=id,
|
||||||
|
input=input,
|
||||||
|
output=output,
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
started_at=started_at,
|
||||||
|
status=status,
|
||||||
|
updated_at=updated_at,
|
||||||
|
user_id=user_id,
|
||||||
|
)
|
||||||
|
|
||||||
|
unit_length_conversion.additional_properties = d
|
||||||
|
return unit_length_conversion
|
||||||
|
|
||||||
|
@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
|
21
kittycad/models/unit_length_format.py
Normal file
21
kittycad/models/unit_length_format.py
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
|
||||||
|
class UnitLengthFormat(str, Enum):
|
||||||
|
METER = 'meter'
|
||||||
|
FOOT = 'foot'
|
||||||
|
INCH = 'inch'
|
||||||
|
MILE = 'mile'
|
||||||
|
NAUTICAL_MILE = 'nautical_mile'
|
||||||
|
ASTRONOMICAL_UNIT = 'astronomical_unit'
|
||||||
|
CUBIT = 'cubit'
|
||||||
|
FATHOM = 'fathom'
|
||||||
|
CHAIN = 'chain'
|
||||||
|
FURLONG = 'furlong'
|
||||||
|
HAND = 'hand'
|
||||||
|
LEAGUE = 'league'
|
||||||
|
NAUTICAL_LEAGUE = 'nautical_league'
|
||||||
|
YARD = 'yard'
|
||||||
|
|
||||||
|
def __str__(self) -> str:
|
||||||
|
return str(self.value)
|
185
kittycad/models/unit_magnetic_field_strength_conversion.py
Normal file
185
kittycad/models/unit_magnetic_field_strength_conversion.py
Normal file
@ -0,0 +1,185 @@
|
|||||||
|
import datetime
|
||||||
|
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||||
|
|
||||||
|
import attr
|
||||||
|
from dateutil.parser import isoparse
|
||||||
|
|
||||||
|
from ..models.uuid import Uuid
|
||||||
|
from ..models.unit_magnetic_field_strength_format import UnitMagneticFieldStrengthFormat
|
||||||
|
from ..models.api_call_status import ApiCallStatus
|
||||||
|
from ..types import UNSET, Unset
|
||||||
|
|
||||||
|
T = TypeVar("T", bound="UnitMagneticFieldStrengthConversion")
|
||||||
|
|
||||||
|
|
||||||
|
@attr.s(auto_attribs=True)
|
||||||
|
class UnitMagneticFieldStrengthConversion:
|
||||||
|
""" """
|
||||||
|
completed_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
created_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
error: Union[Unset, str] = UNSET
|
||||||
|
id: Union[Unset, str] = UNSET
|
||||||
|
input: Union[Unset, float] = UNSET
|
||||||
|
output: Union[Unset, float] = UNSET
|
||||||
|
output_format: Union[Unset, UnitMagneticFieldStrengthFormat] = UNSET
|
||||||
|
src_format: Union[Unset, UnitMagneticFieldStrengthFormat] = UNSET
|
||||||
|
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
status: Union[Unset, ApiCallStatus] = UNSET
|
||||||
|
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
user_id: Union[Unset, str] = UNSET
|
||||||
|
|
||||||
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||||
|
|
||||||
|
def to_dict(self) -> Dict[str, Any]:
|
||||||
|
completed_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.completed_at, Unset):
|
||||||
|
completed_at = self.completed_at.isoformat()
|
||||||
|
created_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.created_at, Unset):
|
||||||
|
created_at = self.created_at.isoformat()
|
||||||
|
error = self.error
|
||||||
|
id = self.id
|
||||||
|
input = self.input
|
||||||
|
output = self.output
|
||||||
|
output_format: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.output_format, Unset):
|
||||||
|
output_format = self.output_format.value
|
||||||
|
src_format: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.src_format, Unset):
|
||||||
|
src_format = self.src_format.value
|
||||||
|
started_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.started_at, Unset):
|
||||||
|
started_at = self.started_at.isoformat()
|
||||||
|
status: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.status, Unset):
|
||||||
|
status = self.status.value
|
||||||
|
updated_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.updated_at, Unset):
|
||||||
|
updated_at = self.updated_at.isoformat()
|
||||||
|
user_id = self.user_id
|
||||||
|
|
||||||
|
field_dict: Dict[str, Any] = {}
|
||||||
|
field_dict.update(self.additional_properties)
|
||||||
|
field_dict.update({})
|
||||||
|
if completed_at is not UNSET:
|
||||||
|
field_dict['completed_at'] = completed_at
|
||||||
|
if created_at is not UNSET:
|
||||||
|
field_dict['created_at'] = created_at
|
||||||
|
if error is not UNSET:
|
||||||
|
field_dict['error'] = error
|
||||||
|
if id is not UNSET:
|
||||||
|
field_dict['id'] = id
|
||||||
|
if input is not UNSET:
|
||||||
|
field_dict['input'] = input
|
||||||
|
if output is not UNSET:
|
||||||
|
field_dict['output'] = output
|
||||||
|
if output_format is not UNSET:
|
||||||
|
field_dict['output_format'] = output_format
|
||||||
|
if src_format is not UNSET:
|
||||||
|
field_dict['src_format'] = src_format
|
||||||
|
if started_at is not UNSET:
|
||||||
|
field_dict['started_at'] = started_at
|
||||||
|
if status is not UNSET:
|
||||||
|
field_dict['status'] = status
|
||||||
|
if updated_at is not UNSET:
|
||||||
|
field_dict['updated_at'] = updated_at
|
||||||
|
if user_id is not UNSET:
|
||||||
|
field_dict['user_id'] = user_id
|
||||||
|
|
||||||
|
return field_dict
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||||
|
d = src_dict.copy()
|
||||||
|
_completed_at = d.pop("completed_at", UNSET)
|
||||||
|
completed_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_completed_at, Unset):
|
||||||
|
completed_at = UNSET
|
||||||
|
else:
|
||||||
|
completed_at = isoparse(_completed_at)
|
||||||
|
|
||||||
|
_created_at = d.pop("created_at", UNSET)
|
||||||
|
created_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_created_at, Unset):
|
||||||
|
created_at = UNSET
|
||||||
|
else:
|
||||||
|
created_at = isoparse(_created_at)
|
||||||
|
|
||||||
|
error = d.pop("error", UNSET)
|
||||||
|
|
||||||
|
id = d.pop("id", UNSET)
|
||||||
|
|
||||||
|
input = d.pop("input", UNSET)
|
||||||
|
|
||||||
|
output = d.pop("output", UNSET)
|
||||||
|
|
||||||
|
_output_format = d.pop("output_format", UNSET)
|
||||||
|
output_format: Union[Unset, UnitMagneticFieldStrengthFormat]
|
||||||
|
if isinstance(_output_format, Unset):
|
||||||
|
output_format = UNSET
|
||||||
|
else:
|
||||||
|
output_format = UnitMagneticFieldStrengthFormat(_output_format)
|
||||||
|
|
||||||
|
_src_format = d.pop("src_format", UNSET)
|
||||||
|
src_format: Union[Unset, UnitMagneticFieldStrengthFormat]
|
||||||
|
if isinstance(_src_format, Unset):
|
||||||
|
src_format = UNSET
|
||||||
|
else:
|
||||||
|
src_format = UnitMagneticFieldStrengthFormat(_src_format)
|
||||||
|
|
||||||
|
_started_at = d.pop("started_at", UNSET)
|
||||||
|
started_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_started_at, Unset):
|
||||||
|
started_at = UNSET
|
||||||
|
else:
|
||||||
|
started_at = isoparse(_started_at)
|
||||||
|
|
||||||
|
_status = d.pop("status", UNSET)
|
||||||
|
status: Union[Unset, ApiCallStatus]
|
||||||
|
if isinstance(_status, Unset):
|
||||||
|
status = UNSET
|
||||||
|
else:
|
||||||
|
status = ApiCallStatus(_status)
|
||||||
|
|
||||||
|
_updated_at = d.pop("updated_at", UNSET)
|
||||||
|
updated_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_updated_at, Unset):
|
||||||
|
updated_at = UNSET
|
||||||
|
else:
|
||||||
|
updated_at = isoparse(_updated_at)
|
||||||
|
|
||||||
|
user_id = d.pop("user_id", UNSET)
|
||||||
|
|
||||||
|
unit_magnetic_field_strength_conversion = cls(
|
||||||
|
completed_at=completed_at,
|
||||||
|
created_at=created_at,
|
||||||
|
error=error,
|
||||||
|
id=id,
|
||||||
|
input=input,
|
||||||
|
output=output,
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
started_at=started_at,
|
||||||
|
status=status,
|
||||||
|
updated_at=updated_at,
|
||||||
|
user_id=user_id,
|
||||||
|
)
|
||||||
|
|
||||||
|
unit_magnetic_field_strength_conversion.additional_properties = d
|
||||||
|
return unit_magnetic_field_strength_conversion
|
||||||
|
|
||||||
|
@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
|
9
kittycad/models/unit_magnetic_field_strength_format.py
Normal file
9
kittycad/models/unit_magnetic_field_strength_format.py
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
|
||||||
|
class UnitMagneticFieldStrengthFormat(str, Enum):
|
||||||
|
TESLA = 'tesla'
|
||||||
|
GAUSS = 'gauss'
|
||||||
|
|
||||||
|
def __str__(self) -> str:
|
||||||
|
return str(self.value)
|
185
kittycad/models/unit_magnetic_flux_conversion.py
Normal file
185
kittycad/models/unit_magnetic_flux_conversion.py
Normal file
@ -0,0 +1,185 @@
|
|||||||
|
import datetime
|
||||||
|
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||||
|
|
||||||
|
import attr
|
||||||
|
from dateutil.parser import isoparse
|
||||||
|
|
||||||
|
from ..models.uuid import Uuid
|
||||||
|
from ..models.unit_magnetic_flux_format import UnitMagneticFluxFormat
|
||||||
|
from ..models.api_call_status import ApiCallStatus
|
||||||
|
from ..types import UNSET, Unset
|
||||||
|
|
||||||
|
T = TypeVar("T", bound="UnitMagneticFluxConversion")
|
||||||
|
|
||||||
|
|
||||||
|
@attr.s(auto_attribs=True)
|
||||||
|
class UnitMagneticFluxConversion:
|
||||||
|
""" """
|
||||||
|
completed_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
created_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
error: Union[Unset, str] = UNSET
|
||||||
|
id: Union[Unset, str] = UNSET
|
||||||
|
input: Union[Unset, float] = UNSET
|
||||||
|
output: Union[Unset, float] = UNSET
|
||||||
|
output_format: Union[Unset, UnitMagneticFluxFormat] = UNSET
|
||||||
|
src_format: Union[Unset, UnitMagneticFluxFormat] = UNSET
|
||||||
|
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
status: Union[Unset, ApiCallStatus] = UNSET
|
||||||
|
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
user_id: Union[Unset, str] = UNSET
|
||||||
|
|
||||||
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||||
|
|
||||||
|
def to_dict(self) -> Dict[str, Any]:
|
||||||
|
completed_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.completed_at, Unset):
|
||||||
|
completed_at = self.completed_at.isoformat()
|
||||||
|
created_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.created_at, Unset):
|
||||||
|
created_at = self.created_at.isoformat()
|
||||||
|
error = self.error
|
||||||
|
id = self.id
|
||||||
|
input = self.input
|
||||||
|
output = self.output
|
||||||
|
output_format: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.output_format, Unset):
|
||||||
|
output_format = self.output_format.value
|
||||||
|
src_format: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.src_format, Unset):
|
||||||
|
src_format = self.src_format.value
|
||||||
|
started_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.started_at, Unset):
|
||||||
|
started_at = self.started_at.isoformat()
|
||||||
|
status: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.status, Unset):
|
||||||
|
status = self.status.value
|
||||||
|
updated_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.updated_at, Unset):
|
||||||
|
updated_at = self.updated_at.isoformat()
|
||||||
|
user_id = self.user_id
|
||||||
|
|
||||||
|
field_dict: Dict[str, Any] = {}
|
||||||
|
field_dict.update(self.additional_properties)
|
||||||
|
field_dict.update({})
|
||||||
|
if completed_at is not UNSET:
|
||||||
|
field_dict['completed_at'] = completed_at
|
||||||
|
if created_at is not UNSET:
|
||||||
|
field_dict['created_at'] = created_at
|
||||||
|
if error is not UNSET:
|
||||||
|
field_dict['error'] = error
|
||||||
|
if id is not UNSET:
|
||||||
|
field_dict['id'] = id
|
||||||
|
if input is not UNSET:
|
||||||
|
field_dict['input'] = input
|
||||||
|
if output is not UNSET:
|
||||||
|
field_dict['output'] = output
|
||||||
|
if output_format is not UNSET:
|
||||||
|
field_dict['output_format'] = output_format
|
||||||
|
if src_format is not UNSET:
|
||||||
|
field_dict['src_format'] = src_format
|
||||||
|
if started_at is not UNSET:
|
||||||
|
field_dict['started_at'] = started_at
|
||||||
|
if status is not UNSET:
|
||||||
|
field_dict['status'] = status
|
||||||
|
if updated_at is not UNSET:
|
||||||
|
field_dict['updated_at'] = updated_at
|
||||||
|
if user_id is not UNSET:
|
||||||
|
field_dict['user_id'] = user_id
|
||||||
|
|
||||||
|
return field_dict
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||||
|
d = src_dict.copy()
|
||||||
|
_completed_at = d.pop("completed_at", UNSET)
|
||||||
|
completed_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_completed_at, Unset):
|
||||||
|
completed_at = UNSET
|
||||||
|
else:
|
||||||
|
completed_at = isoparse(_completed_at)
|
||||||
|
|
||||||
|
_created_at = d.pop("created_at", UNSET)
|
||||||
|
created_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_created_at, Unset):
|
||||||
|
created_at = UNSET
|
||||||
|
else:
|
||||||
|
created_at = isoparse(_created_at)
|
||||||
|
|
||||||
|
error = d.pop("error", UNSET)
|
||||||
|
|
||||||
|
id = d.pop("id", UNSET)
|
||||||
|
|
||||||
|
input = d.pop("input", UNSET)
|
||||||
|
|
||||||
|
output = d.pop("output", UNSET)
|
||||||
|
|
||||||
|
_output_format = d.pop("output_format", UNSET)
|
||||||
|
output_format: Union[Unset, UnitMagneticFluxFormat]
|
||||||
|
if isinstance(_output_format, Unset):
|
||||||
|
output_format = UNSET
|
||||||
|
else:
|
||||||
|
output_format = UnitMagneticFluxFormat(_output_format)
|
||||||
|
|
||||||
|
_src_format = d.pop("src_format", UNSET)
|
||||||
|
src_format: Union[Unset, UnitMagneticFluxFormat]
|
||||||
|
if isinstance(_src_format, Unset):
|
||||||
|
src_format = UNSET
|
||||||
|
else:
|
||||||
|
src_format = UnitMagneticFluxFormat(_src_format)
|
||||||
|
|
||||||
|
_started_at = d.pop("started_at", UNSET)
|
||||||
|
started_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_started_at, Unset):
|
||||||
|
started_at = UNSET
|
||||||
|
else:
|
||||||
|
started_at = isoparse(_started_at)
|
||||||
|
|
||||||
|
_status = d.pop("status", UNSET)
|
||||||
|
status: Union[Unset, ApiCallStatus]
|
||||||
|
if isinstance(_status, Unset):
|
||||||
|
status = UNSET
|
||||||
|
else:
|
||||||
|
status = ApiCallStatus(_status)
|
||||||
|
|
||||||
|
_updated_at = d.pop("updated_at", UNSET)
|
||||||
|
updated_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_updated_at, Unset):
|
||||||
|
updated_at = UNSET
|
||||||
|
else:
|
||||||
|
updated_at = isoparse(_updated_at)
|
||||||
|
|
||||||
|
user_id = d.pop("user_id", UNSET)
|
||||||
|
|
||||||
|
unit_magnetic_flux_conversion = cls(
|
||||||
|
completed_at=completed_at,
|
||||||
|
created_at=created_at,
|
||||||
|
error=error,
|
||||||
|
id=id,
|
||||||
|
input=input,
|
||||||
|
output=output,
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
started_at=started_at,
|
||||||
|
status=status,
|
||||||
|
updated_at=updated_at,
|
||||||
|
user_id=user_id,
|
||||||
|
)
|
||||||
|
|
||||||
|
unit_magnetic_flux_conversion.additional_properties = d
|
||||||
|
return unit_magnetic_flux_conversion
|
||||||
|
|
||||||
|
@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
|
9
kittycad/models/unit_magnetic_flux_format.py
Normal file
9
kittycad/models/unit_magnetic_flux_format.py
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
|
||||||
|
class UnitMagneticFluxFormat(str, Enum):
|
||||||
|
WEBER = 'weber'
|
||||||
|
MAXWELL = 'maxwell'
|
||||||
|
|
||||||
|
def __str__(self) -> str:
|
||||||
|
return str(self.value)
|
185
kittycad/models/unit_mass_conversion.py
Normal file
185
kittycad/models/unit_mass_conversion.py
Normal file
@ -0,0 +1,185 @@
|
|||||||
|
import datetime
|
||||||
|
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||||
|
|
||||||
|
import attr
|
||||||
|
from dateutil.parser import isoparse
|
||||||
|
|
||||||
|
from ..models.uuid import Uuid
|
||||||
|
from ..models.unit_mass_format import UnitMassFormat
|
||||||
|
from ..models.api_call_status import ApiCallStatus
|
||||||
|
from ..types import UNSET, Unset
|
||||||
|
|
||||||
|
T = TypeVar("T", bound="UnitMassConversion")
|
||||||
|
|
||||||
|
|
||||||
|
@attr.s(auto_attribs=True)
|
||||||
|
class UnitMassConversion:
|
||||||
|
""" """
|
||||||
|
completed_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
created_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
error: Union[Unset, str] = UNSET
|
||||||
|
id: Union[Unset, str] = UNSET
|
||||||
|
input: Union[Unset, float] = UNSET
|
||||||
|
output: Union[Unset, float] = UNSET
|
||||||
|
output_format: Union[Unset, UnitMassFormat] = UNSET
|
||||||
|
src_format: Union[Unset, UnitMassFormat] = UNSET
|
||||||
|
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
status: Union[Unset, ApiCallStatus] = UNSET
|
||||||
|
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
user_id: Union[Unset, str] = UNSET
|
||||||
|
|
||||||
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||||
|
|
||||||
|
def to_dict(self) -> Dict[str, Any]:
|
||||||
|
completed_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.completed_at, Unset):
|
||||||
|
completed_at = self.completed_at.isoformat()
|
||||||
|
created_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.created_at, Unset):
|
||||||
|
created_at = self.created_at.isoformat()
|
||||||
|
error = self.error
|
||||||
|
id = self.id
|
||||||
|
input = self.input
|
||||||
|
output = self.output
|
||||||
|
output_format: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.output_format, Unset):
|
||||||
|
output_format = self.output_format.value
|
||||||
|
src_format: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.src_format, Unset):
|
||||||
|
src_format = self.src_format.value
|
||||||
|
started_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.started_at, Unset):
|
||||||
|
started_at = self.started_at.isoformat()
|
||||||
|
status: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.status, Unset):
|
||||||
|
status = self.status.value
|
||||||
|
updated_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.updated_at, Unset):
|
||||||
|
updated_at = self.updated_at.isoformat()
|
||||||
|
user_id = self.user_id
|
||||||
|
|
||||||
|
field_dict: Dict[str, Any] = {}
|
||||||
|
field_dict.update(self.additional_properties)
|
||||||
|
field_dict.update({})
|
||||||
|
if completed_at is not UNSET:
|
||||||
|
field_dict['completed_at'] = completed_at
|
||||||
|
if created_at is not UNSET:
|
||||||
|
field_dict['created_at'] = created_at
|
||||||
|
if error is not UNSET:
|
||||||
|
field_dict['error'] = error
|
||||||
|
if id is not UNSET:
|
||||||
|
field_dict['id'] = id
|
||||||
|
if input is not UNSET:
|
||||||
|
field_dict['input'] = input
|
||||||
|
if output is not UNSET:
|
||||||
|
field_dict['output'] = output
|
||||||
|
if output_format is not UNSET:
|
||||||
|
field_dict['output_format'] = output_format
|
||||||
|
if src_format is not UNSET:
|
||||||
|
field_dict['src_format'] = src_format
|
||||||
|
if started_at is not UNSET:
|
||||||
|
field_dict['started_at'] = started_at
|
||||||
|
if status is not UNSET:
|
||||||
|
field_dict['status'] = status
|
||||||
|
if updated_at is not UNSET:
|
||||||
|
field_dict['updated_at'] = updated_at
|
||||||
|
if user_id is not UNSET:
|
||||||
|
field_dict['user_id'] = user_id
|
||||||
|
|
||||||
|
return field_dict
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||||
|
d = src_dict.copy()
|
||||||
|
_completed_at = d.pop("completed_at", UNSET)
|
||||||
|
completed_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_completed_at, Unset):
|
||||||
|
completed_at = UNSET
|
||||||
|
else:
|
||||||
|
completed_at = isoparse(_completed_at)
|
||||||
|
|
||||||
|
_created_at = d.pop("created_at", UNSET)
|
||||||
|
created_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_created_at, Unset):
|
||||||
|
created_at = UNSET
|
||||||
|
else:
|
||||||
|
created_at = isoparse(_created_at)
|
||||||
|
|
||||||
|
error = d.pop("error", UNSET)
|
||||||
|
|
||||||
|
id = d.pop("id", UNSET)
|
||||||
|
|
||||||
|
input = d.pop("input", UNSET)
|
||||||
|
|
||||||
|
output = d.pop("output", UNSET)
|
||||||
|
|
||||||
|
_output_format = d.pop("output_format", UNSET)
|
||||||
|
output_format: Union[Unset, UnitMassFormat]
|
||||||
|
if isinstance(_output_format, Unset):
|
||||||
|
output_format = UNSET
|
||||||
|
else:
|
||||||
|
output_format = UnitMassFormat(_output_format)
|
||||||
|
|
||||||
|
_src_format = d.pop("src_format", UNSET)
|
||||||
|
src_format: Union[Unset, UnitMassFormat]
|
||||||
|
if isinstance(_src_format, Unset):
|
||||||
|
src_format = UNSET
|
||||||
|
else:
|
||||||
|
src_format = UnitMassFormat(_src_format)
|
||||||
|
|
||||||
|
_started_at = d.pop("started_at", UNSET)
|
||||||
|
started_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_started_at, Unset):
|
||||||
|
started_at = UNSET
|
||||||
|
else:
|
||||||
|
started_at = isoparse(_started_at)
|
||||||
|
|
||||||
|
_status = d.pop("status", UNSET)
|
||||||
|
status: Union[Unset, ApiCallStatus]
|
||||||
|
if isinstance(_status, Unset):
|
||||||
|
status = UNSET
|
||||||
|
else:
|
||||||
|
status = ApiCallStatus(_status)
|
||||||
|
|
||||||
|
_updated_at = d.pop("updated_at", UNSET)
|
||||||
|
updated_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_updated_at, Unset):
|
||||||
|
updated_at = UNSET
|
||||||
|
else:
|
||||||
|
updated_at = isoparse(_updated_at)
|
||||||
|
|
||||||
|
user_id = d.pop("user_id", UNSET)
|
||||||
|
|
||||||
|
unit_mass_conversion = cls(
|
||||||
|
completed_at=completed_at,
|
||||||
|
created_at=created_at,
|
||||||
|
error=error,
|
||||||
|
id=id,
|
||||||
|
input=input,
|
||||||
|
output=output,
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
started_at=started_at,
|
||||||
|
status=status,
|
||||||
|
updated_at=updated_at,
|
||||||
|
user_id=user_id,
|
||||||
|
)
|
||||||
|
|
||||||
|
unit_mass_conversion.additional_properties = d
|
||||||
|
return unit_mass_conversion
|
||||||
|
|
||||||
|
@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
|
16
kittycad/models/unit_mass_format.py
Normal file
16
kittycad/models/unit_mass_format.py
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
|
||||||
|
class UnitMassFormat(str, Enum):
|
||||||
|
GRAM = 'gram'
|
||||||
|
METRIC_TON = 'metric_ton'
|
||||||
|
POUND = 'pound'
|
||||||
|
LONG_TON = 'long_ton'
|
||||||
|
SHORT_TON = 'short_ton'
|
||||||
|
STONE = 'stone'
|
||||||
|
OUNCE = 'ounce'
|
||||||
|
CARAT = 'carat'
|
||||||
|
SLUG = 'slug'
|
||||||
|
|
||||||
|
def __str__(self) -> str:
|
||||||
|
return str(self.value)
|
@ -9,11 +9,11 @@ from ..models.unit_metric_format import UnitMetricFormat
|
|||||||
from ..models.api_call_status import ApiCallStatus
|
from ..models.api_call_status import ApiCallStatus
|
||||||
from ..types import UNSET, Unset
|
from ..types import UNSET, Unset
|
||||||
|
|
||||||
T = TypeVar("T", bound="UnitConversion")
|
T = TypeVar("T", bound="UnitMetricConversion")
|
||||||
|
|
||||||
|
|
||||||
@attr.s(auto_attribs=True)
|
@attr.s(auto_attribs=True)
|
||||||
class UnitConversion:
|
class UnitMetricConversion:
|
||||||
""" """
|
""" """
|
||||||
completed_at: Union[Unset, datetime.datetime] = UNSET
|
completed_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
created_at: Union[Unset, datetime.datetime] = UNSET
|
created_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
@ -150,7 +150,7 @@ class UnitConversion:
|
|||||||
|
|
||||||
user_id = d.pop("user_id", UNSET)
|
user_id = d.pop("user_id", UNSET)
|
||||||
|
|
||||||
unit_conversion = cls(
|
unit_metric_conversion = cls(
|
||||||
completed_at=completed_at,
|
completed_at=completed_at,
|
||||||
created_at=created_at,
|
created_at=created_at,
|
||||||
error=error,
|
error=error,
|
||||||
@ -165,8 +165,8 @@ class UnitConversion:
|
|||||||
user_id=user_id,
|
user_id=user_id,
|
||||||
)
|
)
|
||||||
|
|
||||||
unit_conversion.additional_properties = d
|
unit_metric_conversion.additional_properties = d
|
||||||
return unit_conversion
|
return unit_metric_conversion
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def additional_keys(self) -> List[str]:
|
def additional_keys(self) -> List[str]:
|
185
kittycad/models/unit_power_conversion.py
Normal file
185
kittycad/models/unit_power_conversion.py
Normal file
@ -0,0 +1,185 @@
|
|||||||
|
import datetime
|
||||||
|
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||||
|
|
||||||
|
import attr
|
||||||
|
from dateutil.parser import isoparse
|
||||||
|
|
||||||
|
from ..models.uuid import Uuid
|
||||||
|
from ..models.unit_power_format import UnitPowerFormat
|
||||||
|
from ..models.api_call_status import ApiCallStatus
|
||||||
|
from ..types import UNSET, Unset
|
||||||
|
|
||||||
|
T = TypeVar("T", bound="UnitPowerConversion")
|
||||||
|
|
||||||
|
|
||||||
|
@attr.s(auto_attribs=True)
|
||||||
|
class UnitPowerConversion:
|
||||||
|
""" """
|
||||||
|
completed_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
created_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
error: Union[Unset, str] = UNSET
|
||||||
|
id: Union[Unset, str] = UNSET
|
||||||
|
input: Union[Unset, float] = UNSET
|
||||||
|
output: Union[Unset, float] = UNSET
|
||||||
|
output_format: Union[Unset, UnitPowerFormat] = UNSET
|
||||||
|
src_format: Union[Unset, UnitPowerFormat] = UNSET
|
||||||
|
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
status: Union[Unset, ApiCallStatus] = UNSET
|
||||||
|
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
user_id: Union[Unset, str] = UNSET
|
||||||
|
|
||||||
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||||
|
|
||||||
|
def to_dict(self) -> Dict[str, Any]:
|
||||||
|
completed_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.completed_at, Unset):
|
||||||
|
completed_at = self.completed_at.isoformat()
|
||||||
|
created_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.created_at, Unset):
|
||||||
|
created_at = self.created_at.isoformat()
|
||||||
|
error = self.error
|
||||||
|
id = self.id
|
||||||
|
input = self.input
|
||||||
|
output = self.output
|
||||||
|
output_format: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.output_format, Unset):
|
||||||
|
output_format = self.output_format.value
|
||||||
|
src_format: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.src_format, Unset):
|
||||||
|
src_format = self.src_format.value
|
||||||
|
started_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.started_at, Unset):
|
||||||
|
started_at = self.started_at.isoformat()
|
||||||
|
status: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.status, Unset):
|
||||||
|
status = self.status.value
|
||||||
|
updated_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.updated_at, Unset):
|
||||||
|
updated_at = self.updated_at.isoformat()
|
||||||
|
user_id = self.user_id
|
||||||
|
|
||||||
|
field_dict: Dict[str, Any] = {}
|
||||||
|
field_dict.update(self.additional_properties)
|
||||||
|
field_dict.update({})
|
||||||
|
if completed_at is not UNSET:
|
||||||
|
field_dict['completed_at'] = completed_at
|
||||||
|
if created_at is not UNSET:
|
||||||
|
field_dict['created_at'] = created_at
|
||||||
|
if error is not UNSET:
|
||||||
|
field_dict['error'] = error
|
||||||
|
if id is not UNSET:
|
||||||
|
field_dict['id'] = id
|
||||||
|
if input is not UNSET:
|
||||||
|
field_dict['input'] = input
|
||||||
|
if output is not UNSET:
|
||||||
|
field_dict['output'] = output
|
||||||
|
if output_format is not UNSET:
|
||||||
|
field_dict['output_format'] = output_format
|
||||||
|
if src_format is not UNSET:
|
||||||
|
field_dict['src_format'] = src_format
|
||||||
|
if started_at is not UNSET:
|
||||||
|
field_dict['started_at'] = started_at
|
||||||
|
if status is not UNSET:
|
||||||
|
field_dict['status'] = status
|
||||||
|
if updated_at is not UNSET:
|
||||||
|
field_dict['updated_at'] = updated_at
|
||||||
|
if user_id is not UNSET:
|
||||||
|
field_dict['user_id'] = user_id
|
||||||
|
|
||||||
|
return field_dict
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||||
|
d = src_dict.copy()
|
||||||
|
_completed_at = d.pop("completed_at", UNSET)
|
||||||
|
completed_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_completed_at, Unset):
|
||||||
|
completed_at = UNSET
|
||||||
|
else:
|
||||||
|
completed_at = isoparse(_completed_at)
|
||||||
|
|
||||||
|
_created_at = d.pop("created_at", UNSET)
|
||||||
|
created_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_created_at, Unset):
|
||||||
|
created_at = UNSET
|
||||||
|
else:
|
||||||
|
created_at = isoparse(_created_at)
|
||||||
|
|
||||||
|
error = d.pop("error", UNSET)
|
||||||
|
|
||||||
|
id = d.pop("id", UNSET)
|
||||||
|
|
||||||
|
input = d.pop("input", UNSET)
|
||||||
|
|
||||||
|
output = d.pop("output", UNSET)
|
||||||
|
|
||||||
|
_output_format = d.pop("output_format", UNSET)
|
||||||
|
output_format: Union[Unset, UnitPowerFormat]
|
||||||
|
if isinstance(_output_format, Unset):
|
||||||
|
output_format = UNSET
|
||||||
|
else:
|
||||||
|
output_format = UnitPowerFormat(_output_format)
|
||||||
|
|
||||||
|
_src_format = d.pop("src_format", UNSET)
|
||||||
|
src_format: Union[Unset, UnitPowerFormat]
|
||||||
|
if isinstance(_src_format, Unset):
|
||||||
|
src_format = UNSET
|
||||||
|
else:
|
||||||
|
src_format = UnitPowerFormat(_src_format)
|
||||||
|
|
||||||
|
_started_at = d.pop("started_at", UNSET)
|
||||||
|
started_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_started_at, Unset):
|
||||||
|
started_at = UNSET
|
||||||
|
else:
|
||||||
|
started_at = isoparse(_started_at)
|
||||||
|
|
||||||
|
_status = d.pop("status", UNSET)
|
||||||
|
status: Union[Unset, ApiCallStatus]
|
||||||
|
if isinstance(_status, Unset):
|
||||||
|
status = UNSET
|
||||||
|
else:
|
||||||
|
status = ApiCallStatus(_status)
|
||||||
|
|
||||||
|
_updated_at = d.pop("updated_at", UNSET)
|
||||||
|
updated_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_updated_at, Unset):
|
||||||
|
updated_at = UNSET
|
||||||
|
else:
|
||||||
|
updated_at = isoparse(_updated_at)
|
||||||
|
|
||||||
|
user_id = d.pop("user_id", UNSET)
|
||||||
|
|
||||||
|
unit_power_conversion = cls(
|
||||||
|
completed_at=completed_at,
|
||||||
|
created_at=created_at,
|
||||||
|
error=error,
|
||||||
|
id=id,
|
||||||
|
input=input,
|
||||||
|
output=output,
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
started_at=started_at,
|
||||||
|
status=status,
|
||||||
|
updated_at=updated_at,
|
||||||
|
user_id=user_id,
|
||||||
|
)
|
||||||
|
|
||||||
|
unit_power_conversion.additional_properties = d
|
||||||
|
return unit_power_conversion
|
||||||
|
|
||||||
|
@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
|
10
kittycad/models/unit_power_format.py
Normal file
10
kittycad/models/unit_power_format.py
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
|
||||||
|
class UnitPowerFormat(str, Enum):
|
||||||
|
WATT = 'watt'
|
||||||
|
HORSEPOWER = 'horsepower'
|
||||||
|
MILLIWATT = 'milliwatt'
|
||||||
|
|
||||||
|
def __str__(self) -> str:
|
||||||
|
return str(self.value)
|
185
kittycad/models/unit_pressure_conversion.py
Normal file
185
kittycad/models/unit_pressure_conversion.py
Normal file
@ -0,0 +1,185 @@
|
|||||||
|
import datetime
|
||||||
|
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||||
|
|
||||||
|
import attr
|
||||||
|
from dateutil.parser import isoparse
|
||||||
|
|
||||||
|
from ..models.uuid import Uuid
|
||||||
|
from ..models.unit_pressure_format import UnitPressureFormat
|
||||||
|
from ..models.api_call_status import ApiCallStatus
|
||||||
|
from ..types import UNSET, Unset
|
||||||
|
|
||||||
|
T = TypeVar("T", bound="UnitPressureConversion")
|
||||||
|
|
||||||
|
|
||||||
|
@attr.s(auto_attribs=True)
|
||||||
|
class UnitPressureConversion:
|
||||||
|
""" """
|
||||||
|
completed_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
created_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
error: Union[Unset, str] = UNSET
|
||||||
|
id: Union[Unset, str] = UNSET
|
||||||
|
input: Union[Unset, float] = UNSET
|
||||||
|
output: Union[Unset, float] = UNSET
|
||||||
|
output_format: Union[Unset, UnitPressureFormat] = UNSET
|
||||||
|
src_format: Union[Unset, UnitPressureFormat] = UNSET
|
||||||
|
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
status: Union[Unset, ApiCallStatus] = UNSET
|
||||||
|
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
user_id: Union[Unset, str] = UNSET
|
||||||
|
|
||||||
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||||
|
|
||||||
|
def to_dict(self) -> Dict[str, Any]:
|
||||||
|
completed_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.completed_at, Unset):
|
||||||
|
completed_at = self.completed_at.isoformat()
|
||||||
|
created_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.created_at, Unset):
|
||||||
|
created_at = self.created_at.isoformat()
|
||||||
|
error = self.error
|
||||||
|
id = self.id
|
||||||
|
input = self.input
|
||||||
|
output = self.output
|
||||||
|
output_format: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.output_format, Unset):
|
||||||
|
output_format = self.output_format.value
|
||||||
|
src_format: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.src_format, Unset):
|
||||||
|
src_format = self.src_format.value
|
||||||
|
started_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.started_at, Unset):
|
||||||
|
started_at = self.started_at.isoformat()
|
||||||
|
status: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.status, Unset):
|
||||||
|
status = self.status.value
|
||||||
|
updated_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.updated_at, Unset):
|
||||||
|
updated_at = self.updated_at.isoformat()
|
||||||
|
user_id = self.user_id
|
||||||
|
|
||||||
|
field_dict: Dict[str, Any] = {}
|
||||||
|
field_dict.update(self.additional_properties)
|
||||||
|
field_dict.update({})
|
||||||
|
if completed_at is not UNSET:
|
||||||
|
field_dict['completed_at'] = completed_at
|
||||||
|
if created_at is not UNSET:
|
||||||
|
field_dict['created_at'] = created_at
|
||||||
|
if error is not UNSET:
|
||||||
|
field_dict['error'] = error
|
||||||
|
if id is not UNSET:
|
||||||
|
field_dict['id'] = id
|
||||||
|
if input is not UNSET:
|
||||||
|
field_dict['input'] = input
|
||||||
|
if output is not UNSET:
|
||||||
|
field_dict['output'] = output
|
||||||
|
if output_format is not UNSET:
|
||||||
|
field_dict['output_format'] = output_format
|
||||||
|
if src_format is not UNSET:
|
||||||
|
field_dict['src_format'] = src_format
|
||||||
|
if started_at is not UNSET:
|
||||||
|
field_dict['started_at'] = started_at
|
||||||
|
if status is not UNSET:
|
||||||
|
field_dict['status'] = status
|
||||||
|
if updated_at is not UNSET:
|
||||||
|
field_dict['updated_at'] = updated_at
|
||||||
|
if user_id is not UNSET:
|
||||||
|
field_dict['user_id'] = user_id
|
||||||
|
|
||||||
|
return field_dict
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||||
|
d = src_dict.copy()
|
||||||
|
_completed_at = d.pop("completed_at", UNSET)
|
||||||
|
completed_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_completed_at, Unset):
|
||||||
|
completed_at = UNSET
|
||||||
|
else:
|
||||||
|
completed_at = isoparse(_completed_at)
|
||||||
|
|
||||||
|
_created_at = d.pop("created_at", UNSET)
|
||||||
|
created_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_created_at, Unset):
|
||||||
|
created_at = UNSET
|
||||||
|
else:
|
||||||
|
created_at = isoparse(_created_at)
|
||||||
|
|
||||||
|
error = d.pop("error", UNSET)
|
||||||
|
|
||||||
|
id = d.pop("id", UNSET)
|
||||||
|
|
||||||
|
input = d.pop("input", UNSET)
|
||||||
|
|
||||||
|
output = d.pop("output", UNSET)
|
||||||
|
|
||||||
|
_output_format = d.pop("output_format", UNSET)
|
||||||
|
output_format: Union[Unset, UnitPressureFormat]
|
||||||
|
if isinstance(_output_format, Unset):
|
||||||
|
output_format = UNSET
|
||||||
|
else:
|
||||||
|
output_format = UnitPressureFormat(_output_format)
|
||||||
|
|
||||||
|
_src_format = d.pop("src_format", UNSET)
|
||||||
|
src_format: Union[Unset, UnitPressureFormat]
|
||||||
|
if isinstance(_src_format, Unset):
|
||||||
|
src_format = UNSET
|
||||||
|
else:
|
||||||
|
src_format = UnitPressureFormat(_src_format)
|
||||||
|
|
||||||
|
_started_at = d.pop("started_at", UNSET)
|
||||||
|
started_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_started_at, Unset):
|
||||||
|
started_at = UNSET
|
||||||
|
else:
|
||||||
|
started_at = isoparse(_started_at)
|
||||||
|
|
||||||
|
_status = d.pop("status", UNSET)
|
||||||
|
status: Union[Unset, ApiCallStatus]
|
||||||
|
if isinstance(_status, Unset):
|
||||||
|
status = UNSET
|
||||||
|
else:
|
||||||
|
status = ApiCallStatus(_status)
|
||||||
|
|
||||||
|
_updated_at = d.pop("updated_at", UNSET)
|
||||||
|
updated_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_updated_at, Unset):
|
||||||
|
updated_at = UNSET
|
||||||
|
else:
|
||||||
|
updated_at = isoparse(_updated_at)
|
||||||
|
|
||||||
|
user_id = d.pop("user_id", UNSET)
|
||||||
|
|
||||||
|
unit_pressure_conversion = cls(
|
||||||
|
completed_at=completed_at,
|
||||||
|
created_at=created_at,
|
||||||
|
error=error,
|
||||||
|
id=id,
|
||||||
|
input=input,
|
||||||
|
output=output,
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
started_at=started_at,
|
||||||
|
status=status,
|
||||||
|
updated_at=updated_at,
|
||||||
|
user_id=user_id,
|
||||||
|
)
|
||||||
|
|
||||||
|
unit_pressure_conversion.additional_properties = d
|
||||||
|
return unit_pressure_conversion
|
||||||
|
|
||||||
|
@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
|
12
kittycad/models/unit_pressure_format.py
Normal file
12
kittycad/models/unit_pressure_format.py
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
|
||||||
|
class UnitPressureFormat(str, Enum):
|
||||||
|
PASCAL = 'pascal'
|
||||||
|
BAR = 'bar'
|
||||||
|
MBAR = 'mbar'
|
||||||
|
ATMOSPHERE = 'atmosphere'
|
||||||
|
POUNDS_PER_SQUARE_INCH = 'pounds_per_square_inch'
|
||||||
|
|
||||||
|
def __str__(self) -> str:
|
||||||
|
return str(self.value)
|
185
kittycad/models/unit_radiation_conversion.py
Normal file
185
kittycad/models/unit_radiation_conversion.py
Normal file
@ -0,0 +1,185 @@
|
|||||||
|
import datetime
|
||||||
|
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||||
|
|
||||||
|
import attr
|
||||||
|
from dateutil.parser import isoparse
|
||||||
|
|
||||||
|
from ..models.uuid import Uuid
|
||||||
|
from ..models.unit_radiation_format import UnitRadiationFormat
|
||||||
|
from ..models.api_call_status import ApiCallStatus
|
||||||
|
from ..types import UNSET, Unset
|
||||||
|
|
||||||
|
T = TypeVar("T", bound="UnitRadiationConversion")
|
||||||
|
|
||||||
|
|
||||||
|
@attr.s(auto_attribs=True)
|
||||||
|
class UnitRadiationConversion:
|
||||||
|
""" """
|
||||||
|
completed_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
created_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
error: Union[Unset, str] = UNSET
|
||||||
|
id: Union[Unset, str] = UNSET
|
||||||
|
input: Union[Unset, float] = UNSET
|
||||||
|
output: Union[Unset, float] = UNSET
|
||||||
|
output_format: Union[Unset, UnitRadiationFormat] = UNSET
|
||||||
|
src_format: Union[Unset, UnitRadiationFormat] = UNSET
|
||||||
|
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
status: Union[Unset, ApiCallStatus] = UNSET
|
||||||
|
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
user_id: Union[Unset, str] = UNSET
|
||||||
|
|
||||||
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||||
|
|
||||||
|
def to_dict(self) -> Dict[str, Any]:
|
||||||
|
completed_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.completed_at, Unset):
|
||||||
|
completed_at = self.completed_at.isoformat()
|
||||||
|
created_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.created_at, Unset):
|
||||||
|
created_at = self.created_at.isoformat()
|
||||||
|
error = self.error
|
||||||
|
id = self.id
|
||||||
|
input = self.input
|
||||||
|
output = self.output
|
||||||
|
output_format: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.output_format, Unset):
|
||||||
|
output_format = self.output_format.value
|
||||||
|
src_format: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.src_format, Unset):
|
||||||
|
src_format = self.src_format.value
|
||||||
|
started_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.started_at, Unset):
|
||||||
|
started_at = self.started_at.isoformat()
|
||||||
|
status: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.status, Unset):
|
||||||
|
status = self.status.value
|
||||||
|
updated_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.updated_at, Unset):
|
||||||
|
updated_at = self.updated_at.isoformat()
|
||||||
|
user_id = self.user_id
|
||||||
|
|
||||||
|
field_dict: Dict[str, Any] = {}
|
||||||
|
field_dict.update(self.additional_properties)
|
||||||
|
field_dict.update({})
|
||||||
|
if completed_at is not UNSET:
|
||||||
|
field_dict['completed_at'] = completed_at
|
||||||
|
if created_at is not UNSET:
|
||||||
|
field_dict['created_at'] = created_at
|
||||||
|
if error is not UNSET:
|
||||||
|
field_dict['error'] = error
|
||||||
|
if id is not UNSET:
|
||||||
|
field_dict['id'] = id
|
||||||
|
if input is not UNSET:
|
||||||
|
field_dict['input'] = input
|
||||||
|
if output is not UNSET:
|
||||||
|
field_dict['output'] = output
|
||||||
|
if output_format is not UNSET:
|
||||||
|
field_dict['output_format'] = output_format
|
||||||
|
if src_format is not UNSET:
|
||||||
|
field_dict['src_format'] = src_format
|
||||||
|
if started_at is not UNSET:
|
||||||
|
field_dict['started_at'] = started_at
|
||||||
|
if status is not UNSET:
|
||||||
|
field_dict['status'] = status
|
||||||
|
if updated_at is not UNSET:
|
||||||
|
field_dict['updated_at'] = updated_at
|
||||||
|
if user_id is not UNSET:
|
||||||
|
field_dict['user_id'] = user_id
|
||||||
|
|
||||||
|
return field_dict
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||||
|
d = src_dict.copy()
|
||||||
|
_completed_at = d.pop("completed_at", UNSET)
|
||||||
|
completed_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_completed_at, Unset):
|
||||||
|
completed_at = UNSET
|
||||||
|
else:
|
||||||
|
completed_at = isoparse(_completed_at)
|
||||||
|
|
||||||
|
_created_at = d.pop("created_at", UNSET)
|
||||||
|
created_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_created_at, Unset):
|
||||||
|
created_at = UNSET
|
||||||
|
else:
|
||||||
|
created_at = isoparse(_created_at)
|
||||||
|
|
||||||
|
error = d.pop("error", UNSET)
|
||||||
|
|
||||||
|
id = d.pop("id", UNSET)
|
||||||
|
|
||||||
|
input = d.pop("input", UNSET)
|
||||||
|
|
||||||
|
output = d.pop("output", UNSET)
|
||||||
|
|
||||||
|
_output_format = d.pop("output_format", UNSET)
|
||||||
|
output_format: Union[Unset, UnitRadiationFormat]
|
||||||
|
if isinstance(_output_format, Unset):
|
||||||
|
output_format = UNSET
|
||||||
|
else:
|
||||||
|
output_format = UnitRadiationFormat(_output_format)
|
||||||
|
|
||||||
|
_src_format = d.pop("src_format", UNSET)
|
||||||
|
src_format: Union[Unset, UnitRadiationFormat]
|
||||||
|
if isinstance(_src_format, Unset):
|
||||||
|
src_format = UNSET
|
||||||
|
else:
|
||||||
|
src_format = UnitRadiationFormat(_src_format)
|
||||||
|
|
||||||
|
_started_at = d.pop("started_at", UNSET)
|
||||||
|
started_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_started_at, Unset):
|
||||||
|
started_at = UNSET
|
||||||
|
else:
|
||||||
|
started_at = isoparse(_started_at)
|
||||||
|
|
||||||
|
_status = d.pop("status", UNSET)
|
||||||
|
status: Union[Unset, ApiCallStatus]
|
||||||
|
if isinstance(_status, Unset):
|
||||||
|
status = UNSET
|
||||||
|
else:
|
||||||
|
status = ApiCallStatus(_status)
|
||||||
|
|
||||||
|
_updated_at = d.pop("updated_at", UNSET)
|
||||||
|
updated_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_updated_at, Unset):
|
||||||
|
updated_at = UNSET
|
||||||
|
else:
|
||||||
|
updated_at = isoparse(_updated_at)
|
||||||
|
|
||||||
|
user_id = d.pop("user_id", UNSET)
|
||||||
|
|
||||||
|
unit_radiation_conversion = cls(
|
||||||
|
completed_at=completed_at,
|
||||||
|
created_at=created_at,
|
||||||
|
error=error,
|
||||||
|
id=id,
|
||||||
|
input=input,
|
||||||
|
output=output,
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
started_at=started_at,
|
||||||
|
status=status,
|
||||||
|
updated_at=updated_at,
|
||||||
|
user_id=user_id,
|
||||||
|
)
|
||||||
|
|
||||||
|
unit_radiation_conversion.additional_properties = d
|
||||||
|
return unit_radiation_conversion
|
||||||
|
|
||||||
|
@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
|
10
kittycad/models/unit_radiation_format.py
Normal file
10
kittycad/models/unit_radiation_format.py
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
|
||||||
|
class UnitRadiationFormat(str, Enum):
|
||||||
|
GRAY = 'gray'
|
||||||
|
SIEVERT = 'sievert'
|
||||||
|
RAD = 'rad'
|
||||||
|
|
||||||
|
def __str__(self) -> str:
|
||||||
|
return str(self.value)
|
185
kittycad/models/unit_solid_angle_conversion.py
Normal file
185
kittycad/models/unit_solid_angle_conversion.py
Normal file
@ -0,0 +1,185 @@
|
|||||||
|
import datetime
|
||||||
|
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||||
|
|
||||||
|
import attr
|
||||||
|
from dateutil.parser import isoparse
|
||||||
|
|
||||||
|
from ..models.uuid import Uuid
|
||||||
|
from ..models.unit_solid_angle_format import UnitSolidAngleFormat
|
||||||
|
from ..models.api_call_status import ApiCallStatus
|
||||||
|
from ..types import UNSET, Unset
|
||||||
|
|
||||||
|
T = TypeVar("T", bound="UnitSolidAngleConversion")
|
||||||
|
|
||||||
|
|
||||||
|
@attr.s(auto_attribs=True)
|
||||||
|
class UnitSolidAngleConversion:
|
||||||
|
""" """
|
||||||
|
completed_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
created_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
error: Union[Unset, str] = UNSET
|
||||||
|
id: Union[Unset, str] = UNSET
|
||||||
|
input: Union[Unset, float] = UNSET
|
||||||
|
output: Union[Unset, float] = UNSET
|
||||||
|
output_format: Union[Unset, UnitSolidAngleFormat] = UNSET
|
||||||
|
src_format: Union[Unset, UnitSolidAngleFormat] = UNSET
|
||||||
|
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
status: Union[Unset, ApiCallStatus] = UNSET
|
||||||
|
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
user_id: Union[Unset, str] = UNSET
|
||||||
|
|
||||||
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||||
|
|
||||||
|
def to_dict(self) -> Dict[str, Any]:
|
||||||
|
completed_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.completed_at, Unset):
|
||||||
|
completed_at = self.completed_at.isoformat()
|
||||||
|
created_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.created_at, Unset):
|
||||||
|
created_at = self.created_at.isoformat()
|
||||||
|
error = self.error
|
||||||
|
id = self.id
|
||||||
|
input = self.input
|
||||||
|
output = self.output
|
||||||
|
output_format: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.output_format, Unset):
|
||||||
|
output_format = self.output_format.value
|
||||||
|
src_format: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.src_format, Unset):
|
||||||
|
src_format = self.src_format.value
|
||||||
|
started_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.started_at, Unset):
|
||||||
|
started_at = self.started_at.isoformat()
|
||||||
|
status: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.status, Unset):
|
||||||
|
status = self.status.value
|
||||||
|
updated_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.updated_at, Unset):
|
||||||
|
updated_at = self.updated_at.isoformat()
|
||||||
|
user_id = self.user_id
|
||||||
|
|
||||||
|
field_dict: Dict[str, Any] = {}
|
||||||
|
field_dict.update(self.additional_properties)
|
||||||
|
field_dict.update({})
|
||||||
|
if completed_at is not UNSET:
|
||||||
|
field_dict['completed_at'] = completed_at
|
||||||
|
if created_at is not UNSET:
|
||||||
|
field_dict['created_at'] = created_at
|
||||||
|
if error is not UNSET:
|
||||||
|
field_dict['error'] = error
|
||||||
|
if id is not UNSET:
|
||||||
|
field_dict['id'] = id
|
||||||
|
if input is not UNSET:
|
||||||
|
field_dict['input'] = input
|
||||||
|
if output is not UNSET:
|
||||||
|
field_dict['output'] = output
|
||||||
|
if output_format is not UNSET:
|
||||||
|
field_dict['output_format'] = output_format
|
||||||
|
if src_format is not UNSET:
|
||||||
|
field_dict['src_format'] = src_format
|
||||||
|
if started_at is not UNSET:
|
||||||
|
field_dict['started_at'] = started_at
|
||||||
|
if status is not UNSET:
|
||||||
|
field_dict['status'] = status
|
||||||
|
if updated_at is not UNSET:
|
||||||
|
field_dict['updated_at'] = updated_at
|
||||||
|
if user_id is not UNSET:
|
||||||
|
field_dict['user_id'] = user_id
|
||||||
|
|
||||||
|
return field_dict
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||||
|
d = src_dict.copy()
|
||||||
|
_completed_at = d.pop("completed_at", UNSET)
|
||||||
|
completed_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_completed_at, Unset):
|
||||||
|
completed_at = UNSET
|
||||||
|
else:
|
||||||
|
completed_at = isoparse(_completed_at)
|
||||||
|
|
||||||
|
_created_at = d.pop("created_at", UNSET)
|
||||||
|
created_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_created_at, Unset):
|
||||||
|
created_at = UNSET
|
||||||
|
else:
|
||||||
|
created_at = isoparse(_created_at)
|
||||||
|
|
||||||
|
error = d.pop("error", UNSET)
|
||||||
|
|
||||||
|
id = d.pop("id", UNSET)
|
||||||
|
|
||||||
|
input = d.pop("input", UNSET)
|
||||||
|
|
||||||
|
output = d.pop("output", UNSET)
|
||||||
|
|
||||||
|
_output_format = d.pop("output_format", UNSET)
|
||||||
|
output_format: Union[Unset, UnitSolidAngleFormat]
|
||||||
|
if isinstance(_output_format, Unset):
|
||||||
|
output_format = UNSET
|
||||||
|
else:
|
||||||
|
output_format = UnitSolidAngleFormat(_output_format)
|
||||||
|
|
||||||
|
_src_format = d.pop("src_format", UNSET)
|
||||||
|
src_format: Union[Unset, UnitSolidAngleFormat]
|
||||||
|
if isinstance(_src_format, Unset):
|
||||||
|
src_format = UNSET
|
||||||
|
else:
|
||||||
|
src_format = UnitSolidAngleFormat(_src_format)
|
||||||
|
|
||||||
|
_started_at = d.pop("started_at", UNSET)
|
||||||
|
started_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_started_at, Unset):
|
||||||
|
started_at = UNSET
|
||||||
|
else:
|
||||||
|
started_at = isoparse(_started_at)
|
||||||
|
|
||||||
|
_status = d.pop("status", UNSET)
|
||||||
|
status: Union[Unset, ApiCallStatus]
|
||||||
|
if isinstance(_status, Unset):
|
||||||
|
status = UNSET
|
||||||
|
else:
|
||||||
|
status = ApiCallStatus(_status)
|
||||||
|
|
||||||
|
_updated_at = d.pop("updated_at", UNSET)
|
||||||
|
updated_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_updated_at, Unset):
|
||||||
|
updated_at = UNSET
|
||||||
|
else:
|
||||||
|
updated_at = isoparse(_updated_at)
|
||||||
|
|
||||||
|
user_id = d.pop("user_id", UNSET)
|
||||||
|
|
||||||
|
unit_solid_angle_conversion = cls(
|
||||||
|
completed_at=completed_at,
|
||||||
|
created_at=created_at,
|
||||||
|
error=error,
|
||||||
|
id=id,
|
||||||
|
input=input,
|
||||||
|
output=output,
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
started_at=started_at,
|
||||||
|
status=status,
|
||||||
|
updated_at=updated_at,
|
||||||
|
user_id=user_id,
|
||||||
|
)
|
||||||
|
|
||||||
|
unit_solid_angle_conversion.additional_properties = d
|
||||||
|
return unit_solid_angle_conversion
|
||||||
|
|
||||||
|
@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
|
10
kittycad/models/unit_solid_angle_format.py
Normal file
10
kittycad/models/unit_solid_angle_format.py
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
|
||||||
|
class UnitSolidAngleFormat(str, Enum):
|
||||||
|
STERADIAN = 'steradian'
|
||||||
|
DEGREE_SQUARED = 'degree_squared'
|
||||||
|
SPAT = 'spat'
|
||||||
|
|
||||||
|
def __str__(self) -> str:
|
||||||
|
return str(self.value)
|
185
kittycad/models/unit_temperature_conversion.py
Normal file
185
kittycad/models/unit_temperature_conversion.py
Normal file
@ -0,0 +1,185 @@
|
|||||||
|
import datetime
|
||||||
|
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||||
|
|
||||||
|
import attr
|
||||||
|
from dateutil.parser import isoparse
|
||||||
|
|
||||||
|
from ..models.uuid import Uuid
|
||||||
|
from ..models.unit_temperature_format import UnitTemperatureFormat
|
||||||
|
from ..models.api_call_status import ApiCallStatus
|
||||||
|
from ..types import UNSET, Unset
|
||||||
|
|
||||||
|
T = TypeVar("T", bound="UnitTemperatureConversion")
|
||||||
|
|
||||||
|
|
||||||
|
@attr.s(auto_attribs=True)
|
||||||
|
class UnitTemperatureConversion:
|
||||||
|
""" """
|
||||||
|
completed_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
created_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
error: Union[Unset, str] = UNSET
|
||||||
|
id: Union[Unset, str] = UNSET
|
||||||
|
input: Union[Unset, float] = UNSET
|
||||||
|
output: Union[Unset, float] = UNSET
|
||||||
|
output_format: Union[Unset, UnitTemperatureFormat] = UNSET
|
||||||
|
src_format: Union[Unset, UnitTemperatureFormat] = UNSET
|
||||||
|
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
status: Union[Unset, ApiCallStatus] = UNSET
|
||||||
|
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
user_id: Union[Unset, str] = UNSET
|
||||||
|
|
||||||
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||||
|
|
||||||
|
def to_dict(self) -> Dict[str, Any]:
|
||||||
|
completed_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.completed_at, Unset):
|
||||||
|
completed_at = self.completed_at.isoformat()
|
||||||
|
created_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.created_at, Unset):
|
||||||
|
created_at = self.created_at.isoformat()
|
||||||
|
error = self.error
|
||||||
|
id = self.id
|
||||||
|
input = self.input
|
||||||
|
output = self.output
|
||||||
|
output_format: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.output_format, Unset):
|
||||||
|
output_format = self.output_format.value
|
||||||
|
src_format: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.src_format, Unset):
|
||||||
|
src_format = self.src_format.value
|
||||||
|
started_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.started_at, Unset):
|
||||||
|
started_at = self.started_at.isoformat()
|
||||||
|
status: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.status, Unset):
|
||||||
|
status = self.status.value
|
||||||
|
updated_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.updated_at, Unset):
|
||||||
|
updated_at = self.updated_at.isoformat()
|
||||||
|
user_id = self.user_id
|
||||||
|
|
||||||
|
field_dict: Dict[str, Any] = {}
|
||||||
|
field_dict.update(self.additional_properties)
|
||||||
|
field_dict.update({})
|
||||||
|
if completed_at is not UNSET:
|
||||||
|
field_dict['completed_at'] = completed_at
|
||||||
|
if created_at is not UNSET:
|
||||||
|
field_dict['created_at'] = created_at
|
||||||
|
if error is not UNSET:
|
||||||
|
field_dict['error'] = error
|
||||||
|
if id is not UNSET:
|
||||||
|
field_dict['id'] = id
|
||||||
|
if input is not UNSET:
|
||||||
|
field_dict['input'] = input
|
||||||
|
if output is not UNSET:
|
||||||
|
field_dict['output'] = output
|
||||||
|
if output_format is not UNSET:
|
||||||
|
field_dict['output_format'] = output_format
|
||||||
|
if src_format is not UNSET:
|
||||||
|
field_dict['src_format'] = src_format
|
||||||
|
if started_at is not UNSET:
|
||||||
|
field_dict['started_at'] = started_at
|
||||||
|
if status is not UNSET:
|
||||||
|
field_dict['status'] = status
|
||||||
|
if updated_at is not UNSET:
|
||||||
|
field_dict['updated_at'] = updated_at
|
||||||
|
if user_id is not UNSET:
|
||||||
|
field_dict['user_id'] = user_id
|
||||||
|
|
||||||
|
return field_dict
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||||
|
d = src_dict.copy()
|
||||||
|
_completed_at = d.pop("completed_at", UNSET)
|
||||||
|
completed_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_completed_at, Unset):
|
||||||
|
completed_at = UNSET
|
||||||
|
else:
|
||||||
|
completed_at = isoparse(_completed_at)
|
||||||
|
|
||||||
|
_created_at = d.pop("created_at", UNSET)
|
||||||
|
created_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_created_at, Unset):
|
||||||
|
created_at = UNSET
|
||||||
|
else:
|
||||||
|
created_at = isoparse(_created_at)
|
||||||
|
|
||||||
|
error = d.pop("error", UNSET)
|
||||||
|
|
||||||
|
id = d.pop("id", UNSET)
|
||||||
|
|
||||||
|
input = d.pop("input", UNSET)
|
||||||
|
|
||||||
|
output = d.pop("output", UNSET)
|
||||||
|
|
||||||
|
_output_format = d.pop("output_format", UNSET)
|
||||||
|
output_format: Union[Unset, UnitTemperatureFormat]
|
||||||
|
if isinstance(_output_format, Unset):
|
||||||
|
output_format = UNSET
|
||||||
|
else:
|
||||||
|
output_format = UnitTemperatureFormat(_output_format)
|
||||||
|
|
||||||
|
_src_format = d.pop("src_format", UNSET)
|
||||||
|
src_format: Union[Unset, UnitTemperatureFormat]
|
||||||
|
if isinstance(_src_format, Unset):
|
||||||
|
src_format = UNSET
|
||||||
|
else:
|
||||||
|
src_format = UnitTemperatureFormat(_src_format)
|
||||||
|
|
||||||
|
_started_at = d.pop("started_at", UNSET)
|
||||||
|
started_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_started_at, Unset):
|
||||||
|
started_at = UNSET
|
||||||
|
else:
|
||||||
|
started_at = isoparse(_started_at)
|
||||||
|
|
||||||
|
_status = d.pop("status", UNSET)
|
||||||
|
status: Union[Unset, ApiCallStatus]
|
||||||
|
if isinstance(_status, Unset):
|
||||||
|
status = UNSET
|
||||||
|
else:
|
||||||
|
status = ApiCallStatus(_status)
|
||||||
|
|
||||||
|
_updated_at = d.pop("updated_at", UNSET)
|
||||||
|
updated_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_updated_at, Unset):
|
||||||
|
updated_at = UNSET
|
||||||
|
else:
|
||||||
|
updated_at = isoparse(_updated_at)
|
||||||
|
|
||||||
|
user_id = d.pop("user_id", UNSET)
|
||||||
|
|
||||||
|
unit_temperature_conversion = cls(
|
||||||
|
completed_at=completed_at,
|
||||||
|
created_at=created_at,
|
||||||
|
error=error,
|
||||||
|
id=id,
|
||||||
|
input=input,
|
||||||
|
output=output,
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
started_at=started_at,
|
||||||
|
status=status,
|
||||||
|
updated_at=updated_at,
|
||||||
|
user_id=user_id,
|
||||||
|
)
|
||||||
|
|
||||||
|
unit_temperature_conversion.additional_properties = d
|
||||||
|
return unit_temperature_conversion
|
||||||
|
|
||||||
|
@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
|
12
kittycad/models/unit_temperature_format.py
Normal file
12
kittycad/models/unit_temperature_format.py
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
|
||||||
|
class UnitTemperatureFormat(str, Enum):
|
||||||
|
KELVIN = 'kelvin'
|
||||||
|
CELSIUS = 'celsius'
|
||||||
|
FAHRENHEIT = 'fahrenheit'
|
||||||
|
REAUMUR = 'reaumur'
|
||||||
|
RANKINE = 'rankine'
|
||||||
|
|
||||||
|
def __str__(self) -> str:
|
||||||
|
return str(self.value)
|
185
kittycad/models/unit_time_conversion.py
Normal file
185
kittycad/models/unit_time_conversion.py
Normal file
@ -0,0 +1,185 @@
|
|||||||
|
import datetime
|
||||||
|
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||||
|
|
||||||
|
import attr
|
||||||
|
from dateutil.parser import isoparse
|
||||||
|
|
||||||
|
from ..models.uuid import Uuid
|
||||||
|
from ..models.unit_time_format import UnitTimeFormat
|
||||||
|
from ..models.api_call_status import ApiCallStatus
|
||||||
|
from ..types import UNSET, Unset
|
||||||
|
|
||||||
|
T = TypeVar("T", bound="UnitTimeConversion")
|
||||||
|
|
||||||
|
|
||||||
|
@attr.s(auto_attribs=True)
|
||||||
|
class UnitTimeConversion:
|
||||||
|
""" """
|
||||||
|
completed_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
created_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
error: Union[Unset, str] = UNSET
|
||||||
|
id: Union[Unset, str] = UNSET
|
||||||
|
input: Union[Unset, float] = UNSET
|
||||||
|
output: Union[Unset, float] = UNSET
|
||||||
|
output_format: Union[Unset, UnitTimeFormat] = UNSET
|
||||||
|
src_format: Union[Unset, UnitTimeFormat] = UNSET
|
||||||
|
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
status: Union[Unset, ApiCallStatus] = UNSET
|
||||||
|
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
user_id: Union[Unset, str] = UNSET
|
||||||
|
|
||||||
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||||
|
|
||||||
|
def to_dict(self) -> Dict[str, Any]:
|
||||||
|
completed_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.completed_at, Unset):
|
||||||
|
completed_at = self.completed_at.isoformat()
|
||||||
|
created_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.created_at, Unset):
|
||||||
|
created_at = self.created_at.isoformat()
|
||||||
|
error = self.error
|
||||||
|
id = self.id
|
||||||
|
input = self.input
|
||||||
|
output = self.output
|
||||||
|
output_format: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.output_format, Unset):
|
||||||
|
output_format = self.output_format.value
|
||||||
|
src_format: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.src_format, Unset):
|
||||||
|
src_format = self.src_format.value
|
||||||
|
started_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.started_at, Unset):
|
||||||
|
started_at = self.started_at.isoformat()
|
||||||
|
status: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.status, Unset):
|
||||||
|
status = self.status.value
|
||||||
|
updated_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.updated_at, Unset):
|
||||||
|
updated_at = self.updated_at.isoformat()
|
||||||
|
user_id = self.user_id
|
||||||
|
|
||||||
|
field_dict: Dict[str, Any] = {}
|
||||||
|
field_dict.update(self.additional_properties)
|
||||||
|
field_dict.update({})
|
||||||
|
if completed_at is not UNSET:
|
||||||
|
field_dict['completed_at'] = completed_at
|
||||||
|
if created_at is not UNSET:
|
||||||
|
field_dict['created_at'] = created_at
|
||||||
|
if error is not UNSET:
|
||||||
|
field_dict['error'] = error
|
||||||
|
if id is not UNSET:
|
||||||
|
field_dict['id'] = id
|
||||||
|
if input is not UNSET:
|
||||||
|
field_dict['input'] = input
|
||||||
|
if output is not UNSET:
|
||||||
|
field_dict['output'] = output
|
||||||
|
if output_format is not UNSET:
|
||||||
|
field_dict['output_format'] = output_format
|
||||||
|
if src_format is not UNSET:
|
||||||
|
field_dict['src_format'] = src_format
|
||||||
|
if started_at is not UNSET:
|
||||||
|
field_dict['started_at'] = started_at
|
||||||
|
if status is not UNSET:
|
||||||
|
field_dict['status'] = status
|
||||||
|
if updated_at is not UNSET:
|
||||||
|
field_dict['updated_at'] = updated_at
|
||||||
|
if user_id is not UNSET:
|
||||||
|
field_dict['user_id'] = user_id
|
||||||
|
|
||||||
|
return field_dict
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||||
|
d = src_dict.copy()
|
||||||
|
_completed_at = d.pop("completed_at", UNSET)
|
||||||
|
completed_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_completed_at, Unset):
|
||||||
|
completed_at = UNSET
|
||||||
|
else:
|
||||||
|
completed_at = isoparse(_completed_at)
|
||||||
|
|
||||||
|
_created_at = d.pop("created_at", UNSET)
|
||||||
|
created_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_created_at, Unset):
|
||||||
|
created_at = UNSET
|
||||||
|
else:
|
||||||
|
created_at = isoparse(_created_at)
|
||||||
|
|
||||||
|
error = d.pop("error", UNSET)
|
||||||
|
|
||||||
|
id = d.pop("id", UNSET)
|
||||||
|
|
||||||
|
input = d.pop("input", UNSET)
|
||||||
|
|
||||||
|
output = d.pop("output", UNSET)
|
||||||
|
|
||||||
|
_output_format = d.pop("output_format", UNSET)
|
||||||
|
output_format: Union[Unset, UnitTimeFormat]
|
||||||
|
if isinstance(_output_format, Unset):
|
||||||
|
output_format = UNSET
|
||||||
|
else:
|
||||||
|
output_format = UnitTimeFormat(_output_format)
|
||||||
|
|
||||||
|
_src_format = d.pop("src_format", UNSET)
|
||||||
|
src_format: Union[Unset, UnitTimeFormat]
|
||||||
|
if isinstance(_src_format, Unset):
|
||||||
|
src_format = UNSET
|
||||||
|
else:
|
||||||
|
src_format = UnitTimeFormat(_src_format)
|
||||||
|
|
||||||
|
_started_at = d.pop("started_at", UNSET)
|
||||||
|
started_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_started_at, Unset):
|
||||||
|
started_at = UNSET
|
||||||
|
else:
|
||||||
|
started_at = isoparse(_started_at)
|
||||||
|
|
||||||
|
_status = d.pop("status", UNSET)
|
||||||
|
status: Union[Unset, ApiCallStatus]
|
||||||
|
if isinstance(_status, Unset):
|
||||||
|
status = UNSET
|
||||||
|
else:
|
||||||
|
status = ApiCallStatus(_status)
|
||||||
|
|
||||||
|
_updated_at = d.pop("updated_at", UNSET)
|
||||||
|
updated_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_updated_at, Unset):
|
||||||
|
updated_at = UNSET
|
||||||
|
else:
|
||||||
|
updated_at = isoparse(_updated_at)
|
||||||
|
|
||||||
|
user_id = d.pop("user_id", UNSET)
|
||||||
|
|
||||||
|
unit_time_conversion = cls(
|
||||||
|
completed_at=completed_at,
|
||||||
|
created_at=created_at,
|
||||||
|
error=error,
|
||||||
|
id=id,
|
||||||
|
input=input,
|
||||||
|
output=output,
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
started_at=started_at,
|
||||||
|
status=status,
|
||||||
|
updated_at=updated_at,
|
||||||
|
user_id=user_id,
|
||||||
|
)
|
||||||
|
|
||||||
|
unit_time_conversion.additional_properties = d
|
||||||
|
return unit_time_conversion
|
||||||
|
|
||||||
|
@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
|
15
kittycad/models/unit_time_format.py
Normal file
15
kittycad/models/unit_time_format.py
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
|
||||||
|
class UnitTimeFormat(str, Enum):
|
||||||
|
SECOND = 'second'
|
||||||
|
MINUTE = 'minute'
|
||||||
|
HOUR = 'hour'
|
||||||
|
DAY = 'day'
|
||||||
|
WEEK = 'week'
|
||||||
|
YEAR = 'year'
|
||||||
|
JULIAN_YEAR = 'julian_year'
|
||||||
|
GREGORIAN_YEAR = 'gregorian_year'
|
||||||
|
|
||||||
|
def __str__(self) -> str:
|
||||||
|
return str(self.value)
|
185
kittycad/models/unit_velocity_conversion.py
Normal file
185
kittycad/models/unit_velocity_conversion.py
Normal file
@ -0,0 +1,185 @@
|
|||||||
|
import datetime
|
||||||
|
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||||
|
|
||||||
|
import attr
|
||||||
|
from dateutil.parser import isoparse
|
||||||
|
|
||||||
|
from ..models.uuid import Uuid
|
||||||
|
from ..models.unit_velocity_format import UnitVelocityFormat
|
||||||
|
from ..models.api_call_status import ApiCallStatus
|
||||||
|
from ..types import UNSET, Unset
|
||||||
|
|
||||||
|
T = TypeVar("T", bound="UnitVelocityConversion")
|
||||||
|
|
||||||
|
|
||||||
|
@attr.s(auto_attribs=True)
|
||||||
|
class UnitVelocityConversion:
|
||||||
|
""" """
|
||||||
|
completed_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
created_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
error: Union[Unset, str] = UNSET
|
||||||
|
id: Union[Unset, str] = UNSET
|
||||||
|
input: Union[Unset, float] = UNSET
|
||||||
|
output: Union[Unset, float] = UNSET
|
||||||
|
output_format: Union[Unset, UnitVelocityFormat] = UNSET
|
||||||
|
src_format: Union[Unset, UnitVelocityFormat] = UNSET
|
||||||
|
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
status: Union[Unset, ApiCallStatus] = UNSET
|
||||||
|
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
user_id: Union[Unset, str] = UNSET
|
||||||
|
|
||||||
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||||
|
|
||||||
|
def to_dict(self) -> Dict[str, Any]:
|
||||||
|
completed_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.completed_at, Unset):
|
||||||
|
completed_at = self.completed_at.isoformat()
|
||||||
|
created_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.created_at, Unset):
|
||||||
|
created_at = self.created_at.isoformat()
|
||||||
|
error = self.error
|
||||||
|
id = self.id
|
||||||
|
input = self.input
|
||||||
|
output = self.output
|
||||||
|
output_format: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.output_format, Unset):
|
||||||
|
output_format = self.output_format.value
|
||||||
|
src_format: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.src_format, Unset):
|
||||||
|
src_format = self.src_format.value
|
||||||
|
started_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.started_at, Unset):
|
||||||
|
started_at = self.started_at.isoformat()
|
||||||
|
status: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.status, Unset):
|
||||||
|
status = self.status.value
|
||||||
|
updated_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.updated_at, Unset):
|
||||||
|
updated_at = self.updated_at.isoformat()
|
||||||
|
user_id = self.user_id
|
||||||
|
|
||||||
|
field_dict: Dict[str, Any] = {}
|
||||||
|
field_dict.update(self.additional_properties)
|
||||||
|
field_dict.update({})
|
||||||
|
if completed_at is not UNSET:
|
||||||
|
field_dict['completed_at'] = completed_at
|
||||||
|
if created_at is not UNSET:
|
||||||
|
field_dict['created_at'] = created_at
|
||||||
|
if error is not UNSET:
|
||||||
|
field_dict['error'] = error
|
||||||
|
if id is not UNSET:
|
||||||
|
field_dict['id'] = id
|
||||||
|
if input is not UNSET:
|
||||||
|
field_dict['input'] = input
|
||||||
|
if output is not UNSET:
|
||||||
|
field_dict['output'] = output
|
||||||
|
if output_format is not UNSET:
|
||||||
|
field_dict['output_format'] = output_format
|
||||||
|
if src_format is not UNSET:
|
||||||
|
field_dict['src_format'] = src_format
|
||||||
|
if started_at is not UNSET:
|
||||||
|
field_dict['started_at'] = started_at
|
||||||
|
if status is not UNSET:
|
||||||
|
field_dict['status'] = status
|
||||||
|
if updated_at is not UNSET:
|
||||||
|
field_dict['updated_at'] = updated_at
|
||||||
|
if user_id is not UNSET:
|
||||||
|
field_dict['user_id'] = user_id
|
||||||
|
|
||||||
|
return field_dict
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||||
|
d = src_dict.copy()
|
||||||
|
_completed_at = d.pop("completed_at", UNSET)
|
||||||
|
completed_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_completed_at, Unset):
|
||||||
|
completed_at = UNSET
|
||||||
|
else:
|
||||||
|
completed_at = isoparse(_completed_at)
|
||||||
|
|
||||||
|
_created_at = d.pop("created_at", UNSET)
|
||||||
|
created_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_created_at, Unset):
|
||||||
|
created_at = UNSET
|
||||||
|
else:
|
||||||
|
created_at = isoparse(_created_at)
|
||||||
|
|
||||||
|
error = d.pop("error", UNSET)
|
||||||
|
|
||||||
|
id = d.pop("id", UNSET)
|
||||||
|
|
||||||
|
input = d.pop("input", UNSET)
|
||||||
|
|
||||||
|
output = d.pop("output", UNSET)
|
||||||
|
|
||||||
|
_output_format = d.pop("output_format", UNSET)
|
||||||
|
output_format: Union[Unset, UnitVelocityFormat]
|
||||||
|
if isinstance(_output_format, Unset):
|
||||||
|
output_format = UNSET
|
||||||
|
else:
|
||||||
|
output_format = UnitVelocityFormat(_output_format)
|
||||||
|
|
||||||
|
_src_format = d.pop("src_format", UNSET)
|
||||||
|
src_format: Union[Unset, UnitVelocityFormat]
|
||||||
|
if isinstance(_src_format, Unset):
|
||||||
|
src_format = UNSET
|
||||||
|
else:
|
||||||
|
src_format = UnitVelocityFormat(_src_format)
|
||||||
|
|
||||||
|
_started_at = d.pop("started_at", UNSET)
|
||||||
|
started_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_started_at, Unset):
|
||||||
|
started_at = UNSET
|
||||||
|
else:
|
||||||
|
started_at = isoparse(_started_at)
|
||||||
|
|
||||||
|
_status = d.pop("status", UNSET)
|
||||||
|
status: Union[Unset, ApiCallStatus]
|
||||||
|
if isinstance(_status, Unset):
|
||||||
|
status = UNSET
|
||||||
|
else:
|
||||||
|
status = ApiCallStatus(_status)
|
||||||
|
|
||||||
|
_updated_at = d.pop("updated_at", UNSET)
|
||||||
|
updated_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_updated_at, Unset):
|
||||||
|
updated_at = UNSET
|
||||||
|
else:
|
||||||
|
updated_at = isoparse(_updated_at)
|
||||||
|
|
||||||
|
user_id = d.pop("user_id", UNSET)
|
||||||
|
|
||||||
|
unit_velocity_conversion = cls(
|
||||||
|
completed_at=completed_at,
|
||||||
|
created_at=created_at,
|
||||||
|
error=error,
|
||||||
|
id=id,
|
||||||
|
input=input,
|
||||||
|
output=output,
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
started_at=started_at,
|
||||||
|
status=status,
|
||||||
|
updated_at=updated_at,
|
||||||
|
user_id=user_id,
|
||||||
|
)
|
||||||
|
|
||||||
|
unit_velocity_conversion.additional_properties = d
|
||||||
|
return unit_velocity_conversion
|
||||||
|
|
||||||
|
@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
|
12
kittycad/models/unit_velocity_format.py
Normal file
12
kittycad/models/unit_velocity_format.py
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
|
||||||
|
class UnitVelocityFormat(str, Enum):
|
||||||
|
METERS_PER_SECOND = 'meters_per_second'
|
||||||
|
FEET_PER_SECOND = 'feet_per_second'
|
||||||
|
MILES_PER_HOUR = 'miles_per_hour'
|
||||||
|
KILOMETERS_PER_HOUR = 'kilometers_per_hour'
|
||||||
|
KNOT = 'knot'
|
||||||
|
|
||||||
|
def __str__(self) -> str:
|
||||||
|
return str(self.value)
|
185
kittycad/models/unit_voltage_conversion.py
Normal file
185
kittycad/models/unit_voltage_conversion.py
Normal file
@ -0,0 +1,185 @@
|
|||||||
|
import datetime
|
||||||
|
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||||
|
|
||||||
|
import attr
|
||||||
|
from dateutil.parser import isoparse
|
||||||
|
|
||||||
|
from ..models.uuid import Uuid
|
||||||
|
from ..models.unit_voltage_format import UnitVoltageFormat
|
||||||
|
from ..models.api_call_status import ApiCallStatus
|
||||||
|
from ..types import UNSET, Unset
|
||||||
|
|
||||||
|
T = TypeVar("T", bound="UnitVoltageConversion")
|
||||||
|
|
||||||
|
|
||||||
|
@attr.s(auto_attribs=True)
|
||||||
|
class UnitVoltageConversion:
|
||||||
|
""" """
|
||||||
|
completed_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
created_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
error: Union[Unset, str] = UNSET
|
||||||
|
id: Union[Unset, str] = UNSET
|
||||||
|
input: Union[Unset, float] = UNSET
|
||||||
|
output: Union[Unset, float] = UNSET
|
||||||
|
output_format: Union[Unset, UnitVoltageFormat] = UNSET
|
||||||
|
src_format: Union[Unset, UnitVoltageFormat] = UNSET
|
||||||
|
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
status: Union[Unset, ApiCallStatus] = UNSET
|
||||||
|
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
user_id: Union[Unset, str] = UNSET
|
||||||
|
|
||||||
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||||
|
|
||||||
|
def to_dict(self) -> Dict[str, Any]:
|
||||||
|
completed_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.completed_at, Unset):
|
||||||
|
completed_at = self.completed_at.isoformat()
|
||||||
|
created_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.created_at, Unset):
|
||||||
|
created_at = self.created_at.isoformat()
|
||||||
|
error = self.error
|
||||||
|
id = self.id
|
||||||
|
input = self.input
|
||||||
|
output = self.output
|
||||||
|
output_format: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.output_format, Unset):
|
||||||
|
output_format = self.output_format.value
|
||||||
|
src_format: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.src_format, Unset):
|
||||||
|
src_format = self.src_format.value
|
||||||
|
started_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.started_at, Unset):
|
||||||
|
started_at = self.started_at.isoformat()
|
||||||
|
status: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.status, Unset):
|
||||||
|
status = self.status.value
|
||||||
|
updated_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.updated_at, Unset):
|
||||||
|
updated_at = self.updated_at.isoformat()
|
||||||
|
user_id = self.user_id
|
||||||
|
|
||||||
|
field_dict: Dict[str, Any] = {}
|
||||||
|
field_dict.update(self.additional_properties)
|
||||||
|
field_dict.update({})
|
||||||
|
if completed_at is not UNSET:
|
||||||
|
field_dict['completed_at'] = completed_at
|
||||||
|
if created_at is not UNSET:
|
||||||
|
field_dict['created_at'] = created_at
|
||||||
|
if error is not UNSET:
|
||||||
|
field_dict['error'] = error
|
||||||
|
if id is not UNSET:
|
||||||
|
field_dict['id'] = id
|
||||||
|
if input is not UNSET:
|
||||||
|
field_dict['input'] = input
|
||||||
|
if output is not UNSET:
|
||||||
|
field_dict['output'] = output
|
||||||
|
if output_format is not UNSET:
|
||||||
|
field_dict['output_format'] = output_format
|
||||||
|
if src_format is not UNSET:
|
||||||
|
field_dict['src_format'] = src_format
|
||||||
|
if started_at is not UNSET:
|
||||||
|
field_dict['started_at'] = started_at
|
||||||
|
if status is not UNSET:
|
||||||
|
field_dict['status'] = status
|
||||||
|
if updated_at is not UNSET:
|
||||||
|
field_dict['updated_at'] = updated_at
|
||||||
|
if user_id is not UNSET:
|
||||||
|
field_dict['user_id'] = user_id
|
||||||
|
|
||||||
|
return field_dict
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||||
|
d = src_dict.copy()
|
||||||
|
_completed_at = d.pop("completed_at", UNSET)
|
||||||
|
completed_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_completed_at, Unset):
|
||||||
|
completed_at = UNSET
|
||||||
|
else:
|
||||||
|
completed_at = isoparse(_completed_at)
|
||||||
|
|
||||||
|
_created_at = d.pop("created_at", UNSET)
|
||||||
|
created_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_created_at, Unset):
|
||||||
|
created_at = UNSET
|
||||||
|
else:
|
||||||
|
created_at = isoparse(_created_at)
|
||||||
|
|
||||||
|
error = d.pop("error", UNSET)
|
||||||
|
|
||||||
|
id = d.pop("id", UNSET)
|
||||||
|
|
||||||
|
input = d.pop("input", UNSET)
|
||||||
|
|
||||||
|
output = d.pop("output", UNSET)
|
||||||
|
|
||||||
|
_output_format = d.pop("output_format", UNSET)
|
||||||
|
output_format: Union[Unset, UnitVoltageFormat]
|
||||||
|
if isinstance(_output_format, Unset):
|
||||||
|
output_format = UNSET
|
||||||
|
else:
|
||||||
|
output_format = UnitVoltageFormat(_output_format)
|
||||||
|
|
||||||
|
_src_format = d.pop("src_format", UNSET)
|
||||||
|
src_format: Union[Unset, UnitVoltageFormat]
|
||||||
|
if isinstance(_src_format, Unset):
|
||||||
|
src_format = UNSET
|
||||||
|
else:
|
||||||
|
src_format = UnitVoltageFormat(_src_format)
|
||||||
|
|
||||||
|
_started_at = d.pop("started_at", UNSET)
|
||||||
|
started_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_started_at, Unset):
|
||||||
|
started_at = UNSET
|
||||||
|
else:
|
||||||
|
started_at = isoparse(_started_at)
|
||||||
|
|
||||||
|
_status = d.pop("status", UNSET)
|
||||||
|
status: Union[Unset, ApiCallStatus]
|
||||||
|
if isinstance(_status, Unset):
|
||||||
|
status = UNSET
|
||||||
|
else:
|
||||||
|
status = ApiCallStatus(_status)
|
||||||
|
|
||||||
|
_updated_at = d.pop("updated_at", UNSET)
|
||||||
|
updated_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_updated_at, Unset):
|
||||||
|
updated_at = UNSET
|
||||||
|
else:
|
||||||
|
updated_at = isoparse(_updated_at)
|
||||||
|
|
||||||
|
user_id = d.pop("user_id", UNSET)
|
||||||
|
|
||||||
|
unit_voltage_conversion = cls(
|
||||||
|
completed_at=completed_at,
|
||||||
|
created_at=created_at,
|
||||||
|
error=error,
|
||||||
|
id=id,
|
||||||
|
input=input,
|
||||||
|
output=output,
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
started_at=started_at,
|
||||||
|
status=status,
|
||||||
|
updated_at=updated_at,
|
||||||
|
user_id=user_id,
|
||||||
|
)
|
||||||
|
|
||||||
|
unit_voltage_conversion.additional_properties = d
|
||||||
|
return unit_voltage_conversion
|
||||||
|
|
||||||
|
@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
|
10
kittycad/models/unit_voltage_format.py
Normal file
10
kittycad/models/unit_voltage_format.py
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
|
||||||
|
class UnitVoltageFormat(str, Enum):
|
||||||
|
VOLT = 'volt'
|
||||||
|
STATVOLT = 'statvolt'
|
||||||
|
ABVOLT = 'abvolt'
|
||||||
|
|
||||||
|
def __str__(self) -> str:
|
||||||
|
return str(self.value)
|
185
kittycad/models/unit_volume_conversion.py
Normal file
185
kittycad/models/unit_volume_conversion.py
Normal file
@ -0,0 +1,185 @@
|
|||||||
|
import datetime
|
||||||
|
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||||
|
|
||||||
|
import attr
|
||||||
|
from dateutil.parser import isoparse
|
||||||
|
|
||||||
|
from ..models.uuid import Uuid
|
||||||
|
from ..models.unit_volume_format import UnitVolumeFormat
|
||||||
|
from ..models.api_call_status import ApiCallStatus
|
||||||
|
from ..types import UNSET, Unset
|
||||||
|
|
||||||
|
T = TypeVar("T", bound="UnitVolumeConversion")
|
||||||
|
|
||||||
|
|
||||||
|
@attr.s(auto_attribs=True)
|
||||||
|
class UnitVolumeConversion:
|
||||||
|
""" """
|
||||||
|
completed_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
created_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
error: Union[Unset, str] = UNSET
|
||||||
|
id: Union[Unset, str] = UNSET
|
||||||
|
input: Union[Unset, float] = UNSET
|
||||||
|
output: Union[Unset, float] = UNSET
|
||||||
|
output_format: Union[Unset, UnitVolumeFormat] = UNSET
|
||||||
|
src_format: Union[Unset, UnitVolumeFormat] = UNSET
|
||||||
|
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
status: Union[Unset, ApiCallStatus] = UNSET
|
||||||
|
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
user_id: Union[Unset, str] = UNSET
|
||||||
|
|
||||||
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||||
|
|
||||||
|
def to_dict(self) -> Dict[str, Any]:
|
||||||
|
completed_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.completed_at, Unset):
|
||||||
|
completed_at = self.completed_at.isoformat()
|
||||||
|
created_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.created_at, Unset):
|
||||||
|
created_at = self.created_at.isoformat()
|
||||||
|
error = self.error
|
||||||
|
id = self.id
|
||||||
|
input = self.input
|
||||||
|
output = self.output
|
||||||
|
output_format: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.output_format, Unset):
|
||||||
|
output_format = self.output_format.value
|
||||||
|
src_format: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.src_format, Unset):
|
||||||
|
src_format = self.src_format.value
|
||||||
|
started_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.started_at, Unset):
|
||||||
|
started_at = self.started_at.isoformat()
|
||||||
|
status: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.status, Unset):
|
||||||
|
status = self.status.value
|
||||||
|
updated_at: Union[Unset, str] = UNSET
|
||||||
|
if not isinstance(self.updated_at, Unset):
|
||||||
|
updated_at = self.updated_at.isoformat()
|
||||||
|
user_id = self.user_id
|
||||||
|
|
||||||
|
field_dict: Dict[str, Any] = {}
|
||||||
|
field_dict.update(self.additional_properties)
|
||||||
|
field_dict.update({})
|
||||||
|
if completed_at is not UNSET:
|
||||||
|
field_dict['completed_at'] = completed_at
|
||||||
|
if created_at is not UNSET:
|
||||||
|
field_dict['created_at'] = created_at
|
||||||
|
if error is not UNSET:
|
||||||
|
field_dict['error'] = error
|
||||||
|
if id is not UNSET:
|
||||||
|
field_dict['id'] = id
|
||||||
|
if input is not UNSET:
|
||||||
|
field_dict['input'] = input
|
||||||
|
if output is not UNSET:
|
||||||
|
field_dict['output'] = output
|
||||||
|
if output_format is not UNSET:
|
||||||
|
field_dict['output_format'] = output_format
|
||||||
|
if src_format is not UNSET:
|
||||||
|
field_dict['src_format'] = src_format
|
||||||
|
if started_at is not UNSET:
|
||||||
|
field_dict['started_at'] = started_at
|
||||||
|
if status is not UNSET:
|
||||||
|
field_dict['status'] = status
|
||||||
|
if updated_at is not UNSET:
|
||||||
|
field_dict['updated_at'] = updated_at
|
||||||
|
if user_id is not UNSET:
|
||||||
|
field_dict['user_id'] = user_id
|
||||||
|
|
||||||
|
return field_dict
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||||
|
d = src_dict.copy()
|
||||||
|
_completed_at = d.pop("completed_at", UNSET)
|
||||||
|
completed_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_completed_at, Unset):
|
||||||
|
completed_at = UNSET
|
||||||
|
else:
|
||||||
|
completed_at = isoparse(_completed_at)
|
||||||
|
|
||||||
|
_created_at = d.pop("created_at", UNSET)
|
||||||
|
created_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_created_at, Unset):
|
||||||
|
created_at = UNSET
|
||||||
|
else:
|
||||||
|
created_at = isoparse(_created_at)
|
||||||
|
|
||||||
|
error = d.pop("error", UNSET)
|
||||||
|
|
||||||
|
id = d.pop("id", UNSET)
|
||||||
|
|
||||||
|
input = d.pop("input", UNSET)
|
||||||
|
|
||||||
|
output = d.pop("output", UNSET)
|
||||||
|
|
||||||
|
_output_format = d.pop("output_format", UNSET)
|
||||||
|
output_format: Union[Unset, UnitVolumeFormat]
|
||||||
|
if isinstance(_output_format, Unset):
|
||||||
|
output_format = UNSET
|
||||||
|
else:
|
||||||
|
output_format = UnitVolumeFormat(_output_format)
|
||||||
|
|
||||||
|
_src_format = d.pop("src_format", UNSET)
|
||||||
|
src_format: Union[Unset, UnitVolumeFormat]
|
||||||
|
if isinstance(_src_format, Unset):
|
||||||
|
src_format = UNSET
|
||||||
|
else:
|
||||||
|
src_format = UnitVolumeFormat(_src_format)
|
||||||
|
|
||||||
|
_started_at = d.pop("started_at", UNSET)
|
||||||
|
started_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_started_at, Unset):
|
||||||
|
started_at = UNSET
|
||||||
|
else:
|
||||||
|
started_at = isoparse(_started_at)
|
||||||
|
|
||||||
|
_status = d.pop("status", UNSET)
|
||||||
|
status: Union[Unset, ApiCallStatus]
|
||||||
|
if isinstance(_status, Unset):
|
||||||
|
status = UNSET
|
||||||
|
else:
|
||||||
|
status = ApiCallStatus(_status)
|
||||||
|
|
||||||
|
_updated_at = d.pop("updated_at", UNSET)
|
||||||
|
updated_at: Union[Unset, datetime.datetime]
|
||||||
|
if isinstance(_updated_at, Unset):
|
||||||
|
updated_at = UNSET
|
||||||
|
else:
|
||||||
|
updated_at = isoparse(_updated_at)
|
||||||
|
|
||||||
|
user_id = d.pop("user_id", UNSET)
|
||||||
|
|
||||||
|
unit_volume_conversion = cls(
|
||||||
|
completed_at=completed_at,
|
||||||
|
created_at=created_at,
|
||||||
|
error=error,
|
||||||
|
id=id,
|
||||||
|
input=input,
|
||||||
|
output=output,
|
||||||
|
output_format=output_format,
|
||||||
|
src_format=src_format,
|
||||||
|
started_at=started_at,
|
||||||
|
status=status,
|
||||||
|
updated_at=updated_at,
|
||||||
|
user_id=user_id,
|
||||||
|
)
|
||||||
|
|
||||||
|
unit_volume_conversion.additional_properties = d
|
||||||
|
return unit_volume_conversion
|
||||||
|
|
||||||
|
@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
|
14
kittycad/models/unit_volume_format.py
Normal file
14
kittycad/models/unit_volume_format.py
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
|
||||||
|
class UnitVolumeFormat(str, Enum):
|
||||||
|
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'
|
||||||
|
|
||||||
|
def __str__(self) -> str:
|
||||||
|
return str(self.value)
|
Reference in New Issue
Block a user