Update api spec (#159)
* YOYO NEW API SPEC! * I have generated the latest API! --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
@ -1,42 +1,26 @@
|
||||
[
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1openai~1openapi.json/get/x-python",
|
||||
"path": "/info/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"
|
||||
"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/~1users-extended/get/x-python",
|
||||
"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.users import list_users_extended\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ExtendedUserResultsPage\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_users_extended():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ExtendedUserResultsPage, Error]\n ] = list_users_extended.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: ExtendedUserResultsPage = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.list_users_extended.html"
|
||||
"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/~1apps~1github~1webhook/post/x-python",
|
||||
"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.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/~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"
|
||||
"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"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -63,150 +47,6 @@
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.get_api_token_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/~1apps~1github~1consent/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.apps import apps_github_consent\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AppClientInfo, Error\nfrom kittycad.types import Response\n\n\ndef example_apps_github_consent():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[AppClientInfo, Error]] = apps_github_consent.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: AppClientInfo = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.apps.apps_github_consent.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/~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/~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/~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/~1user~1payment/put/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/~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.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/~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"
|
||||
}
|
||||
},
|
||||
{
|
||||
"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/~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"
|
||||
}
|
||||
},
|
||||
{
|
||||
"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/~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/~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~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"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1file~1mass/post/x-python",
|
||||
@ -217,42 +57,18 @@
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1unit~1conversion~1angle~1{input_unit}~1{output_unit}/get/x-python",
|
||||
"path": "/paths/~1user~1text-to-cad~1{id}/post/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_angle_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitAngleConversion\nfrom kittycad.models.unit_angle import UnitAngle\nfrom kittycad.types import Response\n\n\ndef example_get_angle_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitAngleConversion, Error]\n ] = get_angle_unit_conversion.sync(\n client=client,\n input_unit=UnitAngle.DEGREES,\n output_unit=UnitAngle.DEGREES,\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: UnitAngleConversion = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_angle_unit_conversion.html"
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import create_text_to_cad_model_feedback\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.models.ai_feedback import AiFeedback\nfrom kittycad.types import Response\n\n\ndef example_create_text_to_cad_model_feedback():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = create_text_to_cad_model_feedback.sync(\n client=client,\n id=\"<uuid>\",\n feedback=AiFeedback.THUMBS_UP,\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.ai.create_text_to_cad_model_feedback.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1file~1volume/post/x-python",
|
||||
"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_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/~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/~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/~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"
|
||||
"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"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -265,10 +81,26 @@
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1unit~1conversion~1area~1{input_unit}~1{output_unit}/get/x-python",
|
||||
"path": "/paths/~1_meta~1info/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.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/~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"
|
||||
}
|
||||
},
|
||||
{
|
||||
"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"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -281,10 +113,26 @@
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1file~1execute~1{lang}/post/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.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"
|
||||
"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/~1unit~1conversion~1volume~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_volume_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitVolumeConversion\nfrom kittycad.models.unit_volume import UnitVolume\nfrom kittycad.types import Response\n\n\ndef example_get_volume_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitVolumeConversion, Error]\n ] = get_volume_unit_conversion.sync(\n client=client,\n input_unit=UnitVolume.CM3,\n output_unit=UnitVolume.CM3,\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: UnitVolumeConversion = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_volume_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"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -295,6 +143,78 @@
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_schema.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~1execute~1{lang}/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/~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~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/~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/~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~1text-to-cad/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import list_text_to_cad_models_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, TextToCadResultsPage\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_text_to_cad_models_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[TextToCadResultsPage, Error]\n ] = list_text_to_cad_models_for_user.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: TextToCadResultsPage = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.list_text_to_cad_models_for_user.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1ai~1text-to-cad~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_cad\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, TextToCad\nfrom kittycad.models.file_export_format import FileExportFormat\nfrom kittycad.models.text_to_cad_create_body import TextToCadCreateBody\nfrom kittycad.types import Response\n\n\ndef example_create_text_to_cad():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[TextToCad, Error]] = create_text_to_cad.sync(\n client=client,\n output_format=FileExportFormat.FBX,\n body=TextToCadCreateBody(\n prompt=\"<string>\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: TextToCad = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.create_text_to_cad.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~1force~1{input_unit}~1{output_unit}/get/x-python",
|
||||
@ -303,6 +223,38 @@
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_force_unit_conversion.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/~1apps~1github~1callback/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"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1logout/post/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"
|
||||
}
|
||||
},
|
||||
{
|
||||
"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~1api-tokens/post/x-python",
|
||||
@ -321,138 +273,10 @@
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1unit~1conversion~1power~1{input_unit}~1{output_unit}/get/x-python",
|
||||
"path": "/paths/~1user~1payment~1methods~1{id}/delete/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/~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/~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/~1logout/post/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"
|
||||
}
|
||||
},
|
||||
{
|
||||
"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"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1unit~1conversion~1volume~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_volume_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitVolumeConversion\nfrom kittycad.models.unit_volume import UnitVolume\nfrom kittycad.types import Response\n\n\ndef example_get_volume_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitVolumeConversion, Error]\n ] = get_volume_unit_conversion.sync(\n client=client,\n input_unit=UnitVolume.CM3,\n output_unit=UnitVolume.CM3,\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: UnitVolumeConversion = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_volume_unit_conversion.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~1api-calls/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import user_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_user_list_api_calls():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiCallWithPriceResultsPage, Error]\n ] = user_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.user_list_api_calls.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1users~1{id}~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_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"
|
||||
}
|
||||
},
|
||||
{
|
||||
"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/~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/~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/~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~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/~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/~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/~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"
|
||||
"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"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -465,58 +289,106 @@
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1apps~1github~1callback/get/x-python",
|
||||
"path": "/paths/~1user~1api-calls~1{id}/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.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/~1file~1density/post/x-python",
|
||||
"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_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"
|
||||
"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/~1auth~1email~1callback/get/x-python",
|
||||
"path": "/paths/~1async~1operations/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"
|
||||
"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~1session~1{token}/get/x-python",
|
||||
"path": "/paths/~1openai~1openapi.json/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"
|
||||
"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/~1file~1conversion~1{src_format}~1{output_format}/post/x-python",
|
||||
"path": "/paths/~1user~1payment/delete/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"
|
||||
"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/~1users~1{id}/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\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, User\nfrom kittycad.types import Response\n\n\ndef example_get_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[User, Error]] = get_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: User = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user.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/~1.well-known~1ai-plugin.json/get/x-python",
|
||||
"path": "/paths/~1user~1payment/put/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"
|
||||
"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~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/~1users-extended/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import list_users_extended\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ExtendedUserResultsPage\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_users_extended():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ExtendedUserResultsPage, Error]\n ] = list_users_extended.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: ExtendedUserResultsPage = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.list_users_extended.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/~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/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"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -527,6 +399,38 @@
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.modeling.modeling_commands_ws.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1user~1api-calls/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import user_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_user_list_api_calls():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiCallWithPriceResultsPage, Error]\n ] = user_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.user_list_api_calls.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/~1unit~1conversion~1angle~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_angle_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitAngleConversion\nfrom kittycad.models.unit_angle import UnitAngle\nfrom kittycad.types import Response\n\n\ndef example_get_angle_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitAngleConversion, Error]\n ] = get_angle_unit_conversion.sync(\n client=client,\n input_unit=UnitAngle.DEGREES,\n output_unit=UnitAngle.DEGREES,\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: UnitAngleConversion = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_angle_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/~1user~1extended/get/x-python",
|
||||
@ -537,18 +441,122 @@
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1user~1payment~1methods~1{id}/delete/x-python",
|
||||
"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.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"
|
||||
"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": "/info/x-python",
|
||||
"path": "/paths/~1unit~1conversion~1current~1{input_unit}~1{output_unit}/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 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/~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/~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"
|
||||
}
|
||||
},
|
||||
{
|
||||
"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~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/~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~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/~1users~1{id}~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_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"
|
||||
}
|
||||
},
|
||||
{
|
||||
"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~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"
|
||||
}
|
||||
},
|
||||
{
|
||||
"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"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1apps~1github~1consent/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.apps import apps_github_consent\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AppClientInfo, Error\nfrom kittycad.types import Response\n\n\ndef example_apps_github_consent():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[AppClientInfo, Error]] = apps_github_consent.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: AppClientInfo = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.apps.apps_github_consent.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1users~1{id}/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, User\nfrom kittycad.types import Response\n\n\ndef example_get_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[User, Error]] = get_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: User = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user.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 TextToCad,\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 TextToCad,\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 TextToCad,\n ] = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_async_operation.html"
|
||||
}
|
||||
}
|
||||
]
|
@ -5,23 +5,19 @@ import httpx
|
||||
from ...client import Client
|
||||
from ...models.error import Error
|
||||
from ...models.file_export_format import FileExportFormat
|
||||
from ...models.image_type import ImageType
|
||||
from ...models.mesh import Mesh
|
||||
from ...models.text_to_cad import TextToCad
|
||||
from ...models.text_to_cad_create_body import TextToCadCreateBody
|
||||
from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
input_format: ImageType,
|
||||
|
||||
|
||||
|
||||
output_format: FileExportFormat,
|
||||
|
||||
|
||||
|
||||
body: bytes,
|
||||
body: TextToCadCreateBody,
|
||||
|
||||
|
||||
*,
|
||||
@ -31,12 +27,8 @@ def _get_kwargs(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/ai/image-to-3d/{input_format}/{output_format}".format(client.base_url, input_format=input_format,output_format=output_format,) # noqa: E501
|
||||
|
||||
|
||||
url = "{}/ai/text-to-cad/{output_format}".format(client.base_url, output_format=output_format,) # noqa: E501
|
||||
|
||||
|
||||
|
||||
@ -56,10 +48,10 @@ def _get_kwargs(
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Mesh, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = Mesh.from_dict(response.json())
|
||||
return response_200
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[TextToCad, Error]] :
|
||||
if response.status_code == 201:
|
||||
response_201 = TextToCad.from_dict(response.json())
|
||||
return response_201
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
@ -72,7 +64,7 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Mesh, Error]]
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[Mesh, Error]]]:
|
||||
) -> Response[Optional[Union[TextToCad, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -84,15 +76,11 @@ def _build_response(
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
input_format: ImageType,
|
||||
|
||||
|
||||
|
||||
output_format: FileExportFormat,
|
||||
|
||||
|
||||
|
||||
body: bytes,
|
||||
body: TextToCadCreateBody,
|
||||
|
||||
|
||||
*,
|
||||
@ -102,13 +90,9 @@ def sync_detailed(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[Mesh, Error]]]:
|
||||
) -> Response[Optional[Union[TextToCad, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
input_format=input_format,
|
||||
|
||||
output_format=output_format,
|
||||
|
||||
body=body,
|
||||
@ -127,15 +111,11 @@ def sync_detailed(
|
||||
def sync(
|
||||
|
||||
|
||||
input_format: ImageType,
|
||||
|
||||
|
||||
|
||||
output_format: FileExportFormat,
|
||||
|
||||
|
||||
|
||||
body: bytes,
|
||||
body: TextToCadCreateBody,
|
||||
|
||||
|
||||
*,
|
||||
@ -145,15 +125,12 @@ def sync(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[Mesh, Error]] :
|
||||
"""This is an alpha endpoint. It will change in the future. The current output is honestly pretty bad. So if you find this endpoint, you get what you pay for, which currently is nothing. But in the future will be made a lot better.""" # noqa: E501
|
||||
) -> Optional[Union[TextToCad, Error]] :
|
||||
"""This operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
|
||||
This is an alpha endpoint. It will change in the future. The current output is honestly pretty bad. So if you find this endpoint, you get what you pay for, which currently is nothing. But in the future will be made a lot better.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
input_format=input_format,
|
||||
|
||||
output_format=output_format,
|
||||
|
||||
body=body,
|
||||
@ -165,15 +142,11 @@ def sync(
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
input_format: ImageType,
|
||||
|
||||
|
||||
|
||||
output_format: FileExportFormat,
|
||||
|
||||
|
||||
|
||||
body: bytes,
|
||||
body: TextToCadCreateBody,
|
||||
|
||||
|
||||
*,
|
||||
@ -183,13 +156,9 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[Mesh, Error]]]:
|
||||
) -> Response[Optional[Union[TextToCad, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
input_format=input_format,
|
||||
|
||||
output_format=output_format,
|
||||
|
||||
body=body,
|
||||
@ -206,15 +175,11 @@ async def asyncio_detailed(
|
||||
async def asyncio(
|
||||
|
||||
|
||||
input_format: ImageType,
|
||||
|
||||
|
||||
|
||||
output_format: FileExportFormat,
|
||||
|
||||
|
||||
|
||||
body: bytes,
|
||||
body: TextToCadCreateBody,
|
||||
|
||||
|
||||
*,
|
||||
@ -224,16 +189,13 @@ async def asyncio(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[Mesh, Error]] :
|
||||
"""This is an alpha endpoint. It will change in the future. The current output is honestly pretty bad. So if you find this endpoint, you get what you pay for, which currently is nothing. But in the future will be made a lot better.""" # noqa: E501
|
||||
) -> Optional[Union[TextToCad, Error]] :
|
||||
"""This operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
|
||||
This is an alpha endpoint. It will change in the future. The current output is honestly pretty bad. So if you find this endpoint, you get what you pay for, which currently is nothing. But in the future will be made a lot better.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
input_format=input_format,
|
||||
|
||||
output_format=output_format,
|
||||
|
||||
body=body,
|
@ -1,22 +1,21 @@
|
||||
from typing import Any, Dict, Optional, Union
|
||||
from typing import Any, Dict, Optional
|
||||
|
||||
import httpx
|
||||
|
||||
from ...client import Client
|
||||
from ...models.ai_feedback import AiFeedback
|
||||
from ...models.error import Error
|
||||
from ...models.file_export_format import FileExportFormat
|
||||
from ...models.mesh import Mesh
|
||||
from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
output_format: FileExportFormat,
|
||||
id: str,
|
||||
|
||||
|
||||
|
||||
prompt: str,
|
||||
feedback: AiFeedback,
|
||||
|
||||
|
||||
*,
|
||||
@ -27,16 +26,16 @@ def _get_kwargs(
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/ai/text-to-3d/{output_format}".format(client.base_url, output_format=output_format,) # noqa: E501
|
||||
url = "{}/user/text-to-cad/{id}".format(client.base_url, id=id,) # noqa: E501
|
||||
|
||||
|
||||
|
||||
|
||||
if prompt is not None:
|
||||
if feedback is not None:
|
||||
if "?" in url:
|
||||
url = url + "&prompt=" + str(prompt)
|
||||
url = url + "&feedback=" + str(feedback)
|
||||
else:
|
||||
url = url + "?prompt=" + str(prompt)
|
||||
url = url + "?feedback=" + str(feedback)
|
||||
|
||||
|
||||
|
||||
@ -53,10 +52,8 @@ def _get_kwargs(
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Mesh, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = Mesh.from_dict(response.json())
|
||||
return response_200
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Error] :
|
||||
return None
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
@ -69,7 +66,7 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[Mesh, Error]]
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[Mesh, Error]]]:
|
||||
) -> Response[Optional[Error]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -81,11 +78,11 @@ def _build_response(
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
output_format: FileExportFormat,
|
||||
id: str,
|
||||
|
||||
|
||||
|
||||
prompt: str,
|
||||
feedback: AiFeedback,
|
||||
|
||||
|
||||
*,
|
||||
@ -95,12 +92,12 @@ def sync_detailed(
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[Mesh, Error]]]:
|
||||
) -> Response[Optional[Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
output_format=output_format,
|
||||
id=id,
|
||||
|
||||
prompt=prompt,
|
||||
feedback=feedback,
|
||||
|
||||
client=client,
|
||||
)
|
||||
@ -116,11 +113,11 @@ def sync_detailed(
|
||||
def sync(
|
||||
|
||||
|
||||
output_format: FileExportFormat,
|
||||
id: str,
|
||||
|
||||
|
||||
|
||||
prompt: str,
|
||||
feedback: AiFeedback,
|
||||
|
||||
|
||||
*,
|
||||
@ -130,14 +127,14 @@ def sync(
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[Mesh, Error]] :
|
||||
"""This is an alpha endpoint. It will change in the future. The current output is honestly pretty bad. So if you find this endpoint, you get what you pay for, which currently is nothing. But in the future will be made a lot better.""" # noqa: E501
|
||||
) -> Optional[Error] :
|
||||
"""This endpoint requires authentication by any KittyCAD user. The user must be the owner of the text-to-CAD model, in order to give feedback.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
output_format=output_format,
|
||||
id=id,
|
||||
|
||||
prompt=prompt,
|
||||
feedback=feedback,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
@ -146,11 +143,11 @@ def sync(
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
output_format: FileExportFormat,
|
||||
id: str,
|
||||
|
||||
|
||||
|
||||
prompt: str,
|
||||
feedback: AiFeedback,
|
||||
|
||||
|
||||
*,
|
||||
@ -160,12 +157,12 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[Mesh, Error]]]:
|
||||
) -> Response[Optional[Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
output_format=output_format,
|
||||
id=id,
|
||||
|
||||
prompt=prompt,
|
||||
feedback=feedback,
|
||||
|
||||
client=client,
|
||||
)
|
||||
@ -179,11 +176,11 @@ async def asyncio_detailed(
|
||||
async def asyncio(
|
||||
|
||||
|
||||
output_format: FileExportFormat,
|
||||
id: str,
|
||||
|
||||
|
||||
|
||||
prompt: str,
|
||||
feedback: AiFeedback,
|
||||
|
||||
|
||||
*,
|
||||
@ -193,15 +190,15 @@ async def asyncio(
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[Mesh, Error]] :
|
||||
"""This is an alpha endpoint. It will change in the future. The current output is honestly pretty bad. So if you find this endpoint, you get what you pay for, which currently is nothing. But in the future will be made a lot better.""" # noqa: E501
|
||||
) -> Optional[Error] :
|
||||
"""This endpoint requires authentication by any KittyCAD user. The user must be the owner of the text-to-CAD model, in order to give feedback.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
output_format=output_format,
|
||||
id=id,
|
||||
|
||||
prompt=prompt,
|
||||
feedback=feedback,
|
||||
|
||||
client=client,
|
||||
)
|
262
kittycad/api/ai/list_text_to_cad_models_for_user.py
Normal file
262
kittycad/api/ai/list_text_to_cad_models_for_user.py
Normal file
@ -0,0 +1,262 @@
|
||||
from typing import Any, Dict, Optional, Union
|
||||
|
||||
import httpx
|
||||
|
||||
from ...client import Client
|
||||
from ...models.created_at_sort_mode import CreatedAtSortMode
|
||||
from ...models.error import Error
|
||||
from ...models.text_to_cad_results_page import TextToCadResultsPage
|
||||
from ...types import Response
|
||||
|
||||
|
||||
def _get_kwargs(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sort_by: CreatedAtSortMode,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
limit: Optional[int] = None,
|
||||
|
||||
|
||||
|
||||
page_token: Optional[str] = None,
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/user/text-to-cad".format(client.base_url, ) # noqa: E501
|
||||
|
||||
|
||||
if limit is not None:
|
||||
if "?" in url:
|
||||
url = url + "&limit=" + str(limit)
|
||||
else:
|
||||
url = url + "?limit=" + str(limit)
|
||||
|
||||
|
||||
|
||||
if page_token is not None:
|
||||
if "?" in url:
|
||||
url = url + "&page_token=" + str(page_token)
|
||||
else:
|
||||
url = url + "?page_token=" + str(page_token)
|
||||
|
||||
|
||||
|
||||
if sort_by is not None:
|
||||
if "?" in url:
|
||||
url = url + "&sort_by=" + str(sort_by)
|
||||
else:
|
||||
url = url + "?sort_by=" + str(sort_by)
|
||||
|
||||
|
||||
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
|
||||
return {
|
||||
"url": url,
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[TextToCadResultsPage, Error]] :
|
||||
if response.status_code == 200:
|
||||
response_200 = TextToCadResultsPage.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[TextToCadResultsPage, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
headers=response.headers,
|
||||
parsed=_parse_response(response=response),
|
||||
)
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sort_by: CreatedAtSortMode,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
limit: Optional[int] = None,
|
||||
|
||||
|
||||
|
||||
page_token: Optional[str] = None,
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[TextToCadResultsPage, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
limit=limit,
|
||||
|
||||
page_token=page_token,
|
||||
|
||||
sort_by=sort_by,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
response = httpx.get(
|
||||
verify=client.verify_ssl,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
return _build_response(response=response)
|
||||
|
||||
|
||||
def sync(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sort_by: CreatedAtSortMode,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
limit: Optional[int] = None,
|
||||
|
||||
|
||||
|
||||
page_token: Optional[str] = None,
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[TextToCadResultsPage, Error]] :
|
||||
"""This endpoint requires authentication by any KittyCAD user. It returns the text-to-CAD models for the authenticated user.
|
||||
The text-to-CAD models are returned in order of creation, with the most recently created text-to-CAD models first.""" # noqa: E501
|
||||
|
||||
return sync_detailed(
|
||||
|
||||
limit=limit,
|
||||
|
||||
page_token=page_token,
|
||||
|
||||
sort_by=sort_by,
|
||||
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sort_by: CreatedAtSortMode,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
limit: Optional[int] = None,
|
||||
|
||||
|
||||
|
||||
page_token: Optional[str] = None,
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[TextToCadResultsPage, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
limit=limit,
|
||||
|
||||
page_token=page_token,
|
||||
|
||||
sort_by=sort_by,
|
||||
|
||||
client=client,
|
||||
)
|
||||
|
||||
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
||||
response = await _client.get(**kwargs)
|
||||
|
||||
return _build_response(response=response)
|
||||
|
||||
|
||||
async def asyncio(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sort_by: CreatedAtSortMode,
|
||||
|
||||
|
||||
*,
|
||||
client: Client,
|
||||
|
||||
|
||||
limit: Optional[int] = None,
|
||||
|
||||
|
||||
|
||||
page_token: Optional[str] = None,
|
||||
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[TextToCadResultsPage, Error]] :
|
||||
"""This endpoint requires authentication by any KittyCAD user. It returns the text-to-CAD models for the authenticated user.
|
||||
The text-to-CAD models are returned in order of creation, with the most recently created text-to-CAD models first.""" # noqa: E501
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
||||
limit=limit,
|
||||
|
||||
page_token=page_token,
|
||||
|
||||
sort_by=sort_by,
|
||||
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
@ -10,6 +10,7 @@ from ...models.file_density import FileDensity
|
||||
from ...models.file_mass import FileMass
|
||||
from ...models.file_surface_area import FileSurfaceArea
|
||||
from ...models.file_volume import FileVolume
|
||||
from ...models.text_to_cad import TextToCad
|
||||
from ...types import Response
|
||||
|
||||
|
||||
@ -43,7 +44,7 @@ def _get_kwargs(
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]] :
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, TextToCad, Error]] :
|
||||
if response.status_code == 200:
|
||||
data = response.json()
|
||||
try:
|
||||
@ -96,6 +97,15 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[FileConversio
|
||||
raise TypeError()
|
||||
option_file_surface_area = FileSurfaceArea.from_dict(data)
|
||||
return option_file_surface_area
|
||||
except ValueError:
|
||||
pass
|
||||
except TypeError:
|
||||
pass
|
||||
try:
|
||||
if not isinstance(data, dict):
|
||||
raise TypeError()
|
||||
option_text_to_cad = TextToCad.from_dict(data)
|
||||
return option_text_to_cad
|
||||
except ValueError:
|
||||
raise
|
||||
except TypeError:
|
||||
@ -112,7 +122,7 @@ def _parse_response(*, response: httpx.Response) -> Optional[Union[FileConversio
|
||||
|
||||
def _build_response(
|
||||
*, response: httpx.Response
|
||||
) -> Response[Optional[Union[FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]]:
|
||||
) -> Response[Optional[Union[FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, TextToCad, Error]]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
@ -132,7 +142,7 @@ def sync_detailed(
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]]:
|
||||
) -> Response[Optional[Union[FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, TextToCad, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
id=id,
|
||||
@ -159,7 +169,7 @@ def sync(
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]] :
|
||||
) -> Optional[Union[FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, TextToCad, Error]] :
|
||||
"""Get the status and output of an async operation.
|
||||
This endpoint requires authentication by any KittyCAD user. It returns details of the requested async operation for the user.
|
||||
If the user is not authenticated to view the specified async operation, then it is not returned.
|
||||
@ -184,7 +194,7 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
|
||||
) -> Response[Optional[Union[FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]]:
|
||||
) -> Response[Optional[Union[FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, TextToCad, Error]]]:
|
||||
kwargs = _get_kwargs(
|
||||
|
||||
id=id,
|
||||
@ -209,7 +219,7 @@ async def asyncio(
|
||||
|
||||
|
||||
|
||||
) -> Optional[Union[FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]] :
|
||||
) -> Optional[Union[FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, TextToCad, Error]] :
|
||||
"""Get the status and output of an async operation.
|
||||
This endpoint requires authentication by any KittyCAD user. It returns details of the requested async operation for the user.
|
||||
If the user is not authenticated to view the specified async operation, then it is not returned.
|
||||
|
@ -2,7 +2,11 @@ from typing import List, Optional, Union
|
||||
|
||||
import pytest
|
||||
|
||||
from kittycad.api.ai import create_image_to_3d, create_text_to_3d
|
||||
from kittycad.api.ai import (
|
||||
create_text_to_cad,
|
||||
create_text_to_cad_model_feedback,
|
||||
list_text_to_cad_models_for_user,
|
||||
)
|
||||
from kittycad.api.api_calls import (
|
||||
get_api_call,
|
||||
get_api_call_for_user,
|
||||
@ -105,13 +109,14 @@ from kittycad.models import (
|
||||
FileSurfaceArea,
|
||||
FileVolume,
|
||||
Invoice,
|
||||
Mesh,
|
||||
Metadata,
|
||||
Onboarding,
|
||||
PaymentIntent,
|
||||
PaymentMethod,
|
||||
Pong,
|
||||
Session,
|
||||
TextToCad,
|
||||
TextToCadResultsPage,
|
||||
UnitAngleConversion,
|
||||
UnitAreaConversion,
|
||||
UnitCurrentConversion,
|
||||
@ -129,6 +134,7 @@ from kittycad.models import (
|
||||
UserResultsPage,
|
||||
VerificationToken,
|
||||
)
|
||||
from kittycad.models.ai_feedback import AiFeedback
|
||||
from kittycad.models.api_call_query_group_by import ApiCallQueryGroupBy
|
||||
from kittycad.models.api_call_status import ApiCallStatus
|
||||
from kittycad.models.billing_info import BillingInfo
|
||||
@ -137,9 +143,9 @@ from kittycad.models.created_at_sort_mode import CreatedAtSortMode
|
||||
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.rtc_sdp_type import RtcSdpType
|
||||
from kittycad.models.rtc_session_description import RtcSessionDescription
|
||||
from kittycad.models.text_to_cad_create_body import TextToCadCreateBody
|
||||
from kittycad.models.unit_angle import UnitAngle
|
||||
from kittycad.models.unit_area import UnitArea
|
||||
from kittycad.models.unit_current import UnitCurrent
|
||||
@ -278,104 +284,61 @@ async def test_get_metadata_async():
|
||||
|
||||
|
||||
@pytest.mark.skip
|
||||
def test_create_image_to_3d():
|
||||
def test_create_text_to_cad():
|
||||
# Create our client.
|
||||
client = ClientFromEnv()
|
||||
|
||||
result: Optional[Union[Mesh, Error]] = create_image_to_3d.sync(
|
||||
result: Optional[Union[TextToCad, Error]] = create_text_to_cad.sync(
|
||||
client=client,
|
||||
input_format=ImageType.PNG,
|
||||
output_format=FileExportFormat.FBX,
|
||||
body=bytes("some bytes", "utf-8"),
|
||||
body=TextToCadCreateBody(
|
||||
prompt="<string>",
|
||||
),
|
||||
)
|
||||
|
||||
if isinstance(result, Error) or result is None:
|
||||
print(result)
|
||||
raise Exception("Error in response")
|
||||
|
||||
body: Mesh = result
|
||||
body: TextToCad = result
|
||||
print(body)
|
||||
|
||||
# OR if you need more info (e.g. status_code)
|
||||
response: Response[Optional[Union[Mesh, Error]]] = create_image_to_3d.sync_detailed(
|
||||
response: Response[
|
||||
Optional[Union[TextToCad, Error]]
|
||||
] = create_text_to_cad.sync_detailed(
|
||||
client=client,
|
||||
input_format=ImageType.PNG,
|
||||
output_format=FileExportFormat.FBX,
|
||||
body=bytes("some bytes", "utf-8"),
|
||||
body=TextToCadCreateBody(
|
||||
prompt="<string>",
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
# OR run async
|
||||
@pytest.mark.asyncio
|
||||
@pytest.mark.skip
|
||||
async def test_create_image_to_3d_async():
|
||||
async def test_create_text_to_cad_async():
|
||||
# Create our client.
|
||||
client = ClientFromEnv()
|
||||
|
||||
result: Optional[Union[Mesh, Error]] = await create_image_to_3d.asyncio(
|
||||
result: Optional[Union[TextToCad, Error]] = await create_text_to_cad.asyncio(
|
||||
client=client,
|
||||
input_format=ImageType.PNG,
|
||||
output_format=FileExportFormat.FBX,
|
||||
body=bytes("some bytes", "utf-8"),
|
||||
body=TextToCadCreateBody(
|
||||
prompt="<string>",
|
||||
),
|
||||
)
|
||||
|
||||
# OR run async with more info
|
||||
response: Response[
|
||||
Optional[Union[Mesh, Error]]
|
||||
] = await create_image_to_3d.asyncio_detailed(
|
||||
client=client,
|
||||
input_format=ImageType.PNG,
|
||||
output_format=FileExportFormat.FBX,
|
||||
body=bytes("some bytes", "utf-8"),
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.skip
|
||||
def test_create_text_to_3d():
|
||||
# Create our client.
|
||||
client = ClientFromEnv()
|
||||
|
||||
result: Optional[Union[Mesh, Error]] = create_text_to_3d.sync(
|
||||
Optional[Union[TextToCad, Error]]
|
||||
] = await create_text_to_cad.asyncio_detailed(
|
||||
client=client,
|
||||
output_format=FileExportFormat.FBX,
|
||||
prompt="<string>",
|
||||
)
|
||||
|
||||
if isinstance(result, Error) or result is None:
|
||||
print(result)
|
||||
raise Exception("Error in response")
|
||||
|
||||
body: Mesh = result
|
||||
print(body)
|
||||
|
||||
# OR if you need more info (e.g. status_code)
|
||||
response: Response[Optional[Union[Mesh, Error]]] = create_text_to_3d.sync_detailed(
|
||||
client=client,
|
||||
output_format=FileExportFormat.FBX,
|
||||
prompt="<string>",
|
||||
)
|
||||
|
||||
|
||||
# OR run async
|
||||
@pytest.mark.asyncio
|
||||
@pytest.mark.skip
|
||||
async def test_create_text_to_3d_async():
|
||||
# Create our client.
|
||||
client = ClientFromEnv()
|
||||
|
||||
result: Optional[Union[Mesh, Error]] = await create_text_to_3d.asyncio(
|
||||
client=client,
|
||||
output_format=FileExportFormat.FBX,
|
||||
prompt="<string>",
|
||||
)
|
||||
|
||||
# OR run async with more info
|
||||
response: Response[
|
||||
Optional[Union[Mesh, Error]]
|
||||
] = await create_text_to_3d.asyncio_detailed(
|
||||
client=client,
|
||||
output_format=FileExportFormat.FBX,
|
||||
prompt="<string>",
|
||||
body=TextToCadCreateBody(
|
||||
prompt="<string>",
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
@ -733,6 +696,7 @@ def test_get_async_operation():
|
||||
FileVolume,
|
||||
FileDensity,
|
||||
FileSurfaceArea,
|
||||
TextToCad,
|
||||
Error,
|
||||
]
|
||||
] = get_async_operation.sync(
|
||||
@ -751,6 +715,7 @@ def test_get_async_operation():
|
||||
FileVolume,
|
||||
FileDensity,
|
||||
FileSurfaceArea,
|
||||
TextToCad,
|
||||
] = result
|
||||
print(body)
|
||||
|
||||
@ -764,6 +729,7 @@ def test_get_async_operation():
|
||||
FileVolume,
|
||||
FileDensity,
|
||||
FileSurfaceArea,
|
||||
TextToCad,
|
||||
Error,
|
||||
]
|
||||
]
|
||||
@ -788,6 +754,7 @@ async def test_get_async_operation_async():
|
||||
FileVolume,
|
||||
FileDensity,
|
||||
FileSurfaceArea,
|
||||
TextToCad,
|
||||
Error,
|
||||
]
|
||||
] = await get_async_operation.asyncio(
|
||||
@ -805,6 +772,7 @@ async def test_get_async_operation_async():
|
||||
FileVolume,
|
||||
FileDensity,
|
||||
FileSurfaceArea,
|
||||
TextToCad,
|
||||
Error,
|
||||
]
|
||||
]
|
||||
@ -3298,6 +3266,116 @@ async def test_get_session_for_user_async():
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.skip
|
||||
def test_list_text_to_cad_models_for_user():
|
||||
# Create our client.
|
||||
client = ClientFromEnv()
|
||||
|
||||
result: Optional[
|
||||
Union[TextToCadResultsPage, Error]
|
||||
] = list_text_to_cad_models_for_user.sync(
|
||||
client=client,
|
||||
sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,
|
||||
limit=None, # Optional[int]
|
||||
page_token=None, # Optional[str]
|
||||
)
|
||||
|
||||
if isinstance(result, Error) or result is None:
|
||||
print(result)
|
||||
raise Exception("Error in response")
|
||||
|
||||
body: TextToCadResultsPage = result
|
||||
print(body)
|
||||
|
||||
# OR if you need more info (e.g. status_code)
|
||||
response: Response[
|
||||
Optional[Union[TextToCadResultsPage, Error]]
|
||||
] = list_text_to_cad_models_for_user.sync_detailed(
|
||||
client=client,
|
||||
sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,
|
||||
limit=None, # Optional[int]
|
||||
page_token=None, # Optional[str]
|
||||
)
|
||||
|
||||
|
||||
# OR run async
|
||||
@pytest.mark.asyncio
|
||||
@pytest.mark.skip
|
||||
async def test_list_text_to_cad_models_for_user_async():
|
||||
# Create our client.
|
||||
client = ClientFromEnv()
|
||||
|
||||
result: Optional[
|
||||
Union[TextToCadResultsPage, Error]
|
||||
] = await list_text_to_cad_models_for_user.asyncio(
|
||||
client=client,
|
||||
sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,
|
||||
limit=None, # Optional[int]
|
||||
page_token=None, # Optional[str]
|
||||
)
|
||||
|
||||
# OR run async with more info
|
||||
response: Response[
|
||||
Optional[Union[TextToCadResultsPage, Error]]
|
||||
] = await list_text_to_cad_models_for_user.asyncio_detailed(
|
||||
client=client,
|
||||
sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,
|
||||
limit=None, # Optional[int]
|
||||
page_token=None, # Optional[str]
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.skip
|
||||
def test_create_text_to_cad_model_feedback():
|
||||
# Create our client.
|
||||
client = ClientFromEnv()
|
||||
|
||||
result: Optional[Error] = create_text_to_cad_model_feedback.sync(
|
||||
client=client,
|
||||
id="<uuid>",
|
||||
feedback=AiFeedback.THUMBS_UP,
|
||||
)
|
||||
|
||||
if isinstance(result, Error) or result is None:
|
||||
print(result)
|
||||
raise Exception("Error in response")
|
||||
|
||||
body: Error = result
|
||||
print(body)
|
||||
|
||||
# OR if you need more info (e.g. status_code)
|
||||
response: Response[
|
||||
Optional[Error]
|
||||
] = create_text_to_cad_model_feedback.sync_detailed(
|
||||
client=client,
|
||||
id="<uuid>",
|
||||
feedback=AiFeedback.THUMBS_UP,
|
||||
)
|
||||
|
||||
|
||||
# OR run async
|
||||
@pytest.mark.asyncio
|
||||
@pytest.mark.skip
|
||||
async def test_create_text_to_cad_model_feedback_async():
|
||||
# Create our client.
|
||||
client = ClientFromEnv()
|
||||
|
||||
result: Optional[Error] = await create_text_to_cad_model_feedback.asyncio(
|
||||
client=client,
|
||||
id="<uuid>",
|
||||
feedback=AiFeedback.THUMBS_UP,
|
||||
)
|
||||
|
||||
# OR run async with more info
|
||||
response: Response[
|
||||
Optional[Error]
|
||||
] = await create_text_to_cad_model_feedback.asyncio_detailed(
|
||||
client=client,
|
||||
id="<uuid>",
|
||||
feedback=AiFeedback.THUMBS_UP,
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.skip
|
||||
def test_list_users():
|
||||
# Create our client.
|
||||
|
@ -1,6 +1,7 @@
|
||||
""" Contains all the data models used in inputs/outputs """
|
||||
|
||||
from .account_provider import AccountProvider
|
||||
from .ai_feedback import AiFeedback
|
||||
from .ai_plugin_api import AiPluginApi
|
||||
from .ai_plugin_api_type import AiPluginApiType
|
||||
from .ai_plugin_auth import AiPluginAuth
|
||||
@ -91,7 +92,6 @@ from .gltf_storage import GltfStorage
|
||||
from .highlight_set_entity import HighlightSetEntity
|
||||
from .ice_server import IceServer
|
||||
from .image_format import ImageFormat
|
||||
from .image_type import ImageType
|
||||
from .import_file import ImportFile
|
||||
from .import_files import ImportFiles
|
||||
from .input_format import InputFormat
|
||||
@ -104,12 +104,12 @@ 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 .mouse_click import MouseClick
|
||||
from .new_address import NewAddress
|
||||
from .o_auth2_client_info import OAuth2ClientInfo
|
||||
@ -122,6 +122,7 @@ 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_get_vertex_uuids import PathGetVertexUuids
|
||||
from .path_segment import PathSegment
|
||||
from .path_segment_info import PathSegmentInfo
|
||||
from .payment_intent import PaymentIntent
|
||||
@ -132,7 +133,6 @@ 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 .rtc_ice_candidate_init import RtcIceCandidateInit
|
||||
@ -153,6 +153,9 @@ from .success_web_socket_response import SuccessWebSocketResponse
|
||||
from .surface_area import SurfaceArea
|
||||
from .system import System
|
||||
from .take_snapshot import TakeSnapshot
|
||||
from .text_to_cad import TextToCad
|
||||
from .text_to_cad_create_body import TextToCadCreateBody
|
||||
from .text_to_cad_results_page import TextToCadResultsPage
|
||||
from .unit_angle import UnitAngle
|
||||
from .unit_angle_conversion import UnitAngleConversion
|
||||
from .unit_area import UnitArea
|
||||
|
12
kittycad/models/ai_feedback.py
Normal file
12
kittycad/models/ai_feedback.py
Normal file
@ -0,0 +1,12 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class AiFeedback(str, Enum):
|
||||
""" Human feedback on an AI response. """ # noqa: E501
|
||||
"""# Thumbs up. """ # noqa: E501
|
||||
THUMBS_UP = 'thumbs_up'
|
||||
"""# Thumbs down. """ # noqa: E501
|
||||
THUMBS_DOWN = 'thumbs_down'
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
@ -4,6 +4,7 @@ from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
import attr
|
||||
from dateutil.parser import isoparse
|
||||
|
||||
from ..models.ai_feedback import AiFeedback
|
||||
from ..models.api_call_status import ApiCallStatus
|
||||
from ..models.base64data import Base64Data
|
||||
from ..models.file_export_format import FileExportFormat
|
||||
@ -1174,4 +1175,209 @@ class file_surface_area:
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
|
||||
AsyncApiCallOutput = Union[file_conversion, file_center_of_mass, file_mass, file_volume, file_density, file_surface_area]
|
||||
|
||||
|
||||
|
||||
BS = TypeVar("BS", bound="text_to_cad")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class text_to_cad:
|
||||
""" Text to CAD. """ # noqa: E501
|
||||
completed_at: Union[Unset, datetime.datetime] = UNSET
|
||||
created_at: Union[Unset, datetime.datetime] = UNSET
|
||||
error: Union[Unset, str] = UNSET
|
||||
feedback: Union[Unset, AiFeedback] = UNSET
|
||||
id: Union[Unset, str] = UNSET
|
||||
model_version: Union[Unset, str] = UNSET
|
||||
output_format: Union[Unset, FileExportFormat] = UNSET
|
||||
outputs: Union[Unset, Dict[str, Base64Data]] = UNSET
|
||||
prompt: Union[Unset, str] = UNSET
|
||||
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
type: str = "text_to_cad"
|
||||
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||
user_id: Union[Unset, str] = UNSET
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
completed_at: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.completed_at, Unset):
|
||||
completed_at = self.completed_at.isoformat()
|
||||
created_at: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.created_at, Unset):
|
||||
created_at = self.created_at.isoformat()
|
||||
error = self.error
|
||||
if not isinstance(self.feedback, Unset):
|
||||
feedback = self.feedback
|
||||
id = self.id
|
||||
model_version = self.model_version
|
||||
if not isinstance(self.output_format, Unset):
|
||||
output_format = self.output_format
|
||||
outputs: Union[Unset, Dict[str, str]] = UNSET
|
||||
if not isinstance(self.outputs, Unset):
|
||||
new_dict: Dict[str, str] = {}
|
||||
for key, value in self.outputs.items():
|
||||
new_dict[key] = value.get_encoded()
|
||||
outputs = new_dict
|
||||
prompt = self.prompt
|
||||
started_at: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.started_at, Unset):
|
||||
started_at = self.started_at.isoformat()
|
||||
if not isinstance(self.status, Unset):
|
||||
status = self.status
|
||||
type = self.type
|
||||
updated_at: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.updated_at, Unset):
|
||||
updated_at = self.updated_at.isoformat()
|
||||
user_id = self.user_id
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if completed_at is not UNSET:
|
||||
field_dict['completed_at'] = completed_at
|
||||
if created_at is not UNSET:
|
||||
field_dict['created_at'] = created_at
|
||||
if error is not UNSET:
|
||||
field_dict['error'] = error
|
||||
if feedback is not UNSET:
|
||||
field_dict['feedback'] = feedback
|
||||
if id is not UNSET:
|
||||
field_dict['id'] = id
|
||||
if model_version is not UNSET:
|
||||
field_dict['model_version'] = model_version
|
||||
if output_format is not UNSET:
|
||||
field_dict['output_format'] = output_format
|
||||
if outputs is not UNSET:
|
||||
field_dict['outputs'] = outputs
|
||||
if prompt is not UNSET:
|
||||
field_dict['prompt'] = prompt
|
||||
if started_at is not UNSET:
|
||||
field_dict['started_at'] = started_at
|
||||
if status is not UNSET:
|
||||
field_dict['status'] = status
|
||||
field_dict['type'] = type
|
||||
if updated_at is not UNSET:
|
||||
field_dict['updated_at'] = updated_at
|
||||
if user_id is not UNSET:
|
||||
field_dict['user_id'] = user_id
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[BS], src_dict: Dict[str, Any]) -> BS:
|
||||
d = src_dict.copy()
|
||||
_completed_at = d.pop("completed_at", UNSET)
|
||||
completed_at: Union[Unset, datetime.datetime]
|
||||
if isinstance(_completed_at, Unset):
|
||||
completed_at = UNSET
|
||||
else:
|
||||
completed_at = isoparse(_completed_at)
|
||||
|
||||
_created_at = d.pop("created_at", UNSET)
|
||||
created_at: Union[Unset, datetime.datetime]
|
||||
if isinstance(_created_at, Unset):
|
||||
created_at = UNSET
|
||||
else:
|
||||
created_at = isoparse(_created_at)
|
||||
|
||||
error = d.pop("error", UNSET)
|
||||
|
||||
_feedback = d.pop("feedback", UNSET)
|
||||
feedback: Union[Unset, AiFeedback]
|
||||
if isinstance(_feedback, Unset):
|
||||
feedback = UNSET
|
||||
else:
|
||||
feedback = _feedback # type: ignore[arg-type]
|
||||
|
||||
_id = d.pop("id", UNSET)
|
||||
id: Union[Unset, Uuid]
|
||||
if isinstance(_id, Unset):
|
||||
id = UNSET
|
||||
else:
|
||||
id = _id # type: ignore[arg-type]
|
||||
|
||||
model_version = d.pop("model_version", UNSET)
|
||||
|
||||
_output_format = d.pop("output_format", UNSET)
|
||||
output_format: Union[Unset, FileExportFormat]
|
||||
if isinstance(_output_format, Unset):
|
||||
output_format = UNSET
|
||||
else:
|
||||
output_format = _output_format # type: ignore[arg-type]
|
||||
|
||||
_outputs = d.pop("outputs", UNSET)
|
||||
if isinstance(_outputs, Unset):
|
||||
outputs = UNSET
|
||||
else:
|
||||
new_map: Dict[str, Base64Data] = {}
|
||||
for k, v in _outputs.items():
|
||||
new_map[k] = Base64Data(bytes(v, 'utf-8'))
|
||||
outputs = new_map # type: ignore
|
||||
|
||||
prompt = d.pop("prompt", UNSET)
|
||||
|
||||
_started_at = d.pop("started_at", UNSET)
|
||||
started_at: Union[Unset, datetime.datetime]
|
||||
if isinstance(_started_at, Unset):
|
||||
started_at = UNSET
|
||||
else:
|
||||
started_at = isoparse(_started_at)
|
||||
|
||||
_status = d.pop("status", UNSET)
|
||||
status: Union[Unset, ApiCallStatus]
|
||||
if isinstance(_status, Unset):
|
||||
status = UNSET
|
||||
else:
|
||||
status = _status # type: ignore[arg-type]
|
||||
|
||||
type = d.pop("type", UNSET)
|
||||
|
||||
_updated_at = d.pop("updated_at", UNSET)
|
||||
updated_at: Union[Unset, datetime.datetime]
|
||||
if isinstance(_updated_at, Unset):
|
||||
updated_at = UNSET
|
||||
else:
|
||||
updated_at = isoparse(_updated_at)
|
||||
|
||||
user_id = d.pop("user_id", UNSET)
|
||||
|
||||
|
||||
text_to_cad = cls(
|
||||
completed_at= completed_at,
|
||||
created_at= created_at,
|
||||
error= error,
|
||||
feedback= feedback,
|
||||
id= id,
|
||||
model_version= model_version,
|
||||
output_format= output_format,
|
||||
outputs= outputs,
|
||||
prompt= prompt,
|
||||
started_at= started_at,
|
||||
status= status,
|
||||
type= type,
|
||||
updated_at= updated_at,
|
||||
user_id= user_id,
|
||||
)
|
||||
|
||||
text_to_cad.additional_properties = d
|
||||
return text_to_cad
|
||||
|
||||
@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
|
||||
|
||||
AsyncApiCallOutput = Union[file_conversion, file_center_of_mass, file_mass, file_volume, file_density, file_surface_area, text_to_cad]
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
BS = TypeVar("BS", bound="AsyncApiCallResultsPage")
|
||||
AH = TypeVar("AH", bound="AsyncApiCallResultsPage")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class AsyncApiCallResultsPage:
|
||||
@ -33,7 +33,7 @@ class AsyncApiCallResultsPage:
|
||||
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()
|
||||
from ..models.async_api_call import AsyncApiCall
|
||||
items = cast(List[AsyncApiCall], d.pop("items", UNSET))
|
||||
|
@ -15,6 +15,8 @@ class AsyncApiCallType(str, Enum):
|
||||
FILE_DENSITY = 'file_density'
|
||||
"""# File surface area. """ # noqa: E501
|
||||
FILE_SURFACE_AREA = 'file_surface_area'
|
||||
"""# Text to CAD. """ # noqa: E501
|
||||
TEXT_TO_CAD = 'text_to_cad'
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
|
@ -6,7 +6,7 @@ from ..models.axis import Axis
|
||||
from ..models.direction import Direction
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
AH = TypeVar("AH", bound="AxisDirectionPair")
|
||||
EG = TypeVar("EG", bound="AxisDirectionPair")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class AxisDirectionPair:
|
||||
@ -33,7 +33,7 @@ class AxisDirectionPair:
|
||||
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()
|
||||
_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
|
||||
|
||||
EG = TypeVar("EG", bound="BillingInfo")
|
||||
JR = TypeVar("JR", bound="BillingInfo")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class BillingInfo:
|
||||
@ -35,7 +35,7 @@ class BillingInfo:
|
||||
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()
|
||||
_address = d.pop("address", UNSET)
|
||||
address: Union[Unset, NewAddress]
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
JR = TypeVar("JR", bound="CacheMetadata")
|
||||
LY = TypeVar("LY", bound="CacheMetadata")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CacheMetadata:
|
||||
@ -27,7 +27,7 @@ This is mostly used for internal purposes and debugging. """ # noqa: E501
|
||||
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()
|
||||
ok = d.pop("ok", UNSET)
|
||||
|
||||
|
@ -5,7 +5,7 @@ import attr
|
||||
from ..models.payment_method_card_checks import PaymentMethodCardChecks
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
LY = TypeVar("LY", bound="CardDetails")
|
||||
HK = TypeVar("HK", bound="CardDetails")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CardDetails:
|
||||
@ -55,7 +55,7 @@ class CardDetails:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[LY], src_dict: Dict[str, Any]) -> LY:
|
||||
def from_dict(cls: Type[HK], src_dict: Dict[str, Any]) -> HK:
|
||||
d = src_dict.copy()
|
||||
brand = d.pop("brand", UNSET)
|
||||
|
||||
|
@ -6,7 +6,7 @@ from ..models.point3d import Point3d
|
||||
from ..models.unit_length import UnitLength
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
HK = TypeVar("HK", bound="CenterOfMass")
|
||||
VR = TypeVar("VR", bound="CenterOfMass")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CenterOfMass:
|
||||
@ -33,7 +33,7 @@ class CenterOfMass:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[HK], src_dict: Dict[str, Any]) -> HK:
|
||||
def from_dict(cls: Type[VR], src_dict: Dict[str, Any]) -> VR:
|
||||
d = src_dict.copy()
|
||||
_center_of_mass = d.pop("center_of_mass", UNSET)
|
||||
center_of_mass: Union[Unset, Point3d]
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
VR = TypeVar("VR", bound="ClientMetrics")
|
||||
ON = TypeVar("ON", bound="ClientMetrics")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class ClientMetrics:
|
||||
@ -53,7 +53,7 @@ class ClientMetrics:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[VR], src_dict: Dict[str, Any]) -> VR:
|
||||
def from_dict(cls: Type[ON], src_dict: Dict[str, Any]) -> ON:
|
||||
d = src_dict.copy()
|
||||
rtc_frames_decoded = d.pop("rtc_frames_decoded", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
ON = TypeVar("ON", bound="Cluster")
|
||||
PC = TypeVar("PC", bound="Cluster")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class Cluster:
|
||||
@ -47,7 +47,7 @@ class Cluster:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[ON], src_dict: Dict[str, Any]) -> ON:
|
||||
def from_dict(cls: Type[PC], src_dict: Dict[str, Any]) -> PC:
|
||||
d = src_dict.copy()
|
||||
addr = d.pop("addr", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
PC = TypeVar("PC", bound="CodeOutput")
|
||||
US = TypeVar("US", bound="CodeOutput")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CodeOutput:
|
||||
@ -37,7 +37,7 @@ class CodeOutput:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[PC], src_dict: Dict[str, Any]) -> PC:
|
||||
def from_dict(cls: Type[US], src_dict: Dict[str, Any]) -> US:
|
||||
d = src_dict.copy()
|
||||
from ..models.output_file import OutputFile
|
||||
output_files = cast(List[OutputFile], d.pop("output_files", UNSET))
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
US = TypeVar("US", bound="Color")
|
||||
KQ = TypeVar("KQ", bound="Color")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class Color:
|
||||
@ -37,7 +37,7 @@ class Color:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[US], src_dict: Dict[str, Any]) -> US:
|
||||
def from_dict(cls: Type[KQ], src_dict: Dict[str, Any]) -> KQ:
|
||||
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
|
||||
|
||||
KQ = TypeVar("KQ", bound="Connection")
|
||||
FH = TypeVar("FH", bound="Connection")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class Connection:
|
||||
@ -224,7 +224,7 @@ This is mostly used for internal purposes and debugging. """ # noqa: E501
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[KQ], src_dict: Dict[str, Any]) -> KQ:
|
||||
def from_dict(cls: Type[FH], src_dict: Dict[str, Any]) -> FH:
|
||||
d = src_dict.copy()
|
||||
auth_timeout = d.pop("auth_timeout", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
FH = TypeVar("FH", bound="Coupon")
|
||||
NH = TypeVar("NH", bound="Coupon")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class Coupon:
|
||||
@ -37,7 +37,7 @@ class Coupon:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[FH], src_dict: Dict[str, Any]) -> FH:
|
||||
def from_dict(cls: Type[NH], src_dict: Dict[str, Any]) -> NH:
|
||||
d = src_dict.copy()
|
||||
amount_off = d.pop("amount_off", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
NH = TypeVar("NH", bound="CurveGetControlPoints")
|
||||
BB = TypeVar("BB", bound="CurveGetControlPoints")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CurveGetControlPoints:
|
||||
@ -29,7 +29,7 @@ class CurveGetControlPoints:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[NH], src_dict: Dict[str, Any]) -> NH:
|
||||
def from_dict(cls: Type[BB], src_dict: Dict[str, Any]) -> BB:
|
||||
d = src_dict.copy()
|
||||
from ..models.point3d import Point3d
|
||||
control_points = cast(List[Point3d], d.pop("control_points", UNSET))
|
||||
|
@ -5,7 +5,7 @@ import attr
|
||||
from ..models.point3d import Point3d
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
BB = TypeVar("BB", bound="CurveGetEndPoints")
|
||||
PJ = TypeVar("PJ", bound="CurveGetEndPoints")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CurveGetEndPoints:
|
||||
@ -32,7 +32,7 @@ class CurveGetEndPoints:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[BB], src_dict: Dict[str, Any]) -> BB:
|
||||
def from_dict(cls: Type[PJ], src_dict: Dict[str, Any]) -> PJ:
|
||||
d = src_dict.copy()
|
||||
_end = d.pop("end", UNSET)
|
||||
end: Union[Unset, Point3d]
|
||||
|
@ -5,7 +5,7 @@ import attr
|
||||
from ..models.curve_type import CurveType
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
PJ = TypeVar("PJ", bound="CurveGetType")
|
||||
TV = TypeVar("TV", bound="CurveGetType")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CurveGetType:
|
||||
@ -27,7 +27,7 @@ class CurveGetType:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[PJ], src_dict: Dict[str, Any]) -> PJ:
|
||||
def from_dict(cls: Type[TV], src_dict: Dict[str, Any]) -> TV:
|
||||
d = src_dict.copy()
|
||||
_curve_type = d.pop("curve_type", UNSET)
|
||||
curve_type: Union[Unset, CurveType]
|
||||
|
@ -8,7 +8,7 @@ from ..models.currency import Currency
|
||||
from ..models.new_address import NewAddress
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
TV = TypeVar("TV", bound="Customer")
|
||||
CR = TypeVar("CR", bound="Customer")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class Customer:
|
||||
@ -70,7 +70,7 @@ class Customer:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[TV], src_dict: Dict[str, Any]) -> TV:
|
||||
def from_dict(cls: Type[CR], src_dict: Dict[str, Any]) -> CR:
|
||||
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
|
||||
|
||||
CR = TypeVar("CR", bound="CustomerBalance")
|
||||
CE = TypeVar("CE", bound="CustomerBalance")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CustomerBalance:
|
||||
@ -62,7 +62,7 @@ This holds information about the financial balance for the user. """ # noqa: E50
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[CR], src_dict: Dict[str, Any]) -> CR:
|
||||
def from_dict(cls: Type[CE], src_dict: Dict[str, Any]) -> CE:
|
||||
d = src_dict.copy()
|
||||
_created_at = d.pop("created_at", UNSET)
|
||||
created_at: Union[Unset, datetime.datetime]
|
||||
|
@ -5,7 +5,7 @@ import attr
|
||||
from ..models.unit_density import UnitDensity
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
CE = TypeVar("CE", bound="Density")
|
||||
MS = TypeVar("MS", bound="Density")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class Density:
|
||||
@ -31,7 +31,7 @@ class Density:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[CE], src_dict: Dict[str, Any]) -> CE:
|
||||
def from_dict(cls: Type[MS], src_dict: Dict[str, Any]) -> MS:
|
||||
d = src_dict.copy()
|
||||
density = d.pop("density", UNSET)
|
||||
|
||||
|
@ -5,7 +5,7 @@ import attr
|
||||
from ..models.o_auth2_grant_type import OAuth2GrantType
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
MS = TypeVar("MS", bound="DeviceAccessTokenRequestForm")
|
||||
LT = TypeVar("LT", bound="DeviceAccessTokenRequestForm")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class DeviceAccessTokenRequestForm:
|
||||
@ -35,7 +35,7 @@ class DeviceAccessTokenRequestForm:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[MS], src_dict: Dict[str, Any]) -> MS:
|
||||
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
|
||||
|
||||
LT = TypeVar("LT", bound="DeviceAuthRequestForm")
|
||||
ED = TypeVar("ED", bound="DeviceAuthRequestForm")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class DeviceAuthRequestForm:
|
||||
@ -25,7 +25,7 @@ class DeviceAuthRequestForm:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[LT], src_dict: Dict[str, Any]) -> LT:
|
||||
def from_dict(cls: Type[ED], src_dict: Dict[str, Any]) -> ED:
|
||||
d = src_dict.copy()
|
||||
client_id = d.pop("client_id", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
ED = TypeVar("ED", bound="DeviceAuthVerifyParams")
|
||||
YY = TypeVar("YY", bound="DeviceAuthVerifyParams")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class DeviceAuthVerifyParams:
|
||||
@ -25,7 +25,7 @@ class DeviceAuthVerifyParams:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[ED], src_dict: Dict[str, Any]) -> ED:
|
||||
def from_dict(cls: Type[YY], src_dict: Dict[str, Any]) -> YY:
|
||||
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
|
||||
|
||||
YY = TypeVar("YY", bound="Discount")
|
||||
DO = TypeVar("DO", bound="Discount")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class Discount:
|
||||
@ -27,7 +27,7 @@ class Discount:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[YY], src_dict: Dict[str, Any]) -> YY:
|
||||
def from_dict(cls: Type[DO], src_dict: Dict[str, Any]) -> DO:
|
||||
d = src_dict.copy()
|
||||
_coupon = d.pop("coupon", UNSET)
|
||||
coupon: Union[Unset, Coupon]
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
DO = TypeVar("DO", bound="EmailAuthenticationForm")
|
||||
FZ = TypeVar("FZ", bound="EmailAuthenticationForm")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class EmailAuthenticationForm:
|
||||
@ -29,7 +29,7 @@ class EmailAuthenticationForm:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[DO], src_dict: Dict[str, Any]) -> DO:
|
||||
def from_dict(cls: Type[FZ], src_dict: Dict[str, Any]) -> FZ:
|
||||
d = src_dict.copy()
|
||||
callback_url = d.pop("callback_url", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
FZ = TypeVar("FZ", bound="EntityGetAllChildUuids")
|
||||
GL = TypeVar("GL", bound="EntityGetAllChildUuids")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class EntityGetAllChildUuids:
|
||||
@ -27,7 +27,7 @@ class EntityGetAllChildUuids:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[FZ], src_dict: Dict[str, Any]) -> FZ:
|
||||
def from_dict(cls: Type[GL], src_dict: Dict[str, Any]) -> GL:
|
||||
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
|
||||
|
||||
GL = TypeVar("GL", bound="EntityGetChildUuid")
|
||||
NN = TypeVar("NN", bound="EntityGetChildUuid")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class EntityGetChildUuid:
|
||||
@ -25,7 +25,7 @@ class EntityGetChildUuid:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[GL], src_dict: Dict[str, Any]) -> GL:
|
||||
def from_dict(cls: Type[NN], src_dict: Dict[str, Any]) -> NN:
|
||||
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="EntityGetNumChildren")
|
||||
OH = TypeVar("OH", bound="EntityGetNumChildren")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class EntityGetNumChildren:
|
||||
@ -25,7 +25,7 @@ class EntityGetNumChildren:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[NN], src_dict: Dict[str, Any]) -> NN:
|
||||
def from_dict(cls: Type[OH], src_dict: Dict[str, Any]) -> OH:
|
||||
d = src_dict.copy()
|
||||
num = d.pop("num", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
OH = TypeVar("OH", bound="EntityGetParentId")
|
||||
VI = TypeVar("VI", bound="EntityGetParentId")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class EntityGetParentId:
|
||||
@ -25,7 +25,7 @@ class EntityGetParentId:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[OH], src_dict: Dict[str, Any]) -> OH:
|
||||
def from_dict(cls: Type[VI], src_dict: Dict[str, Any]) -> VI:
|
||||
d = src_dict.copy()
|
||||
entity_id = d.pop("entity_id", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
VI = TypeVar("VI", bound="Error")
|
||||
ET = TypeVar("ET", bound="Error")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class Error:
|
||||
@ -33,7 +33,7 @@ class Error:
|
||||
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()
|
||||
error_code = d.pop("error_code", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
ET = TypeVar("ET", bound="Export")
|
||||
QF = TypeVar("QF", bound="Export")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class Export:
|
||||
@ -29,7 +29,7 @@ class Export:
|
||||
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()
|
||||
from ..models.export_file import ExportFile
|
||||
files = cast(List[ExportFile], d.pop("files", UNSET))
|
||||
|
@ -5,7 +5,7 @@ import attr
|
||||
from ..models.base64data import Base64Data
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
QF = TypeVar("QF", bound="ExportFile")
|
||||
DI = TypeVar("DI", bound="ExportFile")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class ExportFile:
|
||||
@ -32,7 +32,7 @@ class ExportFile:
|
||||
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()
|
||||
_contents = d.pop("contents", UNSET)
|
||||
contents: Union[Unset, Base64Data]
|
||||
|
@ -6,7 +6,7 @@ from dateutil.parser import isoparse
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
DI = TypeVar("DI", bound="ExtendedUser")
|
||||
OJ = TypeVar("OJ", bound="ExtendedUser")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class ExtendedUser:
|
||||
@ -95,7 +95,7 @@ This is mostly used for internal purposes. It returns a mapping of the user's in
|
||||
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()
|
||||
company = d.pop("company", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
OJ = TypeVar("OJ", bound="ExtendedUserResultsPage")
|
||||
UF = TypeVar("UF", bound="ExtendedUserResultsPage")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class ExtendedUserResultsPage:
|
||||
@ -33,7 +33,7 @@ class ExtendedUserResultsPage:
|
||||
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.extended_user import ExtendedUser
|
||||
items = cast(List[ExtendedUser], d.pop("items", UNSET))
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
UF = TypeVar("UF", bound="FailureWebSocketResponse")
|
||||
YF = TypeVar("YF", bound="FailureWebSocketResponse")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class FailureWebSocketResponse:
|
||||
@ -37,7 +37,7 @@ class FailureWebSocketResponse:
|
||||
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()
|
||||
from ..models.api_error import ApiError
|
||||
errors = cast(List[ApiError], d.pop("errors", UNSET))
|
||||
|
@ -11,7 +11,7 @@ from ..models.unit_length import UnitLength
|
||||
from ..models.uuid import Uuid
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
YF = TypeVar("YF", bound="FileCenterOfMass")
|
||||
PY = TypeVar("PY", bound="FileCenterOfMass")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class FileCenterOfMass:
|
||||
@ -84,7 +84,7 @@ class FileCenterOfMass:
|
||||
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()
|
||||
_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
|
||||
|
||||
PY = TypeVar("PY", bound="FileConversion")
|
||||
LK = TypeVar("LK", bound="FileConversion")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class FileConversion:
|
||||
@ -100,7 +100,7 @@ class FileConversion:
|
||||
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="FileDensity")
|
||||
AR = TypeVar("AR", bound="FileDensity")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class FileDensity:
|
||||
@ -92,7 +92,7 @@ class FileDensity:
|
||||
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]
|
||||
|
@ -11,7 +11,7 @@ from ..models.unit_mass import UnitMass
|
||||
from ..models.uuid import Uuid
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
AR = TypeVar("AR", bound="FileMass")
|
||||
WB = TypeVar("WB", bound="FileMass")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class FileMass:
|
||||
@ -92,7 +92,7 @@ class FileMass:
|
||||
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]
|
||||
|
@ -10,7 +10,7 @@ from ..models.unit_area import UnitArea
|
||||
from ..models.uuid import Uuid
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
WB = TypeVar("WB", bound="FileSurfaceArea")
|
||||
KK = TypeVar("KK", bound="FileSurfaceArea")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class FileSurfaceArea:
|
||||
@ -82,7 +82,7 @@ class FileSurfaceArea:
|
||||
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()
|
||||
_completed_at = d.pop("completed_at", UNSET)
|
||||
completed_at: Union[Unset, datetime.datetime]
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
KK = TypeVar("KK", bound="FileSystemMetadata")
|
||||
HC = TypeVar("HC", bound="FileSystemMetadata")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class FileSystemMetadata:
|
||||
@ -27,7 +27,7 @@ This is mostly used for internal purposes and debugging. """ # noqa: E501
|
||||
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()
|
||||
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
|
||||
|
||||
HC = TypeVar("HC", bound="FileVolume")
|
||||
FM = TypeVar("FM", bound="FileVolume")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class FileVolume:
|
||||
@ -82,7 +82,7 @@ class FileVolume:
|
||||
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()
|
||||
_completed_at = d.pop("completed_at", UNSET)
|
||||
completed_at: Union[Unset, datetime.datetime]
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
FM = TypeVar("FM", bound="Gateway")
|
||||
PV = TypeVar("PV", bound="Gateway")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class Gateway:
|
||||
@ -41,7 +41,7 @@ class Gateway:
|
||||
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()
|
||||
auth_timeout = d.pop("auth_timeout", UNSET)
|
||||
|
||||
|
@ -5,7 +5,7 @@ import attr
|
||||
from ..models.entity_type import EntityType
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
PV = TypeVar("PV", bound="GetEntityType")
|
||||
QI = TypeVar("QI", bound="GetEntityType")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class GetEntityType:
|
||||
@ -27,7 +27,7 @@ class GetEntityType:
|
||||
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_type = d.pop("entity_type", UNSET)
|
||||
entity_type: Union[Unset, EntityType]
|
||||
|
@ -5,7 +5,7 @@ import attr
|
||||
from ..models.point3d import Point3d
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
QI = TypeVar("QI", bound="GetSketchModePlane")
|
||||
TP = TypeVar("TP", bound="GetSketchModePlane")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class GetSketchModePlane:
|
||||
@ -37,7 +37,7 @@ class GetSketchModePlane:
|
||||
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()
|
||||
_x_axis = d.pop("x_axis", UNSET)
|
||||
x_axis: Union[Unset, Point3d]
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
TP = TypeVar("TP", bound="HighlightSetEntity")
|
||||
CF = TypeVar("CF", bound="HighlightSetEntity")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class HighlightSetEntity:
|
||||
@ -29,7 +29,7 @@ class HighlightSetEntity:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[TP], src_dict: Dict[str, Any]) -> TP:
|
||||
def from_dict(cls: Type[CF], src_dict: Dict[str, Any]) -> CF:
|
||||
d = src_dict.copy()
|
||||
entity_id = d.pop("entity_id", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
CF = TypeVar("CF", bound="IceServer")
|
||||
OM = TypeVar("OM", bound="IceServer")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class IceServer:
|
||||
@ -35,7 +35,7 @@ class IceServer:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[CF], src_dict: Dict[str, Any]) -> CF:
|
||||
def from_dict(cls: Type[OM], src_dict: Dict[str, Any]) -> OM:
|
||||
d = src_dict.copy()
|
||||
credential = d.pop("credential", UNSET)
|
||||
|
||||
|
@ -1,10 +0,0 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class ImageType(str, Enum):
|
||||
""" An enumeration. """ # noqa: E501
|
||||
PNG = 'png'
|
||||
JPG = 'jpg'
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
OM = TypeVar("OM", bound="ImportFile")
|
||||
EN = TypeVar("EN", bound="ImportFile")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class ImportFile:
|
||||
@ -31,7 +31,7 @@ class ImportFile:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[OM], src_dict: Dict[str, Any]) -> OM:
|
||||
def from_dict(cls: Type[EN], src_dict: Dict[str, Any]) -> EN:
|
||||
d = src_dict.copy()
|
||||
data = cast(List[int], d.pop("data", UNSET))
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
EN = TypeVar("EN", bound="ImportFiles")
|
||||
RS = TypeVar("RS", bound="ImportFiles")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class ImportFiles:
|
||||
@ -25,7 +25,7 @@ class ImportFiles:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[EN], src_dict: Dict[str, Any]) -> EN:
|
||||
def from_dict(cls: Type[RS], src_dict: Dict[str, Any]) -> RS:
|
||||
d = src_dict.copy()
|
||||
object_id = d.pop("object_id", UNSET)
|
||||
|
||||
|
@ -6,7 +6,7 @@ from ..models.system import System
|
||||
from ..models.unit_length import UnitLength
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
RS = TypeVar("RS", bound="fbx")
|
||||
LR = TypeVar("LR", bound="fbx")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class fbx:
|
||||
@ -26,7 +26,7 @@ class fbx:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[RS], src_dict: Dict[str, Any]) -> RS:
|
||||
def from_dict(cls: Type[LR], src_dict: Dict[str, Any]) -> LR:
|
||||
d = src_dict.copy()
|
||||
type = d.pop("type", UNSET)
|
||||
|
||||
@ -57,7 +57,7 @@ class fbx:
|
||||
|
||||
|
||||
|
||||
LR = TypeVar("LR", bound="gltf")
|
||||
MP = TypeVar("MP", bound="gltf")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class gltf:
|
||||
@ -77,7 +77,7 @@ class gltf:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[LR], src_dict: Dict[str, Any]) -> LR:
|
||||
def from_dict(cls: Type[MP], src_dict: Dict[str, Any]) -> MP:
|
||||
d = src_dict.copy()
|
||||
type = d.pop("type", UNSET)
|
||||
|
||||
@ -108,7 +108,7 @@ class gltf:
|
||||
|
||||
|
||||
|
||||
MP = TypeVar("MP", bound="obj")
|
||||
WF = TypeVar("WF", bound="obj")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class obj:
|
||||
@ -138,7 +138,7 @@ class obj:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[MP], src_dict: Dict[str, Any]) -> MP:
|
||||
def from_dict(cls: Type[WF], src_dict: Dict[str, Any]) -> WF:
|
||||
d = src_dict.copy()
|
||||
_coords = d.pop("coords", UNSET)
|
||||
coords: Union[Unset, System]
|
||||
@ -185,7 +185,7 @@ class obj:
|
||||
|
||||
|
||||
|
||||
WF = TypeVar("WF", bound="ply")
|
||||
RO = TypeVar("RO", bound="ply")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class ply:
|
||||
@ -215,7 +215,7 @@ class ply:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[WF], src_dict: Dict[str, Any]) -> WF:
|
||||
def from_dict(cls: Type[RO], src_dict: Dict[str, Any]) -> RO:
|
||||
d = src_dict.copy()
|
||||
_coords = d.pop("coords", UNSET)
|
||||
coords: Union[Unset, System]
|
||||
@ -262,7 +262,7 @@ class ply:
|
||||
|
||||
|
||||
|
||||
RO = TypeVar("RO", bound="sldprt")
|
||||
DN = TypeVar("DN", bound="sldprt")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class sldprt:
|
||||
@ -282,7 +282,7 @@ class sldprt:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[RO], src_dict: Dict[str, Any]) -> RO:
|
||||
def from_dict(cls: Type[DN], src_dict: Dict[str, Any]) -> DN:
|
||||
d = src_dict.copy()
|
||||
type = d.pop("type", UNSET)
|
||||
|
||||
@ -313,7 +313,7 @@ class sldprt:
|
||||
|
||||
|
||||
|
||||
DN = TypeVar("DN", bound="step")
|
||||
BA = TypeVar("BA", bound="step")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class step:
|
||||
@ -333,7 +333,7 @@ class step:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[DN], src_dict: Dict[str, Any]) -> DN:
|
||||
def from_dict(cls: Type[BA], src_dict: Dict[str, Any]) -> BA:
|
||||
d = src_dict.copy()
|
||||
type = d.pop("type", UNSET)
|
||||
|
||||
@ -364,7 +364,7 @@ class step:
|
||||
|
||||
|
||||
|
||||
BA = TypeVar("BA", bound="stl")
|
||||
OR = TypeVar("OR", bound="stl")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class stl:
|
||||
@ -394,7 +394,7 @@ class stl:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[BA], src_dict: Dict[str, Any]) -> BA:
|
||||
def from_dict(cls: Type[OR], src_dict: Dict[str, Any]) -> OR:
|
||||
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
|
||||
|
||||
OR = TypeVar("OR", bound="Invoice")
|
||||
CB = TypeVar("CB", bound="Invoice")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class Invoice:
|
||||
@ -138,7 +138,7 @@ class Invoice:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[OR], src_dict: Dict[str, Any]) -> OR:
|
||||
def from_dict(cls: Type[CB], src_dict: Dict[str, Any]) -> CB:
|
||||
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
|
||||
|
||||
CB = TypeVar("CB", bound="InvoiceLineItem")
|
||||
LC = TypeVar("LC", bound="InvoiceLineItem")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class InvoiceLineItem:
|
||||
@ -48,7 +48,7 @@ class InvoiceLineItem:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[CB], src_dict: Dict[str, Any]) -> CB:
|
||||
def from_dict(cls: Type[LC], src_dict: Dict[str, Any]) -> LC:
|
||||
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
|
||||
|
||||
LC = TypeVar("LC", bound="Jetstream")
|
||||
TO = TypeVar("TO", bound="Jetstream")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class Jetstream:
|
||||
@ -39,7 +39,7 @@ class Jetstream:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[LC], src_dict: Dict[str, Any]) -> LC:
|
||||
def from_dict(cls: Type[TO], src_dict: Dict[str, Any]) -> TO:
|
||||
d = src_dict.copy()
|
||||
_config = d.pop("config", UNSET)
|
||||
config: Union[Unset, JetstreamConfig]
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
TO = TypeVar("TO", bound="JetstreamApiStats")
|
||||
ZP = TypeVar("ZP", bound="JetstreamApiStats")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class JetstreamApiStats:
|
||||
@ -33,7 +33,7 @@ class JetstreamApiStats:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[TO], src_dict: Dict[str, Any]) -> TO:
|
||||
def from_dict(cls: Type[ZP], src_dict: Dict[str, Any]) -> ZP:
|
||||
d = src_dict.copy()
|
||||
errors = d.pop("errors", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
ZP = TypeVar("ZP", bound="JetstreamConfig")
|
||||
EO = TypeVar("EO", bound="JetstreamConfig")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class JetstreamConfig:
|
||||
@ -37,7 +37,7 @@ class JetstreamConfig:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[ZP], src_dict: Dict[str, Any]) -> ZP:
|
||||
def from_dict(cls: Type[EO], src_dict: Dict[str, Any]) -> EO:
|
||||
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
|
||||
|
||||
EO = TypeVar("EO", bound="JetstreamStats")
|
||||
NY = TypeVar("NY", bound="JetstreamStats")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class JetstreamStats:
|
||||
@ -51,7 +51,7 @@ class JetstreamStats:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[EO], src_dict: Dict[str, Any]) -> EO:
|
||||
def from_dict(cls: Type[NY], src_dict: Dict[str, Any]) -> NY:
|
||||
d = src_dict.copy()
|
||||
accounts = d.pop("accounts", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
NY = TypeVar("NY", bound="LeafNode")
|
||||
QO = TypeVar("QO", bound="LeafNode")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class LeafNode:
|
||||
@ -37,7 +37,7 @@ class LeafNode:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[NY], src_dict: Dict[str, Any]) -> NY:
|
||||
def from_dict(cls: Type[QO], src_dict: Dict[str, Any]) -> QO:
|
||||
d = src_dict.copy()
|
||||
auth_timeout = d.pop("auth_timeout", UNSET)
|
||||
|
||||
|
@ -5,7 +5,7 @@ import attr
|
||||
from ..models.unit_mass import UnitMass
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
QO = TypeVar("QO", bound="Mass")
|
||||
KX = TypeVar("KX", bound="Mass")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class Mass:
|
||||
@ -31,7 +31,7 @@ class Mass:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[QO], src_dict: Dict[str, Any]) -> QO:
|
||||
def from_dict(cls: Type[KX], src_dict: Dict[str, Any]) -> KX:
|
||||
d = src_dict.copy()
|
||||
mass = d.pop("mass", UNSET)
|
||||
|
||||
|
@ -6,7 +6,6 @@ from ..models.cache_metadata import CacheMetadata
|
||||
from ..models.connection import Connection
|
||||
from ..models.environment import Environment
|
||||
from ..models.file_system_metadata import FileSystemMetadata
|
||||
from ..models.point_e_metadata import PointEMetadata
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
WO = TypeVar("WO", bound="Metadata")
|
||||
@ -20,7 +19,6 @@ This is mostly used for internal purposes and debugging. """ # noqa: E501
|
||||
environment: Union[Unset, Environment] = UNSET
|
||||
fs: Union[Unset, FileSystemMetadata] = UNSET
|
||||
git_hash: Union[Unset, str] = UNSET
|
||||
point_e: Union[Unset, PointEMetadata] = UNSET
|
||||
pubsub: Union[Unset, Connection] = UNSET
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
@ -33,8 +31,6 @@ This is mostly used for internal purposes and debugging. """ # noqa: E501
|
||||
if not isinstance(self.fs, Unset):
|
||||
fs = self.fs
|
||||
git_hash = self.git_hash
|
||||
if not isinstance(self.point_e, Unset):
|
||||
point_e = self.point_e
|
||||
if not isinstance(self.pubsub, Unset):
|
||||
pubsub = self.pubsub
|
||||
|
||||
@ -49,8 +45,6 @@ This is mostly used for internal purposes and debugging. """ # noqa: E501
|
||||
field_dict['fs'] = fs
|
||||
if git_hash is not UNSET:
|
||||
field_dict['git_hash'] = git_hash
|
||||
if point_e is not UNSET:
|
||||
field_dict['point_e'] = point_e
|
||||
if pubsub is not UNSET:
|
||||
field_dict['pubsub'] = pubsub
|
||||
|
||||
@ -82,13 +76,6 @@ This is mostly used for internal purposes and debugging. """ # noqa: E501
|
||||
|
||||
git_hash = d.pop("git_hash", UNSET)
|
||||
|
||||
_point_e = d.pop("point_e", UNSET)
|
||||
point_e: Union[Unset, PointEMetadata]
|
||||
if isinstance(_point_e, Unset):
|
||||
point_e = UNSET
|
||||
else:
|
||||
point_e = _point_e # type: ignore[arg-type]
|
||||
|
||||
_pubsub = d.pop("pubsub", UNSET)
|
||||
pubsub: Union[Unset, Connection]
|
||||
if isinstance(_pubsub, Unset):
|
||||
@ -102,7 +89,6 @@ This is mostly used for internal purposes and debugging. """ # noqa: E501
|
||||
environment= environment,
|
||||
fs= fs,
|
||||
git_hash= git_hash,
|
||||
point_e= point_e,
|
||||
pubsub= pubsub,
|
||||
)
|
||||
|
||||
|
@ -2170,7 +2170,72 @@ class get_entity_type:
|
||||
|
||||
|
||||
|
||||
TN = TypeVar("TN", bound="solid3d_get_all_edge_faces")
|
||||
TN = TypeVar("TN", bound="solid2d_add_hole")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class solid2d_add_hole:
|
||||
""" Add a hole to a Solid2d object before extruding it. """ # noqa: E501
|
||||
hole_id: Union[Unset, str] = UNSET
|
||||
object_id: Union[Unset, str] = UNSET
|
||||
type: str = "solid2d_add_hole"
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
hole_id = self.hole_id
|
||||
object_id = self.object_id
|
||||
type = self.type
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if hole_id is not UNSET:
|
||||
field_dict['hole_id'] = hole_id
|
||||
if object_id is not UNSET:
|
||||
field_dict['object_id'] = object_id
|
||||
field_dict['type'] = type
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[TN], src_dict: Dict[str, Any]) -> TN:
|
||||
d = src_dict.copy()
|
||||
hole_id = d.pop("hole_id", UNSET)
|
||||
|
||||
object_id = d.pop("object_id", UNSET)
|
||||
|
||||
type = d.pop("type", UNSET)
|
||||
|
||||
|
||||
solid2d_add_hole = cls(
|
||||
hole_id= hole_id,
|
||||
object_id= object_id,
|
||||
type= type,
|
||||
)
|
||||
|
||||
solid2d_add_hole.additional_properties = d
|
||||
return solid2d_add_hole
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
|
||||
|
||||
MZ = TypeVar("MZ", bound="solid3d_get_all_edge_faces")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class solid3d_get_all_edge_faces:
|
||||
@ -2198,7 +2263,7 @@ class solid3d_get_all_edge_faces:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[TN], src_dict: Dict[str, Any]) -> TN:
|
||||
def from_dict(cls: Type[MZ], src_dict: Dict[str, Any]) -> MZ:
|
||||
d = src_dict.copy()
|
||||
edge_id = d.pop("edge_id", UNSET)
|
||||
|
||||
@ -2235,7 +2300,7 @@ class solid3d_get_all_edge_faces:
|
||||
|
||||
|
||||
|
||||
MZ = TypeVar("MZ", bound="solid3d_get_all_opposite_edges")
|
||||
UG = TypeVar("UG", bound="solid3d_get_all_opposite_edges")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class solid3d_get_all_opposite_edges:
|
||||
@ -2268,7 +2333,7 @@ class solid3d_get_all_opposite_edges:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[MZ], src_dict: Dict[str, Any]) -> MZ:
|
||||
def from_dict(cls: Type[UG], src_dict: Dict[str, Any]) -> UG:
|
||||
d = src_dict.copy()
|
||||
_along_vector = d.pop("along_vector", UNSET)
|
||||
along_vector: Union[Unset, Point3d]
|
||||
@ -2313,7 +2378,7 @@ class solid3d_get_all_opposite_edges:
|
||||
|
||||
|
||||
|
||||
UG = TypeVar("UG", bound="solid3d_get_opposite_edge")
|
||||
CY = TypeVar("CY", bound="solid3d_get_opposite_edge")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class solid3d_get_opposite_edge:
|
||||
@ -2345,7 +2410,7 @@ class solid3d_get_opposite_edge:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[UG], src_dict: Dict[str, Any]) -> UG:
|
||||
def from_dict(cls: Type[CY], src_dict: Dict[str, Any]) -> CY:
|
||||
d = src_dict.copy()
|
||||
edge_id = d.pop("edge_id", UNSET)
|
||||
|
||||
@ -2385,7 +2450,7 @@ class solid3d_get_opposite_edge:
|
||||
|
||||
|
||||
|
||||
CY = TypeVar("CY", bound="solid3d_get_next_adjacent_edge")
|
||||
NZ = TypeVar("NZ", bound="solid3d_get_next_adjacent_edge")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class solid3d_get_next_adjacent_edge:
|
||||
@ -2417,7 +2482,7 @@ class solid3d_get_next_adjacent_edge:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[CY], src_dict: Dict[str, Any]) -> CY:
|
||||
def from_dict(cls: Type[NZ], src_dict: Dict[str, Any]) -> NZ:
|
||||
d = src_dict.copy()
|
||||
edge_id = d.pop("edge_id", UNSET)
|
||||
|
||||
@ -2457,7 +2522,7 @@ class solid3d_get_next_adjacent_edge:
|
||||
|
||||
|
||||
|
||||
NZ = TypeVar("NZ", bound="solid3d_get_prev_adjacent_edge")
|
||||
LI = TypeVar("LI", bound="solid3d_get_prev_adjacent_edge")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class solid3d_get_prev_adjacent_edge:
|
||||
@ -2489,7 +2554,7 @@ class solid3d_get_prev_adjacent_edge:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[NZ], src_dict: Dict[str, Any]) -> NZ:
|
||||
def from_dict(cls: Type[LI], src_dict: Dict[str, Any]) -> LI:
|
||||
d = src_dict.copy()
|
||||
edge_id = d.pop("edge_id", UNSET)
|
||||
|
||||
@ -2529,7 +2594,7 @@ class solid3d_get_prev_adjacent_edge:
|
||||
|
||||
|
||||
|
||||
LI = TypeVar("LI", bound="send_object")
|
||||
LO = TypeVar("LO", bound="send_object")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class send_object:
|
||||
@ -2557,7 +2622,7 @@ class send_object:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[LI], src_dict: Dict[str, Any]) -> LI:
|
||||
def from_dict(cls: Type[LO], src_dict: Dict[str, Any]) -> LO:
|
||||
d = src_dict.copy()
|
||||
front = d.pop("front", UNSET)
|
||||
|
||||
@ -2594,7 +2659,7 @@ class send_object:
|
||||
|
||||
|
||||
|
||||
LO = TypeVar("LO", bound="entity_set_opacity")
|
||||
XJ = TypeVar("XJ", bound="entity_set_opacity")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class entity_set_opacity:
|
||||
@ -2622,7 +2687,7 @@ class entity_set_opacity:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[LO], src_dict: Dict[str, Any]) -> LO:
|
||||
def from_dict(cls: Type[XJ], src_dict: Dict[str, Any]) -> XJ:
|
||||
d = src_dict.copy()
|
||||
entity_id = d.pop("entity_id", UNSET)
|
||||
|
||||
@ -2659,7 +2724,7 @@ class entity_set_opacity:
|
||||
|
||||
|
||||
|
||||
XJ = TypeVar("XJ", bound="entity_fade")
|
||||
OW = TypeVar("OW", bound="entity_fade")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class entity_fade:
|
||||
@ -2691,7 +2756,7 @@ class entity_fade:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[XJ], src_dict: Dict[str, Any]) -> XJ:
|
||||
def from_dict(cls: Type[OW], src_dict: Dict[str, Any]) -> OW:
|
||||
d = src_dict.copy()
|
||||
duration_seconds = d.pop("duration_seconds", UNSET)
|
||||
|
||||
@ -2731,7 +2796,7 @@ class entity_fade:
|
||||
|
||||
|
||||
|
||||
OW = TypeVar("OW", bound="make_plane")
|
||||
JQ = TypeVar("JQ", bound="make_plane")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class make_plane:
|
||||
@ -2778,7 +2843,7 @@ class make_plane:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[OW], src_dict: Dict[str, Any]) -> OW:
|
||||
def from_dict(cls: Type[JQ], src_dict: Dict[str, Any]) -> JQ:
|
||||
d = src_dict.copy()
|
||||
clobber = d.pop("clobber", UNSET)
|
||||
|
||||
@ -2842,7 +2907,7 @@ class make_plane:
|
||||
|
||||
|
||||
|
||||
JQ = TypeVar("JQ", bound="plane_set_color")
|
||||
PQ = TypeVar("PQ", bound="plane_set_color")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class plane_set_color:
|
||||
@ -2871,7 +2936,7 @@ class plane_set_color:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[JQ], src_dict: Dict[str, Any]) -> JQ:
|
||||
def from_dict(cls: Type[PQ], src_dict: Dict[str, Any]) -> PQ:
|
||||
d = src_dict.copy()
|
||||
_color = d.pop("color", UNSET)
|
||||
color: Union[Unset, Color]
|
||||
@ -2913,7 +2978,7 @@ class plane_set_color:
|
||||
|
||||
|
||||
|
||||
PQ = TypeVar("PQ", bound="set_tool")
|
||||
IM = TypeVar("IM", bound="set_tool")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class set_tool:
|
||||
@ -2938,7 +3003,7 @@ class set_tool:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[PQ], src_dict: Dict[str, Any]) -> PQ:
|
||||
def from_dict(cls: Type[IM], src_dict: Dict[str, Any]) -> IM:
|
||||
d = src_dict.copy()
|
||||
_tool = d.pop("tool", UNSET)
|
||||
tool: Union[Unset, SceneToolType]
|
||||
@ -2977,7 +3042,7 @@ class set_tool:
|
||||
|
||||
|
||||
|
||||
IM = TypeVar("IM", bound="mouse_move")
|
||||
OU = TypeVar("OU", bound="mouse_move")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class mouse_move:
|
||||
@ -3006,7 +3071,7 @@ class mouse_move:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[IM], src_dict: Dict[str, Any]) -> IM:
|
||||
def from_dict(cls: Type[OU], src_dict: Dict[str, Any]) -> OU:
|
||||
d = src_dict.copy()
|
||||
sequence = d.pop("sequence", UNSET)
|
||||
|
||||
@ -3048,7 +3113,7 @@ class mouse_move:
|
||||
|
||||
|
||||
|
||||
OU = TypeVar("OU", bound="mouse_click")
|
||||
KL = TypeVar("KL", bound="mouse_click")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class mouse_click:
|
||||
@ -3073,7 +3138,7 @@ class mouse_click:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[OU], src_dict: Dict[str, Any]) -> OU:
|
||||
def from_dict(cls: Type[KL], src_dict: Dict[str, Any]) -> KL:
|
||||
d = src_dict.copy()
|
||||
type = d.pop("type", UNSET)
|
||||
|
||||
@ -3112,7 +3177,7 @@ class mouse_click:
|
||||
|
||||
|
||||
|
||||
KL = TypeVar("KL", bound="sketch_mode_enable")
|
||||
XI = TypeVar("XI", bound="sketch_mode_enable")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class sketch_mode_enable:
|
||||
@ -3149,7 +3214,7 @@ class sketch_mode_enable:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[KL], src_dict: Dict[str, Any]) -> KL:
|
||||
def from_dict(cls: Type[XI], src_dict: Dict[str, Any]) -> XI:
|
||||
d = src_dict.copy()
|
||||
animated = d.pop("animated", UNSET)
|
||||
|
||||
@ -3197,7 +3262,7 @@ class sketch_mode_enable:
|
||||
|
||||
|
||||
|
||||
XI = TypeVar("XI", bound="sketch_mode_disable")
|
||||
PO = TypeVar("PO", bound="sketch_mode_disable")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class sketch_mode_disable:
|
||||
@ -3217,7 +3282,7 @@ class sketch_mode_disable:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[XI], src_dict: Dict[str, Any]) -> XI:
|
||||
def from_dict(cls: Type[PO], src_dict: Dict[str, Any]) -> PO:
|
||||
d = src_dict.copy()
|
||||
type = d.pop("type", UNSET)
|
||||
|
||||
@ -3248,7 +3313,7 @@ class sketch_mode_disable:
|
||||
|
||||
|
||||
|
||||
PO = TypeVar("PO", bound="curve_get_type")
|
||||
PS = TypeVar("PS", bound="curve_get_type")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class curve_get_type:
|
||||
@ -3272,7 +3337,7 @@ class curve_get_type:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[PO], src_dict: Dict[str, Any]) -> PO:
|
||||
def from_dict(cls: Type[PS], src_dict: Dict[str, Any]) -> PS:
|
||||
d = src_dict.copy()
|
||||
curve_id = d.pop("curve_id", UNSET)
|
||||
|
||||
@ -3306,7 +3371,7 @@ class curve_get_type:
|
||||
|
||||
|
||||
|
||||
PS = TypeVar("PS", bound="curve_get_control_points")
|
||||
WR = TypeVar("WR", bound="curve_get_control_points")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class curve_get_control_points:
|
||||
@ -3330,7 +3395,7 @@ class curve_get_control_points:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[PS], src_dict: Dict[str, Any]) -> PS:
|
||||
def from_dict(cls: Type[WR], src_dict: Dict[str, Any]) -> WR:
|
||||
d = src_dict.copy()
|
||||
curve_id = d.pop("curve_id", UNSET)
|
||||
|
||||
@ -3364,7 +3429,7 @@ class curve_get_control_points:
|
||||
|
||||
|
||||
|
||||
WR = TypeVar("WR", bound="take_snapshot")
|
||||
XL = TypeVar("XL", bound="take_snapshot")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class take_snapshot:
|
||||
@ -3389,7 +3454,7 @@ class take_snapshot:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[WR], src_dict: Dict[str, Any]) -> WR:
|
||||
def from_dict(cls: Type[XL], src_dict: Dict[str, Any]) -> XL:
|
||||
d = src_dict.copy()
|
||||
_format = d.pop("format", UNSET)
|
||||
format: Union[Unset, ImageFormat]
|
||||
@ -3428,7 +3493,7 @@ class take_snapshot:
|
||||
|
||||
|
||||
|
||||
XL = TypeVar("XL", bound="make_axes_gizmo")
|
||||
ZX = TypeVar("ZX", bound="make_axes_gizmo")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class make_axes_gizmo:
|
||||
@ -3456,7 +3521,7 @@ class make_axes_gizmo:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[XL], src_dict: Dict[str, Any]) -> XL:
|
||||
def from_dict(cls: Type[ZX], src_dict: Dict[str, Any]) -> ZX:
|
||||
d = src_dict.copy()
|
||||
clobber = d.pop("clobber", UNSET)
|
||||
|
||||
@ -3493,7 +3558,7 @@ class make_axes_gizmo:
|
||||
|
||||
|
||||
|
||||
ZX = TypeVar("ZX", bound="path_get_info")
|
||||
FT = TypeVar("FT", bound="path_get_info")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class path_get_info:
|
||||
@ -3517,7 +3582,7 @@ class path_get_info:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[ZX], src_dict: Dict[str, Any]) -> ZX:
|
||||
def from_dict(cls: Type[FT], src_dict: Dict[str, Any]) -> FT:
|
||||
d = src_dict.copy()
|
||||
path_id = d.pop("path_id", UNSET)
|
||||
|
||||
@ -3551,7 +3616,7 @@ class path_get_info:
|
||||
|
||||
|
||||
|
||||
FT = TypeVar("FT", bound="path_get_curve_uuids_for_vertices")
|
||||
NX = TypeVar("NX", bound="path_get_curve_uuids_for_vertices")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class path_get_curve_uuids_for_vertices:
|
||||
@ -3581,7 +3646,7 @@ class path_get_curve_uuids_for_vertices:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[FT], src_dict: Dict[str, Any]) -> FT:
|
||||
def from_dict(cls: Type[NX], src_dict: Dict[str, Any]) -> NX:
|
||||
d = src_dict.copy()
|
||||
path_id = d.pop("path_id", UNSET)
|
||||
|
||||
@ -3618,7 +3683,65 @@ class path_get_curve_uuids_for_vertices:
|
||||
|
||||
|
||||
|
||||
NX = TypeVar("NX", bound="handle_mouse_drag_start")
|
||||
SC = TypeVar("SC", bound="path_get_vertex_uuids")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class path_get_vertex_uuids:
|
||||
""" Get vertices within a path """ # noqa: E501
|
||||
path_id: Union[Unset, str] = UNSET
|
||||
type: str = "path_get_vertex_uuids"
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
path_id = self.path_id
|
||||
type = self.type
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if path_id is not UNSET:
|
||||
field_dict['path_id'] = path_id
|
||||
field_dict['type'] = type
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[SC], src_dict: Dict[str, Any]) -> SC:
|
||||
d = src_dict.copy()
|
||||
path_id = d.pop("path_id", UNSET)
|
||||
|
||||
type = d.pop("type", UNSET)
|
||||
|
||||
|
||||
path_get_vertex_uuids = cls(
|
||||
path_id= path_id,
|
||||
type= type,
|
||||
)
|
||||
|
||||
path_get_vertex_uuids.additional_properties = d
|
||||
return path_get_vertex_uuids
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
|
||||
|
||||
TX = TypeVar("TX", bound="handle_mouse_drag_start")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class handle_mouse_drag_start:
|
||||
@ -3643,7 +3766,7 @@ class handle_mouse_drag_start:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[NX], src_dict: Dict[str, Any]) -> NX:
|
||||
def from_dict(cls: Type[TX], src_dict: Dict[str, Any]) -> TX:
|
||||
d = src_dict.copy()
|
||||
type = d.pop("type", UNSET)
|
||||
|
||||
@ -3682,7 +3805,7 @@ class handle_mouse_drag_start:
|
||||
|
||||
|
||||
|
||||
SC = TypeVar("SC", bound="handle_mouse_drag_move")
|
||||
JA = TypeVar("JA", bound="handle_mouse_drag_move")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class handle_mouse_drag_move:
|
||||
@ -3711,7 +3834,7 @@ class handle_mouse_drag_move:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[SC], src_dict: Dict[str, Any]) -> SC:
|
||||
def from_dict(cls: Type[JA], src_dict: Dict[str, Any]) -> JA:
|
||||
d = src_dict.copy()
|
||||
sequence = d.pop("sequence", UNSET)
|
||||
|
||||
@ -3753,7 +3876,7 @@ class handle_mouse_drag_move:
|
||||
|
||||
|
||||
|
||||
TX = TypeVar("TX", bound="handle_mouse_drag_end")
|
||||
SK = TypeVar("SK", bound="handle_mouse_drag_end")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class handle_mouse_drag_end:
|
||||
@ -3778,7 +3901,7 @@ class handle_mouse_drag_end:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[TX], src_dict: Dict[str, Any]) -> TX:
|
||||
def from_dict(cls: Type[SK], src_dict: Dict[str, Any]) -> SK:
|
||||
d = src_dict.copy()
|
||||
type = d.pop("type", UNSET)
|
||||
|
||||
@ -3817,7 +3940,7 @@ class handle_mouse_drag_end:
|
||||
|
||||
|
||||
|
||||
JA = TypeVar("JA", bound="remove_scene_objects")
|
||||
UK = TypeVar("UK", bound="remove_scene_objects")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class remove_scene_objects:
|
||||
@ -3843,7 +3966,7 @@ class remove_scene_objects:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[JA], src_dict: Dict[str, Any]) -> JA:
|
||||
def from_dict(cls: Type[UK], src_dict: Dict[str, Any]) -> UK:
|
||||
d = src_dict.copy()
|
||||
object_ids = cast(List[str], d.pop("object_ids", UNSET))
|
||||
|
||||
@ -3877,7 +4000,7 @@ class remove_scene_objects:
|
||||
|
||||
|
||||
|
||||
SK = TypeVar("SK", bound="plane_intersect_and_project")
|
||||
CX = TypeVar("CX", bound="plane_intersect_and_project")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class plane_intersect_and_project:
|
||||
@ -3906,7 +4029,7 @@ class plane_intersect_and_project:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[SK], src_dict: Dict[str, Any]) -> SK:
|
||||
def from_dict(cls: Type[CX], src_dict: Dict[str, Any]) -> CX:
|
||||
d = src_dict.copy()
|
||||
plane_id = d.pop("plane_id", UNSET)
|
||||
|
||||
@ -3948,7 +4071,7 @@ class plane_intersect_and_project:
|
||||
|
||||
|
||||
|
||||
UK = TypeVar("UK", bound="curve_get_end_points")
|
||||
MT = TypeVar("MT", bound="curve_get_end_points")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class curve_get_end_points:
|
||||
@ -3972,7 +4095,7 @@ class curve_get_end_points:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[UK], src_dict: Dict[str, Any]) -> UK:
|
||||
def from_dict(cls: Type[MT], src_dict: Dict[str, Any]) -> MT:
|
||||
d = src_dict.copy()
|
||||
curve_id = d.pop("curve_id", UNSET)
|
||||
|
||||
@ -4006,7 +4129,7 @@ class curve_get_end_points:
|
||||
|
||||
|
||||
|
||||
CX = TypeVar("CX", bound="reconfigure_stream")
|
||||
LJ = TypeVar("LJ", bound="reconfigure_stream")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class reconfigure_stream:
|
||||
@ -4038,7 +4161,7 @@ class reconfigure_stream:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[CX], src_dict: Dict[str, Any]) -> CX:
|
||||
def from_dict(cls: Type[LJ], src_dict: Dict[str, Any]) -> LJ:
|
||||
d = src_dict.copy()
|
||||
fps = d.pop("fps", UNSET)
|
||||
|
||||
@ -4078,7 +4201,7 @@ class reconfigure_stream:
|
||||
|
||||
|
||||
|
||||
MT = TypeVar("MT", bound="import_files")
|
||||
TF = TypeVar("TF", bound="import_files")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class import_files:
|
||||
@ -4106,7 +4229,7 @@ class import_files:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[MT], src_dict: Dict[str, Any]) -> MT:
|
||||
def from_dict(cls: Type[TF], src_dict: Dict[str, Any]) -> TF:
|
||||
d = src_dict.copy()
|
||||
from ..models.import_file import ImportFile
|
||||
files = cast(List[ImportFile], d.pop("files", UNSET))
|
||||
@ -4141,7 +4264,7 @@ class import_files:
|
||||
|
||||
|
||||
|
||||
LJ = TypeVar("LJ", bound="mass")
|
||||
HF = TypeVar("HF", bound="mass")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class mass:
|
||||
@ -4186,7 +4309,7 @@ class mass:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[LJ], src_dict: Dict[str, Any]) -> LJ:
|
||||
def from_dict(cls: Type[HF], src_dict: Dict[str, Any]) -> HF:
|
||||
d = src_dict.copy()
|
||||
entity_ids = cast(List[str], d.pop("entity_ids", UNSET))
|
||||
|
||||
@ -4247,7 +4370,7 @@ class mass:
|
||||
|
||||
|
||||
|
||||
TF = TypeVar("TF", bound="density")
|
||||
JD = TypeVar("JD", bound="density")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class density:
|
||||
@ -4292,7 +4415,7 @@ class density:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[TF], src_dict: Dict[str, Any]) -> TF:
|
||||
def from_dict(cls: Type[JD], src_dict: Dict[str, Any]) -> JD:
|
||||
d = src_dict.copy()
|
||||
entity_ids = cast(List[str], d.pop("entity_ids", UNSET))
|
||||
|
||||
@ -4353,7 +4476,7 @@ class density:
|
||||
|
||||
|
||||
|
||||
HF = TypeVar("HF", bound="volume")
|
||||
RZ = TypeVar("RZ", bound="volume")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class volume:
|
||||
@ -4389,7 +4512,7 @@ class volume:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[HF], src_dict: Dict[str, Any]) -> HF:
|
||||
def from_dict(cls: Type[RZ], src_dict: Dict[str, Any]) -> RZ:
|
||||
d = src_dict.copy()
|
||||
entity_ids = cast(List[str], d.pop("entity_ids", UNSET))
|
||||
|
||||
@ -4439,7 +4562,7 @@ class volume:
|
||||
|
||||
|
||||
|
||||
JD = TypeVar("JD", bound="center_of_mass")
|
||||
BH = TypeVar("BH", bound="center_of_mass")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class center_of_mass:
|
||||
@ -4475,7 +4598,7 @@ class center_of_mass:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[JD], src_dict: Dict[str, Any]) -> JD:
|
||||
def from_dict(cls: Type[BH], src_dict: Dict[str, Any]) -> BH:
|
||||
d = src_dict.copy()
|
||||
entity_ids = cast(List[str], d.pop("entity_ids", UNSET))
|
||||
|
||||
@ -4525,7 +4648,7 @@ class center_of_mass:
|
||||
|
||||
|
||||
|
||||
RZ = TypeVar("RZ", bound="surface_area")
|
||||
SX = TypeVar("SX", bound="surface_area")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class surface_area:
|
||||
@ -4561,7 +4684,7 @@ class surface_area:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[RZ], src_dict: Dict[str, Any]) -> RZ:
|
||||
def from_dict(cls: Type[SX], src_dict: Dict[str, Any]) -> SX:
|
||||
d = src_dict.copy()
|
||||
entity_ids = cast(List[str], d.pop("entity_ids", UNSET))
|
||||
|
||||
@ -4611,7 +4734,7 @@ class surface_area:
|
||||
|
||||
|
||||
|
||||
BH = TypeVar("BH", bound="get_sketch_mode_plane")
|
||||
CN = TypeVar("CN", bound="get_sketch_mode_plane")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class get_sketch_mode_plane:
|
||||
@ -4631,7 +4754,7 @@ class get_sketch_mode_plane:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[BH], src_dict: Dict[str, Any]) -> BH:
|
||||
def from_dict(cls: Type[CN], src_dict: Dict[str, Any]) -> CN:
|
||||
d = src_dict.copy()
|
||||
type = d.pop("type", UNSET)
|
||||
|
||||
@ -4659,4 +4782,4 @@ class get_sketch_mode_plane:
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
|
||||
ModelingCmd = Union[start_path, move_path_pen, extend_path, extrude, close_path, camera_drag_start, camera_drag_move, camera_drag_end, default_camera_look_at, default_camera_zoom, default_camera_enable_sketch_mode, default_camera_disable_sketch_mode, export, entity_get_parent_id, entity_get_num_children, entity_get_child_uuid, entity_get_all_child_uuids, edit_mode_enter, edit_mode_exit, select_with_point, select_clear, select_add, select_remove, select_replace, select_get, highlight_set_entity, highlight_set_entities, new_annotation, update_annotation, object_visible, object_bring_to_front, get_entity_type, solid3d_get_all_edge_faces, solid3d_get_all_opposite_edges, solid3d_get_opposite_edge, solid3d_get_next_adjacent_edge, solid3d_get_prev_adjacent_edge, send_object, entity_set_opacity, entity_fade, make_plane, plane_set_color, set_tool, mouse_move, mouse_click, sketch_mode_enable, sketch_mode_disable, curve_get_type, curve_get_control_points, take_snapshot, make_axes_gizmo, path_get_info, path_get_curve_uuids_for_vertices, handle_mouse_drag_start, handle_mouse_drag_move, handle_mouse_drag_end, remove_scene_objects, plane_intersect_and_project, curve_get_end_points, reconfigure_stream, import_files, mass, density, volume, center_of_mass, surface_area, get_sketch_mode_plane]
|
||||
ModelingCmd = Union[start_path, move_path_pen, extend_path, extrude, close_path, camera_drag_start, camera_drag_move, camera_drag_end, default_camera_look_at, default_camera_zoom, default_camera_enable_sketch_mode, default_camera_disable_sketch_mode, export, entity_get_parent_id, entity_get_num_children, entity_get_child_uuid, entity_get_all_child_uuids, edit_mode_enter, edit_mode_exit, select_with_point, select_clear, select_add, select_remove, select_replace, select_get, highlight_set_entity, highlight_set_entities, new_annotation, update_annotation, object_visible, object_bring_to_front, get_entity_type, solid2d_add_hole, solid3d_get_all_edge_faces, solid3d_get_all_opposite_edges, solid3d_get_opposite_edge, solid3d_get_next_adjacent_edge, solid3d_get_prev_adjacent_edge, send_object, entity_set_opacity, entity_fade, make_plane, plane_set_color, set_tool, mouse_move, mouse_click, sketch_mode_enable, sketch_mode_disable, curve_get_type, curve_get_control_points, take_snapshot, make_axes_gizmo, path_get_info, path_get_curve_uuids_for_vertices, path_get_vertex_uuids, handle_mouse_drag_start, handle_mouse_drag_move, handle_mouse_drag_end, remove_scene_objects, plane_intersect_and_project, curve_get_end_points, reconfigure_stream, import_files, mass, density, volume, center_of_mass, surface_area, get_sketch_mode_plane]
|
||||
|
75
kittycad/models/modeling_cmd_req.py
Normal file
75
kittycad/models/modeling_cmd_req.py
Normal file
@ -0,0 +1,75 @@
|
||||
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
|
||||
|
||||
GS = TypeVar("GS", 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[GS], src_dict: Dict[str, Any]) -> GS:
|
||||
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
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
SX = TypeVar("SX", bound="MouseClick")
|
||||
SO = TypeVar("SO", bound="MouseClick")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class MouseClick:
|
||||
@ -33,7 +33,7 @@ class MouseClick:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[SX], src_dict: Dict[str, Any]) -> SX:
|
||||
def from_dict(cls: Type[SO], src_dict: Dict[str, Any]) -> SO:
|
||||
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
|
||||
|
||||
CN = TypeVar("CN", bound="NewAddress")
|
||||
ZS = TypeVar("ZS", bound="NewAddress")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class NewAddress:
|
||||
@ -51,7 +51,7 @@ class NewAddress:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[CN], src_dict: Dict[str, Any]) -> CN:
|
||||
def from_dict(cls: Type[ZS], src_dict: Dict[str, Any]) -> ZS:
|
||||
d = src_dict.copy()
|
||||
city = d.pop("city", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
GS = TypeVar("GS", bound="OAuth2ClientInfo")
|
||||
AM = TypeVar("AM", bound="OAuth2ClientInfo")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class OAuth2ClientInfo:
|
||||
@ -33,7 +33,7 @@ class OAuth2ClientInfo:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[GS], src_dict: Dict[str, Any]) -> GS:
|
||||
def from_dict(cls: Type[AM], src_dict: Dict[str, Any]) -> AM:
|
||||
d = src_dict.copy()
|
||||
csrf_token = d.pop("csrf_token", UNSET)
|
||||
|
||||
|
@ -20,6 +20,7 @@ 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.path_get_vertex_uuids import PathGetVertexUuids
|
||||
from ..models.plane_intersect_and_project import PlaneIntersectAndProject
|
||||
from ..models.select_get import SelectGet
|
||||
from ..models.select_with_point import SelectWithPoint
|
||||
@ -33,7 +34,7 @@ from ..models.take_snapshot import TakeSnapshot
|
||||
from ..models.volume import Volume
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
SO = TypeVar("SO", bound="empty")
|
||||
GK = TypeVar("GK", bound="empty")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class empty:
|
||||
@ -53,7 +54,7 @@ class empty:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[SO], src_dict: Dict[str, Any]) -> SO:
|
||||
def from_dict(cls: Type[GK], src_dict: Dict[str, Any]) -> GK:
|
||||
d = src_dict.copy()
|
||||
type = d.pop("type", UNSET)
|
||||
|
||||
@ -84,7 +85,7 @@ class empty:
|
||||
|
||||
|
||||
|
||||
ZS = TypeVar("ZS", bound="export")
|
||||
SG = TypeVar("SG", bound="export")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class export:
|
||||
@ -109,7 +110,7 @@ class export:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[ZS], src_dict: Dict[str, Any]) -> ZS:
|
||||
def from_dict(cls: Type[SG], src_dict: Dict[str, Any]) -> SG:
|
||||
d = src_dict.copy()
|
||||
_data = d.pop("data", UNSET)
|
||||
data: Union[Unset, Export]
|
||||
@ -148,7 +149,7 @@ class export:
|
||||
|
||||
|
||||
|
||||
AM = TypeVar("AM", bound="select_with_point")
|
||||
QZ = TypeVar("QZ", bound="select_with_point")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class select_with_point:
|
||||
@ -173,7 +174,7 @@ class select_with_point:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[AM], src_dict: Dict[str, Any]) -> AM:
|
||||
def from_dict(cls: Type[QZ], src_dict: Dict[str, Any]) -> QZ:
|
||||
d = src_dict.copy()
|
||||
_data = d.pop("data", UNSET)
|
||||
data: Union[Unset, SelectWithPoint]
|
||||
@ -212,7 +213,7 @@ class select_with_point:
|
||||
|
||||
|
||||
|
||||
GK = TypeVar("GK", bound="highlight_set_entity")
|
||||
SY = TypeVar("SY", bound="highlight_set_entity")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class highlight_set_entity:
|
||||
@ -237,7 +238,7 @@ class highlight_set_entity:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[GK], src_dict: Dict[str, Any]) -> GK:
|
||||
def from_dict(cls: Type[SY], src_dict: Dict[str, Any]) -> SY:
|
||||
d = src_dict.copy()
|
||||
_data = d.pop("data", UNSET)
|
||||
data: Union[Unset, HighlightSetEntity]
|
||||
@ -276,7 +277,7 @@ class highlight_set_entity:
|
||||
|
||||
|
||||
|
||||
SG = TypeVar("SG", bound="entity_get_child_uuid")
|
||||
YK = TypeVar("YK", bound="entity_get_child_uuid")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class entity_get_child_uuid:
|
||||
@ -301,7 +302,7 @@ class entity_get_child_uuid:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[SG], src_dict: Dict[str, Any]) -> SG:
|
||||
def from_dict(cls: Type[YK], src_dict: Dict[str, Any]) -> YK:
|
||||
d = src_dict.copy()
|
||||
_data = d.pop("data", UNSET)
|
||||
data: Union[Unset, EntityGetChildUuid]
|
||||
@ -340,7 +341,7 @@ class entity_get_child_uuid:
|
||||
|
||||
|
||||
|
||||
QZ = TypeVar("QZ", bound="entity_get_num_children")
|
||||
WS = TypeVar("WS", bound="entity_get_num_children")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class entity_get_num_children:
|
||||
@ -365,7 +366,7 @@ class entity_get_num_children:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[QZ], src_dict: Dict[str, Any]) -> QZ:
|
||||
def from_dict(cls: Type[WS], src_dict: Dict[str, Any]) -> WS:
|
||||
d = src_dict.copy()
|
||||
_data = d.pop("data", UNSET)
|
||||
data: Union[Unset, EntityGetNumChildren]
|
||||
@ -404,7 +405,7 @@ class entity_get_num_children:
|
||||
|
||||
|
||||
|
||||
SY = TypeVar("SY", bound="entity_get_parent_id")
|
||||
SL = TypeVar("SL", bound="entity_get_parent_id")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class entity_get_parent_id:
|
||||
@ -429,7 +430,7 @@ class entity_get_parent_id:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[SY], src_dict: Dict[str, Any]) -> SY:
|
||||
def from_dict(cls: Type[SL], src_dict: Dict[str, Any]) -> SL:
|
||||
d = src_dict.copy()
|
||||
_data = d.pop("data", UNSET)
|
||||
data: Union[Unset, EntityGetParentId]
|
||||
@ -468,7 +469,7 @@ class entity_get_parent_id:
|
||||
|
||||
|
||||
|
||||
YK = TypeVar("YK", bound="entity_get_all_child_uuids")
|
||||
MK = TypeVar("MK", bound="entity_get_all_child_uuids")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class entity_get_all_child_uuids:
|
||||
@ -493,7 +494,7 @@ class entity_get_all_child_uuids:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[YK], src_dict: Dict[str, Any]) -> YK:
|
||||
def from_dict(cls: Type[MK], src_dict: Dict[str, Any]) -> MK:
|
||||
d = src_dict.copy()
|
||||
_data = d.pop("data", UNSET)
|
||||
data: Union[Unset, EntityGetAllChildUuids]
|
||||
@ -532,7 +533,7 @@ class entity_get_all_child_uuids:
|
||||
|
||||
|
||||
|
||||
WS = TypeVar("WS", bound="select_get")
|
||||
TU = TypeVar("TU", bound="select_get")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class select_get:
|
||||
@ -557,7 +558,7 @@ class select_get:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[WS], src_dict: Dict[str, Any]) -> WS:
|
||||
def from_dict(cls: Type[TU], src_dict: Dict[str, Any]) -> TU:
|
||||
d = src_dict.copy()
|
||||
_data = d.pop("data", UNSET)
|
||||
data: Union[Unset, SelectGet]
|
||||
@ -596,7 +597,7 @@ class select_get:
|
||||
|
||||
|
||||
|
||||
SL = TypeVar("SL", bound="get_entity_type")
|
||||
FY = TypeVar("FY", bound="get_entity_type")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class get_entity_type:
|
||||
@ -621,7 +622,7 @@ class get_entity_type:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[SL], src_dict: Dict[str, Any]) -> SL:
|
||||
def from_dict(cls: Type[FY], src_dict: Dict[str, Any]) -> FY:
|
||||
d = src_dict.copy()
|
||||
_data = d.pop("data", UNSET)
|
||||
data: Union[Unset, GetEntityType]
|
||||
@ -660,7 +661,7 @@ class get_entity_type:
|
||||
|
||||
|
||||
|
||||
MK = TypeVar("MK", bound="solid3d_get_all_edge_faces")
|
||||
FD = TypeVar("FD", bound="solid3d_get_all_edge_faces")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class solid3d_get_all_edge_faces:
|
||||
@ -685,7 +686,7 @@ class solid3d_get_all_edge_faces:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[MK], src_dict: Dict[str, Any]) -> MK:
|
||||
def from_dict(cls: Type[FD], src_dict: Dict[str, Any]) -> FD:
|
||||
d = src_dict.copy()
|
||||
_data = d.pop("data", UNSET)
|
||||
data: Union[Unset, Solid3dGetAllEdgeFaces]
|
||||
@ -724,7 +725,7 @@ class solid3d_get_all_edge_faces:
|
||||
|
||||
|
||||
|
||||
TU = TypeVar("TU", bound="solid3d_get_all_opposite_edges")
|
||||
TZ = TypeVar("TZ", bound="solid3d_get_all_opposite_edges")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class solid3d_get_all_opposite_edges:
|
||||
@ -749,7 +750,7 @@ class solid3d_get_all_opposite_edges:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[TU], src_dict: Dict[str, Any]) -> TU:
|
||||
def from_dict(cls: Type[TZ], src_dict: Dict[str, Any]) -> TZ:
|
||||
d = src_dict.copy()
|
||||
_data = d.pop("data", UNSET)
|
||||
data: Union[Unset, Solid3dGetAllOppositeEdges]
|
||||
@ -788,7 +789,7 @@ class solid3d_get_all_opposite_edges:
|
||||
|
||||
|
||||
|
||||
FY = TypeVar("FY", bound="solid3d_get_opposite_edge")
|
||||
AX = TypeVar("AX", bound="solid3d_get_opposite_edge")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class solid3d_get_opposite_edge:
|
||||
@ -813,7 +814,7 @@ class solid3d_get_opposite_edge:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[FY], src_dict: Dict[str, Any]) -> FY:
|
||||
def from_dict(cls: Type[AX], src_dict: Dict[str, Any]) -> AX:
|
||||
d = src_dict.copy()
|
||||
_data = d.pop("data", UNSET)
|
||||
data: Union[Unset, Solid3dGetOppositeEdge]
|
||||
@ -852,7 +853,7 @@ class solid3d_get_opposite_edge:
|
||||
|
||||
|
||||
|
||||
FD = TypeVar("FD", bound="solid3d_get_prev_adjacent_edge")
|
||||
RQ = TypeVar("RQ", bound="solid3d_get_prev_adjacent_edge")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class solid3d_get_prev_adjacent_edge:
|
||||
@ -877,7 +878,7 @@ class solid3d_get_prev_adjacent_edge:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[FD], src_dict: Dict[str, Any]) -> FD:
|
||||
def from_dict(cls: Type[RQ], src_dict: Dict[str, Any]) -> RQ:
|
||||
d = src_dict.copy()
|
||||
_data = d.pop("data", UNSET)
|
||||
data: Union[Unset, Solid3dGetPrevAdjacentEdge]
|
||||
@ -916,7 +917,7 @@ class solid3d_get_prev_adjacent_edge:
|
||||
|
||||
|
||||
|
||||
TZ = TypeVar("TZ", bound="solid3d_get_next_adjacent_edge")
|
||||
ZL = TypeVar("ZL", bound="solid3d_get_next_adjacent_edge")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class solid3d_get_next_adjacent_edge:
|
||||
@ -941,7 +942,7 @@ class solid3d_get_next_adjacent_edge:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[TZ], src_dict: Dict[str, Any]) -> TZ:
|
||||
def from_dict(cls: Type[ZL], src_dict: Dict[str, Any]) -> ZL:
|
||||
d = src_dict.copy()
|
||||
_data = d.pop("data", UNSET)
|
||||
data: Union[Unset, Solid3dGetNextAdjacentEdge]
|
||||
@ -980,7 +981,7 @@ class solid3d_get_next_adjacent_edge:
|
||||
|
||||
|
||||
|
||||
AX = TypeVar("AX", bound="mouse_click")
|
||||
CM = TypeVar("CM", bound="mouse_click")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class mouse_click:
|
||||
@ -1005,7 +1006,7 @@ class mouse_click:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[AX], src_dict: Dict[str, Any]) -> AX:
|
||||
def from_dict(cls: Type[CM], src_dict: Dict[str, Any]) -> CM:
|
||||
d = src_dict.copy()
|
||||
_data = d.pop("data", UNSET)
|
||||
data: Union[Unset, MouseClick]
|
||||
@ -1044,7 +1045,7 @@ class mouse_click:
|
||||
|
||||
|
||||
|
||||
RQ = TypeVar("RQ", bound="curve_get_type")
|
||||
OS = TypeVar("OS", bound="curve_get_type")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class curve_get_type:
|
||||
@ -1069,7 +1070,7 @@ class curve_get_type:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[RQ], src_dict: Dict[str, Any]) -> RQ:
|
||||
def from_dict(cls: Type[OS], src_dict: Dict[str, Any]) -> OS:
|
||||
d = src_dict.copy()
|
||||
_data = d.pop("data", UNSET)
|
||||
data: Union[Unset, CurveGetType]
|
||||
@ -1108,7 +1109,7 @@ class curve_get_type:
|
||||
|
||||
|
||||
|
||||
ZL = TypeVar("ZL", bound="curve_get_control_points")
|
||||
WP = TypeVar("WP", bound="curve_get_control_points")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class curve_get_control_points:
|
||||
@ -1133,7 +1134,7 @@ class curve_get_control_points:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[ZL], src_dict: Dict[str, Any]) -> ZL:
|
||||
def from_dict(cls: Type[WP], src_dict: Dict[str, Any]) -> WP:
|
||||
d = src_dict.copy()
|
||||
_data = d.pop("data", UNSET)
|
||||
data: Union[Unset, CurveGetControlPoints]
|
||||
@ -1172,7 +1173,7 @@ class curve_get_control_points:
|
||||
|
||||
|
||||
|
||||
CM = TypeVar("CM", bound="take_snapshot")
|
||||
XO = TypeVar("XO", bound="take_snapshot")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class take_snapshot:
|
||||
@ -1197,7 +1198,7 @@ class take_snapshot:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[CM], src_dict: Dict[str, Any]) -> CM:
|
||||
def from_dict(cls: Type[XO], src_dict: Dict[str, Any]) -> XO:
|
||||
d = src_dict.copy()
|
||||
_data = d.pop("data", UNSET)
|
||||
data: Union[Unset, TakeSnapshot]
|
||||
@ -1236,7 +1237,7 @@ class take_snapshot:
|
||||
|
||||
|
||||
|
||||
OS = TypeVar("OS", bound="path_get_info")
|
||||
LN = TypeVar("LN", bound="path_get_info")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class path_get_info:
|
||||
@ -1261,7 +1262,7 @@ class path_get_info:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[OS], src_dict: Dict[str, Any]) -> OS:
|
||||
def from_dict(cls: Type[LN], src_dict: Dict[str, Any]) -> LN:
|
||||
d = src_dict.copy()
|
||||
_data = d.pop("data", UNSET)
|
||||
data: Union[Unset, PathGetInfo]
|
||||
@ -1300,7 +1301,7 @@ class path_get_info:
|
||||
|
||||
|
||||
|
||||
WP = TypeVar("WP", bound="path_get_curve_uuids_for_vertices")
|
||||
KR = TypeVar("KR", bound="path_get_curve_uuids_for_vertices")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class path_get_curve_uuids_for_vertices:
|
||||
@ -1325,7 +1326,7 @@ class path_get_curve_uuids_for_vertices:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[WP], src_dict: Dict[str, Any]) -> WP:
|
||||
def from_dict(cls: Type[KR], src_dict: Dict[str, Any]) -> KR:
|
||||
d = src_dict.copy()
|
||||
_data = d.pop("data", UNSET)
|
||||
data: Union[Unset, PathGetCurveUuidsForVertices]
|
||||
@ -1364,7 +1365,71 @@ class path_get_curve_uuids_for_vertices:
|
||||
|
||||
|
||||
|
||||
XO = TypeVar("XO", bound="plane_intersect_and_project")
|
||||
MG = TypeVar("MG", bound="path_get_vertex_uuids")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class path_get_vertex_uuids:
|
||||
""" The response from the `Path Get Vertex UUIDs` command. """ # noqa: E501
|
||||
data: Union[Unset, PathGetVertexUuids] = UNSET
|
||||
type: str = "path_get_vertex_uuids"
|
||||
|
||||
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, PathGetVertexUuids]
|
||||
if isinstance(_data, Unset):
|
||||
data = UNSET
|
||||
else:
|
||||
data = _data # type: ignore[arg-type]
|
||||
|
||||
type = d.pop("type", UNSET)
|
||||
|
||||
|
||||
path_get_vertex_uuids = cls(
|
||||
data= data,
|
||||
type= type,
|
||||
)
|
||||
|
||||
path_get_vertex_uuids.additional_properties = d
|
||||
return path_get_vertex_uuids
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
|
||||
|
||||
UE = TypeVar("UE", bound="plane_intersect_and_project")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class plane_intersect_and_project:
|
||||
@ -1389,7 +1454,7 @@ class plane_intersect_and_project:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[XO], src_dict: Dict[str, Any]) -> XO:
|
||||
def from_dict(cls: Type[UE], src_dict: Dict[str, Any]) -> UE:
|
||||
d = src_dict.copy()
|
||||
_data = d.pop("data", UNSET)
|
||||
data: Union[Unset, PlaneIntersectAndProject]
|
||||
@ -1428,7 +1493,7 @@ class plane_intersect_and_project:
|
||||
|
||||
|
||||
|
||||
LN = TypeVar("LN", bound="curve_get_end_points")
|
||||
BF = TypeVar("BF", bound="curve_get_end_points")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class curve_get_end_points:
|
||||
@ -1453,7 +1518,7 @@ class curve_get_end_points:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[LN], src_dict: Dict[str, Any]) -> LN:
|
||||
def from_dict(cls: Type[BF], src_dict: Dict[str, Any]) -> BF:
|
||||
d = src_dict.copy()
|
||||
_data = d.pop("data", UNSET)
|
||||
data: Union[Unset, CurveGetEndPoints]
|
||||
@ -1492,7 +1557,7 @@ class curve_get_end_points:
|
||||
|
||||
|
||||
|
||||
KR = TypeVar("KR", bound="import_files")
|
||||
UU = TypeVar("UU", bound="import_files")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class import_files:
|
||||
@ -1517,7 +1582,7 @@ class import_files:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[KR], src_dict: Dict[str, Any]) -> KR:
|
||||
def from_dict(cls: Type[UU], src_dict: Dict[str, Any]) -> UU:
|
||||
d = src_dict.copy()
|
||||
_data = d.pop("data", UNSET)
|
||||
data: Union[Unset, ImportFiles]
|
||||
@ -1556,7 +1621,7 @@ class import_files:
|
||||
|
||||
|
||||
|
||||
MG = TypeVar("MG", bound="mass")
|
||||
MB = TypeVar("MB", bound="mass")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class mass:
|
||||
@ -1581,7 +1646,7 @@ class mass:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[MG], src_dict: Dict[str, Any]) -> MG:
|
||||
def from_dict(cls: Type[MB], src_dict: Dict[str, Any]) -> MB:
|
||||
d = src_dict.copy()
|
||||
_data = d.pop("data", UNSET)
|
||||
data: Union[Unset, Mass]
|
||||
@ -1620,7 +1685,7 @@ class mass:
|
||||
|
||||
|
||||
|
||||
UE = TypeVar("UE", bound="volume")
|
||||
TB = TypeVar("TB", bound="volume")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class volume:
|
||||
@ -1645,7 +1710,7 @@ class volume:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[UE], src_dict: Dict[str, Any]) -> UE:
|
||||
def from_dict(cls: Type[TB], src_dict: Dict[str, Any]) -> TB:
|
||||
d = src_dict.copy()
|
||||
_data = d.pop("data", UNSET)
|
||||
data: Union[Unset, Volume]
|
||||
@ -1684,7 +1749,7 @@ class volume:
|
||||
|
||||
|
||||
|
||||
BF = TypeVar("BF", bound="density")
|
||||
FJ = TypeVar("FJ", bound="density")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class density:
|
||||
@ -1709,7 +1774,7 @@ class density:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[BF], src_dict: Dict[str, Any]) -> BF:
|
||||
def from_dict(cls: Type[FJ], src_dict: Dict[str, Any]) -> FJ:
|
||||
d = src_dict.copy()
|
||||
_data = d.pop("data", UNSET)
|
||||
data: Union[Unset, Density]
|
||||
@ -1748,7 +1813,7 @@ class density:
|
||||
|
||||
|
||||
|
||||
UU = TypeVar("UU", bound="surface_area")
|
||||
HB = TypeVar("HB", bound="surface_area")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class surface_area:
|
||||
@ -1773,7 +1838,7 @@ class surface_area:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[UU], src_dict: Dict[str, Any]) -> UU:
|
||||
def from_dict(cls: Type[HB], src_dict: Dict[str, Any]) -> HB:
|
||||
d = src_dict.copy()
|
||||
_data = d.pop("data", UNSET)
|
||||
data: Union[Unset, SurfaceArea]
|
||||
@ -1812,7 +1877,7 @@ class surface_area:
|
||||
|
||||
|
||||
|
||||
MB = TypeVar("MB", bound="center_of_mass")
|
||||
SF = TypeVar("SF", bound="center_of_mass")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class center_of_mass:
|
||||
@ -1837,7 +1902,7 @@ class center_of_mass:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[MB], src_dict: Dict[str, Any]) -> MB:
|
||||
def from_dict(cls: Type[SF], src_dict: Dict[str, Any]) -> SF:
|
||||
d = src_dict.copy()
|
||||
_data = d.pop("data", UNSET)
|
||||
data: Union[Unset, CenterOfMass]
|
||||
@ -1876,7 +1941,7 @@ class center_of_mass:
|
||||
|
||||
|
||||
|
||||
TB = TypeVar("TB", bound="get_sketch_mode_plane")
|
||||
DU = TypeVar("DU", bound="get_sketch_mode_plane")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class get_sketch_mode_plane:
|
||||
@ -1901,7 +1966,7 @@ class get_sketch_mode_plane:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[TB], src_dict: Dict[str, Any]) -> TB:
|
||||
def from_dict(cls: Type[DU], src_dict: Dict[str, Any]) -> DU:
|
||||
d = src_dict.copy()
|
||||
_data = d.pop("data", UNSET)
|
||||
data: Union[Unset, GetSketchModePlane]
|
||||
@ -1937,4 +2002,4 @@ class get_sketch_mode_plane:
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
|
||||
OkModelingCmdResponse = Union[empty, export, select_with_point, highlight_set_entity, entity_get_child_uuid, entity_get_num_children, entity_get_parent_id, entity_get_all_child_uuids, select_get, get_entity_type, solid3d_get_all_edge_faces, solid3d_get_all_opposite_edges, solid3d_get_opposite_edge, solid3d_get_prev_adjacent_edge, solid3d_get_next_adjacent_edge, mouse_click, curve_get_type, 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, get_sketch_mode_plane]
|
||||
OkModelingCmdResponse = Union[empty, export, select_with_point, highlight_set_entity, entity_get_child_uuid, entity_get_num_children, entity_get_parent_id, entity_get_all_child_uuids, select_get, get_entity_type, solid3d_get_all_edge_faces, solid3d_get_all_opposite_edges, solid3d_get_opposite_edge, solid3d_get_prev_adjacent_edge, solid3d_get_next_adjacent_edge, mouse_click, curve_get_type, curve_get_control_points, take_snapshot, path_get_info, path_get_curve_uuids_for_vertices, path_get_vertex_uuids, plane_intersect_and_project, curve_get_end_points, import_files, mass, volume, density, surface_area, center_of_mass, get_sketch_mode_plane]
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
FJ = TypeVar("FJ", bound="ice_server_info")
|
||||
BM = TypeVar("BM", bound="ice_server_info")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class ice_server_info:
|
||||
@ -28,7 +28,7 @@ class ice_server_info:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[FJ], src_dict: Dict[str, Any]) -> FJ:
|
||||
def from_dict(cls: Type[BM], src_dict: Dict[str, Any]) -> BM:
|
||||
d = src_dict.copy()
|
||||
data = d.pop("data", UNSET)
|
||||
type = d.pop("type", UNSET)
|
||||
@ -61,7 +61,7 @@ class ice_server_info:
|
||||
|
||||
|
||||
|
||||
HB = TypeVar("HB", bound="trickle_ice")
|
||||
TY = TypeVar("TY", bound="trickle_ice")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class trickle_ice:
|
||||
@ -85,7 +85,7 @@ class trickle_ice:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[HB], src_dict: Dict[str, Any]) -> HB:
|
||||
def from_dict(cls: Type[TY], src_dict: Dict[str, Any]) -> TY:
|
||||
d = src_dict.copy()
|
||||
data = d.pop("data", UNSET)
|
||||
type = d.pop("type", UNSET)
|
||||
@ -118,7 +118,7 @@ class trickle_ice:
|
||||
|
||||
|
||||
|
||||
SF = TypeVar("SF", bound="sdp_answer")
|
||||
NC = TypeVar("NC", bound="sdp_answer")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class sdp_answer:
|
||||
@ -142,7 +142,7 @@ class sdp_answer:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[SF], src_dict: Dict[str, Any]) -> SF:
|
||||
def from_dict(cls: Type[NC], src_dict: Dict[str, Any]) -> NC:
|
||||
d = src_dict.copy()
|
||||
data = d.pop("data", UNSET)
|
||||
type = d.pop("type", UNSET)
|
||||
@ -175,7 +175,7 @@ class sdp_answer:
|
||||
|
||||
|
||||
|
||||
DU = TypeVar("DU", bound="modeling")
|
||||
GP = TypeVar("GP", bound="modeling")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class modeling:
|
||||
@ -199,7 +199,7 @@ class modeling:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[DU], src_dict: Dict[str, Any]) -> DU:
|
||||
def from_dict(cls: Type[GP], src_dict: Dict[str, Any]) -> GP:
|
||||
d = src_dict.copy()
|
||||
data = d.pop("data", UNSET)
|
||||
type = d.pop("type", UNSET)
|
||||
@ -232,7 +232,7 @@ class modeling:
|
||||
|
||||
|
||||
|
||||
BM = TypeVar("BM", bound="export")
|
||||
FF = TypeVar("FF", bound="export")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class export:
|
||||
@ -256,7 +256,7 @@ class export:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[BM], src_dict: Dict[str, Any]) -> BM:
|
||||
def from_dict(cls: Type[FF], src_dict: Dict[str, Any]) -> FF:
|
||||
d = src_dict.copy()
|
||||
data = d.pop("data", UNSET)
|
||||
type = d.pop("type", UNSET)
|
||||
@ -289,7 +289,7 @@ class export:
|
||||
|
||||
|
||||
|
||||
TY = TypeVar("TY", bound="metrics_request")
|
||||
YO = TypeVar("YO", bound="metrics_request")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class metrics_request:
|
||||
@ -313,7 +313,7 @@ class metrics_request:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[TY], src_dict: Dict[str, Any]) -> TY:
|
||||
def from_dict(cls: Type[YO], src_dict: Dict[str, Any]) -> YO:
|
||||
d = src_dict.copy()
|
||||
data = d.pop("data", UNSET)
|
||||
type = d.pop("type", UNSET)
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
NC = TypeVar("NC", bound="Onboarding")
|
||||
FS = TypeVar("FS", bound="Onboarding")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class Onboarding:
|
||||
@ -33,7 +33,7 @@ class Onboarding:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[NC], src_dict: Dict[str, Any]) -> NC:
|
||||
def from_dict(cls: Type[FS], src_dict: Dict[str, Any]) -> FS:
|
||||
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
|
||||
|
||||
GP = TypeVar("GP", bound="OutputFile")
|
||||
WN = TypeVar("WN", bound="OutputFile")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class OutputFile:
|
||||
@ -29,7 +29,7 @@ class OutputFile:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[GP], src_dict: Dict[str, Any]) -> GP:
|
||||
def from_dict(cls: Type[WN], src_dict: Dict[str, Any]) -> WN:
|
||||
d = src_dict.copy()
|
||||
contents = d.pop("contents", UNSET)
|
||||
|
||||
|
@ -11,7 +11,7 @@ from ..models.system import System
|
||||
from ..models.unit_length import UnitLength
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
FF = TypeVar("FF", bound="fbx")
|
||||
EQ = TypeVar("EQ", bound="fbx")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class fbx:
|
||||
@ -36,7 +36,7 @@ class fbx:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[FF], src_dict: Dict[str, Any]) -> FF:
|
||||
def from_dict(cls: Type[EQ], src_dict: Dict[str, Any]) -> EQ:
|
||||
d = src_dict.copy()
|
||||
_storage = d.pop("storage", UNSET)
|
||||
storage: Union[Unset, FbxStorage]
|
||||
@ -75,7 +75,7 @@ class fbx:
|
||||
|
||||
|
||||
|
||||
YO = TypeVar("YO", bound="gltf")
|
||||
UW = TypeVar("UW", bound="gltf")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class gltf:
|
||||
@ -105,7 +105,7 @@ class gltf:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[YO], src_dict: Dict[str, Any]) -> YO:
|
||||
def from_dict(cls: Type[UW], src_dict: Dict[str, Any]) -> UW:
|
||||
d = src_dict.copy()
|
||||
_presentation = d.pop("presentation", UNSET)
|
||||
presentation: Union[Unset, GltfPresentation]
|
||||
@ -152,7 +152,7 @@ class gltf:
|
||||
|
||||
|
||||
|
||||
FS = TypeVar("FS", bound="obj")
|
||||
MD = TypeVar("MD", bound="obj")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class obj:
|
||||
@ -182,7 +182,7 @@ class obj:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[FS], src_dict: Dict[str, Any]) -> FS:
|
||||
def from_dict(cls: Type[MD], src_dict: Dict[str, Any]) -> MD:
|
||||
d = src_dict.copy()
|
||||
_coords = d.pop("coords", UNSET)
|
||||
coords: Union[Unset, System]
|
||||
@ -229,7 +229,7 @@ class obj:
|
||||
|
||||
|
||||
|
||||
WN = TypeVar("WN", bound="ply")
|
||||
HD = TypeVar("HD", bound="ply")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class ply:
|
||||
@ -259,7 +259,7 @@ class ply:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[WN], src_dict: Dict[str, Any]) -> WN:
|
||||
def from_dict(cls: Type[HD], src_dict: Dict[str, Any]) -> HD:
|
||||
d = src_dict.copy()
|
||||
_coords = d.pop("coords", UNSET)
|
||||
coords: Union[Unset, System]
|
||||
@ -306,7 +306,7 @@ class ply:
|
||||
|
||||
|
||||
|
||||
EQ = TypeVar("EQ", bound="step")
|
||||
UJ = TypeVar("UJ", bound="step")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class step:
|
||||
@ -331,7 +331,7 @@ class step:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[EQ], src_dict: Dict[str, Any]) -> EQ:
|
||||
def from_dict(cls: Type[UJ], src_dict: Dict[str, Any]) -> UJ:
|
||||
d = src_dict.copy()
|
||||
_coords = d.pop("coords", UNSET)
|
||||
coords: Union[Unset, System]
|
||||
@ -370,7 +370,7 @@ class step:
|
||||
|
||||
|
||||
|
||||
UW = TypeVar("UW", bound="stl")
|
||||
RU = TypeVar("RU", bound="stl")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class stl:
|
||||
@ -405,7 +405,7 @@ class stl:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[UW], src_dict: Dict[str, Any]) -> UW:
|
||||
def from_dict(cls: Type[RU], src_dict: Dict[str, Any]) -> RU:
|
||||
d = src_dict.copy()
|
||||
_coords = d.pop("coords", UNSET)
|
||||
coords: Union[Unset, System]
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
MD = TypeVar("MD", bound="PathGetCurveUuidsForVertices")
|
||||
DL = TypeVar("DL", bound="PathGetCurveUuidsForVertices")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class PathGetCurveUuidsForVertices:
|
||||
@ -27,7 +27,7 @@ class PathGetCurveUuidsForVertices:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[MD], src_dict: Dict[str, Any]) -> MD:
|
||||
def from_dict(cls: Type[DL], src_dict: Dict[str, Any]) -> DL:
|
||||
d = src_dict.copy()
|
||||
curve_ids = cast(List[str], d.pop("curve_ids", UNSET))
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
HD = TypeVar("HD", bound="PathGetInfo")
|
||||
QT = TypeVar("QT", bound="PathGetInfo")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class PathGetInfo:
|
||||
@ -29,7 +29,7 @@ class PathGetInfo:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[HD], src_dict: Dict[str, Any]) -> HD:
|
||||
def from_dict(cls: Type[QT], src_dict: Dict[str, Any]) -> QT:
|
||||
d = src_dict.copy()
|
||||
from ..models.path_segment_info import PathSegmentInfo
|
||||
segments = cast(List[PathSegmentInfo], d.pop("segments", UNSET))
|
||||
|
@ -1,40 +1,43 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
|
||||
import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
KX = TypeVar("KX", bound="Mesh")
|
||||
PT = TypeVar("PT", bound="PathGetVertexUuids")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class Mesh:
|
||||
mesh: Union[Unset, str] = UNSET
|
||||
class PathGetVertexUuids:
|
||||
""" The response from the `PathGetVertexUuids` command. """ # noqa: E501
|
||||
vertex_ids: Union[Unset, List[str]] = UNSET
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
mesh = self.mesh
|
||||
vertex_ids: Union[Unset, List[str]] = UNSET
|
||||
if not isinstance(self.vertex_ids, Unset):
|
||||
vertex_ids = self.vertex_ids
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if mesh is not UNSET:
|
||||
field_dict['mesh'] = mesh
|
||||
if vertex_ids is not UNSET:
|
||||
field_dict['vertex_ids'] = vertex_ids
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[KX], src_dict: Dict[str, Any]) -> KX:
|
||||
def from_dict(cls: Type[PT], src_dict: Dict[str, Any]) -> PT:
|
||||
d = src_dict.copy()
|
||||
mesh = d.pop("mesh", UNSET)
|
||||
vertex_ids = cast(List[str], d.pop("vertex_ids", UNSET))
|
||||
|
||||
|
||||
mesh = cls(
|
||||
mesh= mesh,
|
||||
path_get_vertex_uuids = cls(
|
||||
vertex_ids= vertex_ids,
|
||||
)
|
||||
|
||||
mesh.additional_properties = d
|
||||
return mesh
|
||||
path_get_vertex_uuids.additional_properties = d
|
||||
return path_get_vertex_uuids
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
@ -7,7 +7,7 @@ from ..models.point2d import Point2d
|
||||
from ..models.point3d import Point3d
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
UJ = TypeVar("UJ", bound="line")
|
||||
HR = TypeVar("HR", bound="line")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class line:
|
||||
@ -36,7 +36,7 @@ class line:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[UJ], src_dict: Dict[str, Any]) -> UJ:
|
||||
def from_dict(cls: Type[HR], src_dict: Dict[str, Any]) -> HR:
|
||||
d = src_dict.copy()
|
||||
_end = d.pop("end", UNSET)
|
||||
end: Union[Unset, Point3d]
|
||||
@ -78,7 +78,7 @@ class line:
|
||||
|
||||
|
||||
|
||||
RU = TypeVar("RU", bound="arc")
|
||||
VF = TypeVar("VF", bound="arc")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class arc:
|
||||
@ -86,8 +86,10 @@ class arc:
|
||||
angle_end: Union[Unset, float] = UNSET
|
||||
angle_start: Union[Unset, float] = UNSET
|
||||
center: Union[Unset, Point2d] = UNSET
|
||||
end: Union[Unset, Angle] = UNSET
|
||||
radius: Union[Unset, float] = UNSET
|
||||
relative: Union[Unset, bool] = False
|
||||
start: Union[Unset, Angle] = UNSET
|
||||
type: str = "arc"
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
@ -97,8 +99,12 @@ class arc:
|
||||
angle_start = self.angle_start
|
||||
if not isinstance(self.center, Unset):
|
||||
center = self.center
|
||||
if not isinstance(self.end, Unset):
|
||||
end = self.end
|
||||
radius = self.radius
|
||||
relative = self.relative
|
||||
if not isinstance(self.start, Unset):
|
||||
start = self.start
|
||||
type = self.type
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
@ -110,16 +116,20 @@ class arc:
|
||||
field_dict['angle_start'] = angle_start
|
||||
if center is not UNSET:
|
||||
field_dict['center'] = center
|
||||
if end is not UNSET:
|
||||
field_dict['end'] = end
|
||||
if radius is not UNSET:
|
||||
field_dict['radius'] = radius
|
||||
if relative is not UNSET:
|
||||
field_dict['relative'] = relative
|
||||
if start is not UNSET:
|
||||
field_dict['start'] = start
|
||||
field_dict['type'] = type
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[RU], src_dict: Dict[str, Any]) -> RU:
|
||||
def from_dict(cls: Type[VF], src_dict: Dict[str, Any]) -> VF:
|
||||
d = src_dict.copy()
|
||||
angle_end = d.pop("angle_end", UNSET)
|
||||
|
||||
@ -132,10 +142,24 @@ class arc:
|
||||
else:
|
||||
center = _center # type: ignore[arg-type]
|
||||
|
||||
_end = d.pop("end", UNSET)
|
||||
end: Union[Unset, Angle]
|
||||
if isinstance(_end, Unset):
|
||||
end = UNSET
|
||||
else:
|
||||
end = _end # type: ignore[arg-type]
|
||||
|
||||
radius = d.pop("radius", UNSET)
|
||||
|
||||
relative = d.pop("relative", UNSET)
|
||||
|
||||
_start = d.pop("start", UNSET)
|
||||
start: Union[Unset, Angle]
|
||||
if isinstance(_start, Unset):
|
||||
start = UNSET
|
||||
else:
|
||||
start = _start # type: ignore[arg-type]
|
||||
|
||||
type = d.pop("type", UNSET)
|
||||
|
||||
|
||||
@ -143,8 +167,10 @@ class arc:
|
||||
angle_end= angle_end,
|
||||
angle_start= angle_start,
|
||||
center= center,
|
||||
end= end,
|
||||
radius= radius,
|
||||
relative= relative,
|
||||
start= start,
|
||||
type= type,
|
||||
)
|
||||
|
||||
@ -170,7 +196,7 @@ class arc:
|
||||
|
||||
|
||||
|
||||
DL = TypeVar("DL", bound="bezier")
|
||||
VM = TypeVar("VM", bound="bezier")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class bezier:
|
||||
@ -209,7 +235,7 @@ class bezier:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[DL], src_dict: Dict[str, Any]) -> DL:
|
||||
def from_dict(cls: Type[VM], src_dict: Dict[str, Any]) -> VM:
|
||||
d = src_dict.copy()
|
||||
_control1 = d.pop("control1", UNSET)
|
||||
control1: Union[Unset, Point3d]
|
||||
@ -267,7 +293,7 @@ class bezier:
|
||||
|
||||
|
||||
|
||||
QT = TypeVar("QT", bound="tangential_arc")
|
||||
WH = TypeVar("WH", bound="tangential_arc")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class tangential_arc:
|
||||
@ -296,7 +322,7 @@ class tangential_arc:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[QT], src_dict: Dict[str, Any]) -> QT:
|
||||
def from_dict(cls: Type[WH], src_dict: Dict[str, Any]) -> WH:
|
||||
d = src_dict.copy()
|
||||
_offset = d.pop("offset", UNSET)
|
||||
offset: Union[Unset, Angle]
|
||||
@ -338,7 +364,7 @@ class tangential_arc:
|
||||
|
||||
|
||||
|
||||
PT = TypeVar("PT", bound="tangential_arc_to")
|
||||
DQ = TypeVar("DQ", bound="tangential_arc_to")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class tangential_arc_to:
|
||||
@ -368,7 +394,7 @@ class tangential_arc_to:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[PT], src_dict: Dict[str, Any]) -> PT:
|
||||
def from_dict(cls: Type[DQ], src_dict: Dict[str, Any]) -> DQ:
|
||||
d = src_dict.copy()
|
||||
_angle_snap_increment = d.pop("angle_snap_increment", UNSET)
|
||||
angle_snap_increment: Union[Unset, Angle]
|
||||
|
@ -6,7 +6,7 @@ from ..models.modeling_cmd_id import ModelingCmdId
|
||||
from ..models.path_command import PathCommand
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
HR = TypeVar("HR", bound="PathSegmentInfo")
|
||||
UY = TypeVar("UY", bound="PathSegmentInfo")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class PathSegmentInfo:
|
||||
@ -37,7 +37,7 @@ class PathSegmentInfo:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[HR], src_dict: Dict[str, Any]) -> HR:
|
||||
def from_dict(cls: Type[UY], src_dict: Dict[str, Any]) -> UY:
|
||||
d = src_dict.copy()
|
||||
_command = d.pop("command", UNSET)
|
||||
command: Union[Unset, PathCommand]
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
VF = TypeVar("VF", bound="PaymentIntent")
|
||||
PD = TypeVar("PD", bound="PaymentIntent")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class PaymentIntent:
|
||||
@ -25,7 +25,7 @@ class PaymentIntent:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[VF], src_dict: Dict[str, Any]) -> VF:
|
||||
def from_dict(cls: Type[PD], src_dict: Dict[str, Any]) -> PD:
|
||||
d = src_dict.copy()
|
||||
client_secret = d.pop("client_secret", UNSET)
|
||||
|
||||
|
@ -9,7 +9,7 @@ from ..models.card_details import CardDetails
|
||||
from ..models.payment_method_type import PaymentMethodType
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
VM = TypeVar("VM", bound="PaymentMethod")
|
||||
SM = TypeVar("SM", bound="PaymentMethod")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class PaymentMethod:
|
||||
@ -56,7 +56,7 @@ class PaymentMethod:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[VM], src_dict: Dict[str, Any]) -> VM:
|
||||
def from_dict(cls: Type[SM], src_dict: Dict[str, Any]) -> SM:
|
||||
d = src_dict.copy()
|
||||
_billing_info = d.pop("billing_info", UNSET)
|
||||
billing_info: Union[Unset, BillingInfo]
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
WH = TypeVar("WH", bound="PaymentMethodCardChecks")
|
||||
JL = TypeVar("JL", bound="PaymentMethodCardChecks")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class PaymentMethodCardChecks:
|
||||
@ -33,7 +33,7 @@ class PaymentMethodCardChecks:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[WH], src_dict: Dict[str, Any]) -> WH:
|
||||
def from_dict(cls: Type[JL], src_dict: Dict[str, Any]) -> JL:
|
||||
d = src_dict.copy()
|
||||
address_line1_check = d.pop("address_line1_check", UNSET)
|
||||
|
||||
|
@ -5,7 +5,7 @@ import attr
|
||||
from ..models.point2d import Point2d
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
DQ = TypeVar("DQ", bound="PlaneIntersectAndProject")
|
||||
CG = TypeVar("CG", bound="PlaneIntersectAndProject")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class PlaneIntersectAndProject:
|
||||
@ -27,7 +27,7 @@ class PlaneIntersectAndProject:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[DQ], src_dict: Dict[str, Any]) -> DQ:
|
||||
def from_dict(cls: Type[CG], src_dict: Dict[str, Any]) -> CG:
|
||||
d = src_dict.copy()
|
||||
_plane_coordinates = d.pop("plane_coordinates", UNSET)
|
||||
plane_coordinates: Union[Unset, Point2d]
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
UY = TypeVar("UY", bound="Point2d")
|
||||
QA = TypeVar("QA", bound="Point2d")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class Point2d:
|
||||
@ -29,7 +29,7 @@ class Point2d:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[UY], src_dict: Dict[str, Any]) -> UY:
|
||||
def from_dict(cls: Type[QA], src_dict: Dict[str, Any]) -> QA:
|
||||
d = src_dict.copy()
|
||||
x = d.pop("x", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
PD = TypeVar("PD", bound="Point3d")
|
||||
ZB = TypeVar("ZB", bound="Point3d")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class Point3d:
|
||||
@ -33,7 +33,7 @@ class Point3d:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[PD], src_dict: Dict[str, Any]) -> PD:
|
||||
def from_dict(cls: Type[ZB], src_dict: Dict[str, Any]) -> ZB:
|
||||
d = src_dict.copy()
|
||||
x = d.pop("x", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
JL = TypeVar("JL", bound="Pong")
|
||||
AU = TypeVar("AU", bound="Pong")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class Pong:
|
||||
@ -25,7 +25,7 @@ class Pong:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[JL], src_dict: Dict[str, Any]) -> JL:
|
||||
def from_dict(cls: Type[AU], src_dict: Dict[str, Any]) -> AU:
|
||||
d = src_dict.copy()
|
||||
message = d.pop("message", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
CG = TypeVar("CG", bound="RawFile")
|
||||
FX = TypeVar("FX", bound="RawFile")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class RawFile:
|
||||
@ -31,7 +31,7 @@ class RawFile:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[CG], src_dict: Dict[str, Any]) -> CG:
|
||||
def from_dict(cls: Type[FX], src_dict: Dict[str, Any]) -> FX:
|
||||
d = src_dict.copy()
|
||||
contents = cast(List[int], d.pop("contents", UNSET))
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
QA = TypeVar("QA", bound="RtcIceCandidateInit")
|
||||
BL = TypeVar("BL", bound="RtcIceCandidateInit")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class RtcIceCandidateInit:
|
||||
@ -37,7 +37,7 @@ class RtcIceCandidateInit:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[QA], src_dict: Dict[str, Any]) -> QA:
|
||||
def from_dict(cls: Type[BL], src_dict: Dict[str, Any]) -> BL:
|
||||
d = src_dict.copy()
|
||||
candidate = d.pop("candidate", UNSET)
|
||||
|
||||
|
@ -5,7 +5,7 @@ import attr
|
||||
from ..models.rtc_sdp_type import RtcSdpType
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
ZB = TypeVar("ZB", bound="RtcSessionDescription")
|
||||
KU = TypeVar("KU", bound="RtcSessionDescription")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class RtcSessionDescription:
|
||||
@ -31,7 +31,7 @@ class RtcSessionDescription:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[ZB], src_dict: Dict[str, Any]) -> ZB:
|
||||
def from_dict(cls: Type[KU], src_dict: Dict[str, Any]) -> KU:
|
||||
d = src_dict.copy()
|
||||
sdp = d.pop("sdp", UNSET)
|
||||
|
||||
|
@ -7,6 +7,7 @@ class SceneToolType(str, Enum):
|
||||
SELECT = 'select'
|
||||
MOVE = 'move'
|
||||
SKETCH_LINE = 'sketch_line'
|
||||
SKETCH_TANGENTIAL_ARC = 'sketch_tangential_arc'
|
||||
SKETCH_CURVE = 'sketch_curve'
|
||||
SKETCH_CURVE_MOD = 'sketch_curve_mod'
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
AU = TypeVar("AU", bound="SelectGet")
|
||||
PZ = TypeVar("PZ", bound="SelectGet")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class SelectGet:
|
||||
@ -27,7 +27,7 @@ class SelectGet:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[AU], src_dict: Dict[str, Any]) -> AU:
|
||||
def from_dict(cls: Type[PZ], src_dict: Dict[str, Any]) -> PZ:
|
||||
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
|
||||
|
||||
FX = TypeVar("FX", bound="SelectWithPoint")
|
||||
FA = TypeVar("FA", bound="SelectWithPoint")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class SelectWithPoint:
|
||||
@ -25,7 +25,7 @@ class SelectWithPoint:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[FX], src_dict: Dict[str, Any]) -> FX:
|
||||
def from_dict(cls: Type[FA], src_dict: Dict[str, Any]) -> FA:
|
||||
d = src_dict.copy()
|
||||
entity_id = d.pop("entity_id", UNSET)
|
||||
|
||||
|
@ -7,7 +7,7 @@ from dateutil.parser import isoparse
|
||||
from ..models.uuid import Uuid
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
BL = TypeVar("BL", bound="Session")
|
||||
GE = TypeVar("GE", bound="Session")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class Session:
|
||||
@ -56,7 +56,7 @@ For our UIs, these are automatically created by Next.js. """ # noqa: E501
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[BL], src_dict: Dict[str, Any]) -> BL:
|
||||
def from_dict(cls: Type[GE], src_dict: Dict[str, Any]) -> GE:
|
||||
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
|
||||
|
||||
KU = TypeVar("KU", bound="Solid3dGetAllEdgeFaces")
|
||||
JG = TypeVar("JG", bound="Solid3dGetAllEdgeFaces")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class Solid3dGetAllEdgeFaces:
|
||||
@ -27,7 +27,7 @@ class Solid3dGetAllEdgeFaces:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[KU], src_dict: Dict[str, Any]) -> KU:
|
||||
def from_dict(cls: Type[JG], src_dict: Dict[str, Any]) -> JG:
|
||||
d = src_dict.copy()
|
||||
faces = cast(List[str], d.pop("faces", UNSET))
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
PZ = TypeVar("PZ", bound="Solid3dGetAllOppositeEdges")
|
||||
HH = TypeVar("HH", bound="Solid3dGetAllOppositeEdges")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class Solid3dGetAllOppositeEdges:
|
||||
@ -27,7 +27,7 @@ class Solid3dGetAllOppositeEdges:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[PZ], src_dict: Dict[str, Any]) -> PZ:
|
||||
def from_dict(cls: Type[HH], src_dict: Dict[str, Any]) -> HH:
|
||||
d = src_dict.copy()
|
||||
edges = cast(List[str], d.pop("edges", UNSET))
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
FA = TypeVar("FA", bound="Solid3dGetNextAdjacentEdge")
|
||||
RY = TypeVar("RY", bound="Solid3dGetNextAdjacentEdge")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class Solid3dGetNextAdjacentEdge:
|
||||
@ -25,7 +25,7 @@ class Solid3dGetNextAdjacentEdge:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[FA], src_dict: Dict[str, Any]) -> FA:
|
||||
def from_dict(cls: Type[RY], src_dict: Dict[str, Any]) -> RY:
|
||||
d = src_dict.copy()
|
||||
edge = d.pop("edge", UNSET)
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user