Update api spec (#119)

* YOYO NEW API SPEC!

* updates

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

* fixes

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

* fixes

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

* fixes

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

* updates

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

* fix

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-08-16 16:31:50 -07:00
committed by GitHub
parent 690e7686fd
commit 8ba29a105d
125 changed files with 5322 additions and 1993 deletions

View File

@ -131,7 +131,7 @@ def generatePaths(cwd: str, parser: dict) -> dict:
def generateTypeAndExamplePython(
name: str, schema: dict, data: dict, import_path: Optional[str]
name: str, schema: dict, data: dict, import_path: Optional[str], tag: Optional[str]
) -> Tuple[str, str, str]:
parameter_type = ""
parameter_example = ""
@ -168,8 +168,11 @@ def generateTypeAndExamplePython(
schema["type"] == "string" and "enum" in schema and len(schema["enum"]) > 0
):
if name == "":
logging.error("schema: %s", json.dumps(schema, indent=4))
raise Exception("Unknown type name for enum")
if len(schema["enum"]) == 1:
name = schema["enum"][0]
else:
logging.error("schema: %s", json.dumps(schema, indent=4))
raise Exception("Unknown type name for enum")
parameter_type = name
@ -215,6 +218,9 @@ def generateTypeAndExamplePython(
elif schema["type"] == "integer":
parameter_type = "int"
parameter_example = "10"
elif schema["type"] == "boolean":
parameter_type = "bool"
parameter_example = "False"
elif (
schema["type"] == "number"
and "format" in schema
@ -224,7 +230,7 @@ def generateTypeAndExamplePython(
parameter_example = "3.14"
elif schema["type"] == "array" and "items" in schema:
items_type, items_example, items_imports = generateTypeAndExamplePython(
"", schema["items"], data, None
"", schema["items"], data, None, None
)
example_imports = example_imports + items_imports
parameter_type = "List[" + items_type + "]"
@ -262,12 +268,15 @@ def generateTypeAndExamplePython(
if "nullable" in prop:
# We don't care if it's nullable
continue
elif property_name == tag:
# We don't care if it's the tag, since we already have it.
continue
else:
(
prop_type,
prop_example,
prop_imports,
) = generateTypeAndExamplePython("", prop, data, None)
) = generateTypeAndExamplePython("", prop, data, import_path, tag)
example_imports = example_imports + prop_imports
parameter_example = parameter_example + (
"\n"
@ -284,7 +293,7 @@ def generateTypeAndExamplePython(
and schema["additionalProperties"] is not False
):
items_type, items_example, items_imports = generateTypeAndExamplePython(
"", schema["additionalProperties"], data, None
"", schema["additionalProperties"], data, None, None
)
example_imports = example_imports + items_imports
parameter_type = "Dict[str, " + items_type + "]"
@ -294,40 +303,49 @@ 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"
):
if len(schema["oneOf"]) > 1:
one_of = schema["oneOf"][1]
# Check if each of these only has a object w 1 property.
# Check if this is a nested object.
if isNestedObjectOneOf(schema):
if "properties" in one_of:
properties = one_of["properties"]
for prop in properties:
return generateTypeAndExamplePython(
prop, properties[prop], data, camel_to_snake(name)
prop, properties[prop], data, camel_to_snake(name), None
)
break
elif "type" in one_of and one_of["type"] == "string":
return generateTypeAndExamplePython(
name, one_of, data, camel_to_snake(name)
name, one_of, data, camel_to_snake(name), None
)
return generateTypeAndExamplePython(name, one_of, data, None)
tag = getTagOneOf(schema)
if (
"properties" in one_of
and "type" in one_of["properties"]
and "enum" in one_of["properties"]["type"]
):
return generateTypeAndExamplePython(
one_of["properties"]["type"]["enum"][0],
one_of,
data,
camel_to_snake(name),
tag,
)
else:
return generateTypeAndExamplePython(name, one_of, data, None, None)
elif "allOf" in schema and len(schema["allOf"]) == 1:
return generateTypeAndExamplePython(name, schema["allOf"][0], data, None)
return generateTypeAndExamplePython(name, schema["allOf"][0], data, None, None)
elif "$ref" in schema:
parameter_type = schema["$ref"].replace("#/components/schemas/", "")
# Get the schema for the reference.
ref_schema = data["components"]["schemas"][parameter_type]
return generateTypeAndExamplePython(parameter_type, ref_schema, data, None)
return generateTypeAndExamplePython(
parameter_type, ref_schema, data, None, None
)
else:
logging.error("schema: %s", json.dumps(schema, indent=4))
raise Exception("Unknown parameter type")
@ -396,7 +414,7 @@ from kittycad.types import Response
parameter_type,
parameter_example,
more_example_imports,
) = generateTypeAndExamplePython("", parameter["schema"], data, None)
) = generateTypeAndExamplePython("", parameter["schema"], data, None, None)
example_imports = example_imports + more_example_imports
if "nullable" in parameter["schema"] and parameter["schema"]["nullable"]:
@ -430,7 +448,7 @@ from kittycad.types import Response
body_type,
body_example,
more_example_imports,
) = generateTypeAndExamplePython(request_body_type, rbs, data, None)
) = generateTypeAndExamplePython(request_body_type, rbs, data, None, None)
params_str += "body=" + body_example + ",\n"
example_imports = example_imports + more_example_imports
@ -838,6 +856,7 @@ async def test_"""
.replace("string", "str")
.replace("integer", "int")
.replace("number", "float")
.replace("boolean", "bool")
)
elif "$ref" in parameter["schema"]:
parameter_type = parameter["schema"]["$ref"].replace(
@ -1125,7 +1144,7 @@ def generateOneOfType(path: str, name: str, schema: dict, data: dict):
all_options.append(prop_name)
else:
object_code = generateObjectTypeCode(
prop_name, nested_object, "object", data
prop_name, nested_object, "object", data, None
)
f.write(object_code)
f.write("\n")
@ -1139,36 +1158,16 @@ def generateOneOfType(path: str, name: str, schema: dict, data: dict):
all_options.append(one_of["enum"][0])
# Check if each one_of has the same enum of one.
tag = None
for one_of in schema["oneOf"]:
has_tag = False
# Check if each are an object w 1 property in it.
if one_of["type"] == "object" and "properties" in one_of:
for prop_name in one_of["properties"]:
prop = one_of["properties"][prop_name]
if (
"type" in prop
and prop["type"] == "string"
and "enum" in prop
and len(prop["enum"]) == 1
):
if tag is not None and tag != prop_name:
has_tag = False
break
else:
has_tag = True
tag = prop_name
if has_tag is False:
tag = None
break
tag = getTagOneOf(schema)
if tag is not None:
# Generate each of the options from the tag.
for one_of in schema["oneOf"]:
# Get the value of the tag.
object_name = one_of["properties"][tag]["enum"][0]
object_code = generateObjectTypeCode(object_name, one_of, "object", data)
object_code = generateObjectTypeCode(
object_name, one_of, "object", data, tag
)
f.write(object_code)
f.write("\n")
all_options.append(object_name)
@ -1186,7 +1185,9 @@ def generateOneOfType(path: str, name: str, schema: dict, data: dict):
f.close()
def generateObjectTypeCode(name: str, schema: dict, type_name: str, data: dict) -> str:
def generateObjectTypeCode(
name: str, schema: dict, type_name: str, data: dict, tag: Optional[str]
) -> str:
f = io.StringIO()
has_date_time = hasDateTime(schema)
@ -1219,7 +1220,10 @@ def generateObjectTypeCode(name: str, schema: dict, type_name: str, data: dict)
# Iterate over the properties.
for property_name in schema["properties"]:
property_schema = schema["properties"][property_name]
renderTypeInit(f, property_name, property_schema, data)
if property_name == tag:
f.write("\t" + property_name + ': str = "' + name + '"\n')
else:
renderTypeInit(f, property_name, property_schema, data)
# Finish writing the class.
f.write("\n")
@ -1233,7 +1237,10 @@ def generateObjectTypeCode(name: str, schema: dict, type_name: str, data: dict)
# Iternate over the properties.
for property_name in schema["properties"]:
property_schema = schema["properties"][property_name]
renderTypeToDict(f, property_name, property_schema, data)
if property_name == tag:
renderTypeToDict(f, property_name, property_schema, data)
else:
renderTypeToDict(f, property_name, property_schema, data)
# Finish writing the to_dict method.
f.write("\n")
@ -1243,15 +1250,26 @@ def generateObjectTypeCode(name: str, schema: dict, type_name: str, data: dict)
# Iternate over the properties.
for property_name in schema["properties"]:
# Write the property.
f.write("\t\tif " + clean_parameter_name(property_name) + " is not UNSET:\n")
f.write(
"\t\t\tfield_dict['"
+ property_name
+ "'] = "
+ clean_parameter_name(property_name)
+ "\n"
)
if property_name == tag:
f.write(
"\t\tfield_dict['"
+ property_name
+ "'] = "
+ clean_parameter_name(property_name)
+ "\n"
)
else:
# Write the property.
f.write(
"\t\tif " + clean_parameter_name(property_name) + " is not UNSET:\n"
)
f.write(
"\t\t\tfield_dict['"
+ property_name
+ "'] = "
+ clean_parameter_name(property_name)
+ "\n"
)
f.write("\n")
f.write("\t\treturn field_dict\n")
@ -1328,7 +1346,7 @@ def generateObjectType(path: str, name: str, schema: dict, type_name: str, data:
f = open(path, "w")
code = generateObjectTypeCode(name, schema, type_name, data)
code = generateObjectTypeCode(name, schema, type_name, data, None)
f.write(code)
# Close the file.
@ -2064,12 +2082,8 @@ def isNestedObjectOneOf(schema: dict) -> bool:
is_nested_object = False
for one_of in schema["oneOf"]:
# Check if each are an object w 1 property in it.
if (
one_of["type"] == "object"
and "properties" in one_of
and len(one_of["properties"]) == 1
):
# Check if each are an object with properties.
if one_of["type"] == "object" and "properties" in one_of:
for prop_name in one_of["properties"]:
nested_object = one_of["properties"][prop_name]
if "type" in nested_object and nested_object["type"] == "object":
@ -2088,6 +2102,34 @@ def isNestedObjectOneOf(schema: dict) -> bool:
return is_nested_object
def getTagOneOf(schema: dict) -> Optional[str]:
tag = None
for one_of in schema["oneOf"]:
has_tag = False
# Check if each are an object w 1 property in it.
if one_of["type"] == "object" and "properties" in one_of:
for prop_name in one_of["properties"]:
prop = one_of["properties"][prop_name]
if (
"type" in prop
and prop["type"] == "string"
and "enum" in prop
and len(prop["enum"]) == 1
):
if tag is not None and tag != prop_name:
has_tag = False
break
else:
has_tag = True
tag = prop_name
if has_tag is False:
tag = None
break
return tag
def isEnumWithDocsOneOf(schema: dict) -> bool:
if "oneOf" not in schema:
return False

File diff suppressed because one or more lines are too long

View File

@ -1,114 +0,0 @@
from typing import Any, Dict, Optional, Union
import httpx
from ...client import Client
from ...models.error import Error
from ...models.physics_constant import PhysicsConstant
from ...models.physics_constant_name import PhysicsConstantName
from ...types import Response
def _get_kwargs(
constant: PhysicsConstantName,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/constant/physics/{constant}".format(
client.base_url,
constant=constant,
) # noqa: E501
headers: Dict[str, Any] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
return {
"url": url,
"headers": headers,
"cookies": cookies,
"timeout": client.get_timeout(),
}
def _parse_response(
*, response: httpx.Response
) -> Optional[Union[PhysicsConstant, Error]]:
if response.status_code == 200:
response_200 = PhysicsConstant.from_dict(response.json())
return response_200
if response.status_code == 400:
response_4XX = Error.from_dict(response.json())
return response_4XX
if response.status_code == 500:
response_5XX = Error.from_dict(response.json())
return response_5XX
return Error.from_dict(response.json())
def _build_response(
*, response: httpx.Response
) -> Response[Optional[Union[PhysicsConstant, Error]]]:
return Response(
status_code=response.status_code,
content=response.content,
headers=response.headers,
parsed=_parse_response(response=response),
)
def sync_detailed(
constant: PhysicsConstantName,
*,
client: Client,
) -> Response[Optional[Union[PhysicsConstant, Error]]]:
kwargs = _get_kwargs(
constant=constant,
client=client,
)
response = httpx.get(
verify=client.verify_ssl,
**kwargs,
)
return _build_response(response=response)
def sync(
constant: PhysicsConstantName,
*,
client: Client,
) -> Optional[Union[PhysicsConstant, Error]]:
return sync_detailed(
constant=constant,
client=client,
).parsed
async def asyncio_detailed(
constant: PhysicsConstantName,
*,
client: Client,
) -> Response[Optional[Union[PhysicsConstant, Error]]]:
kwargs = _get_kwargs(
constant=constant,
client=client,
)
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
response = await _client.get(**kwargs)
return _build_response(response=response)
async def asyncio(
constant: PhysicsConstantName,
*,
client: Client,
) -> Optional[Union[PhysicsConstant, Error]]:
return (
await asyncio_detailed(
constant=constant,
client=client,
)
).parsed

View File

@ -101,7 +101,7 @@ def sync(
client: Client,
) -> Optional[Union[FileCenterOfMass, Error]]:
"""We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.
Currently, this endpoint returns the cartesian co-ordinate in world space measure units.
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.
@ -143,7 +143,7 @@ async def asyncio(
client: Client,
) -> Optional[Union[FileCenterOfMass, Error]]:
"""We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.
Currently, this endpoint returns the cartesian co-ordinate in world space measure units.
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.

View File

@ -26,7 +26,7 @@ def sync(
if isinstance(fc, FileConversion) and fc.output != "":
if isinstance(fc.output, str):
b = base64.b64decode(fc.output)
b = base64.b64decode(fc.output + "=" * (-len(fc.output) % 4))
# decode the bytes to a string
fc.output = b.decode("utf-8")
@ -53,7 +53,7 @@ async def asyncio(
if isinstance(fc, FileConversion) and fc.output != "":
if isinstance(fc.output, str):
b = base64.b64decode(fc.output)
b = base64.b64decode(fc.output + "=" * (-len(fc.output) % 4))
# decode the bytes to a string
fc.output = b.decode("utf-8")

View File

@ -120,7 +120,7 @@ def sync(
client: Client,
) -> Optional[Union[FileDensity, Error]]:
"""We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.
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.
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.
@ -170,7 +170,7 @@ async def asyncio(
client: Client,
) -> Optional[Union[FileDensity, Error]]:
"""We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.
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.
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.

View File

@ -120,7 +120,7 @@ def sync(
client: Client,
) -> Optional[Union[FileMass, Error]]:
"""We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.
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.
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.
@ -170,7 +170,7 @@ async def asyncio(
client: Client,
) -> Optional[Union[FileMass, Error]]:
"""We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.
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.
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.

View File

@ -101,7 +101,7 @@ def sync(
client: Client,
) -> Optional[Union[FileSurfaceArea, Error]]:
"""We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.
Currently, this endpoint returns the square measure units.
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.
@ -143,7 +143,7 @@ async def asyncio(
client: Client,
) -> Optional[Union[FileSurfaceArea, Error]]:
"""We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.
Currently, this endpoint returns the square measure units.
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.

View File

@ -99,7 +99,7 @@ def sync(
client: Client,
) -> Optional[Union[FileVolume, Error]]:
"""We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.
Currently, this endpoint returns the cubic measure units.
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.
@ -141,7 +141,7 @@ async def asyncio(
client: Client,
) -> Optional[Union[FileVolume, Error]]:
"""We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.
Currently, this endpoint returns the cubic measure units.
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.

View File

@ -21,7 +21,7 @@ def sync(
if isinstance(fc, FileConversion) and fc.output != "":
if isinstance(fc.output, str):
b = base64.b64decode(fc.output)
b = base64.b64decode(fc.output + "=" * (-len(fc.output) % 4))
# decode the bytes to a string
fc.output = b.decode("utf-8")
@ -42,7 +42,7 @@ async def asyncio(
if isinstance(fc, FileConversion) and fc.output != "":
if isinstance(fc.output, str):
b = base64.b64decode(fc.output)
b = base64.b64decode(fc.output + "=" * (-len(fc.output) % 4))
# decode the bytes to a string
fc.output = b.decode("utf-8")

View File

@ -8,11 +8,39 @@ from ...models.error import Error
def _get_kwargs(
fps: int,
unlocked_framerate: bool,
video_res_height: int,
video_res_width: int,
*,
client: Client,
) -> Dict[str, Any]:
url = "{}/ws/modeling/commands".format(client.base_url) # noqa: E501
if fps is not None:
if "?" in url:
url = url + "&fps=" + str(fps)
else:
url = url + "?fps=" + str(fps)
if unlocked_framerate is not None:
if "?" in url:
url = url + "&unlocked_framerate=" + str(unlocked_framerate)
else:
url = url + "?unlocked_framerate=" + str(unlocked_framerate)
if video_res_height is not None:
if "?" in url:
url = url + "&video_res_height=" + str(video_res_height)
else:
url = url + "?video_res_height=" + str(video_res_height)
if video_res_width is not None:
if "?" in url:
url = url + "&video_res_width=" + str(video_res_width)
else:
url = url + "?video_res_width=" + str(video_res_width)
headers: Dict[str, Any] = client.get_headers()
cookies: Dict[str, Any] = client.get_cookies()
@ -25,12 +53,20 @@ def _get_kwargs(
def sync(
fps: int,
unlocked_framerate: bool,
video_res_height: int,
video_res_width: int,
*,
client: Client,
) -> ClientConnection:
"""Pass those commands to the engine via websocket, and pass responses back to the client. Basically, this is a websocket proxy between the frontend/client and the engine.""" # noqa: E501
kwargs = _get_kwargs(
fps=fps,
unlocked_framerate=unlocked_framerate,
video_res_height=video_res_height,
video_res_width=video_res_width,
client=client,
)
@ -45,12 +81,20 @@ def sync(
async def asyncio(
fps: int,
unlocked_framerate: bool,
video_res_height: int,
video_res_width: int,
*,
client: Client,
) -> WebSocketClientProtocol:
"""Pass those commands to the engine via websocket, and pass responses back to the client. Basically, this is a websocket proxy between the frontend/client and the engine.""" # noqa: E501
kwargs = _get_kwargs(
fps=fps,
unlocked_framerate=unlocked_framerate,
video_res_height=video_res_height,
video_res_width=video_res_width,
client=client,
)

View File

@ -24,7 +24,6 @@ from kittycad.api.apps import (
apps_github_consent,
apps_github_webhook,
)
from kittycad.api.constant import get_physics_constant
from kittycad.api.executor import create_executor_term, create_file_execution
from kittycad.api.file import (
create_file_center_of_mass,
@ -113,7 +112,6 @@ from kittycad.models import (
Onboarding,
PaymentIntent,
PaymentMethod,
PhysicsConstant,
Pong,
Session,
UnitAngleConversion,
@ -142,11 +140,10 @@ 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 MovePathPen
from kittycad.models.modeling_cmd import move_path_pen
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
@ -292,7 +289,7 @@ def test_create_image_to_3d():
result: Optional[Union[Mesh, Error]] = create_image_to_3d.sync(
client=client,
input_format=ImageType.PNG,
output_format=FileExportFormat.DAE,
output_format=FileExportFormat.GLTF,
body=bytes("some bytes", "utf-8"),
)
@ -307,7 +304,7 @@ def test_create_image_to_3d():
response: Response[Optional[Union[Mesh, Error]]] = create_image_to_3d.sync_detailed(
client=client,
input_format=ImageType.PNG,
output_format=FileExportFormat.DAE,
output_format=FileExportFormat.GLTF,
body=bytes("some bytes", "utf-8"),
)
@ -322,7 +319,7 @@ async def test_create_image_to_3d_async():
result: Optional[Union[Mesh, Error]] = await create_image_to_3d.asyncio(
client=client,
input_format=ImageType.PNG,
output_format=FileExportFormat.DAE,
output_format=FileExportFormat.GLTF,
body=bytes("some bytes", "utf-8"),
)
@ -332,7 +329,7 @@ async def test_create_image_to_3d_async():
] = await create_image_to_3d.asyncio_detailed(
client=client,
input_format=ImageType.PNG,
output_format=FileExportFormat.DAE,
output_format=FileExportFormat.GLTF,
body=bytes("some bytes", "utf-8"),
)
@ -344,7 +341,7 @@ def test_create_text_to_3d():
result: Optional[Union[Mesh, Error]] = create_text_to_3d.sync(
client=client,
output_format=FileExportFormat.DAE,
output_format=FileExportFormat.GLTF,
prompt="<string>",
)
@ -358,7 +355,7 @@ def test_create_text_to_3d():
# OR if you need more info (e.g. status_code)
response: Response[Optional[Union[Mesh, Error]]] = create_text_to_3d.sync_detailed(
client=client,
output_format=FileExportFormat.DAE,
output_format=FileExportFormat.GLTF,
prompt="<string>",
)
@ -372,7 +369,7 @@ async def test_create_text_to_3d_async():
result: Optional[Union[Mesh, Error]] = await create_text_to_3d.asyncio(
client=client,
output_format=FileExportFormat.DAE,
output_format=FileExportFormat.GLTF,
prompt="<string>",
)
@ -381,7 +378,7 @@ async def test_create_text_to_3d_async():
Optional[Union[Mesh, Error]]
] = await create_text_to_3d.asyncio_detailed(
client=client,
output_format=FileExportFormat.DAE,
output_format=FileExportFormat.GLTF,
prompt="<string>",
)
@ -927,55 +924,6 @@ async def test_auth_email_callback_async():
)
@pytest.mark.skip
def test_get_physics_constant():
# Create our client.
client = ClientFromEnv()
result: Optional[Union[PhysicsConstant, Error]] = get_physics_constant.sync(
client=client,
constant=PhysicsConstantName.PI,
)
if isinstance(result, Error) or result is None:
print(result)
raise Exception("Error in response")
body: PhysicsConstant = result
print(body)
# OR if you need more info (e.g. status_code)
response: Response[
Optional[Union[PhysicsConstant, Error]]
] = get_physics_constant.sync_detailed(
client=client,
constant=PhysicsConstantName.PI,
)
# OR run async
@pytest.mark.asyncio
@pytest.mark.skip
async def test_get_physics_constant_async():
# Create our client.
client = ClientFromEnv()
result: Optional[
Union[PhysicsConstant, Error]
] = await get_physics_constant.asyncio(
client=client,
constant=PhysicsConstantName.PI,
)
# OR run async with more info
response: Response[
Optional[Union[PhysicsConstant, Error]]
] = await get_physics_constant.asyncio_detailed(
client=client,
constant=PhysicsConstantName.PI,
)
@pytest.mark.skip
def test_create_file_center_of_mass():
# Create our client.
@ -984,7 +932,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,
src_format=FileImportFormat.GLTF,
body=bytes("some bytes", "utf-8"),
)
@ -1001,7 +949,7 @@ def test_create_file_center_of_mass():
] = create_file_center_of_mass.sync_detailed(
client=client,
output_unit=UnitLength.CM,
src_format=FileImportFormat.DAE,
src_format=FileImportFormat.GLTF,
body=bytes("some bytes", "utf-8"),
)
@ -1018,7 +966,7 @@ async def test_create_file_center_of_mass_async():
] = await create_file_center_of_mass.asyncio(
client=client,
output_unit=UnitLength.CM,
src_format=FileImportFormat.DAE,
src_format=FileImportFormat.GLTF,
body=bytes("some bytes", "utf-8"),
)
@ -1028,7 +976,7 @@ async def test_create_file_center_of_mass_async():
] = await create_file_center_of_mass.asyncio_detailed(
client=client,
output_unit=UnitLength.CM,
src_format=FileImportFormat.DAE,
src_format=FileImportFormat.GLTF,
body=bytes("some bytes", "utf-8"),
)
@ -1042,8 +990,8 @@ def test_create_file_conversion_with_base64_helper():
Union[FileConversion, Error]
] = create_file_conversion_with_base64_helper.sync(
client=client,
output_format=FileExportFormat.DAE,
src_format=FileImportFormat.DAE,
output_format=FileExportFormat.GLTF,
src_format=FileImportFormat.GLTF,
body=bytes("some bytes", "utf-8"),
)
@ -1059,8 +1007,8 @@ def test_create_file_conversion_with_base64_helper():
Optional[Union[FileConversion, Error]]
] = create_file_conversion.sync_detailed(
client=client,
output_format=FileExportFormat.DAE,
src_format=FileImportFormat.DAE,
output_format=FileExportFormat.GLTF,
src_format=FileImportFormat.GLTF,
body=bytes("some bytes", "utf-8"),
)
@ -1076,8 +1024,8 @@ async def test_create_file_conversion_with_base64_helper_async():
Union[FileConversion, Error]
] = await create_file_conversion_with_base64_helper.asyncio(
client=client,
output_format=FileExportFormat.DAE,
src_format=FileImportFormat.DAE,
output_format=FileExportFormat.GLTF,
src_format=FileImportFormat.GLTF,
body=bytes("some bytes", "utf-8"),
)
@ -1086,8 +1034,8 @@ async def test_create_file_conversion_with_base64_helper_async():
Optional[Union[FileConversion, Error]]
] = await create_file_conversion.asyncio_detailed(
client=client,
output_format=FileExportFormat.DAE,
src_format=FileImportFormat.DAE,
output_format=FileExportFormat.GLTF,
src_format=FileImportFormat.GLTF,
body=bytes("some bytes", "utf-8"),
)
@ -1102,7 +1050,7 @@ def test_create_file_density():
material_mass=3.14,
material_mass_unit=UnitMass.G,
output_unit=UnitDensity.LB_FT3,
src_format=FileImportFormat.DAE,
src_format=FileImportFormat.GLTF,
body=bytes("some bytes", "utf-8"),
)
@ -1121,7 +1069,7 @@ def test_create_file_density():
material_mass=3.14,
material_mass_unit=UnitMass.G,
output_unit=UnitDensity.LB_FT3,
src_format=FileImportFormat.DAE,
src_format=FileImportFormat.GLTF,
body=bytes("some bytes", "utf-8"),
)
@ -1138,7 +1086,7 @@ async def test_create_file_density_async():
material_mass=3.14,
material_mass_unit=UnitMass.G,
output_unit=UnitDensity.LB_FT3,
src_format=FileImportFormat.DAE,
src_format=FileImportFormat.GLTF,
body=bytes("some bytes", "utf-8"),
)
@ -1150,7 +1098,7 @@ async def test_create_file_density_async():
material_mass=3.14,
material_mass_unit=UnitMass.G,
output_unit=UnitDensity.LB_FT3,
src_format=FileImportFormat.DAE,
src_format=FileImportFormat.GLTF,
body=bytes("some bytes", "utf-8"),
)
@ -1220,7 +1168,7 @@ def test_create_file_mass():
material_density=3.14,
material_density_unit=UnitDensity.LB_FT3,
output_unit=UnitMass.G,
src_format=FileImportFormat.DAE,
src_format=FileImportFormat.GLTF,
body=bytes("some bytes", "utf-8"),
)
@ -1239,7 +1187,7 @@ def test_create_file_mass():
material_density=3.14,
material_density_unit=UnitDensity.LB_FT3,
output_unit=UnitMass.G,
src_format=FileImportFormat.DAE,
src_format=FileImportFormat.GLTF,
body=bytes("some bytes", "utf-8"),
)
@ -1256,7 +1204,7 @@ async def test_create_file_mass_async():
material_density=3.14,
material_density_unit=UnitDensity.LB_FT3,
output_unit=UnitMass.G,
src_format=FileImportFormat.DAE,
src_format=FileImportFormat.GLTF,
body=bytes("some bytes", "utf-8"),
)
@ -1268,7 +1216,7 @@ async def test_create_file_mass_async():
material_density=3.14,
material_density_unit=UnitDensity.LB_FT3,
output_unit=UnitMass.G,
src_format=FileImportFormat.DAE,
src_format=FileImportFormat.GLTF,
body=bytes("some bytes", "utf-8"),
)
@ -1281,7 +1229,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,
src_format=FileImportFormat.GLTF,
body=bytes("some bytes", "utf-8"),
)
@ -1298,7 +1246,7 @@ def test_create_file_surface_area():
] = create_file_surface_area.sync_detailed(
client=client,
output_unit=UnitArea.CM2,
src_format=FileImportFormat.DAE,
src_format=FileImportFormat.GLTF,
body=bytes("some bytes", "utf-8"),
)
@ -1315,7 +1263,7 @@ async def test_create_file_surface_area_async():
] = await create_file_surface_area.asyncio(
client=client,
output_unit=UnitArea.CM2,
src_format=FileImportFormat.DAE,
src_format=FileImportFormat.GLTF,
body=bytes("some bytes", "utf-8"),
)
@ -1325,7 +1273,7 @@ async def test_create_file_surface_area_async():
] = await create_file_surface_area.asyncio_detailed(
client=client,
output_unit=UnitArea.CM2,
src_format=FileImportFormat.DAE,
src_format=FileImportFormat.GLTF,
body=bytes("some bytes", "utf-8"),
)
@ -1338,7 +1286,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,
src_format=FileImportFormat.GLTF,
body=bytes("some bytes", "utf-8"),
)
@ -1355,7 +1303,7 @@ def test_create_file_volume():
] = create_file_volume.sync_detailed(
client=client,
output_unit=UnitVolume.CM3,
src_format=FileImportFormat.DAE,
src_format=FileImportFormat.GLTF,
body=bytes("some bytes", "utf-8"),
)
@ -1370,7 +1318,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,
src_format=FileImportFormat.GLTF,
body=bytes("some bytes", "utf-8"),
)
@ -1380,7 +1328,7 @@ async def test_create_file_volume_async():
] = await create_file_volume.asyncio_detailed(
client=client,
output_unit=UnitVolume.CM3,
src_format=FileImportFormat.DAE,
src_format=FileImportFormat.GLTF,
body=bytes("some bytes", "utf-8"),
)
@ -1432,7 +1380,7 @@ def test_cmd():
cmd.sync(
client=client,
body=ModelingCmdReq(
cmd=MovePathPen(
cmd=move_path_pen(
path=ModelingCmdId("<uuid>"),
to=Point3d(
x=3.14,
@ -1441,7 +1389,6 @@ def test_cmd():
),
),
cmd_id=ModelingCmdId("<uuid>"),
file_id="<string>",
),
)
@ -1449,7 +1396,7 @@ def test_cmd():
cmd.sync_detailed(
client=client,
body=ModelingCmdReq(
cmd=MovePathPen(
cmd=move_path_pen(
path=ModelingCmdId("<uuid>"),
to=Point3d(
x=3.14,
@ -1458,7 +1405,6 @@ def test_cmd():
),
),
cmd_id=ModelingCmdId("<uuid>"),
file_id="<string>",
),
)
@ -1473,7 +1419,7 @@ async def test_cmd_async():
await cmd.asyncio(
client=client,
body=ModelingCmdReq(
cmd=MovePathPen(
cmd=move_path_pen(
path=ModelingCmdId("<uuid>"),
to=Point3d(
x=3.14,
@ -1482,7 +1428,6 @@ async def test_cmd_async():
),
),
cmd_id=ModelingCmdId("<uuid>"),
file_id="<string>",
),
)
@ -1490,7 +1435,7 @@ async def test_cmd_async():
await cmd.asyncio_detailed(
client=client,
body=ModelingCmdReq(
cmd=MovePathPen(
cmd=move_path_pen(
path=ModelingCmdId("<uuid>"),
to=Point3d(
x=3.14,
@ -1499,7 +1444,6 @@ async def test_cmd_async():
),
),
cmd_id=ModelingCmdId("<uuid>"),
file_id="<string>",
),
)
@ -1514,7 +1458,7 @@ def test_cmd_batch():
body=ModelingCmdReqBatch(
cmds={
"<string>": ModelingCmdReq(
cmd=MovePathPen(
cmd=move_path_pen(
path=ModelingCmdId("<uuid>"),
to=Point3d(
x=3.14,
@ -1523,10 +1467,8 @@ def test_cmd_batch():
),
),
cmd_id=ModelingCmdId("<uuid>"),
file_id="<string>",
)
},
file_id="<string>",
),
)
@ -1545,7 +1487,7 @@ def test_cmd_batch():
body=ModelingCmdReqBatch(
cmds={
"<string>": ModelingCmdReq(
cmd=MovePathPen(
cmd=move_path_pen(
path=ModelingCmdId("<uuid>"),
to=Point3d(
x=3.14,
@ -1554,10 +1496,8 @@ def test_cmd_batch():
),
),
cmd_id=ModelingCmdId("<uuid>"),
file_id="<string>",
)
},
file_id="<string>",
),
)
@ -1574,7 +1514,7 @@ async def test_cmd_batch_async():
body=ModelingCmdReqBatch(
cmds={
"<string>": ModelingCmdReq(
cmd=MovePathPen(
cmd=move_path_pen(
path=ModelingCmdId("<uuid>"),
to=Point3d(
x=3.14,
@ -1583,10 +1523,8 @@ async def test_cmd_batch_async():
),
),
cmd_id=ModelingCmdId("<uuid>"),
file_id="<string>",
)
},
file_id="<string>",
),
)
@ -1598,7 +1536,7 @@ async def test_cmd_batch_async():
body=ModelingCmdReqBatch(
cmds={
"<string>": ModelingCmdReq(
cmd=MovePathPen(
cmd=move_path_pen(
path=ModelingCmdId("<uuid>"),
to=Point3d(
x=3.14,
@ -1607,10 +1545,8 @@ async def test_cmd_batch_async():
),
),
cmd_id=ModelingCmdId("<uuid>"),
file_id="<string>",
)
},
file_id="<string>",
),
)
@ -3858,6 +3794,10 @@ def test_modeling_commands_ws():
# Connect to the websocket.
websocket = modeling_commands_ws.sync(
client=client,
fps=10,
unlocked_framerate=False,
video_res_height=10,
video_res_width=10,
)
# Send a message.
@ -3878,6 +3818,10 @@ async def test_modeling_commands_ws_async():
# Connect to the websocket.
websocket = await modeling_commands_ws.asyncio(
client=client,
fps=10,
unlocked_framerate=False,
video_res_height=10,
video_res_width=10,
)
# Send a message.

View File

@ -7,6 +7,13 @@ from .ai_plugin_auth import AiPluginAuth
from .ai_plugin_auth_type import AiPluginAuthType
from .ai_plugin_http_auth_type import AiPluginHttpAuthType
from .ai_plugin_manifest import AiPluginManifest
from .annotation_line_end import AnnotationLineEnd
from .annotation_line_end_options import AnnotationLineEndOptions
from .annotation_options import AnnotationOptions
from .annotation_text_alignment_x import AnnotationTextAlignmentX
from .annotation_text_alignment_y import AnnotationTextAlignmentY
from .annotation_text_options import AnnotationTextOptions
from .annotation_type import AnnotationType
from .api_call_query_group import ApiCallQueryGroup
from .api_call_query_group_by import ApiCallQueryGroupBy
from .api_call_status import ApiCallStatus
@ -28,6 +35,7 @@ from .card_details import CardDetails
from .cluster import Cluster
from .code_language import CodeLanguage
from .code_output import CodeOutput
from .color import Color
from .commit import Commit
from .connection import Connection
from .country_code import CountryCode
@ -44,12 +52,13 @@ from .discount import Discount
from .docker_system_info import DockerSystemInfo
from .email_authentication_form import EmailAuthenticationForm
from .engine_metadata import EngineMetadata
from .entity_type import EntityType
from .environment import Environment
from .error import Error
from .executor_metadata import ExecutorMetadata
from .export_file import ExportFile
from .extended_user import ExtendedUser
from .extended_user_results_page import ExtendedUserResultsPage
from .extrude import Extrude
from .file_center_of_mass import FileCenterOfMass
from .file_conversion import FileConversion
from .file_density import FileDensity
@ -85,6 +94,7 @@ from .modeling_outcomes import ModelingOutcomes
from .new_address import NewAddress
from .o_auth2_client_info import OAuth2ClientInfo
from .o_auth2_grant_type import OAuth2GrantType
from .ok_modeling_cmd_response import OkModelingCmdResponse
from .onboarding import Onboarding
from .output_file import OutputFile
from .output_format import OutputFormat
@ -93,8 +103,6 @@ from .payment_intent import PaymentIntent
from .payment_method import PaymentMethod
from .payment_method_card_checks import PaymentMethodCardChecks
from .payment_method_type import PaymentMethodType
from .physics_constant import PhysicsConstant
from .physics_constant_name import PhysicsConstantName
from .plugins_info import PluginsInfo
from .point2d import Point2d
from .point3d import Point3d
@ -102,6 +110,7 @@ from .point_e_metadata import PointEMetadata
from .pong import Pong
from .registry_service_config import RegistryServiceConfig
from .runtime import Runtime
from .scene_selection_type import SceneSelectionType
from .session import Session
from .storage import Storage
from .system import System

View File

@ -0,0 +1,11 @@
from enum import Enum
class AnnotationLineEnd(str, Enum):
"""Annotation line end type""" # noqa: E501
NONE = "none"
ARROW = "arrow"
def __str__(self) -> str:
return str(self.value)

View File

@ -0,0 +1,75 @@
from typing import Any, Dict, List, Type, TypeVar, Union
import attr
from ..models.annotation_line_end import AnnotationLineEnd
from ..types import UNSET, Unset
GO = TypeVar("GO", bound="AnnotationLineEndOptions")
@attr.s(auto_attribs=True)
class AnnotationLineEndOptions:
"""Options for annotation text""" # noqa: E501
end: Union[Unset, AnnotationLineEnd] = UNSET
start: Union[Unset, AnnotationLineEnd] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
if not isinstance(self.end, Unset):
end = self.end
if not isinstance(self.start, Unset):
start = self.start
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if end is not UNSET:
field_dict["end"] = end
if start is not UNSET:
field_dict["start"] = start
return field_dict
@classmethod
def from_dict(cls: Type[GO], src_dict: Dict[str, Any]) -> GO:
d = src_dict.copy()
_end = d.pop("end", UNSET)
end: Union[Unset, AnnotationLineEnd]
if isinstance(_end, Unset):
end = UNSET
else:
end = _end # type: ignore[arg-type]
_start = d.pop("start", UNSET)
start: Union[Unset, AnnotationLineEnd]
if isinstance(_start, Unset):
start = UNSET
else:
start = _start # type: ignore[arg-type]
annotation_line_end_options = cls(
end=end,
start=start,
)
annotation_line_end_options.additional_properties = d
return annotation_line_end_options
@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

View File

@ -0,0 +1,111 @@
from typing import Any, Dict, List, Type, TypeVar, Union
import attr
from ..models.annotation_line_end_options import AnnotationLineEndOptions
from ..models.annotation_text_options import AnnotationTextOptions
from ..models.color import Color
from ..models.point3d import Point3d
from ..types import UNSET, Unset
PI = TypeVar("PI", bound="AnnotationOptions")
@attr.s(auto_attribs=True)
class AnnotationOptions:
"""Options for annotations""" # noqa: E501
color: Union[Unset, Color] = UNSET
line_ends: Union[Unset, AnnotationLineEndOptions] = UNSET
line_width: Union[Unset, float] = UNSET
position: Union[Unset, Point3d] = UNSET
text: Union[Unset, AnnotationTextOptions] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
if not isinstance(self.color, Unset):
color = self.color
if not isinstance(self.line_ends, Unset):
line_ends = self.line_ends
line_width = self.line_width
if not isinstance(self.position, Unset):
position = self.position
if not isinstance(self.text, Unset):
text = self.text
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if color is not UNSET:
field_dict["color"] = color
if line_ends is not UNSET:
field_dict["line_ends"] = line_ends
if line_width is not UNSET:
field_dict["line_width"] = line_width
if position is not UNSET:
field_dict["position"] = position
if text is not UNSET:
field_dict["text"] = text
return field_dict
@classmethod
def from_dict(cls: Type[PI], src_dict: Dict[str, Any]) -> PI:
d = src_dict.copy()
_color = d.pop("color", UNSET)
color: Union[Unset, Color]
if isinstance(_color, Unset):
color = UNSET
else:
color = _color # type: ignore[arg-type]
_line_ends = d.pop("line_ends", UNSET)
line_ends: Union[Unset, AnnotationLineEndOptions]
if isinstance(_line_ends, Unset):
line_ends = UNSET
else:
line_ends = _line_ends # type: ignore[arg-type]
line_width = d.pop("line_width", UNSET)
_position = d.pop("position", UNSET)
position: Union[Unset, Point3d]
if isinstance(_position, Unset):
position = UNSET
else:
position = _position # type: ignore[arg-type]
_text = d.pop("text", UNSET)
text: Union[Unset, AnnotationTextOptions]
if isinstance(_text, Unset):
text = UNSET
else:
text = _text # type: ignore[arg-type]
annotation_options = cls(
color=color,
line_ends=line_ends,
line_width=line_width,
position=position,
text=text,
)
annotation_options.additional_properties = d
return annotation_options
@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

View File

@ -0,0 +1,12 @@
from enum import Enum
class AnnotationTextAlignmentX(str, Enum):
"""Horizontal Text aligment""" # noqa: E501
LEFT = "left"
CENTER = "center"
RIGHT = "right"
def __str__(self) -> str:
return str(self.value)

View File

@ -0,0 +1,12 @@
from enum import Enum
class AnnotationTextAlignmentY(str, Enum):
"""Vertical Text aligment""" # noqa: E501
BOTTOM = "bottom"
CENTER = "center"
TOP = "top"
def __str__(self) -> str:
return str(self.value)

View File

@ -0,0 +1,90 @@
from typing import Any, Dict, List, Type, TypeVar, Union
import attr
from ..models.annotation_text_alignment_x import AnnotationTextAlignmentX
from ..models.annotation_text_alignment_y import AnnotationTextAlignmentY
from ..types import UNSET, Unset
UZ = TypeVar("UZ", bound="AnnotationTextOptions")
@attr.s(auto_attribs=True)
class AnnotationTextOptions:
"""Options for annotation text""" # noqa: E501
point_size: Union[Unset, int] = UNSET
text: Union[Unset, str] = UNSET
x: Union[Unset, AnnotationTextAlignmentX] = UNSET
y: Union[Unset, AnnotationTextAlignmentY] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
point_size = self.point_size
text = self.text
if not isinstance(self.x, Unset):
x = self.x
if not isinstance(self.y, Unset):
y = self.y
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if point_size is not UNSET:
field_dict["point_size"] = point_size
if text is not UNSET:
field_dict["text"] = text
if x is not UNSET:
field_dict["x"] = x
if y is not UNSET:
field_dict["y"] = y
return field_dict
@classmethod
def from_dict(cls: Type[UZ], src_dict: Dict[str, Any]) -> UZ:
d = src_dict.copy()
point_size = d.pop("point_size", UNSET)
text = d.pop("text", UNSET)
_x = d.pop("x", UNSET)
x: Union[Unset, AnnotationTextAlignmentX]
if isinstance(_x, Unset):
x = UNSET
else:
x = _x # type: ignore[arg-type]
_y = d.pop("y", UNSET)
y: Union[Unset, AnnotationTextAlignmentY]
if isinstance(_y, Unset):
y = UNSET
else:
y = _y # type: ignore[arg-type]
annotation_text_options = cls(
point_size=point_size,
text=text,
x=x,
y=y,
)
annotation_text_options.additional_properties = d
return annotation_text_options
@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

View File

@ -0,0 +1,13 @@
from enum import Enum
class AnnotationType(str, Enum):
"""The type of annotation""" # noqa: E501
"""# 2D annotation type (screen or planar space) """ # noqa: E501
T2D = "t2d"
"""# 3D annotation type """ # noqa: E501
T3D = "t3d"
def __str__(self) -> str:
return str(self.value)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
GO = TypeVar("GO", bound="ApiCallQueryGroup")
FB = TypeVar("FB", bound="ApiCallQueryGroup")
@attr.s(auto_attribs=True)
@ -31,7 +31,7 @@ class ApiCallQueryGroup:
return field_dict
@classmethod
def from_dict(cls: Type[GO], src_dict: Dict[str, Any]) -> GO:
def from_dict(cls: Type[FB], src_dict: Dict[str, Any]) -> FB:
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
PI = TypeVar("PI", bound="ApiCallWithPrice")
QP = TypeVar("QP", bound="ApiCallWithPrice")
@attr.s(auto_attribs=True)
@ -126,7 +126,7 @@ class ApiCallWithPrice:
return field_dict
@classmethod
def from_dict(cls: Type[PI], src_dict: Dict[str, Any]) -> PI:
def from_dict(cls: Type[QP], src_dict: Dict[str, Any]) -> QP:
d = src_dict.copy()
_completed_at = d.pop("completed_at", UNSET)
completed_at: Union[Unset, datetime.datetime]

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
UZ = TypeVar("UZ", bound="ApiCallWithPriceResultsPage")
KC = TypeVar("KC", bound="ApiCallWithPriceResultsPage")
@attr.s(auto_attribs=True)
@ -37,7 +37,7 @@ class ApiCallWithPriceResultsPage:
return field_dict
@classmethod
def from_dict(cls: Type[UZ], src_dict: Dict[str, Any]) -> UZ:
def from_dict(cls: Type[KC], src_dict: Dict[str, Any]) -> KC:
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
FB = TypeVar("FB", bound="ApiToken")
HX = TypeVar("HX", bound="ApiToken")
@attr.s(auto_attribs=True)
@ -56,7 +56,7 @@ class ApiToken:
return field_dict
@classmethod
def from_dict(cls: Type[FB], src_dict: Dict[str, Any]) -> FB:
def from_dict(cls: Type[HX], src_dict: Dict[str, Any]) -> HX:
d = src_dict.copy()
_created_at = d.pop("created_at", UNSET)
created_at: Union[Unset, datetime.datetime]

