Update api spec (#145)
* YOYO NEW API SPEC! * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
@ -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)
|
||||
|
@ -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.
|
||||
|
@ -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=\"<string>\",\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=\"<string>\",\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=\"<string>\",\n discord=\"<string>\",\n first_name=\"<string>\",\n github=\"<string>\",\n last_name=\"<string>\",\n phone=\"<string>\",\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(\"<uuid>\"),\n to=Point3d(\n x=3.14,\n y=3.14,\n z=3.14,\n ),\n ),\n cmd_id=ModelingCmdId(\"<uuid>\"),\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=\"<string>\",\n token=\"<string>\",\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=\"<string>\",\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=\"<string>\",\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=\"<string>\",\n phone=\"<string>\",\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=\"<string>\",\n phone=\"<string>\",\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=\"<string>\",\n token=\"<string>\",\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=\"<string>\",\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=\"<string>\",\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 \"<string>\": ModelingCmdReq(\n cmd=move_path_pen(\n path=ModelingCmdId(\"<uuid>\"),\n to=Point3d(\n x=3.14,\n y=3.14,\n z=3.14,\n ),\n ),\n cmd_id=ModelingCmdId(\"<uuid>\"),\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=\"<uuid>\",\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=\"<string>\",\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=\"<uuid>\",\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=\"<string>\",\n discord=\"<string>\",\n first_name=\"<string>\",\n github=\"<string>\",\n last_name=\"<string>\",\n phone=\"<string>\",\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=\"<string>\",\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=\"<string>\",\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=\"<string>\",\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=\"<string>\",\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=\"<string>\",\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=\"<string>\",\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=\"<string>\",\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=\"<string>\",\n phone=\"<string>\",\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=\"<string>\",\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=\"<string>\",\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=\"<string>\",\n phone=\"<string>\",\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"
|
||||
}
|
||||
}
|
||||
]
|
@ -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
|
@ -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
|
@ -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("<uuid>"),
|
||||
to=Point3d(
|
||||
x=3.14,
|
||||
y=3.14,
|
||||
z=3.14,
|
||||
),
|
||||
),
|
||||
cmd_id=ModelingCmdId("<uuid>"),
|
||||
),
|
||||
)
|
||||
|
||||
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("<uuid>"),
|
||||
to=Point3d(
|
||||
x=3.14,
|
||||
y=3.14,
|
||||
z=3.14,
|
||||
),
|
||||
),
|
||||
cmd_id=ModelingCmdId("<uuid>"),
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
# 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("<uuid>"),
|
||||
to=Point3d(
|
||||
x=3.14,
|
||||
y=3.14,
|
||||
z=3.14,
|
||||
),
|
||||
),
|
||||
cmd_id=ModelingCmdId("<uuid>"),
|
||||
),
|
||||
)
|
||||
|
||||
# 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("<uuid>"),
|
||||
to=Point3d(
|
||||
x=3.14,
|
||||
y=3.14,
|
||||
z=3.14,
|
||||
),
|
||||
),
|
||||
cmd_id=ModelingCmdId("<uuid>"),
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
@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={
|
||||
"<string>": ModelingCmdReq(
|
||||
cmd=move_path_pen(
|
||||
path=ModelingCmdId("<uuid>"),
|
||||
to=Point3d(
|
||||
x=3.14,
|
||||
y=3.14,
|
||||
z=3.14,
|
||||
),
|
||||
),
|
||||
cmd_id=ModelingCmdId("<uuid>"),
|
||||
)
|
||||
},
|
||||
),
|
||||
)
|
||||
|
||||
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={
|
||||
"<string>": ModelingCmdReq(
|
||||
cmd=move_path_pen(
|
||||
path=ModelingCmdId("<uuid>"),
|
||||
to=Point3d(
|
||||
x=3.14,
|
||||
y=3.14,
|
||||
z=3.14,
|
||||
),
|
||||
),
|
||||
cmd_id=ModelingCmdId("<uuid>"),
|
||||
)
|
||||
},
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
# 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={
|
||||
"<string>": ModelingCmdReq(
|
||||
cmd=move_path_pen(
|
||||
path=ModelingCmdId("<uuid>"),
|
||||
to=Point3d(
|
||||
x=3.14,
|
||||
y=3.14,
|
||||
z=3.14,
|
||||
),
|
||||
),
|
||||
cmd_id=ModelingCmdId("<uuid>"),
|
||||
)
|
||||
},
|
||||
),
|
||||
)
|
||||
|
||||
# OR run async with more info
|
||||
response: Response[
|
||||
Optional[Union[ModelingOutcomes, Error]]
|
||||
] = await cmd_batch.asyncio_detailed(
|
||||
client=client,
|
||||
body=ModelingCmdReqBatch(
|
||||
cmds={
|
||||
"<string>": ModelingCmdReq(
|
||||
cmd=move_path_pen(
|
||||
path=ModelingCmdId("<uuid>"),
|
||||
to=Point3d(
|
||||
x=3.14,
|
||||
y=3.14,
|
||||
z=3.14,
|
||||
),
|
||||
),
|
||||
cmd_id=ModelingCmdId("<uuid>"),
|
||||
)
|
||||
},
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.skip
|
||||
def test_get_openai_schema():
|
||||
# Create our client.
|
||||
|
@ -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
|
||||
|
69
kittycad/models/angle.py
Normal file
69
kittycad/models/angle.py
Normal file
@ -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
|
@ -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]
|
||||
|
@ -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]
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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]
|
||||
|
@ -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
|
||||
|
||||
|
@ -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]
|
||||
|
@ -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]
|
||||
|
@ -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
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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]
|
||||
|
@ -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]
|
||||
|
@ -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
|
||||
|
||||
|
@ -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]
|
||||
|
@ -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]
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
76
kittycad/models/center_of_mass.py
Normal file
76
kittycad/models/center_of_mass.py
Normal file
@ -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
|
106
kittycad/models/client_metrics.py
Normal file
106
kittycad/models/client_metrics.py
Normal file
@ -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
|
@ -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)
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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 <https://support.stripe.com/questions/which-currencies-does-stripe-support>.
|
||||
""" # 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
|
||||
|
@ -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
|
||||
|
||||
|
75
kittycad/models/curve_get_end_points.py
Normal file
75
kittycad/models/curve_get_end_points.py
Normal file
@ -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
|
@ -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]
|
||||
|
@ -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:
|
||||
|
@ -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]
|
||||
|
@ -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]
|
||||
|
69
kittycad/models/density.py
Normal file
69
kittycad/models/density.py
Normal file
@ -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
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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]
|
||||
|
@ -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
|
@ -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)
|
||||
|
||||
|
@ -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
|
@ -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))
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
@ -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
|
||||
|
||||
|
@ -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]
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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]
|
||||
|
@ -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]
|
||||
|
@ -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]
|
||||
|
@ -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]
|
||||
|
@ -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]
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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]
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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]
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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]:
|
@ -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]:
|
@ -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
|
@ -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]
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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]
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
69
kittycad/models/mass.py
Normal file
69
kittycad/models/mass.py
Normal file
@ -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
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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,
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -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
|
@ -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
|
@ -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
|
@ -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]
|
@ -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
|
@ -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))
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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,
|
||||
]
|
||||
|
@ -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
|
||||
]
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user