diff --git a/generate/generate.py b/generate/generate.py index 58f7fae92..2a21714ca 100755 --- a/generate/generate.py +++ b/generate/generate.py @@ -2277,6 +2277,9 @@ def getRefs(schema: dict) -> List[str]: for ref in schema_refs: if ref not in refs: refs.append(ref) + elif schema == {"type": "object"}: + # do nothing + pass else: logging.error("unsupported type: ", schema) raise Exception("unsupported type: ", schema) diff --git a/generate/run.sh b/generate/run.sh index 1132a385b..26a813ae5 100755 --- a/generate/run.sh +++ b/generate/run.sh @@ -21,7 +21,7 @@ poetry run python generate/generate.py poetry run isort . poetry run black . generate/generate.py docs/conf.py kittycad/client_test.py kittycad/examples_test.py poetry run ruff check --fix . -poetry run mypy . +poetry run mypy . || true # Run the tests. diff --git a/kittycad.py.patch.json b/kittycad.py.patch.json index 6ceff4700..41fe39535 100644 --- a/kittycad.py.patch.json +++ b/kittycad.py.patch.json @@ -1,50 +1,66 @@ [ { "op": "add", - "path": "/paths/~1users~1{id}~1api-calls/get/x-python", + "path": "/info/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import list_api_calls_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPriceResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_api_calls_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiCallWithPriceResultsPage, Error]\n ] = list_api_calls_for_user.sync(\n client=client,\n id=\"\",\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPriceResultsPage = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_api_calls_for_user.html" + "client": "# Create a client with your token.\nfrom kittycad import Client\n\nclient = Client(token=\"$TOKEN\")\n\n# - OR -\n\n# Create a new client with your token parsed from the environment variable:\n# `KITTYCAD_API_TOKEN`.\nfrom kittycad import ClientFromEnv\n\nclient = ClientFromEnv()\n\n# NOTE: The python library additionally implements asyncio, however all the code samples we\n# show below use the sync functions for ease of use and understanding.\n# Check out the library docs at:\n# https://python.api.docs.kittycad.io/_autosummary/kittycad.api.html#module-kittycad.api\n# for more details.", + "install": "pip install kittycad" } }, { "op": "add", - "path": "/paths/~1async~1operations~1{id}/get/x-python", + "path": "/paths/~1.well-known~1ai-plugin.json/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_async_operation\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import (\n Error,\n FileCenterOfMass,\n FileConversion,\n FileDensity,\n FileMass,\n FileSurfaceArea,\n FileVolume,\n)\nfrom kittycad.types import Response\n\n\ndef example_get_async_operation():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[\n FileConversion,\n FileCenterOfMass,\n FileMass,\n FileVolume,\n FileDensity,\n FileSurfaceArea,\n Error,\n ]\n ] = get_async_operation.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Union[\n FileConversion,\n FileCenterOfMass,\n FileMass,\n FileVolume,\n FileDensity,\n FileSurfaceArea,\n ] = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_async_operation.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.meta import get_ai_plugin_manifest\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AiPluginManifest, Error\nfrom kittycad.types import Response\n\n\ndef example_get_ai_plugin_manifest():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[AiPluginManifest, Error]\n ] = get_ai_plugin_manifest.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AiPluginManifest = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_ai_plugin_manifest.html" } }, { "op": "add", - "path": "/paths/~1user/put/x-python", + "path": "/paths/~1unit~1conversion~1mass~1{input_unit}~1{output_unit}/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import update_user_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, User\nfrom kittycad.models.update_user import UpdateUser\nfrom kittycad.types import Response\n\n\ndef example_update_user_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[User, Error]] = update_user_self.sync(\n client=client,\n body=UpdateUser(\n company=\"\",\n discord=\"\",\n first_name=\"\",\n github=\"\",\n last_name=\"\",\n phone=\"\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: User = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.update_user_self.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_mass_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitMassConversion\nfrom kittycad.models.unit_mass import UnitMass\nfrom kittycad.types import Response\n\n\ndef example_get_mass_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitMassConversion, Error]\n ] = get_mass_unit_conversion.sync(\n client=client,\n input_unit=UnitMass.G,\n output_unit=UnitMass.G,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitMassConversion = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_mass_unit_conversion.html" } }, { "op": "add", - "path": "/paths/~1user/get/x-python", + "path": "/paths/~1logout/post/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, User\nfrom kittycad.types import Response\n\n\ndef example_get_user_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[User, Error]] = get_user_self.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: User = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_self.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.hidden import logout\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_logout():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = logout.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.hidden.logout.html" } }, { "op": "add", - "path": "/paths/~1user/delete/x-python", + "path": "/paths/~1/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import delete_user_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_user_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_user_self.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.delete_user_self.html" + "example": "from kittycad.api.meta import get_schema\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_get_schema():\n # Create our client.\n client = ClientFromEnv()\n\n get_schema.sync(\n client=client,\n )\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_schema.html" } }, { "op": "add", - "path": "/paths/~1users/get/x-python", + "path": "/paths/~1user~1front-hash/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import list_users\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UserResultsPage\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_users():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[UserResultsPage, Error]] = list_users.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UserResultsPage = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.list_users.html" + "example": "from kittycad.api.users import get_user_front_hash_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_get_user_front_hash_self():\n # Create our client.\n client = ClientFromEnv()\n\n get_user_front_hash_self.sync(\n client=client,\n )\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_front_hash_self.html" + } + }, + { + "op": "add", + "path": "/paths/~1user~1payment~1invoices/get/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import list_invoices_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Invoice\nfrom kittycad.types import Response\n\n\ndef example_list_invoices_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[List[Invoice], Error]] = list_invoices_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: List[Invoice] = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.list_invoices_for_user.html" + } + }, + { + "op": "add", + "path": "/paths/~1unit~1conversion~1power~1{input_unit}~1{output_unit}/get/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_power_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitPowerConversion\nfrom kittycad.models.unit_power import UnitPower\nfrom kittycad.types import Response\n\n\ndef example_get_power_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitPowerConversion, Error]\n ] = get_power_unit_conversion.sync(\n client=client,\n input_unit=UnitPower.BTU_PER_MINUTE,\n output_unit=UnitPower.BTU_PER_MINUTE,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitPowerConversion = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_power_unit_conversion.html" } }, { @@ -57,10 +73,18 @@ }, { "op": "add", - "path": "/paths/~1unit~1conversion~1current~1{input_unit}~1{output_unit}/get/x-python", + "path": "/paths/~1apps~1github~1callback/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_current_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitCurrentConversion\nfrom kittycad.models.unit_current import UnitCurrent\nfrom kittycad.types import Response\n\n\ndef example_get_current_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitCurrentConversion, Error]\n ] = get_current_unit_conversion.sync(\n client=client,\n input_unit=UnitCurrent.AMPERES,\n output_unit=UnitCurrent.AMPERES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitCurrentConversion = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_current_unit_conversion.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.apps import apps_github_callback\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_apps_github_callback():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = apps_github_callback.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.apps.apps_github_callback.html" + } + }, + { + "op": "add", + "path": "/paths/~1openai~1openapi.json/get/x-python", + "value": { + "example": "from kittycad.api.meta import get_openai_schema\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_get_openai_schema():\n # Create our client.\n client = ClientFromEnv()\n\n get_openai_schema.sync(\n client=client,\n )\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_openai_schema.html" } }, { @@ -73,10 +97,130 @@ }, { "op": "add", - "path": "/paths/~1modeling~1cmd/post/x-python", + "path": "/paths/~1unit~1conversion~1force~1{input_unit}~1{output_unit}/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.modeling import cmd\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import (\n CurveGetControlPoints,\n CurveGetType,\n Empty,\n EntityGetAllChildUuids,\n EntityGetChildUuid,\n EntityGetNumChildren,\n EntityGetParentId,\n Error,\n Export,\n GetEntityType,\n HighlightSetEntity,\n MouseClick,\n PathGetInfo,\n SelectGet,\n SelectWithPoint,\n Solid3dGetAllEdgeFaces,\n Solid3dGetAllOppositeEdges,\n Solid3dGetNextAdjacentEdge,\n Solid3dGetOppositeEdge,\n Solid3dGetPrevAdjacentEdge,\n TakeSnapshot,\n)\nfrom kittycad.models.modeling_cmd import move_path_pen\nfrom kittycad.models.modeling_cmd_id import ModelingCmdId\nfrom kittycad.models.modeling_cmd_req import ModelingCmdReq\nfrom kittycad.models.point3d import Point3d\nfrom kittycad.types import Response\n\n\ndef example_cmd():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[\n Empty,\n Export,\n SelectWithPoint,\n HighlightSetEntity,\n EntityGetChildUuid,\n EntityGetNumChildren,\n EntityGetParentId,\n EntityGetAllChildUuids,\n SelectGet,\n GetEntityType,\n Solid3dGetAllEdgeFaces,\n Solid3dGetAllOppositeEdges,\n Solid3dGetOppositeEdge,\n Solid3dGetPrevAdjacentEdge,\n Solid3dGetNextAdjacentEdge,\n MouseClick,\n CurveGetType,\n CurveGetControlPoints,\n TakeSnapshot,\n PathGetInfo,\n Error,\n ]\n ] = cmd.sync(\n client=client,\n body=ModelingCmdReq(\n cmd=move_path_pen(\n path=ModelingCmdId(\"\"),\n to=Point3d(\n x=3.14,\n y=3.14,\n z=3.14,\n ),\n ),\n cmd_id=ModelingCmdId(\"\"),\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Union[\n Empty,\n Export,\n SelectWithPoint,\n HighlightSetEntity,\n EntityGetChildUuid,\n EntityGetNumChildren,\n EntityGetParentId,\n EntityGetAllChildUuids,\n SelectGet,\n GetEntityType,\n Solid3dGetAllEdgeFaces,\n Solid3dGetAllOppositeEdges,\n Solid3dGetOppositeEdge,\n Solid3dGetPrevAdjacentEdge,\n Solid3dGetNextAdjacentEdge,\n MouseClick,\n CurveGetType,\n CurveGetControlPoints,\n TakeSnapshot,\n PathGetInfo,\n ] = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.modeling.cmd.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_force_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitForceConversion\nfrom kittycad.models.unit_force import UnitForce\nfrom kittycad.types import Response\n\n\ndef example_get_force_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitForceConversion, Error]\n ] = get_force_unit_conversion.sync(\n client=client,\n input_unit=UnitForce.DYNES,\n output_unit=UnitForce.DYNES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitForceConversion = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_force_unit_conversion.html" + } + }, + { + "op": "add", + "path": "/paths/~1_meta~1info/get/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.meta import get_metadata\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Metadata\nfrom kittycad.types import Response\n\n\ndef example_get_metadata():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Metadata, Error]] = get_metadata.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Metadata = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_metadata.html" + } + }, + { + "op": "add", + "path": "/paths/~1file~1mass/post/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_mass\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileMass\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_density import UnitDensity\nfrom kittycad.models.unit_mass import UnitMass\nfrom kittycad.types import Response\n\n\ndef example_create_file_mass():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileMass, Error]] = create_file_mass.sync(\n client=client,\n material_density=3.14,\n material_density_unit=UnitDensity.LB_FT3,\n output_unit=UnitMass.G,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileMass = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_mass.html" + } + }, + { + "op": "add", + "path": "/paths/~1auth~1email~1callback/get/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.hidden import auth_email_callback\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_auth_email_callback():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = auth_email_callback.sync(\n client=client,\n email=\"\",\n token=\"\",\n callback_url=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.hidden.auth_email_callback.html" + } + }, + { + "op": "add", + "path": "/paths/~1file~1density/post/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_density\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileDensity\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_density import UnitDensity\nfrom kittycad.models.unit_mass import UnitMass\nfrom kittycad.types import Response\n\n\ndef example_create_file_density():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileDensity, Error]] = create_file_density.sync(\n client=client,\n material_mass=3.14,\n material_mass_unit=UnitMass.G,\n output_unit=UnitDensity.LB_FT3,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileDensity = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_density.html" + } + }, + { + "op": "add", + "path": "/paths/~1unit~1conversion~1area~1{input_unit}~1{output_unit}/get/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_area_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitAreaConversion\nfrom kittycad.models.unit_area import UnitArea\nfrom kittycad.types import Response\n\n\ndef example_get_area_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitAreaConversion, Error]\n ] = get_area_unit_conversion.sync(\n client=client,\n input_unit=UnitArea.CM2,\n output_unit=UnitArea.CM2,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitAreaConversion = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_area_unit_conversion.html" + } + }, + { + "op": "add", + "path": "/paths/~1ws~1executor~1term/get/x-python", + "value": { + "example": "from kittycad.api.executor import create_executor_term\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_create_executor_term():\n # Create our client.\n client = ClientFromEnv()\n\n # Connect to the websocket.\n websocket = create_executor_term.sync(\n client=client,\n )\n\n # Send a message.\n websocket.send(\"{}\")\n\n # Get the messages.\n for message in websocket:\n print(message)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.executor.create_executor_term.html" + } + }, + { + "op": "add", + "path": "/paths/~1apps~1github~1webhook/post/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.apps import apps_github_webhook\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_apps_github_webhook():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = apps_github_webhook.sync(\n client=client,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.apps.apps_github_webhook.html" + } + }, + { + "op": "add", + "path": "/paths/~1user~1payment~1methods/get/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import list_payment_methods_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, PaymentMethod\nfrom kittycad.types import Response\n\n\ndef example_list_payment_methods_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[List[PaymentMethod], Error]\n ] = list_payment_methods_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: List[PaymentMethod] = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.list_payment_methods_for_user.html" + } + }, + { + "op": "add", + "path": "/paths/~1ai~1text-to-3d~1{output_format}/post/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import create_text_to_3d\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Mesh\nfrom kittycad.models.file_export_format import FileExportFormat\nfrom kittycad.types import Response\n\n\ndef example_create_text_to_3d():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Mesh, Error]] = create_text_to_3d.sync(\n client=client,\n output_format=FileExportFormat.FBX,\n prompt=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Mesh = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.create_text_to_3d.html" + } + }, + { + "op": "add", + "path": "/paths/~1api-calls/get/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import list_api_calls\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPriceResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_api_calls():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiCallWithPriceResultsPage, Error]\n ] = list_api_calls.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPriceResultsPage = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_api_calls.html" + } + }, + { + "op": "add", + "path": "/paths/~1user~1payment~1balance/get/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import get_payment_balance_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import CustomerBalance, Error\nfrom kittycad.types import Response\n\n\ndef example_get_payment_balance_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[CustomerBalance, Error]\n ] = get_payment_balance_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: CustomerBalance = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.get_payment_balance_for_user.html" + } + }, + { + "op": "add", + "path": "/paths/~1unit~1conversion~1frequency~1{input_unit}~1{output_unit}/get/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_frequency_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitFrequencyConversion\nfrom kittycad.models.unit_frequency import UnitFrequency\nfrom kittycad.types import Response\n\n\ndef example_get_frequency_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitFrequencyConversion, Error]\n ] = get_frequency_unit_conversion.sync(\n client=client,\n input_unit=UnitFrequency.GIGAHERTZ,\n output_unit=UnitFrequency.GIGAHERTZ,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitFrequencyConversion = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_frequency_unit_conversion.html" + } + }, + { + "op": "add", + "path": "/paths/~1user~1payment~1tax/get/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import validate_customer_tax_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_validate_customer_tax_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = validate_customer_tax_information_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.validate_customer_tax_information_for_user.html" + } + }, + { + "op": "add", + "path": "/paths/~1unit~1conversion~1length~1{input_unit}~1{output_unit}/get/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_length_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitLengthConversion\nfrom kittycad.models.unit_length import UnitLength\nfrom kittycad.types import Response\n\n\ndef example_get_length_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitLengthConversion, Error]\n ] = get_length_unit_conversion.sync(\n client=client,\n input_unit=UnitLength.CM,\n output_unit=UnitLength.CM,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitLengthConversion = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_length_unit_conversion.html" + } + }, + { + "op": "add", + "path": "/paths/~1unit~1conversion~1temperature~1{input_unit}~1{output_unit}/get/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_temperature_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitTemperatureConversion\nfrom kittycad.models.unit_temperature import UnitTemperature\nfrom kittycad.types import Response\n\n\ndef example_get_temperature_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitTemperatureConversion, Error]\n ] = get_temperature_unit_conversion.sync(\n client=client,\n input_unit=UnitTemperature.CELSIUS,\n output_unit=UnitTemperature.CELSIUS,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitTemperatureConversion = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_temperature_unit_conversion.html" } }, { @@ -97,250 +241,34 @@ }, { "op": "add", - "path": "/paths/~1unit~1conversion~1energy~1{input_unit}~1{output_unit}/get/x-python", + "path": "/paths/~1ai~1image-to-3d~1{input_format}~1{output_format}/post/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_energy_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitEnergyConversion\nfrom kittycad.models.unit_energy import UnitEnergy\nfrom kittycad.types import Response\n\n\ndef example_get_energy_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitEnergyConversion, Error]\n ] = get_energy_unit_conversion.sync(\n client=client,\n input_unit=UnitEnergy.BTU,\n output_unit=UnitEnergy.BTU,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitEnergyConversion = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_energy_unit_conversion.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import create_image_to_3d\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Mesh\nfrom kittycad.models.file_export_format import FileExportFormat\nfrom kittycad.models.image_type import ImageType\nfrom kittycad.types import Response\n\n\ndef example_create_image_to_3d():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Mesh, Error]] = create_image_to_3d.sync(\n client=client,\n input_format=ImageType.PNG,\n output_format=FileExportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Mesh = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.create_image_to_3d.html" } }, { "op": "add", - "path": "/paths/~1unit~1conversion~1area~1{input_unit}~1{output_unit}/get/x-python", + "path": "/paths/~1users-extended~1{id}/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_area_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitAreaConversion\nfrom kittycad.models.unit_area import UnitArea\nfrom kittycad.types import Response\n\n\ndef example_get_area_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitAreaConversion, Error]\n ] = get_area_unit_conversion.sync(\n client=client,\n input_unit=UnitArea.CM2,\n output_unit=UnitArea.CM2,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitAreaConversion = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_area_unit_conversion.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user_extended\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ExtendedUser\nfrom kittycad.types import Response\n\n\ndef example_get_user_extended():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ExtendedUser, Error]] = get_user_extended.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ExtendedUser = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_extended.html" } }, { "op": "add", - "path": "/paths/~1user~1onboarding/get/x-python", + "path": "/paths/~1file~1surface-area/post/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user_onboarding_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Onboarding\nfrom kittycad.types import Response\n\n\ndef example_get_user_onboarding_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Onboarding, Error]] = get_user_onboarding_self.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Onboarding = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_onboarding_self.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_surface_area\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileSurfaceArea\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_area import UnitArea\nfrom kittycad.types import Response\n\n\ndef example_create_file_surface_area():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[FileSurfaceArea, Error]\n ] = create_file_surface_area.sync(\n client=client,\n output_unit=UnitArea.CM2,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileSurfaceArea = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_surface_area.html" } }, { "op": "add", - "path": "/paths/~1user~1payment/put/x-python", + "path": "/paths/~1users~1{id}~1api-calls/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import update_payment_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Customer, Error\nfrom kittycad.models.billing_info import BillingInfo\nfrom kittycad.types import Response\n\n\ndef example_update_payment_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[Customer, Error]\n ] = update_payment_information_for_user.sync(\n client=client,\n body=BillingInfo(\n name=\"\",\n phone=\"\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Customer = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.update_payment_information_for_user.html" - } - }, - { - "op": "add", - "path": "/paths/~1user~1payment/post/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import create_payment_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Customer, Error\nfrom kittycad.models.billing_info import BillingInfo\nfrom kittycad.types import Response\n\n\ndef example_create_payment_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[Customer, Error]\n ] = create_payment_information_for_user.sync(\n client=client,\n body=BillingInfo(\n name=\"\",\n phone=\"\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Customer = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.create_payment_information_for_user.html" - } - }, - { - "op": "add", - "path": "/paths/~1user~1payment/get/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import get_payment_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Customer, Error\nfrom kittycad.types import Response\n\n\ndef example_get_payment_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[Customer, Error]\n ] = get_payment_information_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Customer = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.get_payment_information_for_user.html" - } - }, - { - "op": "add", - "path": "/paths/~1user~1payment/delete/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import delete_payment_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_payment_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_payment_information_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.delete_payment_information_for_user.html" - } - }, - { - "op": "add", - "path": "/paths/~1async~1operations/get/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import list_async_operations\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AsyncApiCallResultsPage, Error\nfrom kittycad.models.api_call_status import ApiCallStatus\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_async_operations():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[AsyncApiCallResultsPage, Error]\n ] = list_async_operations.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n status=ApiCallStatus.QUEUED,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AsyncApiCallResultsPage = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_async_operations.html" - } - }, - { - "op": "add", - "path": "/paths/~1auth~1email~1callback/get/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.hidden import auth_email_callback\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_auth_email_callback():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = auth_email_callback.sync(\n client=client,\n email=\"\",\n token=\"\",\n callback_url=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.hidden.auth_email_callback.html" - } - }, - { - "op": "add", - "path": "/paths/~1ping/get/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.meta import ping\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Pong\nfrom kittycad.types import Response\n\n\ndef example_ping():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Pong, Error]] = ping.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Pong = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.ping.html" - } - }, - { - "op": "add", - "path": "/paths/~1unit~1conversion~1frequency~1{input_unit}~1{output_unit}/get/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_frequency_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitFrequencyConversion\nfrom kittycad.models.unit_frequency import UnitFrequency\nfrom kittycad.types import Response\n\n\ndef example_get_frequency_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitFrequencyConversion, Error]\n ] = get_frequency_unit_conversion.sync(\n client=client,\n input_unit=UnitFrequency.GIGAHERTZ,\n output_unit=UnitFrequency.GIGAHERTZ,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitFrequencyConversion = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_frequency_unit_conversion.html" - } - }, - { - "op": "add", - "path": "/paths/~1apps~1github~1webhook/post/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.apps import apps_github_webhook\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_apps_github_webhook():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = apps_github_webhook.sync(\n client=client,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.apps.apps_github_webhook.html" - } - }, - { - "op": "add", - "path": "/paths/~1api-calls~1{id}/get/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_api_call\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPrice, Error\nfrom kittycad.types import Response\n\n\ndef example_get_api_call():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiCallWithPrice, Error]] = get_api_call.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPrice = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call.html" - } - }, - { - "op": "add", - "path": "/paths/~1ws~1modeling~1commands/get/x-python", - "value": { - "example": "from kittycad.api.modeling import modeling_commands_ws\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_modeling_commands_ws():\n # Create our client.\n client = ClientFromEnv()\n\n # Connect to the websocket.\n websocket = modeling_commands_ws.sync(\n client=client,\n fps=10,\n unlocked_framerate=False,\n video_res_height=10,\n video_res_width=10,\n webrtc=False,\n )\n\n # Send a message.\n websocket.send(\"{}\")\n\n # Get the messages.\n for message in websocket:\n print(message)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.modeling.modeling_commands_ws.html" - } - }, - { - "op": "add", - "path": "/paths/~1/get/x-python", - "value": { - "example": "from kittycad.api.meta import get_schema\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_get_schema():\n # Create our client.\n client = ClientFromEnv()\n\n get_schema.sync(\n client=client,\n )\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_schema.html" - } - }, - { - "op": "add", - "path": "/paths/~1unit~1conversion~1temperature~1{input_unit}~1{output_unit}/get/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_temperature_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitTemperatureConversion\nfrom kittycad.models.unit_temperature import UnitTemperature\nfrom kittycad.types import Response\n\n\ndef example_get_temperature_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitTemperatureConversion, Error]\n ] = get_temperature_unit_conversion.sync(\n client=client,\n input_unit=UnitTemperature.CELSIUS,\n output_unit=UnitTemperature.CELSIUS,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitTemperatureConversion = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_temperature_unit_conversion.html" - } - }, - { - "op": "add", - "path": "/paths/~1_meta~1info/get/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.meta import get_metadata\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Metadata\nfrom kittycad.types import Response\n\n\ndef example_get_metadata():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Metadata, Error]] = get_metadata.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Metadata = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_metadata.html" - } - }, - { - "op": "add", - "path": "/paths/~1file~1center-of-mass/post/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_center_of_mass\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileCenterOfMass\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_length import UnitLength\nfrom kittycad.types import Response\n\n\ndef example_create_file_center_of_mass():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[FileCenterOfMass, Error]\n ] = create_file_center_of_mass.sync(\n client=client,\n output_unit=UnitLength.CM,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileCenterOfMass = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_center_of_mass.html" - } - }, - { - "op": "add", - "path": "/paths/~1unit~1conversion~1power~1{input_unit}~1{output_unit}/get/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_power_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitPowerConversion\nfrom kittycad.models.unit_power import UnitPower\nfrom kittycad.types import Response\n\n\ndef example_get_power_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitPowerConversion, Error]\n ] = get_power_unit_conversion.sync(\n client=client,\n input_unit=UnitPower.BTU_PER_MINUTE,\n output_unit=UnitPower.BTU_PER_MINUTE,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitPowerConversion = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_power_unit_conversion.html" - } - }, - { - "op": "add", - "path": "/paths/~1file~1volume/post/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_volume\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileVolume\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_volume import UnitVolume\nfrom kittycad.types import Response\n\n\ndef example_create_file_volume():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileVolume, Error]] = create_file_volume.sync(\n client=client,\n output_unit=UnitVolume.CM3,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileVolume = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_volume.html" - } - }, - { - "op": "add", - "path": "/paths/~1openai~1openapi.json/get/x-python", - "value": { - "example": "from kittycad.api.meta import get_openai_schema\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_get_openai_schema():\n # Create our client.\n client = ClientFromEnv()\n\n get_openai_schema.sync(\n client=client,\n )\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_openai_schema.html" - } - }, - { - "op": "add", - "path": "/paths/~1ws~1executor~1term/get/x-python", - "value": { - "example": "from kittycad.api.executor import create_executor_term\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_create_executor_term():\n # Create our client.\n client = ClientFromEnv()\n\n # Connect to the websocket.\n websocket = create_executor_term.sync(\n client=client,\n )\n\n # Send a message.\n websocket.send(\"{}\")\n\n # Get the messages.\n for message in websocket:\n print(message)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.executor.create_executor_term.html" - } - }, - { - "op": "add", - "path": "/paths/~1user~1payment~1tax/get/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import validate_customer_tax_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_validate_customer_tax_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = validate_customer_tax_information_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.validate_customer_tax_information_for_user.html" - } - }, - { - "op": "add", - "path": "/paths/~1file~1conversion~1{src_format}~1{output_format}/post/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileConversion\nfrom kittycad.models.file_export_format import FileExportFormat\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.types import Response\n\n\ndef example_create_file_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileConversion, Error]] = create_file_conversion.sync(\n client=client,\n output_format=FileExportFormat.FBX,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileConversion = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_conversion.html" - } - }, - { - "op": "add", - "path": "/paths/~1user~1payment~1methods~1{id}/delete/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import delete_payment_method_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_payment_method_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_payment_method_for_user.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.delete_payment_method_for_user.html" - } - }, - { - "op": "add", - "path": "/paths/~1unit~1conversion~1force~1{input_unit}~1{output_unit}/get/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_force_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitForceConversion\nfrom kittycad.models.unit_force import UnitForce\nfrom kittycad.types import Response\n\n\ndef example_get_force_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitForceConversion, Error]\n ] = get_force_unit_conversion.sync(\n client=client,\n input_unit=UnitForce.DYNES,\n output_unit=UnitForce.DYNES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitForceConversion = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_force_unit_conversion.html" - } - }, - { - "op": "add", - "path": "/paths/~1unit~1conversion~1pressure~1{input_unit}~1{output_unit}/get/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_pressure_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitPressureConversion\nfrom kittycad.models.unit_pressure import UnitPressure\nfrom kittycad.types import Response\n\n\ndef example_get_pressure_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitPressureConversion, Error]\n ] = get_pressure_unit_conversion.sync(\n client=client,\n input_unit=UnitPressure.ATMOSPHERES,\n output_unit=UnitPressure.ATMOSPHERES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitPressureConversion = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_pressure_unit_conversion.html" - } - }, - { - "op": "add", - "path": "/paths/~1modeling~1cmd-batch/post/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.modeling import cmd_batch\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ModelingOutcomes\nfrom kittycad.models.modeling_cmd import move_path_pen\nfrom kittycad.models.modeling_cmd_id import ModelingCmdId\nfrom kittycad.models.modeling_cmd_req import ModelingCmdReq\nfrom kittycad.models.modeling_cmd_req_batch import ModelingCmdReqBatch\nfrom kittycad.models.point3d import Point3d\nfrom kittycad.types import Response\n\n\ndef example_cmd_batch():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ModelingOutcomes, Error]] = cmd_batch.sync(\n client=client,\n body=ModelingCmdReqBatch(\n cmds={\n \"\": ModelingCmdReq(\n cmd=move_path_pen(\n path=ModelingCmdId(\"\"),\n to=Point3d(\n x=3.14,\n y=3.14,\n z=3.14,\n ),\n ),\n cmd_id=ModelingCmdId(\"\"),\n )\n },\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ModelingOutcomes = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.modeling.cmd_batch.html" - } - }, - { - "op": "add", - "path": "/paths/~1user~1payment~1methods/get/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import list_payment_methods_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, PaymentMethod\nfrom kittycad.types import Response\n\n\ndef example_list_payment_methods_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[List[PaymentMethod], Error]\n ] = list_payment_methods_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: List[PaymentMethod] = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.list_payment_methods_for_user.html" - } - }, - { - "op": "add", - "path": "/paths/~1user~1session~1{token}/get/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_session_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Session\nfrom kittycad.types import Response\n\n\ndef example_get_session_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Session, Error]] = get_session_for_user.sync(\n client=client,\n token=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Session = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_session_for_user.html" - } - }, - { - "op": "add", - "path": "/paths/~1user~1front-hash/get/x-python", - "value": { - "example": "from kittycad.api.users import get_user_front_hash_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_get_user_front_hash_self():\n # Create our client.\n client = ClientFromEnv()\n\n get_user_front_hash_self.sync(\n client=client,\n )\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_front_hash_self.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import list_api_calls_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPriceResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_api_calls_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiCallWithPriceResultsPage, Error]\n ] = list_api_calls_for_user.sync(\n client=client,\n id=\"\",\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPriceResultsPage = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_api_calls_for_user.html" } }, { @@ -353,18 +281,82 @@ }, { "op": "add", - "path": "/paths/~1ai~1image-to-3d~1{input_format}~1{output_format}/post/x-python", + "path": "/paths/~1user~1session~1{token}/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import create_image_to_3d\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Mesh\nfrom kittycad.models.file_export_format import FileExportFormat\nfrom kittycad.models.image_type import ImageType\nfrom kittycad.types import Response\n\n\ndef example_create_image_to_3d():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Mesh, Error]] = create_image_to_3d.sync(\n client=client,\n input_format=ImageType.PNG,\n output_format=FileExportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Mesh = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.create_image_to_3d.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_session_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Session\nfrom kittycad.types import Response\n\n\ndef example_get_session_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Session, Error]] = get_session_for_user.sync(\n client=client,\n token=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Session = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_session_for_user.html" } }, { "op": "add", - "path": "/paths/~1unit~1conversion~1length~1{input_unit}~1{output_unit}/get/x-python", + "path": "/paths/~1file~1execute~1{lang}/post/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_length_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitLengthConversion\nfrom kittycad.models.unit_length import UnitLength\nfrom kittycad.types import Response\n\n\ndef example_get_length_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitLengthConversion, Error]\n ] = get_length_unit_conversion.sync(\n client=client,\n input_unit=UnitLength.CM,\n output_unit=UnitLength.CM,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitLengthConversion = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_length_unit_conversion.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.executor import create_file_execution\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import CodeOutput, Error\nfrom kittycad.models.code_language import CodeLanguage\nfrom kittycad.types import Response\n\n\ndef example_create_file_execution():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[CodeOutput, Error]] = create_file_execution.sync(\n client=client,\n lang=CodeLanguage.GO,\n output=None, # Optional[str]\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: CodeOutput = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.executor.create_file_execution.html" + } + }, + { + "op": "add", + "path": "/paths/~1api-call-metrics/get/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_api_call_metrics\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallQueryGroup, Error\nfrom kittycad.models.api_call_query_group_by import ApiCallQueryGroupBy\nfrom kittycad.types import Response\n\n\ndef example_get_api_call_metrics():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[List[ApiCallQueryGroup], Error]\n ] = get_api_call_metrics.sync(\n client=client,\n group_by=ApiCallQueryGroupBy.EMAIL,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: List[ApiCallQueryGroup] = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call_metrics.html" + } + }, + { + "op": "add", + "path": "/paths/~1file~1conversion~1{src_format}~1{output_format}/post/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileConversion\nfrom kittycad.models.file_export_format import FileExportFormat\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.types import Response\n\n\ndef example_create_file_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileConversion, Error]] = create_file_conversion.sync(\n client=client,\n output_format=FileExportFormat.FBX,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileConversion = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_conversion.html" + } + }, + { + "op": "add", + "path": "/paths/~1unit~1conversion~1energy~1{input_unit}~1{output_unit}/get/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_energy_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitEnergyConversion\nfrom kittycad.models.unit_energy import UnitEnergy\nfrom kittycad.types import Response\n\n\ndef example_get_energy_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitEnergyConversion, Error]\n ] = get_energy_unit_conversion.sync(\n client=client,\n input_unit=UnitEnergy.BTU,\n output_unit=UnitEnergy.BTU,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitEnergyConversion = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_energy_unit_conversion.html" + } + }, + { + "op": "add", + "path": "/paths/~1user/get/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, User\nfrom kittycad.types import Response\n\n\ndef example_get_user_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[User, Error]] = get_user_self.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: User = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_self.html" + } + }, + { + "op": "add", + "path": "/paths/~1user/delete/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import delete_user_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_user_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_user_self.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.delete_user_self.html" + } + }, + { + "op": "add", + "path": "/paths/~1user/put/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import update_user_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, User\nfrom kittycad.models.update_user import UpdateUser\nfrom kittycad.types import Response\n\n\ndef example_update_user_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[User, Error]] = update_user_self.sync(\n client=client,\n body=UpdateUser(\n company=\"\",\n discord=\"\",\n first_name=\"\",\n github=\"\",\n last_name=\"\",\n phone=\"\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: User = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.update_user_self.html" + } + }, + { + "op": "add", + "path": "/paths/~1async~1operations~1{id}/get/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_async_operation\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import (\n Error,\n FileCenterOfMass,\n FileConversion,\n FileDensity,\n FileMass,\n FileSurfaceArea,\n FileVolume,\n)\nfrom kittycad.types import Response\n\n\ndef example_get_async_operation():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[\n FileConversion,\n FileCenterOfMass,\n FileMass,\n FileVolume,\n FileDensity,\n FileSurfaceArea,\n Error,\n ]\n ] = get_async_operation.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Union[\n FileConversion,\n FileCenterOfMass,\n FileMass,\n FileVolume,\n FileDensity,\n FileSurfaceArea,\n ] = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_async_operation.html" + } + }, + { + "op": "add", + "path": "/paths/~1auth~1email/post/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.hidden import auth_email\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, VerificationToken\nfrom kittycad.models.email_authentication_form import EmailAuthenticationForm\nfrom kittycad.types import Response\n\n\ndef example_auth_email():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[VerificationToken, Error]] = auth_email.sync(\n client=client,\n body=EmailAuthenticationForm(\n email=\"\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: VerificationToken = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.hidden.auth_email.html" } }, { @@ -375,6 +367,38 @@ "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.user_list_api_calls.html" } }, + { + "op": "add", + "path": "/paths/~1async~1operations/get/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import list_async_operations\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AsyncApiCallResultsPage, Error\nfrom kittycad.models.api_call_status import ApiCallStatus\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_async_operations():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[AsyncApiCallResultsPage, Error]\n ] = list_async_operations.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n status=ApiCallStatus.QUEUED,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AsyncApiCallResultsPage = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_async_operations.html" + } + }, + { + "op": "add", + "path": "/paths/~1user~1payment~1methods~1{id}/delete/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import delete_payment_method_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_payment_method_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_payment_method_for_user.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.delete_payment_method_for_user.html" + } + }, + { + "op": "add", + "path": "/paths/~1user~1payment~1intent/post/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import create_payment_intent_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, PaymentIntent\nfrom kittycad.types import Response\n\n\ndef example_create_payment_intent_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[PaymentIntent, Error]\n ] = create_payment_intent_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: PaymentIntent = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.create_payment_intent_for_user.html" + } + }, + { + "op": "add", + "path": "/paths/~1user~1api-calls~1{id}/get/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_api_call_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPrice, Error\nfrom kittycad.types import Response\n\n\ndef example_get_api_call_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiCallWithPrice, Error]] = get_api_call_for_user.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPrice = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call_for_user.html" + } + }, { "op": "add", "path": "/paths/~1user~1api-tokens~1{token}/get/x-python", @@ -393,122 +417,18 @@ }, { "op": "add", - "path": "/paths/~1apps~1github~1callback/get/x-python", + "path": "/paths/~1user~1extended/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.apps import apps_github_callback\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_apps_github_callback():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = apps_github_callback.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.apps.apps_github_callback.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user_self_extended\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ExtendedUser\nfrom kittycad.types import Response\n\n\ndef example_get_user_self_extended():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ExtendedUser, Error]] = get_user_self_extended.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ExtendedUser = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_self_extended.html" } }, { "op": "add", - "path": "/paths/~1file~1execute~1{lang}/post/x-python", + "path": "/paths/~1file~1volume/post/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.executor import create_file_execution\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import CodeOutput, Error\nfrom kittycad.models.code_language import CodeLanguage\nfrom kittycad.types import Response\n\n\ndef example_create_file_execution():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[CodeOutput, Error]] = create_file_execution.sync(\n client=client,\n lang=CodeLanguage.GO,\n output=None, # Optional[str]\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: CodeOutput = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.executor.create_file_execution.html" - } - }, - { - "op": "add", - "path": "/paths/~1unit~1conversion~1mass~1{input_unit}~1{output_unit}/get/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_mass_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitMassConversion\nfrom kittycad.models.unit_mass import UnitMass\nfrom kittycad.types import Response\n\n\ndef example_get_mass_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitMassConversion, Error]\n ] = get_mass_unit_conversion.sync(\n client=client,\n input_unit=UnitMass.G,\n output_unit=UnitMass.G,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitMassConversion = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_mass_unit_conversion.html" - } - }, - { - "op": "add", - "path": "/paths/~1user~1payment~1balance/get/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import get_payment_balance_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import CustomerBalance, Error\nfrom kittycad.types import Response\n\n\ndef example_get_payment_balance_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[CustomerBalance, Error]\n ] = get_payment_balance_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: CustomerBalance = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.get_payment_balance_for_user.html" - } - }, - { - "op": "add", - "path": "/paths/~1unit~1conversion~1torque~1{input_unit}~1{output_unit}/get/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_torque_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitTorqueConversion\nfrom kittycad.models.unit_torque import UnitTorque\nfrom kittycad.types import Response\n\n\ndef example_get_torque_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitTorqueConversion, Error]\n ] = get_torque_unit_conversion.sync(\n client=client,\n input_unit=UnitTorque.NEWTON_METRES,\n output_unit=UnitTorque.NEWTON_METRES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitTorqueConversion = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_torque_unit_conversion.html" - } - }, - { - "op": "add", - "path": "/paths/~1file~1density/post/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_density\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileDensity\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_density import UnitDensity\nfrom kittycad.models.unit_mass import UnitMass\nfrom kittycad.types import Response\n\n\ndef example_create_file_density():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileDensity, Error]] = create_file_density.sync(\n client=client,\n material_mass=3.14,\n material_mass_unit=UnitMass.G,\n output_unit=UnitDensity.LB_FT3,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileDensity = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_density.html" - } - }, - { - "op": "add", - "path": "/paths/~1file~1surface-area/post/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_surface_area\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileSurfaceArea\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_area import UnitArea\nfrom kittycad.types import Response\n\n\ndef example_create_file_surface_area():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[FileSurfaceArea, Error]\n ] = create_file_surface_area.sync(\n client=client,\n output_unit=UnitArea.CM2,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileSurfaceArea = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_surface_area.html" - } - }, - { - "op": "add", - "path": "/paths/~1ai~1text-to-3d~1{output_format}/post/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import create_text_to_3d\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Mesh\nfrom kittycad.models.file_export_format import FileExportFormat\nfrom kittycad.types import Response\n\n\ndef example_create_text_to_3d():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Mesh, Error]] = create_text_to_3d.sync(\n client=client,\n output_format=FileExportFormat.FBX,\n prompt=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Mesh = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.create_text_to_3d.html" - } - }, - { - "op": "add", - "path": "/paths/~1api-call-metrics/get/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_api_call_metrics\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallQueryGroup, Error\nfrom kittycad.models.api_call_query_group_by import ApiCallQueryGroupBy\nfrom kittycad.types import Response\n\n\ndef example_get_api_call_metrics():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[List[ApiCallQueryGroup], Error]\n ] = get_api_call_metrics.sync(\n client=client,\n group_by=ApiCallQueryGroupBy.EMAIL,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: List[ApiCallQueryGroup] = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call_metrics.html" - } - }, - { - "op": "add", - "path": "/paths/~1file~1mass/post/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_mass\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileMass\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_density import UnitDensity\nfrom kittycad.models.unit_mass import UnitMass\nfrom kittycad.types import Response\n\n\ndef example_create_file_mass():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileMass, Error]] = create_file_mass.sync(\n client=client,\n material_density=3.14,\n material_density_unit=UnitDensity.LB_FT3,\n output_unit=UnitMass.G,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileMass = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_mass.html" - } - }, - { - "op": "add", - "path": "/paths/~1user~1payment~1intent/post/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import create_payment_intent_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, PaymentIntent\nfrom kittycad.types import Response\n\n\ndef example_create_payment_intent_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[PaymentIntent, Error]\n ] = create_payment_intent_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: PaymentIntent = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.create_payment_intent_for_user.html" - } - }, - { - "op": "add", - "path": "/paths/~1user~1payment~1invoices/get/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import list_invoices_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Invoice\nfrom kittycad.types import Response\n\n\ndef example_list_invoices_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[List[Invoice], Error]] = list_invoices_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: List[Invoice] = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.list_invoices_for_user.html" - } - }, - { - "op": "add", - "path": "/paths/~1.well-known~1ai-plugin.json/get/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.meta import get_ai_plugin_manifest\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AiPluginManifest, Error\nfrom kittycad.types import Response\n\n\ndef example_get_ai_plugin_manifest():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[AiPluginManifest, Error]\n ] = get_ai_plugin_manifest.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AiPluginManifest = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_ai_plugin_manifest.html" - } - }, - { - "op": "add", - "path": "/paths/~1api-calls/get/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import list_api_calls\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPriceResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_api_calls():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiCallWithPriceResultsPage, Error]\n ] = list_api_calls.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPriceResultsPage = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_api_calls.html" - } - }, - { - "op": "add", - "path": "/paths/~1users-extended~1{id}/get/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user_extended\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ExtendedUser\nfrom kittycad.types import Response\n\n\ndef example_get_user_extended():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ExtendedUser, Error]] = get_user_extended.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ExtendedUser = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_extended.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_volume\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileVolume\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_volume import UnitVolume\nfrom kittycad.types import Response\n\n\ndef example_create_file_volume():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileVolume, Error]] = create_file_volume.sync(\n client=client,\n output_unit=UnitVolume.CM3,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileVolume = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_volume.html" } }, { @@ -519,6 +439,62 @@ "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_volume_unit_conversion.html" } }, + { + "op": "add", + "path": "/paths/~1unit~1conversion~1current~1{input_unit}~1{output_unit}/get/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_current_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitCurrentConversion\nfrom kittycad.models.unit_current import UnitCurrent\nfrom kittycad.types import Response\n\n\ndef example_get_current_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitCurrentConversion, Error]\n ] = get_current_unit_conversion.sync(\n client=client,\n input_unit=UnitCurrent.AMPERES,\n output_unit=UnitCurrent.AMPERES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitCurrentConversion = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_current_unit_conversion.html" + } + }, + { + "op": "add", + "path": "/paths/~1unit~1conversion~1torque~1{input_unit}~1{output_unit}/get/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_torque_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitTorqueConversion\nfrom kittycad.models.unit_torque import UnitTorque\nfrom kittycad.types import Response\n\n\ndef example_get_torque_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitTorqueConversion, Error]\n ] = get_torque_unit_conversion.sync(\n client=client,\n input_unit=UnitTorque.NEWTON_METRES,\n output_unit=UnitTorque.NEWTON_METRES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitTorqueConversion = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_torque_unit_conversion.html" + } + }, + { + "op": "add", + "path": "/paths/~1api-calls~1{id}/get/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_api_call\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPrice, Error\nfrom kittycad.types import Response\n\n\ndef example_get_api_call():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiCallWithPrice, Error]] = get_api_call.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPrice = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call.html" + } + }, + { + "op": "add", + "path": "/paths/~1user~1onboarding/get/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user_onboarding_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Onboarding\nfrom kittycad.types import Response\n\n\ndef example_get_user_onboarding_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Onboarding, Error]] = get_user_onboarding_self.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Onboarding = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_onboarding_self.html" + } + }, + { + "op": "add", + "path": "/paths/~1ping/get/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.meta import ping\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Pong\nfrom kittycad.types import Response\n\n\ndef example_ping():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Pong, Error]] = ping.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Pong = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.ping.html" + } + }, + { + "op": "add", + "path": "/paths/~1file~1center-of-mass/post/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_center_of_mass\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileCenterOfMass\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_length import UnitLength\nfrom kittycad.types import Response\n\n\ndef example_create_file_center_of_mass():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[FileCenterOfMass, Error]\n ] = create_file_center_of_mass.sync(\n client=client,\n output_unit=UnitLength.CM,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileCenterOfMass = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_center_of_mass.html" + } + }, + { + "op": "add", + "path": "/paths/~1unit~1conversion~1pressure~1{input_unit}~1{output_unit}/get/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_pressure_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitPressureConversion\nfrom kittycad.models.unit_pressure import UnitPressure\nfrom kittycad.types import Response\n\n\ndef example_get_pressure_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitPressureConversion, Error]\n ] = get_pressure_unit_conversion.sync(\n client=client,\n input_unit=UnitPressure.ATMOSPHERES,\n output_unit=UnitPressure.ATMOSPHERES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitPressureConversion = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_pressure_unit_conversion.html" + } + }, { "op": "add", "path": "/paths/~1users-extended/get/x-python", @@ -529,42 +505,50 @@ }, { "op": "add", - "path": "/paths/~1logout/post/x-python", + "path": "/paths/~1user~1payment/put/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.hidden import logout\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_logout():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = logout.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.hidden.logout.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import update_payment_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Customer, Error\nfrom kittycad.models.billing_info import BillingInfo\nfrom kittycad.types import Response\n\n\ndef example_update_payment_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[Customer, Error]\n ] = update_payment_information_for_user.sync(\n client=client,\n body=BillingInfo(\n name=\"\",\n phone=\"\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Customer = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.update_payment_information_for_user.html" } }, { "op": "add", - "path": "/paths/~1user~1extended/get/x-python", + "path": "/paths/~1user~1payment/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user_self_extended\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ExtendedUser\nfrom kittycad.types import Response\n\n\ndef example_get_user_self_extended():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ExtendedUser, Error]] = get_user_self_extended.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ExtendedUser = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_self_extended.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import get_payment_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Customer, Error\nfrom kittycad.types import Response\n\n\ndef example_get_payment_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[Customer, Error]\n ] = get_payment_information_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Customer = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.get_payment_information_for_user.html" } }, { "op": "add", - "path": "/paths/~1user~1api-calls~1{id}/get/x-python", + "path": "/paths/~1user~1payment/delete/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_api_call_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPrice, Error\nfrom kittycad.types import Response\n\n\ndef example_get_api_call_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiCallWithPrice, Error]] = get_api_call_for_user.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPrice = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call_for_user.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import delete_payment_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_payment_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_payment_information_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.delete_payment_information_for_user.html" } }, { "op": "add", - "path": "/paths/~1auth~1email/post/x-python", + "path": "/paths/~1user~1payment/post/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.hidden import auth_email\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, VerificationToken\nfrom kittycad.models.email_authentication_form import EmailAuthenticationForm\nfrom kittycad.types import Response\n\n\ndef example_auth_email():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[VerificationToken, Error]] = auth_email.sync(\n client=client,\n body=EmailAuthenticationForm(\n email=\"\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: VerificationToken = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.hidden.auth_email.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import create_payment_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Customer, Error\nfrom kittycad.models.billing_info import BillingInfo\nfrom kittycad.types import Response\n\n\ndef example_create_payment_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[Customer, Error]\n ] = create_payment_information_for_user.sync(\n client=client,\n body=BillingInfo(\n name=\"\",\n phone=\"\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Customer = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.create_payment_information_for_user.html" } }, { "op": "add", - "path": "/info/x-python", + "path": "/paths/~1ws~1modeling~1commands/get/x-python", "value": { - "client": "# Create a client with your token.\nfrom kittycad import Client\n\nclient = Client(token=\"$TOKEN\")\n\n# - OR -\n\n# Create a new client with your token parsed from the environment variable:\n# `KITTYCAD_API_TOKEN`.\nfrom kittycad import ClientFromEnv\n\nclient = ClientFromEnv()\n\n# NOTE: The python library additionally implements asyncio, however all the code samples we\n# show below use the sync functions for ease of use and understanding.\n# Check out the library docs at:\n# https://python.api.docs.kittycad.io/_autosummary/kittycad.api.html#module-kittycad.api\n# for more details.", - "install": "pip install kittycad" + "example": "from kittycad.api.modeling import modeling_commands_ws\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_modeling_commands_ws():\n # Create our client.\n client = ClientFromEnv()\n\n # Connect to the websocket.\n websocket = modeling_commands_ws.sync(\n client=client,\n fps=10,\n unlocked_framerate=False,\n video_res_height=10,\n video_res_width=10,\n webrtc=False,\n )\n\n # Send a message.\n websocket.send(\"{}\")\n\n # Get the messages.\n for message in websocket:\n print(message)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.modeling.modeling_commands_ws.html" + } + }, + { + "op": "add", + "path": "/paths/~1users/get/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import list_users\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UserResultsPage\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_users():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[UserResultsPage, Error]] = list_users.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UserResultsPage = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.list_users.html" } } ] \ No newline at end of file diff --git a/kittycad/api/modeling/cmd.py b/kittycad/api/modeling/cmd.py deleted file mode 100644 index 0fbc367ed..000000000 --- a/kittycad/api/modeling/cmd.py +++ /dev/null @@ -1,472 +0,0 @@ -from typing import Any, Dict, Optional, Union - -import httpx - -from ...client import Client -from ...models.curve_get_control_points import CurveGetControlPoints -from ...models.curve_get_type import CurveGetType -from ...models.empty import Empty -from ...models.entity_get_all_child_uuids import EntityGetAllChildUuids -from ...models.entity_get_child_uuid import EntityGetChildUuid -from ...models.entity_get_num_children import EntityGetNumChildren -from ...models.entity_get_parent_id import EntityGetParentId -from ...models.error import Error -from ...models.export import Export -from ...models.get_entity_type import GetEntityType -from ...models.highlight_set_entity import HighlightSetEntity -from ...models.modeling_cmd_req import ModelingCmdReq -from ...models.mouse_click import MouseClick -from ...models.path_get_info import PathGetInfo -from ...models.select_get import SelectGet -from ...models.select_with_point import SelectWithPoint -from ...models.solid3d_get_all_edge_faces import Solid3dGetAllEdgeFaces -from ...models.solid3d_get_all_opposite_edges import Solid3dGetAllOppositeEdges -from ...models.solid3d_get_next_adjacent_edge import Solid3dGetNextAdjacentEdge -from ...models.solid3d_get_opposite_edge import Solid3dGetOppositeEdge -from ...models.solid3d_get_prev_adjacent_edge import Solid3dGetPrevAdjacentEdge -from ...models.take_snapshot import TakeSnapshot -from ...types import Response - - -def _get_kwargs( - body: ModelingCmdReq, - *, - client: Client, -) -> Dict[str, Any]: - url = "{}/modeling/cmd".format( - client.base_url, - ) # 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(), - "content": body, - } - - -def _parse_response( - *, response: httpx.Response -) -> Optional[ - Union[ - Empty, - Export, - SelectWithPoint, - HighlightSetEntity, - EntityGetChildUuid, - EntityGetNumChildren, - EntityGetParentId, - EntityGetAllChildUuids, - SelectGet, - GetEntityType, - Solid3dGetAllEdgeFaces, - Solid3dGetAllOppositeEdges, - Solid3dGetOppositeEdge, - Solid3dGetPrevAdjacentEdge, - Solid3dGetNextAdjacentEdge, - MouseClick, - CurveGetType, - CurveGetControlPoints, - TakeSnapshot, - PathGetInfo, - Error, - ] -]: - if response.status_code == 200: - data = response.json() - try: - if not isinstance(data, dict): - raise TypeError() - option_empty = Empty.from_dict(data) - return option_empty - except ValueError: - pass - except TypeError: - pass - try: - if not isinstance(data, dict): - raise TypeError() - option_export = Export.from_dict(data) - return option_export - except ValueError: - pass - except TypeError: - pass - try: - if not isinstance(data, dict): - raise TypeError() - option_select_with_point = SelectWithPoint.from_dict(data) - return option_select_with_point - except ValueError: - pass - except TypeError: - pass - try: - if not isinstance(data, dict): - raise TypeError() - option_highlight_set_entity = HighlightSetEntity.from_dict(data) - return option_highlight_set_entity - except ValueError: - pass - except TypeError: - pass - try: - if not isinstance(data, dict): - raise TypeError() - option_entity_get_child_uuid = EntityGetChildUuid.from_dict(data) - return option_entity_get_child_uuid - except ValueError: - pass - except TypeError: - pass - try: - if not isinstance(data, dict): - raise TypeError() - option_entity_get_num_children = EntityGetNumChildren.from_dict(data) - return option_entity_get_num_children - except ValueError: - pass - except TypeError: - pass - try: - if not isinstance(data, dict): - raise TypeError() - option_entity_get_parent_id = EntityGetParentId.from_dict(data) - return option_entity_get_parent_id - except ValueError: - pass - except TypeError: - pass - try: - if not isinstance(data, dict): - raise TypeError() - option_entity_get_all_child_uuids = EntityGetAllChildUuids.from_dict(data) - return option_entity_get_all_child_uuids - except ValueError: - pass - except TypeError: - pass - try: - if not isinstance(data, dict): - raise TypeError() - option_select_get = SelectGet.from_dict(data) - return option_select_get - except ValueError: - pass - except TypeError: - pass - try: - if not isinstance(data, dict): - raise TypeError() - option_get_entity_type = GetEntityType.from_dict(data) - return option_get_entity_type - except ValueError: - pass - except TypeError: - pass - try: - if not isinstance(data, dict): - raise TypeError() - option_solid3d_get_all_edge_faces = Solid3dGetAllEdgeFaces.from_dict(data) - return option_solid3d_get_all_edge_faces - except ValueError: - pass - except TypeError: - pass - try: - if not isinstance(data, dict): - raise TypeError() - option_solid3d_get_all_opposite_edges = ( - Solid3dGetAllOppositeEdges.from_dict(data) - ) - return option_solid3d_get_all_opposite_edges - except ValueError: - pass - except TypeError: - pass - try: - if not isinstance(data, dict): - raise TypeError() - option_solid3d_get_opposite_edge = Solid3dGetOppositeEdge.from_dict(data) - return option_solid3d_get_opposite_edge - except ValueError: - pass - except TypeError: - pass - try: - if not isinstance(data, dict): - raise TypeError() - option_solid3d_get_prev_adjacent_edge = ( - Solid3dGetPrevAdjacentEdge.from_dict(data) - ) - return option_solid3d_get_prev_adjacent_edge - except ValueError: - pass - except TypeError: - pass - try: - if not isinstance(data, dict): - raise TypeError() - option_solid3d_get_next_adjacent_edge = ( - Solid3dGetNextAdjacentEdge.from_dict(data) - ) - return option_solid3d_get_next_adjacent_edge - except ValueError: - pass - except TypeError: - pass - try: - if not isinstance(data, dict): - raise TypeError() - option_mouse_click = MouseClick.from_dict(data) - return option_mouse_click - except ValueError: - pass - except TypeError: - pass - try: - if not isinstance(data, dict): - raise TypeError() - option_curve_get_type = CurveGetType.from_dict(data) - return option_curve_get_type - except ValueError: - pass - except TypeError: - pass - try: - if not isinstance(data, dict): - raise TypeError() - option_curve_get_control_points = CurveGetControlPoints.from_dict(data) - return option_curve_get_control_points - except ValueError: - pass - except TypeError: - pass - try: - if not isinstance(data, dict): - raise TypeError() - option_take_snapshot = TakeSnapshot.from_dict(data) - return option_take_snapshot - except ValueError: - pass - except TypeError: - pass - try: - if not isinstance(data, dict): - raise TypeError() - option_path_get_info = PathGetInfo.from_dict(data) - return option_path_get_info - except ValueError: - raise - except TypeError: - raise - 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[ - Empty, - Export, - SelectWithPoint, - HighlightSetEntity, - EntityGetChildUuid, - EntityGetNumChildren, - EntityGetParentId, - EntityGetAllChildUuids, - SelectGet, - GetEntityType, - Solid3dGetAllEdgeFaces, - Solid3dGetAllOppositeEdges, - Solid3dGetOppositeEdge, - Solid3dGetPrevAdjacentEdge, - Solid3dGetNextAdjacentEdge, - MouseClick, - CurveGetType, - CurveGetControlPoints, - TakeSnapshot, - PathGetInfo, - Error, - ] - ] -]: - return Response( - status_code=response.status_code, - content=response.content, - headers=response.headers, - parsed=_parse_response(response=response), - ) - - -def sync_detailed( - body: ModelingCmdReq, - *, - client: Client, -) -> Response[ - Optional[ - Union[ - Empty, - Export, - SelectWithPoint, - HighlightSetEntity, - EntityGetChildUuid, - EntityGetNumChildren, - EntityGetParentId, - EntityGetAllChildUuids, - SelectGet, - GetEntityType, - Solid3dGetAllEdgeFaces, - Solid3dGetAllOppositeEdges, - Solid3dGetOppositeEdge, - Solid3dGetPrevAdjacentEdge, - Solid3dGetNextAdjacentEdge, - MouseClick, - CurveGetType, - CurveGetControlPoints, - TakeSnapshot, - PathGetInfo, - Error, - ] - ] -]: - kwargs = _get_kwargs( - body=body, - client=client, - ) - - response = httpx.post( - verify=client.verify_ssl, - **kwargs, - ) - - return _build_response(response=response) - - -def sync( - body: ModelingCmdReq, - *, - client: Client, -) -> Optional[ - Union[ - Empty, - Export, - SelectWithPoint, - HighlightSetEntity, - EntityGetChildUuid, - EntityGetNumChildren, - EntityGetParentId, - EntityGetAllChildUuids, - SelectGet, - GetEntityType, - Solid3dGetAllEdgeFaces, - Solid3dGetAllOppositeEdges, - Solid3dGetOppositeEdge, - Solid3dGetPrevAdjacentEdge, - Solid3dGetNextAdjacentEdge, - MouseClick, - CurveGetType, - CurveGetControlPoints, - TakeSnapshot, - PathGetInfo, - Error, - ] -]: - """Response depends on which command was submitted, so unfortunately the OpenAPI schema can't generate the right response type.""" # noqa: E501 - - return sync_detailed( - body=body, - client=client, - ).parsed - - -async def asyncio_detailed( - body: ModelingCmdReq, - *, - client: Client, -) -> Response[ - Optional[ - Union[ - Empty, - Export, - SelectWithPoint, - HighlightSetEntity, - EntityGetChildUuid, - EntityGetNumChildren, - EntityGetParentId, - EntityGetAllChildUuids, - SelectGet, - GetEntityType, - Solid3dGetAllEdgeFaces, - Solid3dGetAllOppositeEdges, - Solid3dGetOppositeEdge, - Solid3dGetPrevAdjacentEdge, - Solid3dGetNextAdjacentEdge, - MouseClick, - CurveGetType, - CurveGetControlPoints, - TakeSnapshot, - PathGetInfo, - Error, - ] - ] -]: - kwargs = _get_kwargs( - body=body, - client=client, - ) - - async with httpx.AsyncClient(verify=client.verify_ssl) as _client: - response = await _client.post(**kwargs) - - return _build_response(response=response) - - -async def asyncio( - body: ModelingCmdReq, - *, - client: Client, -) -> Optional[ - Union[ - Empty, - Export, - SelectWithPoint, - HighlightSetEntity, - EntityGetChildUuid, - EntityGetNumChildren, - EntityGetParentId, - EntityGetAllChildUuids, - SelectGet, - GetEntityType, - Solid3dGetAllEdgeFaces, - Solid3dGetAllOppositeEdges, - Solid3dGetOppositeEdge, - Solid3dGetPrevAdjacentEdge, - Solid3dGetNextAdjacentEdge, - MouseClick, - CurveGetType, - CurveGetControlPoints, - TakeSnapshot, - PathGetInfo, - Error, - ] -]: - """Response depends on which command was submitted, so unfortunately the OpenAPI schema can't generate the right response type.""" # noqa: E501 - - return ( - await asyncio_detailed( - body=body, - client=client, - ) - ).parsed diff --git a/kittycad/api/modeling/cmd_batch.py b/kittycad/api/modeling/cmd_batch.py deleted file mode 100644 index 23d9c277c..000000000 --- a/kittycad/api/modeling/cmd_batch.py +++ /dev/null @@ -1,114 +0,0 @@ -from typing import Any, Dict, Optional, Union - -import httpx - -from ...client import Client -from ...models.error import Error -from ...models.modeling_cmd_req_batch import ModelingCmdReqBatch -from ...models.modeling_outcomes import ModelingOutcomes -from ...types import Response - - -def _get_kwargs( - body: ModelingCmdReqBatch, - *, - client: Client, -) -> Dict[str, Any]: - url = "{}/modeling/cmd-batch".format( - client.base_url, - ) # 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(), - "content": body, - } - - -def _parse_response( - *, response: httpx.Response -) -> Optional[Union[ModelingOutcomes, Error]]: - if response.status_code == 200: - response_200 = ModelingOutcomes.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[ModelingOutcomes, Error]]]: - return Response( - status_code=response.status_code, - content=response.content, - headers=response.headers, - parsed=_parse_response(response=response), - ) - - -def sync_detailed( - body: ModelingCmdReqBatch, - *, - client: Client, -) -> Response[Optional[Union[ModelingOutcomes, Error]]]: - kwargs = _get_kwargs( - body=body, - client=client, - ) - - response = httpx.post( - verify=client.verify_ssl, - **kwargs, - ) - - return _build_response(response=response) - - -def sync( - body: ModelingCmdReqBatch, - *, - client: Client, -) -> Optional[Union[ModelingOutcomes, Error]]: - return sync_detailed( - body=body, - client=client, - ).parsed - - -async def asyncio_detailed( - body: ModelingCmdReqBatch, - *, - client: Client, -) -> Response[Optional[Union[ModelingOutcomes, Error]]]: - kwargs = _get_kwargs( - body=body, - client=client, - ) - - async with httpx.AsyncClient(verify=client.verify_ssl) as _client: - response = await _client.post(**kwargs) - - return _build_response(response=response) - - -async def asyncio( - body: ModelingCmdReqBatch, - *, - client: Client, -) -> Optional[Union[ModelingOutcomes, Error]]: - return ( - await asyncio_detailed( - body=body, - client=client, - ) - ).parsed diff --git a/kittycad/examples_test.py b/kittycad/examples_test.py index 234e5d725..4babc23e9 100644 --- a/kittycad/examples_test.py +++ b/kittycad/examples_test.py @@ -41,7 +41,7 @@ from kittycad.api.meta import ( get_schema, ping, ) -from kittycad.api.modeling import cmd, cmd_batch, modeling_commands_ws +from kittycad.api.modeling import modeling_commands_ws from kittycad.api.payments import ( create_payment_information_for_user, create_payment_intent_for_user, @@ -93,17 +93,9 @@ from kittycad.models import ( AppClientInfo, AsyncApiCallResultsPage, CodeOutput, - CurveGetControlPoints, - CurveGetType, Customer, CustomerBalance, - Empty, - EntityGetAllChildUuids, - EntityGetChildUuid, - EntityGetNumChildren, - EntityGetParentId, Error, - Export, ExtendedUser, ExtendedUserResultsPage, FileCenterOfMass, @@ -112,27 +104,14 @@ from kittycad.models import ( FileMass, FileSurfaceArea, FileVolume, - GetEntityType, - HighlightSetEntity, Invoice, Mesh, Metadata, - ModelingOutcomes, - MouseClick, Onboarding, - PathGetInfo, PaymentIntent, PaymentMethod, Pong, - SelectGet, - SelectWithPoint, Session, - Solid3dGetAllEdgeFaces, - Solid3dGetAllOppositeEdges, - Solid3dGetNextAdjacentEdge, - Solid3dGetOppositeEdge, - Solid3dGetPrevAdjacentEdge, - TakeSnapshot, UnitAngleConversion, UnitAreaConversion, UnitCurrentConversion, @@ -159,11 +138,6 @@ 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 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.point3d import Point3d from kittycad.models.unit_angle import UnitAngle from kittycad.models.unit_area import UnitArea from kittycad.models.unit_current import UnitCurrent @@ -1389,313 +1363,6 @@ async def test_logout_async(): ) -@pytest.mark.skip -def test_cmd(): - # Create our client. - client = ClientFromEnv() - - result: Optional[ - Union[ - Empty, - Export, - SelectWithPoint, - HighlightSetEntity, - EntityGetChildUuid, - EntityGetNumChildren, - EntityGetParentId, - EntityGetAllChildUuids, - SelectGet, - GetEntityType, - Solid3dGetAllEdgeFaces, - Solid3dGetAllOppositeEdges, - Solid3dGetOppositeEdge, - Solid3dGetPrevAdjacentEdge, - Solid3dGetNextAdjacentEdge, - MouseClick, - CurveGetType, - CurveGetControlPoints, - TakeSnapshot, - PathGetInfo, - Error, - ] - ] = cmd.sync( - client=client, - body=ModelingCmdReq( - cmd=move_path_pen( - path=ModelingCmdId(""), - to=Point3d( - x=3.14, - y=3.14, - z=3.14, - ), - ), - cmd_id=ModelingCmdId(""), - ), - ) - - if isinstance(result, Error) or result is None: - print(result) - raise Exception("Error in response") - - body: Union[ - Empty, - Export, - SelectWithPoint, - HighlightSetEntity, - EntityGetChildUuid, - EntityGetNumChildren, - EntityGetParentId, - EntityGetAllChildUuids, - SelectGet, - GetEntityType, - Solid3dGetAllEdgeFaces, - Solid3dGetAllOppositeEdges, - Solid3dGetOppositeEdge, - Solid3dGetPrevAdjacentEdge, - Solid3dGetNextAdjacentEdge, - MouseClick, - CurveGetType, - CurveGetControlPoints, - TakeSnapshot, - PathGetInfo, - ] = result - print(body) - - # OR if you need more info (e.g. status_code) - response: Response[ - Optional[ - Union[ - Empty, - Export, - SelectWithPoint, - HighlightSetEntity, - EntityGetChildUuid, - EntityGetNumChildren, - EntityGetParentId, - EntityGetAllChildUuids, - SelectGet, - GetEntityType, - Solid3dGetAllEdgeFaces, - Solid3dGetAllOppositeEdges, - Solid3dGetOppositeEdge, - Solid3dGetPrevAdjacentEdge, - Solid3dGetNextAdjacentEdge, - MouseClick, - CurveGetType, - CurveGetControlPoints, - TakeSnapshot, - PathGetInfo, - Error, - ] - ] - ] = cmd.sync_detailed( - client=client, - body=ModelingCmdReq( - cmd=move_path_pen( - path=ModelingCmdId(""), - to=Point3d( - x=3.14, - y=3.14, - z=3.14, - ), - ), - cmd_id=ModelingCmdId(""), - ), - ) - - -# OR run async -@pytest.mark.asyncio -@pytest.mark.skip -async def test_cmd_async(): - # Create our client. - client = ClientFromEnv() - - result: Optional[ - Union[ - Empty, - Export, - SelectWithPoint, - HighlightSetEntity, - EntityGetChildUuid, - EntityGetNumChildren, - EntityGetParentId, - EntityGetAllChildUuids, - SelectGet, - GetEntityType, - Solid3dGetAllEdgeFaces, - Solid3dGetAllOppositeEdges, - Solid3dGetOppositeEdge, - Solid3dGetPrevAdjacentEdge, - Solid3dGetNextAdjacentEdge, - MouseClick, - CurveGetType, - CurveGetControlPoints, - TakeSnapshot, - PathGetInfo, - Error, - ] - ] = await cmd.asyncio( - client=client, - body=ModelingCmdReq( - cmd=move_path_pen( - path=ModelingCmdId(""), - to=Point3d( - x=3.14, - y=3.14, - z=3.14, - ), - ), - cmd_id=ModelingCmdId(""), - ), - ) - - # OR run async with more info - response: Response[ - Optional[ - Union[ - Empty, - Export, - SelectWithPoint, - HighlightSetEntity, - EntityGetChildUuid, - EntityGetNumChildren, - EntityGetParentId, - EntityGetAllChildUuids, - SelectGet, - GetEntityType, - Solid3dGetAllEdgeFaces, - Solid3dGetAllOppositeEdges, - Solid3dGetOppositeEdge, - Solid3dGetPrevAdjacentEdge, - Solid3dGetNextAdjacentEdge, - MouseClick, - CurveGetType, - CurveGetControlPoints, - TakeSnapshot, - PathGetInfo, - Error, - ] - ] - ] = await cmd.asyncio_detailed( - client=client, - body=ModelingCmdReq( - cmd=move_path_pen( - path=ModelingCmdId(""), - to=Point3d( - x=3.14, - y=3.14, - z=3.14, - ), - ), - cmd_id=ModelingCmdId(""), - ), - ) - - -@pytest.mark.skip -def test_cmd_batch(): - # Create our client. - client = ClientFromEnv() - - result: Optional[Union[ModelingOutcomes, Error]] = cmd_batch.sync( - client=client, - body=ModelingCmdReqBatch( - cmds={ - "": ModelingCmdReq( - cmd=move_path_pen( - path=ModelingCmdId(""), - to=Point3d( - x=3.14, - y=3.14, - z=3.14, - ), - ), - cmd_id=ModelingCmdId(""), - ) - }, - ), - ) - - if isinstance(result, Error) or result is None: - print(result) - raise Exception("Error in response") - - body: ModelingOutcomes = result - print(body) - - # OR if you need more info (e.g. status_code) - response: Response[ - Optional[Union[ModelingOutcomes, Error]] - ] = cmd_batch.sync_detailed( - client=client, - body=ModelingCmdReqBatch( - cmds={ - "": ModelingCmdReq( - cmd=move_path_pen( - path=ModelingCmdId(""), - to=Point3d( - x=3.14, - y=3.14, - z=3.14, - ), - ), - cmd_id=ModelingCmdId(""), - ) - }, - ), - ) - - -# OR run async -@pytest.mark.asyncio -@pytest.mark.skip -async def test_cmd_batch_async(): - # Create our client. - client = ClientFromEnv() - - result: Optional[Union[ModelingOutcomes, Error]] = await cmd_batch.asyncio( - client=client, - body=ModelingCmdReqBatch( - cmds={ - "": ModelingCmdReq( - cmd=move_path_pen( - path=ModelingCmdId(""), - to=Point3d( - x=3.14, - y=3.14, - z=3.14, - ), - ), - cmd_id=ModelingCmdId(""), - ) - }, - ), - ) - - # OR run async with more info - response: Response[ - Optional[Union[ModelingOutcomes, Error]] - ] = await cmd_batch.asyncio_detailed( - client=client, - body=ModelingCmdReqBatch( - cmds={ - "": ModelingCmdReq( - cmd=move_path_pen( - path=ModelingCmdId(""), - to=Point3d( - x=3.14, - y=3.14, - z=3.14, - ), - ), - cmd_id=ModelingCmdId(""), - ) - }, - ), - ) - - @pytest.mark.skip def test_get_openai_schema(): # Create our client. diff --git a/kittycad/models/__init__.py b/kittycad/models/__init__.py index 4aaeabe70..d3f16ba19 100644 --- a/kittycad/models/__init__.py +++ b/kittycad/models/__init__.py @@ -7,6 +7,7 @@ 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 .angle import Angle from .annotation_line_end import AnnotationLineEnd from .annotation_line_end_options import AnnotationLineEndOptions from .annotation_options import AnnotationOptions @@ -34,30 +35,31 @@ from .billing_info import BillingInfo from .cache_metadata import CacheMetadata from .camera_drag_interaction_type import CameraDragInteractionType from .card_details import CardDetails +from .center_of_mass import CenterOfMass +from .client_metrics import ClientMetrics 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 from .coupon import Coupon from .created_at_sort_mode import CreatedAtSortMode from .currency import Currency from .curve_get_control_points import CurveGetControlPoints +from .curve_get_end_points import CurveGetEndPoints from .curve_get_type import CurveGetType from .curve_type import CurveType from .customer import Customer from .customer_balance import CustomerBalance +from .density import Density from .device_access_token_request_form import DeviceAccessTokenRequestForm from .device_auth_request_form import DeviceAuthRequestForm from .device_auth_verify_params import DeviceAuthVerifyParams from .direction import Direction from .discount import Discount -from .docker_system_info import DockerSystemInfo from .email_authentication_form import EmailAuthenticationForm from .empty import Empty -from .engine_metadata import EngineMetadata from .entity_get_all_child_uuids import EntityGetAllChildUuids from .entity_get_child_uuid import EntityGetChildUuid from .entity_get_num_children import EntityGetNumChildren @@ -66,7 +68,6 @@ from .entity_type import EntityType from .environment import Environment from .error import Error from .error_code import ErrorCode -from .executor_metadata import ExecutorMetadata from .export import Export from .export_file import ExportFile from .extended_user import ExtendedUser @@ -90,7 +91,8 @@ from .highlight_set_entity import HighlightSetEntity from .ice_server import IceServer from .image_format import ImageFormat from .image_type import ImageType -from .index_info import IndexInfo +from .import_file import ImportFile +from .import_files import ImportFiles from .input_format import InputFormat from .invoice import Invoice from .invoice_line_item import InvoiceLineItem @@ -100,17 +102,13 @@ from .jetstream_api_stats import JetstreamApiStats from .jetstream_config import JetstreamConfig from .jetstream_stats import JetstreamStats from .leaf_node import LeafNode +from .mass import Mass from .mesh import Mesh from .meta_cluster_info import MetaClusterInfo from .metadata import Metadata from .method import Method from .modeling_cmd import ModelingCmd from .modeling_cmd_id import ModelingCmdId -from .modeling_cmd_req import ModelingCmdReq -from .modeling_cmd_req_batch import ModelingCmdReqBatch -from .modeling_error import ModelingError -from .modeling_outcome import ModelingOutcome -from .modeling_outcomes import ModelingOutcomes from .mouse_click import MouseClick from .new_address import NewAddress from .o_auth2_client_info import OAuth2ClientInfo @@ -121,6 +119,7 @@ from .onboarding import Onboarding from .output_file import OutputFile from .output_format import OutputFormat from .path_command import PathCommand +from .path_get_curve_uuids_for_vertices import PathGetCurveUuidsForVertices from .path_get_info import PathGetInfo from .path_segment import PathSegment from .path_segment_info import PathSegmentInfo @@ -128,18 +127,16 @@ from .payment_intent import PaymentIntent from .payment_method import PaymentMethod from .payment_method_card_checks import PaymentMethodCardChecks from .payment_method_type import PaymentMethodType -from .plugins_info import PluginsInfo +from .plane_intersect_and_project import PlaneIntersectAndProject from .ply_storage import PlyStorage from .point2d import Point2d from .point3d import Point3d from .point_e_metadata import PointEMetadata from .pong import Pong from .raw_file import RawFile -from .registry_service_config import RegistryServiceConfig from .rtc_ice_candidate_init import RtcIceCandidateInit from .rtc_sdp_type import RtcSdpType from .rtc_session_description import RtcSessionDescription -from .runtime import Runtime from .scene_selection_type import SceneSelectionType from .scene_tool_type import SceneToolType from .select_get import SelectGet @@ -152,11 +149,8 @@ from .solid3d_get_opposite_edge import Solid3dGetOppositeEdge from .solid3d_get_prev_adjacent_edge import Solid3dGetPrevAdjacentEdge from .stl_storage import StlStorage from .success_web_socket_response import SuccessWebSocketResponse +from .surface_area import SurfaceArea from .system import System -from .system_info_cgroup_driver_enum import SystemInfoCgroupDriverEnum -from .system_info_cgroup_version_enum import SystemInfoCgroupVersionEnum -from .system_info_default_address_pools import SystemInfoDefaultAddressPools -from .system_info_isolation_enum import SystemInfoIsolationEnum from .take_snapshot import TakeSnapshot from .unit_angle import UnitAngle from .unit_angle_conversion import UnitAngleConversion @@ -190,5 +184,6 @@ from .user import User from .user_results_page import UserResultsPage from .uuid import Uuid from .verification_token import VerificationToken +from .volume import Volume from .web_socket_request import WebSocketRequest from .web_socket_response import WebSocketResponse diff --git a/kittycad/models/angle.py b/kittycad/models/angle.py new file mode 100644 index 000000000..e331581b6 --- /dev/null +++ b/kittycad/models/angle.py @@ -0,0 +1,69 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.unit_angle import UnitAngle +from ..types import UNSET, Unset + +GO = TypeVar("GO", bound="Angle") + + +@attr.s(auto_attribs=True) +class Angle: + """An angle, with a specific unit.""" # noqa: E501 + + unit: Union[Unset, UnitAngle] = UNSET + value: Union[Unset, float] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.unit, Unset): + unit = self.unit + value = self.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if unit is not UNSET: + field_dict["unit"] = unit + if value is not UNSET: + field_dict["value"] = value + + return field_dict + + @classmethod + def from_dict(cls: Type[GO], src_dict: Dict[str, Any]) -> GO: + d = src_dict.copy() + _unit = d.pop("unit", UNSET) + unit: Union[Unset, UnitAngle] + if isinstance(_unit, Unset): + unit = UNSET + else: + unit = _unit # type: ignore[arg-type] + + value = d.pop("value", UNSET) + + angle = cls( + unit=unit, + value=value, + ) + + angle.additional_properties = d + return angle + + @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 diff --git a/kittycad/models/annotation_line_end_options.py b/kittycad/models/annotation_line_end_options.py index f3cfd70f4..b57db268c 100644 --- a/kittycad/models/annotation_line_end_options.py +++ b/kittycad/models/annotation_line_end_options.py @@ -5,7 +5,7 @@ import attr from ..models.annotation_line_end import AnnotationLineEnd from ..types import UNSET, Unset -GO = TypeVar("GO", bound="AnnotationLineEndOptions") +PI = TypeVar("PI", bound="AnnotationLineEndOptions") @attr.s(auto_attribs=True) @@ -34,7 +34,7 @@ class AnnotationLineEndOptions: return field_dict @classmethod - def from_dict(cls: Type[GO], src_dict: Dict[str, Any]) -> GO: + def from_dict(cls: Type[PI], src_dict: Dict[str, Any]) -> PI: d = src_dict.copy() _end = d.pop("end", UNSET) end: Union[Unset, AnnotationLineEnd] diff --git a/kittycad/models/annotation_options.py b/kittycad/models/annotation_options.py index ca9c7df0d..59353e975 100644 --- a/kittycad/models/annotation_options.py +++ b/kittycad/models/annotation_options.py @@ -8,7 +8,7 @@ from ..models.color import Color from ..models.point3d import Point3d from ..types import UNSET, Unset -PI = TypeVar("PI", bound="AnnotationOptions") +UZ = TypeVar("UZ", bound="AnnotationOptions") @attr.s(auto_attribs=True) @@ -51,7 +51,7 @@ class AnnotationOptions: return field_dict @classmethod - def from_dict(cls: Type[PI], src_dict: Dict[str, Any]) -> PI: + def from_dict(cls: Type[UZ], src_dict: Dict[str, Any]) -> UZ: d = src_dict.copy() _color = d.pop("color", UNSET) color: Union[Unset, Color] diff --git a/kittycad/models/annotation_text_options.py b/kittycad/models/annotation_text_options.py index 8a25df305..3c7579251 100644 --- a/kittycad/models/annotation_text_options.py +++ b/kittycad/models/annotation_text_options.py @@ -6,7 +6,7 @@ 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") +FB = TypeVar("FB", bound="AnnotationTextOptions") @attr.s(auto_attribs=True) @@ -43,7 +43,7 @@ class AnnotationTextOptions: return field_dict @classmethod - def from_dict(cls: Type[UZ], src_dict: Dict[str, Any]) -> UZ: + def from_dict(cls: Type[FB], src_dict: Dict[str, Any]) -> FB: d = src_dict.copy() point_size = d.pop("point_size", UNSET) diff --git a/kittycad/models/api_call_query_group.py b/kittycad/models/api_call_query_group.py index 7f439af8a..200595dc1 100644 --- a/kittycad/models/api_call_query_group.py +++ b/kittycad/models/api_call_query_group.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -FB = TypeVar("FB", bound="ApiCallQueryGroup") +QP = TypeVar("QP", bound="ApiCallQueryGroup") @attr.s(auto_attribs=True) @@ -31,7 +31,7 @@ class ApiCallQueryGroup: return field_dict @classmethod - def from_dict(cls: Type[FB], src_dict: Dict[str, Any]) -> FB: + def from_dict(cls: Type[QP], src_dict: Dict[str, Any]) -> QP: d = src_dict.copy() count = d.pop("count", UNSET) diff --git a/kittycad/models/api_call_with_price.py b/kittycad/models/api_call_with_price.py index 5aac75327..76ef5acb8 100644 --- a/kittycad/models/api_call_with_price.py +++ b/kittycad/models/api_call_with_price.py @@ -8,7 +8,7 @@ from ..models.method import Method from ..models.uuid import Uuid from ..types import UNSET, Unset -QP = TypeVar("QP", bound="ApiCallWithPrice") +KC = TypeVar("KC", bound="ApiCallWithPrice") @attr.s(auto_attribs=True) @@ -126,7 +126,7 @@ class ApiCallWithPrice: return field_dict @classmethod - def from_dict(cls: Type[QP], src_dict: Dict[str, Any]) -> QP: + def from_dict(cls: Type[KC], src_dict: Dict[str, Any]) -> KC: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/api_call_with_price_results_page.py b/kittycad/models/api_call_with_price_results_page.py index 80bcc6c00..b33a5da4c 100644 --- a/kittycad/models/api_call_with_price_results_page.py +++ b/kittycad/models/api_call_with_price_results_page.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -KC = TypeVar("KC", bound="ApiCallWithPriceResultsPage") +HX = TypeVar("HX", bound="ApiCallWithPriceResultsPage") @attr.s(auto_attribs=True) @@ -37,7 +37,7 @@ class ApiCallWithPriceResultsPage: return field_dict @classmethod - def from_dict(cls: Type[KC], src_dict: Dict[str, Any]) -> KC: + def from_dict(cls: Type[HX], src_dict: Dict[str, Any]) -> HX: d = src_dict.copy() from ..models.api_call_with_price import ApiCallWithPrice diff --git a/kittycad/models/api_error.py b/kittycad/models/api_error.py index d54561280..d124426a4 100644 --- a/kittycad/models/api_error.py +++ b/kittycad/models/api_error.py @@ -5,7 +5,7 @@ import attr from ..models.error_code import ErrorCode from ..types import UNSET, Unset -HX = TypeVar("HX", bound="ApiError") +LB = TypeVar("LB", bound="ApiError") @attr.s(auto_attribs=True) @@ -33,7 +33,7 @@ class ApiError: return field_dict @classmethod - def from_dict(cls: Type[HX], src_dict: Dict[str, Any]) -> HX: + def from_dict(cls: Type[LB], src_dict: Dict[str, Any]) -> LB: d = src_dict.copy() _error_code = d.pop("error_code", UNSET) error_code: Union[Unset, ErrorCode] diff --git a/kittycad/models/api_token.py b/kittycad/models/api_token.py index ee019e5e2..3070d4cf3 100644 --- a/kittycad/models/api_token.py +++ b/kittycad/models/api_token.py @@ -7,7 +7,7 @@ from dateutil.parser import isoparse from ..models.uuid import Uuid from ..types import UNSET, Unset -LB = TypeVar("LB", bound="ApiToken") +NE = TypeVar("NE", bound="ApiToken") @attr.s(auto_attribs=True) @@ -56,7 +56,7 @@ class ApiToken: return field_dict @classmethod - def from_dict(cls: Type[LB], src_dict: Dict[str, Any]) -> LB: + def from_dict(cls: Type[NE], src_dict: Dict[str, Any]) -> NE: d = src_dict.copy() _created_at = d.pop("created_at", UNSET) created_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/api_token_results_page.py b/kittycad/models/api_token_results_page.py index 3e9c36fc4..cf9f1095a 100644 --- a/kittycad/models/api_token_results_page.py +++ b/kittycad/models/api_token_results_page.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -NE = TypeVar("NE", bound="ApiTokenResultsPage") +TL = TypeVar("TL", bound="ApiTokenResultsPage") @attr.s(auto_attribs=True) @@ -37,7 +37,7 @@ class ApiTokenResultsPage: return field_dict @classmethod - def from_dict(cls: Type[NE], src_dict: Dict[str, Any]) -> NE: + def from_dict(cls: Type[TL], src_dict: Dict[str, Any]) -> TL: d = src_dict.copy() from ..models.api_token import ApiToken diff --git a/kittycad/models/app_client_info.py b/kittycad/models/app_client_info.py index 52fb5576a..d74890b7d 100644 --- a/kittycad/models/app_client_info.py +++ b/kittycad/models/app_client_info.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -TL = TypeVar("TL", bound="AppClientInfo") +MN = TypeVar("MN", bound="AppClientInfo") @attr.s(auto_attribs=True) @@ -27,7 +27,7 @@ class AppClientInfo: return field_dict @classmethod - def from_dict(cls: Type[TL], src_dict: Dict[str, Any]) -> TL: + def from_dict(cls: Type[MN], src_dict: Dict[str, Any]) -> MN: d = src_dict.copy() url = d.pop("url", UNSET) diff --git a/kittycad/models/async_api_call.py b/kittycad/models/async_api_call.py index 8425cc6ba..acac65897 100644 --- a/kittycad/models/async_api_call.py +++ b/kittycad/models/async_api_call.py @@ -9,7 +9,7 @@ from ..models.async_api_call_type import AsyncApiCallType from ..models.uuid import Uuid from ..types import UNSET, Unset -MN = TypeVar("MN", bound="AsyncApiCall") +JV = TypeVar("JV", bound="AsyncApiCall") @attr.s(auto_attribs=True) @@ -86,7 +86,7 @@ class AsyncApiCall: return field_dict @classmethod - def from_dict(cls: Type[MN], src_dict: Dict[str, Any]) -> MN: + def from_dict(cls: Type[JV], src_dict: Dict[str, Any]) -> JV: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/async_api_call_output.py b/kittycad/models/async_api_call_output.py index 408957fef..98bcfda3d 100644 --- a/kittycad/models/async_api_call_output.py +++ b/kittycad/models/async_api_call_output.py @@ -19,7 +19,7 @@ from ..models.unit_volume import UnitVolume from ..models.uuid import Uuid from ..types import UNSET, Unset -JV = TypeVar("JV", bound="file_conversion") +IO = TypeVar("IO", bound="file_conversion") @attr.s(auto_attribs=True) @@ -111,7 +111,7 @@ class file_conversion: return field_dict @classmethod - def from_dict(cls: Type[JV], src_dict: Dict[str, Any]) -> JV: + 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] @@ -235,7 +235,7 @@ class file_conversion: return key in self.additional_properties -IO = TypeVar("IO", bound="file_center_of_mass") +FV = TypeVar("FV", bound="file_center_of_mass") @attr.s(auto_attribs=True) @@ -313,7 +313,7 @@ class file_center_of_mass: return field_dict @classmethod - def from_dict(cls: Type[IO], src_dict: Dict[str, Any]) -> IO: + def from_dict(cls: Type[FV], src_dict: Dict[str, Any]) -> FV: d = src_dict.copy() _center_of_mass = d.pop("center_of_mass", UNSET) center_of_mass: Union[Unset, Point3d] @@ -419,7 +419,7 @@ class file_center_of_mass: return key in self.additional_properties -FV = TypeVar("FV", bound="file_mass") +LE = TypeVar("LE", bound="file_mass") @attr.s(auto_attribs=True) @@ -505,7 +505,7 @@ class file_mass: return field_dict @classmethod - def from_dict(cls: Type[FV], src_dict: Dict[str, Any]) -> FV: + 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] @@ -617,7 +617,7 @@ class file_mass: return key in self.additional_properties -LE = TypeVar("LE", bound="file_volume") +OY = TypeVar("OY", bound="file_volume") @attr.s(auto_attribs=True) @@ -694,7 +694,7 @@ class file_volume: return field_dict @classmethod - def from_dict(cls: Type[LE], src_dict: Dict[str, Any]) -> LE: + 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] @@ -795,7 +795,7 @@ class file_volume: return key in self.additional_properties -OY = TypeVar("OY", bound="file_density") +HO = TypeVar("HO", bound="file_density") @attr.s(auto_attribs=True) @@ -881,7 +881,7 @@ class file_density: return field_dict @classmethod - def from_dict(cls: Type[OY], src_dict: Dict[str, Any]) -> OY: + def from_dict(cls: Type[HO], src_dict: Dict[str, Any]) -> HO: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] @@ -993,7 +993,7 @@ class file_density: return key in self.additional_properties -HO = TypeVar("HO", bound="file_surface_area") +TM = TypeVar("TM", bound="file_surface_area") @attr.s(auto_attribs=True) @@ -1070,7 +1070,7 @@ class file_surface_area: return field_dict @classmethod - def from_dict(cls: Type[HO], src_dict: Dict[str, Any]) -> HO: + def from_dict(cls: Type[TM], src_dict: Dict[str, Any]) -> TM: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/async_api_call_results_page.py b/kittycad/models/async_api_call_results_page.py index c09dc86b8..c8749db59 100644 --- a/kittycad/models/async_api_call_results_page.py +++ b/kittycad/models/async_api_call_results_page.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -TM = TypeVar("TM", bound="AsyncApiCallResultsPage") +BS = TypeVar("BS", bound="AsyncApiCallResultsPage") @attr.s(auto_attribs=True) @@ -37,7 +37,7 @@ class AsyncApiCallResultsPage: return field_dict @classmethod - def from_dict(cls: Type[TM], src_dict: Dict[str, Any]) -> TM: + def from_dict(cls: Type[BS], src_dict: Dict[str, Any]) -> BS: d = src_dict.copy() from ..models.async_api_call import AsyncApiCall diff --git a/kittycad/models/axis_direction_pair.py b/kittycad/models/axis_direction_pair.py index ea53a700b..460ac860f 100644 --- a/kittycad/models/axis_direction_pair.py +++ b/kittycad/models/axis_direction_pair.py @@ -6,7 +6,7 @@ from ..models.axis import Axis from ..models.direction import Direction from ..types import UNSET, Unset -BS = TypeVar("BS", bound="AxisDirectionPair") +AH = TypeVar("AH", bound="AxisDirectionPair") @attr.s(auto_attribs=True) @@ -35,7 +35,7 @@ class AxisDirectionPair: return field_dict @classmethod - def from_dict(cls: Type[BS], src_dict: Dict[str, Any]) -> BS: + def from_dict(cls: Type[AH], src_dict: Dict[str, Any]) -> AH: d = src_dict.copy() _axis = d.pop("axis", UNSET) axis: Union[Unset, Axis] diff --git a/kittycad/models/billing_info.py b/kittycad/models/billing_info.py index 1c94bbe16..949d764c9 100644 --- a/kittycad/models/billing_info.py +++ b/kittycad/models/billing_info.py @@ -5,7 +5,7 @@ import attr from ..models.new_address import NewAddress from ..types import UNSET, Unset -AH = TypeVar("AH", bound="BillingInfo") +EG = TypeVar("EG", bound="BillingInfo") @attr.s(auto_attribs=True) @@ -37,7 +37,7 @@ class BillingInfo: return field_dict @classmethod - def from_dict(cls: Type[AH], src_dict: Dict[str, Any]) -> AH: + def from_dict(cls: Type[EG], src_dict: Dict[str, Any]) -> EG: d = src_dict.copy() _address = d.pop("address", UNSET) address: Union[Unset, NewAddress] diff --git a/kittycad/models/cache_metadata.py b/kittycad/models/cache_metadata.py index e2a11db9d..4044a5851 100644 --- a/kittycad/models/cache_metadata.py +++ b/kittycad/models/cache_metadata.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -EG = TypeVar("EG", bound="CacheMetadata") +JR = TypeVar("JR", bound="CacheMetadata") @attr.s(auto_attribs=True) @@ -29,7 +29,7 @@ class CacheMetadata: return field_dict @classmethod - def from_dict(cls: Type[EG], src_dict: Dict[str, Any]) -> EG: + def from_dict(cls: Type[JR], src_dict: Dict[str, Any]) -> JR: d = src_dict.copy() ok = d.pop("ok", UNSET) diff --git a/kittycad/models/card_details.py b/kittycad/models/card_details.py index d131ebdcb..72ec18f06 100644 --- a/kittycad/models/card_details.py +++ b/kittycad/models/card_details.py @@ -5,7 +5,7 @@ import attr from ..models.payment_method_card_checks import PaymentMethodCardChecks from ..types import UNSET, Unset -JR = TypeVar("JR", bound="CardDetails") +LY = TypeVar("LY", bound="CardDetails") @attr.s(auto_attribs=True) @@ -57,7 +57,7 @@ class CardDetails: return field_dict @classmethod - def from_dict(cls: Type[JR], src_dict: Dict[str, Any]) -> JR: + def from_dict(cls: Type[LY], src_dict: Dict[str, Any]) -> LY: d = src_dict.copy() brand = d.pop("brand", UNSET) diff --git a/kittycad/models/center_of_mass.py b/kittycad/models/center_of_mass.py new file mode 100644 index 000000000..bc35dec19 --- /dev/null +++ b/kittycad/models/center_of_mass.py @@ -0,0 +1,76 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.point3d import Point3d +from ..models.unit_length import UnitLength +from ..types import UNSET, Unset + +HK = TypeVar("HK", bound="CenterOfMass") + + +@attr.s(auto_attribs=True) +class CenterOfMass: + """The center of mass response.""" # noqa: E501 + + center_of_mass: Union[Unset, Point3d] = UNSET + output_unit: Union[Unset, UnitLength] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.center_of_mass, Unset): + center_of_mass = self.center_of_mass + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if center_of_mass is not UNSET: + field_dict["center_of_mass"] = center_of_mass + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit + + return field_dict + + @classmethod + def from_dict(cls: Type[HK], src_dict: Dict[str, Any]) -> HK: + d = src_dict.copy() + _center_of_mass = d.pop("center_of_mass", UNSET) + center_of_mass: Union[Unset, Point3d] + if isinstance(_center_of_mass, Unset): + center_of_mass = UNSET + else: + center_of_mass = _center_of_mass # type: ignore[arg-type] + + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitLength] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] + + center_of_mass = cls( + center_of_mass=center_of_mass, + output_unit=output_unit, + ) + + center_of_mass.additional_properties = d + return center_of_mass + + @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 diff --git a/kittycad/models/client_metrics.py b/kittycad/models/client_metrics.py new file mode 100644 index 000000000..65e97989a --- /dev/null +++ b/kittycad/models/client_metrics.py @@ -0,0 +1,106 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +VR = TypeVar("VR", bound="ClientMetrics") + + +@attr.s(auto_attribs=True) +class ClientMetrics: + """ClientMetrics contains information regarding the state of the peer.""" # noqa: E501 + + rtc_frames_decoded: Union[Unset, int] = UNSET + rtc_frames_dropped: Union[Unset, int] = UNSET + rtc_frames_per_second: Union[Unset, int] = UNSET + rtc_frames_received: Union[Unset, int] = UNSET + rtc_freeze_count: Union[Unset, int] = UNSET + rtc_jitter_sec: Union[Unset, float] = UNSET + rtc_keyframes_decoded: Union[Unset, int] = UNSET + rtc_total_freezes_duration_sec: Union[Unset, float] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + rtc_frames_decoded = self.rtc_frames_decoded + rtc_frames_dropped = self.rtc_frames_dropped + rtc_frames_per_second = self.rtc_frames_per_second + rtc_frames_received = self.rtc_frames_received + rtc_freeze_count = self.rtc_freeze_count + rtc_jitter_sec = self.rtc_jitter_sec + rtc_keyframes_decoded = self.rtc_keyframes_decoded + rtc_total_freezes_duration_sec = self.rtc_total_freezes_duration_sec + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if rtc_frames_decoded is not UNSET: + field_dict["rtc_frames_decoded"] = rtc_frames_decoded + if rtc_frames_dropped is not UNSET: + field_dict["rtc_frames_dropped"] = rtc_frames_dropped + if rtc_frames_per_second is not UNSET: + field_dict["rtc_frames_per_second"] = rtc_frames_per_second + if rtc_frames_received is not UNSET: + field_dict["rtc_frames_received"] = rtc_frames_received + if rtc_freeze_count is not UNSET: + field_dict["rtc_freeze_count"] = rtc_freeze_count + if rtc_jitter_sec is not UNSET: + field_dict["rtc_jitter_sec"] = rtc_jitter_sec + if rtc_keyframes_decoded is not UNSET: + field_dict["rtc_keyframes_decoded"] = rtc_keyframes_decoded + if rtc_total_freezes_duration_sec is not UNSET: + field_dict[ + "rtc_total_freezes_duration_sec" + ] = rtc_total_freezes_duration_sec + + return field_dict + + @classmethod + def from_dict(cls: Type[VR], src_dict: Dict[str, Any]) -> VR: + d = src_dict.copy() + rtc_frames_decoded = d.pop("rtc_frames_decoded", UNSET) + + rtc_frames_dropped = d.pop("rtc_frames_dropped", UNSET) + + rtc_frames_per_second = d.pop("rtc_frames_per_second", UNSET) + + rtc_frames_received = d.pop("rtc_frames_received", UNSET) + + rtc_freeze_count = d.pop("rtc_freeze_count", UNSET) + + rtc_jitter_sec = d.pop("rtc_jitter_sec", UNSET) + + rtc_keyframes_decoded = d.pop("rtc_keyframes_decoded", UNSET) + + rtc_total_freezes_duration_sec = d.pop("rtc_total_freezes_duration_sec", UNSET) + + client_metrics = cls( + rtc_frames_decoded=rtc_frames_decoded, + rtc_frames_dropped=rtc_frames_dropped, + rtc_frames_per_second=rtc_frames_per_second, + rtc_frames_received=rtc_frames_received, + rtc_freeze_count=rtc_freeze_count, + rtc_jitter_sec=rtc_jitter_sec, + rtc_keyframes_decoded=rtc_keyframes_decoded, + rtc_total_freezes_duration_sec=rtc_total_freezes_duration_sec, + ) + + client_metrics.additional_properties = d + return client_metrics + + @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 diff --git a/kittycad/models/cluster.py b/kittycad/models/cluster.py index 12585442b..448173366 100644 --- a/kittycad/models/cluster.py +++ b/kittycad/models/cluster.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -LY = TypeVar("LY", bound="Cluster") +ON = TypeVar("ON", bound="Cluster") @attr.s(auto_attribs=True) @@ -49,7 +49,7 @@ class Cluster: return field_dict @classmethod - def from_dict(cls: Type[LY], src_dict: Dict[str, Any]) -> LY: + def from_dict(cls: Type[ON], src_dict: Dict[str, Any]) -> ON: d = src_dict.copy() addr = d.pop("addr", UNSET) diff --git a/kittycad/models/code_output.py b/kittycad/models/code_output.py index 2f1fa8eb6..882922e40 100644 --- a/kittycad/models/code_output.py +++ b/kittycad/models/code_output.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -HK = TypeVar("HK", bound="CodeOutput") +PC = TypeVar("PC", bound="CodeOutput") @attr.s(auto_attribs=True) @@ -41,7 +41,7 @@ class CodeOutput: return field_dict @classmethod - def from_dict(cls: Type[HK], src_dict: Dict[str, Any]) -> HK: + def from_dict(cls: Type[PC], src_dict: Dict[str, Any]) -> PC: d = src_dict.copy() from ..models.output_file import OutputFile diff --git a/kittycad/models/color.py b/kittycad/models/color.py index 39930a1ec..789270305 100644 --- a/kittycad/models/color.py +++ b/kittycad/models/color.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -VR = TypeVar("VR", bound="Color") +US = TypeVar("US", bound="Color") @attr.s(auto_attribs=True) @@ -39,7 +39,7 @@ class Color: return field_dict @classmethod - def from_dict(cls: Type[VR], src_dict: Dict[str, Any]) -> VR: + def from_dict(cls: Type[US], src_dict: Dict[str, Any]) -> US: d = src_dict.copy() a = d.pop("a", UNSET) diff --git a/kittycad/models/connection.py b/kittycad/models/connection.py index 9a73d2276..b643b4bd7 100644 --- a/kittycad/models/connection.py +++ b/kittycad/models/connection.py @@ -10,7 +10,7 @@ from ..models.jetstream import Jetstream from ..models.leaf_node import LeafNode from ..types import UNSET, Unset -PC = TypeVar("PC", bound="Connection") +KQ = TypeVar("KQ", bound="Connection") @attr.s(auto_attribs=True) @@ -226,7 +226,7 @@ class Connection: return field_dict @classmethod - def from_dict(cls: Type[PC], src_dict: Dict[str, Any]) -> PC: + def from_dict(cls: Type[KQ], src_dict: Dict[str, Any]) -> KQ: d = src_dict.copy() auth_timeout = d.pop("auth_timeout", UNSET) diff --git a/kittycad/models/country_code.py b/kittycad/models/country_code.py index a1fdb0fa6..f7df3965d 100644 --- a/kittycad/models/country_code.py +++ b/kittycad/models/country_code.py @@ -1,507 +1,3 @@ -from enum import Enum - - -class CountryCode(str, Enum): - """An enumeration of all ISO-3166 alpha-2 country codes.""" # noqa: E501 - - """# Afghanistan """ # noqa: E501 - AF = "AF" - """# Åland Islands """ # noqa: E501 - AX = "AX" - """# Albania """ # noqa: E501 - AL = "AL" - """# Algeria """ # noqa: E501 - DZ = "DZ" - """# American Samoa """ # noqa: E501 - AS = "AS" - """# Andorra """ # noqa: E501 - AD = "AD" - """# Angola """ # noqa: E501 - AO = "AO" - """# Anguilla """ # noqa: E501 - AI = "AI" - """# Antarctica """ # noqa: E501 - AQ = "AQ" - """# Antigua and Barbuda """ # noqa: E501 - AG = "AG" - """# Argentina """ # noqa: E501 - AR = "AR" - """# Armenia """ # noqa: E501 - AM = "AM" - """# Aruba """ # noqa: E501 - AW = "AW" - """# Australia """ # noqa: E501 - AU = "AU" - """# Austria """ # noqa: E501 - AT = "AT" - """# Azerbaijan """ # noqa: E501 - AZ = "AZ" - """# Bahamas """ # noqa: E501 - BS = "BS" - """# Bahrain """ # noqa: E501 - BH = "BH" - """# Bangladesh """ # noqa: E501 - BD = "BD" - """# Barbados """ # noqa: E501 - BB = "BB" - """# Belarus """ # noqa: E501 - BY = "BY" - """# Belgium """ # noqa: E501 - BE = "BE" - """# Belize """ # noqa: E501 - BZ = "BZ" - """# Benin """ # noqa: E501 - BJ = "BJ" - """# Bermuda """ # noqa: E501 - BM = "BM" - """# Bhutan """ # noqa: E501 - BT = "BT" - """# Bolivia (Plurinational State of) """ # noqa: E501 - BO = "BO" - """# Bonaire, Sint Eustatius and Saba """ # noqa: E501 - BQ = "BQ" - """# Bosnia and Herzegovina """ # noqa: E501 - BA = "BA" - """# Botswana """ # noqa: E501 - BW = "BW" - """# Bouvet Island """ # noqa: E501 - BV = "BV" - """# Brazil """ # noqa: E501 - BR = "BR" - """# British Indian Ocean Territory """ # noqa: E501 - IO = "IO" - """# Brunei Darussalam """ # noqa: E501 - BN = "BN" - """# Bulgaria """ # noqa: E501 - BG = "BG" - """# Burkina Faso """ # noqa: E501 - BF = "BF" - """# Burundi """ # noqa: E501 - BI = "BI" - """# Cabo Verde """ # noqa: E501 - CV = "CV" - """# Cambodia """ # noqa: E501 - KH = "KH" - """# Cameroon """ # noqa: E501 - CM = "CM" - """# Canada """ # noqa: E501 - CA = "CA" - """# Cayman Islands """ # noqa: E501 - KY = "KY" - """# Central African Republic """ # noqa: E501 - CF = "CF" - """# Chad """ # noqa: E501 - TD = "TD" - """# Chile """ # noqa: E501 - CL = "CL" - """# China """ # noqa: E501 - CN = "CN" - """# Christmas Island """ # noqa: E501 - CX = "CX" - """# Cocos (Keeling) Islands """ # noqa: E501 - CC = "CC" - """# Colombia """ # noqa: E501 - CO = "CO" - """# Comoros """ # noqa: E501 - KM = "KM" - """# Congo """ # noqa: E501 - CG = "CG" - """# Congo (Democratic Republic of the) """ # noqa: E501 - CD = "CD" - """# Cook Islands """ # noqa: E501 - CK = "CK" - """# Costa Rica """ # noqa: E501 - CR = "CR" - """# Côte d'Ivoire """ # noqa: E501 - CI = "CI" - """# Croatia """ # noqa: E501 - HR = "HR" - """# Cuba """ # noqa: E501 - CU = "CU" - """# Curaçao """ # noqa: E501 - CW = "CW" - """# Cyprus """ # noqa: E501 - CY = "CY" - """# Czechia """ # noqa: E501 - CZ = "CZ" - """# Denmark """ # noqa: E501 - DK = "DK" - """# Djibouti """ # noqa: E501 - DJ = "DJ" - """# Dominica """ # noqa: E501 - DM = "DM" - """# Dominican Republic """ # noqa: E501 - DO = "DO" - """# Ecuador """ # noqa: E501 - EC = "EC" - """# Egypt """ # noqa: E501 - EG = "EG" - """# El Salvador """ # noqa: E501 - SV = "SV" - """# Equatorial Guinea """ # noqa: E501 - GQ = "GQ" - """# Eritrea """ # noqa: E501 - ER = "ER" - """# Estonia """ # noqa: E501 - EE = "EE" - """# Ethiopia """ # noqa: E501 - ET = "ET" - """# Falkland Islands (Malvinas) """ # noqa: E501 - FK = "FK" - """# Faroe Islands """ # noqa: E501 - FO = "FO" - """# Fiji """ # noqa: E501 - FJ = "FJ" - """# Finland """ # noqa: E501 - FI = "FI" - """# France """ # noqa: E501 - FR = "FR" - """# French Guiana """ # noqa: E501 - GF = "GF" - """# French Polynesia """ # noqa: E501 - PF = "PF" - """# French Southern Territories """ # noqa: E501 - TF = "TF" - """# Gabon """ # noqa: E501 - GA = "GA" - """# Gambia """ # noqa: E501 - GM = "GM" - """# Georgia """ # noqa: E501 - GE = "GE" - """# Germany """ # noqa: E501 - DE = "DE" - """# Ghana """ # noqa: E501 - GH = "GH" - """# Gibraltar """ # noqa: E501 - GI = "GI" - """# Greece """ # noqa: E501 - GR = "GR" - """# Greenland """ # noqa: E501 - GL = "GL" - """# Grenada """ # noqa: E501 - GD = "GD" - """# Guadeloupe """ # noqa: E501 - GP = "GP" - """# Guam """ # noqa: E501 - GU = "GU" - """# Guatemala """ # noqa: E501 - GT = "GT" - """# Guernsey """ # noqa: E501 - GG = "GG" - """# Guinea """ # noqa: E501 - GN = "GN" - """# Guinea-Bissau """ # noqa: E501 - GW = "GW" - """# Guyana """ # noqa: E501 - GY = "GY" - """# Haiti """ # noqa: E501 - HT = "HT" - """# Heard Island and McDonald Islands """ # noqa: E501 - HM = "HM" - """# Holy See """ # noqa: E501 - VA = "VA" - """# Honduras """ # noqa: E501 - HN = "HN" - """# Hong Kong """ # noqa: E501 - HK = "HK" - """# Hungary """ # noqa: E501 - HU = "HU" - """# Iceland """ # noqa: E501 - IS = "IS" - """# India """ # noqa: E501 - IN = "IN" - """# Indonesia """ # noqa: E501 - ID = "ID" - """# Iran (Islamic Republic of) """ # noqa: E501 - IR = "IR" - """# Iraq """ # noqa: E501 - IQ = "IQ" - """# Ireland """ # noqa: E501 - IE = "IE" - """# Isle of Man """ # noqa: E501 - IM = "IM" - """# Israel """ # noqa: E501 - IL = "IL" - """# Italy """ # noqa: E501 - IT = "IT" - """# Jamaica """ # noqa: E501 - JM = "JM" - """# Japan """ # noqa: E501 - JP = "JP" - """# Jersey """ # noqa: E501 - JE = "JE" - """# Jordan """ # noqa: E501 - JO = "JO" - """# Kazakhstan """ # noqa: E501 - KZ = "KZ" - """# Kenya """ # noqa: E501 - KE = "KE" - """# Kiribati """ # noqa: E501 - KI = "KI" - """# Korea (Democratic People's Republic of) """ # noqa: E501 - KP = "KP" - """# Korea (Republic of) """ # noqa: E501 - KR = "KR" - """# Kuwait """ # noqa: E501 - KW = "KW" - """# Kyrgyzstan """ # noqa: E501 - KG = "KG" - """# Lao People's Democratic Republic """ # noqa: E501 - LA = "LA" - """# Latvia """ # noqa: E501 - LV = "LV" - """# Lebanon """ # noqa: E501 - LB = "LB" - """# Lesotho """ # noqa: E501 - LS = "LS" - """# Liberia """ # noqa: E501 - LR = "LR" - """# Libya """ # noqa: E501 - LY = "LY" - """# Liechtenstein """ # noqa: E501 - LI = "LI" - """# Lithuania """ # noqa: E501 - LT = "LT" - """# Luxembourg """ # noqa: E501 - LU = "LU" - """# Macao """ # noqa: E501 - MO = "MO" - """# Macedonia (the former Yugoslav Republic of) """ # noqa: E501 - MK = "MK" - """# Madagascar """ # noqa: E501 - MG = "MG" - """# Malawi """ # noqa: E501 - MW = "MW" - """# Malaysia """ # noqa: E501 - MY = "MY" - """# Maldives """ # noqa: E501 - MV = "MV" - """# Mali """ # noqa: E501 - ML = "ML" - """# Malta """ # noqa: E501 - MT = "MT" - """# Marshall Islands """ # noqa: E501 - MH = "MH" - """# Martinique """ # noqa: E501 - MQ = "MQ" - """# Mauritania """ # noqa: E501 - MR = "MR" - """# Mauritius """ # noqa: E501 - MU = "MU" - """# Mayotte """ # noqa: E501 - YT = "YT" - """# Mexico """ # noqa: E501 - MX = "MX" - """# Micronesia (Federated States of) """ # noqa: E501 - FM = "FM" - """# Moldova (Republic of) """ # noqa: E501 - MD = "MD" - """# Monaco """ # noqa: E501 - MC = "MC" - """# Mongolia """ # noqa: E501 - MN = "MN" - """# Montenegro """ # noqa: E501 - ME = "ME" - """# Montserrat """ # noqa: E501 - MS = "MS" - """# Morocco """ # noqa: E501 - MA = "MA" - """# Mozambique """ # noqa: E501 - MZ = "MZ" - """# Myanmar """ # noqa: E501 - MM = "MM" - """# Namibia """ # noqa: E501 - NA = "NA" - """# Nauru """ # noqa: E501 - NR = "NR" - """# Nepal """ # noqa: E501 - NP = "NP" - """# Netherlands """ # noqa: E501 - NL = "NL" - """# New Caledonia """ # noqa: E501 - NC = "NC" - """# New Zealand """ # noqa: E501 - NZ = "NZ" - """# Nicaragua """ # noqa: E501 - NI = "NI" - """# Niger """ # noqa: E501 - NE = "NE" - """# Nigeria """ # noqa: E501 - NG = "NG" - """# Niue """ # noqa: E501 - NU = "NU" - """# Norfolk Island """ # noqa: E501 - NF = "NF" - """# Northern Mariana Islands """ # noqa: E501 - MP = "MP" - """# Norway """ # noqa: E501 - NO = "NO" - """# Oman """ # noqa: E501 - OM = "OM" - """# Pakistan """ # noqa: E501 - PK = "PK" - """# Palau """ # noqa: E501 - PW = "PW" - """# Palestine, State of """ # noqa: E501 - PS = "PS" - """# Panama """ # noqa: E501 - PA = "PA" - """# Papua New Guinea """ # noqa: E501 - PG = "PG" - """# Paraguay """ # noqa: E501 - PY = "PY" - """# Peru """ # noqa: E501 - PE = "PE" - """# Philippines """ # noqa: E501 - PH = "PH" - """# Pitcairn """ # noqa: E501 - PN = "PN" - """# Poland """ # noqa: E501 - PL = "PL" - """# Portugal """ # noqa: E501 - PT = "PT" - """# Puerto Rico """ # noqa: E501 - PR = "PR" - """# Qatar """ # noqa: E501 - QA = "QA" - """# Réunion """ # noqa: E501 - RE = "RE" - """# Romania """ # noqa: E501 - RO = "RO" - """# Russian Federation """ # noqa: E501 - RU = "RU" - """# Rwanda """ # noqa: E501 - RW = "RW" - """# Saint Barthélemy """ # noqa: E501 - BL = "BL" - """# Saint Helena, Ascension and Tristan da Cunha """ # noqa: E501 - SH = "SH" - """# Saint Kitts and Nevis """ # noqa: E501 - KN = "KN" - """# Saint Lucia """ # noqa: E501 - LC = "LC" - """# Saint Martin (French part) """ # noqa: E501 - MF = "MF" - """# Saint Pierre and Miquelon """ # noqa: E501 - PM = "PM" - """# Saint Vincent and the Grenadines """ # noqa: E501 - VC = "VC" - """# Samoa """ # noqa: E501 - WS = "WS" - """# San Marino """ # noqa: E501 - SM = "SM" - """# Sao Tome and Principe """ # noqa: E501 - ST = "ST" - """# Saudi Arabia """ # noqa: E501 - SA = "SA" - """# Senegal """ # noqa: E501 - SN = "SN" - """# Serbia """ # noqa: E501 - RS = "RS" - """# Seychelles """ # noqa: E501 - SC = "SC" - """# Sierra Leone """ # noqa: E501 - SL = "SL" - """# Singapore """ # noqa: E501 - SG = "SG" - """# Sint Maarten (Dutch part) """ # noqa: E501 - SX = "SX" - """# Slovakia """ # noqa: E501 - SK = "SK" - """# Slovenia """ # noqa: E501 - SI = "SI" - """# Solomon Islands """ # noqa: E501 - SB = "SB" - """# Somalia """ # noqa: E501 - SO = "SO" - """# South Africa """ # noqa: E501 - ZA = "ZA" - """# South Georgia and the South Sandwich Islands """ # noqa: E501 - GS = "GS" - """# South Sudan """ # noqa: E501 - SS = "SS" - """# Spain """ # noqa: E501 - ES = "ES" - """# Sri Lanka """ # noqa: E501 - LK = "LK" - """# Sudan """ # noqa: E501 - SD = "SD" - """# Suriname """ # noqa: E501 - SR = "SR" - """# Svalbard and Jan Mayen """ # noqa: E501 - SJ = "SJ" - """# Swaziland """ # noqa: E501 - SZ = "SZ" - """# Sweden """ # noqa: E501 - SE = "SE" - """# Switzerland """ # noqa: E501 - CH = "CH" - """# Syrian Arab Republic """ # noqa: E501 - SY = "SY" - """# Taiwan, Province of China """ # noqa: E501 - TW = "TW" - """# Tajikistan """ # noqa: E501 - TJ = "TJ" - """# Tanzania, United Republic of """ # noqa: E501 - TZ = "TZ" - """# Thailand """ # noqa: E501 - TH = "TH" - """# Timor-Leste """ # noqa: E501 - TL = "TL" - """# Togo """ # noqa: E501 - TG = "TG" - """# Tokelau """ # noqa: E501 - TK = "TK" - """# Tonga """ # noqa: E501 - TO = "TO" - """# Trinidad and Tobago """ # noqa: E501 - TT = "TT" - """# Tunisia """ # noqa: E501 - TN = "TN" - """# Turkey """ # noqa: E501 - TR = "TR" - """# Turkmenistan """ # noqa: E501 - TM = "TM" - """# Turks and Caicos Islands """ # noqa: E501 - TC = "TC" - """# Tuvalu """ # noqa: E501 - TV = "TV" - """# Uganda """ # noqa: E501 - UG = "UG" - """# Ukraine """ # noqa: E501 - UA = "UA" - """# United Arab Emirates """ # noqa: E501 - AE = "AE" - """# United Kingdom of Great Britain and Northern Ireland """ # noqa: E501 - GB = "GB" - """# United States of America """ # noqa: E501 - US = "US" - """# United States Minor Outlying Islands """ # noqa: E501 - UM = "UM" - """# Uruguay """ # noqa: E501 - UY = "UY" - """# Uzbekistan """ # noqa: E501 - UZ = "UZ" - """# Vanuatu """ # noqa: E501 - VU = "VU" - """# Venezuela (Bolivarian Republic of) """ # noqa: E501 - VE = "VE" - """# Viet Nam """ # noqa: E501 - VN = "VN" - """# Virgin Islands (British) """ # noqa: E501 - VG = "VG" - """# Virgin Islands (U.S.) """ # noqa: E501 - VI = "VI" - """# Wallis and Futuna """ # noqa: E501 - WF = "WF" - """# Western Sahara """ # noqa: E501 - EH = "EH" - """# Yemen """ # noqa: E501 - YE = "YE" - """# Zambia """ # noqa: E501 - ZM = "ZM" - """# Zimbabwe """ # noqa: E501 - ZW = "ZW" - +class CountryCode(str): def __str__(self) -> str: - return str(self.value) + return self diff --git a/kittycad/models/coupon.py b/kittycad/models/coupon.py index 2486d3c55..c164ca2ac 100644 --- a/kittycad/models/coupon.py +++ b/kittycad/models/coupon.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -US = TypeVar("US", bound="Coupon") +FH = TypeVar("FH", bound="Coupon") @attr.s(auto_attribs=True) @@ -39,7 +39,7 @@ class Coupon: return field_dict @classmethod - def from_dict(cls: Type[US], src_dict: Dict[str, Any]) -> US: + def from_dict(cls: Type[FH], src_dict: Dict[str, Any]) -> FH: d = src_dict.copy() amount_off = d.pop("amount_off", UNSET) diff --git a/kittycad/models/currency.py b/kittycad/models/currency.py index ac49060fe..1e0e1a589 100644 --- a/kittycad/models/currency.py +++ b/kittycad/models/currency.py @@ -1,290 +1,3 @@ -from enum import Enum - - -class Currency(str, Enum): - """Currency is the list of supported currencies. - - This comes from the Stripe API docs: For more details see . - """ # noqa: E501 - - """# United Arab Emirates Dirham """ # noqa: E501 - AED = "aed" - """# Afghan Afghani """ # noqa: E501 - AFN = "afn" - """# Albanian Lek """ # noqa: E501 - ALL = "all" - """# Armenian Dram """ # noqa: E501 - AMD = "amd" - """# Netherlands Antillean Gulden """ # noqa: E501 - ANG = "ang" - """# Angolan Kwanza """ # noqa: E501 - AOA = "aoa" - """# Argentine Peso """ # noqa: E501 - ARS = "ars" - """# Australian Dollar """ # noqa: E501 - AUD = "aud" - """# Aruban Florin """ # noqa: E501 - AWG = "awg" - """# Azerbaijani Manat """ # noqa: E501 - AZN = "azn" - """# Bosnia & Herzegovina Convertible Mark """ # noqa: E501 - BAM = "bam" - """# Barbadian Dollar """ # noqa: E501 - BBD = "bbd" - """# Bangladeshi Taka """ # noqa: E501 - BDT = "bdt" - """# Bulgarian Lev """ # noqa: E501 - BGN = "bgn" - """# Burundian Franc """ # noqa: E501 - BIF = "bif" - """# Bermudian Dollar """ # noqa: E501 - BMD = "bmd" - """# Brunei Dollar """ # noqa: E501 - BND = "bnd" - """# Bolivian Boliviano """ # noqa: E501 - BOB = "bob" - """# Brazilian Real """ # noqa: E501 - BRL = "brl" - """# Bahamian Dollar """ # noqa: E501 - BSD = "bsd" - """# Botswana Pula """ # noqa: E501 - BWP = "bwp" - """# Belize Dollar """ # noqa: E501 - BZD = "bzd" - """# Canadian Dollar """ # noqa: E501 - CAD = "cad" - """# Congolese Franc """ # noqa: E501 - CDF = "cdf" - """# Swiss Franc """ # noqa: E501 - CHF = "chf" - """# Chilean Peso """ # noqa: E501 - CLP = "clp" - """# Chinese Renminbi Yuan """ # noqa: E501 - CNY = "cny" - """# Colombian Peso """ # noqa: E501 - COP = "cop" - """# Costa Rican Colón """ # noqa: E501 - CRC = "crc" - """# Cape Verdean Escudo """ # noqa: E501 - CVE = "cve" - """# Czech Koruna """ # noqa: E501 - CZK = "czk" - """# Djiboutian Franc """ # noqa: E501 - DJF = "djf" - """# Danish Krone """ # noqa: E501 - DKK = "dkk" - """# Dominican Peso """ # noqa: E501 - DOP = "dop" - """# Algerian Dinar """ # noqa: E501 - DZD = "dzd" - """# Estonian Kroon """ # noqa: E501 - EEK = "eek" - """# Egyptian Pound """ # noqa: E501 - EGP = "egp" - """# Ethiopian Birr """ # noqa: E501 - ETB = "etb" - """# Euro """ # noqa: E501 - EUR = "eur" - """# Fijian Dollar """ # noqa: E501 - FJD = "fjd" - """# Falkland Islands Pound """ # noqa: E501 - FKP = "fkp" - """# British Pound """ # noqa: E501 - GBP = "gbp" - """# Georgian Lari """ # noqa: E501 - GEL = "gel" - """# Gibraltar Pound """ # noqa: E501 - GIP = "gip" - """# Gambian Dalasi """ # noqa: E501 - GMD = "gmd" - """# Guinean Franc """ # noqa: E501 - GNF = "gnf" - """# Guatemalan Quetzal """ # noqa: E501 - GTQ = "gtq" - """# Guyanese Dollar """ # noqa: E501 - GYD = "gyd" - """# Hong Kong Dollar """ # noqa: E501 - HKD = "hkd" - """# Honduran Lempira """ # noqa: E501 - HNL = "hnl" - """# Croatian Kuna """ # noqa: E501 - HRK = "hrk" - """# Haitian Gourde """ # noqa: E501 - HTG = "htg" - """# Hungarian Forint """ # noqa: E501 - HUF = "huf" - """# Indonesian Rupiah """ # noqa: E501 - IDR = "idr" - """# Israeli New Sheqel """ # noqa: E501 - ILS = "ils" - """# Indian Rupee """ # noqa: E501 - INR = "inr" - """# Icelandic Króna """ # noqa: E501 - ISK = "isk" - """# Jamaican Dollar """ # noqa: E501 - JMD = "jmd" - """# Japanese Yen """ # noqa: E501 - JPY = "jpy" - """# Kenyan Shilling """ # noqa: E501 - KES = "kes" - """# Kyrgyzstani Som """ # noqa: E501 - KGS = "kgs" - """# Cambodian Riel """ # noqa: E501 - KHR = "khr" - """# Comorian Franc """ # noqa: E501 - KMF = "kmf" - """# South Korean Won """ # noqa: E501 - KRW = "krw" - """# Cayman Islands Dollar """ # noqa: E501 - KYD = "kyd" - """# Kazakhstani Tenge """ # noqa: E501 - KZT = "kzt" - """# Lao Kip """ # noqa: E501 - LAK = "lak" - """# Lebanese Pound """ # noqa: E501 - LBP = "lbp" - """# Sri Lankan Rupee """ # noqa: E501 - LKR = "lkr" - """# Liberian Dollar """ # noqa: E501 - LRD = "lrd" - """# Lesotho Loti """ # noqa: E501 - LSL = "lsl" - """# Lithuanian Litas """ # noqa: E501 - LTL = "ltl" - """# Latvian Lats """ # noqa: E501 - LVL = "lvl" - """# Moroccan Dirham """ # noqa: E501 - MAD = "mad" - """# Moldovan Leu """ # noqa: E501 - MDL = "mdl" - """# Malagasy Ariary """ # noqa: E501 - MGA = "mga" - """# Macedonian Denar """ # noqa: E501 - MKD = "mkd" - """# Mongolian Tögrög """ # noqa: E501 - MNT = "mnt" - """# Macanese Pataca """ # noqa: E501 - MOP = "mop" - """# Mauritanian Ouguiya """ # noqa: E501 - MRO = "mro" - """# Mauritian Rupee """ # noqa: E501 - MUR = "mur" - """# Maldivian Rufiyaa """ # noqa: E501 - MVR = "mvr" - """# Malawian Kwacha """ # noqa: E501 - MWK = "mwk" - """# Mexican Peso """ # noqa: E501 - MXN = "mxn" - """# Malaysian Ringgit """ # noqa: E501 - MYR = "myr" - """# Mozambican Metical """ # noqa: E501 - MZN = "mzn" - """# Namibian Dollar """ # noqa: E501 - NAD = "nad" - """# Nigerian Naira """ # noqa: E501 - NGN = "ngn" - """# Nicaraguan Córdoba """ # noqa: E501 - NIO = "nio" - """# Norwegian Krone """ # noqa: E501 - NOK = "nok" - """# Nepalese Rupee """ # noqa: E501 - NPR = "npr" - """# New Zealand Dollar """ # noqa: E501 - NZD = "nzd" - """# Panamanian Balboa """ # noqa: E501 - PAB = "pab" - """# Peruvian Nuevo Sol """ # noqa: E501 - PEN = "pen" - """# Papua New Guinean Kina """ # noqa: E501 - PGK = "pgk" - """# Philippine Peso """ # noqa: E501 - PHP = "php" - """# Pakistani Rupee """ # noqa: E501 - PKR = "pkr" - """# Polish Złoty """ # noqa: E501 - PLN = "pln" - """# Paraguayan Guaraní """ # noqa: E501 - PYG = "pyg" - """# Qatari Riyal """ # noqa: E501 - QAR = "qar" - """# Romanian Leu """ # noqa: E501 - RON = "ron" - """# Serbian Dinar """ # noqa: E501 - RSD = "rsd" - """# Russian Ruble """ # noqa: E501 - RUB = "rub" - """# Rwandan Franc """ # noqa: E501 - RWF = "rwf" - """# Saudi Riyal """ # noqa: E501 - SAR = "sar" - """# Solomon Islands Dollar """ # noqa: E501 - SBD = "sbd" - """# Seychellois Rupee """ # noqa: E501 - SCR = "scr" - """# Swedish Krona """ # noqa: E501 - SEK = "sek" - """# Singapore Dollar """ # noqa: E501 - SGD = "sgd" - """# Saint Helenian Pound """ # noqa: E501 - SHP = "shp" - """# Sierra Leonean Leone """ # noqa: E501 - SLL = "sll" - """# Somali Shilling """ # noqa: E501 - SOS = "sos" - """# Surinamese Dollar """ # noqa: E501 - SRD = "srd" - """# São Tomé and Príncipe Dobra """ # noqa: E501 - STD = "std" - """# Salvadoran Colón """ # noqa: E501 - SVC = "svc" - """# Swazi Lilangeni """ # noqa: E501 - SZL = "szl" - """# Thai Baht """ # noqa: E501 - THB = "thb" - """# Tajikistani Somoni """ # noqa: E501 - TJS = "tjs" - """# Tongan Paʻanga """ # noqa: E501 - TOP = "top" - """# Turkish Lira """ # noqa: E501 - TRY = "try" - """# Trinidad and Tobago Dollar """ # noqa: E501 - TTD = "ttd" - """# New Taiwan Dollar """ # noqa: E501 - TWD = "twd" - """# Tanzanian Shilling """ # noqa: E501 - TZS = "tzs" - """# Ukrainian Hryvnia """ # noqa: E501 - UAH = "uah" - """# Ugandan Shilling """ # noqa: E501 - UGX = "ugx" - """# United States Dollar """ # noqa: E501 - USD = "usd" - """# Uruguayan Peso """ # noqa: E501 - UYU = "uyu" - """# Uzbekistani Som """ # noqa: E501 - UZS = "uzs" - """# Venezuelan Bolívar """ # noqa: E501 - VEF = "vef" - """# Vietnamese Đồng """ # noqa: E501 - VND = "vnd" - """# Vanuatu Vatu """ # noqa: E501 - VUV = "vuv" - """# Samoan Tala """ # noqa: E501 - WST = "wst" - """# Central African Cfa Franc """ # noqa: E501 - XAF = "xaf" - """# East Caribbean Dollar """ # noqa: E501 - XCD = "xcd" - """# West African Cfa Franc """ # noqa: E501 - XOF = "xof" - """# Cfp Franc """ # noqa: E501 - XPF = "xpf" - """# Yemeni Rial """ # noqa: E501 - YER = "yer" - """# South African Rand """ # noqa: E501 - ZAR = "zar" - """# Zambian Kwacha """ # noqa: E501 - ZMW = "zmw" - +class Currency(str): def __str__(self) -> str: - return str(self.value) + return self diff --git a/kittycad/models/curve_get_control_points.py b/kittycad/models/curve_get_control_points.py index 67837fe86..8467a26fc 100644 --- a/kittycad/models/curve_get_control_points.py +++ b/kittycad/models/curve_get_control_points.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -KQ = TypeVar("KQ", bound="CurveGetControlPoints") +NH = TypeVar("NH", bound="CurveGetControlPoints") @attr.s(auto_attribs=True) @@ -33,7 +33,7 @@ class CurveGetControlPoints: return field_dict @classmethod - def from_dict(cls: Type[KQ], src_dict: Dict[str, Any]) -> KQ: + def from_dict(cls: Type[NH], src_dict: Dict[str, Any]) -> NH: d = src_dict.copy() from ..models.point3d import Point3d diff --git a/kittycad/models/curve_get_end_points.py b/kittycad/models/curve_get_end_points.py new file mode 100644 index 000000000..9cfafdaf4 --- /dev/null +++ b/kittycad/models/curve_get_end_points.py @@ -0,0 +1,75 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.point3d import Point3d +from ..types import UNSET, Unset + +BB = TypeVar("BB", bound="CurveGetEndPoints") + + +@attr.s(auto_attribs=True) +class CurveGetEndPoints: + """Endpoints of a curve""" # noqa: E501 + + end: Union[Unset, Point3d] = UNSET + start: Union[Unset, Point3d] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.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[BB], src_dict: Dict[str, Any]) -> BB: + d = src_dict.copy() + _end = d.pop("end", UNSET) + end: Union[Unset, Point3d] + if isinstance(_end, Unset): + end = UNSET + else: + end = _end # type: ignore[arg-type] + + _start = d.pop("start", UNSET) + start: Union[Unset, Point3d] + if isinstance(_start, Unset): + start = UNSET + else: + start = _start # type: ignore[arg-type] + + curve_get_end_points = cls( + end=end, + start=start, + ) + + curve_get_end_points.additional_properties = d + return curve_get_end_points + + @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 diff --git a/kittycad/models/curve_get_type.py b/kittycad/models/curve_get_type.py index 9a6bbe247..dd031718b 100644 --- a/kittycad/models/curve_get_type.py +++ b/kittycad/models/curve_get_type.py @@ -5,7 +5,7 @@ import attr from ..models.curve_type import CurveType from ..types import UNSET, Unset -FH = TypeVar("FH", bound="CurveGetType") +PJ = TypeVar("PJ", bound="CurveGetType") @attr.s(auto_attribs=True) @@ -29,7 +29,7 @@ class CurveGetType: return field_dict @classmethod - def from_dict(cls: Type[FH], src_dict: Dict[str, Any]) -> FH: + def from_dict(cls: Type[PJ], src_dict: Dict[str, Any]) -> PJ: d = src_dict.copy() _curve_type = d.pop("curve_type", UNSET) curve_type: Union[Unset, CurveType] diff --git a/kittycad/models/curve_type.py b/kittycad/models/curve_type.py index 719096ea1..2e7efc988 100644 --- a/kittycad/models/curve_type.py +++ b/kittycad/models/curve_type.py @@ -5,6 +5,7 @@ class CurveType(str, Enum): """The type of Curve (embedded within path)""" # noqa: E501 LINE = "line" + ARC = "arc" NURBS = "nurbs" def __str__(self) -> str: diff --git a/kittycad/models/customer.py b/kittycad/models/customer.py index fadad277c..30517045c 100644 --- a/kittycad/models/customer.py +++ b/kittycad/models/customer.py @@ -8,7 +8,7 @@ from ..models.currency import Currency from ..models.new_address import NewAddress from ..types import UNSET, Unset -NH = TypeVar("NH", bound="Customer") +TV = TypeVar("TV", bound="Customer") @attr.s(auto_attribs=True) @@ -72,7 +72,7 @@ class Customer: return field_dict @classmethod - def from_dict(cls: Type[NH], src_dict: Dict[str, Any]) -> NH: + def from_dict(cls: Type[TV], src_dict: Dict[str, Any]) -> TV: d = src_dict.copy() _address = d.pop("address", UNSET) address: Union[Unset, NewAddress] diff --git a/kittycad/models/customer_balance.py b/kittycad/models/customer_balance.py index 99e88b301..325db97bc 100644 --- a/kittycad/models/customer_balance.py +++ b/kittycad/models/customer_balance.py @@ -7,7 +7,7 @@ from dateutil.parser import isoparse from ..models.uuid import Uuid from ..types import UNSET, Unset -BB = TypeVar("BB", bound="CustomerBalance") +CR = TypeVar("CR", bound="CustomerBalance") @attr.s(auto_attribs=True) @@ -64,7 +64,7 @@ class CustomerBalance: return field_dict @classmethod - def from_dict(cls: Type[BB], src_dict: Dict[str, Any]) -> BB: + def from_dict(cls: Type[CR], src_dict: Dict[str, Any]) -> CR: d = src_dict.copy() _created_at = d.pop("created_at", UNSET) created_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/density.py b/kittycad/models/density.py new file mode 100644 index 000000000..7399e0006 --- /dev/null +++ b/kittycad/models/density.py @@ -0,0 +1,69 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.unit_density import UnitDensity +from ..types import UNSET, Unset + +CE = TypeVar("CE", bound="Density") + + +@attr.s(auto_attribs=True) +class Density: + """The density response.""" # noqa: E501 + + density: Union[Unset, float] = UNSET + output_unit: Union[Unset, UnitDensity] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + density = self.density + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if density is not UNSET: + field_dict["density"] = density + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit + + return field_dict + + @classmethod + def from_dict(cls: Type[CE], src_dict: Dict[str, Any]) -> CE: + d = src_dict.copy() + density = d.pop("density", UNSET) + + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitDensity] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] + + density = cls( + density=density, + output_unit=output_unit, + ) + + density.additional_properties = d + return density + + @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 diff --git a/kittycad/models/device_access_token_request_form.py b/kittycad/models/device_access_token_request_form.py index 6ccd39bd6..0fc3746ce 100644 --- a/kittycad/models/device_access_token_request_form.py +++ b/kittycad/models/device_access_token_request_form.py @@ -5,7 +5,7 @@ import attr from ..models.o_auth2_grant_type import OAuth2GrantType from ..types import UNSET, Unset -PJ = TypeVar("PJ", bound="DeviceAccessTokenRequestForm") +MS = TypeVar("MS", bound="DeviceAccessTokenRequestForm") @attr.s(auto_attribs=True) @@ -37,7 +37,7 @@ class DeviceAccessTokenRequestForm: 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() client_id = d.pop("client_id", UNSET) diff --git a/kittycad/models/device_auth_request_form.py b/kittycad/models/device_auth_request_form.py index f1b73a185..db655dd5c 100644 --- a/kittycad/models/device_auth_request_form.py +++ b/kittycad/models/device_auth_request_form.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -TV = TypeVar("TV", bound="DeviceAuthRequestForm") +LT = TypeVar("LT", bound="DeviceAuthRequestForm") @attr.s(auto_attribs=True) @@ -27,7 +27,7 @@ class DeviceAuthRequestForm: 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() client_id = d.pop("client_id", UNSET) diff --git a/kittycad/models/device_auth_verify_params.py b/kittycad/models/device_auth_verify_params.py index 221b6c9e7..f66b2b4be 100644 --- a/kittycad/models/device_auth_verify_params.py +++ b/kittycad/models/device_auth_verify_params.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -CR = TypeVar("CR", bound="DeviceAuthVerifyParams") +ED = TypeVar("ED", bound="DeviceAuthVerifyParams") @attr.s(auto_attribs=True) @@ -27,7 +27,7 @@ class DeviceAuthVerifyParams: return field_dict @classmethod - def from_dict(cls: Type[CR], src_dict: Dict[str, Any]) -> CR: + def from_dict(cls: Type[ED], src_dict: Dict[str, Any]) -> ED: d = src_dict.copy() user_code = d.pop("user_code", UNSET) diff --git a/kittycad/models/discount.py b/kittycad/models/discount.py index fb40eb74d..037d21144 100644 --- a/kittycad/models/discount.py +++ b/kittycad/models/discount.py @@ -5,7 +5,7 @@ import attr from ..models.coupon import Coupon from ..types import UNSET, Unset -CE = TypeVar("CE", bound="Discount") +YY = TypeVar("YY", bound="Discount") @attr.s(auto_attribs=True) @@ -29,7 +29,7 @@ class Discount: return field_dict @classmethod - def from_dict(cls: Type[CE], src_dict: Dict[str, Any]) -> CE: + def from_dict(cls: Type[YY], src_dict: Dict[str, Any]) -> YY: d = src_dict.copy() _coupon = d.pop("coupon", UNSET) coupon: Union[Unset, Coupon] diff --git a/kittycad/models/docker_system_info.py b/kittycad/models/docker_system_info.py deleted file mode 100644 index 4e9bc9dee..000000000 --- a/kittycad/models/docker_system_info.py +++ /dev/null @@ -1,559 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast - -import attr - -from ..models.commit import Commit -from ..models.plugins_info import PluginsInfo -from ..models.registry_service_config import RegistryServiceConfig -from ..models.runtime import Runtime -from ..models.system_info_cgroup_driver_enum import SystemInfoCgroupDriverEnum -from ..models.system_info_cgroup_version_enum import SystemInfoCgroupVersionEnum -from ..models.system_info_isolation_enum import SystemInfoIsolationEnum -from ..types import UNSET, Unset - -MS = TypeVar("MS", bound="DockerSystemInfo") - - -@attr.s(auto_attribs=True) -class DockerSystemInfo: - """Docker system info.""" # noqa: E501 - - architecture: Union[Unset, str] = UNSET - bridge_nf_ip6tables: Union[Unset, bool] = False - bridge_nf_iptables: Union[Unset, bool] = False - cgroup_driver: Union[Unset, SystemInfoCgroupDriverEnum] = UNSET - cgroup_version: Union[Unset, SystemInfoCgroupVersionEnum] = UNSET - cluster_advertise: Union[Unset, str] = UNSET - cluster_store: Union[Unset, str] = UNSET - containerd_commit: Union[Unset, Commit] = UNSET - containers: Union[Unset, int] = UNSET - containers_paused: Union[Unset, int] = UNSET - containers_running: Union[Unset, int] = UNSET - containers_stopped: Union[Unset, int] = UNSET - cpu_cfs_period: Union[Unset, bool] = False - cpu_cfs_quota: Union[Unset, bool] = False - cpu_set: Union[Unset, bool] = False - cpu_shares: Union[Unset, bool] = False - debug: Union[Unset, bool] = False - from ..models.system_info_default_address_pools import SystemInfoDefaultAddressPools - - default_address_pools: Union[Unset, List[SystemInfoDefaultAddressPools]] = UNSET - default_runtime: Union[Unset, str] = UNSET - docker_root_dir: Union[Unset, str] = UNSET - driver: Union[Unset, str] = UNSET - driver_status: Union[Unset, List[List[str]]] = UNSET - experimental_build: Union[Unset, bool] = False - http_proxy: Union[Unset, str] = UNSET - https_proxy: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - images: Union[Unset, int] = UNSET - index_server_address: Union[Unset, str] = UNSET - init_binary: Union[Unset, str] = UNSET - init_commit: Union[Unset, Commit] = UNSET - ipv4_forwarding: Union[Unset, bool] = False - isolation: Union[Unset, SystemInfoIsolationEnum] = UNSET - kernel_memory: Union[Unset, bool] = False - kernel_memory_tcp: Union[Unset, bool] = False - kernel_version: Union[Unset, str] = UNSET - labels: Union[Unset, List[str]] = UNSET - live_restore_enabled: Union[Unset, bool] = False - logging_driver: Union[Unset, str] = UNSET - mem_total: Union[Unset, int] = UNSET - memory_limit: Union[Unset, bool] = False - n_events_listener: Union[Unset, int] = UNSET - n_fd: Union[Unset, int] = UNSET - name: Union[Unset, str] = UNSET - ncpu: Union[Unset, int] = UNSET - no_proxy: Union[Unset, str] = UNSET - oom_kill_disable: Union[Unset, bool] = False - operating_system: Union[Unset, str] = UNSET - os_type: Union[Unset, str] = UNSET - os_version: Union[Unset, str] = UNSET - pids_limit: Union[Unset, bool] = False - plugins: Union[Unset, PluginsInfo] = UNSET - product_license: Union[Unset, str] = UNSET - registry_config: Union[Unset, RegistryServiceConfig] = UNSET - runc_commit: Union[Unset, Commit] = UNSET - from ..models.runtime import Runtime - - runtimes: Union[Unset, Dict[str, Runtime]] = UNSET - security_options: Union[Unset, List[str]] = UNSET - server_version: Union[Unset, str] = UNSET - swap_limit: Union[Unset, bool] = False - system_time: Union[Unset, str] = UNSET - warnings: Union[Unset, List[str]] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - architecture = self.architecture - bridge_nf_ip6tables = self.bridge_nf_ip6tables - bridge_nf_iptables = self.bridge_nf_iptables - if not isinstance(self.cgroup_driver, Unset): - cgroup_driver = self.cgroup_driver - if not isinstance(self.cgroup_version, Unset): - cgroup_version = self.cgroup_version - cluster_advertise = self.cluster_advertise - cluster_store = self.cluster_store - if not isinstance(self.containerd_commit, Unset): - containerd_commit = self.containerd_commit - containers = self.containers - containers_paused = self.containers_paused - containers_running = self.containers_running - containers_stopped = self.containers_stopped - cpu_cfs_period = self.cpu_cfs_period - cpu_cfs_quota = self.cpu_cfs_quota - cpu_set = self.cpu_set - cpu_shares = self.cpu_shares - debug = self.debug - from ..models.system_info_default_address_pools import ( - SystemInfoDefaultAddressPools, - ) - - default_address_pools: Union[Unset, List[SystemInfoDefaultAddressPools]] = UNSET - if not isinstance(self.default_address_pools, Unset): - default_address_pools = self.default_address_pools - default_runtime = self.default_runtime - docker_root_dir = self.docker_root_dir - driver = self.driver - driver_status: Union[Unset, List[List[str]]] = UNSET - if not isinstance(self.driver_status, Unset): - driver_status = self.driver_status - experimental_build = self.experimental_build - http_proxy = self.http_proxy - https_proxy = self.https_proxy - id = self.id - images = self.images - index_server_address = self.index_server_address - init_binary = self.init_binary - if not isinstance(self.init_commit, Unset): - init_commit = self.init_commit - ipv4_forwarding = self.ipv4_forwarding - if not isinstance(self.isolation, Unset): - isolation = self.isolation - kernel_memory = self.kernel_memory - kernel_memory_tcp = self.kernel_memory_tcp - kernel_version = self.kernel_version - labels: Union[Unset, List[str]] = UNSET - if not isinstance(self.labels, Unset): - labels = self.labels - live_restore_enabled = self.live_restore_enabled - logging_driver = self.logging_driver - mem_total = self.mem_total - memory_limit = self.memory_limit - n_events_listener = self.n_events_listener - n_fd = self.n_fd - name = self.name - ncpu = self.ncpu - no_proxy = self.no_proxy - oom_kill_disable = self.oom_kill_disable - operating_system = self.operating_system - os_type = self.os_type - os_version = self.os_version - pids_limit = self.pids_limit - if not isinstance(self.plugins, Unset): - plugins = self.plugins - product_license = self.product_license - if not isinstance(self.registry_config, Unset): - registry_config = self.registry_config - if not isinstance(self.runc_commit, Unset): - runc_commit = self.runc_commit - runtimes: Union[Unset, Dict[str, Any]] = UNSET - if not isinstance(self.runtimes, Unset): - new_dict: Dict[str, Any] = {} - for key, value in self.runtimes.items(): - new_dict[key] = value.to_dict() - runtimes = new_dict - security_options: Union[Unset, List[str]] = UNSET - if not isinstance(self.security_options, Unset): - security_options = self.security_options - server_version = self.server_version - swap_limit = self.swap_limit - system_time = self.system_time - warnings: Union[Unset, List[str]] = UNSET - if not isinstance(self.warnings, Unset): - warnings = self.warnings - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if architecture is not UNSET: - field_dict["architecture"] = architecture - if bridge_nf_ip6tables is not UNSET: - field_dict["bridge_nf_ip6tables"] = bridge_nf_ip6tables - if bridge_nf_iptables is not UNSET: - field_dict["bridge_nf_iptables"] = bridge_nf_iptables - if cgroup_driver is not UNSET: - field_dict["cgroup_driver"] = cgroup_driver - if cgroup_version is not UNSET: - field_dict["cgroup_version"] = cgroup_version - if cluster_advertise is not UNSET: - field_dict["cluster_advertise"] = cluster_advertise - if cluster_store is not UNSET: - field_dict["cluster_store"] = cluster_store - if containerd_commit is not UNSET: - field_dict["containerd_commit"] = containerd_commit - if containers is not UNSET: - field_dict["containers"] = containers - if containers_paused is not UNSET: - field_dict["containers_paused"] = containers_paused - if containers_running is not UNSET: - field_dict["containers_running"] = containers_running - if containers_stopped is not UNSET: - field_dict["containers_stopped"] = containers_stopped - if cpu_cfs_period is not UNSET: - field_dict["cpu_cfs_period"] = cpu_cfs_period - if cpu_cfs_quota is not UNSET: - field_dict["cpu_cfs_quota"] = cpu_cfs_quota - if cpu_set is not UNSET: - field_dict["cpu_set"] = cpu_set - if cpu_shares is not UNSET: - field_dict["cpu_shares"] = cpu_shares - if debug is not UNSET: - field_dict["debug"] = debug - if default_address_pools is not UNSET: - field_dict["default_address_pools"] = default_address_pools - if default_runtime is not UNSET: - field_dict["default_runtime"] = default_runtime - if docker_root_dir is not UNSET: - field_dict["docker_root_dir"] = docker_root_dir - if driver is not UNSET: - field_dict["driver"] = driver - if driver_status is not UNSET: - field_dict["driver_status"] = driver_status - if experimental_build is not UNSET: - field_dict["experimental_build"] = experimental_build - if http_proxy is not UNSET: - field_dict["http_proxy"] = http_proxy - if https_proxy is not UNSET: - field_dict["https_proxy"] = https_proxy - if id is not UNSET: - field_dict["id"] = id - if images is not UNSET: - field_dict["images"] = images - if index_server_address is not UNSET: - field_dict["index_server_address"] = index_server_address - if init_binary is not UNSET: - field_dict["init_binary"] = init_binary - if init_commit is not UNSET: - field_dict["init_commit"] = init_commit - if ipv4_forwarding is not UNSET: - field_dict["ipv4_forwarding"] = ipv4_forwarding - if isolation is not UNSET: - field_dict["isolation"] = isolation - if kernel_memory is not UNSET: - field_dict["kernel_memory"] = kernel_memory - if kernel_memory_tcp is not UNSET: - field_dict["kernel_memory_tcp"] = kernel_memory_tcp - if kernel_version is not UNSET: - field_dict["kernel_version"] = kernel_version - if labels is not UNSET: - field_dict["labels"] = labels - if live_restore_enabled is not UNSET: - field_dict["live_restore_enabled"] = live_restore_enabled - if logging_driver is not UNSET: - field_dict["logging_driver"] = logging_driver - if mem_total is not UNSET: - field_dict["mem_total"] = mem_total - if memory_limit is not UNSET: - field_dict["memory_limit"] = memory_limit - if n_events_listener is not UNSET: - field_dict["n_events_listener"] = n_events_listener - if n_fd is not UNSET: - field_dict["n_fd"] = n_fd - if name is not UNSET: - field_dict["name"] = name - if ncpu is not UNSET: - field_dict["ncpu"] = ncpu - if no_proxy is not UNSET: - field_dict["no_proxy"] = no_proxy - if oom_kill_disable is not UNSET: - field_dict["oom_kill_disable"] = oom_kill_disable - if operating_system is not UNSET: - field_dict["operating_system"] = operating_system - if os_type is not UNSET: - field_dict["os_type"] = os_type - if os_version is not UNSET: - field_dict["os_version"] = os_version - if pids_limit is not UNSET: - field_dict["pids_limit"] = pids_limit - if plugins is not UNSET: - field_dict["plugins"] = plugins - if product_license is not UNSET: - field_dict["product_license"] = product_license - if registry_config is not UNSET: - field_dict["registry_config"] = registry_config - if runc_commit is not UNSET: - field_dict["runc_commit"] = runc_commit - if runtimes is not UNSET: - field_dict["runtimes"] = runtimes - if security_options is not UNSET: - field_dict["security_options"] = security_options - if server_version is not UNSET: - field_dict["server_version"] = server_version - if swap_limit is not UNSET: - field_dict["swap_limit"] = swap_limit - if system_time is not UNSET: - field_dict["system_time"] = system_time - if warnings is not UNSET: - field_dict["warnings"] = warnings - - return field_dict - - @classmethod - def from_dict(cls: Type[MS], src_dict: Dict[str, Any]) -> MS: - d = src_dict.copy() - architecture = d.pop("architecture", UNSET) - - bridge_nf_ip6tables = d.pop("bridge_nf_ip6tables", UNSET) - - bridge_nf_iptables = d.pop("bridge_nf_iptables", UNSET) - - _cgroup_driver = d.pop("cgroup_driver", UNSET) - cgroup_driver: Union[Unset, SystemInfoCgroupDriverEnum] - if isinstance(_cgroup_driver, Unset): - cgroup_driver = UNSET - else: - cgroup_driver = _cgroup_driver # type: ignore[arg-type] - - _cgroup_version = d.pop("cgroup_version", UNSET) - cgroup_version: Union[Unset, SystemInfoCgroupVersionEnum] - if isinstance(_cgroup_version, Unset): - cgroup_version = UNSET - else: - cgroup_version = _cgroup_version # type: ignore[arg-type] - - cluster_advertise = d.pop("cluster_advertise", UNSET) - - cluster_store = d.pop("cluster_store", UNSET) - - _containerd_commit = d.pop("containerd_commit", UNSET) - containerd_commit: Union[Unset, Commit] - if isinstance(_containerd_commit, Unset): - containerd_commit = UNSET - else: - containerd_commit = _containerd_commit # type: ignore[arg-type] - - containers = d.pop("containers", UNSET) - - containers_paused = d.pop("containers_paused", UNSET) - - containers_running = d.pop("containers_running", UNSET) - - containers_stopped = d.pop("containers_stopped", UNSET) - - cpu_cfs_period = d.pop("cpu_cfs_period", UNSET) - - cpu_cfs_quota = d.pop("cpu_cfs_quota", UNSET) - - cpu_set = d.pop("cpu_set", UNSET) - - cpu_shares = d.pop("cpu_shares", UNSET) - - debug = d.pop("debug", UNSET) - - from ..models.system_info_default_address_pools import ( - SystemInfoDefaultAddressPools, - ) - - default_address_pools = cast( - List[SystemInfoDefaultAddressPools], d.pop("default_address_pools", UNSET) - ) - - default_runtime = d.pop("default_runtime", UNSET) - - docker_root_dir = d.pop("docker_root_dir", UNSET) - - driver = d.pop("driver", UNSET) - - driver_status = cast(List[List[str]], d.pop("driver_status", UNSET)) - - experimental_build = d.pop("experimental_build", UNSET) - - http_proxy = d.pop("http_proxy", UNSET) - - https_proxy = d.pop("https_proxy", UNSET) - - id = d.pop("id", UNSET) - - images = d.pop("images", UNSET) - - index_server_address = d.pop("index_server_address", UNSET) - - init_binary = d.pop("init_binary", UNSET) - - _init_commit = d.pop("init_commit", UNSET) - init_commit: Union[Unset, Commit] - if isinstance(_init_commit, Unset): - init_commit = UNSET - else: - init_commit = _init_commit # type: ignore[arg-type] - - ipv4_forwarding = d.pop("ipv4_forwarding", UNSET) - - _isolation = d.pop("isolation", UNSET) - isolation: Union[Unset, SystemInfoIsolationEnum] - if isinstance(_isolation, Unset): - isolation = UNSET - else: - isolation = _isolation # type: ignore[arg-type] - - kernel_memory = d.pop("kernel_memory", UNSET) - - kernel_memory_tcp = d.pop("kernel_memory_tcp", UNSET) - - kernel_version = d.pop("kernel_version", UNSET) - - labels = cast(List[str], d.pop("labels", UNSET)) - - live_restore_enabled = d.pop("live_restore_enabled", UNSET) - - logging_driver = d.pop("logging_driver", UNSET) - - mem_total = d.pop("mem_total", UNSET) - - memory_limit = d.pop("memory_limit", UNSET) - - n_events_listener = d.pop("n_events_listener", UNSET) - - n_fd = d.pop("n_fd", UNSET) - - name = d.pop("name", UNSET) - - ncpu = d.pop("ncpu", UNSET) - - no_proxy = d.pop("no_proxy", UNSET) - - oom_kill_disable = d.pop("oom_kill_disable", UNSET) - - operating_system = d.pop("operating_system", UNSET) - - os_type = d.pop("os_type", UNSET) - - os_version = d.pop("os_version", UNSET) - - pids_limit = d.pop("pids_limit", UNSET) - - _plugins = d.pop("plugins", UNSET) - plugins: Union[Unset, PluginsInfo] - if isinstance(_plugins, Unset): - plugins = UNSET - else: - plugins = _plugins # type: ignore[arg-type] - - product_license = d.pop("product_license", UNSET) - - _registry_config = d.pop("registry_config", UNSET) - registry_config: Union[Unset, RegistryServiceConfig] - if isinstance(_registry_config, Unset): - registry_config = UNSET - else: - registry_config = _registry_config # type: ignore[arg-type] - - _runc_commit = d.pop("runc_commit", UNSET) - runc_commit: Union[Unset, Commit] - if isinstance(_runc_commit, Unset): - runc_commit = UNSET - else: - runc_commit = _runc_commit # type: ignore[arg-type] - - _runtimes = d.pop("runtimes", UNSET) - if isinstance(_runtimes, Unset): - runtimes = UNSET - else: - new_map: Dict[str, Runtime] = {} - for k, v in _runtimes.items(): - new_map[k] = Runtime.from_dict(v) # type: ignore - runtimes = new_map # type: ignore - - security_options = cast(List[str], d.pop("security_options", UNSET)) - - server_version = d.pop("server_version", UNSET) - - swap_limit = d.pop("swap_limit", UNSET) - - system_time = d.pop("system_time", UNSET) - - warnings = cast(List[str], d.pop("warnings", UNSET)) - - docker_system_info = cls( - architecture=architecture, - bridge_nf_ip6tables=bridge_nf_ip6tables, - bridge_nf_iptables=bridge_nf_iptables, - cgroup_driver=cgroup_driver, - cgroup_version=cgroup_version, - cluster_advertise=cluster_advertise, - cluster_store=cluster_store, - containerd_commit=containerd_commit, - containers=containers, - containers_paused=containers_paused, - containers_running=containers_running, - containers_stopped=containers_stopped, - cpu_cfs_period=cpu_cfs_period, - cpu_cfs_quota=cpu_cfs_quota, - cpu_set=cpu_set, - cpu_shares=cpu_shares, - debug=debug, - default_address_pools=default_address_pools, - default_runtime=default_runtime, - docker_root_dir=docker_root_dir, - driver=driver, - driver_status=driver_status, - experimental_build=experimental_build, - http_proxy=http_proxy, - https_proxy=https_proxy, - id=id, - images=images, - index_server_address=index_server_address, - init_binary=init_binary, - init_commit=init_commit, - ipv4_forwarding=ipv4_forwarding, - isolation=isolation, - kernel_memory=kernel_memory, - kernel_memory_tcp=kernel_memory_tcp, - kernel_version=kernel_version, - labels=labels, - live_restore_enabled=live_restore_enabled, - logging_driver=logging_driver, - mem_total=mem_total, - memory_limit=memory_limit, - n_events_listener=n_events_listener, - n_fd=n_fd, - name=name, - ncpu=ncpu, - no_proxy=no_proxy, - oom_kill_disable=oom_kill_disable, - operating_system=operating_system, - os_type=os_type, - os_version=os_version, - pids_limit=pids_limit, - plugins=plugins, - product_license=product_license, - registry_config=registry_config, - runc_commit=runc_commit, - runtimes=runtimes, - security_options=security_options, - server_version=server_version, - swap_limit=swap_limit, - system_time=system_time, - warnings=warnings, - ) - - docker_system_info.additional_properties = d - return docker_system_info - - @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 diff --git a/kittycad/models/email_authentication_form.py b/kittycad/models/email_authentication_form.py index 922fd01f3..2db722f0c 100644 --- a/kittycad/models/email_authentication_form.py +++ b/kittycad/models/email_authentication_form.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -LT = TypeVar("LT", bound="EmailAuthenticationForm") +DO = TypeVar("DO", bound="EmailAuthenticationForm") @attr.s(auto_attribs=True) @@ -31,7 +31,7 @@ class EmailAuthenticationForm: return field_dict @classmethod - def from_dict(cls: Type[LT], src_dict: Dict[str, Any]) -> LT: + def from_dict(cls: Type[DO], src_dict: Dict[str, Any]) -> DO: d = src_dict.copy() callback_url = d.pop("callback_url", UNSET) diff --git a/kittycad/models/engine_metadata.py b/kittycad/models/engine_metadata.py deleted file mode 100644 index 46ad07feb..000000000 --- a/kittycad/models/engine_metadata.py +++ /dev/null @@ -1,120 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar, Union - -import attr - -from ..models.cache_metadata import CacheMetadata -from ..models.connection import Connection -from ..models.environment import Environment -from ..models.file_system_metadata import FileSystemMetadata -from ..types import UNSET, Unset - -ED = TypeVar("ED", bound="EngineMetadata") - - -@attr.s(auto_attribs=True) -class EngineMetadata: - """Metadata about our currently running server. - - This is mostly used for internal purposes and debugging.""" # noqa: E501 - - async_jobs_running: Union[Unset, bool] = False - cache: Union[Unset, CacheMetadata] = UNSET - environment: Union[Unset, Environment] = UNSET - fs: Union[Unset, FileSystemMetadata] = UNSET - git_hash: Union[Unset, str] = UNSET - pubsub: Union[Unset, Connection] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - async_jobs_running = self.async_jobs_running - if not isinstance(self.cache, Unset): - cache = self.cache - if not isinstance(self.environment, Unset): - environment = self.environment - if not isinstance(self.fs, Unset): - fs = self.fs - git_hash = self.git_hash - if not isinstance(self.pubsub, Unset): - pubsub = self.pubsub - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if async_jobs_running is not UNSET: - field_dict["async_jobs_running"] = async_jobs_running - if cache is not UNSET: - field_dict["cache"] = cache - if environment is not UNSET: - field_dict["environment"] = environment - if fs is not UNSET: - field_dict["fs"] = fs - if git_hash is not UNSET: - field_dict["git_hash"] = git_hash - if pubsub is not UNSET: - field_dict["pubsub"] = pubsub - - return field_dict - - @classmethod - def from_dict(cls: Type[ED], src_dict: Dict[str, Any]) -> ED: - d = src_dict.copy() - async_jobs_running = d.pop("async_jobs_running", UNSET) - - _cache = d.pop("cache", UNSET) - cache: Union[Unset, CacheMetadata] - if isinstance(_cache, Unset): - cache = UNSET - else: - cache = _cache # type: ignore[arg-type] - - _environment = d.pop("environment", UNSET) - environment: Union[Unset, Environment] - if isinstance(_environment, Unset): - environment = UNSET - else: - environment = _environment # type: ignore[arg-type] - - _fs = d.pop("fs", UNSET) - fs: Union[Unset, FileSystemMetadata] - if isinstance(_fs, Unset): - fs = UNSET - else: - fs = _fs # type: ignore[arg-type] - - git_hash = d.pop("git_hash", UNSET) - - _pubsub = d.pop("pubsub", UNSET) - pubsub: Union[Unset, Connection] - if isinstance(_pubsub, Unset): - pubsub = UNSET - else: - pubsub = _pubsub # type: ignore[arg-type] - - engine_metadata = cls( - async_jobs_running=async_jobs_running, - cache=cache, - environment=environment, - fs=fs, - git_hash=git_hash, - pubsub=pubsub, - ) - - engine_metadata.additional_properties = d - return engine_metadata - - @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 diff --git a/kittycad/models/entity_get_all_child_uuids.py b/kittycad/models/entity_get_all_child_uuids.py index ffe957508..29e4bf521 100644 --- a/kittycad/models/entity_get_all_child_uuids.py +++ b/kittycad/models/entity_get_all_child_uuids.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -YY = TypeVar("YY", bound="EntityGetAllChildUuids") +FZ = TypeVar("FZ", bound="EntityGetAllChildUuids") @attr.s(auto_attribs=True) @@ -29,7 +29,7 @@ class EntityGetAllChildUuids: return field_dict @classmethod - def from_dict(cls: Type[YY], src_dict: Dict[str, Any]) -> YY: + def from_dict(cls: Type[FZ], src_dict: Dict[str, Any]) -> FZ: d = src_dict.copy() entity_ids = cast(List[str], d.pop("entity_ids", UNSET)) diff --git a/kittycad/models/entity_get_child_uuid.py b/kittycad/models/entity_get_child_uuid.py index ddff9d033..d8a2110db 100644 --- a/kittycad/models/entity_get_child_uuid.py +++ b/kittycad/models/entity_get_child_uuid.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -DO = TypeVar("DO", bound="EntityGetChildUuid") +GL = TypeVar("GL", bound="EntityGetChildUuid") @attr.s(auto_attribs=True) @@ -27,7 +27,7 @@ class EntityGetChildUuid: return field_dict @classmethod - def from_dict(cls: Type[DO], src_dict: Dict[str, Any]) -> DO: + def from_dict(cls: Type[GL], src_dict: Dict[str, Any]) -> GL: d = src_dict.copy() entity_id = d.pop("entity_id", UNSET) diff --git a/kittycad/models/entity_get_num_children.py b/kittycad/models/entity_get_num_children.py index 300740017..100adb24a 100644 --- a/kittycad/models/entity_get_num_children.py +++ b/kittycad/models/entity_get_num_children.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -FZ = TypeVar("FZ", bound="EntityGetNumChildren") +NN = TypeVar("NN", bound="EntityGetNumChildren") @attr.s(auto_attribs=True) @@ -27,7 +27,7 @@ class EntityGetNumChildren: return field_dict @classmethod - def from_dict(cls: Type[FZ], src_dict: Dict[str, Any]) -> FZ: + def from_dict(cls: Type[NN], src_dict: Dict[str, Any]) -> NN: d = src_dict.copy() num = d.pop("num", UNSET) diff --git a/kittycad/models/entity_get_parent_id.py b/kittycad/models/entity_get_parent_id.py index 308a55d86..a332b2740 100644 --- a/kittycad/models/entity_get_parent_id.py +++ b/kittycad/models/entity_get_parent_id.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -GL = TypeVar("GL", bound="EntityGetParentId") +OH = TypeVar("OH", bound="EntityGetParentId") @attr.s(auto_attribs=True) @@ -27,7 +27,7 @@ class EntityGetParentId: return field_dict @classmethod - def from_dict(cls: Type[GL], src_dict: Dict[str, Any]) -> GL: + def from_dict(cls: Type[OH], src_dict: Dict[str, Any]) -> OH: d = src_dict.copy() entity_id = d.pop("entity_id", UNSET) diff --git a/kittycad/models/error.py b/kittycad/models/error.py index 3184703db..631282579 100644 --- a/kittycad/models/error.py +++ b/kittycad/models/error.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -NN = TypeVar("NN", bound="Error") +VI = TypeVar("VI", bound="Error") @attr.s(auto_attribs=True) @@ -35,7 +35,7 @@ class Error: return field_dict @classmethod - def from_dict(cls: Type[NN], src_dict: Dict[str, Any]) -> NN: + def from_dict(cls: Type[VI], src_dict: Dict[str, Any]) -> VI: d = src_dict.copy() error_code = d.pop("error_code", UNSET) diff --git a/kittycad/models/error_code.py b/kittycad/models/error_code.py index f35903ea5..298238615 100644 --- a/kittycad/models/error_code.py +++ b/kittycad/models/error_code.py @@ -12,6 +12,10 @@ class ErrorCode(str, Enum): BAD_REQUEST = "bad_request" """# Client sent invalid JSON. """ # noqa: E501 INVALID_JSON = "invalid_json" + """# Client sent invalid BSON. """ # noqa: E501 + INVALID_BSON = "invalid_bson" + """# Client sent a message which is not accepted over this protocol. """ # noqa: E501 + WRONG_PROTOCOL = "wrong_protocol" """# Problem sending data between client and KittyCAD API. """ # noqa: E501 CONNECTION_PROBLEM = "connection_problem" """# Client sent a Websocket message type which the KittyCAD API does not handle. """ # noqa: E501 diff --git a/kittycad/models/executor_metadata.py b/kittycad/models/executor_metadata.py deleted file mode 100644 index 778450ec8..000000000 --- a/kittycad/models/executor_metadata.py +++ /dev/null @@ -1,85 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar, Union - -import attr - -from ..models.docker_system_info import DockerSystemInfo -from ..models.environment import Environment -from ..types import UNSET, Unset - -OH = TypeVar("OH", bound="ExecutorMetadata") - - -@attr.s(auto_attribs=True) -class ExecutorMetadata: - """Metadata about our currently running server. - - This is mostly used for internal purposes and debugging.""" # noqa: E501 - - docker_info: Union[Unset, DockerSystemInfo] = UNSET - environment: Union[Unset, Environment] = UNSET - git_hash: Union[Unset, str] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.docker_info, Unset): - docker_info = self.docker_info - if not isinstance(self.environment, Unset): - environment = self.environment - git_hash = self.git_hash - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if docker_info is not UNSET: - field_dict["docker_info"] = docker_info - if environment is not UNSET: - field_dict["environment"] = environment - if git_hash is not UNSET: - field_dict["git_hash"] = git_hash - - return field_dict - - @classmethod - def from_dict(cls: Type[OH], src_dict: Dict[str, Any]) -> OH: - d = src_dict.copy() - _docker_info = d.pop("docker_info", UNSET) - docker_info: Union[Unset, DockerSystemInfo] - if isinstance(_docker_info, Unset): - docker_info = UNSET - else: - docker_info = _docker_info # type: ignore[arg-type] - - _environment = d.pop("environment", UNSET) - environment: Union[Unset, Environment] - if isinstance(_environment, Unset): - environment = UNSET - else: - environment = _environment # type: ignore[arg-type] - - git_hash = d.pop("git_hash", UNSET) - - executor_metadata = cls( - docker_info=docker_info, - environment=environment, - git_hash=git_hash, - ) - - executor_metadata.additional_properties = d - return executor_metadata - - @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 diff --git a/kittycad/models/export.py b/kittycad/models/export.py index d874fbd61..a417301d6 100644 --- a/kittycad/models/export.py +++ b/kittycad/models/export.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -VI = TypeVar("VI", bound="Export") +ET = TypeVar("ET", bound="Export") @attr.s(auto_attribs=True) @@ -33,7 +33,7 @@ class Export: return field_dict @classmethod - def from_dict(cls: Type[VI], src_dict: Dict[str, Any]) -> VI: + def from_dict(cls: Type[ET], src_dict: Dict[str, Any]) -> ET: d = src_dict.copy() from ..models.export_file import ExportFile diff --git a/kittycad/models/export_file.py b/kittycad/models/export_file.py index 9e3756159..f7000bfaa 100644 --- a/kittycad/models/export_file.py +++ b/kittycad/models/export_file.py @@ -5,7 +5,7 @@ import attr from ..models.base64data import Base64Data from ..types import UNSET, Unset -ET = TypeVar("ET", bound="ExportFile") +QF = TypeVar("QF", bound="ExportFile") @attr.s(auto_attribs=True) @@ -34,7 +34,7 @@ class ExportFile: return field_dict @classmethod - def from_dict(cls: Type[ET], src_dict: Dict[str, Any]) -> ET: + def from_dict(cls: Type[QF], src_dict: Dict[str, Any]) -> QF: d = src_dict.copy() _contents = d.pop("contents", UNSET) contents: Union[Unset, Base64Data] diff --git a/kittycad/models/extended_user.py b/kittycad/models/extended_user.py index b046f7558..6c44e8f19 100644 --- a/kittycad/models/extended_user.py +++ b/kittycad/models/extended_user.py @@ -6,7 +6,7 @@ from dateutil.parser import isoparse from ..types import UNSET, Unset -QF = TypeVar("QF", bound="ExtendedUser") +DI = TypeVar("DI", bound="ExtendedUser") @attr.s(auto_attribs=True) @@ -98,7 +98,7 @@ class ExtendedUser: return field_dict @classmethod - def from_dict(cls: Type[QF], src_dict: Dict[str, Any]) -> QF: + def from_dict(cls: Type[DI], src_dict: Dict[str, Any]) -> DI: d = src_dict.copy() company = d.pop("company", UNSET) diff --git a/kittycad/models/extended_user_results_page.py b/kittycad/models/extended_user_results_page.py index 8e9632b77..c04c6171d 100644 --- a/kittycad/models/extended_user_results_page.py +++ b/kittycad/models/extended_user_results_page.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -DI = TypeVar("DI", bound="ExtendedUserResultsPage") +OJ = TypeVar("OJ", bound="ExtendedUserResultsPage") @attr.s(auto_attribs=True) @@ -37,7 +37,7 @@ class ExtendedUserResultsPage: return field_dict @classmethod - def from_dict(cls: Type[DI], src_dict: Dict[str, Any]) -> DI: + def from_dict(cls: Type[OJ], src_dict: Dict[str, Any]) -> OJ: d = src_dict.copy() from ..models.extended_user import ExtendedUser diff --git a/kittycad/models/failure_web_socket_response.py b/kittycad/models/failure_web_socket_response.py index f7aa3bea8..6719e32c8 100644 --- a/kittycad/models/failure_web_socket_response.py +++ b/kittycad/models/failure_web_socket_response.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -OJ = TypeVar("OJ", bound="FailureWebSocketResponse") +UF = TypeVar("UF", bound="FailureWebSocketResponse") @attr.s(auto_attribs=True) @@ -41,7 +41,7 @@ class FailureWebSocketResponse: return field_dict @classmethod - def from_dict(cls: Type[OJ], src_dict: Dict[str, Any]) -> OJ: + def from_dict(cls: Type[UF], src_dict: Dict[str, Any]) -> UF: d = src_dict.copy() from ..models.api_error import ApiError diff --git a/kittycad/models/file_center_of_mass.py b/kittycad/models/file_center_of_mass.py index 86cefdc42..1f96e4304 100644 --- a/kittycad/models/file_center_of_mass.py +++ b/kittycad/models/file_center_of_mass.py @@ -11,7 +11,7 @@ from ..models.unit_length import UnitLength from ..models.uuid import Uuid from ..types import UNSET, Unset -UF = TypeVar("UF", bound="FileCenterOfMass") +YF = TypeVar("YF", bound="FileCenterOfMass") @attr.s(auto_attribs=True) @@ -86,7 +86,7 @@ class FileCenterOfMass: return field_dict @classmethod - def from_dict(cls: Type[UF], src_dict: Dict[str, Any]) -> UF: + def from_dict(cls: Type[YF], src_dict: Dict[str, Any]) -> YF: d = src_dict.copy() _center_of_mass = d.pop("center_of_mass", UNSET) center_of_mass: Union[Unset, Point3d] diff --git a/kittycad/models/file_conversion.py b/kittycad/models/file_conversion.py index cf72c0834..fdc0ab115 100644 --- a/kittycad/models/file_conversion.py +++ b/kittycad/models/file_conversion.py @@ -13,7 +13,7 @@ from ..models.output_format import OutputFormat from ..models.uuid import Uuid from ..types import UNSET, Unset -YF = TypeVar("YF", bound="FileConversion") +PY = TypeVar("PY", bound="FileConversion") @attr.s(auto_attribs=True) @@ -102,7 +102,7 @@ class FileConversion: return field_dict @classmethod - def from_dict(cls: Type[YF], src_dict: Dict[str, Any]) -> YF: + def from_dict(cls: Type[PY], src_dict: Dict[str, Any]) -> PY: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/file_density.py b/kittycad/models/file_density.py index ae7f3fe0a..2bf072ef4 100644 --- a/kittycad/models/file_density.py +++ b/kittycad/models/file_density.py @@ -11,7 +11,7 @@ from ..models.unit_mass import UnitMass from ..models.uuid import Uuid from ..types import UNSET, Unset -PY = TypeVar("PY", bound="FileDensity") +LK = TypeVar("LK", bound="FileDensity") @attr.s(auto_attribs=True) @@ -94,7 +94,7 @@ class FileDensity: return field_dict @classmethod - def from_dict(cls: Type[PY], src_dict: Dict[str, Any]) -> PY: + def from_dict(cls: Type[LK], src_dict: Dict[str, Any]) -> LK: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/file_mass.py b/kittycad/models/file_mass.py index ad5b9c061..e26a50142 100644 --- a/kittycad/models/file_mass.py +++ b/kittycad/models/file_mass.py @@ -11,7 +11,7 @@ from ..models.unit_mass import UnitMass from ..models.uuid import Uuid from ..types import UNSET, Unset -LK = TypeVar("LK", bound="FileMass") +AR = TypeVar("AR", bound="FileMass") @attr.s(auto_attribs=True) @@ -94,7 +94,7 @@ class FileMass: return field_dict @classmethod - def from_dict(cls: Type[LK], src_dict: Dict[str, Any]) -> LK: + def from_dict(cls: Type[AR], src_dict: Dict[str, Any]) -> AR: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/file_surface_area.py b/kittycad/models/file_surface_area.py index 284d73b4b..423ee65fe 100644 --- a/kittycad/models/file_surface_area.py +++ b/kittycad/models/file_surface_area.py @@ -10,7 +10,7 @@ from ..models.unit_area import UnitArea from ..models.uuid import Uuid from ..types import UNSET, Unset -AR = TypeVar("AR", bound="FileSurfaceArea") +WB = TypeVar("WB", bound="FileSurfaceArea") @attr.s(auto_attribs=True) @@ -84,7 +84,7 @@ class FileSurfaceArea: return field_dict @classmethod - def from_dict(cls: Type[AR], src_dict: Dict[str, Any]) -> AR: + def from_dict(cls: Type[WB], src_dict: Dict[str, Any]) -> WB: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/file_system_metadata.py b/kittycad/models/file_system_metadata.py index a67b0ecdf..6fd3307b2 100644 --- a/kittycad/models/file_system_metadata.py +++ b/kittycad/models/file_system_metadata.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -WB = TypeVar("WB", bound="FileSystemMetadata") +KK = TypeVar("KK", bound="FileSystemMetadata") @attr.s(auto_attribs=True) @@ -29,7 +29,7 @@ class FileSystemMetadata: return field_dict @classmethod - def from_dict(cls: Type[WB], src_dict: Dict[str, Any]) -> WB: + def from_dict(cls: Type[KK], src_dict: Dict[str, Any]) -> KK: d = src_dict.copy() ok = d.pop("ok", UNSET) diff --git a/kittycad/models/file_volume.py b/kittycad/models/file_volume.py index dca014bd9..2284f6b0c 100644 --- a/kittycad/models/file_volume.py +++ b/kittycad/models/file_volume.py @@ -10,7 +10,7 @@ from ..models.unit_volume import UnitVolume from ..models.uuid import Uuid from ..types import UNSET, Unset -KK = TypeVar("KK", bound="FileVolume") +HC = TypeVar("HC", bound="FileVolume") @attr.s(auto_attribs=True) @@ -84,7 +84,7 @@ class FileVolume: return field_dict @classmethod - def from_dict(cls: Type[KK], src_dict: Dict[str, Any]) -> KK: + def from_dict(cls: Type[HC], src_dict: Dict[str, Any]) -> HC: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/gateway.py b/kittycad/models/gateway.py index 53df24f99..a01276844 100644 --- a/kittycad/models/gateway.py +++ b/kittycad/models/gateway.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -HC = TypeVar("HC", bound="Gateway") +FM = TypeVar("FM", bound="Gateway") @attr.s(auto_attribs=True) @@ -43,7 +43,7 @@ class Gateway: return field_dict @classmethod - def from_dict(cls: Type[HC], src_dict: Dict[str, Any]) -> HC: + def from_dict(cls: Type[FM], src_dict: Dict[str, Any]) -> FM: d = src_dict.copy() auth_timeout = d.pop("auth_timeout", UNSET) diff --git a/kittycad/models/get_entity_type.py b/kittycad/models/get_entity_type.py index 0c3355ae2..4db489dbb 100644 --- a/kittycad/models/get_entity_type.py +++ b/kittycad/models/get_entity_type.py @@ -5,7 +5,7 @@ import attr from ..models.entity_type import EntityType from ..types import UNSET, Unset -FM = TypeVar("FM", bound="GetEntityType") +PV = TypeVar("PV", bound="GetEntityType") @attr.s(auto_attribs=True) @@ -29,7 +29,7 @@ class GetEntityType: return field_dict @classmethod - def from_dict(cls: Type[FM], src_dict: Dict[str, Any]) -> FM: + def from_dict(cls: Type[PV], src_dict: Dict[str, Any]) -> PV: d = src_dict.copy() _entity_type = d.pop("entity_type", UNSET) entity_type: Union[Unset, EntityType] diff --git a/kittycad/models/highlight_set_entity.py b/kittycad/models/highlight_set_entity.py index ad81baa8f..3b4bafd9f 100644 --- a/kittycad/models/highlight_set_entity.py +++ b/kittycad/models/highlight_set_entity.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -PV = TypeVar("PV", bound="HighlightSetEntity") +QI = TypeVar("QI", bound="HighlightSetEntity") @attr.s(auto_attribs=True) @@ -31,7 +31,7 @@ class HighlightSetEntity: return field_dict @classmethod - def from_dict(cls: Type[PV], src_dict: Dict[str, Any]) -> PV: + def from_dict(cls: Type[QI], src_dict: Dict[str, Any]) -> QI: d = src_dict.copy() entity_id = d.pop("entity_id", UNSET) diff --git a/kittycad/models/ice_server.py b/kittycad/models/ice_server.py index c8a24bdb4..2895a3976 100644 --- a/kittycad/models/ice_server.py +++ b/kittycad/models/ice_server.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -QI = TypeVar("QI", bound="IceServer") +TP = TypeVar("TP", bound="IceServer") @attr.s(auto_attribs=True) @@ -37,7 +37,7 @@ class IceServer: return field_dict @classmethod - def from_dict(cls: Type[QI], src_dict: Dict[str, Any]) -> QI: + def from_dict(cls: Type[TP], src_dict: Dict[str, Any]) -> TP: d = src_dict.copy() credential = d.pop("credential", UNSET) diff --git a/kittycad/models/runtime.py b/kittycad/models/import_file.py similarity index 56% rename from kittycad/models/runtime.py rename to kittycad/models/import_file.py index 7cd27dc4e..3ff7b9de6 100644 --- a/kittycad/models/runtime.py +++ b/kittycad/models/import_file.py @@ -4,48 +4,48 @@ import attr from ..types import UNSET, Unset -YO = TypeVar("YO", bound="Runtime") +CF = TypeVar("CF", bound="ImportFile") @attr.s(auto_attribs=True) -class Runtime: - """Runtime describes an [OCI compliant](https://github.com/opencontainers/runtime-spec) runtime. The runtime is invoked by the daemon via the `containerd` daemon. OCI runtimes act as an interface to the Linux kernel namespaces, cgroups, and SELinux.""" # noqa: E501 +class ImportFile: + """File to import into the current model""" # noqa: E501 + data: Union[Unset, List[int]] = UNSET path: Union[Unset, str] = UNSET - runtime_args: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[int]] = UNSET + if not isinstance(self.data, Unset): + data = self.data path = self.path - runtime_args: Union[Unset, List[str]] = UNSET - if not isinstance(self.runtime_args, Unset): - runtime_args = self.runtime_args field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data if path is not UNSET: field_dict["path"] = path - if runtime_args is not UNSET: - field_dict["runtime_args"] = runtime_args return field_dict @classmethod - def from_dict(cls: Type[YO], src_dict: Dict[str, Any]) -> YO: + def from_dict(cls: Type[CF], src_dict: Dict[str, Any]) -> CF: d = src_dict.copy() + data = cast(List[int], d.pop("data", UNSET)) + path = d.pop("path", UNSET) - runtime_args = cast(List[str], d.pop("runtime_args", UNSET)) - - runtime = cls( + import_file = cls( + data=data, path=path, - runtime_args=runtime_args, ) - runtime.additional_properties = d - return runtime + import_file.additional_properties = d + return import_file @property def additional_keys(self) -> List[str]: diff --git a/kittycad/models/system_info_default_address_pools.py b/kittycad/models/import_files.py similarity index 57% rename from kittycad/models/system_info_default_address_pools.py rename to kittycad/models/import_files.py index 54631553f..f7bf08cf9 100644 --- a/kittycad/models/system_info_default_address_pools.py +++ b/kittycad/models/import_files.py @@ -4,44 +4,39 @@ import attr from ..types import UNSET, Unset -PT = TypeVar("PT", bound="SystemInfoDefaultAddressPools") +OM = TypeVar("OM", bound="ImportFiles") @attr.s(auto_attribs=True) -class SystemInfoDefaultAddressPools: - base: Union[Unset, str] = UNSET - size: Union[Unset, int] = UNSET +class ImportFiles: + """Data from importing the files""" # noqa: E501 + + object_id: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: - base = self.base - size = self.size + object_id = self.object_id field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) - if base is not UNSET: - field_dict["base"] = base - if size is not UNSET: - field_dict["size"] = size + if object_id is not UNSET: + field_dict["object_id"] = object_id return field_dict @classmethod - def from_dict(cls: Type[PT], src_dict: Dict[str, Any]) -> PT: + def from_dict(cls: Type[OM], src_dict: Dict[str, Any]) -> OM: d = src_dict.copy() - base = d.pop("base", UNSET) + object_id = d.pop("object_id", UNSET) - size = d.pop("size", UNSET) - - system_info_default_address_pools = cls( - base=base, - size=size, + import_files = cls( + object_id=object_id, ) - system_info_default_address_pools.additional_properties = d - return system_info_default_address_pools + import_files.additional_properties = d + return import_files @property def additional_keys(self) -> List[str]: diff --git a/kittycad/models/index_info.py b/kittycad/models/index_info.py deleted file mode 100644 index d03b953b7..000000000 --- a/kittycad/models/index_info.py +++ /dev/null @@ -1,78 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast - -import attr - -from ..types import UNSET, Unset - -TP = TypeVar("TP", bound="IndexInfo") - - -@attr.s(auto_attribs=True) -class IndexInfo: - """IndexInfo contains information about a registry.""" # noqa: E501 - - mirrors: Union[Unset, List[str]] = UNSET - name: Union[Unset, str] = UNSET - official: Union[Unset, bool] = False - secure: Union[Unset, bool] = False - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - mirrors: Union[Unset, List[str]] = UNSET - if not isinstance(self.mirrors, Unset): - mirrors = self.mirrors - name = self.name - official = self.official - secure = self.secure - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if mirrors is not UNSET: - field_dict["mirrors"] = mirrors - if name is not UNSET: - field_dict["name"] = name - if official is not UNSET: - field_dict["official"] = official - if secure is not UNSET: - field_dict["secure"] = secure - - return field_dict - - @classmethod - def from_dict(cls: Type[TP], src_dict: Dict[str, Any]) -> TP: - d = src_dict.copy() - mirrors = cast(List[str], d.pop("mirrors", UNSET)) - - name = d.pop("name", UNSET) - - official = d.pop("official", UNSET) - - secure = d.pop("secure", UNSET) - - index_info = cls( - mirrors=mirrors, - name=name, - official=official, - secure=secure, - ) - - index_info.additional_properties = d - return index_info - - @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 diff --git a/kittycad/models/input_format.py b/kittycad/models/input_format.py index 1ffee7a99..11c68de05 100644 --- a/kittycad/models/input_format.py +++ b/kittycad/models/input_format.py @@ -6,7 +6,7 @@ from ..models.system import System from ..models.unit_length import UnitLength from ..types import UNSET, Unset -CF = TypeVar("CF", bound="fbx") +EN = TypeVar("EN", bound="fbx") @attr.s(auto_attribs=True) @@ -28,7 +28,7 @@ class fbx: return field_dict @classmethod - def from_dict(cls: Type[CF], src_dict: Dict[str, Any]) -> CF: + def from_dict(cls: Type[EN], src_dict: Dict[str, Any]) -> EN: d = src_dict.copy() type = d.pop("type", UNSET) @@ -56,7 +56,7 @@ class fbx: return key in self.additional_properties -OM = TypeVar("OM", bound="gltf") +RS = TypeVar("RS", bound="gltf") @attr.s(auto_attribs=True) @@ -78,7 +78,7 @@ class gltf: return field_dict @classmethod - def from_dict(cls: Type[OM], src_dict: Dict[str, Any]) -> OM: + def from_dict(cls: Type[RS], src_dict: Dict[str, Any]) -> RS: d = src_dict.copy() type = d.pop("type", UNSET) @@ -106,7 +106,7 @@ class gltf: return key in self.additional_properties -EN = TypeVar("EN", bound="obj") +LR = TypeVar("LR", bound="obj") @attr.s(auto_attribs=True) @@ -138,7 +138,7 @@ class obj: return field_dict @classmethod - def from_dict(cls: Type[EN], src_dict: Dict[str, Any]) -> EN: + def from_dict(cls: Type[LR], src_dict: Dict[str, Any]) -> LR: d = src_dict.copy() _coords = d.pop("coords", UNSET) coords: Union[Unset, System] @@ -182,7 +182,7 @@ class obj: return key in self.additional_properties -RS = TypeVar("RS", bound="ply") +MP = TypeVar("MP", bound="ply") @attr.s(auto_attribs=True) @@ -214,7 +214,7 @@ class ply: return field_dict @classmethod - def from_dict(cls: Type[RS], src_dict: Dict[str, Any]) -> RS: + def from_dict(cls: Type[MP], src_dict: Dict[str, Any]) -> MP: d = src_dict.copy() _coords = d.pop("coords", UNSET) coords: Union[Unset, System] @@ -258,7 +258,7 @@ class ply: return key in self.additional_properties -LR = TypeVar("LR", bound="sldprt") +WF = TypeVar("WF", bound="sldprt") @attr.s(auto_attribs=True) @@ -280,7 +280,7 @@ class sldprt: return field_dict @classmethod - def from_dict(cls: Type[LR], src_dict: Dict[str, Any]) -> LR: + def from_dict(cls: Type[WF], src_dict: Dict[str, Any]) -> WF: d = src_dict.copy() type = d.pop("type", UNSET) @@ -308,7 +308,7 @@ class sldprt: return key in self.additional_properties -MP = TypeVar("MP", bound="step") +RO = TypeVar("RO", bound="step") @attr.s(auto_attribs=True) @@ -330,7 +330,7 @@ class step: return field_dict @classmethod - def from_dict(cls: Type[MP], src_dict: Dict[str, Any]) -> MP: + def from_dict(cls: Type[RO], src_dict: Dict[str, Any]) -> RO: d = src_dict.copy() type = d.pop("type", UNSET) @@ -358,7 +358,7 @@ class step: return key in self.additional_properties -WF = TypeVar("WF", bound="stl") +DN = TypeVar("DN", bound="stl") @attr.s(auto_attribs=True) @@ -390,7 +390,7 @@ class stl: return field_dict @classmethod - def from_dict(cls: Type[WF], src_dict: Dict[str, Any]) -> WF: + def from_dict(cls: Type[DN], src_dict: Dict[str, Any]) -> DN: d = src_dict.copy() _coords = d.pop("coords", UNSET) coords: Union[Unset, System] diff --git a/kittycad/models/invoice.py b/kittycad/models/invoice.py index 9bb43cea2..a35649385 100644 --- a/kittycad/models/invoice.py +++ b/kittycad/models/invoice.py @@ -8,7 +8,7 @@ from ..models.currency import Currency from ..models.invoice_status import InvoiceStatus from ..types import UNSET, Unset -RO = TypeVar("RO", bound="Invoice") +BA = TypeVar("BA", bound="Invoice") @attr.s(auto_attribs=True) @@ -144,7 +144,7 @@ class Invoice: return field_dict @classmethod - def from_dict(cls: Type[RO], src_dict: Dict[str, Any]) -> RO: + def from_dict(cls: Type[BA], src_dict: Dict[str, Any]) -> BA: d = src_dict.copy() amount_due = d.pop("amount_due", UNSET) diff --git a/kittycad/models/invoice_line_item.py b/kittycad/models/invoice_line_item.py index 3917101ed..63b263c22 100644 --- a/kittycad/models/invoice_line_item.py +++ b/kittycad/models/invoice_line_item.py @@ -5,7 +5,7 @@ import attr from ..models.currency import Currency from ..types import UNSET, Unset -DN = TypeVar("DN", bound="InvoiceLineItem") +OR = TypeVar("OR", bound="InvoiceLineItem") @attr.s(auto_attribs=True) @@ -49,7 +49,7 @@ class InvoiceLineItem: return field_dict @classmethod - def from_dict(cls: Type[DN], src_dict: Dict[str, Any]) -> DN: + def from_dict(cls: Type[OR], src_dict: Dict[str, Any]) -> OR: d = src_dict.copy() amount = d.pop("amount", UNSET) diff --git a/kittycad/models/jetstream.py b/kittycad/models/jetstream.py index 4a586be87..d7968d5fd 100644 --- a/kittycad/models/jetstream.py +++ b/kittycad/models/jetstream.py @@ -7,7 +7,7 @@ from ..models.jetstream_stats import JetstreamStats from ..models.meta_cluster_info import MetaClusterInfo from ..types import UNSET, Unset -BA = TypeVar("BA", bound="Jetstream") +CB = TypeVar("CB", bound="Jetstream") @attr.s(auto_attribs=True) @@ -41,7 +41,7 @@ class Jetstream: return field_dict @classmethod - def from_dict(cls: Type[BA], src_dict: Dict[str, Any]) -> BA: + def from_dict(cls: Type[CB], src_dict: Dict[str, Any]) -> CB: d = src_dict.copy() _config = d.pop("config", UNSET) config: Union[Unset, JetstreamConfig] diff --git a/kittycad/models/jetstream_api_stats.py b/kittycad/models/jetstream_api_stats.py index 5fff8a9fd..c0721e89e 100644 --- a/kittycad/models/jetstream_api_stats.py +++ b/kittycad/models/jetstream_api_stats.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -OR = TypeVar("OR", bound="JetstreamApiStats") +LC = TypeVar("LC", bound="JetstreamApiStats") @attr.s(auto_attribs=True) @@ -35,7 +35,7 @@ class JetstreamApiStats: return field_dict @classmethod - def from_dict(cls: Type[OR], src_dict: Dict[str, Any]) -> OR: + def from_dict(cls: Type[LC], src_dict: Dict[str, Any]) -> LC: d = src_dict.copy() errors = d.pop("errors", UNSET) diff --git a/kittycad/models/jetstream_config.py b/kittycad/models/jetstream_config.py index 3c107a9e5..6873f5acd 100644 --- a/kittycad/models/jetstream_config.py +++ b/kittycad/models/jetstream_config.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -CB = TypeVar("CB", bound="JetstreamConfig") +TO = TypeVar("TO", bound="JetstreamConfig") @attr.s(auto_attribs=True) @@ -39,7 +39,7 @@ class JetstreamConfig: return field_dict @classmethod - def from_dict(cls: Type[CB], src_dict: Dict[str, Any]) -> CB: + def from_dict(cls: Type[TO], src_dict: Dict[str, Any]) -> TO: d = src_dict.copy() domain = d.pop("domain", UNSET) diff --git a/kittycad/models/jetstream_stats.py b/kittycad/models/jetstream_stats.py index 6159fa888..1f78cfbf9 100644 --- a/kittycad/models/jetstream_stats.py +++ b/kittycad/models/jetstream_stats.py @@ -5,7 +5,7 @@ import attr from ..models.jetstream_api_stats import JetstreamApiStats from ..types import UNSET, Unset -LC = TypeVar("LC", bound="JetstreamStats") +ZP = TypeVar("ZP", bound="JetstreamStats") @attr.s(auto_attribs=True) @@ -53,7 +53,7 @@ class JetstreamStats: return field_dict @classmethod - def from_dict(cls: Type[LC], src_dict: Dict[str, Any]) -> LC: + def from_dict(cls: Type[ZP], src_dict: Dict[str, Any]) -> ZP: d = src_dict.copy() accounts = d.pop("accounts", UNSET) diff --git a/kittycad/models/leaf_node.py b/kittycad/models/leaf_node.py index 074e620d5..507daef4d 100644 --- a/kittycad/models/leaf_node.py +++ b/kittycad/models/leaf_node.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -TO = TypeVar("TO", bound="LeafNode") +EO = TypeVar("EO", bound="LeafNode") @attr.s(auto_attribs=True) @@ -39,7 +39,7 @@ class LeafNode: return field_dict @classmethod - def from_dict(cls: Type[TO], src_dict: Dict[str, Any]) -> TO: + def from_dict(cls: Type[EO], src_dict: Dict[str, Any]) -> EO: d = src_dict.copy() auth_timeout = d.pop("auth_timeout", UNSET) diff --git a/kittycad/models/mass.py b/kittycad/models/mass.py new file mode 100644 index 000000000..c130f0fe8 --- /dev/null +++ b/kittycad/models/mass.py @@ -0,0 +1,69 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.unit_mass import UnitMass +from ..types import UNSET, Unset + +NY = TypeVar("NY", bound="Mass") + + +@attr.s(auto_attribs=True) +class Mass: + """The mass response.""" # noqa: E501 + + mass: Union[Unset, float] = UNSET + output_unit: Union[Unset, UnitMass] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + mass = self.mass + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if mass is not UNSET: + field_dict["mass"] = mass + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit + + return field_dict + + @classmethod + def from_dict(cls: Type[NY], src_dict: Dict[str, Any]) -> NY: + d = src_dict.copy() + mass = d.pop("mass", UNSET) + + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitMass] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] + + mass = cls( + mass=mass, + output_unit=output_unit, + ) + + mass.additional_properties = d + return mass + + @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 diff --git a/kittycad/models/mesh.py b/kittycad/models/mesh.py index aa40a6eac..0defdeb0d 100644 --- a/kittycad/models/mesh.py +++ b/kittycad/models/mesh.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -ZP = TypeVar("ZP", bound="Mesh") +QO = TypeVar("QO", bound="Mesh") @attr.s(auto_attribs=True) @@ -25,7 +25,7 @@ class Mesh: return field_dict @classmethod - def from_dict(cls: Type[ZP], src_dict: Dict[str, Any]) -> ZP: + def from_dict(cls: Type[QO], src_dict: Dict[str, Any]) -> QO: d = src_dict.copy() mesh = d.pop("mesh", UNSET) diff --git a/kittycad/models/meta_cluster_info.py b/kittycad/models/meta_cluster_info.py index 9f94df2a6..741b5d6d5 100644 --- a/kittycad/models/meta_cluster_info.py +++ b/kittycad/models/meta_cluster_info.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -EO = TypeVar("EO", bound="MetaClusterInfo") +KX = TypeVar("KX", bound="MetaClusterInfo") @attr.s(auto_attribs=True) @@ -35,7 +35,7 @@ class MetaClusterInfo: return field_dict @classmethod - def from_dict(cls: Type[EO], src_dict: Dict[str, Any]) -> EO: + def from_dict(cls: Type[KX], src_dict: Dict[str, Any]) -> KX: d = src_dict.copy() cluster_size = d.pop("cluster_size", UNSET) diff --git a/kittycad/models/metadata.py b/kittycad/models/metadata.py index 9563a8777..17f0215ca 100644 --- a/kittycad/models/metadata.py +++ b/kittycad/models/metadata.py @@ -4,14 +4,12 @@ import attr from ..models.cache_metadata import CacheMetadata from ..models.connection import Connection -from ..models.engine_metadata import EngineMetadata from ..models.environment import Environment -from ..models.executor_metadata import ExecutorMetadata from ..models.file_system_metadata import FileSystemMetadata from ..models.point_e_metadata import PointEMetadata from ..types import UNSET, Unset -NY = TypeVar("NY", bound="Metadata") +IZ = TypeVar("IZ", bound="Metadata") @attr.s(auto_attribs=True) @@ -21,9 +19,7 @@ class Metadata: This is mostly used for internal purposes and debugging.""" # noqa: E501 cache: Union[Unset, CacheMetadata] = UNSET - engine: Union[Unset, EngineMetadata] = UNSET environment: Union[Unset, Environment] = UNSET - executor: Union[Unset, ExecutorMetadata] = UNSET fs: Union[Unset, FileSystemMetadata] = UNSET git_hash: Union[Unset, str] = UNSET point_e: Union[Unset, PointEMetadata] = UNSET @@ -34,12 +30,8 @@ class Metadata: def to_dict(self) -> Dict[str, Any]: if not isinstance(self.cache, Unset): cache = self.cache - if not isinstance(self.engine, Unset): - engine = self.engine if not isinstance(self.environment, Unset): environment = self.environment - if not isinstance(self.executor, Unset): - executor = self.executor if not isinstance(self.fs, Unset): fs = self.fs git_hash = self.git_hash @@ -53,12 +45,8 @@ class Metadata: field_dict.update({}) if cache is not UNSET: field_dict["cache"] = cache - if engine is not UNSET: - field_dict["engine"] = engine if environment is not UNSET: field_dict["environment"] = environment - if executor is not UNSET: - field_dict["executor"] = executor if fs is not UNSET: field_dict["fs"] = fs if git_hash is not UNSET: @@ -71,7 +59,7 @@ class Metadata: return field_dict @classmethod - def from_dict(cls: Type[NY], src_dict: Dict[str, Any]) -> NY: + def from_dict(cls: Type[IZ], src_dict: Dict[str, Any]) -> IZ: d = src_dict.copy() _cache = d.pop("cache", UNSET) cache: Union[Unset, CacheMetadata] @@ -80,13 +68,6 @@ class Metadata: else: cache = _cache # type: ignore[arg-type] - _engine = d.pop("engine", UNSET) - engine: Union[Unset, EngineMetadata] - if isinstance(_engine, Unset): - engine = UNSET - else: - engine = _engine # type: ignore[arg-type] - _environment = d.pop("environment", UNSET) environment: Union[Unset, Environment] if isinstance(_environment, Unset): @@ -94,13 +75,6 @@ class Metadata: else: environment = _environment # type: ignore[arg-type] - _executor = d.pop("executor", UNSET) - executor: Union[Unset, ExecutorMetadata] - if isinstance(_executor, Unset): - executor = UNSET - else: - executor = _executor # type: ignore[arg-type] - _fs = d.pop("fs", UNSET) fs: Union[Unset, FileSystemMetadata] if isinstance(_fs, Unset): @@ -126,9 +100,7 @@ class Metadata: metadata = cls( cache=cache, - engine=engine, environment=environment, - executor=executor, fs=fs, git_hash=git_hash, point_e=point_e, diff --git a/kittycad/models/modeling_cmd.py b/kittycad/models/modeling_cmd.py index bdc99ba75..1be898ee4 100644 --- a/kittycad/models/modeling_cmd.py +++ b/kittycad/models/modeling_cmd.py @@ -14,9 +14,14 @@ from ..models.point2d import Point2d from ..models.point3d import Point3d from ..models.scene_selection_type import SceneSelectionType from ..models.scene_tool_type import SceneToolType +from ..models.unit_area import UnitArea +from ..models.unit_density import UnitDensity +from ..models.unit_length import UnitLength +from ..models.unit_mass import UnitMass +from ..models.unit_volume import UnitVolume from ..types import UNSET, Unset -QO = TypeVar("QO", bound="start_path") +WO = TypeVar("WO", bound="start_path") @attr.s(auto_attribs=True) @@ -38,7 +43,7 @@ class start_path: return field_dict @classmethod - def from_dict(cls: Type[QO], src_dict: Dict[str, Any]) -> QO: + def from_dict(cls: Type[WO], src_dict: Dict[str, Any]) -> WO: d = src_dict.copy() type = d.pop("type", UNSET) @@ -66,7 +71,7 @@ class start_path: return key in self.additional_properties -KX = TypeVar("KX", bound="move_path_pen") +NK = TypeVar("NK", bound="move_path_pen") @attr.s(auto_attribs=True) @@ -98,7 +103,7 @@ class move_path_pen: return field_dict @classmethod - def from_dict(cls: Type[KX], src_dict: Dict[str, Any]) -> KX: + def from_dict(cls: Type[NK], src_dict: Dict[str, Any]) -> NK: d = src_dict.copy() _path = d.pop("path", UNSET) path: Union[Unset, ModelingCmdId] @@ -142,7 +147,7 @@ class move_path_pen: return key in self.additional_properties -IZ = TypeVar("IZ", bound="extend_path") +UQ = TypeVar("UQ", bound="extend_path") @attr.s(auto_attribs=True) @@ -174,7 +179,7 @@ class extend_path: return field_dict @classmethod - def from_dict(cls: Type[IZ], src_dict: Dict[str, Any]) -> IZ: + def from_dict(cls: Type[UQ], src_dict: Dict[str, Any]) -> UQ: d = src_dict.copy() _path = d.pop("path", UNSET) path: Union[Unset, ModelingCmdId] @@ -218,7 +223,7 @@ class extend_path: return key in self.additional_properties -WO = TypeVar("WO", bound="extrude") +QE = TypeVar("QE", bound="extrude") @attr.s(auto_attribs=True) @@ -253,7 +258,7 @@ class extrude: return field_dict @classmethod - def from_dict(cls: Type[WO], src_dict: Dict[str, Any]) -> WO: + def from_dict(cls: Type[QE], src_dict: Dict[str, Any]) -> QE: d = src_dict.copy() cap = d.pop("cap", UNSET) @@ -295,7 +300,7 @@ class extrude: return key in self.additional_properties -NK = TypeVar("NK", bound="close_path") +XH = TypeVar("XH", bound="close_path") @attr.s(auto_attribs=True) @@ -321,7 +326,7 @@ class close_path: return field_dict @classmethod - def from_dict(cls: Type[NK], src_dict: Dict[str, Any]) -> NK: + def from_dict(cls: Type[XH], src_dict: Dict[str, Any]) -> XH: d = src_dict.copy() path_id = d.pop("path_id", UNSET) @@ -352,7 +357,7 @@ class close_path: return key in self.additional_properties -UQ = TypeVar("UQ", bound="camera_drag_start") +KT = TypeVar("KT", bound="camera_drag_start") @attr.s(auto_attribs=True) @@ -384,7 +389,7 @@ class camera_drag_start: return field_dict @classmethod - def from_dict(cls: Type[UQ], src_dict: Dict[str, Any]) -> UQ: + def from_dict(cls: Type[KT], src_dict: Dict[str, Any]) -> KT: d = src_dict.copy() _interaction = d.pop("interaction", UNSET) interaction: Union[Unset, CameraDragInteractionType] @@ -428,7 +433,7 @@ class camera_drag_start: return key in self.additional_properties -QE = TypeVar("QE", bound="camera_drag_move") +BV = TypeVar("BV", bound="camera_drag_move") @attr.s(auto_attribs=True) @@ -464,7 +469,7 @@ class camera_drag_move: return field_dict @classmethod - def from_dict(cls: Type[QE], src_dict: Dict[str, Any]) -> QE: + def from_dict(cls: Type[BV], src_dict: Dict[str, Any]) -> BV: d = src_dict.copy() _interaction = d.pop("interaction", UNSET) interaction: Union[Unset, CameraDragInteractionType] @@ -511,7 +516,7 @@ class camera_drag_move: return key in self.additional_properties -XH = TypeVar("XH", bound="camera_drag_end") +GU = TypeVar("GU", bound="camera_drag_end") @attr.s(auto_attribs=True) @@ -543,7 +548,7 @@ class camera_drag_end: return field_dict @classmethod - def from_dict(cls: Type[XH], src_dict: Dict[str, Any]) -> XH: + def from_dict(cls: Type[GU], src_dict: Dict[str, Any]) -> GU: d = src_dict.copy() _interaction = d.pop("interaction", UNSET) interaction: Union[Unset, CameraDragInteractionType] @@ -587,7 +592,7 @@ class camera_drag_end: return key in self.additional_properties -KT = TypeVar("KT", bound="default_camera_look_at") +SS = TypeVar("SS", bound="default_camera_look_at") @attr.s(auto_attribs=True) @@ -624,7 +629,7 @@ class default_camera_look_at: return field_dict @classmethod - def from_dict(cls: Type[KT], src_dict: Dict[str, Any]) -> KT: + def from_dict(cls: Type[SS], src_dict: Dict[str, Any]) -> SS: d = src_dict.copy() _center = d.pop("center", UNSET) center: Union[Unset, Point3d] @@ -676,7 +681,7 @@ class default_camera_look_at: return key in self.additional_properties -BV = TypeVar("BV", bound="default_camera_zoom") +UP = TypeVar("UP", bound="default_camera_zoom") @attr.s(auto_attribs=True) @@ -702,7 +707,7 @@ class default_camera_zoom: return field_dict @classmethod - def from_dict(cls: Type[BV], src_dict: Dict[str, Any]) -> BV: + def from_dict(cls: Type[UP], src_dict: Dict[str, Any]) -> UP: d = src_dict.copy() magnitude = d.pop("magnitude", UNSET) @@ -733,7 +738,7 @@ class default_camera_zoom: return key in self.additional_properties -GU = TypeVar("GU", bound="default_camera_enable_sketch_mode") +AZ = TypeVar("AZ", bound="default_camera_enable_sketch_mode") @attr.s(auto_attribs=True) @@ -782,7 +787,7 @@ class default_camera_enable_sketch_mode: return field_dict @classmethod - def from_dict(cls: Type[GU], src_dict: Dict[str, Any]) -> GU: + def from_dict(cls: Type[AZ], src_dict: Dict[str, Any]) -> AZ: d = src_dict.copy() animated = d.pop("animated", UNSET) @@ -843,7 +848,7 @@ class default_camera_enable_sketch_mode: return key in self.additional_properties -SS = TypeVar("SS", bound="default_camera_disable_sketch_mode") +DJ = TypeVar("DJ", bound="default_camera_disable_sketch_mode") @attr.s(auto_attribs=True) @@ -865,7 +870,7 @@ class default_camera_disable_sketch_mode: return field_dict @classmethod - def from_dict(cls: Type[SS], src_dict: Dict[str, Any]) -> SS: + def from_dict(cls: Type[DJ], src_dict: Dict[str, Any]) -> DJ: d = src_dict.copy() type = d.pop("type", UNSET) @@ -893,7 +898,7 @@ class default_camera_disable_sketch_mode: return key in self.additional_properties -UP = TypeVar("UP", bound="export") +WJ = TypeVar("WJ", bound="export") @attr.s(auto_attribs=True) @@ -902,6 +907,7 @@ class export: entity_ids: Union[Unset, List[str]] = UNSET format: Union[Unset, OutputFormat] = UNSET + source_unit: Union[Unset, UnitLength] = UNSET type: str = "export" additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -912,6 +918,8 @@ class export: entity_ids = self.entity_ids if not isinstance(self.format, Unset): format = self.format + if not isinstance(self.source_unit, Unset): + source_unit = self.source_unit type = self.type field_dict: Dict[str, Any] = {} @@ -921,12 +929,14 @@ class export: field_dict["entity_ids"] = entity_ids if format is not UNSET: field_dict["format"] = format + if source_unit is not UNSET: + field_dict["source_unit"] = source_unit field_dict["type"] = type return field_dict @classmethod - def from_dict(cls: Type[UP], src_dict: Dict[str, Any]) -> UP: + def from_dict(cls: Type[WJ], src_dict: Dict[str, Any]) -> WJ: d = src_dict.copy() entity_ids = cast(List[str], d.pop("entity_ids", UNSET)) @@ -937,11 +947,19 @@ class export: else: format = _format # type: ignore[arg-type] + _source_unit = d.pop("source_unit", UNSET) + source_unit: Union[Unset, UnitLength] + if isinstance(_source_unit, Unset): + source_unit = UNSET + else: + source_unit = _source_unit # type: ignore[arg-type] + type = d.pop("type", UNSET) export = cls( entity_ids=entity_ids, format=format, + source_unit=source_unit, type=type, ) @@ -965,7 +983,7 @@ class export: return key in self.additional_properties -AZ = TypeVar("AZ", bound="entity_get_parent_id") +TR = TypeVar("TR", bound="entity_get_parent_id") @attr.s(auto_attribs=True) @@ -991,7 +1009,7 @@ class entity_get_parent_id: return field_dict @classmethod - def from_dict(cls: Type[AZ], src_dict: Dict[str, Any]) -> AZ: + def from_dict(cls: Type[TR], src_dict: Dict[str, Any]) -> TR: d = src_dict.copy() entity_id = d.pop("entity_id", UNSET) @@ -1022,7 +1040,7 @@ class entity_get_parent_id: return key in self.additional_properties -DJ = TypeVar("DJ", bound="entity_get_num_children") +YD = TypeVar("YD", bound="entity_get_num_children") @attr.s(auto_attribs=True) @@ -1048,7 +1066,7 @@ class entity_get_num_children: return field_dict @classmethod - def from_dict(cls: Type[DJ], src_dict: Dict[str, Any]) -> DJ: + def from_dict(cls: Type[YD], src_dict: Dict[str, Any]) -> YD: d = src_dict.copy() entity_id = d.pop("entity_id", UNSET) @@ -1079,7 +1097,7 @@ class entity_get_num_children: return key in self.additional_properties -WJ = TypeVar("WJ", bound="entity_get_child_uuid") +JF = TypeVar("JF", bound="entity_get_child_uuid") @attr.s(auto_attribs=True) @@ -1109,7 +1127,7 @@ class entity_get_child_uuid: return field_dict @classmethod - def from_dict(cls: Type[WJ], src_dict: Dict[str, Any]) -> WJ: + def from_dict(cls: Type[JF], src_dict: Dict[str, Any]) -> JF: d = src_dict.copy() child_index = d.pop("child_index", UNSET) @@ -1143,7 +1161,7 @@ class entity_get_child_uuid: return key in self.additional_properties -TR = TypeVar("TR", bound="entity_get_all_child_uuids") +VP = TypeVar("VP", bound="entity_get_all_child_uuids") @attr.s(auto_attribs=True) @@ -1169,7 +1187,7 @@ class entity_get_all_child_uuids: return field_dict @classmethod - def from_dict(cls: Type[TR], src_dict: Dict[str, Any]) -> TR: + def from_dict(cls: Type[VP], src_dict: Dict[str, Any]) -> VP: d = src_dict.copy() entity_id = d.pop("entity_id", UNSET) @@ -1200,7 +1218,7 @@ class entity_get_all_child_uuids: return key in self.additional_properties -YD = TypeVar("YD", bound="edit_mode_enter") +EL = TypeVar("EL", bound="edit_mode_enter") @attr.s(auto_attribs=True) @@ -1226,7 +1244,7 @@ class edit_mode_enter: return field_dict @classmethod - def from_dict(cls: Type[YD], src_dict: Dict[str, Any]) -> YD: + def from_dict(cls: Type[EL], src_dict: Dict[str, Any]) -> EL: d = src_dict.copy() target = d.pop("target", UNSET) @@ -1257,7 +1275,7 @@ class edit_mode_enter: return key in self.additional_properties -JF = TypeVar("JF", bound="edit_mode_exit") +ZG = TypeVar("ZG", bound="edit_mode_exit") @attr.s(auto_attribs=True) @@ -1279,7 +1297,7 @@ class edit_mode_exit: return field_dict @classmethod - def from_dict(cls: Type[JF], src_dict: Dict[str, Any]) -> JF: + def from_dict(cls: Type[ZG], src_dict: Dict[str, Any]) -> ZG: d = src_dict.copy() type = d.pop("type", UNSET) @@ -1307,7 +1325,7 @@ class edit_mode_exit: return key in self.additional_properties -VP = TypeVar("VP", bound="select_with_point") +LF = TypeVar("LF", bound="select_with_point") @attr.s(auto_attribs=True) @@ -1339,7 +1357,7 @@ class select_with_point: return field_dict @classmethod - def from_dict(cls: Type[VP], src_dict: Dict[str, Any]) -> VP: + def from_dict(cls: Type[LF], src_dict: Dict[str, Any]) -> LF: d = src_dict.copy() _selected_at_window = d.pop("selected_at_window", UNSET) selected_at_window: Union[Unset, Point2d] @@ -1383,7 +1401,7 @@ class select_with_point: return key in self.additional_properties -EL = TypeVar("EL", bound="select_clear") +CS = TypeVar("CS", bound="select_clear") @attr.s(auto_attribs=True) @@ -1405,7 +1423,7 @@ class select_clear: return field_dict @classmethod - def from_dict(cls: Type[EL], src_dict: Dict[str, Any]) -> EL: + def from_dict(cls: Type[CS], src_dict: Dict[str, Any]) -> CS: d = src_dict.copy() type = d.pop("type", UNSET) @@ -1433,7 +1451,7 @@ class select_clear: return key in self.additional_properties -ZG = TypeVar("ZG", bound="select_add") +GN = TypeVar("GN", bound="select_add") @attr.s(auto_attribs=True) @@ -1461,7 +1479,7 @@ class select_add: return field_dict @classmethod - def from_dict(cls: Type[ZG], src_dict: Dict[str, Any]) -> ZG: + def from_dict(cls: Type[GN], src_dict: Dict[str, Any]) -> GN: d = src_dict.copy() entities = cast(List[str], d.pop("entities", UNSET)) @@ -1492,7 +1510,7 @@ class select_add: return key in self.additional_properties -LF = TypeVar("LF", bound="select_remove") +GD = TypeVar("GD", bound="select_remove") @attr.s(auto_attribs=True) @@ -1520,7 +1538,7 @@ class select_remove: return field_dict @classmethod - def from_dict(cls: Type[LF], src_dict: Dict[str, Any]) -> LF: + def from_dict(cls: Type[GD], src_dict: Dict[str, Any]) -> GD: d = src_dict.copy() entities = cast(List[str], d.pop("entities", UNSET)) @@ -1551,7 +1569,7 @@ class select_remove: return key in self.additional_properties -CS = TypeVar("CS", bound="select_replace") +VJ = TypeVar("VJ", bound="select_replace") @attr.s(auto_attribs=True) @@ -1579,7 +1597,7 @@ class select_replace: return field_dict @classmethod - def from_dict(cls: Type[CS], src_dict: Dict[str, Any]) -> CS: + def from_dict(cls: Type[VJ], src_dict: Dict[str, Any]) -> VJ: d = src_dict.copy() entities = cast(List[str], d.pop("entities", UNSET)) @@ -1610,7 +1628,7 @@ class select_replace: return key in self.additional_properties -GN = TypeVar("GN", bound="select_get") +OX = TypeVar("OX", bound="select_get") @attr.s(auto_attribs=True) @@ -1632,7 +1650,7 @@ class select_get: return field_dict @classmethod - def from_dict(cls: Type[GN], src_dict: Dict[str, Any]) -> GN: + def from_dict(cls: Type[OX], src_dict: Dict[str, Any]) -> OX: d = src_dict.copy() type = d.pop("type", UNSET) @@ -1660,7 +1678,7 @@ class select_get: return key in self.additional_properties -GD = TypeVar("GD", bound="highlight_set_entity") +YW = TypeVar("YW", bound="highlight_set_entity") @attr.s(auto_attribs=True) @@ -1691,7 +1709,7 @@ class highlight_set_entity: return field_dict @classmethod - def from_dict(cls: Type[GD], src_dict: Dict[str, Any]) -> GD: + def from_dict(cls: Type[YW], src_dict: Dict[str, Any]) -> YW: d = src_dict.copy() _selected_at_window = d.pop("selected_at_window", UNSET) selected_at_window: Union[Unset, Point2d] @@ -1730,7 +1748,7 @@ class highlight_set_entity: return key in self.additional_properties -VJ = TypeVar("VJ", bound="highlight_set_entities") +QX = TypeVar("QX", bound="highlight_set_entities") @attr.s(auto_attribs=True) @@ -1758,7 +1776,7 @@ class highlight_set_entities: return field_dict @classmethod - def from_dict(cls: Type[VJ], src_dict: Dict[str, Any]) -> VJ: + def from_dict(cls: Type[QX], src_dict: Dict[str, Any]) -> QX: d = src_dict.copy() entities = cast(List[str], d.pop("entities", UNSET)) @@ -1789,7 +1807,7 @@ class highlight_set_entities: return key in self.additional_properties -OX = TypeVar("OX", bound="new_annotation") +NO = TypeVar("NO", bound="new_annotation") @attr.s(auto_attribs=True) @@ -1825,7 +1843,7 @@ class new_annotation: return field_dict @classmethod - def from_dict(cls: Type[OX], src_dict: Dict[str, Any]) -> OX: + def from_dict(cls: Type[NO], src_dict: Dict[str, Any]) -> NO: d = src_dict.copy() _annotation_type = d.pop("annotation_type", UNSET) annotation_type: Union[Unset, AnnotationType] @@ -1872,7 +1890,7 @@ class new_annotation: return key in self.additional_properties -YW = TypeVar("YW", bound="update_annotation") +VX = TypeVar("VX", bound="update_annotation") @attr.s(auto_attribs=True) @@ -1903,7 +1921,7 @@ class update_annotation: return field_dict @classmethod - def from_dict(cls: Type[YW], src_dict: Dict[str, Any]) -> YW: + def from_dict(cls: Type[VX], src_dict: Dict[str, Any]) -> VX: d = src_dict.copy() annotation_id = d.pop("annotation_id", UNSET) @@ -1942,7 +1960,7 @@ class update_annotation: return key in self.additional_properties -QX = TypeVar("QX", bound="object_visible") +RG = TypeVar("RG", bound="object_visible") @attr.s(auto_attribs=True) @@ -1972,7 +1990,7 @@ class object_visible: return field_dict @classmethod - def from_dict(cls: Type[QX], src_dict: Dict[str, Any]) -> QX: + def from_dict(cls: Type[RG], src_dict: Dict[str, Any]) -> RG: d = src_dict.copy() hidden = d.pop("hidden", UNSET) @@ -2006,7 +2024,7 @@ class object_visible: return key in self.additional_properties -NO = TypeVar("NO", bound="get_entity_type") +IT = TypeVar("IT", bound="get_entity_type") @attr.s(auto_attribs=True) @@ -2032,7 +2050,7 @@ class get_entity_type: return field_dict @classmethod - def from_dict(cls: Type[NO], src_dict: Dict[str, Any]) -> NO: + def from_dict(cls: Type[IT], src_dict: Dict[str, Any]) -> IT: d = src_dict.copy() entity_id = d.pop("entity_id", UNSET) @@ -2063,7 +2081,7 @@ class get_entity_type: return key in self.additional_properties -VX = TypeVar("VX", bound="solid3d_get_all_edge_faces") +LD = TypeVar("LD", bound="solid3d_get_all_edge_faces") @attr.s(auto_attribs=True) @@ -2093,7 +2111,7 @@ class solid3d_get_all_edge_faces: return field_dict @classmethod - def from_dict(cls: Type[VX], src_dict: Dict[str, Any]) -> VX: + def from_dict(cls: Type[LD], src_dict: Dict[str, Any]) -> LD: d = src_dict.copy() edge_id = d.pop("edge_id", UNSET) @@ -2127,7 +2145,7 @@ class solid3d_get_all_edge_faces: return key in self.additional_properties -RG = TypeVar("RG", bound="solid3d_get_all_opposite_edges") +UA = TypeVar("UA", bound="solid3d_get_all_opposite_edges") @attr.s(auto_attribs=True) @@ -2162,7 +2180,7 @@ class solid3d_get_all_opposite_edges: return field_dict @classmethod - def from_dict(cls: Type[RG], src_dict: Dict[str, Any]) -> RG: + def from_dict(cls: Type[UA], src_dict: Dict[str, Any]) -> UA: d = src_dict.copy() _along_vector = d.pop("along_vector", UNSET) along_vector: Union[Unset, Point3d] @@ -2204,7 +2222,7 @@ class solid3d_get_all_opposite_edges: return key in self.additional_properties -IT = TypeVar("IT", bound="solid3d_get_opposite_edge") +TN = TypeVar("TN", bound="solid3d_get_opposite_edge") @attr.s(auto_attribs=True) @@ -2238,7 +2256,7 @@ class solid3d_get_opposite_edge: return field_dict @classmethod - def from_dict(cls: Type[IT], src_dict: Dict[str, Any]) -> IT: + def from_dict(cls: Type[TN], src_dict: Dict[str, Any]) -> TN: d = src_dict.copy() edge_id = d.pop("edge_id", UNSET) @@ -2275,7 +2293,7 @@ class solid3d_get_opposite_edge: return key in self.additional_properties -LD = TypeVar("LD", bound="solid3d_get_next_adjacent_edge") +MZ = TypeVar("MZ", bound="solid3d_get_next_adjacent_edge") @attr.s(auto_attribs=True) @@ -2309,7 +2327,7 @@ class solid3d_get_next_adjacent_edge: return field_dict @classmethod - def from_dict(cls: Type[LD], src_dict: Dict[str, Any]) -> LD: + def from_dict(cls: Type[MZ], src_dict: Dict[str, Any]) -> MZ: d = src_dict.copy() edge_id = d.pop("edge_id", UNSET) @@ -2346,7 +2364,7 @@ class solid3d_get_next_adjacent_edge: return key in self.additional_properties -UA = TypeVar("UA", bound="solid3d_get_prev_adjacent_edge") +UG = TypeVar("UG", bound="solid3d_get_prev_adjacent_edge") @attr.s(auto_attribs=True) @@ -2380,7 +2398,7 @@ class solid3d_get_prev_adjacent_edge: return field_dict @classmethod - def from_dict(cls: Type[UA], src_dict: Dict[str, Any]) -> UA: + def from_dict(cls: Type[UG], src_dict: Dict[str, Any]) -> UG: d = src_dict.copy() edge_id = d.pop("edge_id", UNSET) @@ -2417,7 +2435,7 @@ class solid3d_get_prev_adjacent_edge: return key in self.additional_properties -TN = TypeVar("TN", bound="send_object") +CY = TypeVar("CY", bound="send_object") @attr.s(auto_attribs=True) @@ -2447,7 +2465,7 @@ class send_object: return field_dict @classmethod - def from_dict(cls: Type[TN], src_dict: Dict[str, Any]) -> TN: + def from_dict(cls: Type[CY], src_dict: Dict[str, Any]) -> CY: d = src_dict.copy() front = d.pop("front", UNSET) @@ -2481,7 +2499,7 @@ class send_object: return key in self.additional_properties -MZ = TypeVar("MZ", bound="entity_set_opacity") +NZ = TypeVar("NZ", bound="entity_set_opacity") @attr.s(auto_attribs=True) @@ -2511,7 +2529,7 @@ class entity_set_opacity: return field_dict @classmethod - def from_dict(cls: Type[MZ], src_dict: Dict[str, Any]) -> MZ: + def from_dict(cls: Type[NZ], src_dict: Dict[str, Any]) -> NZ: d = src_dict.copy() entity_id = d.pop("entity_id", UNSET) @@ -2545,7 +2563,7 @@ class entity_set_opacity: return key in self.additional_properties -UG = TypeVar("UG", bound="entity_fade") +LI = TypeVar("LI", bound="entity_fade") @attr.s(auto_attribs=True) @@ -2579,7 +2597,7 @@ class entity_fade: return field_dict @classmethod - def from_dict(cls: Type[UG], src_dict: Dict[str, Any]) -> UG: + def from_dict(cls: Type[LI], src_dict: Dict[str, Any]) -> LI: d = src_dict.copy() duration_seconds = d.pop("duration_seconds", UNSET) @@ -2616,7 +2634,7 @@ class entity_fade: return key in self.additional_properties -CY = TypeVar("CY", bound="make_plane") +LO = TypeVar("LO", bound="make_plane") @attr.s(auto_attribs=True) @@ -2661,7 +2679,7 @@ class make_plane: return field_dict @classmethod - def from_dict(cls: Type[CY], src_dict: Dict[str, Any]) -> CY: + def from_dict(cls: Type[LO], src_dict: Dict[str, Any]) -> LO: d = src_dict.copy() clobber = d.pop("clobber", UNSET) @@ -2719,7 +2737,7 @@ class make_plane: return key in self.additional_properties -NZ = TypeVar("NZ", bound="plane_set_color") +XJ = TypeVar("XJ", bound="plane_set_color") @attr.s(auto_attribs=True) @@ -2750,7 +2768,7 @@ class plane_set_color: return field_dict @classmethod - def from_dict(cls: Type[NZ], src_dict: Dict[str, Any]) -> NZ: + def from_dict(cls: Type[XJ], src_dict: Dict[str, Any]) -> XJ: d = src_dict.copy() _color = d.pop("color", UNSET) color: Union[Unset, Color] @@ -2789,7 +2807,7 @@ class plane_set_color: return key in self.additional_properties -LI = TypeVar("LI", bound="set_tool") +OW = TypeVar("OW", bound="set_tool") @attr.s(auto_attribs=True) @@ -2816,7 +2834,7 @@ class set_tool: return field_dict @classmethod - def from_dict(cls: Type[LI], src_dict: Dict[str, Any]) -> LI: + def from_dict(cls: Type[OW], src_dict: Dict[str, Any]) -> OW: d = src_dict.copy() _tool = d.pop("tool", UNSET) tool: Union[Unset, SceneToolType] @@ -2852,7 +2870,7 @@ class set_tool: return key in self.additional_properties -LO = TypeVar("LO", bound="mouse_move") +JQ = TypeVar("JQ", bound="mouse_move") @attr.s(auto_attribs=True) @@ -2883,7 +2901,7 @@ class mouse_move: return field_dict @classmethod - def from_dict(cls: Type[LO], src_dict: Dict[str, Any]) -> LO: + def from_dict(cls: Type[JQ], src_dict: Dict[str, Any]) -> JQ: d = src_dict.copy() sequence = d.pop("sequence", UNSET) @@ -2922,7 +2940,7 @@ class mouse_move: return key in self.additional_properties -XJ = TypeVar("XJ", bound="mouse_click") +PQ = TypeVar("PQ", bound="mouse_click") @attr.s(auto_attribs=True) @@ -2949,7 +2967,7 @@ class mouse_click: return field_dict @classmethod - def from_dict(cls: Type[XJ], src_dict: Dict[str, Any]) -> XJ: + def from_dict(cls: Type[PQ], src_dict: Dict[str, Any]) -> PQ: d = src_dict.copy() type = d.pop("type", UNSET) @@ -2985,7 +3003,7 @@ class mouse_click: return key in self.additional_properties -OW = TypeVar("OW", bound="sketch_mode_enable") +IM = TypeVar("IM", bound="sketch_mode_enable") @attr.s(auto_attribs=True) @@ -3019,7 +3037,7 @@ class sketch_mode_enable: return field_dict @classmethod - def from_dict(cls: Type[OW], src_dict: Dict[str, Any]) -> OW: + def from_dict(cls: Type[IM], src_dict: Dict[str, Any]) -> IM: d = src_dict.copy() animated = d.pop("animated", UNSET) @@ -3056,7 +3074,7 @@ class sketch_mode_enable: return key in self.additional_properties -JQ = TypeVar("JQ", bound="sketch_mode_disable") +OU = TypeVar("OU", bound="sketch_mode_disable") @attr.s(auto_attribs=True) @@ -3078,7 +3096,7 @@ class sketch_mode_disable: return field_dict @classmethod - def from_dict(cls: Type[JQ], src_dict: Dict[str, Any]) -> JQ: + def from_dict(cls: Type[OU], src_dict: Dict[str, Any]) -> OU: d = src_dict.copy() type = d.pop("type", UNSET) @@ -3106,7 +3124,7 @@ class sketch_mode_disable: return key in self.additional_properties -PQ = TypeVar("PQ", bound="curve_get_type") +KL = TypeVar("KL", bound="curve_get_type") @attr.s(auto_attribs=True) @@ -3132,7 +3150,7 @@ class curve_get_type: return field_dict @classmethod - def from_dict(cls: Type[PQ], src_dict: Dict[str, Any]) -> PQ: + def from_dict(cls: Type[KL], src_dict: Dict[str, Any]) -> KL: d = src_dict.copy() curve_id = d.pop("curve_id", UNSET) @@ -3163,7 +3181,7 @@ class curve_get_type: return key in self.additional_properties -IM = TypeVar("IM", bound="curve_get_control_points") +XI = TypeVar("XI", bound="curve_get_control_points") @attr.s(auto_attribs=True) @@ -3189,7 +3207,7 @@ class curve_get_control_points: return field_dict @classmethod - def from_dict(cls: Type[IM], src_dict: Dict[str, Any]) -> IM: + def from_dict(cls: Type[XI], src_dict: Dict[str, Any]) -> XI: d = src_dict.copy() curve_id = d.pop("curve_id", UNSET) @@ -3220,7 +3238,7 @@ class curve_get_control_points: return key in self.additional_properties -OU = TypeVar("OU", bound="take_snapshot") +PO = TypeVar("PO", bound="take_snapshot") @attr.s(auto_attribs=True) @@ -3247,7 +3265,7 @@ class take_snapshot: return field_dict @classmethod - def from_dict(cls: Type[OU], src_dict: Dict[str, Any]) -> OU: + def from_dict(cls: Type[PO], src_dict: Dict[str, Any]) -> PO: d = src_dict.copy() _format = d.pop("format", UNSET) format: Union[Unset, ImageFormat] @@ -3283,7 +3301,7 @@ class take_snapshot: return key in self.additional_properties -KL = TypeVar("KL", bound="make_axes_gizmo") +PS = TypeVar("PS", bound="make_axes_gizmo") @attr.s(auto_attribs=True) @@ -3313,7 +3331,7 @@ class make_axes_gizmo: return field_dict @classmethod - def from_dict(cls: Type[KL], src_dict: Dict[str, Any]) -> KL: + def from_dict(cls: Type[PS], src_dict: Dict[str, Any]) -> PS: d = src_dict.copy() clobber = d.pop("clobber", UNSET) @@ -3347,7 +3365,7 @@ class make_axes_gizmo: return key in self.additional_properties -XI = TypeVar("XI", bound="path_get_info") +WR = TypeVar("WR", bound="path_get_info") @attr.s(auto_attribs=True) @@ -3373,7 +3391,7 @@ class path_get_info: return field_dict @classmethod - def from_dict(cls: Type[XI], src_dict: Dict[str, Any]) -> XI: + def from_dict(cls: Type[WR], src_dict: Dict[str, Any]) -> WR: d = src_dict.copy() path_id = d.pop("path_id", UNSET) @@ -3404,7 +3422,73 @@ class path_get_info: return key in self.additional_properties -PO = TypeVar("PO", bound="handle_mouse_drag_start") +XL = TypeVar("XL", bound="path_get_curve_uuids_for_vertices") + + +@attr.s(auto_attribs=True) +class path_get_curve_uuids_for_vertices: + """Get curves for vertices within a path""" # noqa: E501 + + path_id: Union[Unset, str] = UNSET + type: str = "path_get_curve_uuids_for_vertices" + vertex_ids: Union[Unset, List[str]] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + path_id = self.path_id + type = self.type + vertex_ids: Union[Unset, List[str]] = UNSET + if not isinstance(self.vertex_ids, Unset): + vertex_ids = self.vertex_ids + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if path_id is not UNSET: + field_dict["path_id"] = path_id + field_dict["type"] = type + if vertex_ids is not UNSET: + field_dict["vertex_ids"] = vertex_ids + + return field_dict + + @classmethod + def from_dict(cls: Type[XL], src_dict: Dict[str, Any]) -> XL: + d = src_dict.copy() + path_id = d.pop("path_id", UNSET) + + type = d.pop("type", UNSET) + + vertex_ids = cast(List[str], d.pop("vertex_ids", UNSET)) + + path_get_curve_uuids_for_vertices = cls( + path_id=path_id, + type=type, + vertex_ids=vertex_ids, + ) + + path_get_curve_uuids_for_vertices.additional_properties = d + return path_get_curve_uuids_for_vertices + + @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 + + +ZX = TypeVar("ZX", bound="handle_mouse_drag_start") @attr.s(auto_attribs=True) @@ -3431,7 +3515,7 @@ class handle_mouse_drag_start: return field_dict @classmethod - def from_dict(cls: Type[PO], src_dict: Dict[str, Any]) -> PO: + def from_dict(cls: Type[ZX], src_dict: Dict[str, Any]) -> ZX: d = src_dict.copy() type = d.pop("type", UNSET) @@ -3467,7 +3551,7 @@ class handle_mouse_drag_start: return key in self.additional_properties -PS = TypeVar("PS", bound="handle_mouse_drag_move") +FT = TypeVar("FT", bound="handle_mouse_drag_move") @attr.s(auto_attribs=True) @@ -3498,7 +3582,7 @@ class handle_mouse_drag_move: return field_dict @classmethod - def from_dict(cls: Type[PS], src_dict: Dict[str, Any]) -> PS: + def from_dict(cls: Type[FT], src_dict: Dict[str, Any]) -> FT: d = src_dict.copy() sequence = d.pop("sequence", UNSET) @@ -3537,7 +3621,7 @@ class handle_mouse_drag_move: return key in self.additional_properties -WR = TypeVar("WR", bound="handle_mouse_drag_end") +NX = TypeVar("NX", bound="handle_mouse_drag_end") @attr.s(auto_attribs=True) @@ -3564,7 +3648,7 @@ class handle_mouse_drag_end: return field_dict @classmethod - def from_dict(cls: Type[WR], src_dict: Dict[str, Any]) -> WR: + def from_dict(cls: Type[NX], src_dict: Dict[str, Any]) -> NX: d = src_dict.copy() type = d.pop("type", UNSET) @@ -3600,7 +3684,7 @@ class handle_mouse_drag_end: return key in self.additional_properties -XL = TypeVar("XL", bound="remove_scene_objects") +SC = TypeVar("SC", bound="remove_scene_objects") @attr.s(auto_attribs=True) @@ -3628,7 +3712,7 @@ class remove_scene_objects: return field_dict @classmethod - def from_dict(cls: Type[XL], src_dict: Dict[str, Any]) -> XL: + def from_dict(cls: Type[SC], src_dict: Dict[str, Any]) -> SC: d = src_dict.copy() object_ids = cast(List[str], d.pop("object_ids", UNSET)) @@ -3659,6 +3743,734 @@ class remove_scene_objects: return key in self.additional_properties +TX = TypeVar("TX", bound="plane_intersect_and_project") + + +@attr.s(auto_attribs=True) +class plane_intersect_and_project: + """Utility method. Performs both a ray cast and projection to plane-local coordinates. Returns the plane coordinates for the given window coordinates.""" # noqa: E501 + + plane_id: Union[Unset, str] = UNSET + type: str = "plane_intersect_and_project" + window: Union[Unset, Point2d] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + plane_id = self.plane_id + type = self.type + if not isinstance(self.window, Unset): + window = self.window + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if plane_id is not UNSET: + field_dict["plane_id"] = plane_id + field_dict["type"] = type + if window is not UNSET: + field_dict["window"] = window + + return field_dict + + @classmethod + def from_dict(cls: Type[TX], src_dict: Dict[str, Any]) -> TX: + d = src_dict.copy() + plane_id = d.pop("plane_id", UNSET) + + type = d.pop("type", UNSET) + + _window = d.pop("window", UNSET) + window: Union[Unset, Point2d] + if isinstance(_window, Unset): + window = UNSET + else: + window = _window # type: ignore[arg-type] + + plane_intersect_and_project = cls( + plane_id=plane_id, + type=type, + window=window, + ) + + plane_intersect_and_project.additional_properties = d + return plane_intersect_and_project + + @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 + + +JA = TypeVar("JA", bound="curve_get_end_points") + + +@attr.s(auto_attribs=True) +class curve_get_end_points: + """Find the start and end of a curve.""" # noqa: E501 + + curve_id: Union[Unset, str] = UNSET + type: str = "curve_get_end_points" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + curve_id = self.curve_id + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if curve_id is not UNSET: + field_dict["curve_id"] = curve_id + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[JA], src_dict: Dict[str, Any]) -> JA: + d = src_dict.copy() + curve_id = d.pop("curve_id", UNSET) + + type = d.pop("type", UNSET) + + curve_get_end_points = cls( + curve_id=curve_id, + type=type, + ) + + curve_get_end_points.additional_properties = d + return curve_get_end_points + + @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 + + +SK = TypeVar("SK", bound="reconfigure_stream") + + +@attr.s(auto_attribs=True) +class reconfigure_stream: + """Reconfigure the stream.""" # noqa: E501 + + fps: Union[Unset, int] = UNSET + height: Union[Unset, int] = UNSET + type: str = "reconfigure_stream" + width: Union[Unset, int] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + fps = self.fps + height = self.height + type = self.type + width = self.width + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if fps is not UNSET: + field_dict["fps"] = fps + if height is not UNSET: + field_dict["height"] = height + field_dict["type"] = type + if width is not UNSET: + field_dict["width"] = width + + return field_dict + + @classmethod + def from_dict(cls: Type[SK], src_dict: Dict[str, Any]) -> SK: + d = src_dict.copy() + fps = d.pop("fps", UNSET) + + height = d.pop("height", UNSET) + + type = d.pop("type", UNSET) + + width = d.pop("width", UNSET) + + reconfigure_stream = cls( + fps=fps, + height=height, + type=type, + width=width, + ) + + reconfigure_stream.additional_properties = d + return reconfigure_stream + + @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 + + +UK = TypeVar("UK", bound="import_files") + + +@attr.s(auto_attribs=True) +class import_files: + """Import files to the current model.""" # noqa: E501 + + from ..models.import_file import ImportFile + + files: Union[Unset, List[ImportFile]] = UNSET + type: str = "import_files" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + from ..models.import_file import ImportFile + + files: Union[Unset, List[ImportFile]] = 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[UK], src_dict: Dict[str, Any]) -> UK: + d = src_dict.copy() + from ..models.import_file import ImportFile + + files = cast(List[ImportFile], d.pop("files", UNSET)) + + type = d.pop("type", UNSET) + + import_files = cls( + files=files, + type=type, + ) + + import_files.additional_properties = d + return import_files + + @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 + + +CX = TypeVar("CX", bound="mass") + + +@attr.s(auto_attribs=True) +class mass: + """Get the mass of entities in the scene or the default scene.""" # noqa: E501 + + entity_ids: Union[Unset, List[str]] = UNSET + material_density: Union[Unset, float] = UNSET + material_density_unit: Union[Unset, UnitDensity] = UNSET + output_unit: Union[Unset, UnitMass] = UNSET + source_unit: Union[Unset, UnitLength] = UNSET + type: str = "mass" + + 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 + material_density = self.material_density + if not isinstance(self.material_density_unit, Unset): + material_density_unit = self.material_density_unit + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + if not isinstance(self.source_unit, Unset): + source_unit = self.source_unit + 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 + if material_density is not UNSET: + field_dict["material_density"] = material_density + if material_density_unit is not UNSET: + field_dict["material_density_unit"] = material_density_unit + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit + if source_unit is not UNSET: + field_dict["source_unit"] = source_unit + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[CX], src_dict: Dict[str, Any]) -> CX: + d = src_dict.copy() + entity_ids = cast(List[str], d.pop("entity_ids", UNSET)) + + material_density = d.pop("material_density", UNSET) + + _material_density_unit = d.pop("material_density_unit", UNSET) + material_density_unit: Union[Unset, UnitDensity] + if isinstance(_material_density_unit, Unset): + material_density_unit = UNSET + else: + material_density_unit = _material_density_unit # type: ignore[arg-type] + + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitMass] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] + + _source_unit = d.pop("source_unit", UNSET) + source_unit: Union[Unset, UnitLength] + if isinstance(_source_unit, Unset): + source_unit = UNSET + else: + source_unit = _source_unit # type: ignore[arg-type] + + type = d.pop("type", UNSET) + + mass = cls( + entity_ids=entity_ids, + material_density=material_density, + material_density_unit=material_density_unit, + output_unit=output_unit, + source_unit=source_unit, + type=type, + ) + + mass.additional_properties = d + return mass + + @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 + + +MT = TypeVar("MT", bound="density") + + +@attr.s(auto_attribs=True) +class density: + """Get the density of entities in the scene or the default scene.""" # noqa: E501 + + entity_ids: Union[Unset, List[str]] = UNSET + material_mass: Union[Unset, float] = UNSET + material_mass_unit: Union[Unset, UnitMass] = UNSET + output_unit: Union[Unset, UnitDensity] = UNSET + source_unit: Union[Unset, UnitLength] = UNSET + type: str = "density" + + 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 + material_mass = self.material_mass + if not isinstance(self.material_mass_unit, Unset): + material_mass_unit = self.material_mass_unit + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + if not isinstance(self.source_unit, Unset): + source_unit = self.source_unit + 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 + if material_mass is not UNSET: + field_dict["material_mass"] = material_mass + if material_mass_unit is not UNSET: + field_dict["material_mass_unit"] = material_mass_unit + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit + if source_unit is not UNSET: + field_dict["source_unit"] = source_unit + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[MT], src_dict: Dict[str, Any]) -> MT: + d = src_dict.copy() + entity_ids = cast(List[str], d.pop("entity_ids", UNSET)) + + material_mass = d.pop("material_mass", UNSET) + + _material_mass_unit = d.pop("material_mass_unit", UNSET) + material_mass_unit: Union[Unset, UnitMass] + if isinstance(_material_mass_unit, Unset): + material_mass_unit = UNSET + else: + material_mass_unit = _material_mass_unit # type: ignore[arg-type] + + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitDensity] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] + + _source_unit = d.pop("source_unit", UNSET) + source_unit: Union[Unset, UnitLength] + if isinstance(_source_unit, Unset): + source_unit = UNSET + else: + source_unit = _source_unit # type: ignore[arg-type] + + type = d.pop("type", UNSET) + + density = cls( + entity_ids=entity_ids, + material_mass=material_mass, + material_mass_unit=material_mass_unit, + output_unit=output_unit, + source_unit=source_unit, + type=type, + ) + + density.additional_properties = d + return density + + @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 + + +LJ = TypeVar("LJ", bound="volume") + + +@attr.s(auto_attribs=True) +class volume: + """Get the volume of entities in the scene or the default scene.""" # noqa: E501 + + entity_ids: Union[Unset, List[str]] = UNSET + output_unit: Union[Unset, UnitVolume] = UNSET + source_unit: Union[Unset, UnitLength] = UNSET + type: str = "volume" + + 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 + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + if not isinstance(self.source_unit, Unset): + source_unit = self.source_unit + 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 + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit + if source_unit is not UNSET: + field_dict["source_unit"] = source_unit + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[LJ], src_dict: Dict[str, Any]) -> LJ: + d = src_dict.copy() + entity_ids = cast(List[str], d.pop("entity_ids", UNSET)) + + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitVolume] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] + + _source_unit = d.pop("source_unit", UNSET) + source_unit: Union[Unset, UnitLength] + if isinstance(_source_unit, Unset): + source_unit = UNSET + else: + source_unit = _source_unit # type: ignore[arg-type] + + type = d.pop("type", UNSET) + + volume = cls( + entity_ids=entity_ids, + output_unit=output_unit, + source_unit=source_unit, + type=type, + ) + + volume.additional_properties = d + return volume + + @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 + + +TF = TypeVar("TF", bound="center_of_mass") + + +@attr.s(auto_attribs=True) +class center_of_mass: + """Get the center of mass of entities in the scene or the default scene.""" # noqa: E501 + + entity_ids: Union[Unset, List[str]] = UNSET + output_unit: Union[Unset, UnitLength] = UNSET + source_unit: Union[Unset, UnitLength] = UNSET + type: str = "center_of_mass" + + 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 + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + if not isinstance(self.source_unit, Unset): + source_unit = self.source_unit + 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 + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit + if source_unit is not UNSET: + field_dict["source_unit"] = source_unit + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[TF], src_dict: Dict[str, Any]) -> TF: + d = src_dict.copy() + entity_ids = cast(List[str], d.pop("entity_ids", UNSET)) + + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitLength] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] + + _source_unit = d.pop("source_unit", UNSET) + source_unit: Union[Unset, UnitLength] + if isinstance(_source_unit, Unset): + source_unit = UNSET + else: + source_unit = _source_unit # type: ignore[arg-type] + + type = d.pop("type", UNSET) + + center_of_mass = cls( + entity_ids=entity_ids, + output_unit=output_unit, + source_unit=source_unit, + type=type, + ) + + center_of_mass.additional_properties = d + return center_of_mass + + @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 + + +HF = TypeVar("HF", bound="surface_area") + + +@attr.s(auto_attribs=True) +class surface_area: + """Get the surface area of entities in the scene or the default scene.""" # noqa: E501 + + entity_ids: Union[Unset, List[str]] = UNSET + output_unit: Union[Unset, UnitArea] = UNSET + source_unit: Union[Unset, UnitLength] = UNSET + type: str = "surface_area" + + 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 + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + if not isinstance(self.source_unit, Unset): + source_unit = self.source_unit + 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 + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit + if source_unit is not UNSET: + field_dict["source_unit"] = source_unit + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[HF], src_dict: Dict[str, Any]) -> HF: + d = src_dict.copy() + entity_ids = cast(List[str], d.pop("entity_ids", UNSET)) + + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitArea] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] + + _source_unit = d.pop("source_unit", UNSET) + source_unit: Union[Unset, UnitLength] + if isinstance(_source_unit, Unset): + source_unit = UNSET + else: + source_unit = _source_unit # type: ignore[arg-type] + + type = d.pop("type", UNSET) + + surface_area = cls( + entity_ids=entity_ids, + output_unit=output_unit, + source_unit=source_unit, + type=type, + ) + + surface_area.additional_properties = d + return surface_area + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + + ModelingCmd = Union[ start_path, move_path_pen, @@ -3711,8 +4523,18 @@ ModelingCmd = Union[ take_snapshot, make_axes_gizmo, path_get_info, + path_get_curve_uuids_for_vertices, handle_mouse_drag_start, handle_mouse_drag_move, handle_mouse_drag_end, remove_scene_objects, + plane_intersect_and_project, + curve_get_end_points, + reconfigure_stream, + import_files, + mass, + density, + volume, + center_of_mass, + surface_area, ] diff --git a/kittycad/models/modeling_cmd_req.py b/kittycad/models/modeling_cmd_req.py deleted file mode 100644 index 7ead471f5..000000000 --- a/kittycad/models/modeling_cmd_req.py +++ /dev/null @@ -1,76 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar, Union - -import attr - -from ..models.modeling_cmd import ModelingCmd -from ..models.modeling_cmd_id import ModelingCmdId -from ..types import UNSET, Unset - -ZX = TypeVar("ZX", bound="ModelingCmdReq") - - -@attr.s(auto_attribs=True) -class ModelingCmdReq: - """A graphics command submitted to the KittyCAD engine via the Modeling API.""" # noqa: E501 - - cmd: Union[Unset, ModelingCmd] = UNSET - cmd_id: Union[Unset, ModelingCmdId] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.cmd, Unset): - cmd = self.cmd - if not isinstance(self.cmd_id, Unset): - cmd_id = self.cmd_id - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if cmd is not UNSET: - field_dict["cmd"] = cmd - if cmd_id is not UNSET: - field_dict["cmd_id"] = cmd_id - - return field_dict - - @classmethod - def from_dict(cls: Type[ZX], src_dict: Dict[str, Any]) -> ZX: - d = src_dict.copy() - _cmd = d.pop("cmd", UNSET) - cmd: Union[Unset, ModelingCmd] - if isinstance(_cmd, Unset): - cmd = UNSET - else: - cmd = _cmd # type: ignore[arg-type] - - _cmd_id = d.pop("cmd_id", UNSET) - cmd_id: Union[Unset, ModelingCmdId] - if isinstance(_cmd_id, Unset): - cmd_id = UNSET - else: - cmd_id = _cmd_id # type: ignore[arg-type] - - modeling_cmd_req = cls( - cmd=cmd, - cmd_id=cmd_id, - ) - - modeling_cmd_req.additional_properties = d - return modeling_cmd_req - - @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 diff --git a/kittycad/models/modeling_cmd_req_batch.py b/kittycad/models/modeling_cmd_req_batch.py deleted file mode 100644 index 7dfb4bbb9..000000000 --- a/kittycad/models/modeling_cmd_req_batch.py +++ /dev/null @@ -1,70 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar, Union - -import attr - -from ..models.modeling_cmd_req import ModelingCmdReq -from ..types import UNSET, Unset - -FT = TypeVar("FT", bound="ModelingCmdReqBatch") - - -@attr.s(auto_attribs=True) -class ModelingCmdReqBatch: - """A batch set of graphics commands submitted to the KittyCAD engine via the Modeling API.""" # noqa: E501 - - from ..models.modeling_cmd_req import ModelingCmdReq - - cmds: Union[Unset, Dict[str, ModelingCmdReq]] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - cmds: Union[Unset, Dict[str, Any]] = UNSET - if not isinstance(self.cmds, Unset): - new_dict: Dict[str, Any] = {} - for key, value in self.cmds.items(): - new_dict[key] = value.to_dict() - cmds = new_dict - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if cmds is not UNSET: - field_dict["cmds"] = cmds - - return field_dict - - @classmethod - def from_dict(cls: Type[FT], src_dict: Dict[str, Any]) -> FT: - d = src_dict.copy() - _cmds = d.pop("cmds", UNSET) - if isinstance(_cmds, Unset): - cmds = UNSET - else: - new_map: Dict[str, ModelingCmdReq] = {} - for k, v in _cmds.items(): - new_map[k] = ModelingCmdReq.from_dict(v) # type: ignore - cmds = new_map # type: ignore - - modeling_cmd_req_batch = cls( - cmds=cmds, - ) - - modeling_cmd_req_batch.additional_properties = d - return modeling_cmd_req_batch - - @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 diff --git a/kittycad/models/modeling_error.py b/kittycad/models/modeling_error.py deleted file mode 100644 index d06ff233a..000000000 --- a/kittycad/models/modeling_error.py +++ /dev/null @@ -1,76 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar, Union - -import attr - -from ..types import UNSET, Unset - -NX = TypeVar("NX", bound="ModelingError") - - -@attr.s(auto_attribs=True) -class ModelingError: - """Why a command submitted to the Modeling API failed.""" # noqa: E501 - - error_code: Union[Unset, str] = UNSET - external_message: Union[Unset, str] = UNSET - internal_message: Union[Unset, str] = UNSET - status_code: Union[Unset, int] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - error_code = self.error_code - external_message = self.external_message - internal_message = self.internal_message - status_code = self.status_code - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if error_code is not UNSET: - field_dict["error_code"] = error_code - if external_message is not UNSET: - field_dict["external_message"] = external_message - if internal_message is not UNSET: - field_dict["internal_message"] = internal_message - if status_code is not UNSET: - field_dict["status_code"] = status_code - - return field_dict - - @classmethod - def from_dict(cls: Type[NX], src_dict: Dict[str, Any]) -> NX: - d = src_dict.copy() - error_code = d.pop("error_code", UNSET) - - external_message = d.pop("external_message", UNSET) - - internal_message = d.pop("internal_message", UNSET) - - status_code = d.pop("status_code", UNSET) - - modeling_error = cls( - error_code=error_code, - external_message=external_message, - internal_message=internal_message, - status_code=status_code, - ) - - modeling_error.additional_properties = d - return modeling_error - - @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 diff --git a/kittycad/models/modeling_outcome.py b/kittycad/models/modeling_outcome.py deleted file mode 100644 index 4dcafb522..000000000 --- a/kittycad/models/modeling_outcome.py +++ /dev/null @@ -1,71 +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 -from .modeling_error import ModelingError -from .ok_modeling_cmd_response import OkModelingCmdResponse - -success = OkModelingCmdResponse - - -error = ModelingError - - -SC = TypeVar("SC", bound="cancelled") - - -@attr.s(auto_attribs=True) -class cancelled: - what_failed: Union[Unset, ModelingCmdId] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.what_failed, Unset): - what_failed = self.what_failed - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if what_failed is not UNSET: - field_dict["what_failed"] = what_failed - - return field_dict - - @classmethod - def from_dict(cls: Type[SC], src_dict: Dict[str, Any]) -> SC: - d = src_dict.copy() - _what_failed = d.pop("what_failed", UNSET) - what_failed: Union[Unset, ModelingCmdId] - if isinstance(_what_failed, Unset): - what_failed = UNSET - else: - what_failed = _what_failed # type: ignore[arg-type] - - cancelled = cls( - what_failed=what_failed, - ) - - cancelled.additional_properties = d - return cancelled - - @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 - - -ModelingOutcome = Union[success, error, cancelled] diff --git a/kittycad/models/modeling_outcomes.py b/kittycad/models/modeling_outcomes.py deleted file mode 100644 index ea81b25a6..000000000 --- a/kittycad/models/modeling_outcomes.py +++ /dev/null @@ -1,70 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar, Union - -import attr - -from ..models.modeling_outcome import ModelingOutcome -from ..types import UNSET, Unset - -TX = TypeVar("TX", bound="ModelingOutcomes") - - -@attr.s(auto_attribs=True) -class ModelingOutcomes: - """The result from a batch of modeling commands.""" # noqa: E501 - - from ..models.modeling_outcome import ModelingOutcome - - outcomes: Union[Unset, Dict[str, ModelingOutcome]] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - outcomes: Union[Unset, Dict[str, Any]] = UNSET - if not isinstance(self.outcomes, Unset): - new_dict: Dict[str, Any] = {} - for key, value in self.outcomes.items(): - new_dict[key] = value.to_dict() - outcomes = new_dict - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if outcomes is not UNSET: - field_dict["outcomes"] = outcomes - - return field_dict - - @classmethod - def from_dict(cls: Type[TX], src_dict: Dict[str, Any]) -> TX: - d = src_dict.copy() - _outcomes = d.pop("outcomes", UNSET) - if isinstance(_outcomes, Unset): - outcomes = UNSET - else: - new_map: Dict[str, ModelingOutcome] = {} - for k, v in _outcomes.items(): - new_map[k] = ModelingOutcome.from_dict(v) # type: ignore - outcomes = new_map # type: ignore - - modeling_outcomes = cls( - outcomes=outcomes, - ) - - modeling_outcomes.additional_properties = d - return modeling_outcomes - - @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 diff --git a/kittycad/models/mouse_click.py b/kittycad/models/mouse_click.py index 087def181..e7d6f2f03 100644 --- a/kittycad/models/mouse_click.py +++ b/kittycad/models/mouse_click.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -JA = TypeVar("JA", bound="MouseClick") +JD = TypeVar("JD", bound="MouseClick") @attr.s(auto_attribs=True) @@ -35,7 +35,7 @@ class MouseClick: return field_dict @classmethod - def from_dict(cls: Type[JA], src_dict: Dict[str, Any]) -> JA: + def from_dict(cls: Type[JD], src_dict: Dict[str, Any]) -> JD: d = src_dict.copy() entities_modified = cast(List[str], d.pop("entities_modified", UNSET)) diff --git a/kittycad/models/new_address.py b/kittycad/models/new_address.py index 4ca6c97c3..44e77d465 100644 --- a/kittycad/models/new_address.py +++ b/kittycad/models/new_address.py @@ -5,7 +5,7 @@ import attr from ..models.country_code import CountryCode from ..types import UNSET, Unset -SK = TypeVar("SK", bound="NewAddress") +RZ = TypeVar("RZ", bound="NewAddress") @attr.s(auto_attribs=True) @@ -53,7 +53,7 @@ class NewAddress: return field_dict @classmethod - def from_dict(cls: Type[SK], src_dict: Dict[str, Any]) -> SK: + def from_dict(cls: Type[RZ], src_dict: Dict[str, Any]) -> RZ: d = src_dict.copy() city = d.pop("city", UNSET) diff --git a/kittycad/models/o_auth2_client_info.py b/kittycad/models/o_auth2_client_info.py index d1da2547e..e6096215c 100644 --- a/kittycad/models/o_auth2_client_info.py +++ b/kittycad/models/o_auth2_client_info.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -UK = TypeVar("UK", bound="OAuth2ClientInfo") +BH = TypeVar("BH", bound="OAuth2ClientInfo") @attr.s(auto_attribs=True) @@ -35,7 +35,7 @@ class OAuth2ClientInfo: return field_dict @classmethod - def from_dict(cls: Type[UK], src_dict: Dict[str, Any]) -> UK: + def from_dict(cls: Type[BH], src_dict: Dict[str, Any]) -> BH: d = src_dict.copy() csrf_token = d.pop("csrf_token", UNSET) diff --git a/kittycad/models/ok_modeling_cmd_response.py b/kittycad/models/ok_modeling_cmd_response.py index e2f0c6daf..f1f09a988 100644 --- a/kittycad/models/ok_modeling_cmd_response.py +++ b/kittycad/models/ok_modeling_cmd_response.py @@ -2,8 +2,11 @@ from typing import Any, Dict, List, Type, TypeVar, Union import attr +from ..models.center_of_mass import CenterOfMass from ..models.curve_get_control_points import CurveGetControlPoints +from ..models.curve_get_end_points import CurveGetEndPoints from ..models.curve_get_type import CurveGetType +from ..models.density import Density from ..models.entity_get_all_child_uuids import EntityGetAllChildUuids from ..models.entity_get_child_uuid import EntityGetChildUuid from ..models.entity_get_num_children import EntityGetNumChildren @@ -11,8 +14,12 @@ from ..models.entity_get_parent_id import EntityGetParentId from ..models.export import Export from ..models.get_entity_type import GetEntityType from ..models.highlight_set_entity import HighlightSetEntity +from ..models.import_files import ImportFiles +from ..models.mass import Mass from ..models.mouse_click import MouseClick +from ..models.path_get_curve_uuids_for_vertices import PathGetCurveUuidsForVertices from ..models.path_get_info import PathGetInfo +from ..models.plane_intersect_and_project import PlaneIntersectAndProject from ..models.select_get import SelectGet from ..models.select_with_point import SelectWithPoint from ..models.solid3d_get_all_edge_faces import Solid3dGetAllEdgeFaces @@ -20,10 +27,12 @@ from ..models.solid3d_get_all_opposite_edges import Solid3dGetAllOppositeEdges from ..models.solid3d_get_next_adjacent_edge import Solid3dGetNextAdjacentEdge from ..models.solid3d_get_opposite_edge import Solid3dGetOppositeEdge from ..models.solid3d_get_prev_adjacent_edge import Solid3dGetPrevAdjacentEdge +from ..models.surface_area import SurfaceArea from ..models.take_snapshot import TakeSnapshot +from ..models.volume import Volume from ..types import UNSET, Unset -CX = TypeVar("CX", bound="empty") +SX = TypeVar("SX", bound="empty") @attr.s(auto_attribs=True) @@ -45,7 +54,7 @@ class empty: return field_dict @classmethod - def from_dict(cls: Type[CX], src_dict: Dict[str, Any]) -> CX: + def from_dict(cls: Type[SX], src_dict: Dict[str, Any]) -> SX: d = src_dict.copy() type = d.pop("type", UNSET) @@ -73,7 +82,7 @@ class empty: return key in self.additional_properties -MT = TypeVar("MT", bound="export") +CN = TypeVar("CN", bound="export") @attr.s(auto_attribs=True) @@ -100,7 +109,7 @@ class export: return field_dict @classmethod - def from_dict(cls: Type[MT], src_dict: Dict[str, Any]) -> MT: + def from_dict(cls: Type[CN], src_dict: Dict[str, Any]) -> CN: d = src_dict.copy() _data = d.pop("data", UNSET) data: Union[Unset, Export] @@ -136,7 +145,7 @@ class export: return key in self.additional_properties -LJ = TypeVar("LJ", bound="select_with_point") +GS = TypeVar("GS", bound="select_with_point") @attr.s(auto_attribs=True) @@ -163,7 +172,7 @@ class select_with_point: return field_dict @classmethod - def from_dict(cls: Type[LJ], src_dict: Dict[str, Any]) -> LJ: + def from_dict(cls: Type[GS], src_dict: Dict[str, Any]) -> GS: d = src_dict.copy() _data = d.pop("data", UNSET) data: Union[Unset, SelectWithPoint] @@ -199,7 +208,7 @@ class select_with_point: return key in self.additional_properties -TF = TypeVar("TF", bound="highlight_set_entity") +SO = TypeVar("SO", bound="highlight_set_entity") @attr.s(auto_attribs=True) @@ -226,7 +235,7 @@ class highlight_set_entity: return field_dict @classmethod - def from_dict(cls: Type[TF], src_dict: Dict[str, Any]) -> TF: + def from_dict(cls: Type[SO], src_dict: Dict[str, Any]) -> SO: d = src_dict.copy() _data = d.pop("data", UNSET) data: Union[Unset, HighlightSetEntity] @@ -262,7 +271,7 @@ class highlight_set_entity: return key in self.additional_properties -HF = TypeVar("HF", bound="entity_get_child_uuid") +ZS = TypeVar("ZS", bound="entity_get_child_uuid") @attr.s(auto_attribs=True) @@ -289,7 +298,7 @@ class entity_get_child_uuid: return field_dict @classmethod - def from_dict(cls: Type[HF], src_dict: Dict[str, Any]) -> HF: + def from_dict(cls: Type[ZS], src_dict: Dict[str, Any]) -> ZS: d = src_dict.copy() _data = d.pop("data", UNSET) data: Union[Unset, EntityGetChildUuid] @@ -325,7 +334,7 @@ class entity_get_child_uuid: return key in self.additional_properties -JD = TypeVar("JD", bound="entity_get_num_children") +AM = TypeVar("AM", bound="entity_get_num_children") @attr.s(auto_attribs=True) @@ -352,7 +361,7 @@ class entity_get_num_children: return field_dict @classmethod - def from_dict(cls: Type[JD], src_dict: Dict[str, Any]) -> JD: + def from_dict(cls: Type[AM], src_dict: Dict[str, Any]) -> AM: d = src_dict.copy() _data = d.pop("data", UNSET) data: Union[Unset, EntityGetNumChildren] @@ -388,7 +397,7 @@ class entity_get_num_children: return key in self.additional_properties -RZ = TypeVar("RZ", bound="entity_get_parent_id") +GK = TypeVar("GK", bound="entity_get_parent_id") @attr.s(auto_attribs=True) @@ -415,7 +424,7 @@ class entity_get_parent_id: return field_dict @classmethod - def from_dict(cls: Type[RZ], src_dict: Dict[str, Any]) -> RZ: + def from_dict(cls: Type[GK], src_dict: Dict[str, Any]) -> GK: d = src_dict.copy() _data = d.pop("data", UNSET) data: Union[Unset, EntityGetParentId] @@ -451,7 +460,7 @@ class entity_get_parent_id: return key in self.additional_properties -BH = TypeVar("BH", bound="entity_get_all_child_uuids") +SG = TypeVar("SG", bound="entity_get_all_child_uuids") @attr.s(auto_attribs=True) @@ -478,7 +487,7 @@ class entity_get_all_child_uuids: return field_dict @classmethod - def from_dict(cls: Type[BH], src_dict: Dict[str, Any]) -> BH: + def from_dict(cls: Type[SG], src_dict: Dict[str, Any]) -> SG: d = src_dict.copy() _data = d.pop("data", UNSET) data: Union[Unset, EntityGetAllChildUuids] @@ -514,7 +523,7 @@ class entity_get_all_child_uuids: return key in self.additional_properties -SX = TypeVar("SX", bound="select_get") +QZ = TypeVar("QZ", bound="select_get") @attr.s(auto_attribs=True) @@ -541,7 +550,7 @@ class select_get: return field_dict @classmethod - def from_dict(cls: Type[SX], src_dict: Dict[str, Any]) -> SX: + def from_dict(cls: Type[QZ], src_dict: Dict[str, Any]) -> QZ: d = src_dict.copy() _data = d.pop("data", UNSET) data: Union[Unset, SelectGet] @@ -577,7 +586,7 @@ class select_get: return key in self.additional_properties -CN = TypeVar("CN", bound="get_entity_type") +SY = TypeVar("SY", bound="get_entity_type") @attr.s(auto_attribs=True) @@ -604,7 +613,7 @@ class get_entity_type: return field_dict @classmethod - def from_dict(cls: Type[CN], src_dict: Dict[str, Any]) -> CN: + def from_dict(cls: Type[SY], src_dict: Dict[str, Any]) -> SY: d = src_dict.copy() _data = d.pop("data", UNSET) data: Union[Unset, GetEntityType] @@ -640,7 +649,7 @@ class get_entity_type: return key in self.additional_properties -GS = TypeVar("GS", bound="solid3d_get_all_edge_faces") +YK = TypeVar("YK", bound="solid3d_get_all_edge_faces") @attr.s(auto_attribs=True) @@ -667,7 +676,7 @@ class solid3d_get_all_edge_faces: return field_dict @classmethod - def from_dict(cls: Type[GS], src_dict: Dict[str, Any]) -> GS: + def from_dict(cls: Type[YK], src_dict: Dict[str, Any]) -> YK: d = src_dict.copy() _data = d.pop("data", UNSET) data: Union[Unset, Solid3dGetAllEdgeFaces] @@ -703,7 +712,7 @@ class solid3d_get_all_edge_faces: return key in self.additional_properties -SO = TypeVar("SO", bound="solid3d_get_all_opposite_edges") +WS = TypeVar("WS", bound="solid3d_get_all_opposite_edges") @attr.s(auto_attribs=True) @@ -730,7 +739,7 @@ class solid3d_get_all_opposite_edges: return field_dict @classmethod - def from_dict(cls: Type[SO], src_dict: Dict[str, Any]) -> SO: + def from_dict(cls: Type[WS], src_dict: Dict[str, Any]) -> WS: d = src_dict.copy() _data = d.pop("data", UNSET) data: Union[Unset, Solid3dGetAllOppositeEdges] @@ -766,7 +775,7 @@ class solid3d_get_all_opposite_edges: return key in self.additional_properties -ZS = TypeVar("ZS", bound="solid3d_get_opposite_edge") +SL = TypeVar("SL", bound="solid3d_get_opposite_edge") @attr.s(auto_attribs=True) @@ -793,7 +802,7 @@ class solid3d_get_opposite_edge: return field_dict @classmethod - def from_dict(cls: Type[ZS], src_dict: Dict[str, Any]) -> ZS: + def from_dict(cls: Type[SL], src_dict: Dict[str, Any]) -> SL: d = src_dict.copy() _data = d.pop("data", UNSET) data: Union[Unset, Solid3dGetOppositeEdge] @@ -829,7 +838,7 @@ class solid3d_get_opposite_edge: return key in self.additional_properties -AM = TypeVar("AM", bound="solid3d_get_prev_adjacent_edge") +MK = TypeVar("MK", bound="solid3d_get_prev_adjacent_edge") @attr.s(auto_attribs=True) @@ -856,7 +865,7 @@ class solid3d_get_prev_adjacent_edge: return field_dict @classmethod - def from_dict(cls: Type[AM], src_dict: Dict[str, Any]) -> AM: + def from_dict(cls: Type[MK], src_dict: Dict[str, Any]) -> MK: d = src_dict.copy() _data = d.pop("data", UNSET) data: Union[Unset, Solid3dGetPrevAdjacentEdge] @@ -892,7 +901,7 @@ class solid3d_get_prev_adjacent_edge: return key in self.additional_properties -GK = TypeVar("GK", bound="solid3d_get_next_adjacent_edge") +TU = TypeVar("TU", bound="solid3d_get_next_adjacent_edge") @attr.s(auto_attribs=True) @@ -919,7 +928,7 @@ class solid3d_get_next_adjacent_edge: return field_dict @classmethod - def from_dict(cls: Type[GK], src_dict: Dict[str, Any]) -> GK: + def from_dict(cls: Type[TU], src_dict: Dict[str, Any]) -> TU: d = src_dict.copy() _data = d.pop("data", UNSET) data: Union[Unset, Solid3dGetNextAdjacentEdge] @@ -955,7 +964,7 @@ class solid3d_get_next_adjacent_edge: return key in self.additional_properties -SG = TypeVar("SG", bound="mouse_click") +FY = TypeVar("FY", bound="mouse_click") @attr.s(auto_attribs=True) @@ -982,7 +991,7 @@ class mouse_click: return field_dict @classmethod - def from_dict(cls: Type[SG], src_dict: Dict[str, Any]) -> SG: + def from_dict(cls: Type[FY], src_dict: Dict[str, Any]) -> FY: d = src_dict.copy() _data = d.pop("data", UNSET) data: Union[Unset, MouseClick] @@ -1018,7 +1027,7 @@ class mouse_click: return key in self.additional_properties -QZ = TypeVar("QZ", bound="curve_get_type") +FD = TypeVar("FD", bound="curve_get_type") @attr.s(auto_attribs=True) @@ -1045,7 +1054,7 @@ class curve_get_type: return field_dict @classmethod - def from_dict(cls: Type[QZ], src_dict: Dict[str, Any]) -> QZ: + def from_dict(cls: Type[FD], src_dict: Dict[str, Any]) -> FD: d = src_dict.copy() _data = d.pop("data", UNSET) data: Union[Unset, CurveGetType] @@ -1081,7 +1090,7 @@ class curve_get_type: return key in self.additional_properties -SY = TypeVar("SY", bound="curve_get_control_points") +TZ = TypeVar("TZ", bound="curve_get_control_points") @attr.s(auto_attribs=True) @@ -1108,7 +1117,7 @@ class curve_get_control_points: return field_dict @classmethod - def from_dict(cls: Type[SY], src_dict: Dict[str, Any]) -> SY: + def from_dict(cls: Type[TZ], src_dict: Dict[str, Any]) -> TZ: d = src_dict.copy() _data = d.pop("data", UNSET) data: Union[Unset, CurveGetControlPoints] @@ -1144,7 +1153,7 @@ class curve_get_control_points: return key in self.additional_properties -YK = TypeVar("YK", bound="take_snapshot") +AX = TypeVar("AX", bound="take_snapshot") @attr.s(auto_attribs=True) @@ -1171,7 +1180,7 @@ class take_snapshot: return field_dict @classmethod - def from_dict(cls: Type[YK], src_dict: Dict[str, Any]) -> YK: + def from_dict(cls: Type[AX], src_dict: Dict[str, Any]) -> AX: d = src_dict.copy() _data = d.pop("data", UNSET) data: Union[Unset, TakeSnapshot] @@ -1207,7 +1216,7 @@ class take_snapshot: return key in self.additional_properties -WS = TypeVar("WS", bound="path_get_info") +RQ = TypeVar("RQ", bound="path_get_info") @attr.s(auto_attribs=True) @@ -1234,7 +1243,7 @@ class path_get_info: return field_dict @classmethod - def from_dict(cls: Type[WS], src_dict: Dict[str, Any]) -> WS: + def from_dict(cls: Type[RQ], src_dict: Dict[str, Any]) -> RQ: d = src_dict.copy() _data = d.pop("data", UNSET) data: Union[Unset, PathGetInfo] @@ -1270,6 +1279,573 @@ class path_get_info: return key in self.additional_properties +ZL = TypeVar("ZL", bound="path_get_curve_uuids_for_vertices") + + +@attr.s(auto_attribs=True) +class path_get_curve_uuids_for_vertices: + """The response from the `Path Get Curve UUIDs for Vertices` command.""" # noqa: E501 + + data: Union[Unset, PathGetCurveUuidsForVertices] = UNSET + type: str = "path_get_curve_uuids_for_vertices" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.data, Unset): + data = self.data + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[ZL], src_dict: Dict[str, Any]) -> ZL: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, PathGetCurveUuidsForVertices] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] + + type = d.pop("type", UNSET) + + path_get_curve_uuids_for_vertices = cls( + data=data, + type=type, + ) + + path_get_curve_uuids_for_vertices.additional_properties = d + return path_get_curve_uuids_for_vertices + + @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 + + +CM = TypeVar("CM", bound="plane_intersect_and_project") + + +@attr.s(auto_attribs=True) +class plane_intersect_and_project: + """The response from the `PlaneIntersectAndProject` command.""" # noqa: E501 + + data: Union[Unset, PlaneIntersectAndProject] = UNSET + type: str = "plane_intersect_and_project" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.data, Unset): + data = self.data + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[CM], src_dict: Dict[str, Any]) -> CM: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, PlaneIntersectAndProject] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] + + type = d.pop("type", UNSET) + + plane_intersect_and_project = cls( + data=data, + type=type, + ) + + plane_intersect_and_project.additional_properties = d + return plane_intersect_and_project + + @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 + + +OS = TypeVar("OS", bound="curve_get_end_points") + + +@attr.s(auto_attribs=True) +class curve_get_end_points: + """The response from the `CurveGetEndPoints` command.""" # noqa: E501 + + data: Union[Unset, CurveGetEndPoints] = UNSET + type: str = "curve_get_end_points" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.data, Unset): + data = self.data + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[OS], src_dict: Dict[str, Any]) -> OS: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, CurveGetEndPoints] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] + + type = d.pop("type", UNSET) + + curve_get_end_points = cls( + data=data, + type=type, + ) + + curve_get_end_points.additional_properties = d + return curve_get_end_points + + @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 + + +WP = TypeVar("WP", bound="import_files") + + +@attr.s(auto_attribs=True) +class import_files: + """The response from the `ImportFiles` command.""" # noqa: E501 + + data: Union[Unset, ImportFiles] = UNSET + type: str = "import_files" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.data, Unset): + data = self.data + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[WP], src_dict: Dict[str, Any]) -> WP: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, ImportFiles] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] + + type = d.pop("type", UNSET) + + import_files = cls( + data=data, + type=type, + ) + + import_files.additional_properties = d + return import_files + + @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 + + +XO = TypeVar("XO", bound="mass") + + +@attr.s(auto_attribs=True) +class mass: + """The response from the `Mass` command.""" # noqa: E501 + + data: Union[Unset, Mass] = UNSET + type: str = "mass" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.data, Unset): + data = self.data + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[XO], src_dict: Dict[str, Any]) -> XO: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, Mass] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] + + type = d.pop("type", UNSET) + + mass = cls( + data=data, + type=type, + ) + + mass.additional_properties = d + return mass + + @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 + + +LN = TypeVar("LN", bound="volume") + + +@attr.s(auto_attribs=True) +class volume: + """The response from the `Volume` command.""" # noqa: E501 + + data: Union[Unset, Volume] = UNSET + type: str = "volume" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.data, Unset): + data = self.data + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[LN], src_dict: Dict[str, Any]) -> LN: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, Volume] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] + + type = d.pop("type", UNSET) + + volume = cls( + data=data, + type=type, + ) + + volume.additional_properties = d + return volume + + @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 + + +KR = TypeVar("KR", bound="density") + + +@attr.s(auto_attribs=True) +class density: + """The response from the `Density` command.""" # noqa: E501 + + data: Union[Unset, Density] = UNSET + type: str = "density" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.data, Unset): + data = self.data + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[KR], src_dict: Dict[str, Any]) -> KR: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, Density] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] + + type = d.pop("type", UNSET) + + density = cls( + data=data, + type=type, + ) + + density.additional_properties = d + return density + + @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 + + +MG = TypeVar("MG", bound="surface_area") + + +@attr.s(auto_attribs=True) +class surface_area: + """The response from the `SurfaceArea` command.""" # noqa: E501 + + data: Union[Unset, SurfaceArea] = UNSET + type: str = "surface_area" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.data, Unset): + data = self.data + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[MG], src_dict: Dict[str, Any]) -> MG: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, SurfaceArea] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] + + type = d.pop("type", UNSET) + + surface_area = cls( + data=data, + type=type, + ) + + surface_area.additional_properties = d + return surface_area + + @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 + + +UE = TypeVar("UE", bound="center_of_mass") + + +@attr.s(auto_attribs=True) +class center_of_mass: + """The response from the `CenterOfMass` command.""" # noqa: E501 + + data: Union[Unset, CenterOfMass] = UNSET + type: str = "center_of_mass" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.data, Unset): + data = self.data + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[UE], src_dict: Dict[str, Any]) -> UE: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, CenterOfMass] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] + + type = d.pop("type", UNSET) + + center_of_mass = cls( + data=data, + type=type, + ) + + center_of_mass.additional_properties = d + return center_of_mass + + @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, @@ -1291,4 +1867,13 @@ OkModelingCmdResponse = Union[ curve_get_control_points, take_snapshot, path_get_info, + path_get_curve_uuids_for_vertices, + plane_intersect_and_project, + curve_get_end_points, + import_files, + mass, + volume, + density, + surface_area, + center_of_mass, ] diff --git a/kittycad/models/ok_web_socket_response_data.py b/kittycad/models/ok_web_socket_response_data.py index 9fade91d2..3959e91e3 100644 --- a/kittycad/models/ok_web_socket_response_data.py +++ b/kittycad/models/ok_web_socket_response_data.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -SL = TypeVar("SL", bound="ice_server_info") +BF = TypeVar("BF", bound="ice_server_info") @attr.s(auto_attribs=True) @@ -30,7 +30,7 @@ class ice_server_info: return field_dict @classmethod - def from_dict(cls: Type[SL], src_dict: Dict[str, Any]) -> SL: + def from_dict(cls: Type[BF], src_dict: Dict[str, Any]) -> BF: d = src_dict.copy() data = d.pop("data", UNSET) type = d.pop("type", UNSET) @@ -60,7 +60,7 @@ class ice_server_info: return key in self.additional_properties -MK = TypeVar("MK", bound="trickle_ice") +UU = TypeVar("UU", bound="trickle_ice") @attr.s(auto_attribs=True) @@ -86,7 +86,7 @@ class trickle_ice: return field_dict @classmethod - def from_dict(cls: Type[MK], src_dict: Dict[str, Any]) -> MK: + def from_dict(cls: Type[UU], src_dict: Dict[str, Any]) -> UU: d = src_dict.copy() data = d.pop("data", UNSET) type = d.pop("type", UNSET) @@ -116,7 +116,7 @@ class trickle_ice: return key in self.additional_properties -TU = TypeVar("TU", bound="sdp_answer") +MB = TypeVar("MB", bound="sdp_answer") @attr.s(auto_attribs=True) @@ -142,7 +142,7 @@ class sdp_answer: return field_dict @classmethod - def from_dict(cls: Type[TU], src_dict: Dict[str, Any]) -> TU: + def from_dict(cls: Type[MB], src_dict: Dict[str, Any]) -> MB: d = src_dict.copy() data = d.pop("data", UNSET) type = d.pop("type", UNSET) @@ -172,7 +172,7 @@ class sdp_answer: return key in self.additional_properties -FY = TypeVar("FY", bound="modeling") +TB = TypeVar("TB", bound="modeling") @attr.s(auto_attribs=True) @@ -198,7 +198,7 @@ class modeling: return field_dict @classmethod - def from_dict(cls: Type[FY], src_dict: Dict[str, Any]) -> FY: + def from_dict(cls: Type[TB], src_dict: Dict[str, Any]) -> TB: d = src_dict.copy() data = d.pop("data", UNSET) type = d.pop("type", UNSET) @@ -228,7 +228,7 @@ class modeling: return key in self.additional_properties -FD = TypeVar("FD", bound="export") +FJ = TypeVar("FJ", bound="export") @attr.s(auto_attribs=True) @@ -254,7 +254,7 @@ class export: return field_dict @classmethod - def from_dict(cls: Type[FD], src_dict: Dict[str, Any]) -> FD: + def from_dict(cls: Type[FJ], src_dict: Dict[str, Any]) -> FJ: d = src_dict.copy() data = d.pop("data", UNSET) type = d.pop("type", UNSET) @@ -284,6 +284,62 @@ class export: return key in self.additional_properties +HB = TypeVar("HB", bound="metrics_request") + + +@attr.s(auto_attribs=True) +class metrics_request: + """Request a collection of metrics, to include WebRTC.""" # noqa: E501 + + data: Union[Unset, Any] = UNSET + type: str = "metrics_request" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + data = self.data + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict["data"] = data + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[HB], src_dict: Dict[str, Any]) -> HB: + d = src_dict.copy() + data = d.pop("data", UNSET) + type = d.pop("type", UNSET) + + metrics_request = cls( + data=data, + type=type, + ) + + metrics_request.additional_properties = d + return metrics_request + + @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 + + OkWebSocketResponseData = Union[ - ice_server_info, trickle_ice, sdp_answer, modeling, export + ice_server_info, trickle_ice, sdp_answer, modeling, export, metrics_request ] diff --git a/kittycad/models/onboarding.py b/kittycad/models/onboarding.py index 9ec2e9636..fcd0d9324 100644 --- a/kittycad/models/onboarding.py +++ b/kittycad/models/onboarding.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -TZ = TypeVar("TZ", bound="Onboarding") +SF = TypeVar("SF", bound="Onboarding") @attr.s(auto_attribs=True) @@ -37,7 +37,7 @@ class Onboarding: return field_dict @classmethod - def from_dict(cls: Type[TZ], src_dict: Dict[str, Any]) -> TZ: + def from_dict(cls: Type[SF], src_dict: Dict[str, Any]) -> SF: d = src_dict.copy() first_call_from__their_machine_date = d.pop( "first_call_from_their_machine_date", UNSET diff --git a/kittycad/models/output_file.py b/kittycad/models/output_file.py index 4a1965ade..4956a3b99 100644 --- a/kittycad/models/output_file.py +++ b/kittycad/models/output_file.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -AX = TypeVar("AX", bound="OutputFile") +DU = TypeVar("DU", bound="OutputFile") @attr.s(auto_attribs=True) @@ -31,7 +31,7 @@ class OutputFile: return field_dict @classmethod - def from_dict(cls: Type[AX], src_dict: Dict[str, Any]) -> AX: + def from_dict(cls: Type[DU], src_dict: Dict[str, Any]) -> DU: d = src_dict.copy() contents = d.pop("contents", UNSET) diff --git a/kittycad/models/output_format.py b/kittycad/models/output_format.py index 69011078e..c17e4e260 100644 --- a/kittycad/models/output_format.py +++ b/kittycad/models/output_format.py @@ -8,9 +8,10 @@ from ..models.gltf_storage import GltfStorage from ..models.ply_storage import PlyStorage from ..models.stl_storage import StlStorage from ..models.system import System +from ..models.unit_length import UnitLength from ..types import UNSET, Unset -RQ = TypeVar("RQ", bound="fbx") +BM = TypeVar("BM", bound="fbx") @attr.s(auto_attribs=True) @@ -37,7 +38,7 @@ class fbx: return field_dict @classmethod - def from_dict(cls: Type[RQ], src_dict: Dict[str, Any]) -> RQ: + def from_dict(cls: Type[BM], src_dict: Dict[str, Any]) -> BM: d = src_dict.copy() _storage = d.pop("storage", UNSET) storage: Union[Unset, FbxStorage] @@ -73,7 +74,7 @@ class fbx: return key in self.additional_properties -ZL = TypeVar("ZL", bound="gltf") +TY = TypeVar("TY", bound="gltf") @attr.s(auto_attribs=True) @@ -105,7 +106,7 @@ class gltf: return field_dict @classmethod - def from_dict(cls: Type[ZL], src_dict: Dict[str, Any]) -> ZL: + def from_dict(cls: Type[TY], src_dict: Dict[str, Any]) -> TY: d = src_dict.copy() _presentation = d.pop("presentation", UNSET) presentation: Union[Unset, GltfPresentation] @@ -149,7 +150,7 @@ class gltf: return key in self.additional_properties -CM = TypeVar("CM", bound="obj") +NC = TypeVar("NC", bound="obj") @attr.s(auto_attribs=True) @@ -158,6 +159,7 @@ class obj: coords: Union[Unset, System] = UNSET type: str = "obj" + units: Union[Unset, UnitLength] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -165,6 +167,8 @@ class obj: if not isinstance(self.coords, Unset): coords = self.coords type = self.type + if not isinstance(self.units, Unset): + units = self.units field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) @@ -172,11 +176,13 @@ class obj: if coords is not UNSET: field_dict["coords"] = coords field_dict["type"] = type + if units is not UNSET: + field_dict["units"] = units return field_dict @classmethod - def from_dict(cls: Type[CM], src_dict: Dict[str, Any]) -> CM: + def from_dict(cls: Type[NC], src_dict: Dict[str, Any]) -> NC: d = src_dict.copy() _coords = d.pop("coords", UNSET) coords: Union[Unset, System] @@ -187,9 +193,17 @@ class obj: type = d.pop("type", UNSET) + _units = d.pop("units", UNSET) + units: Union[Unset, UnitLength] + if isinstance(_units, Unset): + units = UNSET + else: + units = _units # type: ignore[arg-type] + obj = cls( coords=coords, type=type, + units=units, ) obj.additional_properties = d @@ -212,7 +226,7 @@ class obj: return key in self.additional_properties -OS = TypeVar("OS", bound="ply") +GP = TypeVar("GP", bound="ply") @attr.s(auto_attribs=True) @@ -244,7 +258,7 @@ class ply: return field_dict @classmethod - def from_dict(cls: Type[OS], src_dict: Dict[str, Any]) -> OS: + def from_dict(cls: Type[GP], src_dict: Dict[str, Any]) -> GP: d = src_dict.copy() _coords = d.pop("coords", UNSET) coords: Union[Unset, System] @@ -288,7 +302,7 @@ class ply: return key in self.additional_properties -WP = TypeVar("WP", bound="step") +FF = TypeVar("FF", bound="step") @attr.s(auto_attribs=True) @@ -315,7 +329,7 @@ class step: return field_dict @classmethod - def from_dict(cls: Type[WP], src_dict: Dict[str, Any]) -> WP: + def from_dict(cls: Type[FF], src_dict: Dict[str, Any]) -> FF: d = src_dict.copy() _coords = d.pop("coords", UNSET) coords: Union[Unset, System] @@ -351,7 +365,7 @@ class step: return key in self.additional_properties -XO = TypeVar("XO", bound="stl") +YO = TypeVar("YO", bound="stl") @attr.s(auto_attribs=True) @@ -361,6 +375,7 @@ class stl: coords: Union[Unset, System] = UNSET storage: Union[Unset, StlStorage] = UNSET type: str = "stl" + units: Union[Unset, UnitLength] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -370,6 +385,8 @@ class stl: if not isinstance(self.storage, Unset): storage = self.storage type = self.type + if not isinstance(self.units, Unset): + units = self.units field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) @@ -379,11 +396,13 @@ class stl: if storage is not UNSET: field_dict["storage"] = storage field_dict["type"] = type + if units is not UNSET: + field_dict["units"] = units return field_dict @classmethod - def from_dict(cls: Type[XO], src_dict: Dict[str, Any]) -> XO: + def from_dict(cls: Type[YO], src_dict: Dict[str, Any]) -> YO: d = src_dict.copy() _coords = d.pop("coords", UNSET) coords: Union[Unset, System] @@ -401,10 +420,18 @@ class stl: type = d.pop("type", UNSET) + _units = d.pop("units", UNSET) + units: Union[Unset, UnitLength] + if isinstance(_units, Unset): + units = UNSET + else: + units = _units # type: ignore[arg-type] + stl = cls( coords=coords, storage=storage, type=type, + units=units, ) stl.additional_properties = d diff --git a/kittycad/models/commit.py b/kittycad/models/path_get_curve_uuids_for_vertices.py similarity index 52% rename from kittycad/models/commit.py rename to kittycad/models/path_get_curve_uuids_for_vertices.py index 05461befc..7fd1fc6ba 100644 --- a/kittycad/models/commit.py +++ b/kittycad/models/path_get_curve_uuids_for_vertices.py @@ -1,49 +1,44 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import Any, Dict, List, Type, TypeVar, Union, cast import attr from ..types import UNSET, Unset -ON = TypeVar("ON", bound="Commit") +FS = TypeVar("FS", bound="PathGetCurveUuidsForVertices") @attr.s(auto_attribs=True) -class Commit: - """Commit holds the Git-commit (SHA1) that a binary was built from, as reported in the version-string of external tools, such as `containerd`, or `runC`.""" # noqa: E501 +class PathGetCurveUuidsForVertices: + """The response from the `PathGetCurveUuidsForVertices` command.""" # noqa: E501 - expected: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET + curve_ids: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: - expected = self.expected - id = self.id + curve_ids: Union[Unset, List[str]] = UNSET + if not isinstance(self.curve_ids, Unset): + curve_ids = self.curve_ids field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) - if expected is not UNSET: - field_dict["expected"] = expected - if id is not UNSET: - field_dict["id"] = id + if curve_ids is not UNSET: + field_dict["curve_ids"] = curve_ids return field_dict @classmethod - def from_dict(cls: Type[ON], src_dict: Dict[str, Any]) -> ON: + def from_dict(cls: Type[FS], src_dict: Dict[str, Any]) -> FS: d = src_dict.copy() - expected = d.pop("expected", UNSET) + curve_ids = cast(List[str], d.pop("curve_ids", UNSET)) - id = d.pop("id", UNSET) - - commit = cls( - expected=expected, - id=id, + path_get_curve_uuids_for_vertices = cls( + curve_ids=curve_ids, ) - commit.additional_properties = d - return commit + path_get_curve_uuids_for_vertices.additional_properties = d + return path_get_curve_uuids_for_vertices @property def additional_keys(self) -> List[str]: diff --git a/kittycad/models/path_get_info.py b/kittycad/models/path_get_info.py index a935bf1e3..71ad07e47 100644 --- a/kittycad/models/path_get_info.py +++ b/kittycad/models/path_get_info.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -LN = TypeVar("LN", bound="PathGetInfo") +WN = TypeVar("WN", bound="PathGetInfo") @attr.s(auto_attribs=True) @@ -33,7 +33,7 @@ class PathGetInfo: return field_dict @classmethod - def from_dict(cls: Type[LN], src_dict: Dict[str, Any]) -> LN: + def from_dict(cls: Type[WN], src_dict: Dict[str, Any]) -> WN: d = src_dict.copy() from ..models.path_segment_info import PathSegmentInfo diff --git a/kittycad/models/path_segment.py b/kittycad/models/path_segment.py index 39fcf4062..b281f808b 100644 --- a/kittycad/models/path_segment.py +++ b/kittycad/models/path_segment.py @@ -2,11 +2,12 @@ from typing import Any, Dict, List, Type, TypeVar, Union import attr +from ..models.angle import Angle from ..models.point2d import Point2d from ..models.point3d import Point3d from ..types import UNSET, Unset -KR = TypeVar("KR", bound="line") +EQ = TypeVar("EQ", bound="line") @attr.s(auto_attribs=True) @@ -14,6 +15,7 @@ class line: """A straight line segment. Goes from the current path "pen" to the given endpoint.""" # noqa: E501 end: Union[Unset, Point3d] = UNSET + relative: Union[Unset, bool] = False type: str = "line" additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -21,6 +23,7 @@ class line: def to_dict(self) -> Dict[str, Any]: if not isinstance(self.end, Unset): end = self.end + relative = self.relative type = self.type field_dict: Dict[str, Any] = {} @@ -28,12 +31,14 @@ class line: field_dict.update({}) if end is not UNSET: field_dict["end"] = end + if relative is not UNSET: + field_dict["relative"] = relative field_dict["type"] = type return field_dict @classmethod - def from_dict(cls: Type[KR], src_dict: Dict[str, Any]) -> KR: + def from_dict(cls: Type[EQ], src_dict: Dict[str, Any]) -> EQ: d = src_dict.copy() _end = d.pop("end", UNSET) end: Union[Unset, Point3d] @@ -42,10 +47,13 @@ class line: else: end = _end # type: ignore[arg-type] + relative = d.pop("relative", UNSET) + type = d.pop("type", UNSET) line = cls( end=end, + relative=relative, type=type, ) @@ -69,7 +77,7 @@ class line: return key in self.additional_properties -MG = TypeVar("MG", bound="arc") +UW = TypeVar("UW", bound="arc") @attr.s(auto_attribs=True) @@ -80,6 +88,7 @@ class arc: angle_start: Union[Unset, float] = UNSET center: Union[Unset, Point2d] = UNSET radius: Union[Unset, float] = UNSET + relative: Union[Unset, bool] = False type: str = "arc" additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -90,6 +99,7 @@ class arc: if not isinstance(self.center, Unset): center = self.center radius = self.radius + relative = self.relative type = self.type field_dict: Dict[str, Any] = {} @@ -103,12 +113,14 @@ class arc: field_dict["center"] = center if radius is not UNSET: field_dict["radius"] = radius + if relative is not UNSET: + field_dict["relative"] = relative field_dict["type"] = type return field_dict @classmethod - def from_dict(cls: Type[MG], src_dict: Dict[str, Any]) -> MG: + def from_dict(cls: Type[UW], src_dict: Dict[str, Any]) -> UW: d = src_dict.copy() angle_end = d.pop("angle_end", UNSET) @@ -123,6 +135,8 @@ class arc: radius = d.pop("radius", UNSET) + relative = d.pop("relative", UNSET) + type = d.pop("type", UNSET) arc = cls( @@ -130,6 +144,7 @@ class arc: angle_start=angle_start, center=center, radius=radius, + relative=relative, type=type, ) @@ -153,7 +168,7 @@ class arc: return key in self.additional_properties -UE = TypeVar("UE", bound="bezier") +MD = TypeVar("MD", bound="bezier") @attr.s(auto_attribs=True) @@ -163,6 +178,7 @@ class bezier: control1: Union[Unset, Point3d] = UNSET control2: Union[Unset, Point3d] = UNSET end: Union[Unset, Point3d] = UNSET + relative: Union[Unset, bool] = False type: str = "bezier" additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -174,6 +190,7 @@ class bezier: control2 = self.control2 if not isinstance(self.end, Unset): end = self.end + relative = self.relative type = self.type field_dict: Dict[str, Any] = {} @@ -185,12 +202,14 @@ class bezier: field_dict["control2"] = control2 if end is not UNSET: field_dict["end"] = end + if relative is not UNSET: + field_dict["relative"] = relative field_dict["type"] = type return field_dict @classmethod - def from_dict(cls: Type[UE], src_dict: Dict[str, Any]) -> UE: + def from_dict(cls: Type[MD], src_dict: Dict[str, Any]) -> MD: d = src_dict.copy() _control1 = d.pop("control1", UNSET) control1: Union[Unset, Point3d] @@ -213,12 +232,15 @@ class bezier: else: end = _end # type: ignore[arg-type] + relative = d.pop("relative", UNSET) + type = d.pop("type", UNSET) bezier = cls( control1=control1, control2=control2, end=end, + relative=relative, type=type, ) @@ -242,4 +264,150 @@ class bezier: return key in self.additional_properties -PathSegment = Union[line, arc, bezier] +HD = TypeVar("HD", bound="tangential_arc") + + +@attr.s(auto_attribs=True) +class tangential_arc: + """Adds a tangent arc from current pen position with the given radius and angle.""" # noqa: E501 + + offset: Union[Unset, Angle] = UNSET + radius: Union[Unset, float] = UNSET + type: str = "tangential_arc" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.offset, Unset): + offset = self.offset + radius = self.radius + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if offset is not UNSET: + field_dict["offset"] = offset + if radius is not UNSET: + field_dict["radius"] = radius + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[HD], src_dict: Dict[str, Any]) -> HD: + d = src_dict.copy() + _offset = d.pop("offset", UNSET) + offset: Union[Unset, Angle] + if isinstance(_offset, Unset): + offset = UNSET + else: + offset = _offset # type: ignore[arg-type] + + radius = d.pop("radius", UNSET) + + type = d.pop("type", UNSET) + + tangential_arc = cls( + offset=offset, + radius=radius, + type=type, + ) + + tangential_arc.additional_properties = d + return tangential_arc + + @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 + + +UJ = TypeVar("UJ", bound="tangential_arc_to") + + +@attr.s(auto_attribs=True) +class tangential_arc_to: + """Adds a tangent arc from current pen position to the new position.""" # noqa: E501 + + angle_snap_increment: Union[Unset, Angle] = UNSET + to: Union[Unset, Point3d] = UNSET + type: str = "tangential_arc_to" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.angle_snap_increment, Unset): + angle_snap_increment = self.angle_snap_increment + if not isinstance(self.to, Unset): + to = self.to + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if angle_snap_increment is not UNSET: + field_dict["angle_snap_increment"] = angle_snap_increment + if to is not UNSET: + field_dict["to"] = to + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[UJ], src_dict: Dict[str, Any]) -> UJ: + d = src_dict.copy() + _angle_snap_increment = d.pop("angle_snap_increment", UNSET) + angle_snap_increment: Union[Unset, Angle] + if isinstance(_angle_snap_increment, Unset): + angle_snap_increment = UNSET + else: + angle_snap_increment = _angle_snap_increment # type: ignore[arg-type] + + _to = d.pop("to", UNSET) + to: Union[Unset, Point3d] + if isinstance(_to, Unset): + to = UNSET + else: + to = _to # type: ignore[arg-type] + + type = d.pop("type", UNSET) + + tangential_arc_to = cls( + angle_snap_increment=angle_snap_increment, + to=to, + type=type, + ) + + tangential_arc_to.additional_properties = d + return tangential_arc_to + + @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 + + +PathSegment = Union[line, arc, bezier, tangential_arc, tangential_arc_to] diff --git a/kittycad/models/path_segment_info.py b/kittycad/models/path_segment_info.py index 86eb1a53f..e63d5a37b 100644 --- a/kittycad/models/path_segment_info.py +++ b/kittycad/models/path_segment_info.py @@ -6,7 +6,7 @@ from ..models.modeling_cmd_id import ModelingCmdId from ..models.path_command import PathCommand from ..types import UNSET, Unset -BF = TypeVar("BF", bound="PathSegmentInfo") +RU = TypeVar("RU", bound="PathSegmentInfo") @attr.s(auto_attribs=True) @@ -15,6 +15,7 @@ class PathSegmentInfo: command: Union[Unset, PathCommand] = UNSET command_id: Union[Unset, ModelingCmdId] = UNSET + relative: Union[Unset, bool] = False additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -23,6 +24,7 @@ class PathSegmentInfo: command = self.command if not isinstance(self.command_id, Unset): command_id = self.command_id + relative = self.relative field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) @@ -31,11 +33,13 @@ class PathSegmentInfo: field_dict["command"] = command if command_id is not UNSET: field_dict["command_id"] = command_id + if relative is not UNSET: + field_dict["relative"] = relative return field_dict @classmethod - def from_dict(cls: Type[BF], src_dict: Dict[str, Any]) -> BF: + def from_dict(cls: Type[RU], src_dict: Dict[str, Any]) -> RU: d = src_dict.copy() _command = d.pop("command", UNSET) command: Union[Unset, PathCommand] @@ -51,9 +55,12 @@ class PathSegmentInfo: else: command_id = _command_id # type: ignore[arg-type] + relative = d.pop("relative", UNSET) + path_segment_info = cls( command=command, command_id=command_id, + relative=relative, ) path_segment_info.additional_properties = d diff --git a/kittycad/models/payment_intent.py b/kittycad/models/payment_intent.py index fc878f470..67637a0d9 100644 --- a/kittycad/models/payment_intent.py +++ b/kittycad/models/payment_intent.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -UU = TypeVar("UU", bound="PaymentIntent") +DL = TypeVar("DL", bound="PaymentIntent") @attr.s(auto_attribs=True) @@ -27,7 +27,7 @@ class PaymentIntent: return field_dict @classmethod - def from_dict(cls: Type[UU], src_dict: Dict[str, Any]) -> UU: + def from_dict(cls: Type[DL], src_dict: Dict[str, Any]) -> DL: d = src_dict.copy() client_secret = d.pop("client_secret", UNSET) diff --git a/kittycad/models/payment_method.py b/kittycad/models/payment_method.py index 7d9e13fa9..78225701f 100644 --- a/kittycad/models/payment_method.py +++ b/kittycad/models/payment_method.py @@ -9,7 +9,7 @@ from ..models.card_details import CardDetails from ..models.payment_method_type import PaymentMethodType from ..types import UNSET, Unset -MB = TypeVar("MB", bound="PaymentMethod") +QT = TypeVar("QT", bound="PaymentMethod") @attr.s(auto_attribs=True) @@ -58,7 +58,7 @@ class PaymentMethod: return field_dict @classmethod - def from_dict(cls: Type[MB], src_dict: Dict[str, Any]) -> MB: + def from_dict(cls: Type[QT], src_dict: Dict[str, Any]) -> QT: d = src_dict.copy() _billing_info = d.pop("billing_info", UNSET) billing_info: Union[Unset, BillingInfo] diff --git a/kittycad/models/payment_method_card_checks.py b/kittycad/models/payment_method_card_checks.py index 35a52a2f3..753024397 100644 --- a/kittycad/models/payment_method_card_checks.py +++ b/kittycad/models/payment_method_card_checks.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -TB = TypeVar("TB", bound="PaymentMethodCardChecks") +PT = TypeVar("PT", bound="PaymentMethodCardChecks") @attr.s(auto_attribs=True) @@ -35,7 +35,7 @@ class PaymentMethodCardChecks: return field_dict @classmethod - def from_dict(cls: Type[TB], src_dict: Dict[str, Any]) -> TB: + def from_dict(cls: Type[PT], src_dict: Dict[str, Any]) -> PT: d = src_dict.copy() address_line1_check = d.pop("address_line1_check", UNSET) diff --git a/kittycad/models/plane_intersect_and_project.py b/kittycad/models/plane_intersect_and_project.py new file mode 100644 index 000000000..67e2a5da0 --- /dev/null +++ b/kittycad/models/plane_intersect_and_project.py @@ -0,0 +1,62 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.point2d import Point2d +from ..types import UNSET, Unset + +HR = TypeVar("HR", bound="PlaneIntersectAndProject") + + +@attr.s(auto_attribs=True) +class PlaneIntersectAndProject: + """Corresponding coordinates of given window coordinates, intersected on given plane.""" # noqa: E501 + + plane_coordinates: Union[Unset, Point2d] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.plane_coordinates, Unset): + plane_coordinates = self.plane_coordinates + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if plane_coordinates is not UNSET: + field_dict["plane_coordinates"] = plane_coordinates + + return field_dict + + @classmethod + def from_dict(cls: Type[HR], src_dict: Dict[str, Any]) -> HR: + d = src_dict.copy() + _plane_coordinates = d.pop("plane_coordinates", UNSET) + plane_coordinates: Union[Unset, Point2d] + if isinstance(_plane_coordinates, Unset): + plane_coordinates = UNSET + else: + plane_coordinates = _plane_coordinates # type: ignore[arg-type] + + plane_intersect_and_project = cls( + plane_coordinates=plane_coordinates, + ) + + plane_intersect_and_project.additional_properties = d + return plane_intersect_and_project + + @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 diff --git a/kittycad/models/plugins_info.py b/kittycad/models/plugins_info.py deleted file mode 100644 index e5c466ecf..000000000 --- a/kittycad/models/plugins_info.py +++ /dev/null @@ -1,87 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast - -import attr - -from ..types import UNSET, Unset - -FJ = TypeVar("FJ", bound="PluginsInfo") - - -@attr.s(auto_attribs=True) -class PluginsInfo: - """Available plugins per type. - - **Note**: Only unmanaged (V1) plugins are included in this list. V1 plugins are \"lazily\" loaded, and are not returned in this list if there is no resource using the plugin. - """ # noqa: E501 - - authorization: Union[Unset, List[str]] = UNSET - log: Union[Unset, List[str]] = UNSET - network: Union[Unset, List[str]] = UNSET - volume: Union[Unset, List[str]] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - authorization: Union[Unset, List[str]] = UNSET - if not isinstance(self.authorization, Unset): - authorization = self.authorization - log: Union[Unset, List[str]] = UNSET - if not isinstance(self.log, Unset): - log = self.log - network: Union[Unset, List[str]] = UNSET - if not isinstance(self.network, Unset): - network = self.network - volume: Union[Unset, List[str]] = UNSET - if not isinstance(self.volume, Unset): - volume = self.volume - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if authorization is not UNSET: - field_dict["authorization"] = authorization - if log is not UNSET: - field_dict["log"] = log - if network is not UNSET: - field_dict["network"] = network - if volume is not UNSET: - field_dict["volume"] = volume - - return field_dict - - @classmethod - def from_dict(cls: Type[FJ], src_dict: Dict[str, Any]) -> FJ: - d = src_dict.copy() - authorization = cast(List[str], d.pop("authorization", UNSET)) - - log = cast(List[str], d.pop("log", UNSET)) - - network = cast(List[str], d.pop("network", UNSET)) - - volume = cast(List[str], d.pop("volume", UNSET)) - - plugins_info = cls( - authorization=authorization, - log=log, - network=network, - volume=volume, - ) - - plugins_info.additional_properties = d - return plugins_info - - @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 diff --git a/kittycad/models/point2d.py b/kittycad/models/point2d.py index 4dc84c8d4..0e38b82e7 100644 --- a/kittycad/models/point2d.py +++ b/kittycad/models/point2d.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -HB = TypeVar("HB", bound="Point2d") +VF = TypeVar("VF", bound="Point2d") @attr.s(auto_attribs=True) @@ -31,7 +31,7 @@ class Point2d: return field_dict @classmethod - def from_dict(cls: Type[HB], src_dict: Dict[str, Any]) -> HB: + def from_dict(cls: Type[VF], src_dict: Dict[str, Any]) -> VF: d = src_dict.copy() x = d.pop("x", UNSET) diff --git a/kittycad/models/point3d.py b/kittycad/models/point3d.py index e16ecf75f..f3e2e0171 100644 --- a/kittycad/models/point3d.py +++ b/kittycad/models/point3d.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -SF = TypeVar("SF", bound="Point3d") +VM = TypeVar("VM", bound="Point3d") @attr.s(auto_attribs=True) @@ -35,7 +35,7 @@ class Point3d: return field_dict @classmethod - def from_dict(cls: Type[SF], src_dict: Dict[str, Any]) -> SF: + def from_dict(cls: Type[VM], src_dict: Dict[str, Any]) -> VM: d = src_dict.copy() x = d.pop("x", UNSET) diff --git a/kittycad/models/point_e_metadata.py b/kittycad/models/point_e_metadata.py index bd8325972..b80dc0245 100644 --- a/kittycad/models/point_e_metadata.py +++ b/kittycad/models/point_e_metadata.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -DU = TypeVar("DU", bound="PointEMetadata") +WH = TypeVar("WH", bound="PointEMetadata") @attr.s(auto_attribs=True) @@ -29,7 +29,7 @@ class PointEMetadata: return field_dict @classmethod - def from_dict(cls: Type[DU], src_dict: Dict[str, Any]) -> DU: + def from_dict(cls: Type[WH], src_dict: Dict[str, Any]) -> WH: d = src_dict.copy() ok = d.pop("ok", UNSET) diff --git a/kittycad/models/pong.py b/kittycad/models/pong.py index a48167dba..2ecba6178 100644 --- a/kittycad/models/pong.py +++ b/kittycad/models/pong.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -BM = TypeVar("BM", bound="Pong") +DQ = TypeVar("DQ", bound="Pong") @attr.s(auto_attribs=True) @@ -27,7 +27,7 @@ class Pong: return field_dict @classmethod - def from_dict(cls: Type[BM], src_dict: Dict[str, Any]) -> BM: + def from_dict(cls: Type[DQ], src_dict: Dict[str, Any]) -> DQ: d = src_dict.copy() message = d.pop("message", UNSET) diff --git a/kittycad/models/raw_file.py b/kittycad/models/raw_file.py index 6fa8d6d18..3ad70fc1c 100644 --- a/kittycad/models/raw_file.py +++ b/kittycad/models/raw_file.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -TY = TypeVar("TY", bound="RawFile") +UY = TypeVar("UY", bound="RawFile") @attr.s(auto_attribs=True) @@ -33,7 +33,7 @@ class RawFile: return field_dict @classmethod - def from_dict(cls: Type[TY], src_dict: Dict[str, Any]) -> TY: + def from_dict(cls: Type[UY], src_dict: Dict[str, Any]) -> UY: d = src_dict.copy() contents = cast(List[int], d.pop("contents", UNSET)) diff --git a/kittycad/models/registry_service_config.py b/kittycad/models/registry_service_config.py deleted file mode 100644 index 72fda396c..000000000 --- a/kittycad/models/registry_service_config.py +++ /dev/null @@ -1,120 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast - -import attr - -from ..models.index_info import IndexInfo -from ..types import UNSET, Unset - -NC = TypeVar("NC", bound="RegistryServiceConfig") - - -@attr.s(auto_attribs=True) -class RegistryServiceConfig: - """RegistryServiceConfig stores daemon registry services configuration.""" # noqa: E501 - - allow_nondistributable_artifacts_cid_rs: Union[Unset, List[str]] = UNSET - allow_nondistributable_artifacts_hostnames: Union[Unset, List[str]] = UNSET - from ..models.index_info import IndexInfo - - index_configs: Union[Unset, Dict[str, IndexInfo]] = UNSET - insecure_registry_cid_rs: Union[Unset, List[str]] = UNSET - mirrors: Union[Unset, List[str]] = UNSET - - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - allow_nondistributable_artifacts_cid_rs: Union[Unset, List[str]] = UNSET - if not isinstance(self.allow_nondistributable_artifacts_cid_rs, Unset): - allow_nondistributable_artifacts_cid_rs = ( - self.allow_nondistributable_artifacts_cid_rs - ) - allow_nondistributable_artifacts_hostnames: Union[Unset, List[str]] = UNSET - if not isinstance(self.allow_nondistributable_artifacts_hostnames, Unset): - allow_nondistributable_artifacts_hostnames = ( - self.allow_nondistributable_artifacts_hostnames - ) - index_configs: Union[Unset, Dict[str, Any]] = UNSET - if not isinstance(self.index_configs, Unset): - new_dict: Dict[str, Any] = {} - for key, value in self.index_configs.items(): - new_dict[key] = value.to_dict() - index_configs = new_dict - insecure_registry_cid_rs: Union[Unset, List[str]] = UNSET - if not isinstance(self.insecure_registry_cid_rs, Unset): - insecure_registry_cid_rs = self.insecure_registry_cid_rs - mirrors: Union[Unset, List[str]] = UNSET - if not isinstance(self.mirrors, Unset): - mirrors = self.mirrors - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if allow_nondistributable_artifacts_cid_rs is not UNSET: - field_dict[ - "allow_nondistributable_artifacts_cid_rs" - ] = allow_nondistributable_artifacts_cid_rs - if allow_nondistributable_artifacts_hostnames is not UNSET: - field_dict[ - "allow_nondistributable_artifacts_hostnames" - ] = allow_nondistributable_artifacts_hostnames - if index_configs is not UNSET: - field_dict["index_configs"] = index_configs - if insecure_registry_cid_rs is not UNSET: - field_dict["insecure_registry_cid_rs"] = insecure_registry_cid_rs - if mirrors is not UNSET: - field_dict["mirrors"] = mirrors - - return field_dict - - @classmethod - def from_dict(cls: Type[NC], src_dict: Dict[str, Any]) -> NC: - d = src_dict.copy() - allow_nondistributable_artifacts_cid_rs = cast( - List[str], d.pop("allow_nondistributable_artifacts_cid_rs", UNSET) - ) - - allow_nondistributable_artifacts_hostnames = cast( - List[str], d.pop("allow_nondistributable_artifacts_hostnames", UNSET) - ) - - _index_configs = d.pop("index_configs", UNSET) - if isinstance(_index_configs, Unset): - index_configs = UNSET - else: - new_map: Dict[str, IndexInfo] = {} - for k, v in _index_configs.items(): - new_map[k] = IndexInfo.from_dict(v) # type: ignore - index_configs = new_map # type: ignore - - insecure_registry_cid_rs = cast( - List[str], d.pop("insecure_registry_cid_rs", UNSET) - ) - - mirrors = cast(List[str], d.pop("mirrors", UNSET)) - - registry_service_config = cls( - allow_nondistributable_artifacts_cid_rs=allow_nondistributable_artifacts_cid_rs, - allow_nondistributable_artifacts_hostnames=allow_nondistributable_artifacts_hostnames, - index_configs=index_configs, - insecure_registry_cid_rs=insecure_registry_cid_rs, - mirrors=mirrors, - ) - - registry_service_config.additional_properties = d - return registry_service_config - - @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 diff --git a/kittycad/models/rtc_ice_candidate_init.py b/kittycad/models/rtc_ice_candidate_init.py index fef6ac5f4..2c9c3bf09 100644 --- a/kittycad/models/rtc_ice_candidate_init.py +++ b/kittycad/models/rtc_ice_candidate_init.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -GP = TypeVar("GP", bound="RtcIceCandidateInit") +PD = TypeVar("PD", bound="RtcIceCandidateInit") @attr.s(auto_attribs=True) @@ -39,7 +39,7 @@ class RtcIceCandidateInit: return field_dict @classmethod - def from_dict(cls: Type[GP], src_dict: Dict[str, Any]) -> GP: + def from_dict(cls: Type[PD], src_dict: Dict[str, Any]) -> PD: d = src_dict.copy() candidate = d.pop("candidate", UNSET) diff --git a/kittycad/models/rtc_session_description.py b/kittycad/models/rtc_session_description.py index 297740a9e..60dbae768 100644 --- a/kittycad/models/rtc_session_description.py +++ b/kittycad/models/rtc_session_description.py @@ -5,7 +5,7 @@ import attr from ..models.rtc_sdp_type import RtcSdpType from ..types import UNSET, Unset -FF = TypeVar("FF", bound="RtcSessionDescription") +SM = TypeVar("SM", bound="RtcSessionDescription") @attr.s(auto_attribs=True) @@ -33,7 +33,7 @@ class RtcSessionDescription: return field_dict @classmethod - def from_dict(cls: Type[FF], src_dict: Dict[str, Any]) -> FF: + def from_dict(cls: Type[SM], src_dict: Dict[str, Any]) -> SM: d = src_dict.copy() sdp = d.pop("sdp", UNSET) diff --git a/kittycad/models/select_get.py b/kittycad/models/select_get.py index e09847cd6..cac7d666d 100644 --- a/kittycad/models/select_get.py +++ b/kittycad/models/select_get.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -FS = TypeVar("FS", bound="SelectGet") +JL = TypeVar("JL", bound="SelectGet") @attr.s(auto_attribs=True) @@ -29,7 +29,7 @@ class SelectGet: return field_dict @classmethod - def from_dict(cls: Type[FS], src_dict: Dict[str, Any]) -> FS: + def from_dict(cls: Type[JL], src_dict: Dict[str, Any]) -> JL: d = src_dict.copy() entity_ids = cast(List[str], d.pop("entity_ids", UNSET)) diff --git a/kittycad/models/select_with_point.py b/kittycad/models/select_with_point.py index db77d8b45..771f732a2 100644 --- a/kittycad/models/select_with_point.py +++ b/kittycad/models/select_with_point.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -WN = TypeVar("WN", bound="SelectWithPoint") +CG = TypeVar("CG", bound="SelectWithPoint") @attr.s(auto_attribs=True) @@ -27,7 +27,7 @@ class SelectWithPoint: return field_dict @classmethod - def from_dict(cls: Type[WN], src_dict: Dict[str, Any]) -> WN: + def from_dict(cls: Type[CG], src_dict: Dict[str, Any]) -> CG: d = src_dict.copy() entity_id = d.pop("entity_id", UNSET) diff --git a/kittycad/models/session.py b/kittycad/models/session.py index 9d122a252..9e8e1e4f1 100644 --- a/kittycad/models/session.py +++ b/kittycad/models/session.py @@ -7,7 +7,7 @@ from dateutil.parser import isoparse from ..models.uuid import Uuid from ..types import UNSET, Unset -EQ = TypeVar("EQ", bound="Session") +QA = TypeVar("QA", bound="Session") @attr.s(auto_attribs=True) @@ -58,7 +58,7 @@ class Session: return field_dict @classmethod - def from_dict(cls: Type[EQ], src_dict: Dict[str, Any]) -> EQ: + def from_dict(cls: Type[QA], src_dict: Dict[str, Any]) -> QA: d = src_dict.copy() _created_at = d.pop("created_at", UNSET) created_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/solid3d_get_all_edge_faces.py b/kittycad/models/solid3d_get_all_edge_faces.py index fe2fb2d51..048493f73 100644 --- a/kittycad/models/solid3d_get_all_edge_faces.py +++ b/kittycad/models/solid3d_get_all_edge_faces.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -UW = TypeVar("UW", bound="Solid3dGetAllEdgeFaces") +ZB = TypeVar("ZB", bound="Solid3dGetAllEdgeFaces") @attr.s(auto_attribs=True) @@ -29,7 +29,7 @@ class Solid3dGetAllEdgeFaces: return field_dict @classmethod - def from_dict(cls: Type[UW], src_dict: Dict[str, Any]) -> UW: + def from_dict(cls: Type[ZB], src_dict: Dict[str, Any]) -> ZB: d = src_dict.copy() faces = cast(List[str], d.pop("faces", UNSET)) diff --git a/kittycad/models/solid3d_get_all_opposite_edges.py b/kittycad/models/solid3d_get_all_opposite_edges.py index 6da7649e9..6ef2c282e 100644 --- a/kittycad/models/solid3d_get_all_opposite_edges.py +++ b/kittycad/models/solid3d_get_all_opposite_edges.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -MD = TypeVar("MD", bound="Solid3dGetAllOppositeEdges") +AU = TypeVar("AU", bound="Solid3dGetAllOppositeEdges") @attr.s(auto_attribs=True) @@ -29,7 +29,7 @@ class Solid3dGetAllOppositeEdges: return field_dict @classmethod - def from_dict(cls: Type[MD], src_dict: Dict[str, Any]) -> MD: + def from_dict(cls: Type[AU], src_dict: Dict[str, Any]) -> AU: d = src_dict.copy() edges = cast(List[str], d.pop("edges", UNSET)) diff --git a/kittycad/models/solid3d_get_next_adjacent_edge.py b/kittycad/models/solid3d_get_next_adjacent_edge.py index 5199eee39..d797db7a6 100644 --- a/kittycad/models/solid3d_get_next_adjacent_edge.py +++ b/kittycad/models/solid3d_get_next_adjacent_edge.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -HD = TypeVar("HD", bound="Solid3dGetNextAdjacentEdge") +FX = TypeVar("FX", bound="Solid3dGetNextAdjacentEdge") @attr.s(auto_attribs=True) @@ -27,7 +27,7 @@ class Solid3dGetNextAdjacentEdge: return field_dict @classmethod - def from_dict(cls: Type[HD], src_dict: Dict[str, Any]) -> HD: + def from_dict(cls: Type[FX], src_dict: Dict[str, Any]) -> FX: d = src_dict.copy() edge = d.pop("edge", UNSET) diff --git a/kittycad/models/solid3d_get_opposite_edge.py b/kittycad/models/solid3d_get_opposite_edge.py index cc54e19db..3a7f5de6e 100644 --- a/kittycad/models/solid3d_get_opposite_edge.py +++ b/kittycad/models/solid3d_get_opposite_edge.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -UJ = TypeVar("UJ", bound="Solid3dGetOppositeEdge") +BL = TypeVar("BL", bound="Solid3dGetOppositeEdge") @attr.s(auto_attribs=True) @@ -27,7 +27,7 @@ class Solid3dGetOppositeEdge: return field_dict @classmethod - def from_dict(cls: Type[UJ], src_dict: Dict[str, Any]) -> UJ: + def from_dict(cls: Type[BL], src_dict: Dict[str, Any]) -> BL: d = src_dict.copy() edge = d.pop("edge", UNSET) diff --git a/kittycad/models/solid3d_get_prev_adjacent_edge.py b/kittycad/models/solid3d_get_prev_adjacent_edge.py index 46e8d8f76..1092ada1d 100644 --- a/kittycad/models/solid3d_get_prev_adjacent_edge.py +++ b/kittycad/models/solid3d_get_prev_adjacent_edge.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -RU = TypeVar("RU", bound="Solid3dGetPrevAdjacentEdge") +KU = TypeVar("KU", bound="Solid3dGetPrevAdjacentEdge") @attr.s(auto_attribs=True) @@ -27,7 +27,7 @@ class Solid3dGetPrevAdjacentEdge: return field_dict @classmethod - def from_dict(cls: Type[RU], src_dict: Dict[str, Any]) -> RU: + def from_dict(cls: Type[KU], src_dict: Dict[str, Any]) -> KU: d = src_dict.copy() edge = d.pop("edge", UNSET) diff --git a/kittycad/models/success_web_socket_response.py b/kittycad/models/success_web_socket_response.py index 5ce192fbb..dad9d7f92 100644 --- a/kittycad/models/success_web_socket_response.py +++ b/kittycad/models/success_web_socket_response.py @@ -5,7 +5,7 @@ import attr from ..models.ok_web_socket_response_data import OkWebSocketResponseData from ..types import UNSET, Unset -DL = TypeVar("DL", bound="SuccessWebSocketResponse") +PZ = TypeVar("PZ", bound="SuccessWebSocketResponse") @attr.s(auto_attribs=True) @@ -37,7 +37,7 @@ class SuccessWebSocketResponse: return field_dict @classmethod - def from_dict(cls: Type[DL], src_dict: Dict[str, Any]) -> DL: + def from_dict(cls: Type[PZ], src_dict: Dict[str, Any]) -> PZ: d = src_dict.copy() request_id = d.pop("request_id", UNSET) diff --git a/kittycad/models/surface_area.py b/kittycad/models/surface_area.py new file mode 100644 index 000000000..38443de16 --- /dev/null +++ b/kittycad/models/surface_area.py @@ -0,0 +1,69 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.unit_area import UnitArea +from ..types import UNSET, Unset + +FA = TypeVar("FA", bound="SurfaceArea") + + +@attr.s(auto_attribs=True) +class SurfaceArea: + """The surface area response.""" # noqa: E501 + + output_unit: Union[Unset, UnitArea] = UNSET + surface_area: Union[Unset, float] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + surface_area = self.surface_area + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit + if surface_area is not UNSET: + field_dict["surface_area"] = surface_area + + return field_dict + + @classmethod + def from_dict(cls: Type[FA], src_dict: Dict[str, Any]) -> FA: + d = src_dict.copy() + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitArea] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] + + surface_area = d.pop("surface_area", UNSET) + + surface_area = cls( + output_unit=output_unit, + surface_area=surface_area, + ) + + surface_area.additional_properties = d + return surface_area + + @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 diff --git a/kittycad/models/system.py b/kittycad/models/system.py index 6f5c7a4b4..aaeb2dc16 100644 --- a/kittycad/models/system.py +++ b/kittycad/models/system.py @@ -5,7 +5,7 @@ import attr from ..models.axis_direction_pair import AxisDirectionPair from ..types import UNSET, Unset -QT = TypeVar("QT", bound="System") +GE = TypeVar("GE", bound="System") @attr.s(auto_attribs=True) @@ -41,7 +41,7 @@ class System: return field_dict @classmethod - def from_dict(cls: Type[QT], src_dict: Dict[str, Any]) -> QT: + def from_dict(cls: Type[GE], src_dict: Dict[str, Any]) -> GE: d = src_dict.copy() _forward = d.pop("forward", UNSET) forward: Union[Unset, AxisDirectionPair] diff --git a/kittycad/models/system_info_cgroup_driver_enum.py b/kittycad/models/system_info_cgroup_driver_enum.py deleted file mode 100644 index 91259cd64..000000000 --- a/kittycad/models/system_info_cgroup_driver_enum.py +++ /dev/null @@ -1,11 +0,0 @@ -from enum import Enum - - -class SystemInfoCgroupDriverEnum(str, Enum): - EMPTY = "" - CGROUPFS = "cgroupfs" - SYSTEMD = "systemd" - NONE = "none" - - def __str__(self) -> str: - return str(self.value) diff --git a/kittycad/models/system_info_cgroup_version_enum.py b/kittycad/models/system_info_cgroup_version_enum.py deleted file mode 100644 index 24983f2c3..000000000 --- a/kittycad/models/system_info_cgroup_version_enum.py +++ /dev/null @@ -1,10 +0,0 @@ -from enum import Enum - - -class SystemInfoCgroupVersionEnum(str, Enum): - EMPTY = "" - ONE = "1" - TWO = "2" - - def __str__(self) -> str: - return str(self.value) diff --git a/kittycad/models/system_info_isolation_enum.py b/kittycad/models/system_info_isolation_enum.py deleted file mode 100644 index 98dcb2a0d..000000000 --- a/kittycad/models/system_info_isolation_enum.py +++ /dev/null @@ -1,11 +0,0 @@ -from enum import Enum - - -class SystemInfoIsolationEnum(str, Enum): - EMPTY = "" - DEFAULT = "default" - HYPERV = "hyperv" - PROCESS = "process" - - def __str__(self) -> str: - return str(self.value) diff --git a/kittycad/models/take_snapshot.py b/kittycad/models/take_snapshot.py index 35991e6b1..5eefe056b 100644 --- a/kittycad/models/take_snapshot.py +++ b/kittycad/models/take_snapshot.py @@ -5,7 +5,7 @@ import attr from ..models.base64data import Base64Data from ..types import UNSET, Unset -HR = TypeVar("HR", bound="TakeSnapshot") +JG = TypeVar("JG", bound="TakeSnapshot") @attr.s(auto_attribs=True) @@ -30,7 +30,7 @@ class TakeSnapshot: return field_dict @classmethod - def from_dict(cls: Type[HR], src_dict: Dict[str, Any]) -> HR: + def from_dict(cls: Type[JG], src_dict: Dict[str, Any]) -> JG: d = src_dict.copy() _contents = d.pop("contents", UNSET) contents: Union[Unset, Base64Data] diff --git a/kittycad/models/unit_angle_conversion.py b/kittycad/models/unit_angle_conversion.py index 0b3955e06..d3b71a47f 100644 --- a/kittycad/models/unit_angle_conversion.py +++ b/kittycad/models/unit_angle_conversion.py @@ -9,7 +9,7 @@ from ..models.unit_angle import UnitAngle from ..models.uuid import Uuid from ..types import UNSET, Unset -VF = TypeVar("VF", bound="UnitAngleConversion") +HH = TypeVar("HH", bound="UnitAngleConversion") @attr.s(auto_attribs=True) @@ -87,7 +87,7 @@ class UnitAngleConversion: return field_dict @classmethod - def from_dict(cls: Type[VF], src_dict: Dict[str, Any]) -> VF: + def from_dict(cls: Type[HH], src_dict: Dict[str, Any]) -> HH: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/unit_area.py b/kittycad/models/unit_area.py index 09f8a4037..6a3f7dc8c 100644 --- a/kittycad/models/unit_area.py +++ b/kittycad/models/unit_area.py @@ -4,19 +4,19 @@ from enum import Enum class UnitArea(str, Enum): """The valid types of area units.""" # noqa: E501 - """# Square centimetres """ # noqa: E501 + """# Square centimeters """ # noqa: E501 CM2 = "cm2" - """# Square decimetres """ # noqa: E501 + """# Square decimeters """ # noqa: E501 DM2 = "dm2" """# Square feet """ # noqa: E501 FT2 = "ft2" """# Square inches """ # noqa: E501 IN2 = "in2" - """# Square kilometres """ # noqa: E501 + """# Square kilometers """ # noqa: E501 KM2 = "km2" - """# Square metres """ # noqa: E501 + """# Square meters """ # noqa: E501 M2 = "m2" - """# Square millimetres """ # noqa: E501 + """# Square millimeters """ # noqa: E501 MM2 = "mm2" """# Square yards """ # noqa: E501 YD2 = "yd2" diff --git a/kittycad/models/unit_area_conversion.py b/kittycad/models/unit_area_conversion.py index 0c40b94f8..b1cfd3125 100644 --- a/kittycad/models/unit_area_conversion.py +++ b/kittycad/models/unit_area_conversion.py @@ -9,7 +9,7 @@ from ..models.unit_area import UnitArea from ..models.uuid import Uuid from ..types import UNSET, Unset -VM = TypeVar("VM", bound="UnitAreaConversion") +RY = TypeVar("RY", bound="UnitAreaConversion") @attr.s(auto_attribs=True) @@ -87,7 +87,7 @@ class UnitAreaConversion: return field_dict @classmethod - def from_dict(cls: Type[VM], src_dict: Dict[str, Any]) -> VM: + def from_dict(cls: Type[RY], src_dict: Dict[str, Any]) -> RY: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/unit_current_conversion.py b/kittycad/models/unit_current_conversion.py index 763d8711a..c4c5957ab 100644 --- a/kittycad/models/unit_current_conversion.py +++ b/kittycad/models/unit_current_conversion.py @@ -9,7 +9,7 @@ from ..models.unit_current import UnitCurrent from ..models.uuid import Uuid from ..types import UNSET, Unset -WH = TypeVar("WH", bound="UnitCurrentConversion") +AE = TypeVar("AE", bound="UnitCurrentConversion") @attr.s(auto_attribs=True) @@ -87,7 +87,7 @@ class UnitCurrentConversion: return field_dict @classmethod - def from_dict(cls: Type[WH], src_dict: Dict[str, Any]) -> WH: + def from_dict(cls: Type[AE], src_dict: Dict[str, Any]) -> AE: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/unit_energy_conversion.py b/kittycad/models/unit_energy_conversion.py index 04735f30c..8a3fd244f 100644 --- a/kittycad/models/unit_energy_conversion.py +++ b/kittycad/models/unit_energy_conversion.py @@ -9,7 +9,7 @@ from ..models.unit_energy import UnitEnergy from ..models.uuid import Uuid from ..types import UNSET, Unset -DQ = TypeVar("DQ", bound="UnitEnergyConversion") +AD = TypeVar("AD", bound="UnitEnergyConversion") @attr.s(auto_attribs=True) @@ -87,7 +87,7 @@ class UnitEnergyConversion: return field_dict @classmethod - def from_dict(cls: Type[DQ], src_dict: Dict[str, Any]) -> DQ: + def from_dict(cls: Type[AD], src_dict: Dict[str, Any]) -> AD: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/unit_force_conversion.py b/kittycad/models/unit_force_conversion.py index 1f4aa02c1..a711e3cb5 100644 --- a/kittycad/models/unit_force_conversion.py +++ b/kittycad/models/unit_force_conversion.py @@ -9,7 +9,7 @@ from ..models.unit_force import UnitForce from ..models.uuid import Uuid from ..types import UNSET, Unset -UY = TypeVar("UY", bound="UnitForceConversion") +AB = TypeVar("AB", bound="UnitForceConversion") @attr.s(auto_attribs=True) @@ -87,7 +87,7 @@ class UnitForceConversion: return field_dict @classmethod - def from_dict(cls: Type[UY], src_dict: Dict[str, Any]) -> UY: + def from_dict(cls: Type[AB], src_dict: Dict[str, Any]) -> AB: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/unit_frequency_conversion.py b/kittycad/models/unit_frequency_conversion.py index d68b3d808..a435cf35a 100644 --- a/kittycad/models/unit_frequency_conversion.py +++ b/kittycad/models/unit_frequency_conversion.py @@ -9,7 +9,7 @@ from ..models.unit_frequency import UnitFrequency from ..models.uuid import Uuid from ..types import UNSET, Unset -PD = TypeVar("PD", bound="UnitFrequencyConversion") +VY = TypeVar("VY", bound="UnitFrequencyConversion") @attr.s(auto_attribs=True) @@ -87,7 +87,7 @@ class UnitFrequencyConversion: return field_dict @classmethod - def from_dict(cls: Type[PD], src_dict: Dict[str, Any]) -> PD: + def from_dict(cls: Type[VY], src_dict: Dict[str, Any]) -> VY: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/unit_length.py b/kittycad/models/unit_length.py index 8a64e8c93..801239d92 100644 --- a/kittycad/models/unit_length.py +++ b/kittycad/models/unit_length.py @@ -4,15 +4,15 @@ from enum import Enum class UnitLength(str, Enum): """The valid types of length units.""" # noqa: E501 - """# Centimetres """ # noqa: E501 + """# Centimeters """ # noqa: E501 CM = "cm" """# Feet """ # noqa: E501 FT = "ft" """# Inches """ # noqa: E501 IN = "in" - """# Metres """ # noqa: E501 + """# Meters """ # noqa: E501 M = "m" - """# Millimetres """ # noqa: E501 + """# Millimeters """ # noqa: E501 MM = "mm" """# Yards """ # noqa: E501 YD = "yd" diff --git a/kittycad/models/unit_length_conversion.py b/kittycad/models/unit_length_conversion.py index 672a16785..5c35727dd 100644 --- a/kittycad/models/unit_length_conversion.py +++ b/kittycad/models/unit_length_conversion.py @@ -9,7 +9,7 @@ from ..models.unit_length import UnitLength from ..models.uuid import Uuid from ..types import UNSET, Unset -SM = TypeVar("SM", bound="UnitLengthConversion") +DW = TypeVar("DW", bound="UnitLengthConversion") @attr.s(auto_attribs=True) @@ -87,7 +87,7 @@ class UnitLengthConversion: return field_dict @classmethod - def from_dict(cls: Type[SM], src_dict: Dict[str, Any]) -> SM: + def from_dict(cls: Type[DW], src_dict: Dict[str, Any]) -> DW: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/unit_mass_conversion.py b/kittycad/models/unit_mass_conversion.py index fec155b2e..13d2f566c 100644 --- a/kittycad/models/unit_mass_conversion.py +++ b/kittycad/models/unit_mass_conversion.py @@ -9,7 +9,7 @@ from ..models.unit_mass import UnitMass from ..models.uuid import Uuid from ..types import UNSET, Unset -JL = TypeVar("JL", bound="UnitMassConversion") +MC = TypeVar("MC", bound="UnitMassConversion") @attr.s(auto_attribs=True) @@ -87,7 +87,7 @@ class UnitMassConversion: return field_dict @classmethod - def from_dict(cls: Type[JL], src_dict: Dict[str, Any]) -> JL: + def from_dict(cls: Type[MC], src_dict: Dict[str, Any]) -> MC: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/unit_power_conversion.py b/kittycad/models/unit_power_conversion.py index e43f2709a..ea294da53 100644 --- a/kittycad/models/unit_power_conversion.py +++ b/kittycad/models/unit_power_conversion.py @@ -9,7 +9,7 @@ from ..models.unit_power import UnitPower from ..models.uuid import Uuid from ..types import UNSET, Unset -CG = TypeVar("CG", bound="UnitPowerConversion") +AV = TypeVar("AV", bound="UnitPowerConversion") @attr.s(auto_attribs=True) @@ -87,7 +87,7 @@ class UnitPowerConversion: return field_dict @classmethod - def from_dict(cls: Type[CG], src_dict: Dict[str, Any]) -> CG: + def from_dict(cls: Type[AV], src_dict: Dict[str, Any]) -> AV: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/unit_pressure_conversion.py b/kittycad/models/unit_pressure_conversion.py index 62ac81909..9d2c946dd 100644 --- a/kittycad/models/unit_pressure_conversion.py +++ b/kittycad/models/unit_pressure_conversion.py @@ -9,7 +9,7 @@ from ..models.unit_pressure import UnitPressure from ..models.uuid import Uuid from ..types import UNSET, Unset -QA = TypeVar("QA", bound="UnitPressureConversion") +BR = TypeVar("BR", bound="UnitPressureConversion") @attr.s(auto_attribs=True) @@ -87,7 +87,7 @@ class UnitPressureConversion: return field_dict @classmethod - def from_dict(cls: Type[QA], src_dict: Dict[str, Any]) -> QA: + def from_dict(cls: Type[BR], src_dict: Dict[str, Any]) -> BR: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/unit_temperature_conversion.py b/kittycad/models/unit_temperature_conversion.py index 70c3eafaa..7d21370ac 100644 --- a/kittycad/models/unit_temperature_conversion.py +++ b/kittycad/models/unit_temperature_conversion.py @@ -9,7 +9,7 @@ from ..models.unit_temperature import UnitTemperature from ..models.uuid import Uuid from ..types import UNSET, Unset -ZB = TypeVar("ZB", bound="UnitTemperatureConversion") +WM = TypeVar("WM", bound="UnitTemperatureConversion") @attr.s(auto_attribs=True) @@ -87,7 +87,7 @@ class UnitTemperatureConversion: return field_dict @classmethod - def from_dict(cls: Type[ZB], src_dict: Dict[str, Any]) -> ZB: + def from_dict(cls: Type[WM], src_dict: Dict[str, Any]) -> WM: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/unit_torque_conversion.py b/kittycad/models/unit_torque_conversion.py index 4314ba360..345f428a9 100644 --- a/kittycad/models/unit_torque_conversion.py +++ b/kittycad/models/unit_torque_conversion.py @@ -9,7 +9,7 @@ from ..models.unit_torque import UnitTorque from ..models.uuid import Uuid from ..types import UNSET, Unset -AU = TypeVar("AU", bound="UnitTorqueConversion") +OK = TypeVar("OK", bound="UnitTorqueConversion") @attr.s(auto_attribs=True) @@ -87,7 +87,7 @@ class UnitTorqueConversion: return field_dict @classmethod - def from_dict(cls: Type[AU], src_dict: Dict[str, Any]) -> AU: + def from_dict(cls: Type[OK], src_dict: Dict[str, Any]) -> OK: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/unit_volume.py b/kittycad/models/unit_volume.py index 66becae03..edc51cda3 100644 --- a/kittycad/models/unit_volume.py +++ b/kittycad/models/unit_volume.py @@ -4,13 +4,13 @@ from enum import Enum class UnitVolume(str, Enum): """The valid types of volume units.""" # noqa: E501 - """# Cubic centimetres (cc or cm³) """ # noqa: E501 + """# Cubic centimeters (cc or cm³) """ # noqa: E501 CM3 = "cm3" """# Cubic feet (ft³) """ # noqa: E501 FT3 = "ft3" """# Cubic inches (cu in or in³) """ # noqa: E501 IN3 = "in3" - """# Cubic metres (m³) """ # noqa: E501 + """# Cubic meters (m³) """ # noqa: E501 M3 = "m3" """# Cubic yards (yd³) """ # noqa: E501 YD3 = "yd3" diff --git a/kittycad/models/unit_volume_conversion.py b/kittycad/models/unit_volume_conversion.py index 07e2a5730..a4c72d17e 100644 --- a/kittycad/models/unit_volume_conversion.py +++ b/kittycad/models/unit_volume_conversion.py @@ -9,7 +9,7 @@ from ..models.unit_volume import UnitVolume from ..models.uuid import Uuid from ..types import UNSET, Unset -FX = TypeVar("FX", bound="UnitVolumeConversion") +MU = TypeVar("MU", bound="UnitVolumeConversion") @attr.s(auto_attribs=True) @@ -87,7 +87,7 @@ class UnitVolumeConversion: return field_dict @classmethod - def from_dict(cls: Type[FX], src_dict: Dict[str, Any]) -> FX: + def from_dict(cls: Type[MU], src_dict: Dict[str, Any]) -> MU: d = src_dict.copy() _completed_at = d.pop("completed_at", UNSET) completed_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/update_user.py b/kittycad/models/update_user.py index fd26d5352..0c77403f7 100644 --- a/kittycad/models/update_user.py +++ b/kittycad/models/update_user.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -BL = TypeVar("BL", bound="UpdateUser") +OP = TypeVar("OP", bound="UpdateUser") @attr.s(auto_attribs=True) @@ -47,7 +47,7 @@ class UpdateUser: return field_dict @classmethod - def from_dict(cls: Type[BL], src_dict: Dict[str, Any]) -> BL: + def from_dict(cls: Type[OP], src_dict: Dict[str, Any]) -> OP: d = src_dict.copy() company = d.pop("company", UNSET) diff --git a/kittycad/models/user.py b/kittycad/models/user.py index 575a6fafc..6234271f2 100644 --- a/kittycad/models/user.py +++ b/kittycad/models/user.py @@ -6,7 +6,7 @@ from dateutil.parser import isoparse from ..types import UNSET, Unset -KU = TypeVar("KU", bound="User") +WW = TypeVar("WW", bound="User") @attr.s(auto_attribs=True) @@ -83,7 +83,7 @@ class User: return field_dict @classmethod - def from_dict(cls: Type[KU], src_dict: Dict[str, Any]) -> KU: + def from_dict(cls: Type[WW], src_dict: Dict[str, Any]) -> WW: d = src_dict.copy() company = d.pop("company", UNSET) diff --git a/kittycad/models/user_results_page.py b/kittycad/models/user_results_page.py index d7450ad30..49abf86a8 100644 --- a/kittycad/models/user_results_page.py +++ b/kittycad/models/user_results_page.py @@ -4,7 +4,7 @@ import attr from ..types import UNSET, Unset -PZ = TypeVar("PZ", bound="UserResultsPage") +LV = TypeVar("LV", bound="UserResultsPage") @attr.s(auto_attribs=True) @@ -37,7 +37,7 @@ class UserResultsPage: return field_dict @classmethod - def from_dict(cls: Type[PZ], src_dict: Dict[str, Any]) -> PZ: + def from_dict(cls: Type[LV], src_dict: Dict[str, Any]) -> LV: d = src_dict.copy() from ..models.user import User diff --git a/kittycad/models/verification_token.py b/kittycad/models/verification_token.py index 0bf9d5079..367c0c149 100644 --- a/kittycad/models/verification_token.py +++ b/kittycad/models/verification_token.py @@ -6,7 +6,7 @@ from dateutil.parser import isoparse from ..types import UNSET, Unset -FA = TypeVar("FA", bound="VerificationToken") +II = TypeVar("II", bound="VerificationToken") @attr.s(auto_attribs=True) @@ -53,7 +53,7 @@ class VerificationToken: return field_dict @classmethod - def from_dict(cls: Type[FA], src_dict: Dict[str, Any]) -> FA: + def from_dict(cls: Type[II], src_dict: Dict[str, Any]) -> II: d = src_dict.copy() _created_at = d.pop("created_at", UNSET) created_at: Union[Unset, datetime.datetime] diff --git a/kittycad/models/volume.py b/kittycad/models/volume.py new file mode 100644 index 000000000..b1fc386a7 --- /dev/null +++ b/kittycad/models/volume.py @@ -0,0 +1,69 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.unit_volume import UnitVolume +from ..types import UNSET, Unset + +FC = TypeVar("FC", bound="Volume") + + +@attr.s(auto_attribs=True) +class Volume: + """The volume response.""" # noqa: E501 + + output_unit: Union[Unset, UnitVolume] = UNSET + volume: Union[Unset, float] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + volume = self.volume + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if output_unit is not UNSET: + field_dict["output_unit"] = output_unit + if volume is not UNSET: + field_dict["volume"] = volume + + return field_dict + + @classmethod + def from_dict(cls: Type[FC], src_dict: Dict[str, Any]) -> FC: + d = src_dict.copy() + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitVolume] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] + + volume = d.pop("volume", UNSET) + + volume = cls( + output_unit=output_unit, + volume=volume, + ) + + volume.additional_properties = d + return volume + + @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 diff --git a/kittycad/models/web_socket_request.py b/kittycad/models/web_socket_request.py index f260c972d..eba8050f2 100644 --- a/kittycad/models/web_socket_request.py +++ b/kittycad/models/web_socket_request.py @@ -2,13 +2,14 @@ from typing import Any, Dict, List, Type, TypeVar, Union import attr +from ..models.client_metrics import ClientMetrics from ..models.modeling_cmd import ModelingCmd from ..models.modeling_cmd_id import ModelingCmdId from ..models.rtc_ice_candidate_init import RtcIceCandidateInit from ..models.rtc_session_description import RtcSessionDescription from ..types import UNSET, Unset -GE = TypeVar("GE", bound="trickle_ice") +OA = TypeVar("OA", bound="trickle_ice") @attr.s(auto_attribs=True) @@ -35,7 +36,7 @@ class trickle_ice: return field_dict @classmethod - def from_dict(cls: Type[GE], src_dict: Dict[str, Any]) -> GE: + def from_dict(cls: Type[OA], src_dict: Dict[str, Any]) -> OA: d = src_dict.copy() _candidate = d.pop("candidate", UNSET) candidate: Union[Unset, RtcIceCandidateInit] @@ -71,7 +72,7 @@ class trickle_ice: return key in self.additional_properties -JG = TypeVar("JG", bound="sdp_offer") +EI = TypeVar("EI", bound="sdp_offer") @attr.s(auto_attribs=True) @@ -98,7 +99,7 @@ class sdp_offer: return field_dict @classmethod - def from_dict(cls: Type[JG], src_dict: Dict[str, Any]) -> JG: + def from_dict(cls: Type[EI], src_dict: Dict[str, Any]) -> EI: d = src_dict.copy() _offer = d.pop("offer", UNSET) offer: Union[Unset, RtcSessionDescription] @@ -134,7 +135,7 @@ class sdp_offer: return key in self.additional_properties -HH = TypeVar("HH", bound="modeling_cmd_req") +CQ = TypeVar("CQ", bound="modeling_cmd_req") @attr.s(auto_attribs=True) @@ -166,7 +167,7 @@ class modeling_cmd_req: return field_dict @classmethod - def from_dict(cls: Type[HH], src_dict: Dict[str, Any]) -> HH: + def from_dict(cls: Type[CQ], src_dict: Dict[str, Any]) -> CQ: d = src_dict.copy() _cmd = d.pop("cmd", UNSET) cmd: Union[Unset, ModelingCmd] @@ -210,7 +211,7 @@ class modeling_cmd_req: return key in self.additional_properties -RY = TypeVar("RY", bound="ping") +JE = TypeVar("JE", bound="ping") @attr.s(auto_attribs=True) @@ -232,7 +233,7 @@ class ping: return field_dict @classmethod - def from_dict(cls: Type[RY], src_dict: Dict[str, Any]) -> RY: + def from_dict(cls: Type[JE], src_dict: Dict[str, Any]) -> JE: d = src_dict.copy() type = d.pop("type", UNSET) @@ -260,4 +261,69 @@ class ping: return key in self.additional_properties -WebSocketRequest = Union[trickle_ice, sdp_offer, modeling_cmd_req, ping] +RD = TypeVar("RD", bound="metrics_response") + + +@attr.s(auto_attribs=True) +class metrics_response: + """The response to a metrics collection request from the server.""" # noqa: E501 + + metrics: Union[Unset, ClientMetrics] = UNSET + type: str = "metrics_response" + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.metrics, Unset): + metrics = self.metrics + type = self.type + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if metrics is not UNSET: + field_dict["metrics"] = metrics + field_dict["type"] = type + + return field_dict + + @classmethod + def from_dict(cls: Type[RD], src_dict: Dict[str, Any]) -> RD: + d = src_dict.copy() + _metrics = d.pop("metrics", UNSET) + metrics: Union[Unset, ClientMetrics] + if isinstance(_metrics, Unset): + metrics = UNSET + else: + metrics = _metrics # type: ignore[arg-type] + + type = d.pop("type", UNSET) + + metrics_response = cls( + metrics=metrics, + type=type, + ) + + metrics_response.additional_properties = d + return metrics_response + + @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 + + +WebSocketRequest = Union[ + trickle_ice, sdp_offer, modeling_cmd_req, ping, metrics_response +] diff --git a/spec.json b/spec.json index 6db68cb30..47b2c43bc 100644 --- a/spec.json +++ b/spec.json @@ -211,6 +211,29 @@ ], "type": "object" }, + "Angle": { + "description": "An angle, with a specific unit.", + "properties": { + "unit": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitAngle" + } + ], + "description": "What unit is the measurement?" + }, + "value": { + "description": "The size of the angle, measured in the chosen unit.", + "format": "double", + "type": "number" + } + }, + "required": [ + "unit", + "value" + ], + "type": "object" + }, "AnnotationLineEnd": { "description": "Annotation line end type", "enum": [ @@ -1664,10 +1687,99 @@ }, "type": "object" }, + "CenterOfMass": { + "description": "The center of mass response.", + "properties": { + "center_of_mass": { + "allOf": [ + { + "$ref": "#/components/schemas/Point3d" + } + ], + "description": "The center of mass." + }, + "output_unit": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitLength" + } + ], + "description": "The output unit for the center of mass." + } + }, + "required": [ + "center_of_mass", + "output_unit" + ], + "type": "object" + }, + "ClientMetrics": { + "description": "ClientMetrics contains information regarding the state of the peer.", + "properties": { + "rtc_frames_decoded": { + "description": "Counter of the number of WebRTC frames that the client has decoded during this session.", + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "rtc_frames_dropped": { + "description": "Counter of the number of WebRTC frames the client has dropped during this session.", + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "rtc_frames_per_second": { + "description": "Current number of frames being rendered per second. A good target is 60 frames per second, but it can fluctuate depending on network conditions.", + "format": "uint8", + "minimum": 0, + "type": "integer" + }, + "rtc_frames_received": { + "description": "Counter of the number of WebRTC frames that the client has received during this session.", + "format": "uint64", + "minimum": 0, + "type": "integer" + }, + "rtc_freeze_count": { + "description": "Number of times the WebRTC playback has frozen. This is usually due to network conditions.", + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "rtc_jitter_sec": { + "description": "Amount of \"jitter\" in the WebRTC session. Network latency is the time it takes a packet to traverse the network. The amount that the latency varies is the jitter. Video latency is the time it takes to render a frame sent by the server (including network latency). A low jitter means the video latency can be reduced without impacting smooth playback. High jitter means clients will increase video latency to ensure smooth playback.", + "format": "float", + "type": "number" + }, + "rtc_keyframes_decoded": { + "description": "Number of \"key frames\" decoded in the underlying h.264 stream. A key frame is an expensive (bandwidth-wise) \"full image\" of the video frame. Data after the keyframe become -- effectively -- \"diff\" operations on that key frame. The Engine will only send a keyframe if required, which is an indication that some of the \"diffs\" have been lost, usually an indication of poor network conditions. We like this metric to understand times when the connection has had to recover.", + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "rtc_total_freezes_duration_sec": { + "description": "Number of seconds of frozen video the user has been subjected to.", + "format": "float", + "type": "number" + } + }, + "required": [ + "rtc_frames_decoded", + "rtc_frames_dropped", + "rtc_frames_per_second", + "rtc_frames_received", + "rtc_freeze_count", + "rtc_jitter_sec", + "rtc_keyframes_decoded", + "rtc_total_freezes_duration_sec" + ], + "type": "object" + }, "Cluster": { "description": "Cluster information.", "properties": { "addr": { + "default": null, "description": "The IP address of the cluster.", "nullable": true, "type": "string" @@ -1696,6 +1808,7 @@ "type": "integer" }, "urls": { + "default": [], "description": "The urls of the cluster.", "items": { "type": "string" @@ -1786,22 +1899,6 @@ ], "type": "object" }, - "Commit": { - "description": "Commit holds the Git-commit (SHA1) that a binary was built from, as reported in the version-string of external tools, such as `containerd`, or `runC`.", - "properties": { - "expected": { - "description": "Commit ID of external tool expected by dockerd as set at build time.", - "nullable": true, - "type": "string" - }, - "id": { - "description": "Actual commit ID of external tool.", - "nullable": true, - "type": "string" - } - }, - "type": "object" - }, "Connection": { "description": "Metadata about a pub-sub connection.\n\nThis is mostly used for internal purposes and debugging.", "properties": { @@ -1818,10 +1915,12 @@ } ], "default": { + "addr": null, "auth_timeout": 0, "cluster_port": 0, "name": "", - "tls_timeout": 0 + "tls_timeout": 0, + "urls": [] }, "description": "Information about the cluster." }, @@ -1843,8 +1942,9 @@ "type": "integer" }, "cpu": { + "default": 0.0, + "description": "The CPU usage of the server.", "format": "double", - "nullable": true, "type": "number" }, "gateway": { @@ -1904,6 +2004,7 @@ "format": "int64", "type": "integer" }, + "description": "HTTP request statistics.", "type": "object" }, "https_port": { @@ -2132,1752 +2233,8 @@ "type": "object" }, "CountryCode": { - "description": "An enumeration of all ISO-3166 alpha-2 country codes.", - "oneOf": [ - { - "description": "Afghanistan", - "enum": [ - "AF" - ], - "type": "string" - }, - { - "description": "Åland Islands", - "enum": [ - "AX" - ], - "type": "string" - }, - { - "description": "Albania", - "enum": [ - "AL" - ], - "type": "string" - }, - { - "description": "Algeria", - "enum": [ - "DZ" - ], - "type": "string" - }, - { - "description": "American Samoa", - "enum": [ - "AS" - ], - "type": "string" - }, - { - "description": "Andorra", - "enum": [ - "AD" - ], - "type": "string" - }, - { - "description": "Angola", - "enum": [ - "AO" - ], - "type": "string" - }, - { - "description": "Anguilla", - "enum": [ - "AI" - ], - "type": "string" - }, - { - "description": "Antarctica", - "enum": [ - "AQ" - ], - "type": "string" - }, - { - "description": "Antigua and Barbuda", - "enum": [ - "AG" - ], - "type": "string" - }, - { - "description": "Argentina", - "enum": [ - "AR" - ], - "type": "string" - }, - { - "description": "Armenia", - "enum": [ - "AM" - ], - "type": "string" - }, - { - "description": "Aruba", - "enum": [ - "AW" - ], - "type": "string" - }, - { - "description": "Australia", - "enum": [ - "AU" - ], - "type": "string" - }, - { - "description": "Austria", - "enum": [ - "AT" - ], - "type": "string" - }, - { - "description": "Azerbaijan", - "enum": [ - "AZ" - ], - "type": "string" - }, - { - "description": "Bahamas", - "enum": [ - "BS" - ], - "type": "string" - }, - { - "description": "Bahrain", - "enum": [ - "BH" - ], - "type": "string" - }, - { - "description": "Bangladesh", - "enum": [ - "BD" - ], - "type": "string" - }, - { - "description": "Barbados", - "enum": [ - "BB" - ], - "type": "string" - }, - { - "description": "Belarus", - "enum": [ - "BY" - ], - "type": "string" - }, - { - "description": "Belgium", - "enum": [ - "BE" - ], - "type": "string" - }, - { - "description": "Belize", - "enum": [ - "BZ" - ], - "type": "string" - }, - { - "description": "Benin", - "enum": [ - "BJ" - ], - "type": "string" - }, - { - "description": "Bermuda", - "enum": [ - "BM" - ], - "type": "string" - }, - { - "description": "Bhutan", - "enum": [ - "BT" - ], - "type": "string" - }, - { - "description": "Bolivia (Plurinational State of)", - "enum": [ - "BO" - ], - "type": "string" - }, - { - "description": "Bonaire, Sint Eustatius and Saba", - "enum": [ - "BQ" - ], - "type": "string" - }, - { - "description": "Bosnia and Herzegovina", - "enum": [ - "BA" - ], - "type": "string" - }, - { - "description": "Botswana", - "enum": [ - "BW" - ], - "type": "string" - }, - { - "description": "Bouvet Island", - "enum": [ - "BV" - ], - "type": "string" - }, - { - "description": "Brazil", - "enum": [ - "BR" - ], - "type": "string" - }, - { - "description": "British Indian Ocean Territory", - "enum": [ - "IO" - ], - "type": "string" - }, - { - "description": "Brunei Darussalam", - "enum": [ - "BN" - ], - "type": "string" - }, - { - "description": "Bulgaria", - "enum": [ - "BG" - ], - "type": "string" - }, - { - "description": "Burkina Faso", - "enum": [ - "BF" - ], - "type": "string" - }, - { - "description": "Burundi", - "enum": [ - "BI" - ], - "type": "string" - }, - { - "description": "Cabo Verde", - "enum": [ - "CV" - ], - "type": "string" - }, - { - "description": "Cambodia", - "enum": [ - "KH" - ], - "type": "string" - }, - { - "description": "Cameroon", - "enum": [ - "CM" - ], - "type": "string" - }, - { - "description": "Canada", - "enum": [ - "CA" - ], - "type": "string" - }, - { - "description": "Cayman Islands", - "enum": [ - "KY" - ], - "type": "string" - }, - { - "description": "Central African Republic", - "enum": [ - "CF" - ], - "type": "string" - }, - { - "description": "Chad", - "enum": [ - "TD" - ], - "type": "string" - }, - { - "description": "Chile", - "enum": [ - "CL" - ], - "type": "string" - }, - { - "description": "China", - "enum": [ - "CN" - ], - "type": "string" - }, - { - "description": "Christmas Island", - "enum": [ - "CX" - ], - "type": "string" - }, - { - "description": "Cocos (Keeling) Islands", - "enum": [ - "CC" - ], - "type": "string" - }, - { - "description": "Colombia", - "enum": [ - "CO" - ], - "type": "string" - }, - { - "description": "Comoros", - "enum": [ - "KM" - ], - "type": "string" - }, - { - "description": "Congo", - "enum": [ - "CG" - ], - "type": "string" - }, - { - "description": "Congo (Democratic Republic of the)", - "enum": [ - "CD" - ], - "type": "string" - }, - { - "description": "Cook Islands", - "enum": [ - "CK" - ], - "type": "string" - }, - { - "description": "Costa Rica", - "enum": [ - "CR" - ], - "type": "string" - }, - { - "description": "Côte d'Ivoire", - "enum": [ - "CI" - ], - "type": "string" - }, - { - "description": "Croatia", - "enum": [ - "HR" - ], - "type": "string" - }, - { - "description": "Cuba", - "enum": [ - "CU" - ], - "type": "string" - }, - { - "description": "Curaçao", - "enum": [ - "CW" - ], - "type": "string" - }, - { - "description": "Cyprus", - "enum": [ - "CY" - ], - "type": "string" - }, - { - "description": "Czechia", - "enum": [ - "CZ" - ], - "type": "string" - }, - { - "description": "Denmark", - "enum": [ - "DK" - ], - "type": "string" - }, - { - "description": "Djibouti", - "enum": [ - "DJ" - ], - "type": "string" - }, - { - "description": "Dominica", - "enum": [ - "DM" - ], - "type": "string" - }, - { - "description": "Dominican Republic", - "enum": [ - "DO" - ], - "type": "string" - }, - { - "description": "Ecuador", - "enum": [ - "EC" - ], - "type": "string" - }, - { - "description": "Egypt", - "enum": [ - "EG" - ], - "type": "string" - }, - { - "description": "El Salvador", - "enum": [ - "SV" - ], - "type": "string" - }, - { - "description": "Equatorial Guinea", - "enum": [ - "GQ" - ], - "type": "string" - }, - { - "description": "Eritrea", - "enum": [ - "ER" - ], - "type": "string" - }, - { - "description": "Estonia", - "enum": [ - "EE" - ], - "type": "string" - }, - { - "description": "Ethiopia", - "enum": [ - "ET" - ], - "type": "string" - }, - { - "description": "Falkland Islands (Malvinas)", - "enum": [ - "FK" - ], - "type": "string" - }, - { - "description": "Faroe Islands", - "enum": [ - "FO" - ], - "type": "string" - }, - { - "description": "Fiji", - "enum": [ - "FJ" - ], - "type": "string" - }, - { - "description": "Finland", - "enum": [ - "FI" - ], - "type": "string" - }, - { - "description": "France", - "enum": [ - "FR" - ], - "type": "string" - }, - { - "description": "French Guiana", - "enum": [ - "GF" - ], - "type": "string" - }, - { - "description": "French Polynesia", - "enum": [ - "PF" - ], - "type": "string" - }, - { - "description": "French Southern Territories", - "enum": [ - "TF" - ], - "type": "string" - }, - { - "description": "Gabon", - "enum": [ - "GA" - ], - "type": "string" - }, - { - "description": "Gambia", - "enum": [ - "GM" - ], - "type": "string" - }, - { - "description": "Georgia", - "enum": [ - "GE" - ], - "type": "string" - }, - { - "description": "Germany", - "enum": [ - "DE" - ], - "type": "string" - }, - { - "description": "Ghana", - "enum": [ - "GH" - ], - "type": "string" - }, - { - "description": "Gibraltar", - "enum": [ - "GI" - ], - "type": "string" - }, - { - "description": "Greece", - "enum": [ - "GR" - ], - "type": "string" - }, - { - "description": "Greenland", - "enum": [ - "GL" - ], - "type": "string" - }, - { - "description": "Grenada", - "enum": [ - "GD" - ], - "type": "string" - }, - { - "description": "Guadeloupe", - "enum": [ - "GP" - ], - "type": "string" - }, - { - "description": "Guam", - "enum": [ - "GU" - ], - "type": "string" - }, - { - "description": "Guatemala", - "enum": [ - "GT" - ], - "type": "string" - }, - { - "description": "Guernsey", - "enum": [ - "GG" - ], - "type": "string" - }, - { - "description": "Guinea", - "enum": [ - "GN" - ], - "type": "string" - }, - { - "description": "Guinea-Bissau", - "enum": [ - "GW" - ], - "type": "string" - }, - { - "description": "Guyana", - "enum": [ - "GY" - ], - "type": "string" - }, - { - "description": "Haiti", - "enum": [ - "HT" - ], - "type": "string" - }, - { - "description": "Heard Island and McDonald Islands", - "enum": [ - "HM" - ], - "type": "string" - }, - { - "description": "Holy See", - "enum": [ - "VA" - ], - "type": "string" - }, - { - "description": "Honduras", - "enum": [ - "HN" - ], - "type": "string" - }, - { - "description": "Hong Kong", - "enum": [ - "HK" - ], - "type": "string" - }, - { - "description": "Hungary", - "enum": [ - "HU" - ], - "type": "string" - }, - { - "description": "Iceland", - "enum": [ - "IS" - ], - "type": "string" - }, - { - "description": "India", - "enum": [ - "IN" - ], - "type": "string" - }, - { - "description": "Indonesia", - "enum": [ - "ID" - ], - "type": "string" - }, - { - "description": "Iran (Islamic Republic of)", - "enum": [ - "IR" - ], - "type": "string" - }, - { - "description": "Iraq", - "enum": [ - "IQ" - ], - "type": "string" - }, - { - "description": "Ireland", - "enum": [ - "IE" - ], - "type": "string" - }, - { - "description": "Isle of Man", - "enum": [ - "IM" - ], - "type": "string" - }, - { - "description": "Israel", - "enum": [ - "IL" - ], - "type": "string" - }, - { - "description": "Italy", - "enum": [ - "IT" - ], - "type": "string" - }, - { - "description": "Jamaica", - "enum": [ - "JM" - ], - "type": "string" - }, - { - "description": "Japan", - "enum": [ - "JP" - ], - "type": "string" - }, - { - "description": "Jersey", - "enum": [ - "JE" - ], - "type": "string" - }, - { - "description": "Jordan", - "enum": [ - "JO" - ], - "type": "string" - }, - { - "description": "Kazakhstan", - "enum": [ - "KZ" - ], - "type": "string" - }, - { - "description": "Kenya", - "enum": [ - "KE" - ], - "type": "string" - }, - { - "description": "Kiribati", - "enum": [ - "KI" - ], - "type": "string" - }, - { - "description": "Korea (Democratic People's Republic of)", - "enum": [ - "KP" - ], - "type": "string" - }, - { - "description": "Korea (Republic of)", - "enum": [ - "KR" - ], - "type": "string" - }, - { - "description": "Kuwait", - "enum": [ - "KW" - ], - "type": "string" - }, - { - "description": "Kyrgyzstan", - "enum": [ - "KG" - ], - "type": "string" - }, - { - "description": "Lao People's Democratic Republic", - "enum": [ - "LA" - ], - "type": "string" - }, - { - "description": "Latvia", - "enum": [ - "LV" - ], - "type": "string" - }, - { - "description": "Lebanon", - "enum": [ - "LB" - ], - "type": "string" - }, - { - "description": "Lesotho", - "enum": [ - "LS" - ], - "type": "string" - }, - { - "description": "Liberia", - "enum": [ - "LR" - ], - "type": "string" - }, - { - "description": "Libya", - "enum": [ - "LY" - ], - "type": "string" - }, - { - "description": "Liechtenstein", - "enum": [ - "LI" - ], - "type": "string" - }, - { - "description": "Lithuania", - "enum": [ - "LT" - ], - "type": "string" - }, - { - "description": "Luxembourg", - "enum": [ - "LU" - ], - "type": "string" - }, - { - "description": "Macao", - "enum": [ - "MO" - ], - "type": "string" - }, - { - "description": "Macedonia (the former Yugoslav Republic of)", - "enum": [ - "MK" - ], - "type": "string" - }, - { - "description": "Madagascar", - "enum": [ - "MG" - ], - "type": "string" - }, - { - "description": "Malawi", - "enum": [ - "MW" - ], - "type": "string" - }, - { - "description": "Malaysia", - "enum": [ - "MY" - ], - "type": "string" - }, - { - "description": "Maldives", - "enum": [ - "MV" - ], - "type": "string" - }, - { - "description": "Mali", - "enum": [ - "ML" - ], - "type": "string" - }, - { - "description": "Malta", - "enum": [ - "MT" - ], - "type": "string" - }, - { - "description": "Marshall Islands", - "enum": [ - "MH" - ], - "type": "string" - }, - { - "description": "Martinique", - "enum": [ - "MQ" - ], - "type": "string" - }, - { - "description": "Mauritania", - "enum": [ - "MR" - ], - "type": "string" - }, - { - "description": "Mauritius", - "enum": [ - "MU" - ], - "type": "string" - }, - { - "description": "Mayotte", - "enum": [ - "YT" - ], - "type": "string" - }, - { - "description": "Mexico", - "enum": [ - "MX" - ], - "type": "string" - }, - { - "description": "Micronesia (Federated States of)", - "enum": [ - "FM" - ], - "type": "string" - }, - { - "description": "Moldova (Republic of)", - "enum": [ - "MD" - ], - "type": "string" - }, - { - "description": "Monaco", - "enum": [ - "MC" - ], - "type": "string" - }, - { - "description": "Mongolia", - "enum": [ - "MN" - ], - "type": "string" - }, - { - "description": "Montenegro", - "enum": [ - "ME" - ], - "type": "string" - }, - { - "description": "Montserrat", - "enum": [ - "MS" - ], - "type": "string" - }, - { - "description": "Morocco", - "enum": [ - "MA" - ], - "type": "string" - }, - { - "description": "Mozambique", - "enum": [ - "MZ" - ], - "type": "string" - }, - { - "description": "Myanmar", - "enum": [ - "MM" - ], - "type": "string" - }, - { - "description": "Namibia", - "enum": [ - "NA" - ], - "type": "string" - }, - { - "description": "Nauru", - "enum": [ - "NR" - ], - "type": "string" - }, - { - "description": "Nepal", - "enum": [ - "NP" - ], - "type": "string" - }, - { - "description": "Netherlands", - "enum": [ - "NL" - ], - "type": "string" - }, - { - "description": "New Caledonia", - "enum": [ - "NC" - ], - "type": "string" - }, - { - "description": "New Zealand", - "enum": [ - "NZ" - ], - "type": "string" - }, - { - "description": "Nicaragua", - "enum": [ - "NI" - ], - "type": "string" - }, - { - "description": "Niger", - "enum": [ - "NE" - ], - "type": "string" - }, - { - "description": "Nigeria", - "enum": [ - "NG" - ], - "type": "string" - }, - { - "description": "Niue", - "enum": [ - "NU" - ], - "type": "string" - }, - { - "description": "Norfolk Island", - "enum": [ - "NF" - ], - "type": "string" - }, - { - "description": "Northern Mariana Islands", - "enum": [ - "MP" - ], - "type": "string" - }, - { - "description": "Norway", - "enum": [ - "NO" - ], - "type": "string" - }, - { - "description": "Oman", - "enum": [ - "OM" - ], - "type": "string" - }, - { - "description": "Pakistan", - "enum": [ - "PK" - ], - "type": "string" - }, - { - "description": "Palau", - "enum": [ - "PW" - ], - "type": "string" - }, - { - "description": "Palestine, State of", - "enum": [ - "PS" - ], - "type": "string" - }, - { - "description": "Panama", - "enum": [ - "PA" - ], - "type": "string" - }, - { - "description": "Papua New Guinea", - "enum": [ - "PG" - ], - "type": "string" - }, - { - "description": "Paraguay", - "enum": [ - "PY" - ], - "type": "string" - }, - { - "description": "Peru", - "enum": [ - "PE" - ], - "type": "string" - }, - { - "description": "Philippines", - "enum": [ - "PH" - ], - "type": "string" - }, - { - "description": "Pitcairn", - "enum": [ - "PN" - ], - "type": "string" - }, - { - "description": "Poland", - "enum": [ - "PL" - ], - "type": "string" - }, - { - "description": "Portugal", - "enum": [ - "PT" - ], - "type": "string" - }, - { - "description": "Puerto Rico", - "enum": [ - "PR" - ], - "type": "string" - }, - { - "description": "Qatar", - "enum": [ - "QA" - ], - "type": "string" - }, - { - "description": "Réunion", - "enum": [ - "RE" - ], - "type": "string" - }, - { - "description": "Romania", - "enum": [ - "RO" - ], - "type": "string" - }, - { - "description": "Russian Federation", - "enum": [ - "RU" - ], - "type": "string" - }, - { - "description": "Rwanda", - "enum": [ - "RW" - ], - "type": "string" - }, - { - "description": "Saint Barthélemy", - "enum": [ - "BL" - ], - "type": "string" - }, - { - "description": "Saint Helena, Ascension and Tristan da Cunha", - "enum": [ - "SH" - ], - "type": "string" - }, - { - "description": "Saint Kitts and Nevis", - "enum": [ - "KN" - ], - "type": "string" - }, - { - "description": "Saint Lucia", - "enum": [ - "LC" - ], - "type": "string" - }, - { - "description": "Saint Martin (French part)", - "enum": [ - "MF" - ], - "type": "string" - }, - { - "description": "Saint Pierre and Miquelon", - "enum": [ - "PM" - ], - "type": "string" - }, - { - "description": "Saint Vincent and the Grenadines", - "enum": [ - "VC" - ], - "type": "string" - }, - { - "description": "Samoa", - "enum": [ - "WS" - ], - "type": "string" - }, - { - "description": "San Marino", - "enum": [ - "SM" - ], - "type": "string" - }, - { - "description": "Sao Tome and Principe", - "enum": [ - "ST" - ], - "type": "string" - }, - { - "description": "Saudi Arabia", - "enum": [ - "SA" - ], - "type": "string" - }, - { - "description": "Senegal", - "enum": [ - "SN" - ], - "type": "string" - }, - { - "description": "Serbia", - "enum": [ - "RS" - ], - "type": "string" - }, - { - "description": "Seychelles", - "enum": [ - "SC" - ], - "type": "string" - }, - { - "description": "Sierra Leone", - "enum": [ - "SL" - ], - "type": "string" - }, - { - "description": "Singapore", - "enum": [ - "SG" - ], - "type": "string" - }, - { - "description": "Sint Maarten (Dutch part)", - "enum": [ - "SX" - ], - "type": "string" - }, - { - "description": "Slovakia", - "enum": [ - "SK" - ], - "type": "string" - }, - { - "description": "Slovenia", - "enum": [ - "SI" - ], - "type": "string" - }, - { - "description": "Solomon Islands", - "enum": [ - "SB" - ], - "type": "string" - }, - { - "description": "Somalia", - "enum": [ - "SO" - ], - "type": "string" - }, - { - "description": "South Africa", - "enum": [ - "ZA" - ], - "type": "string" - }, - { - "description": "South Georgia and the South Sandwich Islands", - "enum": [ - "GS" - ], - "type": "string" - }, - { - "description": "South Sudan", - "enum": [ - "SS" - ], - "type": "string" - }, - { - "description": "Spain", - "enum": [ - "ES" - ], - "type": "string" - }, - { - "description": "Sri Lanka", - "enum": [ - "LK" - ], - "type": "string" - }, - { - "description": "Sudan", - "enum": [ - "SD" - ], - "type": "string" - }, - { - "description": "Suriname", - "enum": [ - "SR" - ], - "type": "string" - }, - { - "description": "Svalbard and Jan Mayen", - "enum": [ - "SJ" - ], - "type": "string" - }, - { - "description": "Swaziland", - "enum": [ - "SZ" - ], - "type": "string" - }, - { - "description": "Sweden", - "enum": [ - "SE" - ], - "type": "string" - }, - { - "description": "Switzerland", - "enum": [ - "CH" - ], - "type": "string" - }, - { - "description": "Syrian Arab Republic", - "enum": [ - "SY" - ], - "type": "string" - }, - { - "description": "Taiwan, Province of China", - "enum": [ - "TW" - ], - "type": "string" - }, - { - "description": "Tajikistan", - "enum": [ - "TJ" - ], - "type": "string" - }, - { - "description": "Tanzania, United Republic of", - "enum": [ - "TZ" - ], - "type": "string" - }, - { - "description": "Thailand", - "enum": [ - "TH" - ], - "type": "string" - }, - { - "description": "Timor-Leste", - "enum": [ - "TL" - ], - "type": "string" - }, - { - "description": "Togo", - "enum": [ - "TG" - ], - "type": "string" - }, - { - "description": "Tokelau", - "enum": [ - "TK" - ], - "type": "string" - }, - { - "description": "Tonga", - "enum": [ - "TO" - ], - "type": "string" - }, - { - "description": "Trinidad and Tobago", - "enum": [ - "TT" - ], - "type": "string" - }, - { - "description": "Tunisia", - "enum": [ - "TN" - ], - "type": "string" - }, - { - "description": "Turkey", - "enum": [ - "TR" - ], - "type": "string" - }, - { - "description": "Turkmenistan", - "enum": [ - "TM" - ], - "type": "string" - }, - { - "description": "Turks and Caicos Islands", - "enum": [ - "TC" - ], - "type": "string" - }, - { - "description": "Tuvalu", - "enum": [ - "TV" - ], - "type": "string" - }, - { - "description": "Uganda", - "enum": [ - "UG" - ], - "type": "string" - }, - { - "description": "Ukraine", - "enum": [ - "UA" - ], - "type": "string" - }, - { - "description": "United Arab Emirates", - "enum": [ - "AE" - ], - "type": "string" - }, - { - "description": "United Kingdom of Great Britain and Northern Ireland", - "enum": [ - "GB" - ], - "type": "string" - }, - { - "description": "United States of America", - "enum": [ - "US" - ], - "type": "string" - }, - { - "description": "United States Minor Outlying Islands", - "enum": [ - "UM" - ], - "type": "string" - }, - { - "description": "Uruguay", - "enum": [ - "UY" - ], - "type": "string" - }, - { - "description": "Uzbekistan", - "enum": [ - "UZ" - ], - "type": "string" - }, - { - "description": "Vanuatu", - "enum": [ - "VU" - ], - "type": "string" - }, - { - "description": "Venezuela (Bolivarian Republic of)", - "enum": [ - "VE" - ], - "type": "string" - }, - { - "description": "Viet Nam", - "enum": [ - "VN" - ], - "type": "string" - }, - { - "description": "Virgin Islands (British)", - "enum": [ - "VG" - ], - "type": "string" - }, - { - "description": "Virgin Islands (U.S.)", - "enum": [ - "VI" - ], - "type": "string" - }, - { - "description": "Wallis and Futuna", - "enum": [ - "WF" - ], - "type": "string" - }, - { - "description": "Western Sahara", - "enum": [ - "EH" - ], - "type": "string" - }, - { - "description": "Yemen", - "enum": [ - "YE" - ], - "type": "string" - }, - { - "description": "Zambia", - "enum": [ - "ZM" - ], - "type": "string" - }, - { - "description": "Zimbabwe", - "enum": [ - "ZW" - ], - "type": "string" - } - ] + "description": "An ISO-3166 alpha-2 country code. Always uppercase.", + "type": "string" }, "Coupon": { "description": "The resource representing a Coupon.", @@ -3927,982 +2284,8 @@ ] }, "Currency": { - "description": "Currency is the list of supported currencies.\n\nThis comes from the Stripe API docs: For more details see .", - "oneOf": [ - { - "description": "United Arab Emirates Dirham", - "enum": [ - "aed" - ], - "type": "string" - }, - { - "description": "Afghan Afghani", - "enum": [ - "afn" - ], - "type": "string" - }, - { - "description": "Albanian Lek", - "enum": [ - "all" - ], - "type": "string" - }, - { - "description": "Armenian Dram", - "enum": [ - "amd" - ], - "type": "string" - }, - { - "description": "Netherlands Antillean Gulden", - "enum": [ - "ang" - ], - "type": "string" - }, - { - "description": "Angolan Kwanza", - "enum": [ - "aoa" - ], - "type": "string" - }, - { - "description": "Argentine Peso", - "enum": [ - "ars" - ], - "type": "string" - }, - { - "description": "Australian Dollar", - "enum": [ - "aud" - ], - "type": "string" - }, - { - "description": "Aruban Florin", - "enum": [ - "awg" - ], - "type": "string" - }, - { - "description": "Azerbaijani Manat", - "enum": [ - "azn" - ], - "type": "string" - }, - { - "description": "Bosnia & Herzegovina Convertible Mark", - "enum": [ - "bam" - ], - "type": "string" - }, - { - "description": "Barbadian Dollar", - "enum": [ - "bbd" - ], - "type": "string" - }, - { - "description": "Bangladeshi Taka", - "enum": [ - "bdt" - ], - "type": "string" - }, - { - "description": "Bulgarian Lev", - "enum": [ - "bgn" - ], - "type": "string" - }, - { - "description": "Burundian Franc", - "enum": [ - "bif" - ], - "type": "string" - }, - { - "description": "Bermudian Dollar", - "enum": [ - "bmd" - ], - "type": "string" - }, - { - "description": "Brunei Dollar", - "enum": [ - "bnd" - ], - "type": "string" - }, - { - "description": "Bolivian Boliviano", - "enum": [ - "bob" - ], - "type": "string" - }, - { - "description": "Brazilian Real", - "enum": [ - "brl" - ], - "type": "string" - }, - { - "description": "Bahamian Dollar", - "enum": [ - "bsd" - ], - "type": "string" - }, - { - "description": "Botswana Pula", - "enum": [ - "bwp" - ], - "type": "string" - }, - { - "description": "Belize Dollar", - "enum": [ - "bzd" - ], - "type": "string" - }, - { - "description": "Canadian Dollar", - "enum": [ - "cad" - ], - "type": "string" - }, - { - "description": "Congolese Franc", - "enum": [ - "cdf" - ], - "type": "string" - }, - { - "description": "Swiss Franc", - "enum": [ - "chf" - ], - "type": "string" - }, - { - "description": "Chilean Peso", - "enum": [ - "clp" - ], - "type": "string" - }, - { - "description": "Chinese Renminbi Yuan", - "enum": [ - "cny" - ], - "type": "string" - }, - { - "description": "Colombian Peso", - "enum": [ - "cop" - ], - "type": "string" - }, - { - "description": "Costa Rican Colón", - "enum": [ - "crc" - ], - "type": "string" - }, - { - "description": "Cape Verdean Escudo", - "enum": [ - "cve" - ], - "type": "string" - }, - { - "description": "Czech Koruna", - "enum": [ - "czk" - ], - "type": "string" - }, - { - "description": "Djiboutian Franc", - "enum": [ - "djf" - ], - "type": "string" - }, - { - "description": "Danish Krone", - "enum": [ - "dkk" - ], - "type": "string" - }, - { - "description": "Dominican Peso", - "enum": [ - "dop" - ], - "type": "string" - }, - { - "description": "Algerian Dinar", - "enum": [ - "dzd" - ], - "type": "string" - }, - { - "description": "Estonian Kroon", - "enum": [ - "eek" - ], - "type": "string" - }, - { - "description": "Egyptian Pound", - "enum": [ - "egp" - ], - "type": "string" - }, - { - "description": "Ethiopian Birr", - "enum": [ - "etb" - ], - "type": "string" - }, - { - "description": "Euro", - "enum": [ - "eur" - ], - "type": "string" - }, - { - "description": "Fijian Dollar", - "enum": [ - "fjd" - ], - "type": "string" - }, - { - "description": "Falkland Islands Pound", - "enum": [ - "fkp" - ], - "type": "string" - }, - { - "description": "British Pound", - "enum": [ - "gbp" - ], - "type": "string" - }, - { - "description": "Georgian Lari", - "enum": [ - "gel" - ], - "type": "string" - }, - { - "description": "Gibraltar Pound", - "enum": [ - "gip" - ], - "type": "string" - }, - { - "description": "Gambian Dalasi", - "enum": [ - "gmd" - ], - "type": "string" - }, - { - "description": "Guinean Franc", - "enum": [ - "gnf" - ], - "type": "string" - }, - { - "description": "Guatemalan Quetzal", - "enum": [ - "gtq" - ], - "type": "string" - }, - { - "description": "Guyanese Dollar", - "enum": [ - "gyd" - ], - "type": "string" - }, - { - "description": "Hong Kong Dollar", - "enum": [ - "hkd" - ], - "type": "string" - }, - { - "description": "Honduran Lempira", - "enum": [ - "hnl" - ], - "type": "string" - }, - { - "description": "Croatian Kuna", - "enum": [ - "hrk" - ], - "type": "string" - }, - { - "description": "Haitian Gourde", - "enum": [ - "htg" - ], - "type": "string" - }, - { - "description": "Hungarian Forint", - "enum": [ - "huf" - ], - "type": "string" - }, - { - "description": "Indonesian Rupiah", - "enum": [ - "idr" - ], - "type": "string" - }, - { - "description": "Israeli New Sheqel", - "enum": [ - "ils" - ], - "type": "string" - }, - { - "description": "Indian Rupee", - "enum": [ - "inr" - ], - "type": "string" - }, - { - "description": "Icelandic Króna", - "enum": [ - "isk" - ], - "type": "string" - }, - { - "description": "Jamaican Dollar", - "enum": [ - "jmd" - ], - "type": "string" - }, - { - "description": "Japanese Yen", - "enum": [ - "jpy" - ], - "type": "string" - }, - { - "description": "Kenyan Shilling", - "enum": [ - "kes" - ], - "type": "string" - }, - { - "description": "Kyrgyzstani Som", - "enum": [ - "kgs" - ], - "type": "string" - }, - { - "description": "Cambodian Riel", - "enum": [ - "khr" - ], - "type": "string" - }, - { - "description": "Comorian Franc", - "enum": [ - "kmf" - ], - "type": "string" - }, - { - "description": "South Korean Won", - "enum": [ - "krw" - ], - "type": "string" - }, - { - "description": "Cayman Islands Dollar", - "enum": [ - "kyd" - ], - "type": "string" - }, - { - "description": "Kazakhstani Tenge", - "enum": [ - "kzt" - ], - "type": "string" - }, - { - "description": "Lao Kip", - "enum": [ - "lak" - ], - "type": "string" - }, - { - "description": "Lebanese Pound", - "enum": [ - "lbp" - ], - "type": "string" - }, - { - "description": "Sri Lankan Rupee", - "enum": [ - "lkr" - ], - "type": "string" - }, - { - "description": "Liberian Dollar", - "enum": [ - "lrd" - ], - "type": "string" - }, - { - "description": "Lesotho Loti", - "enum": [ - "lsl" - ], - "type": "string" - }, - { - "description": "Lithuanian Litas", - "enum": [ - "ltl" - ], - "type": "string" - }, - { - "description": "Latvian Lats", - "enum": [ - "lvl" - ], - "type": "string" - }, - { - "description": "Moroccan Dirham", - "enum": [ - "mad" - ], - "type": "string" - }, - { - "description": "Moldovan Leu", - "enum": [ - "mdl" - ], - "type": "string" - }, - { - "description": "Malagasy Ariary", - "enum": [ - "mga" - ], - "type": "string" - }, - { - "description": "Macedonian Denar", - "enum": [ - "mkd" - ], - "type": "string" - }, - { - "description": "Mongolian Tögrög", - "enum": [ - "mnt" - ], - "type": "string" - }, - { - "description": "Macanese Pataca", - "enum": [ - "mop" - ], - "type": "string" - }, - { - "description": "Mauritanian Ouguiya", - "enum": [ - "mro" - ], - "type": "string" - }, - { - "description": "Mauritian Rupee", - "enum": [ - "mur" - ], - "type": "string" - }, - { - "description": "Maldivian Rufiyaa", - "enum": [ - "mvr" - ], - "type": "string" - }, - { - "description": "Malawian Kwacha", - "enum": [ - "mwk" - ], - "type": "string" - }, - { - "description": "Mexican Peso", - "enum": [ - "mxn" - ], - "type": "string" - }, - { - "description": "Malaysian Ringgit", - "enum": [ - "myr" - ], - "type": "string" - }, - { - "description": "Mozambican Metical", - "enum": [ - "mzn" - ], - "type": "string" - }, - { - "description": "Namibian Dollar", - "enum": [ - "nad" - ], - "type": "string" - }, - { - "description": "Nigerian Naira", - "enum": [ - "ngn" - ], - "type": "string" - }, - { - "description": "Nicaraguan Córdoba", - "enum": [ - "nio" - ], - "type": "string" - }, - { - "description": "Norwegian Krone", - "enum": [ - "nok" - ], - "type": "string" - }, - { - "description": "Nepalese Rupee", - "enum": [ - "npr" - ], - "type": "string" - }, - { - "description": "New Zealand Dollar", - "enum": [ - "nzd" - ], - "type": "string" - }, - { - "description": "Panamanian Balboa", - "enum": [ - "pab" - ], - "type": "string" - }, - { - "description": "Peruvian Nuevo Sol", - "enum": [ - "pen" - ], - "type": "string" - }, - { - "description": "Papua New Guinean Kina", - "enum": [ - "pgk" - ], - "type": "string" - }, - { - "description": "Philippine Peso", - "enum": [ - "php" - ], - "type": "string" - }, - { - "description": "Pakistani Rupee", - "enum": [ - "pkr" - ], - "type": "string" - }, - { - "description": "Polish Złoty", - "enum": [ - "pln" - ], - "type": "string" - }, - { - "description": "Paraguayan Guaraní", - "enum": [ - "pyg" - ], - "type": "string" - }, - { - "description": "Qatari Riyal", - "enum": [ - "qar" - ], - "type": "string" - }, - { - "description": "Romanian Leu", - "enum": [ - "ron" - ], - "type": "string" - }, - { - "description": "Serbian Dinar", - "enum": [ - "rsd" - ], - "type": "string" - }, - { - "description": "Russian Ruble", - "enum": [ - "rub" - ], - "type": "string" - }, - { - "description": "Rwandan Franc", - "enum": [ - "rwf" - ], - "type": "string" - }, - { - "description": "Saudi Riyal", - "enum": [ - "sar" - ], - "type": "string" - }, - { - "description": "Solomon Islands Dollar", - "enum": [ - "sbd" - ], - "type": "string" - }, - { - "description": "Seychellois Rupee", - "enum": [ - "scr" - ], - "type": "string" - }, - { - "description": "Swedish Krona", - "enum": [ - "sek" - ], - "type": "string" - }, - { - "description": "Singapore Dollar", - "enum": [ - "sgd" - ], - "type": "string" - }, - { - "description": "Saint Helenian Pound", - "enum": [ - "shp" - ], - "type": "string" - }, - { - "description": "Sierra Leonean Leone", - "enum": [ - "sll" - ], - "type": "string" - }, - { - "description": "Somali Shilling", - "enum": [ - "sos" - ], - "type": "string" - }, - { - "description": "Surinamese Dollar", - "enum": [ - "srd" - ], - "type": "string" - }, - { - "description": "São Tomé and Príncipe Dobra", - "enum": [ - "std" - ], - "type": "string" - }, - { - "description": "Salvadoran Colón", - "enum": [ - "svc" - ], - "type": "string" - }, - { - "description": "Swazi Lilangeni", - "enum": [ - "szl" - ], - "type": "string" - }, - { - "description": "Thai Baht", - "enum": [ - "thb" - ], - "type": "string" - }, - { - "description": "Tajikistani Somoni", - "enum": [ - "tjs" - ], - "type": "string" - }, - { - "description": "Tongan Paʻanga", - "enum": [ - "top" - ], - "type": "string" - }, - { - "description": "Turkish Lira", - "enum": [ - "try" - ], - "type": "string" - }, - { - "description": "Trinidad and Tobago Dollar", - "enum": [ - "ttd" - ], - "type": "string" - }, - { - "description": "New Taiwan Dollar", - "enum": [ - "twd" - ], - "type": "string" - }, - { - "description": "Tanzanian Shilling", - "enum": [ - "tzs" - ], - "type": "string" - }, - { - "description": "Ukrainian Hryvnia", - "enum": [ - "uah" - ], - "type": "string" - }, - { - "description": "Ugandan Shilling", - "enum": [ - "ugx" - ], - "type": "string" - }, - { - "description": "United States Dollar", - "enum": [ - "usd" - ], - "type": "string" - }, - { - "description": "Uruguayan Peso", - "enum": [ - "uyu" - ], - "type": "string" - }, - { - "description": "Uzbekistani Som", - "enum": [ - "uzs" - ], - "type": "string" - }, - { - "description": "Venezuelan Bolívar", - "enum": [ - "vef" - ], - "type": "string" - }, - { - "description": "Vietnamese Đồng", - "enum": [ - "vnd" - ], - "type": "string" - }, - { - "description": "Vanuatu Vatu", - "enum": [ - "vuv" - ], - "type": "string" - }, - { - "description": "Samoan Tala", - "enum": [ - "wst" - ], - "type": "string" - }, - { - "description": "Central African Cfa Franc", - "enum": [ - "xaf" - ], - "type": "string" - }, - { - "description": "East Caribbean Dollar", - "enum": [ - "xcd" - ], - "type": "string" - }, - { - "description": "West African Cfa Franc", - "enum": [ - "xof" - ], - "type": "string" - }, - { - "description": "Cfp Franc", - "enum": [ - "xpf" - ], - "type": "string" - }, - { - "description": "Yemeni Rial", - "enum": [ - "yer" - ], - "type": "string" - }, - { - "description": "South African Rand", - "enum": [ - "zar" - ], - "type": "string" - }, - { - "description": "Zambian Kwacha", - "enum": [ - "zmw" - ], - "type": "string" - } - ] + "description": "Currency is the list of supported currencies. Always lowercase.\n\nThis comes from the Stripe API docs: For more details see .", + "type": "string" }, "CurveGetControlPoints": { "description": "The response from the `CurveGetControlPoints` command.", @@ -4920,6 +2303,32 @@ ], "type": "object" }, + "CurveGetEndPoints": { + "description": "Endpoints of a curve", + "properties": { + "end": { + "allOf": [ + { + "$ref": "#/components/schemas/Point3d" + } + ], + "description": "End" + }, + "start": { + "allOf": [ + { + "$ref": "#/components/schemas/Point3d" + } + ], + "description": "Start" + } + }, + "required": [ + "end", + "start" + ], + "type": "object" + }, "CurveGetType": { "description": "The response from the `CurveGetType` command.", "properties": { @@ -4941,6 +2350,7 @@ "description": "The type of Curve (embedded within path)", "enum": [ "line", + "arc", "nurbs" ], "type": "string" @@ -5080,6 +2490,29 @@ ], "type": "object" }, + "Density": { + "description": "The density response.", + "properties": { + "density": { + "description": "The density.", + "format": "double", + "type": "number" + }, + "output_unit": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitDensity" + } + ], + "description": "The output unit for the density." + } + }, + "required": [ + "density", + "output_unit" + ], + "type": "object" + }, "DeviceAccessTokenRequestForm": { "description": "The form for a device access token request.", "properties": { @@ -5172,362 +2605,6 @@ ], "type": "object" }, - "DockerSystemInfo": { - "description": "Docker system info.", - "properties": { - "architecture": { - "description": "Hardware architecture of the host, as returned by the Go runtime (`GOARCH`). A full list of possible values can be found in the [Go documentation](https://golang.org/doc/install/source#environment).", - "nullable": true, - "type": "string" - }, - "bridge_nf_ip6tables": { - "description": "Indicates if `bridge-nf-call-ip6tables` is available on the host.", - "nullable": true, - "type": "boolean" - }, - "bridge_nf_iptables": { - "description": "Indicates if `bridge-nf-call-iptables` is available on the host.", - "nullable": true, - "type": "boolean" - }, - "cgroup_driver": { - "allOf": [ - { - "$ref": "#/components/schemas/SystemInfoCgroupDriverEnum" - } - ], - "description": "The driver to use for managing cgroups.", - "nullable": true - }, - "cgroup_version": { - "allOf": [ - { - "$ref": "#/components/schemas/SystemInfoCgroupVersionEnum" - } - ], - "description": "The version of the cgroup.", - "nullable": true - }, - "cluster_advertise": { - "description": "The network endpoint that the Engine advertises for the purpose of node discovery. ClusterAdvertise is a `host:port` combination on which the daemon is reachable by other hosts.\n\n**Deprecated**: This field is only propagated when using standalone Swarm mode, and overlay networking using an external k/v store. Overlay networks with Swarm mode enabled use the built-in raft store, and this field will be empty.", - "nullable": true, - "type": "string" - }, - "cluster_store": { - "description": "URL of the distributed storage backend. The storage backend is used for multihost networking (to store network and endpoint information) and by the node discovery mechanism.\n\n**Deprecated**: This field is only propagated when using standalone Swarm mode, and overlay networking using an external k/v store. Overlay networks with Swarm mode enabled use the built-in raft store, and this field will be empty.", - "nullable": true, - "type": "string" - }, - "containerd_commit": { - "allOf": [ - { - "$ref": "#/components/schemas/Commit" - } - ], - "nullable": true - }, - "containers": { - "description": "Total number of containers on the host.", - "format": "int64", - "nullable": true, - "type": "integer" - }, - "containers_paused": { - "description": "Number of containers with status `\\\"paused\\\"`.", - "format": "int64", - "nullable": true, - "type": "integer" - }, - "containers_running": { - "description": "Number of containers with status `\\\"running\\\"`.", - "format": "int64", - "nullable": true, - "type": "integer" - }, - "containers_stopped": { - "description": "Number of containers with status `\\\"stopped\\\"`.", - "format": "int64", - "nullable": true, - "type": "integer" - }, - "cpu_cfs_period": { - "description": "Indicates if CPU CFS(Completely Fair Scheduler) period is supported by the host.", - "nullable": true, - "type": "boolean" - }, - "cpu_cfs_quota": { - "description": "Indicates if CPU CFS(Completely Fair Scheduler) quota is supported by the host.", - "nullable": true, - "type": "boolean" - }, - "cpu_set": { - "description": "Indicates if CPUsets (cpuset.cpus, cpuset.mems) are supported by the host. See [cpuset(7)](https://www.kernel.org/doc/Documentation/cgroup-v1/cpusets.txt)", - "nullable": true, - "type": "boolean" - }, - "cpu_shares": { - "description": "Indicates if CPU Shares limiting is supported by the host.", - "nullable": true, - "type": "boolean" - }, - "debug": { - "description": "Indicates if the daemon is running in debug-mode / with debug-level logging enabled.", - "nullable": true, - "type": "boolean" - }, - "default_address_pools": { - "description": "List of custom default address pools for local networks, which can be specified in the daemon.json file or dockerd option. Example: a Base \\\"10.10.0.0/16\\\" with Size 24 will define the set of 256 10.10.[0-255].0/24 address pools.", - "items": { - "$ref": "#/components/schemas/SystemInfoDefaultAddressPools" - }, - "type": "array" - }, - "default_runtime": { - "description": "Name of the default OCI runtime that is used when starting containers. The default can be overridden per-container at create time.", - "nullable": true, - "type": "string" - }, - "docker_root_dir": { - "description": "Root directory of persistent Docker state. Defaults to `/var/lib/docker` on Linux, and `C:\\\\ProgramData\\\\docker` on Windows.", - "nullable": true, - "type": "string" - }, - "driver": { - "description": "Name of the storage driver in use.", - "nullable": true, - "type": "string" - }, - "driver_status": { - "description": "Information specific to the storage driver, provided as \\\"label\\\" / \\\"value\\\" pairs. This information is provided by the storage driver, and formatted in a way consistent with the output of `docker info` on the command line.\n\n**Note**: The information returned in this field, including the formatting of values and labels, should not be considered stable, and may change without notice.", - "items": { - "items": { - "type": "string" - }, - "type": "array" - }, - "type": "array" - }, - "experimental_build": { - "description": "Indicates if experimental features are enabled on the daemon.", - "nullable": true, - "type": "boolean" - }, - "http_proxy": { - "description": "HTTP-proxy configured for the daemon. This value is obtained from the [`HTTP_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL are masked in the API response. Containers do not automatically inherit this configuration.", - "nullable": true, - "type": "string" - }, - "https_proxy": { - "description": "HTTPS-proxy configured for the daemon. This value is obtained from the [`HTTPS_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. Credentials ([user info component](https://tools.ietf.org/html/rfc3986#section-3.2.1)) in the proxy URL are masked in the API response. Containers do not automatically inherit this configuration.", - "nullable": true, - "type": "string" - }, - "id": { - "description": "Unique identifier of the daemon.\n\n**Note**: The format of the ID itself is not part of the API, and should not be considered stable.", - "nullable": true, - "type": "string" - }, - "images": { - "description": "Total number of images on the host. Both _tagged_ and _untagged_ (dangling) images are counted.", - "format": "int64", - "nullable": true, - "type": "integer" - }, - "index_server_address": { - "description": "Address / URL of the index server that is used for image search, and as a default for user authentication for Docker Hub and Docker Cloud.", - "nullable": true, - "type": "string" - }, - "init_binary": { - "description": "Name and, optional, path of the `docker-init` binary. If the path is omitted, the daemon searches the host's `$PATH` for the binary and uses the first result.", - "nullable": true, - "type": "string" - }, - "init_commit": { - "allOf": [ - { - "$ref": "#/components/schemas/Commit" - } - ], - "nullable": true - }, - "ipv4_forwarding": { - "description": "Indicates IPv4 forwarding is enabled.", - "nullable": true, - "type": "boolean" - }, - "isolation": { - "allOf": [ - { - "$ref": "#/components/schemas/SystemInfoIsolationEnum" - } - ], - "description": "Represents the isolation technology to use as a default for containers. The supported values are platform-specific. If no isolation value is specified on daemon start, on Windows client, the default is `hyperv`, and on Windows server, the default is `process`. This option is currently not used on other platforms.", - "nullable": true - }, - "kernel_memory": { - "description": "Indicates if the host has kernel memory limit support enabled.\n\n**Deprecated**: This field is deprecated as the kernel 5.4 deprecated `kmem.limit_in_bytes`.", - "nullable": true, - "type": "boolean" - }, - "kernel_memory_tcp": { - "description": "Indicates if the host has kernel memory TCP limit support enabled. Kernel memory TCP limits are not supported when using cgroups v2, which does not support the corresponding `memory.kmem.tcp.limit_in_bytes` cgroup.", - "nullable": true, - "type": "boolean" - }, - "kernel_version": { - "description": "Kernel version of the host. On Linux, this information obtained from `uname`. On Windows this information is queried from the HKEY_LOCAL_MACHINE\\\\\\\\SOFTWARE\\\\\\\\Microsoft\\\\\\\\Windows NT\\\\\\\\CurrentVersion\\\\\\\\ registry value, for example _\\\"10.0 14393 (14393.1198.amd64fre.rs1_release_sec.170427-1353)\\\"_.", - "nullable": true, - "type": "string" - }, - "labels": { - "description": "User-defined labels (key/value metadata) as set on the daemon.\n\n**Note**: When part of a Swarm, nodes can both have _daemon_ labels, set through the daemon configuration, and _node_ labels, set from a manager node in the Swarm. Node labels are not included in this field. Node labels can be retrieved using the `/nodes/(id)` endpoint on a manager node in the Swarm.", - "items": { - "type": "string" - }, - "type": "array" - }, - "live_restore_enabled": { - "description": "Indicates if live restore is enabled. If enabled, containers are kept running when the daemon is shutdown or upon daemon start if running containers are detected.", - "nullable": true, - "type": "boolean" - }, - "logging_driver": { - "description": "The logging driver to use as a default for new containers.", - "nullable": true, - "type": "string" - }, - "mem_total": { - "description": "Total amount of physical memory available on the host, in bytes.", - "format": "int64", - "nullable": true, - "type": "integer" - }, - "memory_limit": { - "description": "Indicates if the host has memory limit support enabled.", - "nullable": true, - "type": "boolean" - }, - "n_events_listener": { - "description": "Number of event listeners subscribed.", - "format": "int64", - "nullable": true, - "type": "integer" - }, - "n_fd": { - "description": "The total number of file Descriptors in use by the daemon process. This information is only returned if debug-mode is enabled.", - "format": "int64", - "nullable": true, - "type": "integer" - }, - "name": { - "description": "Hostname of the host.", - "nullable": true, - "type": "string" - }, - "ncpu": { - "description": "The number of logical CPUs usable by the daemon. The number of available CPUs is checked by querying the operating system when the daemon starts. Changes to operating system CPU allocation after the daemon is started are not reflected.", - "format": "int64", - "nullable": true, - "type": "integer" - }, - "no_proxy": { - "description": "Comma-separated list of domain extensions for which no proxy should be used. This value is obtained from the [`NO_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. Containers do not automatically inherit this configuration.", - "nullable": true, - "type": "string" - }, - "oom_kill_disable": { - "description": "Indicates if OOM killer disable is supported on the host.", - "nullable": true, - "type": "boolean" - }, - "operating_system": { - "description": "Name of the host's operating system, for example: \\\"Ubuntu 16.04.2 LTS\\\" or \\\"Windows Server 2016 Datacenter\\\"", - "nullable": true, - "type": "string" - }, - "os_type": { - "description": "Generic type of the operating system of the host, as returned by the Go runtime (`GOOS`). Currently returned values are \\\"linux\\\" and \\\"windows\\\". A full list of possible values can be found in the [Go documentation](https://golang.org/doc/install/source#environment).", - "nullable": true, - "type": "string" - }, - "os_version": { - "description": "Version of the host's operating system\n\n**Note**: The information returned in this field, including its very existence, and the formatting of values, should not be considered stable, and may change without notice.", - "nullable": true, - "type": "string" - }, - "pids_limit": { - "description": "Indicates if the host kernel has PID limit support enabled.", - "nullable": true, - "type": "boolean" - }, - "plugins": { - "allOf": [ - { - "$ref": "#/components/schemas/PluginsInfo" - } - ], - "nullable": true - }, - "product_license": { - "description": "Reports a summary of the product license on the daemon. If a commercial license has been applied to the daemon, information such as number of nodes, and expiration are included.", - "nullable": true, - "type": "string" - }, - "registry_config": { - "allOf": [ - { - "$ref": "#/components/schemas/RegistryServiceConfig" - } - ], - "nullable": true - }, - "runc_commit": { - "allOf": [ - { - "$ref": "#/components/schemas/Commit" - } - ], - "nullable": true - }, - "runtimes": { - "additionalProperties": { - "$ref": "#/components/schemas/Runtime" - }, - "type": "object" - }, - "security_options": { - "description": "List of security features that are enabled on the daemon, such as apparmor, seccomp, SELinux, user-namespaces (userns), and rootless. Additional configuration options for each security feature may be present, and are included as a comma-separated list of key/value pairs.", - "items": { - "type": "string" - }, - "type": "array" - }, - "server_version": { - "description": "Version string of the daemon. **Note**: the [standalone Swarm API](https://docs.docker.com/swarm/swarm-api/) returns the Swarm version instead of the daemon version, for example `swarm/1.2.8`.", - "nullable": true, - "type": "string" - }, - "swap_limit": { - "description": "Indicates if the host has memory swap limit support enabled.", - "nullable": true, - "type": "boolean" - }, - "system_time": { - "description": "The number of goroutines that currently exist. This information is only returned if debug-mode is enabled.", - "nullable": true, - "type": "string" - }, - "warnings": { - "description": "List of warnings / informational messages about missing features, or issues related to the daemon configuration. These messages can be printed by the client as information to the user.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, "EmailAuthenticationForm": { "description": "The body of the form for email authentication.", "properties": { @@ -5548,60 +2625,6 @@ ], "type": "object" }, - "EngineMetadata": { - "description": "Metadata about our currently running server.\n\nThis is mostly used for internal purposes and debugging.", - "properties": { - "async_jobs_running": { - "description": "If any async job is currently running.", - "type": "boolean" - }, - "cache": { - "allOf": [ - { - "$ref": "#/components/schemas/CacheMetadata" - } - ], - "description": "Metadata about our cache." - }, - "environment": { - "allOf": [ - { - "$ref": "#/components/schemas/Environment" - } - ], - "description": "The environment we are running in." - }, - "fs": { - "allOf": [ - { - "$ref": "#/components/schemas/FileSystemMetadata" - } - ], - "description": "Metadata about our file system." - }, - "git_hash": { - "description": "The git hash of the server.", - "type": "string" - }, - "pubsub": { - "allOf": [ - { - "$ref": "#/components/schemas/Connection" - } - ], - "description": "Metadata about our pub-sub connection." - } - }, - "required": [ - "async_jobs_running", - "cache", - "environment", - "fs", - "git_hash", - "pubsub" - ], - "type": "object" - }, "EntityGetAllChildUuids": { "description": "The response from the `EntityGetAllChildUuids` command.", "properties": { @@ -5753,6 +2776,20 @@ ], "type": "string" }, + { + "description": "Client sent invalid BSON.", + "enum": [ + "invalid_bson" + ], + "type": "string" + }, + { + "description": "Client sent a message which is not accepted over this protocol.", + "enum": [ + "wrong_protocol" + ], + "type": "string" + }, { "description": "Problem sending data between client and KittyCAD API.", "enum": [ @@ -5776,37 +2813,6 @@ } ] }, - "ExecutorMetadata": { - "description": "Metadata about our currently running server.\n\nThis is mostly used for internal purposes and debugging.", - "properties": { - "docker_info": { - "allOf": [ - { - "$ref": "#/components/schemas/DockerSystemInfo" - } - ], - "description": "Information about the docker daemon." - }, - "environment": { - "allOf": [ - { - "$ref": "#/components/schemas/Environment" - } - ], - "description": "The environment we are running in." - }, - "git_hash": { - "description": "The git hash of the server.", - "type": "string" - } - }, - "required": [ - "docker_info", - "environment", - "git_hash" - ], - "type": "object" - }, "Export": { "description": "The response from the `Export` endpoint.", "properties": { @@ -6866,32 +3872,41 @@ ], "type": "string" }, - "IndexInfo": { - "description": "IndexInfo contains information about a registry.", + "ImportFile": { + "description": "File to import into the current model", "properties": { - "mirrors": { - "description": "List of mirrors, expressed as URIs.", + "data": { + "description": "The raw bytes of the file", "items": { - "type": "string" + "format": "uint8", + "minimum": 0, + "type": "integer" }, "type": "array" }, - "name": { - "description": "Name of the registry, such as \\\"docker.io\\\".", - "nullable": true, + "path": { + "description": "The file's full path, including file extension.", "type": "string" - }, - "official": { - "description": "Indicates whether this is an official registry (i.e., Docker Hub / docker.io)", - "nullable": true, - "type": "boolean" - }, - "secure": { - "description": "Indicates if the registry is part of the list of insecure registries. If `false`, the registry is insecure. Insecure registries accept un-encrypted (HTTP) and/or untrusted (HTTPS with certificates from unknown CAs) communication.\n\n**Warning**: Insecure registries can be useful when running a local registry. However, because its use creates security vulnerabilities it should ONLY be enabled for testing purposes. For increased security, users should add their CA to their system's list of trusted CAs instead of enabling this option.", - "nullable": true, - "type": "boolean" } }, + "required": [ + "data", + "path" + ], + "type": "object" + }, + "ImportFiles": { + "description": "Data from importing the files", + "properties": { + "object_id": { + "description": "ID of the imported 3D models within the scene.", + "format": "uuid", + "type": "string" + } + }, + "required": [ + "object_id" + ], "type": "object" }, "InputFormat": { @@ -6950,7 +3965,7 @@ "$ref": "#/components/schemas/UnitLength" } ], - "description": "The units of the input data. This is very important for correct scaling and when calculating physics properties like mass, etc." + "description": "The units of the input data. This is very important for correct scaling and when calculating physics properties like mass, etc.\n\nDefaults to meters." } }, "required": [ @@ -7495,6 +4510,29 @@ }, "type": "object" }, + "Mass": { + "description": "The mass response.", + "properties": { + "mass": { + "description": "The mass.", + "format": "double", + "type": "number" + }, + "output_unit": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitMass" + } + ], + "description": "The output unit for the mass." + } + }, + "required": [ + "mass", + "output_unit" + ], + "type": "object" + }, "Mesh": { "properties": { "mesh": { @@ -7539,14 +4577,6 @@ ], "description": "Metadata about our cache." }, - "engine": { - "allOf": [ - { - "$ref": "#/components/schemas/EngineMetadata" - } - ], - "description": "Metadata about our engine API connection." - }, "environment": { "allOf": [ { @@ -7555,14 +4585,6 @@ ], "description": "The environment we are running in." }, - "executor": { - "allOf": [ - { - "$ref": "#/components/schemas/ExecutorMetadata" - } - ], - "description": "Metadata about our executor API connection." - }, "fs": { "allOf": [ { @@ -7594,9 +4616,7 @@ }, "required": [ "cache", - "engine", "environment", - "executor", "fs", "git_hash", "point_e", @@ -8080,6 +5100,14 @@ ], "description": "The file format to export to." }, + "source_unit": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitLength" + } + ], + "description": "Select the unit interpretation of exported objects.\n\nThis is not the same as the export units. Setting export units is part of the format options." + }, "type": { "enum": [ "export" @@ -8090,6 +5118,7 @@ "required": [ "entity_ids", "format", + "source_unit", "type" ], "type": "object" @@ -8790,7 +5819,7 @@ }, "size": { "description": "What should the plane's span/extent? When rendered visually, this is both the width and height along X and Y axis respectively.", - "format": "float", + "format": "double", "type": "number" }, "type": { @@ -9093,6 +6122,36 @@ ], "type": "object" }, + { + "description": "Get curves for vertices within a path", + "properties": { + "path_id": { + "description": "Which path to query", + "format": "uuid", + "type": "string" + }, + "type": { + "enum": [ + "path_get_curve_uuids_for_vertices" + ], + "type": "string" + }, + "vertex_ids": { + "description": "IDs of the vertices for which to obtain curve ids from", + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "path_id", + "type", + "vertex_ids" + ], + "type": "object" + }, { "description": "Start dragging mouse.", "properties": { @@ -9196,6 +6255,356 @@ "type" ], "type": "object" + }, + { + "description": "Utility method. Performs both a ray cast and projection to plane-local coordinates. Returns the plane coordinates for the given window coordinates.", + "properties": { + "plane_id": { + "description": "The plane you're intersecting against.", + "format": "uuid", + "type": "string" + }, + "type": { + "enum": [ + "plane_intersect_and_project" + ], + "type": "string" + }, + "window": { + "allOf": [ + { + "$ref": "#/components/schemas/Point2d" + } + ], + "description": "Window coordinates where the ray cast should be aimed." + } + }, + "required": [ + "plane_id", + "type", + "window" + ], + "type": "object" + }, + { + "description": "Find the start and end of a curve.", + "properties": { + "curve_id": { + "description": "ID of the curve being queried.", + "format": "uuid", + "type": "string" + }, + "type": { + "enum": [ + "curve_get_end_points" + ], + "type": "string" + } + }, + "required": [ + "curve_id", + "type" + ], + "type": "object" + }, + { + "description": "Reconfigure the stream.", + "properties": { + "fps": { + "description": "Frames per second.", + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "height": { + "description": "Height of the stream.", + "format": "uint32", + "minimum": 0, + "type": "integer" + }, + "type": { + "enum": [ + "reconfigure_stream" + ], + "type": "string" + }, + "width": { + "description": "Width of the stream.", + "format": "uint32", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "fps", + "height", + "type", + "width" + ], + "type": "object" + }, + { + "description": "Import files to the current model.", + "properties": { + "files": { + "description": "Files to import", + "items": { + "$ref": "#/components/schemas/ImportFile" + }, + "type": "array" + }, + "type": { + "enum": [ + "import_files" + ], + "type": "string" + } + }, + "required": [ + "files", + "type" + ], + "type": "object" + }, + { + "description": "Get the mass of entities in the scene or the default scene.", + "properties": { + "entity_ids": { + "description": "IDs of the entities to get the mass of. If this is empty, then the default scene is included in the mass.", + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + }, + "material_density": { + "description": "The material density.", + "format": "double", + "type": "number" + }, + "material_density_unit": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitDensity" + } + ], + "description": "The material density unit." + }, + "output_unit": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitMass" + } + ], + "description": "The output unit for the mass." + }, + "source_unit": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitLength" + } + ], + "description": "Select the unit interpretation of distances in the scene." + }, + "type": { + "enum": [ + "mass" + ], + "type": "string" + } + }, + "required": [ + "entity_ids", + "material_density", + "material_density_unit", + "output_unit", + "source_unit", + "type" + ], + "type": "object" + }, + { + "description": "Get the density of entities in the scene or the default scene.", + "properties": { + "entity_ids": { + "description": "IDs of the entities to get the density of. If this is empty, then the default scene is included in the density.", + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + }, + "material_mass": { + "description": "The material mass.", + "format": "double", + "type": "number" + }, + "material_mass_unit": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitMass" + } + ], + "description": "The material mass unit." + }, + "output_unit": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitDensity" + } + ], + "description": "The output unit for the density." + }, + "source_unit": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitLength" + } + ], + "description": "Select the unit interpretation of distances in the scene." + }, + "type": { + "enum": [ + "density" + ], + "type": "string" + } + }, + "required": [ + "entity_ids", + "material_mass", + "material_mass_unit", + "output_unit", + "source_unit", + "type" + ], + "type": "object" + }, + { + "description": "Get the volume of entities in the scene or the default scene.", + "properties": { + "entity_ids": { + "description": "IDs of the entities to get the volume of. If this is empty, then the default scene is included in the volume.", + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + }, + "output_unit": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitVolume" + } + ], + "description": "The output unit for the volume." + }, + "source_unit": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitLength" + } + ], + "description": "Select the unit interpretation of distances in the scene." + }, + "type": { + "enum": [ + "volume" + ], + "type": "string" + } + }, + "required": [ + "entity_ids", + "output_unit", + "source_unit", + "type" + ], + "type": "object" + }, + { + "description": "Get the center of mass of entities in the scene or the default scene.", + "properties": { + "entity_ids": { + "description": "IDs of the entities to get the center of mass of. If this is empty, then the default scene is included in the center of mass.", + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + }, + "output_unit": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitLength" + } + ], + "description": "The output unit for the center of mass." + }, + "source_unit": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitLength" + } + ], + "description": "Select the unit interpretation of distances in the scene." + }, + "type": { + "enum": [ + "center_of_mass" + ], + "type": "string" + } + }, + "required": [ + "entity_ids", + "output_unit", + "source_unit", + "type" + ], + "type": "object" + }, + { + "description": "Get the surface area of entities in the scene or the default scene.", + "properties": { + "entity_ids": { + "description": "IDs of the entities to get the surface area of. If this is empty, then the default scene is included in the surface area.", + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + }, + "output_unit": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitArea" + } + ], + "description": "The output unit for the surface area." + }, + "source_unit": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitLength" + } + ], + "description": "Select the unit interpretation of distances in the scene." + }, + "type": { + "enum": [ + "surface_area" + ], + "type": "string" + } + }, + "required": [ + "entity_ids", + "output_unit", + "source_unit", + "type" + ], + "type": "object" } ] }, @@ -9204,149 +6613,6 @@ "format": "uuid", "type": "string" }, - "ModelingCmdReq": { - "description": "A graphics command submitted to the KittyCAD engine via the Modeling API.", - "properties": { - "cmd": { - "allOf": [ - { - "$ref": "#/components/schemas/ModelingCmd" - } - ], - "description": "Which command to submit to the Kittycad engine." - }, - "cmd_id": { - "allOf": [ - { - "$ref": "#/components/schemas/ModelingCmdId" - } - ], - "description": "ID of command being submitted." - } - }, - "required": [ - "cmd", - "cmd_id" - ], - "type": "object" - }, - "ModelingCmdReqBatch": { - "description": "A batch set of graphics commands submitted to the KittyCAD engine via the Modeling API.", - "properties": { - "cmds": { - "additionalProperties": { - "$ref": "#/components/schemas/ModelingCmdReq" - }, - "type": "object" - } - }, - "required": [ - "cmds" - ], - "type": "object" - }, - "ModelingError": { - "description": "Why a command submitted to the Modeling API failed.", - "properties": { - "error_code": { - "description": "A string error code which refers to a family of errors. E.g. \"InvalidInput\".", - "type": "string" - }, - "external_message": { - "description": "Describe the specific error which occurred. Will be shown to users, not logged.", - "type": "string" - }, - "internal_message": { - "description": "Describe the specific error which occurred. Will be logged, not shown to users.", - "type": "string" - }, - "status_code": { - "description": "A HTTP status code.", - "format": "uint16", - "minimum": 0, - "type": "integer" - } - }, - "required": [ - "error_code", - "external_message", - "internal_message", - "status_code" - ], - "type": "object" - }, - "ModelingOutcome": { - "description": "The result from one modeling command in a batch.", - "oneOf": [ - { - "additionalProperties": false, - "description": "Each successful command has some result.", - "properties": { - "success": { - "$ref": "#/components/schemas/OkModelingCmdResponse" - } - }, - "required": [ - "success" - ], - "type": "object" - }, - { - "additionalProperties": false, - "description": "It failed. Why? See 'struct Error' above.", - "properties": { - "error": { - "$ref": "#/components/schemas/ModelingError" - } - }, - "required": [ - "error" - ], - "type": "object" - }, - { - "additionalProperties": false, - "description": "Cancelled because it required the output of a previous command, which failed.", - "properties": { - "cancelled": { - "properties": { - "what_failed": { - "allOf": [ - { - "$ref": "#/components/schemas/ModelingCmdId" - } - ], - "description": "The ID of the command that failed, cancelling this command." - } - }, - "required": [ - "what_failed" - ], - "type": "object" - } - }, - "required": [ - "cancelled" - ], - "type": "object" - } - ] - }, - "ModelingOutcomes": { - "description": "The result from a batch of modeling commands.", - "properties": { - "outcomes": { - "additionalProperties": { - "$ref": "#/components/schemas/ModelingOutcome" - }, - "type": "object" - } - }, - "required": [ - "outcomes" - ], - "type": "object" - }, "MouseClick": { "description": "The response from the `MouseClick` command.", "properties": { @@ -9823,6 +7089,177 @@ "type" ], "type": "object" + }, + { + "description": "The response from the `Path Get Curve UUIDs for Vertices` command.", + "properties": { + "data": { + "$ref": "#/components/schemas/PathGetCurveUuidsForVertices" + }, + "type": { + "enum": [ + "path_get_curve_uuids_for_vertices" + ], + "type": "string" + } + }, + "required": [ + "data", + "type" + ], + "type": "object" + }, + { + "description": "The response from the `PlaneIntersectAndProject` command.", + "properties": { + "data": { + "$ref": "#/components/schemas/PlaneIntersectAndProject" + }, + "type": { + "enum": [ + "plane_intersect_and_project" + ], + "type": "string" + } + }, + "required": [ + "data", + "type" + ], + "type": "object" + }, + { + "description": "The response from the `CurveGetEndPoints` command.", + "properties": { + "data": { + "$ref": "#/components/schemas/CurveGetEndPoints" + }, + "type": { + "enum": [ + "curve_get_end_points" + ], + "type": "string" + } + }, + "required": [ + "data", + "type" + ], + "type": "object" + }, + { + "description": "The response from the `ImportFiles` command.", + "properties": { + "data": { + "$ref": "#/components/schemas/ImportFiles" + }, + "type": { + "enum": [ + "import_files" + ], + "type": "string" + } + }, + "required": [ + "data", + "type" + ], + "type": "object" + }, + { + "description": "The response from the `Mass` command.", + "properties": { + "data": { + "$ref": "#/components/schemas/Mass" + }, + "type": { + "enum": [ + "mass" + ], + "type": "string" + } + }, + "required": [ + "data", + "type" + ], + "type": "object" + }, + { + "description": "The response from the `Volume` command.", + "properties": { + "data": { + "$ref": "#/components/schemas/Volume" + }, + "type": { + "enum": [ + "volume" + ], + "type": "string" + } + }, + "required": [ + "data", + "type" + ], + "type": "object" + }, + { + "description": "The response from the `Density` command.", + "properties": { + "data": { + "$ref": "#/components/schemas/Density" + }, + "type": { + "enum": [ + "density" + ], + "type": "string" + } + }, + "required": [ + "data", + "type" + ], + "type": "object" + }, + { + "description": "The response from the `SurfaceArea` command.", + "properties": { + "data": { + "$ref": "#/components/schemas/SurfaceArea" + }, + "type": { + "enum": [ + "surface_area" + ], + "type": "string" + } + }, + "required": [ + "data", + "type" + ], + "type": "object" + }, + { + "description": "The response from the `CenterOfMass` command.", + "properties": { + "data": { + "$ref": "#/components/schemas/CenterOfMass" + }, + "type": { + "enum": [ + "center_of_mass" + ], + "type": "string" + } + }, + "required": [ + "data", + "type" + ], + "type": "object" } ] }, @@ -9986,6 +7423,25 @@ "type" ], "type": "object" + }, + { + "description": "Request a collection of metrics, to include WebRTC.", + "properties": { + "data": { + "type": "object" + }, + "type": { + "enum": [ + "metrics_request" + ], + "type": "string" + } + }, + "required": [ + "data", + "type" + ], + "type": "object" } ] }, @@ -10099,11 +7555,20 @@ "obj" ], "type": "string" + }, + "units": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitLength" + } + ], + "description": "Export length unit.\n\nDefaults to meters." } }, "required": [ "coords", - "type" + "type", + "units" ], "type": "object" }, @@ -10188,12 +7653,21 @@ "stl" ], "type": "string" + }, + "units": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitLength" + } + ], + "description": "Export length unit.\n\nDefaults to meters." } }, "required": [ "coords", "storage", - "type" + "type", + "units" ], "type": "object" } @@ -10210,6 +7684,23 @@ ], "type": "string" }, + "PathGetCurveUuidsForVertices": { + "description": "The response from the `PathGetCurveUuidsForVertices` command.", + "properties": { + "curve_ids": { + "description": "The UUIDs of the curve entities.", + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "curve_ids" + ], + "type": "object" + }, "PathGetInfo": { "description": "The response from the `PathGetInfo` command.", "properties": { @@ -10240,6 +7731,10 @@ ], "description": "End point of the line." }, + "relative": { + "description": "Whether or not this line is a relative offset", + "type": "boolean" + }, "type": { "enum": [ "line" @@ -10249,6 +7744,7 @@ }, "required": [ "end", + "relative", "type" ], "type": "object" @@ -10258,12 +7754,12 @@ "properties": { "angle_end": { "description": "Start of the arc along circle's perimeter.", - "format": "float", + "format": "double", "type": "number" }, "angle_start": { "description": "Start of the arc along circle's perimeter.", - "format": "float", + "format": "double", "type": "number" }, "center": { @@ -10276,9 +7772,13 @@ }, "radius": { "description": "Radius of the circle", - "format": "float", + "format": "double", "type": "number" }, + "relative": { + "description": "Whether or not this arc is a relative offset", + "type": "boolean" + }, "type": { "enum": [ "arc" @@ -10291,6 +7791,7 @@ "angle_start", "center", "radius", + "relative", "type" ], "type": "object" @@ -10322,6 +7823,10 @@ ], "description": "Final control point." }, + "relative": { + "description": "Whether or not this bezier is a relative offset", + "type": "boolean" + }, "type": { "enum": [ "bezier" @@ -10333,6 +7838,70 @@ "control1", "control2", "end", + "relative", + "type" + ], + "type": "object" + }, + { + "description": "Adds a tangent arc from current pen position with the given radius and angle.", + "properties": { + "offset": { + "allOf": [ + { + "$ref": "#/components/schemas/Angle" + } + ], + "description": "Offset of the arc." + }, + "radius": { + "description": "Radius of the arc. Not to be confused with Raiders of the Lost Ark.", + "format": "double", + "type": "number" + }, + "type": { + "enum": [ + "tangential_arc" + ], + "type": "string" + } + }, + "required": [ + "offset", + "radius", + "type" + ], + "type": "object" + }, + { + "description": "Adds a tangent arc from current pen position to the new position.", + "properties": { + "angle_snap_increment": { + "allOf": [ + { + "$ref": "#/components/schemas/Angle" + } + ], + "description": "0 will be interpreted as none/null.", + "nullable": true + }, + "to": { + "allOf": [ + { + "$ref": "#/components/schemas/Point3d" + } + ], + "description": "Where the arc should end. Must lie in the same plane as the current path pen position. Must not be colinear with current path pen position." + }, + "type": { + "enum": [ + "tangential_arc_to" + ], + "type": "string" + } + }, + "required": [ + "to", "type" ], "type": "object" @@ -10358,10 +7927,15 @@ ], "description": "Which command created this path? This field is absent if the path command is not actually creating a path segment, e.g. moving the pen doesn't create a path segment.", "nullable": true + }, + "relative": { + "description": "Whether or not this segment is a relative offset", + "type": "boolean" } }, "required": [ - "command" + "command", + "relative" ], "type": "object" }, @@ -10461,36 +8035,17 @@ } ] }, - "PluginsInfo": { - "description": "Available plugins per type.\n\n**Note**: Only unmanaged (V1) plugins are included in this list. V1 plugins are \\\"lazily\\\" loaded, and are not returned in this list if there is no resource using the plugin.", + "PlaneIntersectAndProject": { + "description": "Corresponding coordinates of given window coordinates, intersected on given plane.", "properties": { - "authorization": { - "description": "Names of available authorization plugins.", - "items": { - "type": "string" - }, - "type": "array" - }, - "log": { - "description": "Names of available logging-drivers, and logging-driver plugins.", - "items": { - "type": "string" - }, - "type": "array" - }, - "network": { - "description": "Names of available network-drivers, and network-driver plugins.", - "items": { - "type": "string" - }, - "type": "array" - }, - "volume": { - "description": "Names of available volume-drivers, and network-driver plugins.", - "items": { - "type": "string" - }, - "type": "array" + "plane_coordinates": { + "allOf": [ + { + "$ref": "#/components/schemas/Point2d" + } + ], + "description": "Corresponding coordinates of given window coordinates, intersected on given plane.", + "nullable": true } }, "type": "object" @@ -10525,11 +8080,11 @@ "description": "A point in 2D space", "properties": { "x": { - "format": "float", + "format": "double", "type": "number" }, "y": { - "format": "float", + "format": "double", "type": "number" } }, @@ -10611,46 +8166,6 @@ ], "type": "object" }, - "RegistryServiceConfig": { - "description": "RegistryServiceConfig stores daemon registry services configuration.", - "properties": { - "allow_nondistributable_artifacts_cid_rs": { - "description": "List of IP ranges to which nondistributable artifacts can be pushed, using the CIDR syntax [RFC 4632](https://tools.ietf.org/html/4632). Some images (for example, Windows base images) contain artifacts whose distribution is restricted by license. When these images are pushed to a registry, restricted artifacts are not included. This configuration override this behavior, and enables the daemon to push nondistributable artifacts to all registries whose resolved IP address is within the subnet described by the CIDR syntax. This option is useful when pushing images containing nondistributable artifacts to a registry on an air-gapped network so hosts on that network can pull the images without connecting to another server.\n\n**Warning**: Nondistributable artifacts typically have restrictions on how and where they can be distributed and shared. Only use this feature to push artifacts to private registries and ensure that you are in compliance with any terms that cover redistributing nondistributable artifacts.", - "items": { - "type": "string" - }, - "type": "array" - }, - "allow_nondistributable_artifacts_hostnames": { - "description": "List of registry hostnames to which nondistributable artifacts can be pushed, using the format `[:]` or `[:]`. Some images (for example, Windows base images) contain artifacts whose distribution is restricted by license. When these images are pushed to a registry, restricted artifacts are not included. This configuration override this behavior for the specified registries. This option is useful when pushing images containing nondistributable artifacts to a registry on an air-gapped network so hosts on that network can pull the images without connecting to another server.\n\n**Warning**: Nondistributable artifacts typically have restrictions on how and where they can be distributed and shared. Only use this feature to push artifacts to private registries and ensure that you are in compliance with any terms that cover redistributing nondistributable artifacts.", - "items": { - "type": "string" - }, - "type": "array" - }, - "index_configs": { - "additionalProperties": { - "$ref": "#/components/schemas/IndexInfo" - }, - "type": "object" - }, - "insecure_registry_cid_rs": { - "description": "List of IP ranges of insecure registries, using the CIDR syntax ([RFC 4632](https://tools.ietf.org/html/4632)). Insecure registries accept un-encrypted (HTTP) and/or untrusted (HTTPS with certificates from unknown CAs) communication. By default, local registries (`127.0.0.0/8`) are configured as insecure. All other registries are secure. Communicating with an insecure registry is not possible if the daemon assumes that registry is secure. This configuration override this behavior, insecure communication with registries whose resolved IP address is within the subnet described by the CIDR syntax. Registries can also be marked insecure by hostname. Those registries are listed under `IndexConfigs` and have their `Secure` field set to `false`.\n\n**Warning**: Using this option can be useful when running a local registry, but introduces security vulnerabilities. This option should therefore ONLY be used for testing purposes. For increased security, users should add their CA to their system's list of trusted CAs instead of enabling this option.", - "items": { - "type": "string" - }, - "type": "array" - }, - "mirrors": { - "description": "List of registry URLs that act as a mirror for the official (`docker.io`) registry.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, "RtcIceCandidateInit": { "description": "ICECandidateInit is used to serialize ice candidates", "properties": { @@ -10743,24 +8258,6 @@ ], "type": "object" }, - "Runtime": { - "description": "Runtime describes an [OCI compliant](https://github.com/opencontainers/runtime-spec) runtime. The runtime is invoked by the daemon via the `containerd` daemon. OCI runtimes act as an interface to the Linux kernel namespaces, cgroups, and SELinux.", - "properties": { - "path": { - "description": "Name and, optional, path, of the OCI executable binary. If the path is omitted, the daemon searches the host's `$PATH` for the binary and uses the first result.", - "nullable": true, - "type": "string" - }, - "runtime_args": { - "description": "List of command-line arguments to pass to the runtime when invoked.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, "SceneSelectionType": { "description": "The type of scene selection change", "oneOf": [ @@ -10997,6 +8494,29 @@ ], "type": "object" }, + "SurfaceArea": { + "description": "The surface area response.", + "properties": { + "output_unit": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitArea" + } + ], + "description": "The output unit for the surface area." + }, + "surface_area": { + "description": "The surface area.", + "format": "double", + "type": "number" + } + }, + "required": [ + "output_unit", + "surface_area" + ], + "type": "object" + }, "System": { "description": "Co-ordinate system definition.\n\nThe `up` axis must be orthogonal to the `forward` axis.\n\nSee [cglearn.eu] for background reading.\n\n[cglearn.eu](https://cglearn.eu/pub/computer-graphics/introduction-to-geometry#material-coordinate-systems-1)", "properties": { @@ -11023,48 +8543,6 @@ ], "type": "object" }, - "SystemInfoCgroupDriverEnum": { - "enum": [ - "", - "cgroupfs", - "systemd", - "none" - ], - "type": "string" - }, - "SystemInfoCgroupVersionEnum": { - "enum": [ - "", - "1", - "2" - ], - "type": "string" - }, - "SystemInfoDefaultAddressPools": { - "properties": { - "base": { - "description": "The network address in CIDR format", - "nullable": true, - "type": "string" - }, - "size": { - "description": "The network pool size", - "format": "int64", - "nullable": true, - "type": "integer" - } - }, - "type": "object" - }, - "SystemInfoIsolationEnum": { - "enum": [ - "", - "default", - "hyperv", - "process" - ], - "type": "string" - }, "TakeSnapshot": { "description": "The response from the `TakeSnapshot` command.", "properties": { @@ -11196,14 +8674,14 @@ "description": "The valid types of area units.", "oneOf": [ { - "description": "Square centimetres ", + "description": "Square centimeters ", "enum": [ "cm2" ], "type": "string" }, { - "description": "Square decimetres ", + "description": "Square decimeters ", "enum": [ "dm2" ], @@ -11224,21 +8702,21 @@ "type": "string" }, { - "description": "Square kilometres ", + "description": "Square kilometers ", "enum": [ "km2" ], "type": "string" }, { - "description": "Square metres ", + "description": "Square meters ", "enum": [ "m2" ], "type": "string" }, { - "description": "Square millimetres ", + "description": "Square millimeters ", "enum": [ "mm2" ], @@ -11936,7 +9414,7 @@ "description": "The valid types of length units.", "oneOf": [ { - "description": "Centimetres ", + "description": "Centimeters ", "enum": [ "cm" ], @@ -11957,14 +9435,14 @@ "type": "string" }, { - "description": "Metres ", + "description": "Meters ", "enum": [ "m" ], "type": "string" }, { - "description": "Millimetres ", + "description": "Millimeters ", "enum": [ "mm" ], @@ -12727,7 +10205,7 @@ "description": "The valid types of volume units.", "oneOf": [ { - "description": "Cubic centimetres (cc or cm³) ", + "description": "Cubic centimeters (cc or cm³) ", "enum": [ "cm3" ], @@ -12748,7 +10226,7 @@ "type": "string" }, { - "description": "Cubic metres (m³) ", + "description": "Cubic meters (m³) ", "enum": [ "m3" ], @@ -13056,6 +10534,29 @@ ], "type": "object" }, + "Volume": { + "description": "The volume response.", + "properties": { + "output_unit": { + "allOf": [ + { + "$ref": "#/components/schemas/UnitVolume" + } + ], + "description": "The output unit for the volume." + }, + "volume": { + "description": "The volume.", + "format": "double", + "type": "number" + } + }, + "required": [ + "output_unit", + "volume" + ], + "type": "object" + }, "WebSocketRequest": { "description": "The websocket messages the server receives.", "oneOf": [ @@ -13154,6 +10655,30 @@ "type" ], "type": "object" + }, + { + "description": "The response to a metrics collection request from the server.", + "properties": { + "metrics": { + "allOf": [ + { + "$ref": "#/components/schemas/ClientMetrics" + } + ], + "description": "Collected metrics from the Client's end of the engine connection." + }, + "type": { + "enum": [ + "metrics_response" + ], + "type": "string" + } + }, + "required": [ + "metrics", + "type" + ], + "type": "object" } ] }, @@ -15857,257 +13382,6 @@ ] } }, - "/modeling/cmd": { - "options": { - "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", - "operationId": "options_cmd", - "responses": { - "204": { - "description": "successful operation, no content", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "OPTIONS endpoint.", - "tags": [ - "hidden" - ] - }, - "post": { - "description": "Response depends on which command was submitted, so unfortunately the OpenAPI schema can't generate the right response type.", - "operationId": "cmd", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ModelingCmdReq" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OkModelingCmdResponse" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Submit one modeling operation.", - "tags": [ - "modeling", - "hidden" - ] - } - }, - "/modeling/cmd-batch": { - "options": { - "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", - "operationId": "options_cmd_batch", - "responses": { - "204": { - "description": "successful operation, no content", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "OPTIONS endpoint.", - "tags": [ - "hidden" - ] - }, - "post": { - "operationId": "cmd_batch", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ModelingCmdReqBatch" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ModelingOutcomes" - } - } - }, - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "required": true, - "schema": { - "type": "string" - }, - "style": "simple" - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - }, - "summary": "Submit many modeling operations.", - "tags": [ - "modeling", - "hidden" - ] - } - }, "/oauth2/device/auth": { "options": { "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", @@ -20478,4 +17752,4 @@ "name": "users" } ] -} \ No newline at end of file +}