View File

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

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
KC = TypeVar("KC", bound="AppClientInfo")
NE = TypeVar("NE", bound="AppClientInfo")
@attr.s(auto_attribs=True)
@ -27,7 +27,7 @@ class AppClientInfo:
return field_dict
@classmethod
def from_dict(cls: Type[KC], src_dict: Dict[str, Any]) -> KC:
def from_dict(cls: Type[NE], src_dict: Dict[str, Any]) -> NE:
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
HX = TypeVar("HX", bound="AsyncApiCall")
TL = TypeVar("TL", bound="AsyncApiCall")
@attr.s(auto_attribs=True)
@ -86,7 +86,7 @@ class AsyncApiCall:
return field_dict
@classmethod
def from_dict(cls: Type[HX], src_dict: Dict[str, Any]) -> HX:
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]

View File

@ -18,7 +18,7 @@ from ..models.unit_volume import UnitVolume
from ..models.uuid import Uuid
from ..types import UNSET, Unset
LB = TypeVar("LB", bound="FileConversion")
MN = TypeVar("MN", bound="FileConversion")
@attr.s(auto_attribs=True)
@ -37,7 +37,7 @@ class FileConversion:
src_format_options: Union[Unset, InputFormat] = UNSET
started_at: Union[Unset, datetime.datetime] = UNSET
status: Union[Unset, ApiCallStatus] = UNSET
type: Union[Unset, str] = UNSET
type: str = "FileConversion"
updated_at: Union[Unset, datetime.datetime] = UNSET
user_id: Union[Unset, str] = UNSET
@ -100,8 +100,7 @@ class FileConversion:
field_dict["started_at"] = started_at
if status is not UNSET:
field_dict["status"] = status
if type is not UNSET:
field_dict["type"] = type
field_dict["type"] = type
if updated_at is not UNSET:
field_dict["updated_at"] = updated_at
if user_id is not UNSET:
@ -110,7 +109,7 @@ class FileConversion:
return field_dict
@classmethod
def from_dict(cls: Type[LB], src_dict: Dict[str, Any]) -> LB:
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]
@ -229,7 +228,7 @@ class FileConversion:
return key in self.additional_properties
NE = TypeVar("NE", bound="FileCenterOfMass")
JV = TypeVar("JV", bound="FileCenterOfMass")
@attr.s(auto_attribs=True)
@ -237,7 +236,6 @@ class FileCenterOfMass:
"""File center of mass.""" # noqa: E501
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
@ -246,7 +244,7 @@ class FileCenterOfMass:
src_format: Union[Unset, FileImportFormat] = UNSET
started_at: Union[Unset, datetime.datetime] = UNSET
status: Union[Unset, ApiCallStatus] = UNSET
type: Union[Unset, str] = UNSET
type: str = "FileCenterOfMass"
updated_at: Union[Unset, datetime.datetime] = UNSET
user_id: Union[Unset, str] = UNSET
@ -255,7 +253,6 @@ class FileCenterOfMass:
def to_dict(self) -> Dict[str, Any]:
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()
@ -284,8 +281,6 @@ 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:
@ -302,8 +297,7 @@ class FileCenterOfMass:
field_dict["started_at"] = started_at
if status is not UNSET:
field_dict["status"] = status
if type is not UNSET:
field_dict["type"] = type
field_dict["type"] = type
if updated_at is not UNSET:
field_dict["updated_at"] = updated_at
if user_id is not UNSET:
@ -312,7 +306,7 @@ class FileCenterOfMass:
return field_dict
@classmethod
def from_dict(cls: Type[NE], src_dict: Dict[str, Any]) -> NE:
def from_dict(cls: Type[JV], src_dict: Dict[str, Any]) -> JV:
d = src_dict.copy()
_center_of_mass = d.pop("center_of_mass", UNSET)
center_of_mass: Union[Unset, Point3d]
@ -321,7 +315,6 @@ class FileCenterOfMass:
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):
@ -386,7 +379,6 @@ 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,
@ -420,7 +412,7 @@ class FileCenterOfMass:
return key in self.additional_properties
TL = TypeVar("TL", bound="FileMass")
IO = TypeVar("IO", bound="FileMass")
@attr.s(auto_attribs=True)
@ -432,14 +424,13 @@ 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
type: Union[Unset, str] = UNSET
type: str = "FileMass"
updated_at: Union[Unset, datetime.datetime] = UNSET
user_id: Union[Unset, str] = UNSET
@ -455,7 +446,6 @@ 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
@ -487,8 +477,6 @@ 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:
@ -501,8 +489,7 @@ class FileMass:
field_dict["started_at"] = started_at
if status is not UNSET:
field_dict["status"] = status
if type is not UNSET:
field_dict["type"] = type
field_dict["type"] = type
if updated_at is not UNSET:
field_dict["updated_at"] = updated_at
if user_id is not UNSET:
@ -511,7 +498,7 @@ class FileMass:
return field_dict
@classmethod
def from_dict(cls: Type[TL], src_dict: Dict[str, Any]) -> TL:
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]
@ -538,7 +525,6 @@ class FileMass:
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)
@ -593,7 +579,6 @@ class FileMass:
error=error,
id=id,
mass=mass,
masses=masses,
material_density=material_density,
material_density_unit=material_density_unit,
output_unit=output_unit,
@ -625,7 +610,7 @@ class FileMass:
return key in self.additional_properties
MN = TypeVar("MN", bound="FileVolume")
FV = TypeVar("FV", bound="FileVolume")
@attr.s(auto_attribs=True)
@ -640,11 +625,10 @@ class FileVolume:
src_format: Union[Unset, FileImportFormat] = UNSET
started_at: Union[Unset, datetime.datetime] = UNSET
status: Union[Unset, ApiCallStatus] = UNSET
type: Union[Unset, str] = UNSET
type: str = "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)
@ -672,7 +656,6 @@ 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)
@ -693,21 +676,18 @@ class FileVolume:
field_dict["started_at"] = started_at
if status is not UNSET:
field_dict["status"] = status
if type is not UNSET:
field_dict["type"] = type
field_dict["type"] = type
if updated_at is not UNSET:
field_dict["updated_at"] = updated_at
if user_id is not UNSET:
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[MN], src_dict: Dict[str, Any]) -> MN:
def from_dict(cls: Type[FV], src_dict: Dict[str, Any]) -> FV:
d = src_dict.copy()
_completed_at = d.pop("completed_at", UNSET)
completed_at: Union[Unset, datetime.datetime]
@ -773,8 +753,6 @@ class FileVolume:
volume = d.pop("volume", UNSET)
volumes = d.pop("volumes", UNSET)
file_volume = cls(
completed_at=completed_at,
created_at=created_at,
@ -788,7 +766,6 @@ class FileVolume:
updated_at=updated_at,
user_id=user_id,
volume=volume,
volumes=volumes,
)
file_volume.additional_properties = d
@ -811,7 +788,7 @@ class FileVolume:
return key in self.additional_properties
JV = TypeVar("JV", bound="FileDensity")
LE = TypeVar("LE", bound="FileDensity")
@attr.s(auto_attribs=True)
@ -820,7 +797,6 @@ 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
@ -830,7 +806,7 @@ class FileDensity:
src_format: Union[Unset, FileImportFormat] = UNSET
started_at: Union[Unset, datetime.datetime] = UNSET
status: Union[Unset, ApiCallStatus] = UNSET
type: Union[Unset, str] = UNSET
type: str = "FileDensity"
updated_at: Union[Unset, datetime.datetime] = UNSET
user_id: Union[Unset, str] = UNSET
@ -843,7 +819,6 @@ 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
@ -872,8 +847,6 @@ 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:
@ -892,8 +865,7 @@ class FileDensity:
field_dict["started_at"] = started_at
if status is not UNSET:
field_dict["status"] = status
if type is not UNSET:
field_dict["type"] = type
field_dict["type"] = type
if updated_at is not UNSET:
field_dict["updated_at"] = updated_at
if user_id is not UNSET:
@ -902,7 +874,7 @@ class FileDensity:
return field_dict
@classmethod
def from_dict(cls: Type[JV], src_dict: Dict[str, Any]) -> JV:
def from_dict(cls: Type[LE], src_dict: Dict[str, Any]) -> LE:
d = src_dict.copy()
_completed_at = d.pop("completed_at", UNSET)
completed_at: Union[Unset, datetime.datetime]
@ -918,7 +890,6 @@ class FileDensity:
else:
created_at = isoparse(_created_at)
densities = d.pop("densities", UNSET)
density = d.pop("density", UNSET)
error = d.pop("error", UNSET)
@ -981,7 +952,6 @@ class FileDensity:
file_density = cls(
completed_at=completed_at,
created_at=created_at,
densities=densities,
density=density,
error=error,
id=id,
@ -1016,7 +986,7 @@ class FileDensity:
return key in self.additional_properties
IO = TypeVar("IO", bound="FileSurfaceArea")
OY = TypeVar("OY", bound="FileSurfaceArea")
@attr.s(auto_attribs=True)
@ -1032,8 +1002,7 @@ class FileSurfaceArea:
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
type: str = "FileSurfaceArea"
updated_at: Union[Unset, datetime.datetime] = UNSET
user_id: Union[Unset, str] = UNSET
@ -1058,7 +1027,6 @@ 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):
@ -1086,10 +1054,7 @@ 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
field_dict["type"] = type
if updated_at is not UNSET:
field_dict["updated_at"] = updated_at
if user_id is not UNSET:
@ -1098,7 +1063,7 @@ class FileSurfaceArea:
return field_dict
@classmethod
def from_dict(cls: Type[IO], src_dict: Dict[str, Any]) -> IO:
def from_dict(cls: Type[OY], src_dict: Dict[str, Any]) -> OY:
d = src_dict.copy()
_completed_at = d.pop("completed_at", UNSET)
completed_at: Union[Unset, datetime.datetime]
@ -1153,7 +1118,6 @@ 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)
@ -1175,7 +1139,6 @@ class FileSurfaceArea:
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
FV = TypeVar("FV", bound="AsyncApiCallResultsPage")
HO = TypeVar("HO", bound="AsyncApiCallResultsPage")
@attr.s(auto_attribs=True)
@ -37,7 +37,7 @@ class AsyncApiCallResultsPage:
return field_dict
@classmethod
def from_dict(cls: Type[FV], src_dict: Dict[str, Any]) -> FV:
def from_dict(cls: Type[HO], src_dict: Dict[str, Any]) -> HO:
d = src_dict.copy()
from ..models.async_api_call import AsyncApiCall

