* regenerate

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* fixes

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* fixes and cleanup

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* I have generated the latest API!

---------

Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Jess Frazelle
2023-07-31 12:50:30 -07:00
committed by GitHub
parent d678182dcf
commit 4c3f497d73
141 changed files with 1432 additions and 566 deletions

View File

@ -126,6 +126,7 @@ intersphinx_mapping = {
"python": ("https://docs.python.org/3", None),
}
# This is a function linkcode_resolve(domain, info), which should return the URL
# to source code corresponding to the object in given domain with given information.
# FROM: https://www.sphinx-doc.org/en/master/usage/extensions/linkcode.html

View File

@ -293,6 +293,17 @@ def generateTypeAndExamplePython(
raise Exception("Unknown parameter type")
elif "oneOf" in schema and len(schema["oneOf"]) > 0:
one_of = schema["oneOf"][0]
# Start Path is a weird one, let's skip it.
# Technically we should be able to handle it, but it's not worth the effort.
# We should also have a more algorithmic way of handling this for any other weird cases.
# But for now, let's just skip it.
if (
"enum" in one_of
and len(one_of["enum"]) > 0
and one_of["enum"][0] == "StartPath"
):
one_of = schema["oneOf"][1]
# Check if each of these only has a object w 1 property.
if isNestedObjectOneOf(schema):
if "properties" in one_of:
@ -307,7 +318,7 @@ def generateTypeAndExamplePython(
name, one_of, data, camel_to_snake(name)
)
return generateTypeAndExamplePython(name, schema["oneOf"][0], data, None)
return generateTypeAndExamplePython(name, one_of, data, None)
elif "allOf" in schema and len(schema["allOf"]) == 1:
return generateTypeAndExamplePython(name, schema["allOf"][0], data, None)
elif "$ref" in schema:
@ -1976,7 +1987,7 @@ def renderTypeFromDict(f, property_name: str, property_schema: dict, data: dict)
elif "$ref" in property_schema:
ref = property_schema["$ref"].replace("#/components/schemas/", "")
# Get the type for the reference.
ref_schema = data["components"]["schemas"][ref]
data["components"]["schemas"][ref]
f.write(
"\t\t_"
@ -1998,7 +2009,6 @@ def renderTypeFromDict(f, property_name: str, property_schema: dict, data: dict)
f.write("\t\t\t" + clean_parameter_name(property_name) + " = UNSET\n")
f.write("\t\telse:\n")
if isNestedObjectOneOf(ref_schema):
f.write(
"\t\t\t"
+ clean_parameter_name(property_name)
@ -2006,16 +2016,7 @@ def renderTypeFromDict(f, property_name: str, property_schema: dict, data: dict)
+ clean_parameter_name(property_name)
+ " # type: ignore[arg-type]\n"
)
else:
f.write(
"\t\t\t"
+ clean_parameter_name(property_name)
+ " = "
+ ref
+ "(_"
+ clean_parameter_name(property_name)
+ ")\n"
)
f.write("\n")
elif "allOf" in property_schema:
if len(property_schema["allOf"]) != 1:
@ -2396,12 +2397,19 @@ def getDetailedFunctionResultType(endpoint: dict, endpoint_refs: List[str]) -> s
return "Response[" + getFunctionResultType(endpoint, endpoint_refs) + "]"
# generate a random letter in the range A - Z
letters: List[str] = []
# generate a random letter combination in the range A - Z
# do not use O or I.
def randletter():
letter = chr(random.randint(ord("A"), ord("Z")))
while letter == "I" or letter == "O":
letter = chr(random.randint(ord("A"), ord("Z")))
# make sure we do not use a letter we have already used.
def randletter() -> str:
letter1 = chr(random.randint(ord("A"), ord("Z")))
letter2 = chr(random.randint(ord("A"), ord("Z")))
letter = letter1 + letter2
while letter in letters:
return randletter()
letters.append(letter)
return letter

View File

@ -17,8 +17,7 @@ poetry run python generate/generate.py
poetry run isort .
poetry run black . generate/generate.py docs/conf.py kittycad/client_test.py kittycad/examples_test.py
poetry run ruff check --fix .
# We ignore errors here but we should eventually fix them.
poetry run mypy . || true
poetry run mypy .
# Run the tests.

File diff suppressed because one or more lines are too long

View File

@ -180,7 +180,8 @@ def sync(
"""Get the status and output of an async operation.
This endpoint requires authentication by any KittyCAD user. It returns details of the requested async operation for the user.
If the user is not authenticated to view the specified async operation, then it is not returned.
Only KittyCAD employees with the proper access can view async operations for other users.""" # noqa: E501
Only KittyCAD employees with the proper access can view async operations for other users.
""" # noqa: E501
return sync_detailed(
id=id,
@ -234,7 +235,8 @@ async def asyncio(
"""Get the status and output of an async operation.
This endpoint requires authentication by any KittyCAD user. It returns details of the requested async operation for the user.
If the user is not authenticated to view the specified async operation, then it is not returned.
Only KittyCAD employees with the proper access can view async operations for other users.""" # noqa: E501
Only KittyCAD employees with the proper access can view async operations for other users.
""" # noqa: E501
return (
await asyncio_detailed(

View File

@ -106,7 +106,8 @@ def sync(
"""This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user if "me" is passed as the user id.
Alternatively, you can use the `/user/api-calls` endpoint to get the API calls for your user.
If the authenticated user is a KittyCAD employee, then the API calls are returned for the user specified by the user id.
The API calls are returned in order of creation, with the most recently created API calls first.""" # noqa: E501
The API calls are returned in order of creation, with the most recently created API calls first.
""" # noqa: E501
return sync_detailed(
id=id,
@ -150,7 +151,8 @@ async def asyncio(
"""This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user if "me" is passed as the user id.
Alternatively, you can use the `/user/api-calls` endpoint to get the API calls for your user.
If the authenticated user is a KittyCAD employee, then the API calls are returned for the user specified by the user id.
The API calls are returned in order of creation, with the most recently created API calls first.""" # noqa: E501
The API calls are returned in order of creation, with the most recently created API calls first.
""" # noqa: E501
return (
await asyncio_detailed(

View File

@ -100,7 +100,8 @@ def sync(
page_token: Optional[str] = None,
) -> Optional[Union[ApiCallWithPriceResultsPage, Error]]:
"""This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user.
The API calls are returned in order of creation, with the most recently created API calls first.""" # noqa: E501
The API calls are returned in order of creation, with the most recently created API calls first.
""" # noqa: E501
return sync_detailed(
limit=limit,
@ -138,7 +139,8 @@ async def asyncio(
page_token: Optional[str] = None,
) -> Optional[Union[ApiCallWithPriceResultsPage, Error]]:
"""This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user.
The API calls are returned in order of creation, with the most recently created API calls first.""" # noqa: E501
The API calls are returned in order of creation, with the most recently created API calls first.
""" # noqa: E501
return (
await asyncio_detailed(

View File

@ -71,7 +71,8 @@ def sync(
client: Client,
) -> Optional[Error]:
"""This endpoint requires authentication by any KittyCAD user. It deletes the requested API token for the user.
This endpoint does not actually delete the API token from the database. It merely marks the token as invalid. We still want to keep the token in the database for historical purposes.""" # noqa: E501
This endpoint does not actually delete the API token from the database. It merely marks the token as invalid. We still want to keep the token in the database for historical purposes.
""" # noqa: E501
return sync_detailed(
token=token,
@ -101,7 +102,8 @@ async def asyncio(
client: Client,
) -> Optional[Error]:
"""This endpoint requires authentication by any KittyCAD user. It deletes the requested API token for the user.
This endpoint does not actually delete the API token from the database. It merely marks the token as invalid. We still want to keep the token in the database for historical purposes.""" # noqa: E501
This endpoint does not actually delete the API token from the database. It merely marks the token as invalid. We still want to keep the token in the database for historical purposes.
""" # noqa: E501
return (
await asyncio_detailed(

View File

@ -100,7 +100,8 @@ def sync(
page_token: Optional[str] = None,
) -> Optional[Union[ApiTokenResultsPage, Error]]:
"""This endpoint requires authentication by any KittyCAD user. It returns the API tokens for the authenticated user.
The API tokens are returned in order of creation, with the most recently created API tokens first.""" # noqa: E501
The API tokens are returned in order of creation, with the most recently created API tokens first.
""" # noqa: E501
return sync_detailed(
limit=limit,
@ -138,7 +139,8 @@ async def asyncio(
page_token: Optional[str] = None,
) -> Optional[Union[ApiTokenResultsPage, Error]]:
"""This endpoint requires authentication by any KittyCAD user. It returns the API tokens for the authenticated user.
The API tokens are returned in order of creation, with the most recently created API tokens first.""" # noqa: E501
The API tokens are returned in order of creation, with the most recently created API tokens first.
""" # noqa: E501
return (
await asyncio_detailed(

View File

@ -65,7 +65,8 @@ def sync(
client: Client,
) -> Optional[Error]:
"""This is different than OAuth 2.0 authentication for users. This endpoint grants access for KittyCAD to access user's repos.
The user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.""" # noqa: E501
The user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.
""" # noqa: E501
return sync_detailed(
client=client,
@ -91,7 +92,8 @@ async def asyncio(
client: Client,
) -> Optional[Error]:
"""This is different than OAuth 2.0 authentication for users. This endpoint grants access for KittyCAD to access user's repos.
The user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.""" # noqa: E501
The user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.
""" # noqa: E501
return (
await asyncio_detailed(

View File

@ -72,7 +72,8 @@ def sync(
client: Client,
) -> Optional[Union[AppClientInfo, Error]]:
"""This is different than OAuth 2.0 authentication for users. This endpoint grants access for KittyCAD to access user's repos.
The user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.""" # noqa: E501
The user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.
""" # noqa: E501
return sync_detailed(
client=client,
@ -98,7 +99,8 @@ async def asyncio(
client: Client,
) -> Optional[Union[AppClientInfo, Error]]:
"""This is different than OAuth 2.0 authentication for users. This endpoint grants access for KittyCAD to access user's repos.
The user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.""" # noqa: E501
The user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.
""" # noqa: E501
return (
await asyncio_detailed(

View File

@ -78,7 +78,6 @@ def sync(
*,
client: Client,
) -> Optional[Union[PhysicsConstant, Error]]:
return sync_detailed(
constant=constant,
client=client,
@ -106,7 +105,6 @@ async def asyncio(
*,
client: Client,
) -> Optional[Union[PhysicsConstant, Error]]:
return (
await asyncio_detailed(
constant=constant,

View File

@ -88,7 +88,6 @@ def sync(
client: Client,
output: Optional[str] = None,
) -> Optional[Union[CodeOutput, Error]]:
return sync_detailed(
lang=lang,
output=output,
@ -124,7 +123,6 @@ async def asyncio(
client: Client,
output: Optional[str] = None,
) -> Optional[Union[CodeOutput, Error]]:
return (
await asyncio_detailed(
lang=lang,

View File

@ -6,16 +6,23 @@ from ...client import Client
from ...models.error import Error
from ...models.file_center_of_mass import FileCenterOfMass
from ...models.file_import_format import FileImportFormat
from ...models.unit_length import UnitLength
from ...types import Response
def _get_kwargs(
output_unit: UnitLength,
src_format: FileImportFormat,
body: bytes,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/file/center-of-mass".format(client.base_url) # noqa: E501
if output_unit is not None:
if "?" in url:
url = url + "&output_unit=" + str(output_unit)
else:
url = url + "?output_unit=" + str(output_unit)
if src_format is not None:
if "?" in url:
url = url + "&src_format=" + str(src_format)
@ -61,12 +68,14 @@ def _build_response(
def sync_detailed(
output_unit: UnitLength,
src_format: FileImportFormat,
body: bytes,
*,
client: Client,
) -> Response[Optional[Union[FileCenterOfMass, Error]]]:
kwargs = _get_kwargs(
output_unit=output_unit,
src_format=src_format,
body=body,
client=client,
@ -81,6 +90,7 @@ def sync_detailed(
def sync(
output_unit: UnitLength,
src_format: FileImportFormat,
body: bytes,
*,
@ -90,9 +100,11 @@ def sync(
Currently, this endpoint returns the cartesian co-ordinate in world space measure units.
In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.
Get the center of mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
""" # noqa: E501
return sync_detailed(
output_unit=output_unit,
src_format=src_format,
body=body,
client=client,
@ -100,12 +112,14 @@ def sync(
async def asyncio_detailed(
output_unit: UnitLength,
src_format: FileImportFormat,
body: bytes,
*,
client: Client,
) -> Response[Optional[Union[FileCenterOfMass, Error]]]:
kwargs = _get_kwargs(
output_unit=output_unit,
src_format=src_format,
body=body,
client=client,
@ -118,6 +132,7 @@ async def asyncio_detailed(
async def asyncio(
output_unit: UnitLength,
src_format: FileImportFormat,
body: bytes,
*,
@ -127,10 +142,12 @@ async def asyncio(
Currently, this endpoint returns the cartesian co-ordinate in world space measure units.
In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.
Get the center of mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
""" # noqa: E501
return (
await asyncio_detailed(
output_unit=output_unit,
src_format=src_format,
body=body,
client=client,

View File

@ -91,7 +91,8 @@ def sync(
"""If you wish to specify the conversion options, use the `/file/conversion` endpoint instead.
Convert a CAD file from one format to another. If the file being converted is larger than 25MB, it will be performed asynchronously.
If the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string.
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
""" # noqa: E501
return sync_detailed(
output_format=output_format,
@ -131,7 +132,8 @@ async def asyncio(
"""If you wish to specify the conversion options, use the `/file/conversion` endpoint instead.
Convert a CAD file from one format to another. If the file being converted is larger than 25MB, it will be performed asynchronously.
If the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string.
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
""" # noqa: E501
return (
await asyncio_detailed(

View File

@ -6,11 +6,15 @@ from ...client import Client
from ...models.error import Error
from ...models.file_density import FileDensity
from ...models.file_import_format import FileImportFormat
from ...models.unit_density import UnitDensity
from ...models.unit_mass import UnitMass
from ...types import Response
def _get_kwargs(
material_mass: float,
material_mass_unit: UnitMass,
output_unit: UnitDensity,
src_format: FileImportFormat,
body: bytes,
*,
@ -22,6 +26,16 @@ def _get_kwargs(
url = url + "&material_mass=" + str(material_mass)
else:
url = url + "?material_mass=" + str(material_mass)
if material_mass_unit is not None:
if "?" in url:
url = url + "&material_mass_unit=" + str(material_mass_unit)
else:
url = url + "?material_mass_unit=" + str(material_mass_unit)
if output_unit is not None:
if "?" in url:
url = url + "&output_unit=" + str(output_unit)
else:
url = url + "?output_unit=" + str(output_unit)
if src_format is not None:
if "?" in url:
url = url + "&src_format=" + str(src_format)
@ -66,6 +80,8 @@ def _build_response(
def sync_detailed(
material_mass: float,
material_mass_unit: UnitMass,
output_unit: UnitDensity,
src_format: FileImportFormat,
body: bytes,
*,
@ -73,6 +89,8 @@ def sync_detailed(
) -> Response[Optional[Union[FileDensity, Error]]]:
kwargs = _get_kwargs(
material_mass=material_mass,
material_mass_unit=material_mass_unit,
output_unit=output_unit,
src_format=src_format,
body=body,
client=client,
@ -88,6 +106,8 @@ def sync_detailed(
def sync(
material_mass: float,
material_mass_unit: UnitMass,
output_unit: UnitDensity,
src_format: FileImportFormat,
body: bytes,
*,
@ -97,10 +117,13 @@ def sync(
Currently, this endpoint assumes if you are giving a material mass in a specific mass units, we return a density in mass unit per cubic measure unit.
In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.
Get the density of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
""" # noqa: E501
return sync_detailed(
material_mass=material_mass,
material_mass_unit=material_mass_unit,
output_unit=output_unit,
src_format=src_format,
body=body,
client=client,
@ -109,6 +132,8 @@ def sync(
async def asyncio_detailed(
material_mass: float,
material_mass_unit: UnitMass,
output_unit: UnitDensity,
src_format: FileImportFormat,
body: bytes,
*,
@ -116,6 +141,8 @@ async def asyncio_detailed(
) -> Response[Optional[Union[FileDensity, Error]]]:
kwargs = _get_kwargs(
material_mass=material_mass,
material_mass_unit=material_mass_unit,
output_unit=output_unit,
src_format=src_format,
body=body,
client=client,
@ -129,6 +156,8 @@ async def asyncio_detailed(
async def asyncio(
material_mass: float,
material_mass_unit: UnitMass,
output_unit: UnitDensity,
src_format: FileImportFormat,
body: bytes,
*,
@ -138,11 +167,14 @@ async def asyncio(
Currently, this endpoint assumes if you are giving a material mass in a specific mass units, we return a density in mass unit per cubic measure unit.
In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.
Get the density of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
""" # noqa: E501
return (
await asyncio_detailed(
material_mass=material_mass,
material_mass_unit=material_mass_unit,
output_unit=output_unit,
src_format=src_format,
body=body,
client=client,

View File

@ -6,11 +6,15 @@ from ...client import Client
from ...models.error import Error
from ...models.file_import_format import FileImportFormat
from ...models.file_mass import FileMass
from ...models.unit_density import UnitDensity
from ...models.unit_mass import UnitMass
from ...types import Response
def _get_kwargs(
material_density: float,
material_density_unit: UnitDensity,
output_unit: UnitMass,
src_format: FileImportFormat,
body: bytes,
*,
@ -22,6 +26,16 @@ def _get_kwargs(
url = url + "&material_density=" + str(material_density)
else:
url = url + "?material_density=" + str(material_density)
if material_density_unit is not None:
if "?" in url:
url = url + "&material_density_unit=" + str(material_density_unit)
else:
url = url + "?material_density_unit=" + str(material_density_unit)
if output_unit is not None:
if "?" in url:
url = url + "&output_unit=" + str(output_unit)
else:
url = url + "?output_unit=" + str(output_unit)
if src_format is not None:
if "?" in url:
url = url + "&src_format=" + str(src_format)
@ -66,6 +80,8 @@ def _build_response(
def sync_detailed(
material_density: float,
material_density_unit: UnitDensity,
output_unit: UnitMass,
src_format: FileImportFormat,
body: bytes,
*,
@ -73,6 +89,8 @@ def sync_detailed(
) -> Response[Optional[Union[FileMass, Error]]]:
kwargs = _get_kwargs(
material_density=material_density,
material_density_unit=material_density_unit,
output_unit=output_unit,
src_format=src_format,
body=body,
client=client,
@ -88,6 +106,8 @@ def sync_detailed(
def sync(
material_density: float,
material_density_unit: UnitDensity,
output_unit: UnitMass,
src_format: FileImportFormat,
body: bytes,
*,
@ -97,10 +117,13 @@ def sync(
Currently, this endpoint assumes if you are giving a material density in a specific mass unit per cubic measure unit, we return a mass in mass units. The same mass units as passed in the material density.
In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.
Get the mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
""" # noqa: E501
return sync_detailed(
material_density=material_density,
material_density_unit=material_density_unit,
output_unit=output_unit,
src_format=src_format,
body=body,
client=client,
@ -109,6 +132,8 @@ def sync(
async def asyncio_detailed(
material_density: float,
material_density_unit: UnitDensity,
output_unit: UnitMass,
src_format: FileImportFormat,
body: bytes,
*,
@ -116,6 +141,8 @@ async def asyncio_detailed(
) -> Response[Optional[Union[FileMass, Error]]]:
kwargs = _get_kwargs(
material_density=material_density,
material_density_unit=material_density_unit,
output_unit=output_unit,
src_format=src_format,
body=body,
client=client,
@ -129,6 +156,8 @@ async def asyncio_detailed(
async def asyncio(
material_density: float,
material_density_unit: UnitDensity,
output_unit: UnitMass,
src_format: FileImportFormat,
body: bytes,
*,
@ -138,11 +167,14 @@ async def asyncio(
Currently, this endpoint assumes if you are giving a material density in a specific mass unit per cubic measure unit, we return a mass in mass units. The same mass units as passed in the material density.
In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.
Get the mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
""" # noqa: E501
return (
await asyncio_detailed(
material_density=material_density,
material_density_unit=material_density_unit,
output_unit=output_unit,
src_format=src_format,
body=body,
client=client,

View File

@ -6,16 +6,23 @@ from ...client import Client
from ...models.error import Error
from ...models.file_import_format import FileImportFormat
from ...models.file_surface_area import FileSurfaceArea
from ...models.unit_area import UnitArea
from ...types import Response
def _get_kwargs(
output_unit: UnitArea,
src_format: FileImportFormat,
body: bytes,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/file/surface-area".format(client.base_url) # noqa: E501
if output_unit is not None:
if "?" in url:
url = url + "&output_unit=" + str(output_unit)
else:
url = url + "?output_unit=" + str(output_unit)
if src_format is not None:
if "?" in url:
url = url + "&src_format=" + str(src_format)
@ -61,12 +68,14 @@ def _build_response(
def sync_detailed(
output_unit: UnitArea,
src_format: FileImportFormat,
body: bytes,
*,
client: Client,
) -> Response[Optional[Union[FileSurfaceArea, Error]]]:
kwargs = _get_kwargs(
output_unit=output_unit,
src_format=src_format,
body=body,
client=client,
@ -81,6 +90,7 @@ def sync_detailed(
def sync(
output_unit: UnitArea,
src_format: FileImportFormat,
body: bytes,
*,
@ -90,9 +100,11 @@ def sync(
Currently, this endpoint returns the square measure units.
In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.
Get the surface area of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
""" # noqa: E501
return sync_detailed(
output_unit=output_unit,
src_format=src_format,
body=body,
client=client,
@ -100,12 +112,14 @@ def sync(
async def asyncio_detailed(
output_unit: UnitArea,
src_format: FileImportFormat,
body: bytes,
*,
client: Client,
) -> Response[Optional[Union[FileSurfaceArea, Error]]]:
kwargs = _get_kwargs(
output_unit=output_unit,
src_format=src_format,
body=body,
client=client,
@ -118,6 +132,7 @@ async def asyncio_detailed(
async def asyncio(
output_unit: UnitArea,
src_format: FileImportFormat,
body: bytes,
*,
@ -127,10 +142,12 @@ async def asyncio(
Currently, this endpoint returns the square measure units.
In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.
Get the surface area of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
""" # noqa: E501
return (
await asyncio_detailed(
output_unit=output_unit,
src_format=src_format,
body=body,
client=client,

View File

@ -6,16 +6,23 @@ from ...client import Client
from ...models.error import Error
from ...models.file_import_format import FileImportFormat
from ...models.file_volume import FileVolume
from ...models.unit_volume import UnitVolume
from ...types import Response
def _get_kwargs(
output_unit: UnitVolume,
src_format: FileImportFormat,
body: bytes,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/file/volume".format(client.base_url) # noqa: E501
if output_unit is not None:
if "?" in url:
url = url + "&output_unit=" + str(output_unit)
else:
url = url + "?output_unit=" + str(output_unit)
if src_format is not None:
if "?" in url:
url = url + "&src_format=" + str(src_format)
@ -59,12 +66,14 @@ def _build_response(
def sync_detailed(
output_unit: UnitVolume,
src_format: FileImportFormat,
body: bytes,
*,
client: Client,
) -> Response[Optional[Union[FileVolume, Error]]]:
kwargs = _get_kwargs(
output_unit=output_unit,
src_format=src_format,
body=body,
client=client,
@ -79,6 +88,7 @@ def sync_detailed(
def sync(
output_unit: UnitVolume,
src_format: FileImportFormat,
body: bytes,
*,
@ -88,9 +98,11 @@ def sync(
Currently, this endpoint returns the cubic measure units.
In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.
Get the volume of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
""" # noqa: E501
return sync_detailed(
output_unit=output_unit,
src_format=src_format,
body=body,
client=client,
@ -98,12 +110,14 @@ def sync(
async def asyncio_detailed(
output_unit: UnitVolume,
src_format: FileImportFormat,
body: bytes,
*,
client: Client,
) -> Response[Optional[Union[FileVolume, Error]]]:
kwargs = _get_kwargs(
output_unit=output_unit,
src_format=src_format,
body=body,
client=client,
@ -116,6 +130,7 @@ async def asyncio_detailed(
async def asyncio(
output_unit: UnitVolume,
src_format: FileImportFormat,
body: bytes,
*,
@ -125,10 +140,12 @@ async def asyncio(
Currently, this endpoint returns the cubic measure units.
In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.
Get the volume of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
""" # noqa: E501
return (
await asyncio_detailed(
output_unit=output_unit,
src_format=src_format,
body=body,
client=client,

View File

@ -77,7 +77,6 @@ def sync(
*,
client: Client,
) -> Optional[Union[VerificationToken, Error]]:
return sync_detailed(
body=body,
client=client,
@ -105,7 +104,6 @@ async def asyncio(
*,
client: Client,
) -> Optional[Union[VerificationToken, Error]]:
return (
await asyncio_detailed(
body=body,

View File

@ -91,7 +91,6 @@ def sync(
client: Client,
callback_url: Optional[str] = None,
) -> Optional[Error]:
return sync_detailed(
callback_url=callback_url,
email=email,
@ -127,7 +126,6 @@ async def asyncio(
client: Client,
callback_url: Optional[str] = None,
) -> Optional[Error]:
return (
await asyncio_detailed(
callback_url=callback_url,

View File

@ -71,7 +71,6 @@ def sync(
*,
client: Client,
) -> Optional[Union[AiPluginManifest, Error]]:
return sync_detailed(
client=client,
).parsed
@ -95,7 +94,6 @@ async def asyncio(
*,
client: Client,
) -> Optional[Union[AiPluginManifest, Error]]:
return (
await asyncio_detailed(
client=client,

View File

@ -68,7 +68,6 @@ def sync(
*,
client: Client,
) -> Optional[Union[dict, Error]]:
return sync_detailed(
client=client,
).parsed
@ -92,7 +91,6 @@ async def asyncio(
*,
client: Client,
) -> Optional[Union[dict, Error]]:
return (
await asyncio_detailed(
client=client,

View File

@ -69,7 +69,6 @@ def sync(
*,
client: Client,
) -> Optional[Union[Pong, Error]]:
return sync_detailed(
client=client,
).parsed
@ -93,7 +92,6 @@ async def asyncio(
*,
client: Client,
) -> Optional[Union[Pong, Error]]:
return (
await asyncio_detailed(
client=client,

View File

@ -77,7 +77,6 @@ def sync(
*,
client: Client,
) -> Optional[Union[ModelingOutcomes, Error]]:
return sync_detailed(
body=body,
client=client,
@ -105,7 +104,6 @@ async def asyncio(
*,
client: Client,
) -> Optional[Union[ModelingOutcomes, Error]]:
return (
await asyncio_detailed(
body=body,

View File

@ -76,7 +76,8 @@ def sync(
client: Client,
) -> Optional[Union[Customer, Error]]:
"""This includes billing address, phone, and name.
This endpoint requires authentication by any KittyCAD user. It creates the payment information for the authenticated user.""" # noqa: E501
This endpoint requires authentication by any KittyCAD user. It creates the payment information for the authenticated user.
""" # noqa: E501
return sync_detailed(
body=body,
@ -106,7 +107,8 @@ async def asyncio(
client: Client,
) -> Optional[Union[Customer, Error]]:
"""This includes billing address, phone, and name.
This endpoint requires authentication by any KittyCAD user. It creates the payment information for the authenticated user.""" # noqa: E501
This endpoint requires authentication by any KittyCAD user. It creates the payment information for the authenticated user.
""" # noqa: E501
return (
await asyncio_detailed(

View File

@ -65,7 +65,8 @@ def sync(
client: Client,
) -> Optional[Error]:
"""This includes billing address, phone, and name.
This endpoint requires authentication by any KittyCAD user. It deletes the payment information for the authenticated user.""" # noqa: E501
This endpoint requires authentication by any KittyCAD user. It deletes the payment information for the authenticated user.
""" # noqa: E501
return sync_detailed(
client=client,
@ -91,7 +92,8 @@ async def asyncio(
client: Client,
) -> Optional[Error]:
"""This includes billing address, phone, and name.
This endpoint requires authentication by any KittyCAD user. It deletes the payment information for the authenticated user.""" # noqa: E501
This endpoint requires authentication by any KittyCAD user. It deletes the payment information for the authenticated user.
""" # noqa: E501
return (
await asyncio_detailed(

View File

@ -70,7 +70,8 @@ def sync(
client: Client,
) -> Optional[Union[Customer, Error]]:
"""This includes billing address, phone, and name.
This endpoint requires authentication by any KittyCAD user. It gets the payment information for the authenticated user.""" # noqa: E501
This endpoint requires authentication by any KittyCAD user. It gets the payment information for the authenticated user.
""" # noqa: E501
return sync_detailed(
client=client,
@ -96,7 +97,8 @@ async def asyncio(
client: Client,
) -> Optional[Union[Customer, Error]]:
"""This includes billing address, phone, and name.
This endpoint requires authentication by any KittyCAD user. It gets the payment information for the authenticated user.""" # noqa: E501
This endpoint requires authentication by any KittyCAD user. It gets the payment information for the authenticated user.
""" # noqa: E501
return (
await asyncio_detailed(

View File

@ -76,7 +76,8 @@ def sync(
client: Client,
) -> Optional[Union[Customer, Error]]:
"""This includes billing address, phone, and name.
This endpoint requires authentication by any KittyCAD user. It updates the payment information for the authenticated user.""" # noqa: E501
This endpoint requires authentication by any KittyCAD user. It updates the payment information for the authenticated user.
""" # noqa: E501
return sync_detailed(
body=body,
@ -106,7 +107,8 @@ async def asyncio(
client: Client,
) -> Optional[Union[Customer, Error]]:
"""This includes billing address, phone, and name.
This endpoint requires authentication by any KittyCAD user. It updates the payment information for the authenticated user.""" # noqa: E501
This endpoint requires authentication by any KittyCAD user. It updates the payment information for the authenticated user.
""" # noqa: E501
return (
await asyncio_detailed(

View File

@ -65,7 +65,8 @@ def sync(
client: Client,
) -> Optional[Error]:
"""This endpoint requires authentication by any KittyCAD user. It deletes the authenticated user from KittyCAD's database.
This call will only succeed if all invoices associated with the user have been paid in full and there is no outstanding balance.""" # noqa: E501
This call will only succeed if all invoices associated with the user have been paid in full and there is no outstanding balance.
""" # noqa: E501
return sync_detailed(
client=client,
@ -91,7 +92,8 @@ async def asyncio(
client: Client,
) -> Optional[Error]:
"""This endpoint requires authentication by any KittyCAD user. It deletes the authenticated user from KittyCAD's database.
This call will only succeed if all invoices associated with the user have been paid in full and there is no outstanding balance.""" # noqa: E501
This call will only succeed if all invoices associated with the user have been paid in full and there is no outstanding balance.
""" # noqa: E501
return (
await asyncio_detailed(

View File

@ -24,6 +24,9 @@ from .models import (
FileMass,
FileVolume,
Pong,
UnitDensity,
UnitMass,
UnitVolume,
User,
)
@ -171,6 +174,8 @@ def test_file_mass():
body=content,
src_format=FileImportFormat.OBJ,
material_density=1.0,
material_density_unit=UnitDensity.KG_M3,
output_unit=UnitMass.G,
)
assert isinstance(result, FileMass)
@ -198,7 +203,10 @@ def test_file_volume():
# Get the fc.
result: Union[FileVolume, Error, None] = create_file_volume.sync(
client=client, body=content, src_format=FileImportFormat.OBJ
client=client,
body=content,
src_format=FileImportFormat.OBJ,
output_unit=UnitVolume.CM3,
)
assert isinstance(result, FileVolume)

View File

@ -142,14 +142,16 @@ from kittycad.models.email_authentication_form import EmailAuthenticationForm
from kittycad.models.file_export_format import FileExportFormat
from kittycad.models.file_import_format import FileImportFormat
from kittycad.models.image_type import ImageType
from kittycad.models.modeling_cmd import ModelingCmd
from kittycad.models.modeling_cmd import MovePathPen
from kittycad.models.modeling_cmd_id import ModelingCmdId
from kittycad.models.modeling_cmd_req import ModelingCmdReq
from kittycad.models.modeling_cmd_req_batch import ModelingCmdReqBatch
from kittycad.models.physics_constant_name import PhysicsConstantName
from kittycad.models.point3d import Point3d
from kittycad.models.unit_angle import UnitAngle
from kittycad.models.unit_area import UnitArea
from kittycad.models.unit_current import UnitCurrent
from kittycad.models.unit_density import UnitDensity
from kittycad.models.unit_energy import UnitEnergy
from kittycad.models.unit_force import UnitForce
from kittycad.models.unit_frequency import UnitFrequency
@ -981,6 +983,7 @@ def test_create_file_center_of_mass():
result: Optional[Union[FileCenterOfMass, Error]] = create_file_center_of_mass.sync(
client=client,
output_unit=UnitLength.CM,
src_format=FileImportFormat.DAE,
body=bytes("some bytes", "utf-8"),
)
@ -997,6 +1000,7 @@ def test_create_file_center_of_mass():
Optional[Union[FileCenterOfMass, Error]]
] = create_file_center_of_mass.sync_detailed(
client=client,
output_unit=UnitLength.CM,
src_format=FileImportFormat.DAE,
body=bytes("some bytes", "utf-8"),
)
@ -1013,6 +1017,7 @@ async def test_create_file_center_of_mass_async():
Union[FileCenterOfMass, Error]
] = await create_file_center_of_mass.asyncio(
client=client,
output_unit=UnitLength.CM,
src_format=FileImportFormat.DAE,
body=bytes("some bytes", "utf-8"),
)
@ -1022,6 +1027,7 @@ async def test_create_file_center_of_mass_async():
Optional[Union[FileCenterOfMass, Error]]
] = await create_file_center_of_mass.asyncio_detailed(
client=client,
output_unit=UnitLength.CM,
src_format=FileImportFormat.DAE,
body=bytes("some bytes", "utf-8"),
)
@ -1094,6 +1100,8 @@ def test_create_file_density():
result: Optional[Union[FileDensity, Error]] = create_file_density.sync(
client=client,
material_mass=3.14,
material_mass_unit=UnitMass.G,
output_unit=UnitDensity.LB_FT3,
src_format=FileImportFormat.DAE,
body=bytes("some bytes", "utf-8"),
)
@ -1111,6 +1119,8 @@ def test_create_file_density():
] = create_file_density.sync_detailed(
client=client,
material_mass=3.14,
material_mass_unit=UnitMass.G,
output_unit=UnitDensity.LB_FT3,
src_format=FileImportFormat.DAE,
body=bytes("some bytes", "utf-8"),
)
@ -1126,6 +1136,8 @@ async def test_create_file_density_async():
result: Optional[Union[FileDensity, Error]] = await create_file_density.asyncio(
client=client,
material_mass=3.14,
material_mass_unit=UnitMass.G,
output_unit=UnitDensity.LB_FT3,
src_format=FileImportFormat.DAE,
body=bytes("some bytes", "utf-8"),
)
@ -1136,6 +1148,8 @@ async def test_create_file_density_async():
] = await create_file_density.asyncio_detailed(
client=client,
material_mass=3.14,
material_mass_unit=UnitMass.G,
output_unit=UnitDensity.LB_FT3,
src_format=FileImportFormat.DAE,
body=bytes("some bytes", "utf-8"),
)
@ -1204,6 +1218,8 @@ def test_create_file_mass():
result: Optional[Union[FileMass, Error]] = create_file_mass.sync(
client=client,
material_density=3.14,
material_density_unit=UnitDensity.LB_FT3,
output_unit=UnitMass.G,
src_format=FileImportFormat.DAE,
body=bytes("some bytes", "utf-8"),
)
@ -1221,6 +1237,8 @@ def test_create_file_mass():
] = create_file_mass.sync_detailed(
client=client,
material_density=3.14,
material_density_unit=UnitDensity.LB_FT3,
output_unit=UnitMass.G,
src_format=FileImportFormat.DAE,
body=bytes("some bytes", "utf-8"),
)
@ -1236,6 +1254,8 @@ async def test_create_file_mass_async():
result: Optional[Union[FileMass, Error]] = await create_file_mass.asyncio(
client=client,
material_density=3.14,
material_density_unit=UnitDensity.LB_FT3,
output_unit=UnitMass.G,
src_format=FileImportFormat.DAE,
body=bytes("some bytes", "utf-8"),
)
@ -1246,6 +1266,8 @@ async def test_create_file_mass_async():
] = await create_file_mass.asyncio_detailed(
client=client,
material_density=3.14,
material_density_unit=UnitDensity.LB_FT3,
output_unit=UnitMass.G,
src_format=FileImportFormat.DAE,
body=bytes("some bytes", "utf-8"),
)
@ -1258,6 +1280,7 @@ def test_create_file_surface_area():
result: Optional[Union[FileSurfaceArea, Error]] = create_file_surface_area.sync(
client=client,
output_unit=UnitArea.CM2,
src_format=FileImportFormat.DAE,
body=bytes("some bytes", "utf-8"),
)
@ -1274,6 +1297,7 @@ def test_create_file_surface_area():
Optional[Union[FileSurfaceArea, Error]]
] = create_file_surface_area.sync_detailed(
client=client,
output_unit=UnitArea.CM2,
src_format=FileImportFormat.DAE,
body=bytes("some bytes", "utf-8"),
)
@ -1290,6 +1314,7 @@ async def test_create_file_surface_area_async():
Union[FileSurfaceArea, Error]
] = await create_file_surface_area.asyncio(
client=client,
output_unit=UnitArea.CM2,
src_format=FileImportFormat.DAE,
body=bytes("some bytes", "utf-8"),
)
@ -1299,6 +1324,7 @@ async def test_create_file_surface_area_async():
Optional[Union[FileSurfaceArea, Error]]
] = await create_file_surface_area.asyncio_detailed(
client=client,
output_unit=UnitArea.CM2,
src_format=FileImportFormat.DAE,
body=bytes("some bytes", "utf-8"),
)
@ -1311,6 +1337,7 @@ def test_create_file_volume():
result: Optional[Union[FileVolume, Error]] = create_file_volume.sync(
client=client,
output_unit=UnitVolume.CM3,
src_format=FileImportFormat.DAE,
body=bytes("some bytes", "utf-8"),
)
@ -1327,6 +1354,7 @@ def test_create_file_volume():
Optional[Union[FileVolume, Error]]
] = create_file_volume.sync_detailed(
client=client,
output_unit=UnitVolume.CM3,
src_format=FileImportFormat.DAE,
body=bytes("some bytes", "utf-8"),
)
@ -1341,6 +1369,7 @@ async def test_create_file_volume_async():
result: Optional[Union[FileVolume, Error]] = await create_file_volume.asyncio(
client=client,
output_unit=UnitVolume.CM3,
src_format=FileImportFormat.DAE,
body=bytes("some bytes", "utf-8"),
)
@ -1350,6 +1379,7 @@ async def test_create_file_volume_async():
Optional[Union[FileVolume, Error]]
] = await create_file_volume.asyncio_detailed(
client=client,
output_unit=UnitVolume.CM3,
src_format=FileImportFormat.DAE,
body=bytes("some bytes", "utf-8"),
)
@ -1402,7 +1432,14 @@ def test_cmd():
cmd.sync(
client=client,
body=ModelingCmdReq(
cmd=ModelingCmd.START_PATH,
cmd=MovePathPen(
path=ModelingCmdId("<uuid>"),
to=Point3d(
x=3.14,
y=3.14,
z=3.14,
),
),
cmd_id=ModelingCmdId("<uuid>"),
file_id="<string>",
),
@ -1412,7 +1449,14 @@ def test_cmd():
cmd.sync_detailed(
client=client,
body=ModelingCmdReq(
cmd=ModelingCmd.START_PATH,
cmd=MovePathPen(
path=ModelingCmdId("<uuid>"),
to=Point3d(
x=3.14,
y=3.14,
z=3.14,
),
),
cmd_id=ModelingCmdId("<uuid>"),
file_id="<string>",
),
@ -1429,7 +1473,14 @@ async def test_cmd_async():
await cmd.asyncio(
client=client,
body=ModelingCmdReq(
cmd=ModelingCmd.START_PATH,
cmd=MovePathPen(
path=ModelingCmdId("<uuid>"),
to=Point3d(
x=3.14,
y=3.14,
z=3.14,
),
),
cmd_id=ModelingCmdId("<uuid>"),
file_id="<string>",
),
@ -1439,7 +1490,14 @@ async def test_cmd_async():
await cmd.asyncio_detailed(
client=client,
body=ModelingCmdReq(
cmd=ModelingCmd.START_PATH,
cmd=MovePathPen(
path=ModelingCmdId("<uuid>"),
to=Point3d(
x=3.14,
y=3.14,
z=3.14,
),
),
cmd_id=ModelingCmdId("<uuid>"),
file_id="<string>",
),
@ -1456,7 +1514,14 @@ def test_cmd_batch():
body=ModelingCmdReqBatch(
cmds={
"<string>": ModelingCmdReq(
cmd=ModelingCmd.START_PATH,
cmd=MovePathPen(
path=ModelingCmdId("<uuid>"),
to=Point3d(
x=3.14,
y=3.14,
z=3.14,
),
),
cmd_id=ModelingCmdId("<uuid>"),
file_id="<string>",
)
@ -1480,7 +1545,14 @@ def test_cmd_batch():
body=ModelingCmdReqBatch(
cmds={
"<string>": ModelingCmdReq(
cmd=ModelingCmd.START_PATH,
cmd=MovePathPen(
path=ModelingCmdId("<uuid>"),
to=Point3d(
x=3.14,
y=3.14,
z=3.14,
),
),
cmd_id=ModelingCmdId("<uuid>"),
file_id="<string>",
)
@ -1502,7 +1574,14 @@ async def test_cmd_batch_async():
body=ModelingCmdReqBatch(
cmds={
"<string>": ModelingCmdReq(
cmd=ModelingCmd.START_PATH,
cmd=MovePathPen(
path=ModelingCmdId("<uuid>"),
to=Point3d(
x=3.14,
y=3.14,
z=3.14,
),
),
cmd_id=ModelingCmdId("<uuid>"),
file_id="<string>",
)
@ -1519,7 +1598,14 @@ async def test_cmd_batch_async():
body=ModelingCmdReqBatch(
cmds={
"<string>": ModelingCmdReq(
cmd=ModelingCmd.START_PATH,
cmd=MovePathPen(
path=ModelingCmdId("<uuid>"),
to=Point3d(
x=3.14,
y=3.14,
z=3.14,
),
),
cmd_id=ModelingCmdId("<uuid>"),
file_id="<string>",
)
@ -1666,8 +1752,8 @@ def test_get_area_unit_conversion():
result: Optional[Union[UnitAreaConversion, Error]] = get_area_unit_conversion.sync(
client=client,
input_unit=UnitArea.ACRES,
output_unit=UnitArea.ACRES,
input_unit=UnitArea.CM2,
output_unit=UnitArea.CM2,
value=3.14,
)
@ -1683,8 +1769,8 @@ def test_get_area_unit_conversion():
Optional[Union[UnitAreaConversion, Error]]
] = get_area_unit_conversion.sync_detailed(
client=client,
input_unit=UnitArea.ACRES,
output_unit=UnitArea.ACRES,
input_unit=UnitArea.CM2,
output_unit=UnitArea.CM2,
value=3.14,
)
@ -1700,8 +1786,8 @@ async def test_get_area_unit_conversion_async():
Union[UnitAreaConversion, Error]
] = await get_area_unit_conversion.asyncio(
client=client,
input_unit=UnitArea.ACRES,
output_unit=UnitArea.ACRES,
input_unit=UnitArea.CM2,
output_unit=UnitArea.CM2,
value=3.14,
)
@ -1710,8 +1796,8 @@ async def test_get_area_unit_conversion_async():
Optional[Union[UnitAreaConversion, Error]]
] = await get_area_unit_conversion.asyncio_detailed(
client=client,
input_unit=UnitArea.ACRES,
output_unit=UnitArea.ACRES,
input_unit=UnitArea.CM2,
output_unit=UnitArea.CM2,
value=3.14,
)
@ -1961,8 +2047,8 @@ def test_get_length_unit_conversion():
Union[UnitLengthConversion, Error]
] = get_length_unit_conversion.sync(
client=client,
input_unit=UnitLength.CENTIMETRES,
output_unit=UnitLength.CENTIMETRES,
input_unit=UnitLength.CM,
output_unit=UnitLength.CM,
value=3.14,
)
@ -1978,8 +2064,8 @@ def test_get_length_unit_conversion():
Optional[Union[UnitLengthConversion, Error]]
] = get_length_unit_conversion.sync_detailed(
client=client,
input_unit=UnitLength.CENTIMETRES,
output_unit=UnitLength.CENTIMETRES,
input_unit=UnitLength.CM,
output_unit=UnitLength.CM,
value=3.14,
)
@ -1995,8 +2081,8 @@ async def test_get_length_unit_conversion_async():
Union[UnitLengthConversion, Error]
] = await get_length_unit_conversion.asyncio(
client=client,
input_unit=UnitLength.CENTIMETRES,
output_unit=UnitLength.CENTIMETRES,
input_unit=UnitLength.CM,
output_unit=UnitLength.CM,
value=3.14,
)
@ -2005,8 +2091,8 @@ async def test_get_length_unit_conversion_async():
Optional[Union[UnitLengthConversion, Error]]
] = await get_length_unit_conversion.asyncio_detailed(
client=client,
input_unit=UnitLength.CENTIMETRES,
output_unit=UnitLength.CENTIMETRES,
input_unit=UnitLength.CM,
output_unit=UnitLength.CM,
value=3.14,
)
@ -2018,8 +2104,8 @@ def test_get_mass_unit_conversion():
result: Optional[Union[UnitMassConversion, Error]] = get_mass_unit_conversion.sync(
client=client,
input_unit=UnitMass.CARATS,
output_unit=UnitMass.CARATS,
input_unit=UnitMass.G,
output_unit=UnitMass.G,
value=3.14,
)
@ -2035,8 +2121,8 @@ def test_get_mass_unit_conversion():
Optional[Union[UnitMassConversion, Error]]
] = get_mass_unit_conversion.sync_detailed(
client=client,
input_unit=UnitMass.CARATS,
output_unit=UnitMass.CARATS,
input_unit=UnitMass.G,
output_unit=UnitMass.G,
value=3.14,
)
@ -2052,8 +2138,8 @@ async def test_get_mass_unit_conversion_async():
Union[UnitMassConversion, Error]
] = await get_mass_unit_conversion.asyncio(
client=client,
input_unit=UnitMass.CARATS,
output_unit=UnitMass.CARATS,
input_unit=UnitMass.G,
output_unit=UnitMass.G,
value=3.14,
)
@ -2062,8 +2148,8 @@ async def test_get_mass_unit_conversion_async():
Optional[Union[UnitMassConversion, Error]]
] = await get_mass_unit_conversion.asyncio_detailed(
client=client,
input_unit=UnitMass.CARATS,
output_unit=UnitMass.CARATS,
input_unit=UnitMass.G,
output_unit=UnitMass.G,
value=3.14,
)
@ -2313,8 +2399,8 @@ def test_get_volume_unit_conversion():
Union[UnitVolumeConversion, Error]
] = get_volume_unit_conversion.sync(
client=client,
input_unit=UnitVolume.CUBIC_CENTIMETRES,
output_unit=UnitVolume.CUBIC_CENTIMETRES,
input_unit=UnitVolume.CM3,
output_unit=UnitVolume.CM3,
value=3.14,
)
@ -2330,8 +2416,8 @@ def test_get_volume_unit_conversion():
Optional[Union[UnitVolumeConversion, Error]]
] = get_volume_unit_conversion.sync_detailed(
client=client,
input_unit=UnitVolume.CUBIC_CENTIMETRES,
output_unit=UnitVolume.CUBIC_CENTIMETRES,
input_unit=UnitVolume.CM3,
output_unit=UnitVolume.CM3,
value=3.14,
)
@ -2347,8 +2433,8 @@ async def test_get_volume_unit_conversion_async():
Union[UnitVolumeConversion, Error]
] = await get_volume_unit_conversion.asyncio(
client=client,
input_unit=UnitVolume.CUBIC_CENTIMETRES,
output_unit=UnitVolume.CUBIC_CENTIMETRES,
input_unit=UnitVolume.CM3,
output_unit=UnitVolume.CM3,
value=3.14,
)
@ -2357,8 +2443,8 @@ async def test_get_volume_unit_conversion_async():
Optional[Union[UnitVolumeConversion, Error]]
] = await get_volume_unit_conversion.asyncio_detailed(
client=client,
input_unit=UnitVolume.CUBIC_CENTIMETRES,
output_unit=UnitVolume.CUBIC_CENTIMETRES,
input_unit=UnitVolume.CM3,
output_unit=UnitVolume.CM3,
value=3.14,
)

View File

@ -115,6 +115,7 @@ from .unit_area import UnitArea
from .unit_area_conversion import UnitAreaConversion
from .unit_current import UnitCurrent
from .unit_current_conversion import UnitCurrentConversion
from .unit_density import UnitDensity
from .unit_energy import UnitEnergy
from .unit_energy_conversion import UnitEnergyConversion
from .unit_force import UnitForce

View File

@ -5,7 +5,7 @@ import attr
from ..models.ai_plugin_api_type import AiPluginApiType
from ..types import UNSET, Unset
S = TypeVar("S", bound="AiPluginApi")
SB = TypeVar("SB", bound="AiPluginApi")
@attr.s(auto_attribs=True)
@ -37,7 +37,7 @@ class AiPluginApi:
return field_dict
@classmethod
def from_dict(cls: Type[S], src_dict: Dict[str, Any]) -> S:
def from_dict(cls: Type[SB], src_dict: Dict[str, Any]) -> SB:
d = src_dict.copy()
is_user_authenticated = d.pop("is_user_authenticated", UNSET)

View File

@ -6,7 +6,7 @@ from ..models.ai_plugin_auth_type import AiPluginAuthType
from ..models.ai_plugin_http_auth_type import AiPluginHttpAuthType
from ..types import UNSET, Unset
B = TypeVar("B", bound="AiPluginAuth")
NP = TypeVar("NP", bound="AiPluginAuth")
@attr.s(auto_attribs=True)
@ -35,7 +35,7 @@ class AiPluginAuth:
return field_dict
@classmethod
def from_dict(cls: Type[B], src_dict: Dict[str, Any]) -> B:
def from_dict(cls: Type[NP], src_dict: Dict[str, Any]) -> NP:
d = src_dict.copy()
_authorization_type = d.pop("authorization_type", UNSET)
authorization_type: Union[Unset, AiPluginHttpAuthType]

View File

@ -6,14 +6,15 @@ from ..models.ai_plugin_api import AiPluginApi
from ..models.ai_plugin_auth import AiPluginAuth
from ..types import UNSET, Unset
N = TypeVar("N", bound="AiPluginManifest")
SA = TypeVar("SA", bound="AiPluginManifest")
@attr.s(auto_attribs=True)
class AiPluginManifest:
"""AI plugin manifest.
This is used for OpenAI's ChatGPT plugins. You can read more about them [here](https://platform.openai.com/docs/plugins/getting-started/plugin-manifest).""" # noqa: E501
This is used for OpenAI's ChatGPT plugins. You can read more about them [here](https://platform.openai.com/docs/plugins/getting-started/plugin-manifest).
""" # noqa: E501
api: Union[Unset, AiPluginApi] = UNSET
auth: Union[Unset, AiPluginAuth] = UNSET
@ -69,21 +70,21 @@ class AiPluginManifest:
return field_dict
@classmethod
def from_dict(cls: Type[N], src_dict: Dict[str, Any]) -> N:
def from_dict(cls: Type[SA], src_dict: Dict[str, Any]) -> SA:
d = src_dict.copy()
_api = d.pop("api", UNSET)
api: Union[Unset, AiPluginApi]
if isinstance(_api, Unset):
api = UNSET
else:
api = AiPluginApi(_api)
api = _api # type: ignore[arg-type]
_auth = d.pop("auth", UNSET)
auth: Union[Unset, AiPluginAuth]
if isinstance(_auth, Unset):
auth = UNSET
else:
auth = AiPluginAuth(_auth)
auth = _auth # type: ignore[arg-type]
contact_email = d.pop("contact_email", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
P = TypeVar("P", bound="ApiCallQueryGroup")
GO = TypeVar("GO", bound="ApiCallQueryGroup")
@attr.s(auto_attribs=True)
@ -31,7 +31,7 @@ class ApiCallQueryGroup:
return field_dict
@classmethod
def from_dict(cls: Type[P], src_dict: Dict[str, Any]) -> P:
def from_dict(cls: Type[GO], src_dict: Dict[str, Any]) -> GO:
d = src_dict.copy()
count = d.pop("count", UNSET)

View File

@ -8,7 +8,7 @@ from ..models.method import Method
from ..models.uuid import Uuid
from ..types import UNSET, Unset
S = TypeVar("S", bound="ApiCallWithPrice")
PI = TypeVar("PI", bound="ApiCallWithPrice")
@attr.s(auto_attribs=True)
@ -126,7 +126,7 @@ class ApiCallWithPrice:
return field_dict
@classmethod
def from_dict(cls: Type[S], src_dict: Dict[str, Any]) -> S:
def from_dict(cls: Type[PI], src_dict: Dict[str, Any]) -> PI:
d = src_dict.copy()
_completed_at = d.pop("completed_at", UNSET)
completed_at: Union[Unset, datetime.datetime]
@ -153,7 +153,7 @@ class ApiCallWithPrice:
if isinstance(_id, Unset):
id = UNSET
else:
id = Uuid(_id)
id = _id # type: ignore[arg-type]
ip_address = d.pop("ip_address", UNSET)
@ -194,7 +194,7 @@ class ApiCallWithPrice:
if isinstance(_token, Unset):
token = UNSET
else:
token = Uuid(_token)
token = _token # type: ignore[arg-type]
_updated_at = d.pop("updated_at", UNSET)
updated_at: Union[Unset, datetime.datetime]

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
A = TypeVar("A", bound="ApiCallWithPriceResultsPage")
UZ = TypeVar("UZ", bound="ApiCallWithPriceResultsPage")
@attr.s(auto_attribs=True)
@ -37,7 +37,7 @@ class ApiCallWithPriceResultsPage:
return field_dict
@classmethod
def from_dict(cls: Type[A], src_dict: Dict[str, Any]) -> A:
def from_dict(cls: Type[UZ], src_dict: Dict[str, Any]) -> UZ:
d = src_dict.copy()
from ..models.api_call_with_price import ApiCallWithPrice

View File

@ -7,7 +7,7 @@ from dateutil.parser import isoparse
from ..models.uuid import Uuid
from ..types import UNSET, Unset
G = TypeVar("G", bound="ApiToken")
FB = TypeVar("FB", bound="ApiToken")
@attr.s(auto_attribs=True)
@ -56,7 +56,7 @@ class ApiToken:
return field_dict
@classmethod
def from_dict(cls: Type[G], src_dict: Dict[str, Any]) -> G:
def from_dict(cls: Type[FB], src_dict: Dict[str, Any]) -> FB:
d = src_dict.copy()
_created_at = d.pop("created_at", UNSET)
created_at: Union[Unset, datetime.datetime]
@ -74,7 +74,7 @@ class ApiToken:
if isinstance(_token, Unset):
token = UNSET
else:
token = Uuid(_token)
token = _token # type: ignore[arg-type]
_updated_at = d.pop("updated_at", UNSET)
updated_at: Union[Unset, datetime.datetime]

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
P = TypeVar("P", bound="ApiTokenResultsPage")
QP = TypeVar("QP", bound="ApiTokenResultsPage")
@attr.s(auto_attribs=True)
@ -37,7 +37,7 @@ class ApiTokenResultsPage:
return field_dict
@classmethod
def from_dict(cls: Type[P], src_dict: Dict[str, Any]) -> P:
def from_dict(cls: Type[QP], src_dict: Dict[str, Any]) -> QP:
d = src_dict.copy()
from ..models.api_token import ApiToken

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
U = TypeVar("U", bound="AppClientInfo")
KC = TypeVar("KC", bound="AppClientInfo")
@attr.s(auto_attribs=True)
@ -27,7 +27,7 @@ class AppClientInfo:
return field_dict
@classmethod
def from_dict(cls: Type[U], src_dict: Dict[str, Any]) -> U:
def from_dict(cls: Type[KC], src_dict: Dict[str, Any]) -> KC:
d = src_dict.copy()
url = d.pop("url", UNSET)

View File

@ -9,7 +9,7 @@ from ..models.async_api_call_type import AsyncApiCallType
from ..models.uuid import Uuid
from ..types import UNSET, Unset
Z = TypeVar("Z", bound="AsyncApiCall")
HX = TypeVar("HX", bound="AsyncApiCall")
@attr.s(auto_attribs=True)
@ -86,7 +86,7 @@ class AsyncApiCall:
return field_dict
@classmethod
def from_dict(cls: Type[Z], src_dict: Dict[str, Any]) -> Z:
def from_dict(cls: Type[HX], src_dict: Dict[str, Any]) -> HX:
d = src_dict.copy()
_completed_at = d.pop("completed_at", UNSET)
completed_at: Union[Unset, datetime.datetime]
@ -109,7 +109,7 @@ class AsyncApiCall:
if isinstance(_id, Unset):
id = UNSET
else:
id = Uuid(_id)
id = _id # type: ignore[arg-type]
input = d.pop("input", UNSET)
output = d.pop("output", UNSET)

View File

@ -1,5 +1,5 @@
import datetime
from typing import Any, Dict, List, Type, TypeVar, Union, cast
from typing import Any, Dict, List, Type, TypeVar, Union
import attr
from dateutil.parser import isoparse
@ -9,10 +9,16 @@ from ..models.file_export_format import FileExportFormat
from ..models.file_import_format import FileImportFormat
from ..models.input_format import InputFormat
from ..models.output_format import OutputFormat
from ..models.point3d import Point3d
from ..models.unit_area import UnitArea
from ..models.unit_density import UnitDensity
from ..models.unit_length import UnitLength
from ..models.unit_mass import UnitMass
from ..models.unit_volume import UnitVolume
from ..models.uuid import Uuid
from ..types import UNSET, Unset
F = TypeVar("F", bound="FileConversion")
LB = TypeVar("LB", bound="FileConversion")
@attr.s(auto_attribs=True)
@ -104,7 +110,7 @@ class FileConversion:
return field_dict
@classmethod
def from_dict(cls: Type[F], src_dict: Dict[str, Any]) -> F:
def from_dict(cls: Type[LB], src_dict: Dict[str, Any]) -> LB:
d = src_dict.copy()
_completed_at = d.pop("completed_at", UNSET)
completed_at: Union[Unset, datetime.datetime]
@ -127,7 +133,7 @@ class FileConversion:
if isinstance(_id, Unset):
id = UNSET
else:
id = Uuid(_id)
id = _id # type: ignore[arg-type]
output = d.pop("output", UNSET)
@ -143,7 +149,7 @@ class FileConversion:
if isinstance(_output_format_options, Unset):
output_format_options = UNSET
else:
output_format_options = OutputFormat(_output_format_options)
output_format_options = _output_format_options # type: ignore[arg-type]
outputs = d.pop("outputs", UNSET)
_src_format = d.pop("src_format", UNSET)
@ -158,7 +164,7 @@ class FileConversion:
if isinstance(_src_format_options, Unset):
src_format_options = UNSET
else:
src_format_options = InputFormat(_src_format_options)
src_format_options = _src_format_options # type: ignore[arg-type]
_started_at = d.pop("started_at", UNSET)
started_at: Union[Unset, datetime.datetime]
@ -223,18 +229,20 @@ class FileConversion:
return key in self.additional_properties
B = TypeVar("B", bound="FileCenterOfMass")
NE = TypeVar("NE", bound="FileCenterOfMass")
@attr.s(auto_attribs=True)
class FileCenterOfMass:
"""File center of mass.""" # noqa: E501
center_of_mass: Union[Unset, List[float]] = UNSET
center_of_mass: Union[Unset, Point3d] = UNSET
centers_of_mass: Union[Unset, Any] = UNSET
completed_at: Union[Unset, datetime.datetime] = UNSET
created_at: Union[Unset, datetime.datetime] = UNSET
error: Union[Unset, str] = UNSET
id: Union[Unset, str] = UNSET
output_unit: Union[Unset, UnitLength] = UNSET
src_format: Union[Unset, FileImportFormat] = UNSET
started_at: Union[Unset, datetime.datetime] = UNSET
status: Union[Unset, ApiCallStatus] = UNSET
@ -245,9 +253,9 @@ class FileCenterOfMass:
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
center_of_mass: Union[Unset, List[float]] = UNSET
if not isinstance(self.center_of_mass, Unset):
center_of_mass = self.center_of_mass
centers_of_mass = self.centers_of_mass
completed_at: Union[Unset, str] = UNSET
if not isinstance(self.completed_at, Unset):
completed_at = self.completed_at.isoformat()
@ -256,6 +264,8 @@ class FileCenterOfMass:
created_at = self.created_at.isoformat()
error = self.error
id = self.id
if not isinstance(self.output_unit, Unset):
output_unit = self.output_unit
if not isinstance(self.src_format, Unset):
src_format = self.src_format
started_at: Union[Unset, str] = UNSET
@ -274,6 +284,8 @@ class FileCenterOfMass:
field_dict.update({})
if center_of_mass is not UNSET:
field_dict["center_of_mass"] = center_of_mass
if centers_of_mass is not UNSET:
field_dict["centers_of_mass"] = centers_of_mass
if completed_at is not UNSET:
field_dict["completed_at"] = completed_at
if created_at is not UNSET:
@ -282,6 +294,8 @@ class FileCenterOfMass:
field_dict["error"] = error
if id is not UNSET:
field_dict["id"] = id
if output_unit is not UNSET:
field_dict["output_unit"] = output_unit
if src_format is not UNSET:
field_dict["src_format"] = src_format
if started_at is not UNSET:
@ -298,10 +312,16 @@ class FileCenterOfMass:
return field_dict
@classmethod
def from_dict(cls: Type[B], src_dict: Dict[str, Any]) -> B:
def from_dict(cls: Type[NE], src_dict: Dict[str, Any]) -> NE:
d = src_dict.copy()
center_of_mass = cast(List[float], d.pop("center_of_mass", UNSET))
_center_of_mass = d.pop("center_of_mass", UNSET)
center_of_mass: Union[Unset, Point3d]
if isinstance(_center_of_mass, Unset):
center_of_mass = UNSET
else:
center_of_mass = _center_of_mass # type: ignore[arg-type]
centers_of_mass = d.pop("centers_of_mass", UNSET)
_completed_at = d.pop("completed_at", UNSET)
completed_at: Union[Unset, datetime.datetime]
if isinstance(_completed_at, Unset):
@ -323,7 +343,14 @@ class FileCenterOfMass:
if isinstance(_id, Unset):
id = UNSET
else:
id = Uuid(_id)
id = _id # type: ignore[arg-type]
_output_unit = d.pop("output_unit", UNSET)
output_unit: Union[Unset, UnitLength]
if isinstance(_output_unit, Unset):
output_unit = UNSET
else:
output_unit = _output_unit # type: ignore[arg-type]
_src_format = d.pop("src_format", UNSET)
src_format: Union[Unset, FileImportFormat]
@ -359,10 +386,12 @@ class FileCenterOfMass:
file_center_of_mass = cls(
center_of_mass=center_of_mass,
centers_of_mass=centers_of_mass,
completed_at=completed_at,
created_at=created_at,
error=error,
id=id,
output_unit=output_unit,
src_format=src_format,
started_at=started_at,
status=status,
@ -391,7 +420,7 @@ class FileCenterOfMass:
return key in self.additional_properties
Q = TypeVar("Q", bound="FileMass")
TL = TypeVar("TL", bound="FileMass")
@attr.s(auto_attribs=True)
@ -403,7 +432,10 @@ class FileMass:
error: Union[Unset, str] = UNSET
id: Union[Unset, str] = UNSET
mass: Union[Unset, float] = UNSET
masses: Union[Unset, Any] = UNSET
material_density: Union[Unset, float] = UNSET
material_density_unit: Union[Unset, UnitDensity] = UNSET
output_unit: Union[Unset, UnitMass] = UNSET
src_format: Union[Unset, FileImportFormat] = UNSET
started_at: Union[Unset, datetime.datetime] = UNSET
status: Union[Unset, ApiCallStatus] = UNSET
@ -423,7 +455,12 @@ class FileMass:
error = self.error
id = self.id
mass = self.mass
masses = self.masses
material_density = self.material_density
if not isinstance(self.material_density_unit, Unset):
material_density_unit = self.material_density_unit
if not isinstance(self.output_unit, Unset):
output_unit = self.output_unit
if not isinstance(self.src_format, Unset):
src_format = self.src_format
started_at: Union[Unset, str] = UNSET
@ -450,8 +487,14 @@ class FileMass:
field_dict["id"] = id
if mass is not UNSET:
field_dict["mass"] = mass
if masses is not UNSET:
field_dict["masses"] = masses
if material_density is not UNSET:
field_dict["material_density"] = material_density
if material_density_unit is not UNSET:
field_dict["material_density_unit"] = material_density_unit
if output_unit is not UNSET:
field_dict["output_unit"] = output_unit
if src_format is not UNSET:
field_dict["src_format"] = src_format
if started_at is not UNSET:
@ -468,7 +511,7 @@ class FileMass:
return field_dict
@classmethod
def from_dict(cls: Type[Q], src_dict: Dict[str, Any]) -> Q:
def from_dict(cls: Type[TL], src_dict: Dict[str, Any]) -> TL:
d = src_dict.copy()
_completed_at = d.pop("completed_at", UNSET)
completed_at: Union[Unset, datetime.datetime]
@ -491,12 +534,27 @@ class FileMass:
if isinstance(_id, Unset):
id = UNSET
else:
id = Uuid(_id)
id = _id # type: ignore[arg-type]
mass = d.pop("mass", UNSET)
masses = d.pop("masses", UNSET)
material_density = d.pop("material_density", UNSET)
_material_density_unit = d.pop("material_density_unit", UNSET)
material_density_unit: Union[Unset, UnitDensity]
if isinstance(_material_density_unit, Unset):
material_density_unit = UNSET
else:
material_density_unit = _material_density_unit # type: ignore[arg-type]
_output_unit = d.pop("output_unit", UNSET)
output_unit: Union[Unset, UnitMass]
if isinstance(_output_unit, Unset):
output_unit = UNSET
else:
output_unit = _output_unit # type: ignore[arg-type]
_src_format = d.pop("src_format", UNSET)
src_format: Union[Unset, FileImportFormat]
if isinstance(_src_format, Unset):
@ -535,7 +593,10 @@ class FileMass:
error=error,
id=id,
mass=mass,
masses=masses,
material_density=material_density,
material_density_unit=material_density_unit,
output_unit=output_unit,
src_format=src_format,
started_at=started_at,
status=status,
@ -564,7 +625,7 @@ class FileMass:
return key in self.additional_properties
P = TypeVar("P", bound="FileVolume")
MN = TypeVar("MN", bound="FileVolume")
@attr.s(auto_attribs=True)
@ -575,6 +636,7 @@ class FileVolume:
created_at: Union[Unset, datetime.datetime] = UNSET
error: Union[Unset, str] = UNSET
id: Union[Unset, str] = UNSET
output_unit: Union[Unset, UnitVolume] = UNSET
src_format: Union[Unset, FileImportFormat] = UNSET
started_at: Union[Unset, datetime.datetime] = UNSET
status: Union[Unset, ApiCallStatus] = UNSET
@ -582,6 +644,7 @@ class FileVolume:
updated_at: Union[Unset, datetime.datetime] = UNSET
user_id: Union[Unset, str] = UNSET
volume: Union[Unset, float] = UNSET
volumes: Union[Unset, Any] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
@ -594,6 +657,8 @@ class FileVolume:
created_at = self.created_at.isoformat()
error = self.error
id = self.id
if not isinstance(self.output_unit, Unset):
output_unit = self.output_unit
if not isinstance(self.src_format, Unset):
src_format = self.src_format
started_at: Union[Unset, str] = UNSET
@ -607,6 +672,7 @@ class FileVolume:
updated_at = self.updated_at.isoformat()
user_id = self.user_id
volume = self.volume
volumes = self.volumes
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
@ -619,6 +685,8 @@ class FileVolume:
field_dict["error"] = error
if id is not UNSET:
field_dict["id"] = id
if output_unit is not UNSET:
field_dict["output_unit"] = output_unit
if src_format is not UNSET:
field_dict["src_format"] = src_format
if started_at is not UNSET:
@ -633,11 +701,13 @@ class FileVolume:
field_dict["user_id"] = user_id
if volume is not UNSET:
field_dict["volume"] = volume
if volumes is not UNSET:
field_dict["volumes"] = volumes
return field_dict
@classmethod
def from_dict(cls: Type[P], src_dict: Dict[str, Any]) -> P:
def from_dict(cls: Type[MN], src_dict: Dict[str, Any]) -> MN:
d = src_dict.copy()
_completed_at = d.pop("completed_at", UNSET)
completed_at: Union[Unset, datetime.datetime]
@ -660,7 +730,14 @@ class FileVolume:
if isinstance(_id, Unset):
id = UNSET
else:
id = Uuid(_id)
id = _id # type: ignore[arg-type]
_output_unit = d.pop("output_unit", UNSET)
output_unit: Union[Unset, UnitVolume]
if isinstance(_output_unit, Unset):
output_unit = UNSET
else:
output_unit = _output_unit # type: ignore[arg-type]
_src_format = d.pop("src_format", UNSET)
src_format: Union[Unset, FileImportFormat]
@ -696,11 +773,14 @@ class FileVolume:
volume = d.pop("volume", UNSET)
volumes = d.pop("volumes", UNSET)
file_volume = cls(
completed_at=completed_at,
created_at=created_at,
error=error,
id=id,
output_unit=output_unit,
src_format=src_format,
started_at=started_at,
status=status,
@ -708,6 +788,7 @@ class FileVolume:
updated_at=updated_at,
user_id=user_id,
volume=volume,
volumes=volumes,
)
file_volume.additional_properties = d
@ -730,7 +811,7 @@ class FileVolume:
return key in self.additional_properties
K = TypeVar("K", bound="FileDensity")
JV = TypeVar("JV", bound="FileDensity")
@attr.s(auto_attribs=True)
@ -739,10 +820,13 @@ class FileDensity:
completed_at: Union[Unset, datetime.datetime] = UNSET
created_at: Union[Unset, datetime.datetime] = UNSET
densities: Union[Unset, Any] = UNSET
density: Union[Unset, float] = UNSET
error: Union[Unset, str] = UNSET
id: Union[Unset, str] = UNSET
material_mass: Union[Unset, float] = UNSET
material_mass_unit: Union[Unset, UnitMass] = UNSET
output_unit: Union[Unset, UnitDensity] = UNSET
src_format: Union[Unset, FileImportFormat] = UNSET
started_at: Union[Unset, datetime.datetime] = UNSET
status: Union[Unset, ApiCallStatus] = UNSET
@ -759,10 +843,15 @@ class FileDensity:
created_at: Union[Unset, str] = UNSET
if not isinstance(self.created_at, Unset):
created_at = self.created_at.isoformat()
densities = self.densities
density = self.density
error = self.error
id = self.id
material_mass = self.material_mass
if not isinstance(self.material_mass_unit, Unset):
material_mass_unit = self.material_mass_unit
if not isinstance(self.output_unit, Unset):
output_unit = self.output_unit
if not isinstance(self.src_format, Unset):
src_format = self.src_format
started_at: Union[Unset, str] = UNSET
@ -783,6 +872,8 @@ class FileDensity:
field_dict["completed_at"] = completed_at
if created_at is not UNSET:
field_dict["created_at"] = created_at
if densities is not UNSET:
field_dict["densities"] = densities
if density is not UNSET:
field_dict["density"] = density
if error is not UNSET:
@ -791,6 +882,10 @@ class FileDensity:
field_dict["id"] = id
if material_mass is not UNSET:
field_dict["material_mass"] = material_mass
if material_mass_unit is not UNSET:
field_dict["material_mass_unit"] = material_mass_unit
if output_unit is not UNSET:
field_dict["output_unit"] = output_unit
if src_format is not UNSET:
field_dict["src_format"] = src_format
if started_at is not UNSET:
@ -807,7 +902,7 @@ class FileDensity:
return field_dict
@classmethod
def from_dict(cls: Type[K], src_dict: Dict[str, Any]) -> K:
def from_dict(cls: Type[JV], src_dict: Dict[str, Any]) -> JV:
d = src_dict.copy()
_completed_at = d.pop("completed_at", UNSET)
completed_at: Union[Unset, datetime.datetime]
@ -823,6 +918,7 @@ class FileDensity:
else:
created_at = isoparse(_created_at)
densities = d.pop("densities", UNSET)
density = d.pop("density", UNSET)
error = d.pop("error", UNSET)
@ -832,10 +928,24 @@ class FileDensity:
if isinstance(_id, Unset):
id = UNSET
else:
id = Uuid(_id)
id = _id # type: ignore[arg-type]
material_mass = d.pop("material_mass", UNSET)
_material_mass_unit = d.pop("material_mass_unit", UNSET)
material_mass_unit: Union[Unset, UnitMass]
if isinstance(_material_mass_unit, Unset):
material_mass_unit = UNSET
else:
material_mass_unit = _material_mass_unit # type: ignore[arg-type]
_output_unit = d.pop("output_unit", UNSET)
output_unit: Union[Unset, UnitDensity]
if isinstance(_output_unit, Unset):
output_unit = UNSET
else:
output_unit = _output_unit # type: ignore[arg-type]
_src_format = d.pop("src_format", UNSET)
src_format: Union[Unset, FileImportFormat]
if isinstance(_src_format, Unset):
@ -871,10 +981,13 @@ class FileDensity:
file_density = cls(
completed_at=completed_at,
created_at=created_at,
densities=densities,
density=density,
error=error,
id=id,
material_mass=material_mass,
material_mass_unit=material_mass_unit,
output_unit=output_unit,
src_format=src_format,
started_at=started_at,
status=status,
@ -903,7 +1016,7 @@ class FileDensity:
return key in self.additional_properties
C = TypeVar("C", bound="FileSurfaceArea")
IO = TypeVar("IO", bound="FileSurfaceArea")
@attr.s(auto_attribs=True)
@ -914,10 +1027,12 @@ class FileSurfaceArea:
created_at: Union[Unset, datetime.datetime] = UNSET
error: Union[Unset, str] = UNSET
id: Union[Unset, str] = UNSET
output_unit: Union[Unset, UnitArea] = UNSET
src_format: Union[Unset, FileImportFormat] = UNSET
started_at: Union[Unset, datetime.datetime] = UNSET
status: Union[Unset, ApiCallStatus] = UNSET
surface_area: Union[Unset, float] = UNSET
surface_areas: Union[Unset, Any] = UNSET
type: Union[Unset, str] = UNSET
updated_at: Union[Unset, datetime.datetime] = UNSET
user_id: Union[Unset, str] = UNSET
@ -933,6 +1048,8 @@ class FileSurfaceArea:
created_at = self.created_at.isoformat()
error = self.error
id = self.id
if not isinstance(self.output_unit, Unset):
output_unit = self.output_unit
if not isinstance(self.src_format, Unset):
src_format = self.src_format
started_at: Union[Unset, str] = UNSET
@ -941,6 +1058,7 @@ class FileSurfaceArea:
if not isinstance(self.status, Unset):
status = self.status
surface_area = self.surface_area
surface_areas = self.surface_areas
type = self.type
updated_at: Union[Unset, str] = UNSET
if not isinstance(self.updated_at, Unset):
@ -958,6 +1076,8 @@ class FileSurfaceArea:
field_dict["error"] = error
if id is not UNSET:
field_dict["id"] = id
if output_unit is not UNSET:
field_dict["output_unit"] = output_unit
if src_format is not UNSET:
field_dict["src_format"] = src_format
if started_at is not UNSET:
@ -966,6 +1086,8 @@ class FileSurfaceArea:
field_dict["status"] = status
if surface_area is not UNSET:
field_dict["surface_area"] = surface_area
if surface_areas is not UNSET:
field_dict["surface_areas"] = surface_areas
if type is not UNSET:
field_dict["type"] = type
if updated_at is not UNSET:
@ -976,7 +1098,7 @@ class FileSurfaceArea:
return field_dict
@classmethod
def from_dict(cls: Type[C], src_dict: Dict[str, Any]) -> C:
def from_dict(cls: Type[IO], src_dict: Dict[str, Any]) -> IO:
d = src_dict.copy()
_completed_at = d.pop("completed_at", UNSET)
completed_at: Union[Unset, datetime.datetime]
@ -999,7 +1121,14 @@ class FileSurfaceArea:
if isinstance(_id, Unset):
id = UNSET
else:
id = Uuid(_id)
id = _id # type: ignore[arg-type]
_output_unit = d.pop("output_unit", UNSET)
output_unit: Union[Unset, UnitArea]
if isinstance(_output_unit, Unset):
output_unit = UNSET
else:
output_unit = _output_unit # type: ignore[arg-type]
_src_format = d.pop("src_format", UNSET)
src_format: Union[Unset, FileImportFormat]
@ -1024,6 +1153,7 @@ class FileSurfaceArea:
surface_area = d.pop("surface_area", UNSET)
surface_areas = d.pop("surface_areas", UNSET)
type = d.pop("type", UNSET)
_updated_at = d.pop("updated_at", UNSET)
@ -1040,10 +1170,12 @@ class FileSurfaceArea:
created_at=created_at,
error=error,
id=id,
output_unit=output_unit,
src_format=src_format,
started_at=started_at,
status=status,
surface_area=surface_area,
surface_areas=surface_areas,
type=type,
updated_at=updated_at,
user_id=user_id,

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
H = TypeVar("H", bound="AsyncApiCallResultsPage")
FV = TypeVar("FV", bound="AsyncApiCallResultsPage")
@attr.s(auto_attribs=True)
@ -37,7 +37,7 @@ class AsyncApiCallResultsPage:
return field_dict
@classmethod
def from_dict(cls: Type[H], src_dict: Dict[str, Any]) -> H:
def from_dict(cls: Type[FV], src_dict: Dict[str, Any]) -> FV:
d = src_dict.copy()
from ..models.async_api_call import AsyncApiCall

View File

@ -6,7 +6,8 @@ class Axis(str, Enum):
See [cglearn.eu] for background reading.
[cglearn.eu]: https://cglearn.eu/pub/computer-graphics/introduction-to-geometry#material-coordinate-systems-1""" # noqa: E501
[cglearn.eu]: https://cglearn.eu/pub/computer-graphics/introduction-to-geometry#material-coordinate-systems-1
""" # noqa: E501
"""# 'Y' axis. """ # noqa: E501
Y = "y"

View File

@ -6,7 +6,7 @@ from ..models.axis import Axis
from ..models.direction import Direction
from ..types import UNSET, Unset
X = TypeVar("X", bound="AxisDirectionPair")
LE = TypeVar("LE", bound="AxisDirectionPair")
@attr.s(auto_attribs=True)
@ -35,7 +35,7 @@ class AxisDirectionPair:
return field_dict
@classmethod
def from_dict(cls: Type[X], src_dict: Dict[str, Any]) -> X:
def from_dict(cls: Type[LE], src_dict: Dict[str, Any]) -> LE:
d = src_dict.copy()
_axis = d.pop("axis", UNSET)
axis: Union[Unset, Axis]

View File

@ -5,7 +5,7 @@ import attr
from ..models.new_address import NewAddress
from ..types import UNSET, Unset
L = TypeVar("L", bound="BillingInfo")
OY = TypeVar("OY", bound="BillingInfo")
@attr.s(auto_attribs=True)
@ -37,14 +37,14 @@ class BillingInfo:
return field_dict
@classmethod
def from_dict(cls: Type[L], src_dict: Dict[str, Any]) -> L:
def from_dict(cls: Type[OY], src_dict: Dict[str, Any]) -> OY:
d = src_dict.copy()
_address = d.pop("address", UNSET)
address: Union[Unset, NewAddress]
if isinstance(_address, Unset):
address = UNSET
else:
address = NewAddress(_address)
address = _address # type: ignore[arg-type]
name = d.pop("name", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
B = TypeVar("B", bound="CacheMetadata")
HO = TypeVar("HO", bound="CacheMetadata")
@attr.s(auto_attribs=True)
@ -29,7 +29,7 @@ class CacheMetadata:
return field_dict
@classmethod
def from_dict(cls: Type[B], src_dict: Dict[str, Any]) -> B:
def from_dict(cls: Type[HO], src_dict: Dict[str, Any]) -> HO:
d = src_dict.copy()
ok = d.pop("ok", UNSET)

View File

@ -5,7 +5,7 @@ import attr
from ..models.payment_method_card_checks import PaymentMethodCardChecks
from ..types import UNSET, Unset
N = TypeVar("N", bound="CardDetails")
TM = TypeVar("TM", bound="CardDetails")
@attr.s(auto_attribs=True)
@ -57,7 +57,7 @@ class CardDetails:
return field_dict
@classmethod
def from_dict(cls: Type[N], src_dict: Dict[str, Any]) -> N:
def from_dict(cls: Type[TM], src_dict: Dict[str, Any]) -> TM:
d = src_dict.copy()
brand = d.pop("brand", UNSET)
@ -66,7 +66,7 @@ class CardDetails:
if isinstance(_checks, Unset):
checks = UNSET
else:
checks = PaymentMethodCardChecks(_checks)
checks = _checks # type: ignore[arg-type]
country = d.pop("country", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
E = TypeVar("E", bound="Cluster")
BS = TypeVar("BS", bound="Cluster")
@attr.s(auto_attribs=True)
@ -49,7 +49,7 @@ class Cluster:
return field_dict
@classmethod
def from_dict(cls: Type[E], src_dict: Dict[str, Any]) -> E:
def from_dict(cls: Type[BS], src_dict: Dict[str, Any]) -> BS:
d = src_dict.copy()
addr = d.pop("addr", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
T = TypeVar("T", bound="CodeOutput")
AH = TypeVar("AH", bound="CodeOutput")
@attr.s(auto_attribs=True)
@ -41,7 +41,7 @@ class CodeOutput:
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
def from_dict(cls: Type[AH], src_dict: Dict[str, Any]) -> AH:
d = src_dict.copy()
from ..models.output_file import OutputFile

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
L = TypeVar("L", bound="Commit")
EG = TypeVar("EG", bound="Commit")
@attr.s(auto_attribs=True)
@ -31,7 +31,7 @@ class Commit:
return field_dict
@classmethod
def from_dict(cls: Type[L], src_dict: Dict[str, Any]) -> L:
def from_dict(cls: Type[EG], src_dict: Dict[str, Any]) -> EG:
d = src_dict.copy()
expected = d.pop("expected", UNSET)

View File

@ -10,7 +10,7 @@ from ..models.jetstream import Jetstream
from ..models.leaf_node import LeafNode
from ..types import UNSET, Unset
M = TypeVar("M", bound="Connection")
JR = TypeVar("JR", bound="Connection")
@attr.s(auto_attribs=True)
@ -225,7 +225,7 @@ class Connection:
return field_dict
@classmethod
def from_dict(cls: Type[M], src_dict: Dict[str, Any]) -> M:
def from_dict(cls: Type[JR], src_dict: Dict[str, Any]) -> JR:
d = src_dict.copy()
auth_timeout = d.pop("auth_timeout", UNSET)
@ -234,7 +234,7 @@ class Connection:
if isinstance(_cluster, Unset):
cluster = UNSET
else:
cluster = Cluster(_cluster)
cluster = _cluster # type: ignore[arg-type]
_config_load_time = d.pop("config_load_time", UNSET)
config_load_time: Union[Unset, datetime.datetime]
@ -254,7 +254,7 @@ class Connection:
if isinstance(_gateway, Unset):
gateway = UNSET
else:
gateway = Gateway(_gateway)
gateway = _gateway # type: ignore[arg-type]
git_commit = d.pop("git_commit", UNSET)
@ -282,14 +282,14 @@ class Connection:
if isinstance(_jetstream, Unset):
jetstream = UNSET
else:
jetstream = Jetstream(_jetstream)
jetstream = _jetstream # type: ignore[arg-type]
_leaf = d.pop("leaf", UNSET)
leaf: Union[Unset, LeafNode]
if isinstance(_leaf, Unset):
leaf = UNSET
else:
leaf = LeafNode(_leaf)
leaf = _leaf # type: ignore[arg-type]
leafnodes = d.pop("leafnodes", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
N = TypeVar("N", bound="Coupon")
LY = TypeVar("LY", bound="Coupon")
@attr.s(auto_attribs=True)
@ -39,7 +39,7 @@ class Coupon:
return field_dict
@classmethod
def from_dict(cls: Type[N], src_dict: Dict[str, Any]) -> N:
def from_dict(cls: Type[LY], src_dict: Dict[str, Any]) -> LY:
d = src_dict.copy()
amount_off = d.pop("amount_off", UNSET)

View File

@ -4,7 +4,8 @@ from enum import Enum
class Currency(str, Enum):
"""Currency is the list of supported currencies.
This comes from the Stripe API docs: For more details see <https://support.stripe.com/questions/which-currencies-does-stripe-support>.""" # noqa: E501
This comes from the Stripe API docs: For more details see <https://support.stripe.com/questions/which-currencies-does-stripe-support>.
""" # noqa: E501
"""# United Arab Emirates Dirham """ # noqa: E501
AED = "aed"

View File

@ -8,7 +8,7 @@ from ..models.currency import Currency
from ..models.new_address import NewAddress
from ..types import UNSET, Unset
J = TypeVar("J", bound="Customer")
HK = TypeVar("HK", bound="Customer")
@attr.s(auto_attribs=True)
@ -71,14 +71,14 @@ class Customer:
return field_dict
@classmethod
def from_dict(cls: Type[J], src_dict: Dict[str, Any]) -> J:
def from_dict(cls: Type[HK], src_dict: Dict[str, Any]) -> HK:
d = src_dict.copy()
_address = d.pop("address", UNSET)
address: Union[Unset, NewAddress]
if isinstance(_address, Unset):
address = UNSET
else:
address = NewAddress(_address)
address = _address # type: ignore[arg-type]
balance = d.pop("balance", UNSET)

View File

@ -7,7 +7,7 @@ from dateutil.parser import isoparse
from ..models.uuid import Uuid
from ..types import UNSET, Unset
V = TypeVar("V", bound="CustomerBalance")
VR = TypeVar("VR", bound="CustomerBalance")
@attr.s(auto_attribs=True)
@ -64,7 +64,7 @@ class CustomerBalance:
return field_dict
@classmethod
def from_dict(cls: Type[V], src_dict: Dict[str, Any]) -> V:
def from_dict(cls: Type[VR], src_dict: Dict[str, Any]) -> VR:
d = src_dict.copy()
_created_at = d.pop("created_at", UNSET)
created_at: Union[Unset, datetime.datetime]
@ -78,7 +78,7 @@ class CustomerBalance:
if isinstance(_id, Unset):
id = UNSET
else:
id = Uuid(_id)
id = _id # type: ignore[arg-type]
monthly_credits_remaining = d.pop("monthly_credits_remaining", UNSET)

View File

@ -5,7 +5,7 @@ import attr
from ..models.o_auth2_grant_type import OAuth2GrantType
from ..types import UNSET, Unset
F = TypeVar("F", bound="DeviceAccessTokenRequestForm")
ON = TypeVar("ON", bound="DeviceAccessTokenRequestForm")
@attr.s(auto_attribs=True)
@ -37,7 +37,7 @@ class DeviceAccessTokenRequestForm:
return field_dict
@classmethod
def from_dict(cls: Type[F], src_dict: Dict[str, Any]) -> F:
def from_dict(cls: Type[ON], src_dict: Dict[str, Any]) -> ON:
d = src_dict.copy()
client_id = d.pop("client_id", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
V = TypeVar("V", bound="DeviceAuthRequestForm")
PC = TypeVar("PC", bound="DeviceAuthRequestForm")
@attr.s(auto_attribs=True)
@ -27,7 +27,7 @@ class DeviceAuthRequestForm:
return field_dict
@classmethod
def from_dict(cls: Type[V], src_dict: Dict[str, Any]) -> V:
def from_dict(cls: Type[PC], src_dict: Dict[str, Any]) -> PC:
d = src_dict.copy()
client_id = d.pop("client_id", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
J = TypeVar("J", bound="DeviceAuthVerifyParams")
US = TypeVar("US", bound="DeviceAuthVerifyParams")
@attr.s(auto_attribs=True)
@ -27,7 +27,7 @@ class DeviceAuthVerifyParams:
return field_dict
@classmethod
def from_dict(cls: Type[J], src_dict: Dict[str, Any]) -> J:
def from_dict(cls: Type[US], src_dict: Dict[str, Any]) -> US:
d = src_dict.copy()
user_code = d.pop("user_code", UNSET)

View File

@ -5,7 +5,7 @@ import attr
from ..models.coupon import Coupon
from ..types import UNSET, Unset
V = TypeVar("V", bound="Discount")
KQ = TypeVar("KQ", bound="Discount")
@attr.s(auto_attribs=True)
@ -29,14 +29,14 @@ class Discount:
return field_dict
@classmethod
def from_dict(cls: Type[V], src_dict: Dict[str, Any]) -> V:
def from_dict(cls: Type[KQ], src_dict: Dict[str, Any]) -> KQ:
d = src_dict.copy()
_coupon = d.pop("coupon", UNSET)
coupon: Union[Unset, Coupon]
if isinstance(_coupon, Unset):
coupon = UNSET
else:
coupon = Coupon(_coupon)
coupon = _coupon # type: ignore[arg-type]
discount = cls(
coupon=coupon,

View File

@ -10,7 +10,7 @@ from ..models.system_info_cgroup_version_enum import SystemInfoCgroupVersionEnum
from ..models.system_info_isolation_enum import SystemInfoIsolationEnum
from ..types import UNSET, Unset
L = TypeVar("L", bound="DockerSystemInfo")
FH = TypeVar("FH", bound="DockerSystemInfo")
@attr.s(auto_attribs=True)
@ -293,7 +293,7 @@ class DockerSystemInfo:
return field_dict
@classmethod
def from_dict(cls: Type[L], src_dict: Dict[str, Any]) -> L:
def from_dict(cls: Type[FH], src_dict: Dict[str, Any]) -> FH:
d = src_dict.copy()
architecture = d.pop("architecture", UNSET)
@ -306,14 +306,14 @@ class DockerSystemInfo:
if isinstance(_cgroup_driver, Unset):
cgroup_driver = UNSET
else:
cgroup_driver = SystemInfoCgroupDriverEnum(_cgroup_driver)
cgroup_driver = _cgroup_driver # type: ignore[arg-type]
_cgroup_version = d.pop("cgroup_version", UNSET)
cgroup_version: Union[Unset, SystemInfoCgroupVersionEnum]
if isinstance(_cgroup_version, Unset):
cgroup_version = UNSET
else:
cgroup_version = SystemInfoCgroupVersionEnum(_cgroup_version)
cgroup_version = _cgroup_version # type: ignore[arg-type]
cluster_advertise = d.pop("cluster_advertise", UNSET)
@ -324,7 +324,7 @@ class DockerSystemInfo:
if isinstance(_containerd_commit, Unset):
containerd_commit = UNSET
else:
containerd_commit = Commit(_containerd_commit)
containerd_commit = _containerd_commit # type: ignore[arg-type]
containers = d.pop("containers", UNSET)
@ -379,7 +379,7 @@ class DockerSystemInfo:
if isinstance(_init_commit, Unset):
init_commit = UNSET
else:
init_commit = Commit(_init_commit)
init_commit = _init_commit # type: ignore[arg-type]
ipv4_forwarding = d.pop("ipv4_forwarding", UNSET)
@ -388,7 +388,7 @@ class DockerSystemInfo:
if isinstance(_isolation, Unset):
isolation = UNSET
else:
isolation = SystemInfoIsolationEnum(_isolation)
isolation = _isolation # type: ignore[arg-type]
kernel_memory = d.pop("kernel_memory", UNSET)
@ -431,7 +431,7 @@ class DockerSystemInfo:
if isinstance(_plugins, Unset):
plugins = UNSET
else:
plugins = PluginsInfo(_plugins)
plugins = _plugins # type: ignore[arg-type]
product_license = d.pop("product_license", UNSET)
@ -440,14 +440,14 @@ class DockerSystemInfo:
if isinstance(_registry_config, Unset):
registry_config = UNSET
else:
registry_config = RegistryServiceConfig(_registry_config)
registry_config = _registry_config # type: ignore[arg-type]
_runc_commit = d.pop("runc_commit", UNSET)
runc_commit: Union[Unset, Commit]
if isinstance(_runc_commit, Unset):
runc_commit = UNSET
else:
runc_commit = Commit(_runc_commit)
runc_commit = _runc_commit # type: ignore[arg-type]
runtimes = d.pop("runtimes", UNSET)
security_options = cast(List[str], d.pop("security_options", UNSET))

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
E = TypeVar("E", bound="EmailAuthenticationForm")
NH = TypeVar("NH", bound="EmailAuthenticationForm")
@attr.s(auto_attribs=True)
@ -31,7 +31,7 @@ class EmailAuthenticationForm:
return field_dict
@classmethod
def from_dict(cls: Type[E], src_dict: Dict[str, Any]) -> E:
def from_dict(cls: Type[NH], src_dict: Dict[str, Any]) -> NH:
d = src_dict.copy()
callback_url = d.pop("callback_url", UNSET)

View File

@ -8,7 +8,7 @@ from ..models.environment import Environment
from ..models.file_system_metadata import FileSystemMetadata
from ..types import UNSET, Unset
Y = TypeVar("Y", bound="EngineMetadata")
BB = TypeVar("BB", bound="EngineMetadata")
@attr.s(auto_attribs=True)
@ -57,7 +57,7 @@ class EngineMetadata:
return field_dict
@classmethod
def from_dict(cls: Type[Y], src_dict: Dict[str, Any]) -> Y:
def from_dict(cls: Type[BB], src_dict: Dict[str, Any]) -> BB:
d = src_dict.copy()
async_jobs_running = d.pop("async_jobs_running", UNSET)
@ -66,7 +66,7 @@ class EngineMetadata:
if isinstance(_cache, Unset):
cache = UNSET
else:
cache = CacheMetadata(_cache)
cache = _cache # type: ignore[arg-type]
_environment = d.pop("environment", UNSET)
environment: Union[Unset, Environment]
@ -80,7 +80,7 @@ class EngineMetadata:
if isinstance(_fs, Unset):
fs = UNSET
else:
fs = FileSystemMetadata(_fs)
fs = _fs # type: ignore[arg-type]
git_hash = d.pop("git_hash", UNSET)
@ -89,7 +89,7 @@ class EngineMetadata:
if isinstance(_pubsub, Unset):
pubsub = UNSET
else:
pubsub = Connection(_pubsub)
pubsub = _pubsub # type: ignore[arg-type]
engine_metadata = cls(
async_jobs_running=async_jobs_running,

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
H = TypeVar("H", bound="Error")
PJ = TypeVar("PJ", bound="Error")
@attr.s(auto_attribs=True)
@ -35,7 +35,7 @@ class Error:
return field_dict
@classmethod
def from_dict(cls: Type[H], src_dict: Dict[str, Any]) -> H:
def from_dict(cls: Type[PJ], src_dict: Dict[str, Any]) -> PJ:
d = src_dict.copy()
error_code = d.pop("error_code", UNSET)

View File

@ -6,7 +6,7 @@ from ..models.docker_system_info import DockerSystemInfo
from ..models.environment import Environment
from ..types import UNSET, Unset
T = TypeVar("T", bound="ExecutorMetadata")
TV = TypeVar("TV", bound="ExecutorMetadata")
@attr.s(auto_attribs=True)
@ -41,14 +41,14 @@ class ExecutorMetadata:
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
def from_dict(cls: Type[TV], src_dict: Dict[str, Any]) -> TV:
d = src_dict.copy()
_docker_info = d.pop("docker_info", UNSET)
docker_info: Union[Unset, DockerSystemInfo]
if isinstance(_docker_info, Unset):
docker_info = UNSET
else:
docker_info = DockerSystemInfo(_docker_info)
docker_info = _docker_info # type: ignore[arg-type]
_environment = d.pop("environment", UNSET)
environment: Union[Unset, Environment]

View File

@ -6,14 +6,15 @@ from dateutil.parser import isoparse
from ..types import UNSET, Unset
M = TypeVar("M", bound="ExtendedUser")
CR = TypeVar("CR", bound="ExtendedUser")
@attr.s(auto_attribs=True)
class ExtendedUser:
"""Extended user information.
This is mostly used for internal purposes. It returns a mapping of the user's information, including that of our third party services we use for users: MailChimp, Stripe, and Front""" # noqa: E501
This is mostly used for internal purposes. It returns a mapping of the user's information, including that of our third party services we use for users: MailChimp, Stripe, and Front
""" # noqa: E501
company: Union[Unset, str] = UNSET
created_at: Union[Unset, datetime.datetime] = UNSET
@ -97,7 +98,7 @@ class ExtendedUser:
return field_dict
@classmethod
def from_dict(cls: Type[M], src_dict: Dict[str, Any]) -> M:
def from_dict(cls: Type[CR], src_dict: Dict[str, Any]) -> CR:
d = src_dict.copy()
company = d.pop("company", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
B = TypeVar("B", bound="ExtendedUserResultsPage")
CE = TypeVar("CE", bound="ExtendedUserResultsPage")
@attr.s(auto_attribs=True)
@ -37,7 +37,7 @@ class ExtendedUserResultsPage:
return field_dict
@classmethod
def from_dict(cls: Type[B], src_dict: Dict[str, Any]) -> B:
def from_dict(cls: Type[CE], src_dict: Dict[str, Any]) -> CE:
d = src_dict.copy()
from ..models.extended_user import ExtendedUser

View File

@ -5,7 +5,7 @@ import attr
from ..models.modeling_cmd_id import ModelingCmdId
from ..types import UNSET, Unset
S = TypeVar("S", bound="Extrude")
MS = TypeVar("MS", bound="Extrude")
@attr.s(auto_attribs=True)
@ -37,7 +37,7 @@ class Extrude:
return field_dict
@classmethod
def from_dict(cls: Type[S], src_dict: Dict[str, Any]) -> S:
def from_dict(cls: Type[MS], src_dict: Dict[str, Any]) -> MS:
d = src_dict.copy()
cap = d.pop("cap", UNSET)
@ -48,7 +48,7 @@ class Extrude:
if isinstance(_target, Unset):
target = UNSET
else:
target = ModelingCmdId(_target)
target = _target # type: ignore[arg-type]
extrude = cls(
cap=cap,

View File

@ -1,26 +1,30 @@
import datetime
from typing import Any, Dict, List, Type, TypeVar, Union, cast
from typing import Any, Dict, List, Type, TypeVar, Union
import attr
from dateutil.parser import isoparse
from ..models.api_call_status import ApiCallStatus
from ..models.file_import_format import FileImportFormat
from ..models.point3d import Point3d
from ..models.unit_length import UnitLength
from ..models.uuid import Uuid
from ..types import UNSET, Unset
A = TypeVar("A", bound="FileCenterOfMass")
LT = TypeVar("LT", bound="FileCenterOfMass")
@attr.s(auto_attribs=True)
class FileCenterOfMass:
"""A file center of mass result.""" # noqa: E501
center_of_mass: Union[Unset, List[float]] = UNSET
center_of_mass: Union[Unset, Point3d] = UNSET
centers_of_mass: Union[Unset, Any] = UNSET
completed_at: Union[Unset, datetime.datetime] = UNSET
created_at: Union[Unset, datetime.datetime] = UNSET
error: Union[Unset, str] = UNSET
id: Union[Unset, str] = UNSET
output_unit: Union[Unset, UnitLength] = UNSET
src_format: Union[Unset, FileImportFormat] = UNSET
started_at: Union[Unset, datetime.datetime] = UNSET
status: Union[Unset, ApiCallStatus] = UNSET
@ -30,9 +34,9 @@ class FileCenterOfMass:
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
center_of_mass: Union[Unset, List[float]] = UNSET
if not isinstance(self.center_of_mass, Unset):
center_of_mass = self.center_of_mass
centers_of_mass = self.centers_of_mass
completed_at: Union[Unset, str] = UNSET
if not isinstance(self.completed_at, Unset):
completed_at = self.completed_at.isoformat()
@ -41,6 +45,8 @@ class FileCenterOfMass:
created_at = self.created_at.isoformat()
error = self.error
id = self.id
if not isinstance(self.output_unit, Unset):
output_unit = self.output_unit
if not isinstance(self.src_format, Unset):
src_format = self.src_format
started_at: Union[Unset, str] = UNSET
@ -58,6 +64,8 @@ class FileCenterOfMass:
field_dict.update({})
if center_of_mass is not UNSET:
field_dict["center_of_mass"] = center_of_mass
if centers_of_mass is not UNSET:
field_dict["centers_of_mass"] = centers_of_mass
if completed_at is not UNSET:
field_dict["completed_at"] = completed_at
if created_at is not UNSET:
@ -66,6 +74,8 @@ class FileCenterOfMass:
field_dict["error"] = error
if id is not UNSET:
field_dict["id"] = id
if output_unit is not UNSET:
field_dict["output_unit"] = output_unit
if src_format is not UNSET:
field_dict["src_format"] = src_format
if started_at is not UNSET:
@ -80,10 +90,16 @@ class FileCenterOfMass:
return field_dict
@classmethod
def from_dict(cls: Type[A], src_dict: Dict[str, Any]) -> A:
def from_dict(cls: Type[LT], src_dict: Dict[str, Any]) -> LT:
d = src_dict.copy()
center_of_mass = cast(List[float], d.pop("center_of_mass", UNSET))
_center_of_mass = d.pop("center_of_mass", UNSET)
center_of_mass: Union[Unset, Point3d]
if isinstance(_center_of_mass, Unset):
center_of_mass = UNSET
else:
center_of_mass = _center_of_mass # type: ignore[arg-type]
centers_of_mass = d.pop("centers_of_mass", UNSET)
_completed_at = d.pop("completed_at", UNSET)
completed_at: Union[Unset, datetime.datetime]
if isinstance(_completed_at, Unset):
@ -105,7 +121,14 @@ class FileCenterOfMass:
if isinstance(_id, Unset):
id = UNSET
else:
id = Uuid(_id)
id = _id # type: ignore[arg-type]
_output_unit = d.pop("output_unit", UNSET)
output_unit: Union[Unset, UnitLength]
if isinstance(_output_unit, Unset):
output_unit = UNSET
else:
output_unit = _output_unit # type: ignore[arg-type]
_src_format = d.pop("src_format", UNSET)
src_format: Union[Unset, FileImportFormat]
@ -139,10 +162,12 @@ class FileCenterOfMass:
file_center_of_mass = cls(
center_of_mass=center_of_mass,
centers_of_mass=centers_of_mass,
completed_at=completed_at,
created_at=created_at,
error=error,
id=id,
output_unit=output_unit,
src_format=src_format,
started_at=started_at,
status=status,

View File

@ -12,7 +12,7 @@ from ..models.output_format import OutputFormat
from ..models.uuid import Uuid
from ..types import UNSET, Unset
H = TypeVar("H", bound="FileConversion")
ED = TypeVar("ED", bound="FileConversion")
@attr.s(auto_attribs=True)
@ -100,7 +100,7 @@ class FileConversion:
return field_dict
@classmethod
def from_dict(cls: Type[H], src_dict: Dict[str, Any]) -> H:
def from_dict(cls: Type[ED], src_dict: Dict[str, Any]) -> ED:
d = src_dict.copy()
_completed_at = d.pop("completed_at", UNSET)
completed_at: Union[Unset, datetime.datetime]
@ -123,7 +123,7 @@ class FileConversion:
if isinstance(_id, Unset):
id = UNSET
else:
id = Uuid(_id)
id = _id # type: ignore[arg-type]
output = d.pop("output", UNSET)
@ -139,7 +139,7 @@ class FileConversion:
if isinstance(_output_format_options, Unset):
output_format_options = UNSET
else:
output_format_options = OutputFormat(_output_format_options)
output_format_options = _output_format_options # type: ignore[arg-type]
outputs = d.pop("outputs", UNSET)
_src_format = d.pop("src_format", UNSET)
@ -154,7 +154,7 @@ class FileConversion:
if isinstance(_src_format_options, Unset):
src_format_options = UNSET
else:
src_format_options = InputFormat(_src_format_options)
src_format_options = _src_format_options # type: ignore[arg-type]
_started_at = d.pop("started_at", UNSET)
started_at: Union[Unset, datetime.datetime]

View File

@ -6,10 +6,12 @@ from dateutil.parser import isoparse
from ..models.api_call_status import ApiCallStatus
from ..models.file_import_format import FileImportFormat
from ..models.unit_density import UnitDensity
from ..models.unit_mass import UnitMass
from ..models.uuid import Uuid
from ..types import UNSET, Unset
E = TypeVar("E", bound="FileDensity")
YY = TypeVar("YY", bound="FileDensity")
@attr.s(auto_attribs=True)
@ -18,10 +20,13 @@ class FileDensity:
completed_at: Union[Unset, datetime.datetime] = UNSET
created_at: Union[Unset, datetime.datetime] = UNSET
densities: Union[Unset, Any] = UNSET
density: Union[Unset, float] = UNSET
error: Union[Unset, str] = UNSET
id: Union[Unset, str] = UNSET
material_mass: Union[Unset, float] = UNSET
material_mass_unit: Union[Unset, UnitMass] = UNSET
output_unit: Union[Unset, UnitDensity] = UNSET
src_format: Union[Unset, FileImportFormat] = UNSET
started_at: Union[Unset, datetime.datetime] = UNSET
status: Union[Unset, ApiCallStatus] = UNSET
@ -37,10 +42,15 @@ class FileDensity:
created_at: Union[Unset, str] = UNSET
if not isinstance(self.created_at, Unset):
created_at = self.created_at.isoformat()
densities = self.densities
density = self.density
error = self.error
id = self.id
material_mass = self.material_mass
if not isinstance(self.material_mass_unit, Unset):
material_mass_unit = self.material_mass_unit
if not isinstance(self.output_unit, Unset):
output_unit = self.output_unit
if not isinstance(self.src_format, Unset):
src_format = self.src_format
started_at: Union[Unset, str] = UNSET
@ -60,6 +70,8 @@ class FileDensity:
field_dict["completed_at"] = completed_at
if created_at is not UNSET:
field_dict["created_at"] = created_at
if densities is not UNSET:
field_dict["densities"] = densities
if density is not UNSET:
field_dict["density"] = density
if error is not UNSET:
@ -68,6 +80,10 @@ class FileDensity:
field_dict["id"] = id
if material_mass is not UNSET:
field_dict["material_mass"] = material_mass
if material_mass_unit is not UNSET:
field_dict["material_mass_unit"] = material_mass_unit
if output_unit is not UNSET:
field_dict["output_unit"] = output_unit
if src_format is not UNSET:
field_dict["src_format"] = src_format
if started_at is not UNSET:
@ -82,7 +98,7 @@ class FileDensity:
return field_dict
@classmethod
def from_dict(cls: Type[E], src_dict: Dict[str, Any]) -> E:
def from_dict(cls: Type[YY], src_dict: Dict[str, Any]) -> YY:
d = src_dict.copy()
_completed_at = d.pop("completed_at", UNSET)
completed_at: Union[Unset, datetime.datetime]
@ -98,6 +114,7 @@ class FileDensity:
else:
created_at = isoparse(_created_at)
densities = d.pop("densities", UNSET)
density = d.pop("density", UNSET)
error = d.pop("error", UNSET)
@ -107,10 +124,24 @@ class FileDensity:
if isinstance(_id, Unset):
id = UNSET
else:
id = Uuid(_id)
id = _id # type: ignore[arg-type]
material_mass = d.pop("material_mass", UNSET)
_material_mass_unit = d.pop("material_mass_unit", UNSET)
material_mass_unit: Union[Unset, UnitMass]
if isinstance(_material_mass_unit, Unset):
material_mass_unit = UNSET
else:
material_mass_unit = _material_mass_unit # type: ignore[arg-type]
_output_unit = d.pop("output_unit", UNSET)
output_unit: Union[Unset, UnitDensity]
if isinstance(_output_unit, Unset):
output_unit = UNSET
else:
output_unit = _output_unit # type: ignore[arg-type]
_src_format = d.pop("src_format", UNSET)
src_format: Union[Unset, FileImportFormat]
if isinstance(_src_format, Unset):
@ -144,10 +175,13 @@ class FileDensity:
file_density = cls(
completed_at=completed_at,
created_at=created_at,
densities=densities,
density=density,
error=error,
id=id,
material_mass=material_mass,
material_mass_unit=material_mass_unit,
output_unit=output_unit,
src_format=src_format,
started_at=started_at,
status=status,

View File

@ -6,8 +6,6 @@ class FileExportFormat(str, Enum):
"""# The COLLADA/DAE file format. <https://en.wikipedia.org/wiki/COLLADA> """ # noqa: E501
DAE = "dae"
"""# The DXF file format. <https://en.wikipedia.org/wiki/AutoCAD_DXF> """ # noqa: E501
DXF = "dxf"
"""# The FBX file format. <https://en.wikipedia.org/wiki/FBX> """ # noqa: E501
FBX = "fbx"
"""# The FBX file format (in binary). <https://en.wikipedia.org/wiki/FBX> """ # noqa: E501

View File

@ -6,8 +6,6 @@ class FileImportFormat(str, Enum):
"""# The COLLADA/DAE file format. <https://en.wikipedia.org/wiki/COLLADA> """ # noqa: E501
DAE = "dae"
"""# The DXF file format. <https://en.wikipedia.org/wiki/AutoCAD_DXF> """ # noqa: E501
DXF = "dxf"
"""# The FBX file format. <https://en.wikipedia.org/wiki/FBX> """ # noqa: E501
FBX = "fbx"
"""# glTF 2.0. """ # noqa: E501

View File

@ -6,10 +6,12 @@ from dateutil.parser import isoparse
from ..models.api_call_status import ApiCallStatus
from ..models.file_import_format import FileImportFormat
from ..models.unit_density import UnitDensity
from ..models.unit_mass import UnitMass
from ..models.uuid import Uuid
from ..types import UNSET, Unset
G = TypeVar("G", bound="FileMass")
DO = TypeVar("DO", bound="FileMass")
@attr.s(auto_attribs=True)
@ -21,7 +23,10 @@ class FileMass:
error: Union[Unset, str] = UNSET
id: Union[Unset, str] = UNSET
mass: Union[Unset, float] = UNSET
masses: Union[Unset, Any] = UNSET
material_density: Union[Unset, float] = UNSET
material_density_unit: Union[Unset, UnitDensity] = UNSET
output_unit: Union[Unset, UnitMass] = UNSET
src_format: Union[Unset, FileImportFormat] = UNSET
started_at: Union[Unset, datetime.datetime] = UNSET
status: Union[Unset, ApiCallStatus] = UNSET
@ -40,7 +45,12 @@ class FileMass:
error = self.error
id = self.id
mass = self.mass
masses = self.masses
material_density = self.material_density
if not isinstance(self.material_density_unit, Unset):
material_density_unit = self.material_density_unit
if not isinstance(self.output_unit, Unset):
output_unit = self.output_unit
if not isinstance(self.src_format, Unset):
src_format = self.src_format
started_at: Union[Unset, str] = UNSET
@ -66,8 +76,14 @@ class FileMass:
field_dict["id"] = id
if mass is not UNSET:
field_dict["mass"] = mass
if masses is not UNSET:
field_dict["masses"] = masses
if material_density is not UNSET:
field_dict["material_density"] = material_density
if material_density_unit is not UNSET:
field_dict["material_density_unit"] = material_density_unit
if output_unit is not UNSET:
field_dict["output_unit"] = output_unit
if src_format is not UNSET:
field_dict["src_format"] = src_format
if started_at is not UNSET:
@ -82,7 +98,7 @@ class FileMass:
return field_dict
@classmethod
def from_dict(cls: Type[G], src_dict: Dict[str, Any]) -> G:
def from_dict(cls: Type[DO], src_dict: Dict[str, Any]) -> DO:
d = src_dict.copy()
_completed_at = d.pop("completed_at", UNSET)
completed_at: Union[Unset, datetime.datetime]
@ -105,12 +121,27 @@ class FileMass:
if isinstance(_id, Unset):
id = UNSET
else:
id = Uuid(_id)
id = _id # type: ignore[arg-type]
mass = d.pop("mass", UNSET)
masses = d.pop("masses", UNSET)
material_density = d.pop("material_density", UNSET)
_material_density_unit = d.pop("material_density_unit", UNSET)
material_density_unit: Union[Unset, UnitDensity]
if isinstance(_material_density_unit, Unset):
material_density_unit = UNSET
else:
material_density_unit = _material_density_unit # type: ignore[arg-type]
_output_unit = d.pop("output_unit", UNSET)
output_unit: Union[Unset, UnitMass]
if isinstance(_output_unit, Unset):
output_unit = UNSET
else:
output_unit = _output_unit # type: ignore[arg-type]
_src_format = d.pop("src_format", UNSET)
src_format: Union[Unset, FileImportFormat]
if isinstance(_src_format, Unset):
@ -147,7 +178,10 @@ class FileMass:
error=error,
id=id,
mass=mass,
masses=masses,
material_density=material_density,
material_density_unit=material_density_unit,
output_unit=output_unit,
src_format=src_format,
started_at=started_at,
status=status,

View File

@ -6,10 +6,11 @@ from dateutil.parser import isoparse
from ..models.api_call_status import ApiCallStatus
from ..models.file_import_format import FileImportFormat
from ..models.unit_area import UnitArea
from ..models.uuid import Uuid
from ..types import UNSET, Unset
J = TypeVar("J", bound="FileSurfaceArea")
FZ = TypeVar("FZ", bound="FileSurfaceArea")
@attr.s(auto_attribs=True)
@ -20,10 +21,12 @@ class FileSurfaceArea:
created_at: Union[Unset, datetime.datetime] = UNSET
error: Union[Unset, str] = UNSET
id: Union[Unset, str] = UNSET
output_unit: Union[Unset, UnitArea] = UNSET
src_format: Union[Unset, FileImportFormat] = UNSET
started_at: Union[Unset, datetime.datetime] = UNSET
status: Union[Unset, ApiCallStatus] = UNSET
surface_area: Union[Unset, float] = UNSET
surface_areas: Union[Unset, Any] = UNSET
updated_at: Union[Unset, datetime.datetime] = UNSET
user_id: Union[Unset, str] = UNSET
@ -38,6 +41,8 @@ class FileSurfaceArea:
created_at = self.created_at.isoformat()
error = self.error
id = self.id
if not isinstance(self.output_unit, Unset):
output_unit = self.output_unit
if not isinstance(self.src_format, Unset):
src_format = self.src_format
started_at: Union[Unset, str] = UNSET
@ -46,6 +51,7 @@ class FileSurfaceArea:
if not isinstance(self.status, Unset):
status = self.status
surface_area = self.surface_area
surface_areas = self.surface_areas
updated_at: Union[Unset, str] = UNSET
if not isinstance(self.updated_at, Unset):
updated_at = self.updated_at.isoformat()
@ -62,6 +68,8 @@ class FileSurfaceArea:
field_dict["error"] = error
if id is not UNSET:
field_dict["id"] = id
if output_unit is not UNSET:
field_dict["output_unit"] = output_unit
if src_format is not UNSET:
field_dict["src_format"] = src_format
if started_at is not UNSET:
@ -70,6 +78,8 @@ class FileSurfaceArea:
field_dict["status"] = status
if surface_area is not UNSET:
field_dict["surface_area"] = surface_area
if surface_areas is not UNSET:
field_dict["surface_areas"] = surface_areas
if updated_at is not UNSET:
field_dict["updated_at"] = updated_at
if user_id is not UNSET:
@ -78,7 +88,7 @@ class FileSurfaceArea:
return field_dict
@classmethod
def from_dict(cls: Type[J], src_dict: Dict[str, Any]) -> J:
def from_dict(cls: Type[FZ], src_dict: Dict[str, Any]) -> FZ:
d = src_dict.copy()
_completed_at = d.pop("completed_at", UNSET)
completed_at: Union[Unset, datetime.datetime]
@ -101,7 +111,14 @@ class FileSurfaceArea:
if isinstance(_id, Unset):
id = UNSET
else:
id = Uuid(_id)
id = _id # type: ignore[arg-type]
_output_unit = d.pop("output_unit", UNSET)
output_unit: Union[Unset, UnitArea]
if isinstance(_output_unit, Unset):
output_unit = UNSET
else:
output_unit = _output_unit # type: ignore[arg-type]
_src_format = d.pop("src_format", UNSET)
src_format: Union[Unset, FileImportFormat]
@ -126,6 +143,7 @@ class FileSurfaceArea:
surface_area = d.pop("surface_area", UNSET)
surface_areas = d.pop("surface_areas", UNSET)
_updated_at = d.pop("updated_at", UNSET)
updated_at: Union[Unset, datetime.datetime]
if isinstance(_updated_at, Unset):
@ -140,10 +158,12 @@ class FileSurfaceArea:
created_at=created_at,
error=error,
id=id,
output_unit=output_unit,
src_format=src_format,
started_at=started_at,
status=status,
surface_area=surface_area,
surface_areas=surface_areas,
updated_at=updated_at,
user_id=user_id,
)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
R = TypeVar("R", bound="FileSystemMetadata")
GL = TypeVar("GL", bound="FileSystemMetadata")
@attr.s(auto_attribs=True)
@ -29,7 +29,7 @@ class FileSystemMetadata:
return field_dict
@classmethod
def from_dict(cls: Type[R], src_dict: Dict[str, Any]) -> R:
def from_dict(cls: Type[GL], src_dict: Dict[str, Any]) -> GL:
d = src_dict.copy()
ok = d.pop("ok", UNSET)

View File

@ -6,10 +6,11 @@ from dateutil.parser import isoparse
from ..models.api_call_status import ApiCallStatus
from ..models.file_import_format import FileImportFormat
from ..models.unit_volume import UnitVolume
from ..models.uuid import Uuid
from ..types import UNSET, Unset
L = TypeVar("L", bound="FileVolume")
NN = TypeVar("NN", bound="FileVolume")
@attr.s(auto_attribs=True)
@ -20,12 +21,14 @@ class FileVolume:
created_at: Union[Unset, datetime.datetime] = UNSET
error: Union[Unset, str] = UNSET
id: Union[Unset, str] = UNSET
output_unit: Union[Unset, UnitVolume] = UNSET
src_format: Union[Unset, FileImportFormat] = UNSET
started_at: Union[Unset, datetime.datetime] = UNSET
status: Union[Unset, ApiCallStatus] = UNSET
updated_at: Union[Unset, datetime.datetime] = UNSET
user_id: Union[Unset, str] = UNSET
volume: Union[Unset, float] = UNSET
volumes: Union[Unset, Any] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
@ -38,6 +41,8 @@ class FileVolume:
created_at = self.created_at.isoformat()
error = self.error
id = self.id
if not isinstance(self.output_unit, Unset):
output_unit = self.output_unit
if not isinstance(self.src_format, Unset):
src_format = self.src_format
started_at: Union[Unset, str] = UNSET
@ -50,6 +55,7 @@ class FileVolume:
updated_at = self.updated_at.isoformat()
user_id = self.user_id
volume = self.volume
volumes = self.volumes
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
@ -62,6 +68,8 @@ class FileVolume:
field_dict["error"] = error
if id is not UNSET:
field_dict["id"] = id
if output_unit is not UNSET:
field_dict["output_unit"] = output_unit
if src_format is not UNSET:
field_dict["src_format"] = src_format
if started_at is not UNSET:
@ -74,11 +82,13 @@ class FileVolume:
field_dict["user_id"] = user_id
if volume is not UNSET:
field_dict["volume"] = volume
if volumes is not UNSET:
field_dict["volumes"] = volumes
return field_dict
@classmethod
def from_dict(cls: Type[L], src_dict: Dict[str, Any]) -> L:
def from_dict(cls: Type[NN], src_dict: Dict[str, Any]) -> NN:
d = src_dict.copy()
_completed_at = d.pop("completed_at", UNSET)
completed_at: Union[Unset, datetime.datetime]
@ -101,7 +111,14 @@ class FileVolume:
if isinstance(_id, Unset):
id = UNSET
else:
id = Uuid(_id)
id = _id # type: ignore[arg-type]
_output_unit = d.pop("output_unit", UNSET)
output_unit: Union[Unset, UnitVolume]
if isinstance(_output_unit, Unset):
output_unit = UNSET
else:
output_unit = _output_unit # type: ignore[arg-type]
_src_format = d.pop("src_format", UNSET)
src_format: Union[Unset, FileImportFormat]
@ -135,17 +152,21 @@ class FileVolume:
volume = d.pop("volume", UNSET)
volumes = d.pop("volumes", UNSET)
file_volume = cls(
completed_at=completed_at,
created_at=created_at,
error=error,
id=id,
output_unit=output_unit,
src_format=src_format,
started_at=started_at,
status=status,
updated_at=updated_at,
user_id=user_id,
volume=volume,
volumes=volumes,
)
file_volume.additional_properties = d

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
Y = TypeVar("Y", bound="Gateway")
OH = TypeVar("OH", bound="Gateway")
@attr.s(auto_attribs=True)
@ -43,7 +43,7 @@ class Gateway:
return field_dict
@classmethod
def from_dict(cls: Type[Y], src_dict: Dict[str, Any]) -> Y:
def from_dict(cls: Type[OH], src_dict: Dict[str, Any]) -> OH:
d = src_dict.copy()
auth_timeout = d.pop("auth_timeout", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
H = TypeVar("H", bound="IndexInfo")
VI = TypeVar("VI", bound="IndexInfo")
@attr.s(auto_attribs=True)
@ -41,7 +41,7 @@ class IndexInfo:
return field_dict
@classmethod
def from_dict(cls: Type[H], src_dict: Dict[str, Any]) -> H:
def from_dict(cls: Type[VI], src_dict: Dict[str, Any]) -> VI:
d = src_dict.copy()
mirrors = cast(List[str], d.pop("mirrors", UNSET))

View File

@ -3,9 +3,10 @@ from typing import Any, Dict, List, Type, TypeVar, Union
import attr
from ..models.system import System
from ..models.unit_length import UnitLength
from ..types import UNSET, Unset
K = TypeVar("K", bound="Gltf")
ET = TypeVar("ET", bound="Gltf")
@attr.s(auto_attribs=True)
@ -28,7 +29,7 @@ class Gltf:
return field_dict
@classmethod
def from_dict(cls: Type[K], src_dict: Dict[str, Any]) -> K:
def from_dict(cls: Type[ET], src_dict: Dict[str, Any]) -> ET:
d = src_dict.copy()
type = d.pop("type", UNSET)
@ -56,7 +57,7 @@ class Gltf:
return key in self.additional_properties
V = TypeVar("V", bound="Step")
QF = TypeVar("QF", bound="Step")
@attr.s(auto_attribs=True)
@ -84,14 +85,14 @@ class Step:
return field_dict
@classmethod
def from_dict(cls: Type[V], src_dict: Dict[str, Any]) -> V:
def from_dict(cls: Type[QF], src_dict: Dict[str, Any]) -> QF:
d = src_dict.copy()
_coords = d.pop("coords", UNSET)
coords: Union[Unset, System]
if isinstance(_coords, Unset):
coords = UNSET
else:
coords = System(_coords)
coords = _coords # type: ignore[arg-type]
type = d.pop("type", UNSET)
@ -120,7 +121,7 @@ class Step:
return key in self.additional_properties
R = TypeVar("R", bound="Obj")
DI = TypeVar("DI", bound="Obj")
@attr.s(auto_attribs=True)
@ -129,6 +130,7 @@ class Obj:
coords: Union[Unset, System] = UNSET
type: Union[Unset, str] = UNSET
units: Union[Unset, UnitLength] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
@ -136,6 +138,8 @@ class Obj:
if not isinstance(self.coords, Unset):
coords = self.coords
type = self.type
if not isinstance(self.units, Unset):
units = self.units
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
@ -144,24 +148,34 @@ class Obj:
field_dict["coords"] = coords
if type is not UNSET:
field_dict["type"] = type
if units is not UNSET:
field_dict["units"] = units
return field_dict
@classmethod
def from_dict(cls: Type[R], src_dict: Dict[str, Any]) -> R:
def from_dict(cls: Type[DI], src_dict: Dict[str, Any]) -> DI:
d = src_dict.copy()
_coords = d.pop("coords", UNSET)
coords: Union[Unset, System]
if isinstance(_coords, Unset):
coords = UNSET
else:
coords = System(_coords)
coords = _coords # type: ignore[arg-type]
type = d.pop("type", UNSET)
_units = d.pop("units", UNSET)
units: Union[Unset, UnitLength]
if isinstance(_units, Unset):
units = UNSET
else:
units = _units # type: ignore[arg-type]
obj = cls(
coords=coords,
type=type,
units=units,
)
obj.additional_properties = d
@ -184,15 +198,16 @@ class Obj:
return key in self.additional_properties
N = TypeVar("N", bound="Stl")
OJ = TypeVar("OJ", bound="Ply")
@attr.s(auto_attribs=True)
class Stl:
"""*ST**ereo**L**ithography format.""" # noqa: E501
class Ply:
"""The PLY Polygon File Format.""" # noqa: E501
coords: Union[Unset, System] = UNSET
type: Union[Unset, str] = UNSET
units: Union[Unset, UnitLength] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
@ -200,6 +215,8 @@ class Stl:
if not isinstance(self.coords, Unset):
coords = self.coords
type = self.type
if not isinstance(self.units, Unset):
units = self.units
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
@ -208,24 +225,111 @@ class Stl:
field_dict["coords"] = coords
if type is not UNSET:
field_dict["type"] = type
if units is not UNSET:
field_dict["units"] = units
return field_dict
@classmethod
def from_dict(cls: Type[N], src_dict: Dict[str, Any]) -> N:
def from_dict(cls: Type[OJ], src_dict: Dict[str, Any]) -> OJ:
d = src_dict.copy()
_coords = d.pop("coords", UNSET)
coords: Union[Unset, System]
if isinstance(_coords, Unset):
coords = UNSET
else:
coords = System(_coords)
coords = _coords # type: ignore[arg-type]
type = d.pop("type", UNSET)
_units = d.pop("units", UNSET)
units: Union[Unset, UnitLength]
if isinstance(_units, Unset):
units = UNSET
else:
units = _units # type: ignore[arg-type]
ply = cls(
coords=coords,
type=type,
units=units,
)
ply.additional_properties = d
return ply
@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
UF = TypeVar("UF", bound="Stl")
@attr.s(auto_attribs=True)
class Stl:
"""*ST**ereo**L**ithography format.""" # noqa: E501
coords: Union[Unset, System] = UNSET
type: Union[Unset, str] = UNSET
units: Union[Unset, UnitLength] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
if not isinstance(self.coords, Unset):
coords = self.coords
type = self.type
if not isinstance(self.units, Unset):
units = self.units
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if coords is not UNSET:
field_dict["coords"] = coords
if type is not UNSET:
field_dict["type"] = type
if units is not UNSET:
field_dict["units"] = units
return field_dict
@classmethod
def from_dict(cls: Type[UF], src_dict: Dict[str, Any]) -> UF:
d = src_dict.copy()
_coords = d.pop("coords", UNSET)
coords: Union[Unset, System]
if isinstance(_coords, Unset):
coords = UNSET
else:
coords = _coords # type: ignore[arg-type]
type = d.pop("type", UNSET)
_units = d.pop("units", UNSET)
units: Union[Unset, UnitLength]
if isinstance(_units, Unset):
units = UNSET
else:
units = _units # type: ignore[arg-type]
stl = cls(
coords=coords,
type=type,
units=units,
)
stl.additional_properties = d
@ -248,4 +352,4 @@ class Stl:
return key in self.additional_properties
InputFormat = Union[Gltf, Step, Obj, Stl]
InputFormat = Union[Gltf, Step, Obj, Ply, Stl]

View File

@ -8,7 +8,7 @@ from ..models.currency import Currency
from ..models.invoice_status import InvoiceStatus
from ..types import UNSET, Unset
P = TypeVar("P", bound="Invoice")
YF = TypeVar("YF", bound="Invoice")
@attr.s(auto_attribs=True)
@ -143,7 +143,7 @@ class Invoice:
return field_dict
@classmethod
def from_dict(cls: Type[P], src_dict: Dict[str, Any]) -> P:
def from_dict(cls: Type[YF], src_dict: Dict[str, Any]) -> YF:
d = src_dict.copy()
amount_due = d.pop("amount_due", UNSET)

View File

@ -5,7 +5,7 @@ import attr
from ..models.currency import Currency
from ..types import UNSET, Unset
C = TypeVar("C", bound="InvoiceLineItem")
PY = TypeVar("PY", bound="InvoiceLineItem")
@attr.s(auto_attribs=True)
@ -49,7 +49,7 @@ class InvoiceLineItem:
return field_dict
@classmethod
def from_dict(cls: Type[C], src_dict: Dict[str, Any]) -> C:
def from_dict(cls: Type[PY], src_dict: Dict[str, Any]) -> PY:
d = src_dict.copy()
amount = d.pop("amount", UNSET)

View File

@ -7,7 +7,7 @@ from ..models.jetstream_stats import JetstreamStats
from ..models.meta_cluster_info import MetaClusterInfo
from ..types import UNSET, Unset
U = TypeVar("U", bound="Jetstream")
LK = TypeVar("LK", bound="Jetstream")
@attr.s(auto_attribs=True)
@ -41,28 +41,28 @@ class Jetstream:
return field_dict
@classmethod
def from_dict(cls: Type[U], src_dict: Dict[str, Any]) -> U:
def from_dict(cls: Type[LK], src_dict: Dict[str, Any]) -> LK:
d = src_dict.copy()
_config = d.pop("config", UNSET)
config: Union[Unset, JetstreamConfig]
if isinstance(_config, Unset):
config = UNSET
else:
config = JetstreamConfig(_config)
config = _config # type: ignore[arg-type]
_meta = d.pop("meta", UNSET)
meta: Union[Unset, MetaClusterInfo]
if isinstance(_meta, Unset):
meta = UNSET
else:
meta = MetaClusterInfo(_meta)
meta = _meta # type: ignore[arg-type]
_stats = d.pop("stats", UNSET)
stats: Union[Unset, JetstreamStats]
if isinstance(_stats, Unset):
stats = UNSET
else:
stats = JetstreamStats(_stats)
stats = _stats # type: ignore[arg-type]
jetstream = cls(
config=config,

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
S = TypeVar("S", bound="JetstreamApiStats")
AR = TypeVar("AR", bound="JetstreamApiStats")
@attr.s(auto_attribs=True)
@ -35,7 +35,7 @@ class JetstreamApiStats:
return field_dict
@classmethod
def from_dict(cls: Type[S], src_dict: Dict[str, Any]) -> S:
def from_dict(cls: Type[AR], src_dict: Dict[str, Any]) -> AR:
d = src_dict.copy()
errors = d.pop("errors", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
K = TypeVar("K", bound="JetstreamConfig")
WB = TypeVar("WB", bound="JetstreamConfig")
@attr.s(auto_attribs=True)
@ -39,7 +39,7 @@ class JetstreamConfig:
return field_dict
@classmethod
def from_dict(cls: Type[K], src_dict: Dict[str, Any]) -> K:
def from_dict(cls: Type[WB], src_dict: Dict[str, Any]) -> WB:
d = src_dict.copy()
domain = d.pop("domain", UNSET)

View File

@ -5,7 +5,7 @@ import attr
from ..models.jetstream_api_stats import JetstreamApiStats
from ..types import UNSET, Unset
Q = TypeVar("Q", bound="JetstreamStats")
KK = TypeVar("KK", bound="JetstreamStats")
@attr.s(auto_attribs=True)
@ -53,7 +53,7 @@ class JetstreamStats:
return field_dict
@classmethod
def from_dict(cls: Type[Q], src_dict: Dict[str, Any]) -> Q:
def from_dict(cls: Type[KK], src_dict: Dict[str, Any]) -> KK:
d = src_dict.copy()
accounts = d.pop("accounts", UNSET)
@ -62,7 +62,7 @@ class JetstreamStats:
if isinstance(_api, Unset):
api = UNSET
else:
api = JetstreamApiStats(_api)
api = _api # type: ignore[arg-type]
ha_assets = d.pop("ha_assets", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
F = TypeVar("F", bound="LeafNode")
HC = TypeVar("HC", bound="LeafNode")
@attr.s(auto_attribs=True)
@ -39,7 +39,7 @@ class LeafNode:
return field_dict
@classmethod
def from_dict(cls: Type[F], src_dict: Dict[str, Any]) -> F:
def from_dict(cls: Type[HC], src_dict: Dict[str, Any]) -> HC:
d = src_dict.copy()
auth_timeout = d.pop("auth_timeout", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
H = TypeVar("H", bound="Mesh")
FM = TypeVar("FM", bound="Mesh")
@attr.s(auto_attribs=True)
@ -25,7 +25,7 @@ class Mesh:
return field_dict
@classmethod
def from_dict(cls: Type[H], src_dict: Dict[str, Any]) -> H:
def from_dict(cls: Type[FM], src_dict: Dict[str, Any]) -> FM:
d = src_dict.copy()
mesh = d.pop("mesh", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
N = TypeVar("N", bound="MetaClusterInfo")
PV = TypeVar("PV", bound="MetaClusterInfo")
@attr.s(auto_attribs=True)
@ -35,7 +35,7 @@ class MetaClusterInfo:
return field_dict
@classmethod
def from_dict(cls: Type[N], src_dict: Dict[str, Any]) -> N:
def from_dict(cls: Type[PV], src_dict: Dict[str, Any]) -> PV:
d = src_dict.copy()
cluster_size = d.pop("cluster_size", UNSET)

View File

@ -11,7 +11,7 @@ from ..models.file_system_metadata import FileSystemMetadata
from ..models.point_e_metadata import PointEMetadata
from ..types import UNSET, Unset
H = TypeVar("H", bound="Metadata")
QI = TypeVar("QI", bound="Metadata")
@attr.s(auto_attribs=True)
@ -71,21 +71,21 @@ class Metadata:
return field_dict
@classmethod
def from_dict(cls: Type[H], src_dict: Dict[str, Any]) -> H:
def from_dict(cls: Type[QI], src_dict: Dict[str, Any]) -> QI:
d = src_dict.copy()
_cache = d.pop("cache", UNSET)
cache: Union[Unset, CacheMetadata]
if isinstance(_cache, Unset):
cache = UNSET
else:
cache = CacheMetadata(_cache)
cache = _cache # type: ignore[arg-type]
_engine = d.pop("engine", UNSET)
engine: Union[Unset, EngineMetadata]
if isinstance(_engine, Unset):
engine = UNSET
else:
engine = EngineMetadata(_engine)
engine = _engine # type: ignore[arg-type]
_environment = d.pop("environment", UNSET)
environment: Union[Unset, Environment]
@ -99,14 +99,14 @@ class Metadata:
if isinstance(_executor, Unset):
executor = UNSET
else:
executor = ExecutorMetadata(_executor)
executor = _executor # type: ignore[arg-type]
_fs = d.pop("fs", UNSET)
fs: Union[Unset, FileSystemMetadata]
if isinstance(_fs, Unset):
fs = UNSET
else:
fs = FileSystemMetadata(_fs)
fs = _fs # type: ignore[arg-type]
git_hash = d.pop("git_hash", UNSET)
@ -115,14 +115,14 @@ class Metadata:
if isinstance(_point_e, Unset):
point_e = UNSET
else:
point_e = PointEMetadata(_point_e)
point_e = _point_e # type: ignore[arg-type]
_pubsub = d.pop("pubsub", UNSET)
pubsub: Union[Unset, Connection]
if isinstance(_pubsub, Unset):
pubsub = UNSET
else:
pubsub = Connection(_pubsub)
pubsub = _pubsub # type: ignore[arg-type]
metadata = cls(
cache=cache,

View File

@ -6,7 +6,8 @@ class Method(str, Enum):
This type also contains constants for a number of common HTTP methods such as GET, POST, etc.
Currently includes 8 variants representing the 8 methods defined in [RFC 7230](https://tools.ietf.org/html/rfc7231#section-4.1), plus PATCH, and an Extension variant for all extensions.""" # noqa: E501
Currently includes 8 variants representing the 8 methods defined in [RFC 7230](https://tools.ietf.org/html/rfc7231#section-4.1), plus PATCH, and an Extension variant for all extensions.
""" # noqa: E501
"""# The `OPTIONS` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.2.1). """ # noqa: E501
OPTIONS = "OPTIONS"

View File

@ -5,6 +5,7 @@ import attr
from ..models.camera_drag_interaction_type import CameraDragInteractionType
from ..models.modeling_cmd_id import ModelingCmdId
from ..models.output_format import OutputFormat
from ..models.path_segment import PathSegment
from ..models.point2d import Point2d
from ..models.point3d import Point3d
@ -21,7 +22,7 @@ class StartPath(str, Enum):
return str(self.value)
B = TypeVar("B", bound="MovePathPen")
TP = TypeVar("TP", bound="MovePathPen")
@attr.s(auto_attribs=True)
@ -48,21 +49,21 @@ class MovePathPen:
return field_dict
@classmethod
def from_dict(cls: Type[B], src_dict: Dict[str, Any]) -> B:
def from_dict(cls: Type[TP], src_dict: Dict[str, Any]) -> TP:
d = src_dict.copy()
_path = d.pop("path", UNSET)
path: Union[Unset, ModelingCmdId]
if isinstance(_path, Unset):
path = UNSET
else:
path = ModelingCmdId(_path)
path = _path # type: ignore[arg-type]
_to = d.pop("to", UNSET)
to: Union[Unset, Point3d]
if isinstance(_to, Unset):
to = UNSET
else:
to = Point3d(_to)
to = _to # type: ignore[arg-type]
move_path_pen = cls(
path=path,
@ -89,7 +90,7 @@ class MovePathPen:
return key in self.additional_properties
B = TypeVar("B", bound="ExtendPath")
CF = TypeVar("CF", bound="ExtendPath")
@attr.s(auto_attribs=True)
@ -116,14 +117,14 @@ class ExtendPath:
return field_dict
@classmethod
def from_dict(cls: Type[B], src_dict: Dict[str, Any]) -> B:
def from_dict(cls: Type[CF], src_dict: Dict[str, Any]) -> CF:
d = src_dict.copy()
_path = d.pop("path", UNSET)
path: Union[Unset, ModelingCmdId]
if isinstance(_path, Unset):
path = UNSET
else:
path = ModelingCmdId(_path)
path = _path # type: ignore[arg-type]
_segment = d.pop("segment", UNSET)
segment: Union[Unset, PathSegment]
@ -157,7 +158,7 @@ class ExtendPath:
return key in self.additional_properties
P = TypeVar("P", bound="ClosePath")
OM = TypeVar("OM", bound="ClosePath")
@attr.s(auto_attribs=True)
@ -178,7 +179,7 @@ class ClosePath:
return field_dict
@classmethod
def from_dict(cls: Type[P], src_dict: Dict[str, Any]) -> P:
def from_dict(cls: Type[OM], src_dict: Dict[str, Any]) -> OM:
d = src_dict.copy()
path_id = d.pop("path_id", UNSET)
@ -206,7 +207,7 @@ class ClosePath:
return key in self.additional_properties
J = TypeVar("J", bound="CameraDragStart")
EN = TypeVar("EN", bound="CameraDragStart")
@attr.s(auto_attribs=True)
@ -233,7 +234,7 @@ class CameraDragStart:
return field_dict
@classmethod
def from_dict(cls: Type[J], src_dict: Dict[str, Any]) -> J:
def from_dict(cls: Type[EN], src_dict: Dict[str, Any]) -> EN:
d = src_dict.copy()
_interaction = d.pop("interaction", UNSET)
interaction: Union[Unset, CameraDragInteractionType]
@ -247,7 +248,7 @@ class CameraDragStart:
if isinstance(_window, Unset):
window = UNSET
else:
window = Point2d(_window)
window = _window # type: ignore[arg-type]
camera_drag_start = cls(
interaction=interaction,
@ -274,7 +275,7 @@ class CameraDragStart:
return key in self.additional_properties
T = TypeVar("T", bound="CameraDragMove")
RS = TypeVar("RS", bound="CameraDragMove")
@attr.s(auto_attribs=True)
@ -305,7 +306,7 @@ class CameraDragMove:
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
def from_dict(cls: Type[RS], src_dict: Dict[str, Any]) -> RS:
d = src_dict.copy()
_interaction = d.pop("interaction", UNSET)
interaction: Union[Unset, CameraDragInteractionType]
@ -321,7 +322,7 @@ class CameraDragMove:
if isinstance(_window, Unset):
window = UNSET
else:
window = Point2d(_window)
window = _window # type: ignore[arg-type]
camera_drag_move = cls(
interaction=interaction,
@ -349,7 +350,7 @@ class CameraDragMove:
return key in self.additional_properties
V = TypeVar("V", bound="CameraDragEnd")
LR = TypeVar("LR", bound="CameraDragEnd")
@attr.s(auto_attribs=True)
@ -376,7 +377,7 @@ class CameraDragEnd:
return field_dict
@classmethod
def from_dict(cls: Type[V], src_dict: Dict[str, Any]) -> V:
def from_dict(cls: Type[LR], src_dict: Dict[str, Any]) -> LR:
d = src_dict.copy()
_interaction = d.pop("interaction", UNSET)
interaction: Union[Unset, CameraDragInteractionType]
@ -390,7 +391,7 @@ class CameraDragEnd:
if isinstance(_window, Unset):
window = UNSET
else:
window = Point2d(_window)
window = _window # type: ignore[arg-type]
camera_drag_end = cls(
interaction=interaction,
@ -417,6 +418,246 @@ class CameraDragEnd:
return key in self.additional_properties
MP = TypeVar("MP", bound="DefaultCameraLookAt")
@attr.s(auto_attribs=True)
class DefaultCameraLookAt:
center: Union[Unset, Point3d] = UNSET
up: Union[Unset, Point3d] = UNSET
vantage: Union[Unset, Point3d] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
if not isinstance(self.center, Unset):
center = self.center
if not isinstance(self.up, Unset):
up = self.up
if not isinstance(self.vantage, Unset):
vantage = self.vantage
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if center is not UNSET:
field_dict["center"] = center
if up is not UNSET:
field_dict["up"] = up
if vantage is not UNSET:
field_dict["vantage"] = vantage
return field_dict
@classmethod
def from_dict(cls: Type[MP], src_dict: Dict[str, Any]) -> MP:
d = src_dict.copy()
_center = d.pop("center", UNSET)
center: Union[Unset, Point3d]
if isinstance(_center, Unset):
center = UNSET
else:
center = _center # type: ignore[arg-type]
_up = d.pop("up", UNSET)
up: Union[Unset, Point3d]
if isinstance(_up, Unset):
up = UNSET
else:
up = _up # type: ignore[arg-type]
_vantage = d.pop("vantage", UNSET)
vantage: Union[Unset, Point3d]
if isinstance(_vantage, Unset):
vantage = UNSET
else:
vantage = _vantage # type: ignore[arg-type]
default_camera_look_at = cls(
center=center,
up=up,
vantage=vantage,
)
default_camera_look_at.additional_properties = d
return default_camera_look_at
@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
WF = TypeVar("WF", bound="DefaultCameraEnableSketchMode")
@attr.s(auto_attribs=True)
class DefaultCameraEnableSketchMode:
distance_to_plane: Union[Unset, float] = UNSET
origin: Union[Unset, Point3d] = UNSET
ortho: Union[Unset, bool] = False
x_axis: Union[Unset, Point3d] = UNSET
y_axis: Union[Unset, Point3d] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
distance_to_plane = self.distance_to_plane
if not isinstance(self.origin, Unset):
origin = self.origin
ortho = self.ortho
if not isinstance(self.x_axis, Unset):
x_axis = self.x_axis
if not isinstance(self.y_axis, Unset):
y_axis = self.y_axis
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if distance_to_plane is not UNSET:
field_dict["distance_to_plane"] = distance_to_plane
if origin is not UNSET:
field_dict["origin"] = origin
if ortho is not UNSET:
field_dict["ortho"] = ortho
if x_axis is not UNSET:
field_dict["x_axis"] = x_axis
if y_axis is not UNSET:
field_dict["y_axis"] = y_axis
return field_dict
@classmethod
def from_dict(cls: Type[WF], src_dict: Dict[str, Any]) -> WF:
d = src_dict.copy()
distance_to_plane = d.pop("distance_to_plane", UNSET)
_origin = d.pop("origin", UNSET)
origin: Union[Unset, Point3d]
if isinstance(_origin, Unset):
origin = UNSET
else:
origin = _origin # type: ignore[arg-type]
ortho = d.pop("ortho", UNSET)
_x_axis = d.pop("x_axis", UNSET)
x_axis: Union[Unset, Point3d]
if isinstance(_x_axis, Unset):
x_axis = UNSET
else:
x_axis = _x_axis # type: ignore[arg-type]
_y_axis = d.pop("y_axis", UNSET)
y_axis: Union[Unset, Point3d]
if isinstance(_y_axis, Unset):
y_axis = UNSET
else:
y_axis = _y_axis # type: ignore[arg-type]
default_camera_enable_sketch_mode = cls(
distance_to_plane=distance_to_plane,
origin=origin,
ortho=ortho,
x_axis=x_axis,
y_axis=y_axis,
)
default_camera_enable_sketch_mode.additional_properties = d
return default_camera_enable_sketch_mode
@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
class DefaultCameraDisableSketchMode(str, Enum):
"""Disable sketch mode, from the default camera.""" # noqa: E501
DEFAULT_CAMERA_DISABLE_SKETCH_MODE = "DefaultCameraDisableSketchMode"
def __str__(self) -> str:
return str(self.value)
RO = TypeVar("RO", bound="Export")
@attr.s(auto_attribs=True)
class Export:
format: Union[Unset, OutputFormat] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
if not isinstance(self.format, Unset):
format = self.format
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if format is not UNSET:
field_dict["format"] = format
return field_dict
@classmethod
def from_dict(cls: Type[RO], src_dict: Dict[str, Any]) -> RO:
d = src_dict.copy()
_format = d.pop("format", UNSET)
format: Union[Unset, OutputFormat]
if isinstance(_format, Unset):
format = UNSET
else:
format = _format # type: ignore[arg-type]
export = cls(
format=format,
)
export.additional_properties = d
return export
@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
ModelingCmd = Union[
StartPath,
MovePathPen,
@ -426,4 +667,8 @@ ModelingCmd = Union[
CameraDragStart,
CameraDragMove,
CameraDragEnd,
DefaultCameraLookAt,
DefaultCameraEnableSketchMode,
DefaultCameraDisableSketchMode,
Export,
]

View File

@ -6,7 +6,7 @@ from ..models.modeling_cmd import ModelingCmd
from ..models.modeling_cmd_id import ModelingCmdId
from ..types import UNSET, Unset
C = TypeVar("C", bound="ModelingCmdReq")
DN = TypeVar("DN", bound="ModelingCmdReq")
@attr.s(auto_attribs=True)
@ -39,7 +39,7 @@ class ModelingCmdReq:
return field_dict
@classmethod
def from_dict(cls: Type[C], src_dict: Dict[str, Any]) -> C:
def from_dict(cls: Type[DN], src_dict: Dict[str, Any]) -> DN:
d = src_dict.copy()
_cmd = d.pop("cmd", UNSET)
cmd: Union[Unset, ModelingCmd]
@ -53,7 +53,7 @@ class ModelingCmdReq:
if isinstance(_cmd_id, Unset):
cmd_id = UNSET
else:
cmd_id = ModelingCmdId(_cmd_id)
cmd_id = _cmd_id # type: ignore[arg-type]
file_id = d.pop("file_id", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
R = TypeVar("R", bound="ModelingCmdReqBatch")
BA = TypeVar("BA", bound="ModelingCmdReqBatch")
@attr.s(auto_attribs=True)
@ -31,7 +31,7 @@ class ModelingCmdReqBatch:
return field_dict
@classmethod
def from_dict(cls: Type[R], src_dict: Dict[str, Any]) -> R:
def from_dict(cls: Type[BA], src_dict: Dict[str, Any]) -> BA:
d = src_dict.copy()
cmds = d.pop("cmds", UNSET)
file_id = d.pop("file_id", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
C = TypeVar("C", bound="ModelingError")
OR = TypeVar("OR", bound="ModelingError")
@attr.s(auto_attribs=True)
@ -39,7 +39,7 @@ class ModelingError:
return field_dict
@classmethod
def from_dict(cls: Type[C], src_dict: Dict[str, Any]) -> C:
def from_dict(cls: Type[OR], src_dict: Dict[str, Any]) -> OR:
d = src_dict.copy()
error_code = d.pop("error_code", UNSET)

View File

@ -12,7 +12,7 @@ Success = Any
Error = ModelingError
E = TypeVar("E", bound="Cancelled")
CB = TypeVar("CB", bound="Cancelled")
@attr.s(auto_attribs=True)
@ -34,14 +34,14 @@ class Cancelled:
return field_dict
@classmethod
def from_dict(cls: Type[E], src_dict: Dict[str, Any]) -> E:
def from_dict(cls: Type[CB], src_dict: Dict[str, Any]) -> CB:
d = src_dict.copy()
_what_failed = d.pop("what_failed", UNSET)
what_failed: Union[Unset, ModelingCmdId]
if isinstance(_what_failed, Unset):
what_failed = UNSET
else:
what_failed = ModelingCmdId(_what_failed)
what_failed = _what_failed # type: ignore[arg-type]
cancelled = cls(
what_failed=what_failed,

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
M = TypeVar("M", bound="ModelingOutcomes")
LC = TypeVar("LC", bound="ModelingOutcomes")
@attr.s(auto_attribs=True)
@ -27,7 +27,7 @@ class ModelingOutcomes:
return field_dict
@classmethod
def from_dict(cls: Type[M], src_dict: Dict[str, Any]) -> M:
def from_dict(cls: Type[LC], src_dict: Dict[str, Any]) -> LC:
d = src_dict.copy()
outcomes = d.pop("outcomes", UNSET)

View File

@ -5,7 +5,7 @@ import attr
from ..models.country_code import CountryCode
from ..types import UNSET, Unset
S = TypeVar("S", bound="NewAddress")
TO = TypeVar("TO", bound="NewAddress")
@attr.s(auto_attribs=True)
@ -53,7 +53,7 @@ class NewAddress:
return field_dict
@classmethod
def from_dict(cls: Type[S], src_dict: Dict[str, Any]) -> S:
def from_dict(cls: Type[TO], src_dict: Dict[str, Any]) -> TO:
d = src_dict.copy()
city = d.pop("city", UNSET)

Some files were not shown because too many files have changed in this diff Show More