View File

@ -6,7 +6,7 @@ from ..models.axis import Axis
from ..models.direction import Direction
from ..types import UNSET, Unset
LE = TypeVar("LE", bound="AxisDirectionPair")
TM = TypeVar("TM", bound="AxisDirectionPair")
@attr.s(auto_attribs=True)
@ -35,7 +35,7 @@ class AxisDirectionPair:
return field_dict
@classmethod
def from_dict(cls: Type[LE], src_dict: Dict[str, Any]) -> LE:
def from_dict(cls: Type[TM], src_dict: Dict[str, Any]) -> TM:
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
OY = TypeVar("OY", bound="BillingInfo")
BS = TypeVar("BS", bound="BillingInfo")
@attr.s(auto_attribs=True)
@ -37,7 +37,7 @@ class BillingInfo:
return field_dict
@classmethod
def from_dict(cls: Type[OY], src_dict: Dict[str, Any]) -> OY:
def from_dict(cls: Type[BS], src_dict: Dict[str, Any]) -> BS:
d = src_dict.copy()
_address = d.pop("address", UNSET)
address: Union[Unset, NewAddress]

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
HO = TypeVar("HO", bound="CacheMetadata")
AH = TypeVar("AH", bound="CacheMetadata")
@attr.s(auto_attribs=True)
@ -29,7 +29,7 @@ class CacheMetadata:
return field_dict
@classmethod
def from_dict(cls: Type[HO], src_dict: Dict[str, Any]) -> HO:
def from_dict(cls: Type[AH], src_dict: Dict[str, Any]) -> AH:
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
TM = TypeVar("TM", bound="CardDetails")
EG = TypeVar("EG", bound="CardDetails")
@attr.s(auto_attribs=True)
@ -57,7 +57,7 @@ class CardDetails:
return field_dict
@classmethod
def from_dict(cls: Type[TM], src_dict: Dict[str, Any]) -> TM:
def from_dict(cls: Type[EG], src_dict: Dict[str, Any]) -> EG:
d = src_dict.copy()
brand = d.pop("brand", UNSET)

View File

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

View File

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

76
kittycad/models/color.py Normal file
View File

@ -0,0 +1,76 @@
from typing import Any, Dict, List, Type, TypeVar, Union
import attr
from ..types import UNSET, Unset
HK = TypeVar("HK", bound="Color")
@attr.s(auto_attribs=True)
class Color:
"""An RGBA color""" # noqa: E501
a: Union[Unset, float] = UNSET
b: Union[Unset, float] = UNSET
g: Union[Unset, float] = UNSET
r: Union[Unset, float] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
a = self.a
b = self.b
g = self.g
r = self.r
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if a is not UNSET:
field_dict["a"] = a
if b is not UNSET:
field_dict["b"] = b
if g is not UNSET:
field_dict["g"] = g
if r is not UNSET:
field_dict["r"] = r
return field_dict
@classmethod
def from_dict(cls: Type[HK], src_dict: Dict[str, Any]) -> HK:
d = src_dict.copy()
a = d.pop("a", UNSET)
b = d.pop("b", UNSET)
g = d.pop("g", UNSET)
r = d.pop("r", UNSET)
color = cls(
a=a,
b=b,
g=g,
r=r,
)
color.additional_properties = d
return color
@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

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
EG = TypeVar("EG", bound="Commit")
VR = TypeVar("VR", bound="Commit")
@attr.s(auto_attribs=True)
@ -31,7 +31,7 @@ class Commit:
return field_dict
@classmethod
def from_dict(cls: Type[EG], src_dict: Dict[str, Any]) -> EG:
def from_dict(cls: Type[VR], src_dict: Dict[str, Any]) -> VR:
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
JR = TypeVar("JR", bound="Connection")
ON = TypeVar("ON", bound="Connection")
@attr.s(auto_attribs=True)
@ -225,7 +225,7 @@ class Connection:
return field_dict
@classmethod
def from_dict(cls: Type[JR], src_dict: Dict[str, Any]) -> JR:
def from_dict(cls: Type[ON], src_dict: Dict[str, Any]) -> ON:
d = src_dict.copy()
auth_timeout = d.pop("auth_timeout", UNSET)

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
US = TypeVar("US", bound="DeviceAuthVerifyParams")
BB = TypeVar("BB", bound="DeviceAuthVerifyParams")
@attr.s(auto_attribs=True)
@ -27,7 +27,7 @@ class DeviceAuthVerifyParams:
return field_dict
@classmethod
def from_dict(cls: Type[US], src_dict: Dict[str, Any]) -> US:
def from_dict(cls: Type[BB], src_dict: Dict[str, Any]) -> BB:
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
KQ = TypeVar("KQ", bound="Discount")
PJ = TypeVar("PJ", bound="Discount")
@attr.s(auto_attribs=True)
@ -29,7 +29,7 @@ class Discount:
return field_dict
@classmethod
def from_dict(cls: Type[KQ], src_dict: Dict[str, Any]) -> KQ:
def from_dict(cls: Type[PJ], src_dict: Dict[str, Any]) -> PJ:
d = src_dict.copy()
_coupon = d.pop("coupon", UNSET)
coupon: Union[Unset, 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
FH = TypeVar("FH", bound="DockerSystemInfo")
TV = TypeVar("TV", bound="DockerSystemInfo")
@attr.s(auto_attribs=True)
@ -293,7 +293,7 @@ class DockerSystemInfo:
return field_dict
@classmethod
def from_dict(cls: Type[FH], src_dict: Dict[str, Any]) -> FH:
def from_dict(cls: Type[TV], src_dict: Dict[str, Any]) -> TV:
d = src_dict.copy()
architecture = d.pop("architecture", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
NH = TypeVar("NH", bound="EmailAuthenticationForm")
CR = TypeVar("CR", bound="EmailAuthenticationForm")
@attr.s(auto_attribs=True)
@ -31,7 +31,7 @@ class EmailAuthenticationForm:
return field_dict
@classmethod
def from_dict(cls: Type[NH], src_dict: Dict[str, Any]) -> NH:
def from_dict(cls: Type[CR], src_dict: Dict[str, Any]) -> CR:
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
BB = TypeVar("BB", bound="EngineMetadata")
CE = TypeVar("CE", bound="EngineMetadata")
@attr.s(auto_attribs=True)
@ -57,7 +57,7 @@ class EngineMetadata:
return field_dict
@classmethod
def from_dict(cls: Type[BB], src_dict: Dict[str, Any]) -> BB:
def from_dict(cls: Type[CE], src_dict: Dict[str, Any]) -> CE:
d = src_dict.copy()
async_jobs_running = d.pop("async_jobs_running", UNSET)

View File

@ -0,0 +1,17 @@
from enum import Enum
class EntityType(str, Enum):
"""The type of entity""" # noqa: E501
ENTITY = "entity"
OBJECT = "object"
PATH = "path"
CURVE = "curve"
SOLID2D = "solid2d"
SOLID3D = "solid3d"
EDGE = "edge"
FACE = "face"
def __str__(self) -> str:
return str(self.value)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
PJ = TypeVar("PJ", bound="Error")
MS = TypeVar("MS", bound="Error")
@attr.s(auto_attribs=True)
@ -35,7 +35,7 @@ class Error:
return field_dict
@classmethod
def from_dict(cls: Type[PJ], src_dict: Dict[str, Any]) -> PJ:
def from_dict(cls: Type[MS], src_dict: Dict[str, Any]) -> MS:
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
TV = TypeVar("TV", bound="ExecutorMetadata")
LT = TypeVar("LT", bound="ExecutorMetadata")
@attr.s(auto_attribs=True)
@ -41,7 +41,7 @@ class ExecutorMetadata:
return field_dict
@classmethod
def from_dict(cls: Type[TV], src_dict: Dict[str, Any]) -> TV:
def from_dict(cls: Type[LT], src_dict: Dict[str, Any]) -> LT:
d = src_dict.copy()
_docker_info = d.pop("docker_info", UNSET)
docker_info: Union[Unset, DockerSystemInfo]

View File

@ -0,0 +1,62 @@
from typing import Any, Dict, List, Type, TypeVar, Union
import attr
from ..types import UNSET, Unset
ED = TypeVar("ED", bound="ExportFile")
@attr.s(auto_attribs=True)
class ExportFile:
"""A file to be exported to the client.""" # noqa: E501
contents: Union[Unset, str] = UNSET
name: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
contents = self.contents
name = self.name
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if contents is not UNSET:
field_dict["contents"] = contents
if name is not UNSET:
field_dict["name"] = name
return field_dict
@classmethod
def from_dict(cls: Type[ED], src_dict: Dict[str, Any]) -> ED:
d = src_dict.copy()
contents = d.pop("contents", UNSET)
name = d.pop("name", UNSET)
export_file = cls(
contents=contents,
name=name,
)
export_file.additional_properties = d
return export_file
@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

View File

@ -6,7 +6,7 @@ from dateutil.parser import isoparse
from ..types import UNSET, Unset
CR = TypeVar("CR", bound="ExtendedUser")
YY = TypeVar("YY", bound="ExtendedUser")
@attr.s(auto_attribs=True)
@ -98,7 +98,7 @@ class ExtendedUser:
return field_dict
@classmethod
def from_dict(cls: Type[CR], src_dict: Dict[str, Any]) -> CR:
def from_dict(cls: Type[YY], src_dict: Dict[str, Any]) -> YY:
d = src_dict.copy()
company = d.pop("company", UNSET)

View File

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

View File

@ -1,76 +0,0 @@
from typing import Any, Dict, List, Type, TypeVar, Union
import attr
from ..models.modeling_cmd_id import ModelingCmdId
from ..types import UNSET, Unset
MS = TypeVar("MS", bound="Extrude")
@attr.s(auto_attribs=True)
class Extrude:
"""Command for extruding a solid.""" # noqa: E501
cap: Union[Unset, bool] = False
distance: Union[Unset, float] = UNSET
target: Union[Unset, ModelingCmdId] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
cap = self.cap
distance = self.distance
if not isinstance(self.target, Unset):
target = self.target
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if cap is not UNSET:
field_dict["cap"] = cap
if distance is not UNSET:
field_dict["distance"] = distance
if target is not UNSET:
field_dict["target"] = target
return field_dict
@classmethod
def from_dict(cls: Type[MS], src_dict: Dict[str, Any]) -> MS:
d = src_dict.copy()
cap = d.pop("cap", UNSET)
distance = d.pop("distance", UNSET)
_target = d.pop("target", UNSET)
target: Union[Unset, ModelingCmdId]
if isinstance(_target, Unset):
target = UNSET
else:
target = _target # type: ignore[arg-type]
extrude = cls(
cap=cap,
distance=distance,
target=target,
)
extrude.additional_properties = d
return extrude
@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

View File

@ -11,7 +11,7 @@ from ..models.unit_length import UnitLength
from ..models.uuid import Uuid
from ..types import UNSET, Unset
LT = TypeVar("LT", bound="FileCenterOfMass")
FZ = TypeVar("FZ", bound="FileCenterOfMass")
@attr.s(auto_attribs=True)
@ -19,7 +19,6 @@ class FileCenterOfMass:
"""A file center of mass result.""" # noqa: E501
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
@ -36,7 +35,6 @@ class FileCenterOfMass:
def to_dict(self) -> Dict[str, Any]:
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()
@ -64,8 +62,6 @@ 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:
@ -90,7 +86,7 @@ class FileCenterOfMass:
return field_dict
@classmethod
def from_dict(cls: Type[LT], src_dict: Dict[str, Any]) -> LT:
def from_dict(cls: Type[FZ], src_dict: Dict[str, Any]) -> FZ:
d = src_dict.copy()
_center_of_mass = d.pop("center_of_mass", UNSET)
center_of_mass: Union[Unset, Point3d]
@ -99,7 +95,6 @@ class FileCenterOfMass:
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):
@ -162,7 +157,6 @@ 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,

View File

@ -12,7 +12,7 @@ from ..models.output_format import OutputFormat
from ..models.uuid import Uuid
from ..types import UNSET, Unset
ED = TypeVar("ED", bound="FileConversion")
GL = TypeVar("GL", bound="FileConversion")
@attr.s(auto_attribs=True)
@ -100,7 +100,7 @@ class FileConversion:
return field_dict
@classmethod
def from_dict(cls: Type[ED], src_dict: Dict[str, Any]) -> ED:
def from_dict(cls: Type[GL], src_dict: Dict[str, Any]) -> GL:
d = src_dict.copy()
_completed_at = d.pop("completed_at", UNSET)
completed_at: Union[Unset, datetime.datetime]

View File

@ -11,7 +11,7 @@ from ..models.unit_mass import UnitMass
from ..models.uuid import Uuid
from ..types import UNSET, Unset
YY = TypeVar("YY", bound="FileDensity")
NN = TypeVar("NN", bound="FileDensity")
@attr.s(auto_attribs=True)
@ -20,7 +20,6 @@ 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
@ -42,7 +41,6 @@ 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
@ -70,8 +68,6 @@ 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:
@ -98,7 +94,7 @@ class FileDensity:
return field_dict
@classmethod
def from_dict(cls: Type[YY], src_dict: Dict[str, Any]) -> YY:
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]
@ -114,7 +110,6 @@ class FileDensity:
else:
created_at = isoparse(_created_at)
densities = d.pop("densities", UNSET)
density = d.pop("density", UNSET)
error = d.pop("error", UNSET)
@ -175,7 +170,6 @@ class FileDensity:
file_density = cls(
completed_at=completed_at,
created_at=created_at,
densities=densities,
density=density,
error=error,
id=id,

View File

@ -4,12 +4,6 @@ from enum import Enum
class FileExportFormat(str, Enum):
"""The valid types of output file formats.""" # noqa: E501
"""# The COLLADA/DAE file format. <https://en.wikipedia.org/wiki/COLLADA> """ # noqa: E501
DAE = "dae"
"""# 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
FBXB = "fbxb"
"""# glTF 2.0. We refer to this as glTF since that is how our customers refer to it, although by default it will be in binary format and thus technically (glb). """ # noqa: E501
GLTF = "gltf"
"""# The OBJ file format. <https://en.wikipedia.org/wiki/Wavefront_.obj_file> It may or may not have an an attached material (mtl // mtllib) within the file, but we interact with it as if it does not. """ # noqa: E501

View File

@ -4,10 +4,6 @@ from enum import Enum
class FileImportFormat(str, Enum):
"""The valid types of source file formats.""" # noqa: E501
"""# The COLLADA/DAE file format. <https://en.wikipedia.org/wiki/COLLADA> """ # noqa: E501
DAE = "dae"
"""# The FBX file format. <https://en.wikipedia.org/wiki/FBX> """ # noqa: E501
FBX = "fbx"
"""# glTF 2.0. """ # noqa: E501
GLTF = "gltf"
"""# The OBJ file format. <https://en.wikipedia.org/wiki/Wavefront_.obj_file> It may or may not have an an attached material (mtl // mtllib) within the file, but we interact with it as if it does not. """ # noqa: E501

View File

@ -11,7 +11,7 @@ from ..models.unit_mass import UnitMass
from ..models.uuid import Uuid
from ..types import UNSET, Unset
DO = TypeVar("DO", bound="FileMass")
OH = TypeVar("OH", bound="FileMass")
@attr.s(auto_attribs=True)
@ -23,7 +23,6 @@ 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
@ -45,7 +44,6 @@ 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
@ -76,8 +74,6 @@ 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:
@ -98,7 +94,7 @@ class FileMass:
return field_dict
@classmethod
def from_dict(cls: Type[DO], src_dict: Dict[str, Any]) -> DO:
def from_dict(cls: Type[OH], src_dict: Dict[str, Any]) -> OH:
d = src_dict.copy()
_completed_at = d.pop("completed_at", UNSET)
completed_at: Union[Unset, datetime.datetime]
@ -125,7 +121,6 @@ class FileMass:
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)
@ -178,7 +173,6 @@ class FileMass:
error=error,
id=id,
mass=mass,
masses=masses,
material_density=material_density,
material_density_unit=material_density_unit,
output_unit=output_unit,

View File

@ -10,7 +10,7 @@ from ..models.unit_area import UnitArea
from ..models.uuid import Uuid
from ..types import UNSET, Unset
FZ = TypeVar("FZ", bound="FileSurfaceArea")
VI = TypeVar("VI", bound="FileSurfaceArea")
@attr.s(auto_attribs=True)
@ -26,7 +26,6 @@ class FileSurfaceArea:
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
@ -51,7 +50,6 @@ 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()
@ -78,8 +76,6 @@ 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:
@ -88,7 +84,7 @@ class FileSurfaceArea:
return field_dict
@classmethod
def from_dict(cls: Type[FZ], src_dict: Dict[str, Any]) -> FZ:
def from_dict(cls: Type[VI], src_dict: Dict[str, Any]) -> VI:
d = src_dict.copy()
_completed_at = d.pop("completed_at", UNSET)
completed_at: Union[Unset, datetime.datetime]
@ -143,7 +139,6 @@ 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):
@ -163,7 +158,6 @@ class FileSurfaceArea:
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
GL = TypeVar("GL", bound="FileSystemMetadata")
ET = TypeVar("ET", bound="FileSystemMetadata")
@attr.s(auto_attribs=True)
@ -29,7 +29,7 @@ class FileSystemMetadata:
return field_dict
@classmethod
def from_dict(cls: Type[GL], src_dict: Dict[str, Any]) -> GL:
def from_dict(cls: Type[ET], src_dict: Dict[str, Any]) -> ET:
d = src_dict.copy()
ok = d.pop("ok", UNSET)

View File

@ -10,7 +10,7 @@ from ..models.unit_volume import UnitVolume
from ..models.uuid import Uuid
from ..types import UNSET, Unset
NN = TypeVar("NN", bound="FileVolume")
QF = TypeVar("QF", bound="FileVolume")
@attr.s(auto_attribs=True)
@ -28,7 +28,6 @@ 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)
@ -55,7 +54,6 @@ 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)
@ -82,13 +80,11 @@ 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[NN], src_dict: Dict[str, Any]) -> NN:
def from_dict(cls: Type[QF], src_dict: Dict[str, Any]) -> QF:
d = src_dict.copy()
_completed_at = d.pop("completed_at", UNSET)
completed_at: Union[Unset, datetime.datetime]
@ -152,8 +148,6 @@ class FileVolume:
volume = d.pop("volume", UNSET)
volumes = d.pop("volumes", UNSET)
file_volume = cls(
completed_at=completed_at,
created_at=created_at,
@ -166,7 +160,6 @@ class FileVolume:
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
OH = TypeVar("OH", bound="Gateway")
DI = TypeVar("DI", bound="Gateway")
@attr.s(auto_attribs=True)
@ -43,7 +43,7 @@ class Gateway:
return field_dict
@classmethod
def from_dict(cls: Type[OH], src_dict: Dict[str, Any]) -> OH:
def from_dict(cls: Type[DI], src_dict: Dict[str, Any]) -> DI:
d = src_dict.copy()
auth_timeout = d.pop("auth_timeout", UNSET)

View File

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

View File

@ -6,14 +6,14 @@ from ..models.system import System
from ..models.unit_length import UnitLength
from ..types import UNSET, Unset
ET = TypeVar("ET", bound="Gltf")
UF = TypeVar("UF", bound="gltf")
@attr.s(auto_attribs=True)
class Gltf:
class gltf:
"""Binary glTF 2.0. We refer to this as glTF since that is how our customers refer to it, but this can also import binary glTF (glb).""" # noqa: E501
type: Union[Unset, str] = UNSET
type: str = "gltf"
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
@ -23,13 +23,12 @@ class Gltf:
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if type is not UNSET:
field_dict["type"] = type
field_dict["type"] = type
return field_dict
@classmethod
def from_dict(cls: Type[ET], src_dict: Dict[str, Any]) -> ET:
def from_dict(cls: Type[UF], src_dict: Dict[str, Any]) -> UF:
d = src_dict.copy()
type = d.pop("type", UNSET)
@ -57,47 +56,33 @@ class Gltf:
return key in self.additional_properties
QF = TypeVar("QF", bound="Step")
YF = TypeVar("YF", bound="step")
@attr.s(auto_attribs=True)
class Step:
class step:
"""ISO 10303-21 (STEP) format.""" # noqa: E501
coords: Union[Unset, System] = UNSET
type: Union[Unset, str] = UNSET
type: str = "step"
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
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
field_dict["type"] = type
return field_dict
@classmethod
def from_dict(cls: Type[QF], src_dict: Dict[str, Any]) -> QF:
def from_dict(cls: Type[YF], src_dict: Dict[str, Any]) -> YF:
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)
step = cls(
coords=coords,
type=type,
)
@ -121,15 +106,15 @@ class Step:
return key in self.additional_properties
DI = TypeVar("DI", bound="Obj")
PY = TypeVar("PY", bound="obj")
@attr.s(auto_attribs=True)
class Obj:
class obj:
"""Wavefront OBJ format.""" # noqa: E501
coords: Union[Unset, System] = UNSET
type: Union[Unset, str] = UNSET
type: str = "obj"
units: Union[Unset, UnitLength] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
@ -146,15 +131,14 @@ class Obj:
field_dict.update({})
if coords is not UNSET:
field_dict["coords"] = coords
if type is not UNSET:
field_dict["type"] = type
field_dict["type"] = type
if units is not UNSET:
field_dict["units"] = units
return field_dict
@classmethod
def from_dict(cls: Type[DI], src_dict: Dict[str, Any]) -> DI:
def from_dict(cls: Type[PY], src_dict: Dict[str, Any]) -> PY:
d = src_dict.copy()
_coords = d.pop("coords", UNSET)
coords: Union[Unset, System]
@ -198,15 +182,15 @@ class Obj:
return key in self.additional_properties
OJ = TypeVar("OJ", bound="Ply")
LK = TypeVar("LK", bound="ply")
@attr.s(auto_attribs=True)
class Ply:
class ply:
"""The PLY Polygon File Format.""" # noqa: E501
coords: Union[Unset, System] = UNSET
type: Union[Unset, str] = UNSET
type: str = "ply"
units: Union[Unset, UnitLength] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
@ -223,15 +207,14 @@ class Ply:
field_dict.update({})
if coords is not UNSET:
field_dict["coords"] = coords
if type is not UNSET:
field_dict["type"] = type
field_dict["type"] = type
if units is not UNSET:
field_dict["units"] = units
return field_dict
@classmethod
def from_dict(cls: Type[OJ], src_dict: Dict[str, Any]) -> OJ:
def from_dict(cls: Type[LK], src_dict: Dict[str, Any]) -> LK:
d = src_dict.copy()
_coords = d.pop("coords", UNSET)
coords: Union[Unset, System]
@ -275,15 +258,15 @@ class Ply:
return key in self.additional_properties
UF = TypeVar("UF", bound="Stl")
AR = TypeVar("AR", bound="stl")
@attr.s(auto_attribs=True)
class Stl:
class stl:
"""*ST**ereo**L**ithography format.""" # noqa: E501
coords: Union[Unset, System] = UNSET
type: Union[Unset, str] = UNSET
type: str = "stl"
units: Union[Unset, UnitLength] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
@ -300,15 +283,14 @@ class Stl:
field_dict.update({})
if coords is not UNSET:
field_dict["coords"] = coords
if type is not UNSET:
field_dict["type"] = type
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:
def from_dict(cls: Type[AR], src_dict: Dict[str, Any]) -> AR:
d = src_dict.copy()
_coords = d.pop("coords", UNSET)
coords: Union[Unset, System]
@ -352,4 +334,4 @@ class Stl:
return key in self.additional_properties
InputFormat = Union[Gltf, Step, Obj, Ply, 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
YF = TypeVar("YF", bound="Invoice")
WB = TypeVar("WB", bound="Invoice")
@attr.s(auto_attribs=True)
@ -143,7 +143,7 @@ class Invoice:
return field_dict
@classmethod
def from_dict(cls: Type[YF], src_dict: Dict[str, Any]) -> YF:
def from_dict(cls: Type[WB], src_dict: Dict[str, Any]) -> WB:
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
PY = TypeVar("PY", bound="InvoiceLineItem")
KK = TypeVar("KK", bound="InvoiceLineItem")
@attr.s(auto_attribs=True)
@ -49,7 +49,7 @@ class InvoiceLineItem:
return field_dict
@classmethod
def from_dict(cls: Type[PY], src_dict: Dict[str, Any]) -> PY:
def from_dict(cls: Type[KK], src_dict: Dict[str, Any]) -> KK:
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
LK = TypeVar("LK", bound="Jetstream")
HC = TypeVar("HC", bound="Jetstream")
@attr.s(auto_attribs=True)
@ -41,7 +41,7 @@ class Jetstream:
return field_dict
@classmethod
def from_dict(cls: Type[LK], src_dict: Dict[str, Any]) -> LK:
def from_dict(cls: Type[HC], src_dict: Dict[str, Any]) -> HC:
d = src_dict.copy()
_config = d.pop("config", UNSET)
config: Union[Unset, JetstreamConfig]

View File

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

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
WB = TypeVar("WB", bound="JetstreamConfig")
PV = TypeVar("PV", bound="JetstreamConfig")
@attr.s(auto_attribs=True)
@ -39,7 +39,7 @@ class JetstreamConfig:
return field_dict
@classmethod
def from_dict(cls: Type[WB], src_dict: Dict[str, Any]) -> WB:
def from_dict(cls: Type[PV], src_dict: Dict[str, Any]) -> PV:
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
KK = TypeVar("KK", bound="JetstreamStats")
QI = TypeVar("QI", bound="JetstreamStats")
@attr.s(auto_attribs=True)
@ -53,7 +53,7 @@ class JetstreamStats:
return field_dict
@classmethod
def from_dict(cls: Type[KK], src_dict: Dict[str, Any]) -> KK:
def from_dict(cls: Type[QI], src_dict: Dict[str, Any]) -> QI:
d = src_dict.copy()
accounts = d.pop("accounts", UNSET)

View File

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

View File

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

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
PV = TypeVar("PV", bound="MetaClusterInfo")
OM = TypeVar("OM", bound="MetaClusterInfo")
@attr.s(auto_attribs=True)
@ -35,7 +35,7 @@ class MetaClusterInfo:
return field_dict
@classmethod
def from_dict(cls: Type[PV], src_dict: Dict[str, Any]) -> PV:
def from_dict(cls: Type[OM], src_dict: Dict[str, Any]) -> OM:
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
QI = TypeVar("QI", bound="Metadata")
EN = TypeVar("EN", bound="Metadata")
@attr.s(auto_attribs=True)
@ -71,7 +71,7 @@ class Metadata:
return field_dict
@classmethod
def from_dict(cls: Type[QI], src_dict: Dict[str, Any]) -> QI:
def from_dict(cls: Type[EN], src_dict: Dict[str, Any]) -> EN:
d = src_dict.copy()
_cache = d.pop("cache", UNSET)
cache: Union[Unset, CacheMetadata]

File diff suppressed because it is too large Load Diff

View File

@ -6,7 +6,7 @@ from ..models.modeling_cmd import ModelingCmd
from ..models.modeling_cmd_id import ModelingCmdId
from ..types import UNSET, Unset
DN = TypeVar("DN", bound="ModelingCmdReq")
ZG = TypeVar("ZG", bound="ModelingCmdReq")
@attr.s(auto_attribs=True)
@ -15,7 +15,6 @@ class ModelingCmdReq:
cmd: Union[Unset, ModelingCmd] = UNSET
cmd_id: Union[Unset, ModelingCmdId] = UNSET
file_id: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
@ -24,7 +23,6 @@ class ModelingCmdReq:
cmd = self.cmd
if not isinstance(self.cmd_id, Unset):
cmd_id = self.cmd_id
file_id = self.file_id
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
@ -33,13 +31,11 @@ class ModelingCmdReq:
field_dict["cmd"] = cmd
if cmd_id is not UNSET:
field_dict["cmd_id"] = cmd_id
if file_id is not UNSET:
field_dict["file_id"] = file_id
return field_dict
@classmethod
def from_dict(cls: Type[DN], src_dict: Dict[str, Any]) -> DN:
def from_dict(cls: Type[ZG], src_dict: Dict[str, Any]) -> ZG:
d = src_dict.copy()
_cmd = d.pop("cmd", UNSET)
cmd: Union[Unset, ModelingCmd]
@ -55,12 +51,9 @@ class ModelingCmdReq:
else:
cmd_id = _cmd_id # type: ignore[arg-type]
file_id = d.pop("file_id", UNSET)
modeling_cmd_req = cls(
cmd=cmd,
cmd_id=cmd_id,
file_id=file_id,
)
modeling_cmd_req.additional_properties = d

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
BA = TypeVar("BA", bound="ModelingCmdReqBatch")
LF = TypeVar("LF", bound="ModelingCmdReqBatch")
@attr.s(auto_attribs=True)
@ -12,33 +12,27 @@ class ModelingCmdReqBatch:
"""A batch set of graphics commands submitted to the KittyCAD engine via the Modeling API.""" # noqa: E501
cmds: Union[Unset, Any] = UNSET
file_id: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
cmds = self.cmds
file_id = self.file_id
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if cmds is not UNSET:
field_dict["cmds"] = cmds
if file_id is not UNSET:
field_dict["file_id"] = file_id
return field_dict
@classmethod
def from_dict(cls: Type[BA], src_dict: Dict[str, Any]) -> BA:
def from_dict(cls: Type[LF], src_dict: Dict[str, Any]) -> LF:
d = src_dict.copy()
cmds = d.pop("cmds", UNSET)
file_id = d.pop("file_id", UNSET)
modeling_cmd_req_batch = cls(
cmds=cmds,
file_id=file_id,
)
modeling_cmd_req_batch.additional_properties = d

View File

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

View File

@ -5,18 +5,19 @@ import attr
from ..models.modeling_cmd_id import ModelingCmdId
from ..types import UNSET, Unset
from .modeling_error import ModelingError
from .ok_modeling_cmd_response import OkModelingCmdResponse
Success = Any
success = OkModelingCmdResponse
Error = ModelingError
error = ModelingError
CB = TypeVar("CB", bound="Cancelled")
GN = TypeVar("GN", bound="cancelled")
@attr.s(auto_attribs=True)
class Cancelled:
class cancelled:
what_failed: Union[Unset, ModelingCmdId] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
@ -34,7 +35,7 @@ class Cancelled:
return field_dict
@classmethod
def from_dict(cls: Type[CB], src_dict: Dict[str, Any]) -> CB:
def from_dict(cls: Type[GN], src_dict: Dict[str, Any]) -> GN:
d = src_dict.copy()
_what_failed = d.pop("what_failed", UNSET)
what_failed: Union[Unset, ModelingCmdId]
@ -67,4 +68,4 @@ class Cancelled:
return key in self.additional_properties
ModelingOutcome = Union[Success, Error, Cancelled]
ModelingOutcome = Union[success, error, cancelled]

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
LC = TypeVar("LC", bound="ModelingOutcomes")
GD = TypeVar("GD", bound="ModelingOutcomes")
@attr.s(auto_attribs=True)
@ -27,7 +27,7 @@ class ModelingOutcomes:
return field_dict
@classmethod
def from_dict(cls: Type[LC], src_dict: Dict[str, Any]) -> LC:
def from_dict(cls: Type[GD], src_dict: Dict[str, Any]) -> GD:
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
TO = TypeVar("TO", bound="NewAddress")
VJ = TypeVar("VJ", bound="NewAddress")
@attr.s(auto_attribs=True)
@ -53,7 +53,7 @@ class NewAddress:
return field_dict
@classmethod
def from_dict(cls: Type[TO], src_dict: Dict[str, Any]) -> TO:
def from_dict(cls: Type[VJ], src_dict: Dict[str, Any]) -> VJ:
d = src_dict.copy()
city = d.pop("city", UNSET)

View File

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

View File

@ -0,0 +1,901 @@
from typing import Any, Dict, List, Type, TypeVar, Union, cast
import attr
from ..models.entity_type import EntityType
from ..types import UNSET, Unset
YW = TypeVar("YW", bound="empty")
@attr.s(auto_attribs=True)
class empty:
"""An empty response, used for any command that does not explicitly have a response defined here.""" # noqa: E501
type: str = "empty"
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
type = self.type
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
field_dict["type"] = type
return field_dict
@classmethod
def from_dict(cls: Type[YW], src_dict: Dict[str, Any]) -> YW:
d = src_dict.copy()
type = d.pop("type", UNSET)
empty = cls(
type=type,
)
empty.additional_properties = d
return empty
@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
QX = TypeVar("QX", bound="export")
@attr.s(auto_attribs=True)
class export:
"""The response from the `Export` command. When this is being performed over a websocket, this is sent as binary not JSON. The binary data can be deserialized as `bincode` into a `Vec<ExportFile>`.""" # noqa: E501
from ..models.export_file import ExportFile
files: Union[Unset, List[ExportFile]] = UNSET
type: str = "export"
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
from ..models.export_file import ExportFile
files: Union[Unset, List[ExportFile]] = UNSET
if not isinstance(self.files, Unset):
files = self.files
type = self.type
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if files is not UNSET:
field_dict["files"] = files
field_dict["type"] = type
return field_dict
@classmethod
def from_dict(cls: Type[QX], src_dict: Dict[str, Any]) -> QX:
d = src_dict.copy()
from ..models.export_file import ExportFile
files = cast(List[ExportFile], d.pop("files", UNSET))
type = d.pop("type", UNSET)
export = cls(
files=files,
type=type,
)
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
NO = TypeVar("NO", bound="select_with_point")
@attr.s(auto_attribs=True)
class select_with_point:
"""The response from the `SelectWithPoint` command.""" # noqa: E501
entity_id: Union[Unset, str] = UNSET
type: str = "select_with_point"
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
entity_id = self.entity_id
type = self.type
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if entity_id is not UNSET:
field_dict["entity_id"] = entity_id
field_dict["type"] = type
return field_dict
@classmethod
def from_dict(cls: Type[NO], src_dict: Dict[str, Any]) -> NO:
d = src_dict.copy()
entity_id = d.pop("entity_id", UNSET)
type = d.pop("type", UNSET)
select_with_point = cls(
entity_id=entity_id,
type=type,
)
select_with_point.additional_properties = d
return select_with_point
@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
VX = TypeVar("VX", bound="highlight_set_entity")
@attr.s(auto_attribs=True)
class highlight_set_entity:
"""The response from the `HighlightSetEntity` command.""" # noqa: E501
entity_id: Union[Unset, str] = UNSET
sequence: Union[Unset, int] = UNSET
type: str = "highlight_set_entity"
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
entity_id = self.entity_id
sequence = self.sequence
type = self.type
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if entity_id is not UNSET:
field_dict["entity_id"] = entity_id
if sequence is not UNSET:
field_dict["sequence"] = sequence
field_dict["type"] = type
return field_dict
@classmethod
def from_dict(cls: Type[VX], src_dict: Dict[str, Any]) -> VX:
d = src_dict.copy()
entity_id = d.pop("entity_id", UNSET)
sequence = d.pop("sequence", UNSET)
type = d.pop("type", UNSET)
highlight_set_entity = cls(
entity_id=entity_id,
sequence=sequence,
type=type,
)
highlight_set_entity.additional_properties = d
return highlight_set_entity
@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
RG = TypeVar("RG", bound="entity_get_child_uuid")
@attr.s(auto_attribs=True)
class entity_get_child_uuid:
"""The response from the `EntityGetChildUuid` command.""" # noqa: E501
entity_id: Union[Unset, str] = UNSET
type: str = "entity_get_child_uuid"
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
entity_id = self.entity_id
type = self.type
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if entity_id is not UNSET:
field_dict["entity_id"] = entity_id
field_dict["type"] = type
return field_dict
@classmethod
def from_dict(cls: Type[RG], src_dict: Dict[str, Any]) -> RG:
d = src_dict.copy()
entity_id = d.pop("entity_id", UNSET)
type = d.pop("type", UNSET)
entity_get_child_uuid = cls(
entity_id=entity_id,
type=type,
)
entity_get_child_uuid.additional_properties = d
return entity_get_child_uuid
@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
IT = TypeVar("IT", bound="entity_get_num_children")
@attr.s(auto_attribs=True)
class entity_get_num_children:
"""The response from the `EntityGetNumChildren` command.""" # noqa: E501
num: Union[Unset, int] = UNSET
type: str = "entity_get_num_children"
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
num = self.num
type = self.type
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if num is not UNSET:
field_dict["num"] = num
field_dict["type"] = type
return field_dict
@classmethod
def from_dict(cls: Type[IT], src_dict: Dict[str, Any]) -> IT:
d = src_dict.copy()
num = d.pop("num", UNSET)
type = d.pop("type", UNSET)
entity_get_num_children = cls(
num=num,
type=type,
)
entity_get_num_children.additional_properties = d
return entity_get_num_children
@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
LD = TypeVar("LD", bound="entity_get_parent_id")
@attr.s(auto_attribs=True)
class entity_get_parent_id:
"""The response from the `EntityGetParentId` command.""" # noqa: E501
entity_id: Union[Unset, str] = UNSET
type: str = "entity_get_parent_id"
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
entity_id = self.entity_id
type = self.type
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if entity_id is not UNSET:
field_dict["entity_id"] = entity_id
field_dict["type"] = type
return field_dict
@classmethod
def from_dict(cls: Type[LD], src_dict: Dict[str, Any]) -> LD:
d = src_dict.copy()
entity_id = d.pop("entity_id", UNSET)
type = d.pop("type", UNSET)
entity_get_parent_id = cls(
entity_id=entity_id,
type=type,
)
entity_get_parent_id.additional_properties = d
return entity_get_parent_id
@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
UA = TypeVar("UA", bound="entity_get_all_child_uuids")
@attr.s(auto_attribs=True)
class entity_get_all_child_uuids:
"""The response from the `EntityGetAllChildUuids` command.""" # noqa: E501
entity_ids: Union[Unset, List[str]] = UNSET
type: str = "entity_get_all_child_uuids"
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
entity_ids: Union[Unset, List[str]] = UNSET
if not isinstance(self.entity_ids, Unset):
entity_ids = self.entity_ids
type = self.type
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if entity_ids is not UNSET:
field_dict["entity_ids"] = entity_ids
field_dict["type"] = type
return field_dict
@classmethod
def from_dict(cls: Type[UA], src_dict: Dict[str, Any]) -> UA:
d = src_dict.copy()
entity_ids = cast(List[str], d.pop("entity_ids", UNSET))
type = d.pop("type", UNSET)
entity_get_all_child_uuids = cls(
entity_ids=entity_ids,
type=type,
)
entity_get_all_child_uuids.additional_properties = d
return entity_get_all_child_uuids
@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
TN = TypeVar("TN", bound="select_get")
@attr.s(auto_attribs=True)
class select_get:
"""The response from the `SelectGet` command.""" # noqa: E501
entity_ids: Union[Unset, List[str]] = UNSET
type: str = "select_get"
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
entity_ids: Union[Unset, List[str]] = UNSET
if not isinstance(self.entity_ids, Unset):
entity_ids = self.entity_ids
type = self.type
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if entity_ids is not UNSET:
field_dict["entity_ids"] = entity_ids
field_dict["type"] = type
return field_dict
@classmethod
def from_dict(cls: Type[TN], src_dict: Dict[str, Any]) -> TN:
d = src_dict.copy()
entity_ids = cast(List[str], d.pop("entity_ids", UNSET))
type = d.pop("type", UNSET)
select_get = cls(
entity_ids=entity_ids,
type=type,
)
select_get.additional_properties = d
return select_get
@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
MZ = TypeVar("MZ", bound="get_entity_type")
@attr.s(auto_attribs=True)
class get_entity_type:
"""The response from the `GetEntityType` command.""" # noqa: E501
entity_type: Union[Unset, EntityType] = UNSET
type: str = "get_entity_type"
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
if not isinstance(self.entity_type, Unset):
entity_type = self.entity_type
type = self.type
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if entity_type is not UNSET:
field_dict["entity_type"] = entity_type
field_dict["type"] = type
return field_dict
@classmethod
def from_dict(cls: Type[MZ], src_dict: Dict[str, Any]) -> MZ:
d = src_dict.copy()
_entity_type = d.pop("entity_type", UNSET)
entity_type: Union[Unset, EntityType]
if isinstance(_entity_type, Unset):
entity_type = UNSET
else:
entity_type = _entity_type # type: ignore[arg-type]
type = d.pop("type", UNSET)
get_entity_type = cls(
entity_type=entity_type,
type=type,
)
get_entity_type.additional_properties = d
return get_entity_type
@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
UG = TypeVar("UG", bound="solid3d_get_all_edge_faces")
@attr.s(auto_attribs=True)
class solid3d_get_all_edge_faces:
"""The response from the `Solid3dGetAllEdgeFaces` command.""" # noqa: E501
faces: Union[Unset, List[str]] = UNSET
type: str = "solid3d_get_all_edge_faces"
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
faces: Union[Unset, List[str]] = UNSET
if not isinstance(self.faces, Unset):
faces = self.faces
type = self.type
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if faces is not UNSET:
field_dict["faces"] = faces
field_dict["type"] = type
return field_dict
@classmethod
def from_dict(cls: Type[UG], src_dict: Dict[str, Any]) -> UG:
d = src_dict.copy()
faces = cast(List[str], d.pop("faces", UNSET))
type = d.pop("type", UNSET)
solid3d_get_all_edge_faces = cls(
faces=faces,
type=type,
)
solid3d_get_all_edge_faces.additional_properties = d
return solid3d_get_all_edge_faces
@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
CY = TypeVar("CY", bound="solid3d_get_all_opposite_edges")
@attr.s(auto_attribs=True)
class solid3d_get_all_opposite_edges:
"""The response from the `Solid3dGetAllOppositeEdges` command.""" # noqa: E501
edges: Union[Unset, List[str]] = UNSET
type: str = "solid3d_get_all_opposite_edges"
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
edges: Union[Unset, List[str]] = UNSET
if not isinstance(self.edges, Unset):
edges = self.edges
type = self.type
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if edges is not UNSET:
field_dict["edges"] = edges
field_dict["type"] = type
return field_dict
@classmethod
def from_dict(cls: Type[CY], src_dict: Dict[str, Any]) -> CY:
d = src_dict.copy()
edges = cast(List[str], d.pop("edges", UNSET))
type = d.pop("type", UNSET)
solid3d_get_all_opposite_edges = cls(
edges=edges,
type=type,
)
solid3d_get_all_opposite_edges.additional_properties = d
return solid3d_get_all_opposite_edges
@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
NZ = TypeVar("NZ", bound="solid3d_get_opposite_edge")
@attr.s(auto_attribs=True)
class solid3d_get_opposite_edge:
"""The response from the `Solid3dGetOppositeEdge` command.""" # noqa: E501
edge: Union[Unset, str] = UNSET
type: str = "solid3d_get_opposite_edge"
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
edge = self.edge
type = self.type
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if edge is not UNSET:
field_dict["edge"] = edge
field_dict["type"] = type
return field_dict
@classmethod
def from_dict(cls: Type[NZ], src_dict: Dict[str, Any]) -> NZ:
d = src_dict.copy()
edge = d.pop("edge", UNSET)
type = d.pop("type", UNSET)
solid3d_get_opposite_edge = cls(
edge=edge,
type=type,
)
solid3d_get_opposite_edge.additional_properties = d
return solid3d_get_opposite_edge
@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
LI = TypeVar("LI", bound="solid3d_get_prev_adjacent_edge")
@attr.s(auto_attribs=True)
class solid3d_get_prev_adjacent_edge:
"""The response from the `Solid3dGetPrevAdjacentEdge` command.""" # noqa: E501
edge: Union[Unset, str] = UNSET
type: str = "solid3d_get_prev_adjacent_edge"
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
edge = self.edge
type = self.type
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if edge is not UNSET:
field_dict["edge"] = edge
field_dict["type"] = type
return field_dict
@classmethod
def from_dict(cls: Type[LI], src_dict: Dict[str, Any]) -> LI:
d = src_dict.copy()
edge = d.pop("edge", UNSET)
type = d.pop("type", UNSET)
solid3d_get_prev_adjacent_edge = cls(
edge=edge,
type=type,
)
solid3d_get_prev_adjacent_edge.additional_properties = d
return solid3d_get_prev_adjacent_edge
@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
LO = TypeVar("LO", bound="solid3d_get_next_adjacent_edge")
@attr.s(auto_attribs=True)
class solid3d_get_next_adjacent_edge:
"""The response from the `Solid3dGetNextAdjacentEdge` command.""" # noqa: E501
edge: Union[Unset, str] = UNSET
type: str = "solid3d_get_next_adjacent_edge"
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
edge = self.edge
type = self.type
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if edge is not UNSET:
field_dict["edge"] = edge
field_dict["type"] = type
return field_dict
@classmethod
def from_dict(cls: Type[LO], src_dict: Dict[str, Any]) -> LO:
d = src_dict.copy()
edge = d.pop("edge", UNSET)
type = d.pop("type", UNSET)
solid3d_get_next_adjacent_edge = cls(
edge=edge,
type=type,
)
solid3d_get_next_adjacent_edge.additional_properties = d
return solid3d_get_next_adjacent_edge
@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
OkModelingCmdResponse = Union[
empty,
export,
select_with_point,
highlight_set_entity,
entity_get_child_uuid,
entity_get_num_children,
entity_get_parent_id,
entity_get_all_child_uuids,
select_get,
get_entity_type,
solid3d_get_all_edge_faces,
solid3d_get_all_opposite_edges,
solid3d_get_opposite_edge,
solid3d_get_prev_adjacent_edge,
solid3d_get_next_adjacent_edge,
]

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
EO = TypeVar("EO", bound="Onboarding")
XJ = TypeVar("XJ", bound="Onboarding")
@attr.s(auto_attribs=True)
@ -37,7 +37,7 @@ class Onboarding:
return field_dict
@classmethod
def from_dict(cls: Type[EO], src_dict: Dict[str, Any]) -> EO:
def from_dict(cls: Type[XJ], src_dict: Dict[str, Any]) -> XJ:
d = src_dict.copy()
first_call_from__their_machine_date = d.pop(
"first_call_from_their_machine_date", UNSET

View File

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

View File

@ -6,15 +6,15 @@ from ..models.storage import Storage
from ..models.system import System
from ..types import UNSET, Unset
QO = TypeVar("QO", bound="Gltf")
JQ = TypeVar("JQ", bound="gltf")
@attr.s(auto_attribs=True)
class Gltf:
class gltf:
"""glTF 2.0. We refer to this as glTF since that is how our customers refer to it, although by default it will be in binary format and thus technically (glb). If you prefer ascii output, you can set that option for the export.""" # noqa: E501
storage: Union[Unset, Storage] = UNSET
type: Union[Unset, str] = UNSET
type: str = "gltf"
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
@ -28,13 +28,12 @@ class Gltf:
field_dict.update({})
if storage is not UNSET:
field_dict["storage"] = storage
if type is not UNSET:
field_dict["type"] = type
field_dict["type"] = type
return field_dict
@classmethod
def from_dict(cls: Type[QO], src_dict: Dict[str, Any]) -> QO:
def from_dict(cls: Type[JQ], src_dict: Dict[str, Any]) -> JQ:
d = src_dict.copy()
_storage = d.pop("storage", UNSET)
storage: Union[Unset, Storage]
@ -70,15 +69,15 @@ class Gltf:
return key in self.additional_properties
KX = TypeVar("KX", bound="Obj")
PQ = TypeVar("PQ", bound="obj")
@attr.s(auto_attribs=True)
class Obj:
class obj:
"""Wavefront OBJ format.""" # noqa: E501
coords: Union[Unset, System] = UNSET
type: Union[Unset, str] = UNSET
type: str = "obj"
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
@ -92,13 +91,12 @@ class Obj:
field_dict.update({})
if coords is not UNSET:
field_dict["coords"] = coords
if type is not UNSET:
field_dict["type"] = type
field_dict["type"] = type
return field_dict
@classmethod
def from_dict(cls: Type[KX], src_dict: Dict[str, Any]) -> KX:
def from_dict(cls: Type[PQ], src_dict: Dict[str, Any]) -> PQ:
d = src_dict.copy()
_coords = d.pop("coords", UNSET)
coords: Union[Unset, System]
@ -134,16 +132,16 @@ class Obj:
return key in self.additional_properties
IZ = TypeVar("IZ", bound="Ply")
IM = TypeVar("IM", bound="ply")
@attr.s(auto_attribs=True)
class Ply:
class ply:
"""The PLY Polygon File Format.""" # noqa: E501
coords: Union[Unset, System] = UNSET
storage: Union[Unset, Storage] = UNSET
type: Union[Unset, str] = UNSET
type: str = "ply"
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
@ -161,13 +159,12 @@ class Ply:
field_dict["coords"] = coords
if storage is not UNSET:
field_dict["storage"] = storage
if type is not UNSET:
field_dict["type"] = type
field_dict["type"] = type
return field_dict
@classmethod
def from_dict(cls: Type[IZ], src_dict: Dict[str, Any]) -> IZ:
def from_dict(cls: Type[IM], src_dict: Dict[str, Any]) -> IM:
d = src_dict.copy()
_coords = d.pop("coords", UNSET)
coords: Union[Unset, System]
@ -211,15 +208,15 @@ class Ply:
return key in self.additional_properties
WO = TypeVar("WO", bound="Step")
OU = TypeVar("OU", bound="step")
@attr.s(auto_attribs=True)
class Step:
class step:
"""ISO 10303-21 (STEP) format.""" # noqa: E501
coords: Union[Unset, System] = UNSET
type: Union[Unset, str] = UNSET
type: str = "step"
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
@ -233,13 +230,12 @@ class Step:
field_dict.update({})
if coords is not UNSET:
field_dict["coords"] = coords
if type is not UNSET:
field_dict["type"] = type
field_dict["type"] = type
return field_dict
@classmethod
def from_dict(cls: Type[WO], src_dict: Dict[str, Any]) -> WO:
def from_dict(cls: Type[OU], src_dict: Dict[str, Any]) -> OU:
d = src_dict.copy()
_coords = d.pop("coords", UNSET)
coords: Union[Unset, System]
@ -275,16 +271,16 @@ class Step:
return key in self.additional_properties
NK = TypeVar("NK", bound="Stl")
KL = TypeVar("KL", bound="stl")
@attr.s(auto_attribs=True)
class Stl:
class stl:
"""*ST**ereo**L**ithography format.""" # noqa: E501
coords: Union[Unset, System] = UNSET
storage: Union[Unset, Storage] = UNSET
type: Union[Unset, str] = UNSET
type: str = "stl"
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
@ -302,13 +298,12 @@ class Stl:
field_dict["coords"] = coords
if storage is not UNSET:
field_dict["storage"] = storage
if type is not UNSET:
field_dict["type"] = type
field_dict["type"] = type
return field_dict
@classmethod
def from_dict(cls: Type[NK], src_dict: Dict[str, Any]) -> NK:
def from_dict(cls: Type[KL], src_dict: Dict[str, Any]) -> KL:
d = src_dict.copy()
_coords = d.pop("coords", UNSET)
coords: Union[Unset, System]
@ -352,4 +347,4 @@ class Stl:
return key in self.additional_properties
OutputFormat = Union[Gltf, Obj, Ply, Step, Stl]
OutputFormat = Union[gltf, obj, ply, step, stl]

View File

@ -6,29 +6,34 @@ from ..models.point2d import Point2d
from ..models.point3d import Point3d
from ..types import UNSET, Unset
UQ = TypeVar("UQ", bound="Line")
XI = TypeVar("XI", bound="line")
@attr.s(auto_attribs=True)
class Line:
class line:
"""A straight line segment. Goes from the current path "pen" to the given endpoint.""" # noqa: E501
end: Union[Unset, Point3d] = UNSET
type: str = "line"
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
if not isinstance(self.end, Unset):
end = self.end
type = self.type
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if end is not UNSET:
field_dict["end"] = end
field_dict["type"] = type
return field_dict
@classmethod
def from_dict(cls: Type[UQ], src_dict: Dict[str, Any]) -> UQ:
def from_dict(cls: Type[XI], src_dict: Dict[str, Any]) -> XI:
d = src_dict.copy()
_end = d.pop("end", UNSET)
end: Union[Unset, Point3d]
@ -37,8 +42,11 @@ class Line:
else:
end = _end # type: ignore[arg-type]
type = d.pop("type", UNSET)
line = cls(
end=end,
type=type,
)
line.additional_properties = d
@ -61,15 +69,18 @@ class Line:
return key in self.additional_properties
QE = TypeVar("QE", bound="Arc")
PO = TypeVar("PO", bound="arc")
@attr.s(auto_attribs=True)
class Arc:
class arc:
"""A circular arc segment.""" # noqa: E501
angle_end: Union[Unset, float] = UNSET
angle_start: Union[Unset, float] = UNSET
center: Union[Unset, Point2d] = UNSET
radius: Union[Unset, float] = UNSET
type: str = "arc"
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
@ -79,6 +90,7 @@ class Arc:
if not isinstance(self.center, Unset):
center = self.center
radius = self.radius
type = self.type
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
@ -91,11 +103,12 @@ class Arc:
field_dict["center"] = center
if radius is not UNSET:
field_dict["radius"] = radius
field_dict["type"] = type
return field_dict
@classmethod
def from_dict(cls: Type[QE], src_dict: Dict[str, Any]) -> QE:
def from_dict(cls: Type[PO], src_dict: Dict[str, Any]) -> PO:
d = src_dict.copy()
angle_end = d.pop("angle_end", UNSET)
@ -110,11 +123,14 @@ class Arc:
radius = d.pop("radius", UNSET)
type = d.pop("type", UNSET)
arc = cls(
angle_end=angle_end,
angle_start=angle_start,
center=center,
radius=radius,
type=type,
)
arc.additional_properties = d
@ -137,14 +153,17 @@ class Arc:
return key in self.additional_properties
XH = TypeVar("XH", bound="Bezier")
PS = TypeVar("PS", bound="bezier")
@attr.s(auto_attribs=True)
class Bezier:
class bezier:
"""A cubic bezier curve segment. Start at the end of the current line, go through control point 1 and 2, then end at a given point.""" # noqa: E501
control1: Union[Unset, Point3d] = UNSET
control2: Union[Unset, Point3d] = UNSET
end: Union[Unset, Point3d] = UNSET
type: str = "bezier"
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
@ -155,6 +174,7 @@ class Bezier:
control2 = self.control2
if not isinstance(self.end, Unset):
end = self.end
type = self.type
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
@ -165,11 +185,12 @@ class Bezier:
field_dict["control2"] = control2
if end is not UNSET:
field_dict["end"] = end
field_dict["type"] = type
return field_dict
@classmethod
def from_dict(cls: Type[XH], src_dict: Dict[str, Any]) -> XH:
def from_dict(cls: Type[PS], src_dict: Dict[str, Any]) -> PS:
d = src_dict.copy()
_control1 = d.pop("control1", UNSET)
control1: Union[Unset, Point3d]
@ -192,10 +213,13 @@ class Bezier:
else:
end = _end # type: ignore[arg-type]
type = d.pop("type", UNSET)
bezier = cls(
control1=control1,
control2=control2,
end=end,
type=type,
)
bezier.additional_properties = d
@ -218,4 +242,4 @@ class Bezier:
return key in self.additional_properties
PathSegment = Union[Line, Arc, Bezier]
PathSegment = Union[line, arc, bezier]

View File

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

View File

@ -9,7 +9,7 @@ from ..models.card_details import CardDetails
from ..models.payment_method_type import PaymentMethodType
from ..types import UNSET, Unset
BV = TypeVar("BV", bound="PaymentMethod")
XL = TypeVar("XL", bound="PaymentMethod")
@attr.s(auto_attribs=True)
@ -57,7 +57,7 @@ class PaymentMethod:
return field_dict
@classmethod
def from_dict(cls: Type[BV], src_dict: Dict[str, Any]) -> BV:
def from_dict(cls: Type[XL], src_dict: Dict[str, Any]) -> XL:
d = src_dict.copy()
_billing_info = d.pop("billing_info", UNSET)
billing_info: Union[Unset, BillingInfo]

View File

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

View File

@ -1,168 +0,0 @@
import datetime
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.physics_constant_name import PhysicsConstantName
from ..models.uuid import Uuid
from ..types import UNSET, Unset
SS = TypeVar("SS", bound="PhysicsConstant")
@attr.s(auto_attribs=True)
class PhysicsConstant:
"""A physics constant.""" # noqa: E501
completed_at: Union[Unset, datetime.datetime] = UNSET
constant: Union[Unset, PhysicsConstantName] = UNSET
created_at: Union[Unset, datetime.datetime] = UNSET
error: Union[Unset, str] = UNSET
id: Union[Unset, str] = 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
value: Union[Unset, float] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
completed_at: Union[Unset, str] = UNSET
if not isinstance(self.completed_at, Unset):
completed_at = self.completed_at.isoformat()
if not isinstance(self.constant, Unset):
constant = self.constant
created_at: Union[Unset, str] = UNSET
if not isinstance(self.created_at, Unset):
created_at = self.created_at.isoformat()
error = self.error
id = self.id
started_at: Union[Unset, str] = UNSET
if not isinstance(self.started_at, Unset):
started_at = self.started_at.isoformat()
if not isinstance(self.status, Unset):
status = self.status
updated_at: Union[Unset, str] = UNSET
if not isinstance(self.updated_at, Unset):
updated_at = self.updated_at.isoformat()
user_id = self.user_id
value = self.value
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if completed_at is not UNSET:
field_dict["completed_at"] = completed_at
if constant is not UNSET:
field_dict["constant"] = constant
if created_at is not UNSET:
field_dict["created_at"] = created_at
if error is not UNSET:
field_dict["error"] = error
if id is not UNSET:
field_dict["id"] = id
if started_at is not UNSET:
field_dict["started_at"] = started_at
if status is not UNSET:
field_dict["status"] = status
if updated_at is not UNSET:
field_dict["updated_at"] = updated_at
if user_id is not UNSET:
field_dict["user_id"] = user_id
if value is not UNSET:
field_dict["value"] = value
return field_dict
@classmethod
def from_dict(cls: Type[SS], src_dict: Dict[str, Any]) -> SS:
d = src_dict.copy()
_completed_at = d.pop("completed_at", UNSET)
completed_at: Union[Unset, datetime.datetime]
if isinstance(_completed_at, Unset):
completed_at = UNSET
else:
completed_at = isoparse(_completed_at)
_constant = d.pop("constant", UNSET)
constant: Union[Unset, PhysicsConstantName]
if isinstance(_constant, Unset):
constant = UNSET
else:
constant = _constant # type: ignore[arg-type]
_created_at = d.pop("created_at", UNSET)
created_at: Union[Unset, datetime.datetime]
if isinstance(_created_at, Unset):
created_at = UNSET
else:
created_at = isoparse(_created_at)
error = d.pop("error", UNSET)
_id = d.pop("id", UNSET)
id: Union[Unset, Uuid]
if isinstance(_id, Unset):
id = UNSET
else:
id = _id # type: ignore[arg-type]
_started_at = d.pop("started_at", UNSET)
started_at: Union[Unset, datetime.datetime]
if isinstance(_started_at, Unset):
started_at = UNSET
else:
started_at = isoparse(_started_at)
_status = d.pop("status", UNSET)
status: Union[Unset, ApiCallStatus]
if isinstance(_status, Unset):
status = UNSET
else:
status = _status # type: ignore[arg-type]
_updated_at = d.pop("updated_at", UNSET)
updated_at: Union[Unset, datetime.datetime]
if isinstance(_updated_at, Unset):
updated_at = UNSET
else:
updated_at = isoparse(_updated_at)
user_id = d.pop("user_id", UNSET)
value = d.pop("value", UNSET)
physics_constant = cls(
completed_at=completed_at,
constant=constant,
created_at=created_at,
error=error,
id=id,
started_at=started_at,
status=status,
updated_at=updated_at,
user_id=user_id,
value=value,
)
physics_constant.additional_properties = d
return physics_constant
@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

View File

@ -1,75 +0,0 @@
from enum import Enum
class PhysicsConstantName(str, Enum):
"""The valid types of phys constant names.""" # noqa: E501
"""# pi - Ratio of a circle's circumference to its diameter. <https://en.wikipedia.org/wiki/Pi> """ # noqa: E501
PI = "pi"
"""# c - Speed of light in vacuum. <https://en.wikipedia.org/wiki//Speed_of_light> """ # noqa: E501
C = "c"
"""# Speed of light in a vacuum. <https://en.wikipedia.org/wiki//Speed_of_light> """ # noqa: E501
SPEED_OF_LIGHT = "speed_of_light"
"""# G - Newtonian constant of gravitation. <https://en.wikipedia.org/wiki/Gravitational_constant> """ # noqa: E501
G = "G"
"""# Newtonian constant of gravitation. <https://en.wikipedia.org/wiki/Gravitational_constant> """ # noqa: E501
NEWTONIAN_GRAVITATION = "newtonian_gravitation"
"""# h - Planck constant. <https://en.wikipedia.org/wiki/Planck_constant> """ # noqa: E501
H = "h"
"""# Planck constant. <https://en.wikipedia.org/wiki/Planck_constant> """ # noqa: E501
PLANCK_CONST = "planck_const"
"""# mu_0 - vacuum permeability. <https://en.wikipedia.org/wiki/Vacuum_permeability> """ # noqa: E501
MU_0 = "mu_0"
"""# vacuum permeability. <https://en.wikipedia.org/wiki/Vacuum_permeability> """ # noqa: E501
VACUUM_PERMEABILITY = "vacuum_permeability"
"""# ε_0 - vacuum permitivity. <https://en.wikipedia.org/wiki/Vacuum_permittivity> """ # noqa: E501
E_0 = "E_0"
"""# vacuum permitivity. <https://en.wikipedia.org/wiki/Vacuum_permittivity>] """ # noqa: E501
VACUUM_PERMITIVITY = "vacuum_permitivity"
"""# Z_0 - characteristic impedance of vacuum. <https://en.wikipedia.org/wiki/Impedance_of_free_space> """ # noqa: E501
Z_0 = "Z_0"
"""# characteristic impedance of vacuum. <https://en.wikipedia.org/wiki/Impedance_of_free_space> """ # noqa: E501
VACUUM_IMPEDANCE = "vacuum_impedance"
"""# k_e - Coulomb's constant. <https://en.wikipedia.org/wiki/Coulomb_constant> """ # noqa: E501
K_E = "k_e"
"""# Coulomb's constant. <https://en.wikipedia.org/wiki/Coulomb_constant> """ # noqa: E501
COULOMB_CONST = "coulomb_const"
"""# e - elementary charge. <https://en.wikipedia.org/wiki/Elementary_charge> """ # noqa: E501
E = "e"
"""# elementary charge. <https://en.wikipedia.org/wiki/Elementary_charge> """ # noqa: E501
ELEMENTARY_CHARGE = "elementary_charge"
"""# m_e - electron mass. <https://en.wikipedia.org/wiki/Electron_mass> """ # noqa: E501
M_E = "m_e"
"""# electron mass. <https://en.wikipedia.org/wiki/Electron_mass> """ # noqa: E501
ELECTRON_MASS = "electron_mass"
"""# m_p - proton mass. <https://en.wikipedia.org/wiki/Proton> """ # noqa: E501
M_P = "m_p"
"""# proton mass. <https://en.wikipedia.org/wiki/Proton> """ # noqa: E501
PROTON_MASS = "proton_mass"
"""# mu_B - Bohr magneton. <https://en.wikipedia.org/wiki/Bohr_magneton> """ # noqa: E501
MU_B = "mu_B"
"""# Bohr magneton. <https://en.wikipedia.org/wiki/Bohr_magneton> """ # noqa: E501
BOHR_MAGNETON = "bohr_magneton"
"""# NA - Avogadro's Number. <https://en.wikipedia.org/wiki/Avogadro_constant> """ # noqa: E501
NA = "NA"
"""# Avogadro's Number. <https://en.wikipedia.org/wiki/Avogadro_constant> """ # noqa: E501
AVOGADRO_NUM = "avogadro_num"
"""# R - Molar Gas constant. <https://en.wikipedia.org/wiki/Gas_constant> """ # noqa: E501
R = "R"
"""# Molar Gas constant. <https://en.wikipedia.org/wiki/Gas_constant> """ # noqa: E501
MOLAR_GAS_CONST = "molar_gas_const"
"""# K_B - Boltzmann constant. <https://en.wikipedia.org/wiki/Boltzmann_constant> """ # noqa: E501
K_B = "K_B"
"""# Boltzmann constant. <https://en.wikipedia.org/wiki/Boltzmann_constant> """ # noqa: E501
BOLTZMANN_CONST = "boltzmann_const"
"""# F - Faraday constant. <https://en.wikipedia.org/wiki/Faraday_constant> """ # noqa: E501
F = "F"
"""# Faraday constant. <https://en.wikipedia.org/wiki/Faraday_constant> """ # noqa: E501
FARADAY_CONST = "faraday_const"
"""# Sigma - Stefan-Boltzmann constant. <https://en.wikipedia.org/wiki/Stefan%E2%80%93Boltzmann_constant> """ # noqa: E501
SIGMA = "sigma"
"""# Stefan-Boltzmann constant. <https://en.wikipedia.org/wiki/Stefan%E2%80%93Boltzmann_constant> """ # noqa: E501
STEFAN_BOLTZMANN_CONST = "stefan_boltzmann_const"
def __str__(self) -> str:
return str(self.value)

View File

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

View File

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

View File

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

View File

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

View File

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

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