diff --git a/kittycad.py.patch.json b/kittycad.py.patch.json index 41fe39535..4726aa058 100644 --- a/kittycad.py.patch.json +++ b/kittycad.py.patch.json @@ -7,446 +7,6 @@ "install": "pip install kittycad" } }, - { - "op": "add", - "path": "/paths/~1.well-known~1ai-plugin.json/get/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.meta import get_ai_plugin_manifest\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AiPluginManifest, Error\nfrom kittycad.types import Response\n\n\ndef example_get_ai_plugin_manifest():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[AiPluginManifest, Error]\n ] = get_ai_plugin_manifest.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AiPluginManifest = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_ai_plugin_manifest.html" - } - }, - { - "op": "add", - "path": "/paths/~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/~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/~1/get/x-python", - "value": { - "example": "from kittycad.api.meta import get_schema\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_get_schema():\n # Create our client.\n client = ClientFromEnv()\n\n get_schema.sync(\n client=client,\n )\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_schema.html" - } - }, - { - "op": "add", - "path": "/paths/~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/~1user~1payment~1invoices/get/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import list_invoices_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Invoice\nfrom kittycad.types import Response\n\n\ndef example_list_invoices_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[List[Invoice], Error]] = list_invoices_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: List[Invoice] = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.list_invoices_for_user.html" - } - }, - { - "op": "add", - "path": "/paths/~1unit~1conversion~1power~1{input_unit}~1{output_unit}/get/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_power_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitPowerConversion\nfrom kittycad.models.unit_power import UnitPower\nfrom kittycad.types import Response\n\n\ndef example_get_power_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitPowerConversion, Error]\n ] = get_power_unit_conversion.sync(\n client=client,\n input_unit=UnitPower.BTU_PER_MINUTE,\n output_unit=UnitPower.BTU_PER_MINUTE,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitPowerConversion = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_power_unit_conversion.html" - } - }, - { - "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/~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/~1openai~1openapi.json/get/x-python", - "value": { - "example": "from kittycad.api.meta import get_openai_schema\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_get_openai_schema():\n # Create our client.\n client = ClientFromEnv()\n\n get_openai_schema.sync(\n client=client,\n )\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_openai_schema.html" - } - }, - { - "op": "add", - "path": "/paths/~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=\"\",\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/~1unit~1conversion~1force~1{input_unit}~1{output_unit}/get/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_force_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitForceConversion\nfrom kittycad.models.unit_force import UnitForce\nfrom kittycad.types import Response\n\n\ndef example_get_force_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitForceConversion, Error]\n ] = get_force_unit_conversion.sync(\n client=client,\n input_unit=UnitForce.DYNES,\n output_unit=UnitForce.DYNES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitForceConversion = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_force_unit_conversion.html" - } - }, - { - "op": "add", - "path": "/paths/~1_meta~1info/get/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.meta import get_metadata\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Metadata\nfrom kittycad.types import Response\n\n\ndef example_get_metadata():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Metadata, Error]] = get_metadata.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Metadata = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_metadata.html" - } - }, - { - "op": "add", - "path": "/paths/~1file~1mass/post/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_mass\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileMass\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_density import UnitDensity\nfrom kittycad.models.unit_mass import UnitMass\nfrom kittycad.types import Response\n\n\ndef example_create_file_mass():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileMass, Error]] = create_file_mass.sync(\n client=client,\n material_density=3.14,\n material_density_unit=UnitDensity.LB_FT3,\n output_unit=UnitMass.G,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileMass = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_mass.html" - } - }, - { - "op": "add", - "path": "/paths/~1auth~1email~1callback/get/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.hidden import auth_email_callback\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_auth_email_callback():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = auth_email_callback.sync(\n client=client,\n email=\"\",\n token=\"\",\n callback_url=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.hidden.auth_email_callback.html" - } - }, - { - "op": "add", - "path": "/paths/~1file~1density/post/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_density\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileDensity\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_density import UnitDensity\nfrom kittycad.models.unit_mass import UnitMass\nfrom kittycad.types import Response\n\n\ndef example_create_file_density():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileDensity, Error]] = create_file_density.sync(\n client=client,\n material_mass=3.14,\n material_mass_unit=UnitMass.G,\n output_unit=UnitDensity.LB_FT3,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileDensity = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_density.html" - } - }, - { - "op": "add", - "path": "/paths/~1unit~1conversion~1area~1{input_unit}~1{output_unit}/get/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_area_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitAreaConversion\nfrom kittycad.models.unit_area import UnitArea\nfrom kittycad.types import Response\n\n\ndef example_get_area_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitAreaConversion, Error]\n ] = get_area_unit_conversion.sync(\n client=client,\n input_unit=UnitArea.CM2,\n output_unit=UnitArea.CM2,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitAreaConversion = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_area_unit_conversion.html" - } - }, - { - "op": "add", - "path": "/paths/~1ws~1executor~1term/get/x-python", - "value": { - "example": "from kittycad.api.executor import create_executor_term\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_create_executor_term():\n # Create our client.\n client = ClientFromEnv()\n\n # Connect to the websocket.\n websocket = create_executor_term.sync(\n client=client,\n )\n\n # Send a message.\n websocket.send(\"{}\")\n\n # Get the messages.\n for message in websocket:\n print(message)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.executor.create_executor_term.html" - } - }, - { - "op": "add", - "path": "/paths/~1apps~1github~1webhook/post/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.apps import apps_github_webhook\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_apps_github_webhook():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = apps_github_webhook.sync(\n client=client,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.apps.apps_github_webhook.html" - } - }, - { - "op": "add", - "path": "/paths/~1user~1payment~1methods/get/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import list_payment_methods_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, PaymentMethod\nfrom kittycad.types import Response\n\n\ndef example_list_payment_methods_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[List[PaymentMethod], Error]\n ] = list_payment_methods_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: List[PaymentMethod] = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.list_payment_methods_for_user.html" - } - }, - { - "op": "add", - "path": "/paths/~1ai~1text-to-3d~1{output_format}/post/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import create_text_to_3d\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Mesh\nfrom kittycad.models.file_export_format import FileExportFormat\nfrom kittycad.types import Response\n\n\ndef example_create_text_to_3d():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Mesh, Error]] = create_text_to_3d.sync(\n client=client,\n output_format=FileExportFormat.FBX,\n prompt=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Mesh = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.create_text_to_3d.html" - } - }, - { - "op": "add", - "path": "/paths/~1api-calls/get/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import list_api_calls\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPriceResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_api_calls():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiCallWithPriceResultsPage, Error]\n ] = list_api_calls.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPriceResultsPage = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_api_calls.html" - } - }, - { - "op": "add", - "path": "/paths/~1user~1payment~1balance/get/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import get_payment_balance_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import CustomerBalance, Error\nfrom kittycad.types import Response\n\n\ndef example_get_payment_balance_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[CustomerBalance, Error]\n ] = get_payment_balance_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: CustomerBalance = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.get_payment_balance_for_user.html" - } - }, - { - "op": "add", - "path": "/paths/~1unit~1conversion~1frequency~1{input_unit}~1{output_unit}/get/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_frequency_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitFrequencyConversion\nfrom kittycad.models.unit_frequency import UnitFrequency\nfrom kittycad.types import Response\n\n\ndef example_get_frequency_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitFrequencyConversion, Error]\n ] = get_frequency_unit_conversion.sync(\n client=client,\n input_unit=UnitFrequency.GIGAHERTZ,\n output_unit=UnitFrequency.GIGAHERTZ,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitFrequencyConversion = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_frequency_unit_conversion.html" - } - }, - { - "op": "add", - "path": "/paths/~1user~1payment~1tax/get/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import validate_customer_tax_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_validate_customer_tax_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = validate_customer_tax_information_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.validate_customer_tax_information_for_user.html" - } - }, - { - "op": "add", - "path": "/paths/~1unit~1conversion~1length~1{input_unit}~1{output_unit}/get/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_length_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitLengthConversion\nfrom kittycad.models.unit_length import UnitLength\nfrom kittycad.types import Response\n\n\ndef example_get_length_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitLengthConversion, Error]\n ] = get_length_unit_conversion.sync(\n client=client,\n input_unit=UnitLength.CM,\n output_unit=UnitLength.CM,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitLengthConversion = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_length_unit_conversion.html" - } - }, - { - "op": "add", - "path": "/paths/~1unit~1conversion~1temperature~1{input_unit}~1{output_unit}/get/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_temperature_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitTemperatureConversion\nfrom kittycad.models.unit_temperature import UnitTemperature\nfrom kittycad.types import Response\n\n\ndef example_get_temperature_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitTemperatureConversion, Error]\n ] = get_temperature_unit_conversion.sync(\n client=client,\n input_unit=UnitTemperature.CELSIUS,\n output_unit=UnitTemperature.CELSIUS,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitTemperatureConversion = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_temperature_unit_conversion.html" - } - }, - { - "op": "add", - "path": "/paths/~1user~1api-tokens/get/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_tokens import list_api_tokens_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiTokenResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_api_tokens_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiTokenResultsPage, Error]\n ] = list_api_tokens_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: ApiTokenResultsPage = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.list_api_tokens_for_user.html" - } - }, - { - "op": "add", - "path": "/paths/~1user~1api-tokens/post/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_tokens import create_api_token_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiToken, Error\nfrom kittycad.types import Response\n\n\ndef example_create_api_token_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiToken, Error]] = create_api_token_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: ApiToken = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.create_api_token_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/~1users-extended~1{id}/get/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user_extended\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ExtendedUser\nfrom kittycad.types import Response\n\n\ndef example_get_user_extended():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ExtendedUser, Error]] = get_user_extended.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ExtendedUser = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_extended.html" - } - }, - { - "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/~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=\"\",\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/~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/~1user~1session~1{token}/get/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_session_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Session\nfrom kittycad.types import Response\n\n\ndef example_get_session_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Session, Error]] = get_session_for_user.sync(\n client=client,\n token=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Session = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_session_for_user.html" - } - }, - { - "op": "add", - "path": "/paths/~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/~1api-call-metrics/get/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_api_call_metrics\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallQueryGroup, Error\nfrom kittycad.models.api_call_query_group_by import ApiCallQueryGroupBy\nfrom kittycad.types import Response\n\n\ndef example_get_api_call_metrics():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[List[ApiCallQueryGroup], Error]\n ] = get_api_call_metrics.sync(\n client=client,\n group_by=ApiCallQueryGroupBy.EMAIL,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: List[ApiCallQueryGroup] = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call_metrics.html" - } - }, - { - "op": "add", - "path": "/paths/~1file~1conversion~1{src_format}~1{output_format}/post/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileConversion\nfrom kittycad.models.file_export_format import FileExportFormat\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.types import Response\n\n\ndef example_create_file_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileConversion, Error]] = create_file_conversion.sync(\n client=client,\n output_format=FileExportFormat.FBX,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileConversion = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_conversion.html" - } - }, - { - "op": "add", - "path": "/paths/~1unit~1conversion~1energy~1{input_unit}~1{output_unit}/get/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_energy_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitEnergyConversion\nfrom kittycad.models.unit_energy import UnitEnergy\nfrom kittycad.types import Response\n\n\ndef example_get_energy_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitEnergyConversion, Error]\n ] = get_energy_unit_conversion.sync(\n client=client,\n input_unit=UnitEnergy.BTU,\n output_unit=UnitEnergy.BTU,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitEnergyConversion = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_energy_unit_conversion.html" - } - }, - { - "op": "add", - "path": "/paths/~1user/get/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, User\nfrom kittycad.types import Response\n\n\ndef example_get_user_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[User, Error]] = get_user_self.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: User = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_self.html" - } - }, - { - "op": "add", - "path": "/paths/~1user/delete/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import delete_user_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_user_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_user_self.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.delete_user_self.html" - } - }, - { - "op": "add", - "path": "/paths/~1user/put/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import update_user_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, User\nfrom kittycad.models.update_user import UpdateUser\nfrom kittycad.types import Response\n\n\ndef example_update_user_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[User, Error]] = update_user_self.sync(\n client=client,\n body=UpdateUser(\n company=\"\",\n discord=\"\",\n first_name=\"\",\n github=\"\",\n last_name=\"\",\n phone=\"\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: User = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.update_user_self.html" - } - }, - { - "op": "add", - "path": "/paths/~1async~1operations~1{id}/get/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_async_operation\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import (\n Error,\n FileCenterOfMass,\n FileConversion,\n FileDensity,\n FileMass,\n FileSurfaceArea,\n FileVolume,\n)\nfrom kittycad.types import Response\n\n\ndef example_get_async_operation():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[\n FileConversion,\n FileCenterOfMass,\n FileMass,\n FileVolume,\n FileDensity,\n FileSurfaceArea,\n Error,\n ]\n ] = get_async_operation.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Union[\n FileConversion,\n FileCenterOfMass,\n FileMass,\n FileVolume,\n FileDensity,\n FileSurfaceArea,\n ] = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_async_operation.html" - } - }, - { - "op": "add", - "path": "/paths/~1auth~1email/post/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.hidden import auth_email\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, VerificationToken\nfrom kittycad.models.email_authentication_form import EmailAuthenticationForm\nfrom kittycad.types import Response\n\n\ndef example_auth_email():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[VerificationToken, Error]] = auth_email.sync(\n client=client,\n body=EmailAuthenticationForm(\n email=\"\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: VerificationToken = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.hidden.auth_email.html" - } - }, - { - "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/~1async~1operations/get/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import list_async_operations\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AsyncApiCallResultsPage, Error\nfrom kittycad.models.api_call_status import ApiCallStatus\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_async_operations():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[AsyncApiCallResultsPage, Error]\n ] = list_async_operations.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n status=ApiCallStatus.QUEUED,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AsyncApiCallResultsPage = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_async_operations.html" - } - }, - { - "op": "add", - "path": "/paths/~1user~1payment~1methods~1{id}/delete/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import delete_payment_method_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_payment_method_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_payment_method_for_user.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.delete_payment_method_for_user.html" - } - }, - { - "op": "add", - "path": "/paths/~1user~1payment~1intent/post/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import create_payment_intent_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, PaymentIntent\nfrom kittycad.types import Response\n\n\ndef example_create_payment_intent_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[PaymentIntent, Error]\n ] = create_payment_intent_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: PaymentIntent = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.create_payment_intent_for_user.html" - } - }, - { - "op": "add", - "path": "/paths/~1user~1api-calls~1{id}/get/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_api_call_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPrice, Error\nfrom kittycad.types import Response\n\n\ndef example_get_api_call_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiCallWithPrice, Error]] = get_api_call_for_user.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPrice = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call_for_user.html" - } - }, - { - "op": "add", - "path": "/paths/~1user~1api-tokens~1{token}/get/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_tokens import get_api_token_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiToken, Error\nfrom kittycad.types import Response\n\n\ndef example_get_api_token_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiToken, Error]] = get_api_token_for_user.sync(\n client=client,\n token=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiToken = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.get_api_token_for_user.html" - } - }, - { - "op": "add", - "path": "/paths/~1user~1api-tokens~1{token}/delete/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_tokens import delete_api_token_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_api_token_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_api_token_for_user.sync(\n client=client,\n token=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.delete_api_token_for_user.html" - } - }, - { - "op": "add", - "path": "/paths/~1user~1extended/get/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user_self_extended\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ExtendedUser\nfrom kittycad.types import Response\n\n\ndef example_get_user_self_extended():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ExtendedUser, Error]] = get_user_self_extended.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ExtendedUser = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_self_extended.html" - } - }, - { - "op": "add", - "path": "/paths/~1file~1volume/post/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_volume\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileVolume\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_volume import UnitVolume\nfrom kittycad.types import Response\n\n\ndef example_create_file_volume():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileVolume, Error]] = create_file_volume.sync(\n client=client,\n output_unit=UnitVolume.CM3,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileVolume = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_volume.html" - } - }, - { - "op": "add", - "path": "/paths/~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~1current~1{input_unit}~1{output_unit}/get/x-python", - "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_current_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitCurrentConversion\nfrom kittycad.models.unit_current import UnitCurrent\nfrom kittycad.types import Response\n\n\ndef example_get_current_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitCurrentConversion, Error]\n ] = get_current_unit_conversion.sync(\n client=client,\n input_unit=UnitCurrent.AMPERES,\n output_unit=UnitCurrent.AMPERES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitCurrentConversion = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_current_unit_conversion.html" - } - }, { "op": "add", "path": "/paths/~1unit~1conversion~1torque~1{input_unit}~1{output_unit}/get/x-python", @@ -457,18 +17,18 @@ }, { "op": "add", - "path": "/paths/~1api-calls~1{id}/get/x-python", + "path": "/paths/~1file~1execute~1{lang}/post/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_api_call\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPrice, Error\nfrom kittycad.types import Response\n\n\ndef example_get_api_call():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiCallWithPrice, Error]] = get_api_call.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPrice = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call.html" + "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/~1user~1onboarding/get/x-python", + "path": "/paths/~1ai~1image-to-3d~1{input_format}~1{output_format}/post/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user_onboarding_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Onboarding\nfrom kittycad.types import Response\n\n\ndef example_get_user_onboarding_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Onboarding, Error]] = get_user_onboarding_self.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Onboarding = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_onboarding_self.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.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" } }, { @@ -481,10 +41,74 @@ }, { "op": "add", - "path": "/paths/~1file~1center-of-mass/post/x-python", + "path": "/paths/~1_meta~1info/get/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" + "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/~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/~1api-call-metrics/get/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_api_call_metrics\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallQueryGroup, Error\nfrom kittycad.models.api_call_query_group_by import ApiCallQueryGroupBy\nfrom kittycad.types import Response\n\n\ndef example_get_api_call_metrics():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[List[ApiCallQueryGroup], Error]\n ] = get_api_call_metrics.sync(\n client=client,\n group_by=ApiCallQueryGroupBy.EMAIL,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: List[ApiCallQueryGroup] = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call_metrics.html" + } + }, + { + "op": "add", + "path": "/paths/~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/~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/~1async~1operations/get/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import list_async_operations\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AsyncApiCallResultsPage, Error\nfrom kittycad.models.api_call_status import ApiCallStatus\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_async_operations():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[AsyncApiCallResultsPage, Error]\n ] = list_async_operations.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n status=ApiCallStatus.QUEUED,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AsyncApiCallResultsPage = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_async_operations.html" + } + }, + { + "op": "add", + "path": "/paths/~1user~1payment~1methods/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~1temperature~1{input_unit}~1{output_unit}/get/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_temperature_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitTemperatureConversion\nfrom kittycad.models.unit_temperature import UnitTemperature\nfrom kittycad.types import Response\n\n\ndef example_get_temperature_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitTemperatureConversion, Error]\n ] = get_temperature_unit_conversion.sync(\n client=client,\n input_unit=UnitTemperature.CELSIUS,\n output_unit=UnitTemperature.CELSIUS,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitTemperatureConversion = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_temperature_unit_conversion.html" + } + }, + { + "op": "add", + "path": "/paths/~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" } }, { @@ -495,6 +119,366 @@ "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_pressure_unit_conversion.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/~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~1onboarding/get/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user_onboarding_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Onboarding\nfrom kittycad.types import Response\n\n\ndef example_get_user_onboarding_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Onboarding, Error]] = get_user_onboarding_self.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Onboarding = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_onboarding_self.html" + } + }, + { + "op": "add", + "path": "/paths/~1/get/x-python", + "value": { + "example": "from kittycad.api.meta import get_schema\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_get_schema():\n # Create our client.\n client = ClientFromEnv()\n\n get_schema.sync(\n client=client,\n )\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_schema.html" + } + }, + { + "op": "add", + "path": "/paths/~1openai~1openapi.json/get/x-python", + "value": { + "example": "from kittycad.api.meta import get_openai_schema\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_get_openai_schema():\n # Create our client.\n client = ClientFromEnv()\n\n get_openai_schema.sync(\n client=client,\n )\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_openai_schema.html" + } + }, + { + "op": "add", + "path": "/paths/~1unit~1conversion~1force~1{input_unit}~1{output_unit}/get/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_force_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitForceConversion\nfrom kittycad.models.unit_force import UnitForce\nfrom kittycad.types import Response\n\n\ndef example_get_force_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitForceConversion, Error]\n ] = get_force_unit_conversion.sync(\n client=client,\n input_unit=UnitForce.DYNES,\n output_unit=UnitForce.DYNES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitForceConversion = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_force_unit_conversion.html" + } + }, + { + "op": "add", + "path": "/paths/~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/~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~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/~1user~1payment~1methods~1{id}/delete/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import delete_payment_method_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_payment_method_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_payment_method_for_user.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.delete_payment_method_for_user.html" + } + }, + { + "op": "add", + "path": "/paths/~1unit~1conversion~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/~1.well-known~1ai-plugin.json/get/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.meta import get_ai_plugin_manifest\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AiPluginManifest, Error\nfrom kittycad.types import Response\n\n\ndef example_get_ai_plugin_manifest():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[AiPluginManifest, Error]\n ] = get_ai_plugin_manifest.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AiPluginManifest = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_ai_plugin_manifest.html" + } + }, + { + "op": "add", + "path": "/paths/~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/~1auth~1email~1callback/get/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.hidden import auth_email_callback\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_auth_email_callback():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = auth_email_callback.sync(\n client=client,\n email=\"\",\n token=\"\",\n callback_url=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.hidden.auth_email_callback.html" + } + }, + { + "op": "add", + "path": "/paths/~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/put/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import update_user_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, User\nfrom kittycad.models.update_user import UpdateUser\nfrom kittycad.types import Response\n\n\ndef example_update_user_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[User, Error]] = update_user_self.sync(\n client=client,\n body=UpdateUser(\n company=\"\",\n discord=\"\",\n first_name=\"\",\n github=\"\",\n last_name=\"\",\n phone=\"\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: User = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.update_user_self.html" + } + }, + { + "op": "add", + "path": "/paths/~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" + } + }, + { + "op": "add", + "path": "/paths/~1ws~1modeling~1commands/get/x-python", + "value": { + "example": "from kittycad.api.modeling import modeling_commands_ws\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_modeling_commands_ws():\n # Create our client.\n client = ClientFromEnv()\n\n # Connect to the websocket.\n websocket = modeling_commands_ws.sync(\n client=client,\n fps=10,\n unlocked_framerate=False,\n video_res_height=10,\n video_res_width=10,\n webrtc=False,\n )\n\n # Send a message.\n websocket.send(\"{}\")\n\n # Get the messages.\n for message in websocket:\n print(message)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.modeling.modeling_commands_ws.html" + } + }, + { + "op": "add", + "path": "/paths/~1auth~1email/post/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.hidden import auth_email\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, VerificationToken\nfrom kittycad.models.email_authentication_form import EmailAuthenticationForm\nfrom kittycad.types import Response\n\n\ndef example_auth_email():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[VerificationToken, Error]] = auth_email.sync(\n client=client,\n body=EmailAuthenticationForm(\n email=\"\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: VerificationToken = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.hidden.auth_email.html" + } + }, + { + "op": "add", + "path": "/paths/~1unit~1conversion~1frequency~1{input_unit}~1{output_unit}/get/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_frequency_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitFrequencyConversion\nfrom kittycad.models.unit_frequency import UnitFrequency\nfrom kittycad.types import Response\n\n\ndef example_get_frequency_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitFrequencyConversion, Error]\n ] = get_frequency_unit_conversion.sync(\n client=client,\n input_unit=UnitFrequency.GIGAHERTZ,\n output_unit=UnitFrequency.GIGAHERTZ,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitFrequencyConversion = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_frequency_unit_conversion.html" + } + }, + { + "op": "add", + "path": "/paths/~1user~1api-tokens/post/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_tokens import create_api_token_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiToken, Error\nfrom kittycad.types import Response\n\n\ndef example_create_api_token_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiToken, Error]] = create_api_token_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: ApiToken = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.create_api_token_for_user.html" + } + }, + { + "op": "add", + "path": "/paths/~1user~1api-tokens/get/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_tokens import list_api_tokens_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiTokenResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_api_tokens_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiTokenResultsPage, Error]\n ] = list_api_tokens_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: ApiTokenResultsPage = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.list_api_tokens_for_user.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=\"\",\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/~1unit~1conversion~1area~1{input_unit}~1{output_unit}/get/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_area_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitAreaConversion\nfrom kittycad.models.unit_area import UnitArea\nfrom kittycad.types import Response\n\n\ndef example_get_area_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitAreaConversion, Error]\n ] = get_area_unit_conversion.sync(\n client=client,\n input_unit=UnitArea.CM2,\n output_unit=UnitArea.CM2,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitAreaConversion = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_area_unit_conversion.html" + } + }, + { + "op": "add", + "path": "/paths/~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/~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=\"\",\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/~1ai~1text-to-3d~1{output_format}/post/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import create_text_to_3d\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Mesh\nfrom kittycad.models.file_export_format import FileExportFormat\nfrom kittycad.types import Response\n\n\ndef example_create_text_to_3d():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Mesh, Error]] = create_text_to_3d.sync(\n client=client,\n output_format=FileExportFormat.FBX,\n prompt=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Mesh = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.create_text_to_3d.html" + } + }, + { + "op": "add", + "path": "/paths/~1file~1mass/post/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_mass\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileMass\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_density import UnitDensity\nfrom kittycad.models.unit_mass import UnitMass\nfrom kittycad.types import Response\n\n\ndef example_create_file_mass():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileMass, Error]] = create_file_mass.sync(\n client=client,\n material_density=3.14,\n material_density_unit=UnitDensity.LB_FT3,\n output_unit=UnitMass.G,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileMass = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_mass.html" + } + }, + { + "op": "add", + "path": "/paths/~1file~1volume/post/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_volume\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileVolume\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_volume import UnitVolume\nfrom kittycad.types import Response\n\n\ndef example_create_file_volume():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileVolume, Error]] = create_file_volume.sync(\n client=client,\n output_unit=UnitVolume.CM3,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileVolume = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_volume.html" + } + }, + { + "op": "add", + "path": "/paths/~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/~1user~1extended/get/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user_self_extended\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ExtendedUser\nfrom kittycad.types import Response\n\n\ndef example_get_user_self_extended():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ExtendedUser, Error]] = get_user_self_extended.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ExtendedUser = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_self_extended.html" + } + }, + { + "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/~1user~1api-tokens~1{token}/delete/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_tokens import delete_api_token_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_api_token_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_api_token_for_user.sync(\n client=client,\n token=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.delete_api_token_for_user.html" + } + }, + { + "op": "add", + "path": "/paths/~1user~1api-tokens~1{token}/get/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_tokens import get_api_token_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiToken, Error\nfrom kittycad.types import Response\n\n\ndef example_get_api_token_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiToken, Error]] = get_api_token_for_user.sync(\n client=client,\n token=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiToken = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_tokens.get_api_token_for_user.html" + } + }, + { + "op": "add", + "path": "/paths/~1user~1session~1{token}/get/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_session_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Session\nfrom kittycad.types import Response\n\n\ndef example_get_session_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Session, Error]] = get_session_for_user.sync(\n client=client,\n token=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Session = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_session_for_user.html" + } + }, + { + "op": "add", + "path": "/paths/~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/~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/~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/~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~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~1intent/post/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import create_payment_intent_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, PaymentIntent\nfrom kittycad.types import Response\n\n\ndef example_create_payment_intent_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[PaymentIntent, Error]\n ] = create_payment_intent_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: PaymentIntent = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.create_payment_intent_for_user.html" + } + }, + { + "op": "add", + "path": "/paths/~1api-calls~1{id}/get/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_api_call\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPrice, Error\nfrom kittycad.types import Response\n\n\ndef example_get_api_call():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiCallWithPrice, Error]] = get_api_call.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPrice = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call.html" + } + }, + { + "op": "add", + "path": "/paths/~1async~1operations~1{id}/get/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_async_operation\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import (\n Error,\n FileCenterOfMass,\n FileConversion,\n FileDensity,\n FileMass,\n FileSurfaceArea,\n FileVolume,\n)\nfrom kittycad.types import Response\n\n\ndef example_get_async_operation():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[\n FileConversion,\n FileCenterOfMass,\n FileMass,\n FileVolume,\n FileDensity,\n FileSurfaceArea,\n Error,\n ]\n ] = get_async_operation.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Union[\n FileConversion,\n FileCenterOfMass,\n FileMass,\n FileVolume,\n FileDensity,\n FileSurfaceArea,\n ] = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_async_operation.html" + } + }, + { + "op": "add", + "path": "/paths/~1unit~1conversion~1energy~1{input_unit}~1{output_unit}/get/x-python", + "value": { + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_energy_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitEnergyConversion\nfrom kittycad.models.unit_energy import UnitEnergy\nfrom kittycad.types import Response\n\n\ndef example_get_energy_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitEnergyConversion, Error]\n ] = get_energy_unit_conversion.sync(\n client=client,\n input_unit=UnitEnergy.BTU,\n output_unit=UnitEnergy.BTU,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitEnergyConversion = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_energy_unit_conversion.html" + } + }, { "op": "add", "path": "/paths/~1users-extended/get/x-python", @@ -505,10 +489,18 @@ }, { "op": "add", - "path": "/paths/~1user~1payment/put/x-python", + "path": "/paths/~1users-extended~1{id}/get/x-python", "value": { - "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import update_payment_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Customer, Error\nfrom kittycad.models.billing_info import BillingInfo\nfrom kittycad.types import Response\n\n\ndef example_update_payment_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[Customer, Error]\n ] = update_payment_information_for_user.sync(\n client=client,\n body=BillingInfo(\n name=\"\",\n phone=\"\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Customer = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.update_payment_information_for_user.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user_extended\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ExtendedUser\nfrom kittycad.types import Response\n\n\ndef example_get_user_extended():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ExtendedUser, Error]] = get_user_extended.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ExtendedUser = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_extended.html" + } + }, + { + "op": "add", + "path": "/paths/~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" } }, { @@ -537,18 +529,26 @@ }, { "op": "add", - "path": "/paths/~1ws~1modeling~1commands/get/x-python", + "path": "/paths/~1user~1payment/put/x-python", "value": { - "example": "from kittycad.api.modeling import modeling_commands_ws\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_modeling_commands_ws():\n # Create our client.\n client = ClientFromEnv()\n\n # Connect to the websocket.\n websocket = modeling_commands_ws.sync(\n client=client,\n fps=10,\n unlocked_framerate=False,\n video_res_height=10,\n video_res_width=10,\n webrtc=False,\n )\n\n # Send a message.\n websocket.send(\"{}\")\n\n # Get the messages.\n for message in websocket:\n print(message)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.modeling.modeling_commands_ws.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import update_payment_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Customer, Error\nfrom kittycad.models.billing_info import BillingInfo\nfrom kittycad.types import Response\n\n\ndef example_update_payment_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[Customer, Error]\n ] = update_payment_information_for_user.sync(\n client=client,\n body=BillingInfo(\n name=\"\",\n phone=\"\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Customer = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.update_payment_information_for_user.html" } }, { "op": "add", - "path": "/paths/~1users/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.users import list_users\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UserResultsPage\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_users():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[UserResultsPage, Error]] = list_users.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UserResultsPage = result\n print(body)\n", - "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.list_users.html" + "example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_api_call_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPrice, Error\nfrom kittycad.types import Response\n\n\ndef example_get_api_call_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiCallWithPrice, Error]] = get_api_call_for_user.sync(\n client=client,\n id=\"\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPrice = result\n print(body)\n", + "libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call_for_user.html" + } + }, + { + "op": "add", + "path": "/paths/~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" } } ] \ No newline at end of file diff --git a/kittycad/api/ai/__init__.py b/kittycad/api/ai/__init__.py index 2a8f49108..86338106a 100644 --- a/kittycad/api/ai/__init__.py +++ b/kittycad/api/ai/__init__.py @@ -1 +1 @@ -""" Contains methods for accessing the ai API paths: AI uses machine learning to generate 3D meshes. """ # noqa: E501 +""" Contains methods for accessing the ai API paths: AI uses machine learning to generate 3D meshes. """ # noqa: E501 diff --git a/kittycad/api/ai/create_image_to_3d.py b/kittycad/api/ai/create_image_to_3d.py index cabf93a34..0c4a2e872 100644 --- a/kittycad/api/ai/create_image_to_3d.py +++ b/kittycad/api/ai/create_image_to_3d.py @@ -11,17 +11,38 @@ from ...types import Response def _get_kwargs( + + input_format: ImageType, + + + output_format: FileExportFormat, + + + body: bytes, + + *, client: Client, + + + + + + + ) -> 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/image-to-3d/{input_format}/{output_format}".format(client.base_url, input_format=input_format,output_format=output_format,) # noqa: E501 + + + + + + + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -35,22 +56,23 @@ 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 - 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 _parse_response(*, response: httpx.Response) -> Optional[Union[Mesh, Error]] : + if response.status_code == 200: + response_200 = Mesh.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[Mesh, Error]]]: +) -> Response[Optional[Union[Mesh, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -60,16 +82,37 @@ def _build_response( def sync_detailed( + + input_format: ImageType, + + + output_format: FileExportFormat, + + + body: bytes, + + *, client: Client, -) -> Response[Optional[Union[Mesh, Error]]]: + + + + + + + +) -> Response[Optional[Union[Mesh, Error]]]: kwargs = _get_kwargs( + input_format=input_format, + output_format=output_format, + body=body, + client=client, ) @@ -82,33 +125,75 @@ def sync_detailed( def sync( + + input_format: ImageType, + + + output_format: FileExportFormat, + + + body: bytes, + + *, client: Client, -) -> Optional[Union[Mesh, Error]]: + + + + + + + +) -> 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 return sync_detailed( + input_format=input_format, + output_format=output_format, + body=body, + client=client, ).parsed async def asyncio_detailed( + + input_format: ImageType, + + + output_format: FileExportFormat, + + + body: bytes, + + *, client: Client, -) -> Response[Optional[Union[Mesh, Error]]]: + + + + + + + +) -> Response[Optional[Union[Mesh, Error]]]: kwargs = _get_kwargs( + input_format=input_format, + output_format=output_format, + body=body, + client=client, ) @@ -119,19 +204,40 @@ async def asyncio_detailed( async def asyncio( + + input_format: ImageType, + + + output_format: FileExportFormat, + + + body: bytes, + + *, client: Client, -) -> Optional[Union[Mesh, Error]]: + + + + + + + +) -> 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 return ( await asyncio_detailed( + input_format=input_format, + output_format=output_format, + body=body, + client=client, ) ).parsed diff --git a/kittycad/api/ai/create_text_to_3d.py b/kittycad/api/ai/create_text_to_3d.py index 472415cb6..cb988aea1 100644 --- a/kittycad/api/ai/create_text_to_3d.py +++ b/kittycad/api/ai/create_text_to_3d.py @@ -10,21 +10,36 @@ from ...types import Response def _get_kwargs( + + output_format: FileExportFormat, + + + prompt: str, + + *, client: Client, + + + + + ) -> Dict[str, Any]: - url = "{}/ai/text-to-3d/{output_format}".format( - client.base_url, - output_format=output_format, - ) # noqa: E501 - + url = "{}/ai/text-to-3d/{output_format}".format(client.base_url, output_format=output_format,) # noqa: E501 + + + + if prompt is not None: if "?" in url: url = url + "&prompt=" + str(prompt) else: url = url + "?prompt=" + str(prompt) + + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -34,25 +49,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -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 - 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 _parse_response(*, response: httpx.Response) -> Optional[Union[Mesh, Error]] : + if response.status_code == 200: + response_200 = Mesh.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[Mesh, Error]]]: +) -> Response[Optional[Union[Mesh, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -62,14 +79,29 @@ def _build_response( def sync_detailed( + + output_format: FileExportFormat, + + + prompt: str, + + *, client: Client, -) -> Response[Optional[Union[Mesh, Error]]]: + + + + + +) -> Response[Optional[Union[Mesh, Error]]]: kwargs = _get_kwargs( + output_format=output_format, + prompt=prompt, + client=client, ) @@ -82,29 +114,59 @@ def sync_detailed( def sync( + + output_format: FileExportFormat, + + + prompt: str, + + *, client: Client, -) -> Optional[Union[Mesh, Error]]: + + + + + +) -> 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 return sync_detailed( + output_format=output_format, + prompt=prompt, + client=client, ).parsed async def asyncio_detailed( + + output_format: FileExportFormat, + + + prompt: str, + + *, client: Client, -) -> Response[Optional[Union[Mesh, Error]]]: + + + + + +) -> Response[Optional[Union[Mesh, Error]]]: kwargs = _get_kwargs( + output_format=output_format, + prompt=prompt, + client=client, ) @@ -115,17 +177,32 @@ async def asyncio_detailed( async def asyncio( + + output_format: FileExportFormat, + + + prompt: str, + + *, client: Client, -) -> Optional[Union[Mesh, Error]]: + + + + + +) -> 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 return ( await asyncio_detailed( + output_format=output_format, + prompt=prompt, + client=client, ) ).parsed diff --git a/kittycad/api/api_calls/__init__.py b/kittycad/api/api_calls/__init__.py index 917672e26..b916f7ddb 100644 --- a/kittycad/api/api_calls/__init__.py +++ b/kittycad/api/api_calls/__init__.py @@ -1 +1 @@ -""" Contains methods for accessing the api_calls API paths: API calls that have been performed by users can be queried by the API. This is helpful for debugging as well as billing. """ # noqa: E501 +""" Contains methods for accessing the api_calls API paths: API calls that have been performed by users can be queried by the API. This is helpful for debugging as well as billing. """ # noqa: E501 diff --git a/kittycad/api/api_calls/get_api_call.py b/kittycad/api/api_calls/get_api_call.py index b140be1d4..c59f76a00 100644 --- a/kittycad/api/api_calls/get_api_call.py +++ b/kittycad/api/api_calls/get_api_call.py @@ -9,14 +9,22 @@ from ...types import Response def _get_kwargs( + + id: str, + + *, client: Client, + + + ) -> Dict[str, Any]: - url = "{}/api-calls/{id}".format( - client.base_url, - id=id, - ) # noqa: E501 + url = "{}/api-calls/{id}".format(client.base_url, id=id,) # noqa: E501 + + + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -26,27 +34,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -def _parse_response( - *, response: httpx.Response -) -> Optional[Union[ApiCallWithPrice, Error]]: - if response.status_code == 200: - response_200 = ApiCallWithPrice.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 _parse_response(*, response: httpx.Response) -> Optional[Union[ApiCallWithPrice, Error]] : + if response.status_code == 200: + response_200 = ApiCallWithPrice.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[ApiCallWithPrice, Error]]]: +) -> Response[Optional[Union[ApiCallWithPrice, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -56,12 +64,21 @@ def _build_response( def sync_detailed( + + id: str, + + *, client: Client, -) -> Response[Optional[Union[ApiCallWithPrice, Error]]]: + + + +) -> Response[Optional[Union[ApiCallWithPrice, Error]]]: kwargs = _get_kwargs( + id=id, + client=client, ) @@ -74,27 +91,45 @@ def sync_detailed( def sync( + + id: str, + + *, client: Client, -) -> Optional[Union[ApiCallWithPrice, Error]]: + + + +) -> Optional[Union[ApiCallWithPrice, Error]] : """This endpoint requires authentication by any KittyCAD user. It returns details of the requested API call for the user. - If the user is not authenticated to view the specified API call, then it is not returned. - Only KittyCAD employees can view API calls for other users.""" # noqa: E501 +If the user is not authenticated to view the specified API call, then it is not returned. +Only KittyCAD employees can view API calls for other users.""" # noqa: E501 return sync_detailed( + id=id, + client=client, ).parsed async def asyncio_detailed( + + id: str, + + *, client: Client, -) -> Response[Optional[Union[ApiCallWithPrice, Error]]]: + + + +) -> Response[Optional[Union[ApiCallWithPrice, Error]]]: kwargs = _get_kwargs( + id=id, + client=client, ) @@ -105,17 +140,26 @@ async def asyncio_detailed( async def asyncio( + + id: str, + + *, client: Client, -) -> Optional[Union[ApiCallWithPrice, Error]]: + + + +) -> Optional[Union[ApiCallWithPrice, Error]] : """This endpoint requires authentication by any KittyCAD user. It returns details of the requested API call for the user. - If the user is not authenticated to view the specified API call, then it is not returned. - Only KittyCAD employees can view API calls for other users.""" # noqa: E501 +If the user is not authenticated to view the specified API call, then it is not returned. +Only KittyCAD employees can view API calls for other users.""" # noqa: E501 return ( await asyncio_detailed( + id=id, + client=client, ) ).parsed diff --git a/kittycad/api/api_calls/get_api_call_for_user.py b/kittycad/api/api_calls/get_api_call_for_user.py index b0ff01b9f..db4e7bb3e 100644 --- a/kittycad/api/api_calls/get_api_call_for_user.py +++ b/kittycad/api/api_calls/get_api_call_for_user.py @@ -9,14 +9,22 @@ from ...types import Response def _get_kwargs( + + id: str, + + *, client: Client, + + + ) -> Dict[str, Any]: - url = "{}/user/api-calls/{id}".format( - client.base_url, - id=id, - ) # noqa: E501 + url = "{}/user/api-calls/{id}".format(client.base_url, id=id,) # noqa: E501 + + + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -26,27 +34,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -def _parse_response( - *, response: httpx.Response -) -> Optional[Union[ApiCallWithPrice, Error]]: - if response.status_code == 200: - response_200 = ApiCallWithPrice.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 _parse_response(*, response: httpx.Response) -> Optional[Union[ApiCallWithPrice, Error]] : + if response.status_code == 200: + response_200 = ApiCallWithPrice.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[ApiCallWithPrice, Error]]]: +) -> Response[Optional[Union[ApiCallWithPrice, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -56,12 +64,21 @@ def _build_response( def sync_detailed( + + id: str, + + *, client: Client, -) -> Response[Optional[Union[ApiCallWithPrice, Error]]]: + + + +) -> Response[Optional[Union[ApiCallWithPrice, Error]]]: kwargs = _get_kwargs( + id=id, + client=client, ) @@ -74,25 +91,43 @@ def sync_detailed( def sync( + + id: str, + + *, client: Client, -) -> Optional[Union[ApiCallWithPrice, Error]]: + + + +) -> Optional[Union[ApiCallWithPrice, Error]] : """This endpoint requires authentication by any KittyCAD user. It returns details of the requested API call for the user.""" # noqa: E501 return sync_detailed( + id=id, + client=client, ).parsed async def asyncio_detailed( + + id: str, + + *, client: Client, -) -> Response[Optional[Union[ApiCallWithPrice, Error]]]: + + + +) -> Response[Optional[Union[ApiCallWithPrice, Error]]]: kwargs = _get_kwargs( + id=id, + client=client, ) @@ -103,15 +138,24 @@ async def asyncio_detailed( async def asyncio( + + id: str, + + *, client: Client, -) -> Optional[Union[ApiCallWithPrice, Error]]: + + + +) -> Optional[Union[ApiCallWithPrice, Error]] : """This endpoint requires authentication by any KittyCAD user. It returns details of the requested API call for the user.""" # noqa: E501 return ( await asyncio_detailed( + id=id, + client=client, ) ).parsed diff --git a/kittycad/api/api_calls/get_api_call_metrics.py b/kittycad/api/api_calls/get_api_call_metrics.py index 86f4892d0..46f48c00d 100644 --- a/kittycad/api/api_calls/get_api_call_metrics.py +++ b/kittycad/api/api_calls/get_api_call_metrics.py @@ -10,19 +10,28 @@ from ...types import Response def _get_kwargs( + + group_by: ApiCallQueryGroupBy, + + *, client: Client, + + + ) -> Dict[str, Any]: - url = "{}/api-call-metrics".format( - client.base_url, - ) # noqa: E501 - + url = "{}/api-call-metrics".format(client.base_url, ) # noqa: E501 + + if group_by is not None: if "?" in url: url = url + "&group_by=" + str(group_by) else: url = url + "?group_by=" + str(group_by) + + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -32,27 +41,30 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -def _parse_response( - *, response: httpx.Response -) -> Optional[Union[List[ApiCallQueryGroup], Error]]: - if response.status_code == 200: - response_200 = [ApiCallQueryGroup.from_dict(item) for item in 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 _parse_response(*, response: httpx.Response) -> Optional[Union[List[ApiCallQueryGroup], Error]] : + if response.status_code == 200: + response_200 = [ + ApiCallQueryGroup.from_dict(item) + for item in 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[List[ApiCallQueryGroup], Error]]]: +) -> Response[Optional[Union[List[ApiCallQueryGroup], Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -62,12 +74,21 @@ def _build_response( def sync_detailed( + + group_by: ApiCallQueryGroupBy, + + *, client: Client, -) -> Response[Optional[Union[List[ApiCallQueryGroup], Error]]]: + + + +) -> Response[Optional[Union[List[ApiCallQueryGroup], Error]]]: kwargs = _get_kwargs( + group_by=group_by, + client=client, ) @@ -80,25 +101,43 @@ def sync_detailed( def sync( + + group_by: ApiCallQueryGroupBy, + + *, client: Client, -) -> Optional[Union[List[ApiCallQueryGroup], Error]]: + + + +) -> Optional[Union[List[ApiCallQueryGroup], Error]] : """This endpoint requires authentication by a KittyCAD employee. The API calls are grouped by the parameter passed.""" # noqa: E501 return sync_detailed( + group_by=group_by, + client=client, ).parsed async def asyncio_detailed( + + group_by: ApiCallQueryGroupBy, + + *, client: Client, -) -> Response[Optional[Union[List[ApiCallQueryGroup], Error]]]: + + + +) -> Response[Optional[Union[List[ApiCallQueryGroup], Error]]]: kwargs = _get_kwargs( + group_by=group_by, + client=client, ) @@ -109,15 +148,24 @@ async def asyncio_detailed( async def asyncio( + + group_by: ApiCallQueryGroupBy, + + *, client: Client, -) -> Optional[Union[List[ApiCallQueryGroup], Error]]: + + + +) -> Optional[Union[List[ApiCallQueryGroup], Error]] : """This endpoint requires authentication by a KittyCAD employee. The API calls are grouped by the parameter passed.""" # noqa: E501 return ( await asyncio_detailed( + group_by=group_by, + client=client, ) ).parsed diff --git a/kittycad/api/api_calls/get_async_operation.py b/kittycad/api/api_calls/get_async_operation.py index 46179a9d1..e458ebb3c 100644 --- a/kittycad/api/api_calls/get_async_operation.py +++ b/kittycad/api/api_calls/get_async_operation.py @@ -14,14 +14,22 @@ from ...types import Response def _get_kwargs( + + id: str, + + *, client: Client, + + + ) -> Dict[str, Any]: - url = "{}/async/operations/{id}".format( - client.base_url, - id=id, - ) # noqa: E501 + url = "{}/async/operations/{id}".format(client.base_url, id=id,) # noqa: E501 + + + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -31,102 +39,80 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -def _parse_response( - *, response: httpx.Response -) -> Optional[ - Union[ - FileConversion, - FileCenterOfMass, - FileMass, - FileVolume, - FileDensity, - FileSurfaceArea, - Error, - ] -]: - if response.status_code == 200: - data = response.json() - try: - if not isinstance(data, dict): - raise TypeError() - option_file_conversion = FileConversion.from_dict(data) - return option_file_conversion - except ValueError: - pass - except TypeError: - pass - try: - if not isinstance(data, dict): - raise TypeError() - option_file_center_of_mass = FileCenterOfMass.from_dict(data) - return option_file_center_of_mass - except ValueError: - pass - except TypeError: - pass - try: - if not isinstance(data, dict): - raise TypeError() - option_file_mass = FileMass.from_dict(data) - return option_file_mass - except ValueError: - pass - except TypeError: - pass - try: - if not isinstance(data, dict): - raise TypeError() - option_file_volume = FileVolume.from_dict(data) - return option_file_volume - except ValueError: - pass - except TypeError: - pass - try: - if not isinstance(data, dict): - raise TypeError() - option_file_density = FileDensity.from_dict(data) - return option_file_density - except ValueError: - pass - except TypeError: - pass - try: - if not isinstance(data, dict): - raise TypeError() - option_file_surface_area = FileSurfaceArea.from_dict(data) - return option_file_surface_area - except ValueError: - raise - except TypeError: - raise - if response.status_code == 400: - response_4XX = Error.from_dict(response.json()) - return response_4XX - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) +def _parse_response(*, response: httpx.Response) -> Optional[Union[FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]] : + if response.status_code == 200: + data = response.json() + try: + if not isinstance(data, dict): + raise TypeError() + option_file_conversion = FileConversion.from_dict(data) + return option_file_conversion + except ValueError: + pass + except TypeError: + pass + try: + if not isinstance(data, dict): + raise TypeError() + option_file_center_of_mass = FileCenterOfMass.from_dict(data) + return option_file_center_of_mass + except ValueError: + pass + except TypeError: + pass + try: + if not isinstance(data, dict): + raise TypeError() + option_file_mass = FileMass.from_dict(data) + return option_file_mass + except ValueError: + pass + except TypeError: + pass + try: + if not isinstance(data, dict): + raise TypeError() + option_file_volume = FileVolume.from_dict(data) + return option_file_volume + except ValueError: + pass + except TypeError: + pass + try: + if not isinstance(data, dict): + raise TypeError() + option_file_density = FileDensity.from_dict(data) + return option_file_density + except ValueError: + pass + except TypeError: + pass + try: + if not isinstance(data, dict): + raise TypeError() + option_file_surface_area = FileSurfaceArea.from_dict(data) + return option_file_surface_area + except ValueError: + raise + except TypeError: + raise + if response.status_code == 400: + response_4XX = Error.from_dict(response.json()) + return response_4XX + if response.status_code == 500: + response_5XX = Error.from_dict(response.json()) + return response_5XX + return Error.from_dict(response.json()) + def _build_response( *, response: httpx.Response -) -> Response[ - Optional[ - Union[ - FileConversion, - FileCenterOfMass, - FileMass, - FileVolume, - FileDensity, - FileSurfaceArea, - Error, - ] - ] -]: +) -> Response[Optional[Union[FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -136,24 +122,21 @@ def _build_response( def sync_detailed( + + id: str, + + *, client: Client, -) -> Response[ - Optional[ - Union[ - FileConversion, - FileCenterOfMass, - FileMass, - FileVolume, - FileDensity, - FileSurfaceArea, - Error, - ] - ] -]: + + + +) -> Response[Optional[Union[FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]]: kwargs = _get_kwargs( + id=id, + client=client, ) @@ -166,51 +149,46 @@ def sync_detailed( def sync( + + id: str, + + *, client: Client, -) -> Optional[ - Union[ - FileConversion, - FileCenterOfMass, - FileMass, - FileVolume, - FileDensity, - FileSurfaceArea, - Error, - ] -]: + + + +) -> Optional[Union[FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, 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. - Only KittyCAD employees with the proper access can view async operations for other users. - """ # noqa: E501 +This endpoint requires authentication by any KittyCAD user. It returns details of the requested async operation for the user. +If the user is not authenticated to view the specified async operation, then it is not returned. +Only KittyCAD employees with the proper access can view async operations for other users.""" # noqa: E501 return sync_detailed( + id=id, + client=client, ).parsed async def asyncio_detailed( + + id: str, + + *, client: Client, -) -> Response[ - Optional[ - Union[ - FileConversion, - FileCenterOfMass, - FileMass, - FileVolume, - FileDensity, - FileSurfaceArea, - Error, - ] - ] -]: + + + +) -> Response[Optional[Union[FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, Error]]]: kwargs = _get_kwargs( + id=id, + client=client, ) @@ -221,29 +199,27 @@ async def asyncio_detailed( async def asyncio( + + id: str, + + *, client: Client, -) -> Optional[ - Union[ - FileConversion, - FileCenterOfMass, - FileMass, - FileVolume, - FileDensity, - FileSurfaceArea, - Error, - ] -]: + + + +) -> Optional[Union[FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea, 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. - Only KittyCAD employees with the proper access can view async operations for other users. - """ # noqa: E501 +This endpoint requires authentication by any KittyCAD user. It returns details of the requested async operation for the user. +If the user is not authenticated to view the specified async operation, then it is not returned. +Only KittyCAD employees with the proper access can view async operations for other users.""" # noqa: E501 return ( await asyncio_detailed( + id=id, + client=client, ) ).parsed diff --git a/kittycad/api/api_calls/list_api_calls.py b/kittycad/api/api_calls/list_api_calls.py index 45071e281..c0f8e6309 100644 --- a/kittycad/api/api_calls/list_api_calls.py +++ b/kittycad/api/api_calls/list_api_calls.py @@ -10,33 +10,56 @@ 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 = "{}/api-calls".format( - client.base_url, - ) # noqa: E501 - + url = "{}/api-calls".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() @@ -46,27 +69,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -def _parse_response( - *, response: httpx.Response -) -> Optional[Union[ApiCallWithPriceResultsPage, Error]]: - if response.status_code == 200: - response_200 = ApiCallWithPriceResultsPage.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 _parse_response(*, response: httpx.Response) -> Optional[Union[ApiCallWithPriceResultsPage, Error]] : + if response.status_code == 200: + response_200 = ApiCallWithPriceResultsPage.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[ApiCallWithPriceResultsPage, Error]]]: +) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -76,16 +99,37 @@ def _build_response( def sync_detailed( + + + + + + sort_by: CreatedAtSortMode, + + *, client: Client, + + limit: Optional[int] = None, + + + page_token: Optional[str] = None, -) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]: + + + + +) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]: kwargs = _get_kwargs( + limit=limit, + page_token=page_token, + sort_by=sort_by, + client=client, ) @@ -98,33 +142,75 @@ def sync_detailed( def sync( + + + + + + sort_by: CreatedAtSortMode, + + *, client: Client, + + limit: Optional[int] = None, + + + page_token: Optional[str] = None, -) -> Optional[Union[ApiCallWithPriceResultsPage, Error]]: + + + + +) -> Optional[Union[ApiCallWithPriceResultsPage, Error]] : """This endpoint requires authentication by a KittyCAD employee. The API calls are returned in order of creation, with the most recently created API calls 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[ApiCallWithPriceResultsPage, Error]]]: + + + + +) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]: kwargs = _get_kwargs( + limit=limit, + page_token=page_token, + sort_by=sort_by, + client=client, ) @@ -135,19 +221,40 @@ async def asyncio_detailed( async def asyncio( + + + + + + sort_by: CreatedAtSortMode, + + *, client: Client, + + limit: Optional[int] = None, + + + page_token: Optional[str] = None, -) -> Optional[Union[ApiCallWithPriceResultsPage, Error]]: + + + + +) -> Optional[Union[ApiCallWithPriceResultsPage, Error]] : """This endpoint requires authentication by a KittyCAD employee. The API calls are returned in order of creation, with the most recently created API calls first.""" # noqa: E501 return ( await asyncio_detailed( + limit=limit, + page_token=page_token, + sort_by=sort_by, + client=client, ) ).parsed diff --git a/kittycad/api/api_calls/list_api_calls_for_user.py b/kittycad/api/api_calls/list_api_calls_for_user.py index beb575684..988b77d1b 100644 --- a/kittycad/api/api_calls/list_api_calls_for_user.py +++ b/kittycad/api/api_calls/list_api_calls_for_user.py @@ -10,35 +10,64 @@ from ...types import Response def _get_kwargs( + + id: str, + + + + + + + sort_by: CreatedAtSortMode, + + *, client: Client, + + + + limit: Optional[int] = None, + + + page_token: Optional[str] = None, + + + + ) -> Dict[str, Any]: - url = "{}/users/{id}/api-calls".format( - client.base_url, - id=id, - ) # noqa: E501 - + url = "{}/users/{id}/api-calls".format(client.base_url, id=id,) # 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() @@ -48,27 +77,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -def _parse_response( - *, response: httpx.Response -) -> Optional[Union[ApiCallWithPriceResultsPage, Error]]: - if response.status_code == 200: - response_200 = ApiCallWithPriceResultsPage.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 _parse_response(*, response: httpx.Response) -> Optional[Union[ApiCallWithPriceResultsPage, Error]] : + if response.status_code == 200: + response_200 = ApiCallWithPriceResultsPage.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[ApiCallWithPriceResultsPage, Error]]]: +) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -78,18 +107,45 @@ def _build_response( def sync_detailed( + + id: str, + + + + + + + sort_by: CreatedAtSortMode, + + *, client: Client, + + + + limit: Optional[int] = None, + + + page_token: Optional[str] = None, -) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]: + + + + +) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]: kwargs = _get_kwargs( + id=id, + limit=limit, + page_token=page_token, + sort_by=sort_by, + client=client, ) @@ -102,41 +158,94 @@ def sync_detailed( def sync( + + id: str, + + + + + + + sort_by: CreatedAtSortMode, + + *, client: Client, + + + + limit: Optional[int] = None, + + + page_token: Optional[str] = None, -) -> Optional[Union[ApiCallWithPriceResultsPage, Error]]: + + + + +) -> Optional[Union[ApiCallWithPriceResultsPage, Error]] : """This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user if "me" is passed as the user id. - Alternatively, you can use the `/user/api-calls` endpoint to get the API calls for your user. - If the authenticated user is a KittyCAD employee, then the API calls are returned for the user specified by the user id. - The API calls are returned in order of creation, with the most recently created API calls first. - """ # noqa: E501 +Alternatively, you can use the `/user/api-calls` endpoint to get the API calls for your user. +If the authenticated user is a KittyCAD employee, then the API calls are returned for the user specified by the user id. +The API calls are returned in order of creation, with the most recently created API calls first.""" # noqa: E501 return sync_detailed( + id=id, + limit=limit, + page_token=page_token, + sort_by=sort_by, + client=client, ).parsed async def asyncio_detailed( + + id: str, + + + + + + + sort_by: CreatedAtSortMode, + + *, client: Client, + + + + limit: Optional[int] = None, + + + page_token: Optional[str] = None, -) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]: + + + + +) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]: kwargs = _get_kwargs( + id=id, + limit=limit, + page_token=page_token, + sort_by=sort_by, + client=client, ) @@ -147,25 +256,51 @@ async def asyncio_detailed( async def asyncio( + + id: str, + + + + + + + sort_by: CreatedAtSortMode, + + *, client: Client, + + + + limit: Optional[int] = None, + + + page_token: Optional[str] = None, -) -> Optional[Union[ApiCallWithPriceResultsPage, Error]]: + + + + +) -> Optional[Union[ApiCallWithPriceResultsPage, Error]] : """This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user if "me" is passed as the user id. - Alternatively, you can use the `/user/api-calls` endpoint to get the API calls for your user. - If the authenticated user is a KittyCAD employee, then the API calls are returned for the user specified by the user id. - The API calls are returned in order of creation, with the most recently created API calls first. - """ # noqa: E501 +Alternatively, you can use the `/user/api-calls` endpoint to get the API calls for your user. +If the authenticated user is a KittyCAD employee, then the API calls are returned for the user specified by the user id. +The API calls are returned in order of creation, with the most recently created API calls first.""" # noqa: E501 return ( await asyncio_detailed( + id=id, + limit=limit, + page_token=page_token, + sort_by=sort_by, + client=client, ) ).parsed diff --git a/kittycad/api/api_calls/list_async_operations.py b/kittycad/api/api_calls/list_async_operations.py index fd1a2664b..3634262cc 100644 --- a/kittycad/api/api_calls/list_async_operations.py +++ b/kittycad/api/api_calls/list_async_operations.py @@ -11,40 +11,70 @@ from ...types import Response def _get_kwargs( + + + + + + sort_by: CreatedAtSortMode, + + + status: ApiCallStatus, + + *, client: Client, + + limit: Optional[int] = None, + + + page_token: Optional[str] = None, + + + + + + ) -> Dict[str, Any]: - url = "{}/async/operations".format( - client.base_url, - ) # noqa: E501 - + url = "{}/async/operations".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) - + + + if status is not None: if "?" in url: url = url + "&status=" + str(status) else: url = url + "?status=" + str(status) + + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -54,27 +84,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -def _parse_response( - *, response: httpx.Response -) -> Optional[Union[AsyncApiCallResultsPage, Error]]: - if response.status_code == 200: - response_200 = AsyncApiCallResultsPage.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 _parse_response(*, response: httpx.Response) -> Optional[Union[AsyncApiCallResultsPage, Error]] : + if response.status_code == 200: + response_200 = AsyncApiCallResultsPage.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[AsyncApiCallResultsPage, Error]]]: +) -> Response[Optional[Union[AsyncApiCallResultsPage, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -84,18 +114,45 @@ def _build_response( def sync_detailed( + + + + + + sort_by: CreatedAtSortMode, + + + status: ApiCallStatus, + + *, client: Client, + + limit: Optional[int] = None, + + + page_token: Optional[str] = None, -) -> Response[Optional[Union[AsyncApiCallResultsPage, Error]]]: + + + + + + +) -> Response[Optional[Union[AsyncApiCallResultsPage, Error]]]: kwargs = _get_kwargs( + limit=limit, + page_token=page_token, + sort_by=sort_by, + status=status, + client=client, ) @@ -108,38 +165,92 @@ def sync_detailed( def sync( + + + + + + sort_by: CreatedAtSortMode, + + + status: ApiCallStatus, + + *, client: Client, + + limit: Optional[int] = None, + + + page_token: Optional[str] = None, -) -> Optional[Union[AsyncApiCallResultsPage, Error]]: + + + + + + +) -> Optional[Union[AsyncApiCallResultsPage, Error]] : """For async file conversion operations, this endpoint does not return the contents of converted files (`output`). To get the contents use the `/async/operations/{id}` endpoint. - This endpoint requires authentication by a KittyCAD employee.""" # noqa: E501 +This endpoint requires authentication by a KittyCAD employee.""" # noqa: E501 return sync_detailed( + limit=limit, + page_token=page_token, + sort_by=sort_by, + status=status, + client=client, ).parsed async def asyncio_detailed( + + + + + + sort_by: CreatedAtSortMode, + + + status: ApiCallStatus, + + *, client: Client, + + limit: Optional[int] = None, + + + page_token: Optional[str] = None, -) -> Response[Optional[Union[AsyncApiCallResultsPage, Error]]]: + + + + + + +) -> Response[Optional[Union[AsyncApiCallResultsPage, Error]]]: kwargs = _get_kwargs( + limit=limit, + page_token=page_token, + sort_by=sort_by, + status=status, + client=client, ) @@ -150,22 +261,49 @@ async def asyncio_detailed( async def asyncio( + + + + + + sort_by: CreatedAtSortMode, + + + status: ApiCallStatus, + + *, client: Client, + + limit: Optional[int] = None, + + + page_token: Optional[str] = None, -) -> Optional[Union[AsyncApiCallResultsPage, Error]]: + + + + + + +) -> Optional[Union[AsyncApiCallResultsPage, Error]] : """For async file conversion operations, this endpoint does not return the contents of converted files (`output`). To get the contents use the `/async/operations/{id}` endpoint. - This endpoint requires authentication by a KittyCAD employee.""" # noqa: E501 +This endpoint requires authentication by a KittyCAD employee.""" # noqa: E501 return ( await asyncio_detailed( + limit=limit, + page_token=page_token, + sort_by=sort_by, + status=status, + client=client, ) ).parsed diff --git a/kittycad/api/api_calls/user_list_api_calls.py b/kittycad/api/api_calls/user_list_api_calls.py index a6a1cec93..8b354713f 100644 --- a/kittycad/api/api_calls/user_list_api_calls.py +++ b/kittycad/api/api_calls/user_list_api_calls.py @@ -10,33 +10,56 @@ 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/api-calls".format( - client.base_url, - ) # noqa: E501 - + url = "{}/user/api-calls".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() @@ -46,27 +69,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -def _parse_response( - *, response: httpx.Response -) -> Optional[Union[ApiCallWithPriceResultsPage, Error]]: - if response.status_code == 200: - response_200 = ApiCallWithPriceResultsPage.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 _parse_response(*, response: httpx.Response) -> Optional[Union[ApiCallWithPriceResultsPage, Error]] : + if response.status_code == 200: + response_200 = ApiCallWithPriceResultsPage.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[ApiCallWithPriceResultsPage, Error]]]: +) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -76,16 +99,37 @@ def _build_response( def sync_detailed( + + + + + + sort_by: CreatedAtSortMode, + + *, client: Client, + + limit: Optional[int] = None, + + + page_token: Optional[str] = None, -) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]: + + + + +) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]: kwargs = _get_kwargs( + limit=limit, + page_token=page_token, + sort_by=sort_by, + client=client, ) @@ -98,35 +142,76 @@ def sync_detailed( def sync( + + + + + + sort_by: CreatedAtSortMode, + + *, client: Client, + + limit: Optional[int] = None, + + + page_token: Optional[str] = None, -) -> Optional[Union[ApiCallWithPriceResultsPage, Error]]: + + + + +) -> Optional[Union[ApiCallWithPriceResultsPage, Error]] : """This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user. - The API calls are returned in order of creation, with the most recently created API calls first. - """ # noqa: E501 +The API calls are returned in order of creation, with the most recently created API calls first.""" # noqa: E501 return sync_detailed( + limit=limit, + 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[ApiCallWithPriceResultsPage, Error]]]: + + + + +) -> Response[Optional[Union[ApiCallWithPriceResultsPage, Error]]]: kwargs = _get_kwargs( + limit=limit, + page_token=page_token, + sort_by=sort_by, + client=client, ) @@ -137,21 +222,41 @@ async def asyncio_detailed( async def asyncio( + + + + + + sort_by: CreatedAtSortMode, + + *, client: Client, + + limit: Optional[int] = None, + + + page_token: Optional[str] = None, -) -> Optional[Union[ApiCallWithPriceResultsPage, Error]]: + + + + +) -> Optional[Union[ApiCallWithPriceResultsPage, Error]] : """This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user. - The API calls are returned in order of creation, with the most recently created API calls first. - """ # noqa: E501 +The API calls are returned in order of creation, with the most recently created API calls first.""" # noqa: E501 return ( await asyncio_detailed( + limit=limit, + page_token=page_token, + sort_by=sort_by, + client=client, ) ).parsed diff --git a/kittycad/api/api_tokens/__init__.py b/kittycad/api/api_tokens/__init__.py index 5b70d3261..10ba948ac 100644 --- a/kittycad/api/api_tokens/__init__.py +++ b/kittycad/api/api_tokens/__init__.py @@ -1 +1 @@ -""" Contains methods for accessing the api_tokens API paths: API tokens allow users to call the API outside of their session token that is used as a cookie in the user interface. Users can create, delete, and list their API tokens. But, of course, you need an API token to do this, so first be sure to generate one in the account UI. """ # noqa: E501 +""" Contains methods for accessing the api_tokens API paths: API tokens allow users to call the API outside of their session token that is used as a cookie in the user interface. Users can create, delete, and list their API tokens. But, of course, you need an API token to do this, so first be sure to generate one in the account UI. """ # noqa: E501 diff --git a/kittycad/api/api_tokens/create_api_token_for_user.py b/kittycad/api/api_tokens/create_api_token_for_user.py index 6b7c3d972..f8db0c24a 100644 --- a/kittycad/api/api_tokens/create_api_token_for_user.py +++ b/kittycad/api/api_tokens/create_api_token_for_user.py @@ -9,12 +9,14 @@ from ...types import Response def _get_kwargs( + *, client: Client, + ) -> Dict[str, Any]: - url = "{}/user/api-tokens".format( - client.base_url, - ) # noqa: E501 + url = "{}/user/api-tokens".format(client.base_url, ) # noqa: E501 + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -24,25 +26,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -def _parse_response(*, response: httpx.Response) -> Optional[Union[ApiToken, Error]]: - if response.status_code == 201: - response_201 = ApiToken.from_dict(response.json()) - return response_201 - 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 _parse_response(*, response: httpx.Response) -> Optional[Union[ApiToken, Error]] : + if response.status_code == 201: + response_201 = ApiToken.from_dict(response.json()) + return response_201 + 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[ApiToken, Error]]]: +) -> Response[Optional[Union[ApiToken, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -52,10 +56,13 @@ def _build_response( def sync_detailed( + *, client: Client, -) -> Response[Optional[Union[ApiToken, Error]]]: + +) -> Response[Optional[Union[ApiToken, Error]]]: kwargs = _get_kwargs( + client=client, ) @@ -68,21 +75,27 @@ def sync_detailed( def sync( + *, client: Client, -) -> Optional[Union[ApiToken, Error]]: + +) -> Optional[Union[ApiToken, Error]] : """This endpoint requires authentication by any KittyCAD user. It creates a new API token for the authenticated user.""" # noqa: E501 return sync_detailed( + client=client, ).parsed async def asyncio_detailed( + *, client: Client, -) -> Response[Optional[Union[ApiToken, Error]]]: + +) -> Response[Optional[Union[ApiToken, Error]]]: kwargs = _get_kwargs( + client=client, ) @@ -93,13 +106,16 @@ async def asyncio_detailed( async def asyncio( + *, client: Client, -) -> Optional[Union[ApiToken, Error]]: + +) -> Optional[Union[ApiToken, Error]] : """This endpoint requires authentication by any KittyCAD user. It creates a new API token for the authenticated user.""" # noqa: E501 return ( await asyncio_detailed( + client=client, ) ).parsed diff --git a/kittycad/api/api_tokens/delete_api_token_for_user.py b/kittycad/api/api_tokens/delete_api_token_for_user.py index c3dd8345f..9db28e831 100644 --- a/kittycad/api/api_tokens/delete_api_token_for_user.py +++ b/kittycad/api/api_tokens/delete_api_token_for_user.py @@ -8,14 +8,22 @@ from ...types import Response def _get_kwargs( + + token: str, + + *, client: Client, + + + ) -> Dict[str, Any]: - url = "{}/user/api-tokens/{token}".format( - client.base_url, - token=token, - ) # noqa: E501 + url = "{}/user/api-tokens/{token}".format(client.base_url, token=token,) # noqa: E501 + + + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -25,21 +33,25 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -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 - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) +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 + 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[Error]]: + +def _build_response( + *, response: httpx.Response +) -> Response[Optional[Error]]: return Response( status_code=response.status_code, content=response.content, @@ -49,12 +61,21 @@ def _build_response(*, response: httpx.Response) -> Response[Optional[Error]]: def sync_detailed( + + token: str, + + *, client: Client, -) -> Response[Optional[Error]]: + + + +) -> Response[Optional[Error]]: kwargs = _get_kwargs( + token=token, + client=client, ) @@ -67,27 +88,44 @@ def sync_detailed( def sync( + + token: str, + + *, client: Client, -) -> Optional[Error]: + + + +) -> Optional[Error] : """This endpoint requires authentication by any KittyCAD user. It deletes the requested API token for the user. - This endpoint does not actually delete the API token from the database. It merely marks the token as invalid. We still want to keep the token in the database for historical purposes. - """ # noqa: E501 +This endpoint does not actually delete the API token from the database. It merely marks the token as invalid. We still want to keep the token in the database for historical purposes.""" # noqa: E501 return sync_detailed( + token=token, + client=client, ).parsed async def asyncio_detailed( + + token: str, + + *, client: Client, -) -> Response[Optional[Error]]: + + + +) -> Response[Optional[Error]]: kwargs = _get_kwargs( + token=token, + client=client, ) @@ -98,17 +136,25 @@ async def asyncio_detailed( async def asyncio( + + token: str, + + *, client: Client, -) -> Optional[Error]: + + + +) -> Optional[Error] : """This endpoint requires authentication by any KittyCAD user. It deletes the requested API token for the user. - This endpoint does not actually delete the API token from the database. It merely marks the token as invalid. We still want to keep the token in the database for historical purposes. - """ # noqa: E501 +This endpoint does not actually delete the API token from the database. It merely marks the token as invalid. We still want to keep the token in the database for historical purposes.""" # noqa: E501 return ( await asyncio_detailed( + token=token, + client=client, ) ).parsed diff --git a/kittycad/api/api_tokens/get_api_token_for_user.py b/kittycad/api/api_tokens/get_api_token_for_user.py index b26130194..aff1b45be 100644 --- a/kittycad/api/api_tokens/get_api_token_for_user.py +++ b/kittycad/api/api_tokens/get_api_token_for_user.py @@ -9,14 +9,22 @@ from ...types import Response def _get_kwargs( + + token: str, + + *, client: Client, + + + ) -> Dict[str, Any]: - url = "{}/user/api-tokens/{token}".format( - client.base_url, - token=token, - ) # noqa: E501 + url = "{}/user/api-tokens/{token}".format(client.base_url, token=token,) # noqa: E501 + + + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -26,25 +34,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -def _parse_response(*, response: httpx.Response) -> Optional[Union[ApiToken, Error]]: - if response.status_code == 200: - response_200 = ApiToken.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 _parse_response(*, response: httpx.Response) -> Optional[Union[ApiToken, Error]] : + if response.status_code == 200: + response_200 = ApiToken.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[ApiToken, Error]]]: +) -> Response[Optional[Union[ApiToken, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -54,12 +64,21 @@ def _build_response( def sync_detailed( + + token: str, + + *, client: Client, -) -> Response[Optional[Union[ApiToken, Error]]]: + + + +) -> Response[Optional[Union[ApiToken, Error]]]: kwargs = _get_kwargs( + token=token, + client=client, ) @@ -72,25 +91,43 @@ def sync_detailed( def sync( + + token: str, + + *, client: Client, -) -> Optional[Union[ApiToken, Error]]: + + + +) -> Optional[Union[ApiToken, Error]] : """This endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the user.""" # noqa: E501 return sync_detailed( + token=token, + client=client, ).parsed async def asyncio_detailed( + + token: str, + + *, client: Client, -) -> Response[Optional[Union[ApiToken, Error]]]: + + + +) -> Response[Optional[Union[ApiToken, Error]]]: kwargs = _get_kwargs( + token=token, + client=client, ) @@ -101,15 +138,24 @@ async def asyncio_detailed( async def asyncio( + + token: str, + + *, client: Client, -) -> Optional[Union[ApiToken, Error]]: + + + +) -> Optional[Union[ApiToken, Error]] : """This endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the user.""" # noqa: E501 return ( await asyncio_detailed( + token=token, + client=client, ) ).parsed diff --git a/kittycad/api/api_tokens/list_api_tokens_for_user.py b/kittycad/api/api_tokens/list_api_tokens_for_user.py index 2f355fe2c..ebe552995 100644 --- a/kittycad/api/api_tokens/list_api_tokens_for_user.py +++ b/kittycad/api/api_tokens/list_api_tokens_for_user.py @@ -10,33 +10,56 @@ 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/api-tokens".format( - client.base_url, - ) # noqa: E501 - + url = "{}/user/api-tokens".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() @@ -46,27 +69,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -def _parse_response( - *, response: httpx.Response -) -> Optional[Union[ApiTokenResultsPage, Error]]: - if response.status_code == 200: - response_200 = ApiTokenResultsPage.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 _parse_response(*, response: httpx.Response) -> Optional[Union[ApiTokenResultsPage, Error]] : + if response.status_code == 200: + response_200 = ApiTokenResultsPage.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[ApiTokenResultsPage, Error]]]: +) -> Response[Optional[Union[ApiTokenResultsPage, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -76,16 +99,37 @@ def _build_response( def sync_detailed( + + + + + + sort_by: CreatedAtSortMode, + + *, client: Client, + + limit: Optional[int] = None, + + + page_token: Optional[str] = None, -) -> Response[Optional[Union[ApiTokenResultsPage, Error]]]: + + + + +) -> Response[Optional[Union[ApiTokenResultsPage, Error]]]: kwargs = _get_kwargs( + limit=limit, + page_token=page_token, + sort_by=sort_by, + client=client, ) @@ -98,35 +142,76 @@ def sync_detailed( def sync( + + + + + + sort_by: CreatedAtSortMode, + + *, client: Client, + + limit: Optional[int] = None, + + + page_token: Optional[str] = None, -) -> Optional[Union[ApiTokenResultsPage, Error]]: + + + + +) -> Optional[Union[ApiTokenResultsPage, Error]] : """This endpoint requires authentication by any KittyCAD user. It returns the API tokens for the authenticated user. - The API tokens are returned in order of creation, with the most recently created API tokens first. - """ # noqa: E501 +The API tokens are returned in order of creation, with the most recently created API tokens first.""" # noqa: E501 return sync_detailed( + limit=limit, + 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[ApiTokenResultsPage, Error]]]: + + + + +) -> Response[Optional[Union[ApiTokenResultsPage, Error]]]: kwargs = _get_kwargs( + limit=limit, + page_token=page_token, + sort_by=sort_by, + client=client, ) @@ -137,21 +222,41 @@ async def asyncio_detailed( async def asyncio( + + + + + + sort_by: CreatedAtSortMode, + + *, client: Client, + + limit: Optional[int] = None, + + + page_token: Optional[str] = None, -) -> Optional[Union[ApiTokenResultsPage, Error]]: + + + + +) -> Optional[Union[ApiTokenResultsPage, Error]] : """This endpoint requires authentication by any KittyCAD user. It returns the API tokens for the authenticated user. - The API tokens are returned in order of creation, with the most recently created API tokens first. - """ # noqa: E501 +The API tokens are returned in order of creation, with the most recently created API tokens first.""" # noqa: E501 return ( await asyncio_detailed( + limit=limit, + page_token=page_token, + sort_by=sort_by, + client=client, ) ).parsed diff --git a/kittycad/api/apps/__init__.py b/kittycad/api/apps/__init__.py index caf3ca3da..173bace31 100644 --- a/kittycad/api/apps/__init__.py +++ b/kittycad/api/apps/__init__.py @@ -1 +1 @@ -""" Contains methods for accessing the apps API paths: Endpoints for third party app grant flows. """ # noqa: E501 +""" Contains methods for accessing the apps API paths: Endpoints for third party app grant flows. """ # noqa: E501 diff --git a/kittycad/api/apps/apps_github_callback.py b/kittycad/api/apps/apps_github_callback.py index 90953b092..fa4d274c4 100644 --- a/kittycad/api/apps/apps_github_callback.py +++ b/kittycad/api/apps/apps_github_callback.py @@ -8,12 +8,14 @@ from ...types import Response def _get_kwargs( + *, client: Client, + ) -> Dict[str, Any]: - url = "{}/apps/github/callback".format( - client.base_url, - ) # noqa: E501 + url = "{}/apps/github/callback".format(client.base_url, ) # noqa: E501 + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -23,21 +25,25 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -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 - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) +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 + 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[Error]]: + +def _build_response( + *, response: httpx.Response +) -> Response[Optional[Error]]: return Response( status_code=response.status_code, content=response.content, @@ -47,10 +53,13 @@ def _build_response(*, response: httpx.Response) -> Response[Optional[Error]]: def sync_detailed( + *, client: Client, -) -> Response[Optional[Error]]: + +) -> Response[Optional[Error]]: kwargs = _get_kwargs( + client=client, ) @@ -63,23 +72,28 @@ def sync_detailed( def sync( + *, client: Client, -) -> Optional[Error]: + +) -> Optional[Error] : """This is different than OAuth 2.0 authentication for users. This endpoint grants access for KittyCAD to access user's repos. - The user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos. - """ # noqa: E501 +The user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.""" # noqa: E501 return sync_detailed( + client=client, ).parsed async def asyncio_detailed( + *, client: Client, -) -> Response[Optional[Error]]: + +) -> Response[Optional[Error]]: kwargs = _get_kwargs( + client=client, ) @@ -90,15 +104,17 @@ async def asyncio_detailed( async def asyncio( + *, client: Client, -) -> Optional[Error]: + +) -> Optional[Error] : """This is different than OAuth 2.0 authentication for users. This endpoint grants access for KittyCAD to access user's repos. - The user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos. - """ # noqa: E501 +The user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.""" # noqa: E501 return ( await asyncio_detailed( + client=client, ) ).parsed diff --git a/kittycad/api/apps/apps_github_consent.py b/kittycad/api/apps/apps_github_consent.py index e2ccfa94f..292eb72fe 100644 --- a/kittycad/api/apps/apps_github_consent.py +++ b/kittycad/api/apps/apps_github_consent.py @@ -9,12 +9,14 @@ from ...types import Response def _get_kwargs( + *, client: Client, + ) -> Dict[str, Any]: - url = "{}/apps/github/consent".format( - client.base_url, - ) # noqa: E501 + url = "{}/apps/github/consent".format(client.base_url, ) # noqa: E501 + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -24,27 +26,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -def _parse_response( - *, response: httpx.Response -) -> Optional[Union[AppClientInfo, Error]]: - if response.status_code == 200: - response_200 = AppClientInfo.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 _parse_response(*, response: httpx.Response) -> Optional[Union[AppClientInfo, Error]] : + if response.status_code == 200: + response_200 = AppClientInfo.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[AppClientInfo, Error]]]: +) -> Response[Optional[Union[AppClientInfo, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -54,10 +56,13 @@ def _build_response( def sync_detailed( + *, client: Client, -) -> Response[Optional[Union[AppClientInfo, Error]]]: + +) -> Response[Optional[Union[AppClientInfo, Error]]]: kwargs = _get_kwargs( + client=client, ) @@ -70,23 +75,28 @@ def sync_detailed( def sync( + *, client: Client, -) -> Optional[Union[AppClientInfo, Error]]: + +) -> Optional[Union[AppClientInfo, Error]] : """This is different than OAuth 2.0 authentication for users. This endpoint grants access for KittyCAD to access user's repos. - The user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos. - """ # noqa: E501 +The user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.""" # noqa: E501 return sync_detailed( + client=client, ).parsed async def asyncio_detailed( + *, client: Client, -) -> Response[Optional[Union[AppClientInfo, Error]]]: + +) -> Response[Optional[Union[AppClientInfo, Error]]]: kwargs = _get_kwargs( + client=client, ) @@ -97,15 +107,17 @@ async def asyncio_detailed( async def asyncio( + *, client: Client, -) -> Optional[Union[AppClientInfo, Error]]: + +) -> Optional[Union[AppClientInfo, Error]] : """This is different than OAuth 2.0 authentication for users. This endpoint grants access for KittyCAD to access user's repos. - The user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos. - """ # noqa: E501 +The user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.""" # noqa: E501 return ( await asyncio_detailed( + client=client, ) ).parsed diff --git a/kittycad/api/apps/apps_github_webhook.py b/kittycad/api/apps/apps_github_webhook.py index 0713325b7..a8094e5ce 100644 --- a/kittycad/api/apps/apps_github_webhook.py +++ b/kittycad/api/apps/apps_github_webhook.py @@ -8,13 +8,22 @@ from ...types import Response def _get_kwargs( + + body: bytes, + + *, client: Client, + + + ) -> Dict[str, Any]: - url = "{}/apps/github/webhook".format( - client.base_url, - ) # noqa: E501 + url = "{}/apps/github/webhook".format(client.base_url, ) # noqa: E501 + + + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -28,18 +37,21 @@ def _get_kwargs( } -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 - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) +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 + 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[Error]]: + +def _build_response( + *, response: httpx.Response +) -> Response[Optional[Error]]: return Response( status_code=response.status_code, content=response.content, @@ -49,12 +61,21 @@ def _build_response(*, response: httpx.Response) -> Response[Optional[Error]]: def sync_detailed( + + body: bytes, + + *, client: Client, -) -> Response[Optional[Error]]: + + + +) -> Response[Optional[Error]]: kwargs = _get_kwargs( + body=body, + client=client, ) @@ -67,25 +88,43 @@ def sync_detailed( def sync( + + body: bytes, + + *, client: Client, -) -> Optional[Error]: + + + +) -> Optional[Error] : """These come from the GitHub app.""" # noqa: E501 return sync_detailed( + body=body, + client=client, ).parsed async def asyncio_detailed( + + body: bytes, + + *, client: Client, -) -> Response[Optional[Error]]: + + + +) -> Response[Optional[Error]]: kwargs = _get_kwargs( + body=body, + client=client, ) @@ -96,15 +135,24 @@ async def asyncio_detailed( async def asyncio( + + body: bytes, + + *, client: Client, -) -> Optional[Error]: + + + +) -> Optional[Error] : """These come from the GitHub app.""" # noqa: E501 return ( await asyncio_detailed( + body=body, + client=client, ) ).parsed diff --git a/kittycad/api/beta/__init__.py b/kittycad/api/beta/__init__.py index ddd904abc..76183d8b7 100644 --- a/kittycad/api/beta/__init__.py +++ b/kittycad/api/beta/__init__.py @@ -1 +1 @@ -""" Contains methods for accessing the beta API paths: Beta API endpoints. We will not charge for these endpoints while they are in beta. """ # noqa: E501 +""" Contains methods for accessing the beta API paths: Beta API endpoints. We will not charge for these endpoints while they are in beta. """ # noqa: E501 diff --git a/kittycad/api/constant/__init__.py b/kittycad/api/constant/__init__.py index 0c15e8842..ccb736c1a 100644 --- a/kittycad/api/constant/__init__.py +++ b/kittycad/api/constant/__init__.py @@ -1 +1 @@ -""" Contains methods for accessing the constant API paths: Constants. These are helpful as helpers. """ # noqa: E501 +""" Contains methods for accessing the constant API paths: Constants. These are helpful as helpers. """ # noqa: E501 diff --git a/kittycad/api/executor/__init__.py b/kittycad/api/executor/__init__.py index 34d5e2dab..8f1321ce8 100644 --- a/kittycad/api/executor/__init__.py +++ b/kittycad/api/executor/__init__.py @@ -1 +1 @@ -""" Contains methods for accessing the executor API paths: Endpoints that allow for code execution or creation of code execution environments. """ # noqa: E501 +""" Contains methods for accessing the executor API paths: Endpoints that allow for code execution or creation of code execution environments. """ # noqa: E501 diff --git a/kittycad/api/executor/create_executor_term.py b/kittycad/api/executor/create_executor_term.py index 32912f893..0705ac11b 100644 --- a/kittycad/api/executor/create_executor_term.py +++ b/kittycad/api/executor/create_executor_term.py @@ -8,10 +8,14 @@ from ...models.error import Error def _get_kwargs( + *, client: Client, + ) -> Dict[str, Any]: - url = "{}/ws/executor/term".format(client.base_url) # noqa: E501 + url = "{}/ws/executor/term".format(client.base_url) # noqa: E501 + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -21,42 +25,45 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } def sync( + *, client: Client, + ) -> ClientConnection: """Attach to a docker container to create an interactive terminal.""" # noqa: E501 kwargs = _get_kwargs( + client=client, ) - with ws_connect( - kwargs["url"].replace("https://", "wss://"), - additional_headers=kwargs["headers"], - ) as websocket: - return websocket # type: ignore + with ws_connect(kwargs["url"].replace("https://", "wss://"), additional_headers=kwargs["headers"]) as websocket: + return websocket # type: ignore # Return an error if we got here. return Error(message="An error occurred while connecting to the websocket.") + async def asyncio( + *, client: Client, + ) -> WebSocketClientProtocol: """Attach to a docker container to create an interactive terminal.""" # noqa: E501 kwargs = _get_kwargs( + client=client, ) - async with ws_connect_async( - kwargs["url"].replace("https://", "wss://"), extra_headers=kwargs["headers"] - ) as websocket: + async with ws_connect_async(kwargs["url"].replace("https://", "wss://"), extra_headers=kwargs["headers"]) as websocket: return websocket # Return an error if we got here. diff --git a/kittycad/api/executor/create_file_execution.py b/kittycad/api/executor/create_file_execution.py index d7b017b8b..84c0105f3 100644 --- a/kittycad/api/executor/create_file_execution.py +++ b/kittycad/api/executor/create_file_execution.py @@ -10,22 +10,44 @@ from ...types import Response def _get_kwargs( + + lang: CodeLanguage, + + + + + body: bytes, + + *, client: Client, + + + + output: Optional[str] = None, + + + + ) -> Dict[str, Any]: - url = "{}/file/execute/{lang}".format( - client.base_url, - lang=lang, - ) # noqa: E501 - + url = "{}/file/execute/{lang}".format(client.base_url, lang=lang,) # noqa: E501 + + + + if output is not None: if "?" in url: url = url + "&output=" + str(output) else: url = url + "?output=" + str(output) + + + + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -39,22 +61,23 @@ def _get_kwargs( } -def _parse_response(*, response: httpx.Response) -> Optional[Union[CodeOutput, Error]]: - if response.status_code == 200: - response_200 = CodeOutput.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 _parse_response(*, response: httpx.Response) -> Optional[Union[CodeOutput, Error]] : + if response.status_code == 200: + response_200 = CodeOutput.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[CodeOutput, Error]]]: +) -> Response[Optional[Union[CodeOutput, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -64,16 +87,37 @@ def _build_response( def sync_detailed( + + lang: CodeLanguage, + + + + + body: bytes, + + *, client: Client, + + + + output: Optional[str] = None, -) -> Response[Optional[Union[CodeOutput, Error]]]: + + + + +) -> Response[Optional[Union[CodeOutput, Error]]]: kwargs = _get_kwargs( + lang=lang, + output=output, + body=body, + client=client, ) @@ -86,31 +130,75 @@ def sync_detailed( def sync( + + lang: CodeLanguage, + + + + + body: bytes, + + *, client: Client, + + + + output: Optional[str] = None, -) -> Optional[Union[CodeOutput, Error]]: + + + + +) -> Optional[Union[CodeOutput, Error]] : + + return sync_detailed( + lang=lang, + output=output, + body=body, + client=client, ).parsed async def asyncio_detailed( + + lang: CodeLanguage, + + + + + body: bytes, + + *, client: Client, + + + + output: Optional[str] = None, -) -> Response[Optional[Union[CodeOutput, Error]]]: + + + + +) -> Response[Optional[Union[CodeOutput, Error]]]: kwargs = _get_kwargs( + lang=lang, + output=output, + body=body, + client=client, ) @@ -121,17 +209,40 @@ async def asyncio_detailed( async def asyncio( + + lang: CodeLanguage, + + + + + body: bytes, + + *, client: Client, + + + + output: Optional[str] = None, -) -> Optional[Union[CodeOutput, Error]]: + + + + +) -> Optional[Union[CodeOutput, Error]] : + + return ( await asyncio_detailed( + lang=lang, + output=output, + body=body, + client=client, ) ).parsed diff --git a/kittycad/api/file/__init__.py b/kittycad/api/file/__init__.py index 794df28a7..84d2cc11f 100644 --- a/kittycad/api/file/__init__.py +++ b/kittycad/api/file/__init__.py @@ -1 +1 @@ -""" Contains methods for accessing the file API paths: CAD file operations. Create, get, and list CAD file conversions. More endpoints will be added here in the future as we build out transforms, etc on CAD models. """ # noqa: E501 +""" Contains methods for accessing the file API paths: CAD file operations. Create, get, and list CAD file conversions. More endpoints will be added here in the future as we build out transforms, etc on CAD models. """ # noqa: E501 diff --git a/kittycad/api/file/create_file_center_of_mass.py b/kittycad/api/file/create_file_center_of_mass.py index 4787ac691..3402ff256 100644 --- a/kittycad/api/file/create_file_center_of_mass.py +++ b/kittycad/api/file/create_file_center_of_mass.py @@ -11,27 +11,50 @@ from ...types import Response def _get_kwargs( + + output_unit: UnitLength, + + + src_format: FileImportFormat, + + + body: bytes, + + *, client: Client, + + + + + + + ) -> Dict[str, Any]: - url = "{}/file/center-of-mass".format( - client.base_url, - ) # noqa: E501 - + url = "{}/file/center-of-mass".format(client.base_url, ) # noqa: E501 + + if output_unit is not None: if "?" in url: url = url + "&output_unit=" + str(output_unit) else: url = url + "?output_unit=" + str(output_unit) - + + + if src_format is not None: if "?" in url: url = url + "&src_format=" + str(src_format) else: url = url + "?src_format=" + str(src_format) + + + + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -45,24 +68,23 @@ def _get_kwargs( } -def _parse_response( - *, response: httpx.Response -) -> Optional[Union[FileCenterOfMass, Error]]: - if response.status_code == 201: - response_201 = FileCenterOfMass.from_dict(response.json()) - return response_201 - 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 _parse_response(*, response: httpx.Response) -> Optional[Union[FileCenterOfMass, Error]] : + if response.status_code == 201: + response_201 = FileCenterOfMass.from_dict(response.json()) + return response_201 + 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[FileCenterOfMass, Error]]]: +) -> Response[Optional[Union[FileCenterOfMass, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -72,16 +94,37 @@ def _build_response( def sync_detailed( + + output_unit: UnitLength, + + + src_format: FileImportFormat, + + + body: bytes, + + *, client: Client, -) -> Response[Optional[Union[FileCenterOfMass, Error]]]: + + + + + + + +) -> Response[Optional[Union[FileCenterOfMass, Error]]]: kwargs = _get_kwargs( + output_unit=output_unit, + src_format=src_format, + body=body, + client=client, ) @@ -94,38 +137,79 @@ def sync_detailed( def sync( + + output_unit: UnitLength, + + + src_format: FileImportFormat, + + + body: bytes, + + *, client: Client, -) -> Optional[Union[FileCenterOfMass, Error]]: + + + + + + + +) -> Optional[Union[FileCenterOfMass, Error]] : """We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale. - This endpoint returns the cartesian co-ordinate in world space measure units. - In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. - Get the center of mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. - If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint. - """ # noqa: E501 +This endpoint returns the cartesian co-ordinate in world space measure units. +In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. +Get the center of mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. +If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501 return sync_detailed( + output_unit=output_unit, + src_format=src_format, + body=body, + client=client, ).parsed async def asyncio_detailed( + + output_unit: UnitLength, + + + src_format: FileImportFormat, + + + body: bytes, + + *, client: Client, -) -> Response[Optional[Union[FileCenterOfMass, Error]]]: + + + + + + + +) -> Response[Optional[Union[FileCenterOfMass, Error]]]: kwargs = _get_kwargs( + output_unit=output_unit, + src_format=src_format, + body=body, + client=client, ) @@ -136,24 +220,44 @@ async def asyncio_detailed( async def asyncio( + + output_unit: UnitLength, + + + src_format: FileImportFormat, + + + body: bytes, + + *, client: Client, -) -> Optional[Union[FileCenterOfMass, Error]]: + + + + + + + +) -> Optional[Union[FileCenterOfMass, Error]] : """We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale. - This endpoint returns the cartesian co-ordinate in world space measure units. - In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. - Get the center of mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. - If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint. - """ # noqa: E501 +This endpoint returns the cartesian co-ordinate in world space measure units. +In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. +Get the center of mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. +If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501 return ( await asyncio_detailed( + output_unit=output_unit, + src_format=src_format, + body=body, + client=client, ) ).parsed diff --git a/kittycad/api/file/create_file_conversion.py b/kittycad/api/file/create_file_conversion.py index ceb49f472..63ab1220c 100644 --- a/kittycad/api/file/create_file_conversion.py +++ b/kittycad/api/file/create_file_conversion.py @@ -11,17 +11,38 @@ from ...types import Response def _get_kwargs( + + output_format: FileExportFormat, + + + src_format: FileImportFormat, + + + body: bytes, + + *, client: Client, + + + + + + + ) -> Dict[str, Any]: - url = "{}/file/conversion/{src_format}/{output_format}".format( - client.base_url, - output_format=output_format, - src_format=src_format, - ) # noqa: E501 + url = "{}/file/conversion/{src_format}/{output_format}".format(client.base_url, output_format=output_format,src_format=src_format,) # noqa: E501 + + + + + + + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -35,24 +56,23 @@ def _get_kwargs( } -def _parse_response( - *, response: httpx.Response -) -> Optional[Union[FileConversion, Error]]: - if response.status_code == 201: - response_201 = FileConversion.from_dict(response.json()) - return response_201 - 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 _parse_response(*, response: httpx.Response) -> Optional[Union[FileConversion, Error]] : + if response.status_code == 201: + response_201 = FileConversion.from_dict(response.json()) + return response_201 + 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[FileConversion, Error]]]: +) -> Response[Optional[Union[FileConversion, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -62,16 +82,37 @@ def _build_response( def sync_detailed( + + output_format: FileExportFormat, + + + src_format: FileImportFormat, + + + body: bytes, + + *, client: Client, -) -> Response[Optional[Union[FileConversion, Error]]]: + + + + + + + +) -> Response[Optional[Union[FileConversion, Error]]]: kwargs = _get_kwargs( + output_format=output_format, + src_format=src_format, + body=body, + client=client, ) @@ -84,37 +125,78 @@ def sync_detailed( def sync( + + output_format: FileExportFormat, + + + src_format: FileImportFormat, + + + body: bytes, + + *, client: Client, -) -> Optional[Union[FileConversion, Error]]: + + + + + + + +) -> Optional[Union[FileConversion, Error]] : """If you wish to specify the conversion options, use the `/file/conversion` endpoint instead. - Convert a CAD file from one format to another. If the file being converted is larger than 25MB, it will be performed asynchronously. - If the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string. - If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint. - """ # noqa: E501 +Convert a CAD file from one format to another. If the file being converted is larger than 25MB, it will be performed asynchronously. +If the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string. +If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501 return sync_detailed( + output_format=output_format, + src_format=src_format, + body=body, + client=client, ).parsed async def asyncio_detailed( + + output_format: FileExportFormat, + + + src_format: FileImportFormat, + + + body: bytes, + + *, client: Client, -) -> Response[Optional[Union[FileConversion, Error]]]: + + + + + + + +) -> Response[Optional[Union[FileConversion, Error]]]: kwargs = _get_kwargs( + output_format=output_format, + src_format=src_format, + body=body, + client=client, ) @@ -125,23 +207,43 @@ async def asyncio_detailed( async def asyncio( + + output_format: FileExportFormat, + + + src_format: FileImportFormat, + + + body: bytes, + + *, client: Client, -) -> Optional[Union[FileConversion, Error]]: + + + + + + + +) -> Optional[Union[FileConversion, Error]] : """If you wish to specify the conversion options, use the `/file/conversion` endpoint instead. - Convert a CAD file from one format to another. If the file being converted is larger than 25MB, it will be performed asynchronously. - If the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string. - If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint. - """ # noqa: E501 +Convert a CAD file from one format to another. If the file being converted is larger than 25MB, it will be performed asynchronously. +If the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string. +If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501 return ( await asyncio_detailed( + output_format=output_format, + src_format=src_format, + body=body, + client=client, ) ).parsed diff --git a/kittycad/api/file/create_file_density.py b/kittycad/api/file/create_file_density.py index 79e00a28a..901ea0412 100644 --- a/kittycad/api/file/create_file_density.py +++ b/kittycad/api/file/create_file_density.py @@ -12,41 +12,78 @@ from ...types import Response def _get_kwargs( + + material_mass: float, + + + material_mass_unit: UnitMass, + + + output_unit: UnitDensity, + + + src_format: FileImportFormat, + + + body: bytes, + + *, client: Client, + + + + + + + + + + + ) -> Dict[str, Any]: - url = "{}/file/density".format( - client.base_url, - ) # noqa: E501 - + url = "{}/file/density".format(client.base_url, ) # noqa: E501 + + if material_mass is not None: if "?" in url: url = url + "&material_mass=" + str(material_mass) else: url = url + "?material_mass=" + str(material_mass) - + + + if material_mass_unit is not None: if "?" in url: url = url + "&material_mass_unit=" + str(material_mass_unit) else: url = url + "?material_mass_unit=" + str(material_mass_unit) - + + + if output_unit is not None: if "?" in url: url = url + "&output_unit=" + str(output_unit) else: url = url + "?output_unit=" + str(output_unit) - + + + if src_format is not None: if "?" in url: url = url + "&src_format=" + str(src_format) else: url = url + "?src_format=" + str(src_format) + + + + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -60,22 +97,23 @@ def _get_kwargs( } -def _parse_response(*, response: httpx.Response) -> Optional[Union[FileDensity, Error]]: - if response.status_code == 201: - response_201 = FileDensity.from_dict(response.json()) - return response_201 - 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 _parse_response(*, response: httpx.Response) -> Optional[Union[FileDensity, Error]] : + if response.status_code == 201: + response_201 = FileDensity.from_dict(response.json()) + return response_201 + 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[FileDensity, Error]]]: +) -> Response[Optional[Union[FileDensity, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -85,20 +123,53 @@ def _build_response( def sync_detailed( + + material_mass: float, + + + material_mass_unit: UnitMass, + + + output_unit: UnitDensity, + + + src_format: FileImportFormat, + + + body: bytes, + + *, client: Client, -) -> Response[Optional[Union[FileDensity, Error]]]: + + + + + + + + + + + +) -> Response[Optional[Union[FileDensity, Error]]]: kwargs = _get_kwargs( + material_mass=material_mass, + material_mass_unit=material_mass_unit, + output_unit=output_unit, + src_format=src_format, + body=body, + client=client, ) @@ -111,46 +182,111 @@ def sync_detailed( def sync( + + material_mass: float, + + + material_mass_unit: UnitMass, + + + output_unit: UnitDensity, + + + src_format: FileImportFormat, + + + body: bytes, + + *, client: Client, -) -> Optional[Union[FileDensity, Error]]: + + + + + + + + + + + +) -> Optional[Union[FileDensity, Error]] : """We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale. - This endpoint assumes if you are giving a material mass in a specific mass units, we return a density in mass unit per cubic measure unit. - In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. - Get the density of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. - If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint. - """ # noqa: E501 +This endpoint assumes if you are giving a material mass in a specific mass units, we return a density in mass unit per cubic measure unit. +In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. +Get the density of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. +If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501 return sync_detailed( + material_mass=material_mass, + material_mass_unit=material_mass_unit, + output_unit=output_unit, + src_format=src_format, + body=body, + client=client, ).parsed async def asyncio_detailed( + + material_mass: float, + + + material_mass_unit: UnitMass, + + + output_unit: UnitDensity, + + + src_format: FileImportFormat, + + + body: bytes, + + *, client: Client, -) -> Response[Optional[Union[FileDensity, Error]]]: + + + + + + + + + + + +) -> Response[Optional[Union[FileDensity, Error]]]: kwargs = _get_kwargs( + material_mass=material_mass, + material_mass_unit=material_mass_unit, + output_unit=output_unit, + src_format=src_format, + body=body, + client=client, ) @@ -161,28 +297,60 @@ async def asyncio_detailed( async def asyncio( + + material_mass: float, + + + material_mass_unit: UnitMass, + + + output_unit: UnitDensity, + + + src_format: FileImportFormat, + + + body: bytes, + + *, client: Client, -) -> Optional[Union[FileDensity, Error]]: + + + + + + + + + + + +) -> Optional[Union[FileDensity, Error]] : """We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale. - This endpoint assumes if you are giving a material mass in a specific mass units, we return a density in mass unit per cubic measure unit. - In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. - Get the density of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. - If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint. - """ # noqa: E501 +This endpoint assumes if you are giving a material mass in a specific mass units, we return a density in mass unit per cubic measure unit. +In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. +Get the density of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. +If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501 return ( await asyncio_detailed( + material_mass=material_mass, + material_mass_unit=material_mass_unit, + output_unit=output_unit, + src_format=src_format, + body=body, + client=client, ) ).parsed diff --git a/kittycad/api/file/create_file_mass.py b/kittycad/api/file/create_file_mass.py index d251c676f..45479d4df 100644 --- a/kittycad/api/file/create_file_mass.py +++ b/kittycad/api/file/create_file_mass.py @@ -12,41 +12,78 @@ from ...types import Response def _get_kwargs( + + material_density: float, + + + material_density_unit: UnitDensity, + + + output_unit: UnitMass, + + + src_format: FileImportFormat, + + + body: bytes, + + *, client: Client, + + + + + + + + + + + ) -> Dict[str, Any]: - url = "{}/file/mass".format( - client.base_url, - ) # noqa: E501 - + url = "{}/file/mass".format(client.base_url, ) # noqa: E501 + + if material_density is not None: if "?" in url: url = url + "&material_density=" + str(material_density) else: url = url + "?material_density=" + str(material_density) - + + + if material_density_unit is not None: if "?" in url: url = url + "&material_density_unit=" + str(material_density_unit) else: url = url + "?material_density_unit=" + str(material_density_unit) - + + + if output_unit is not None: if "?" in url: url = url + "&output_unit=" + str(output_unit) else: url = url + "?output_unit=" + str(output_unit) - + + + if src_format is not None: if "?" in url: url = url + "&src_format=" + str(src_format) else: url = url + "?src_format=" + str(src_format) + + + + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -60,22 +97,23 @@ def _get_kwargs( } -def _parse_response(*, response: httpx.Response) -> Optional[Union[FileMass, Error]]: - if response.status_code == 201: - response_201 = FileMass.from_dict(response.json()) - return response_201 - 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 _parse_response(*, response: httpx.Response) -> Optional[Union[FileMass, Error]] : + if response.status_code == 201: + response_201 = FileMass.from_dict(response.json()) + return response_201 + 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[FileMass, Error]]]: +) -> Response[Optional[Union[FileMass, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -85,20 +123,53 @@ def _build_response( def sync_detailed( + + material_density: float, + + + material_density_unit: UnitDensity, + + + output_unit: UnitMass, + + + src_format: FileImportFormat, + + + body: bytes, + + *, client: Client, -) -> Response[Optional[Union[FileMass, Error]]]: + + + + + + + + + + + +) -> Response[Optional[Union[FileMass, Error]]]: kwargs = _get_kwargs( + material_density=material_density, + material_density_unit=material_density_unit, + output_unit=output_unit, + src_format=src_format, + body=body, + client=client, ) @@ -111,46 +182,111 @@ def sync_detailed( def sync( + + material_density: float, + + + material_density_unit: UnitDensity, + + + output_unit: UnitMass, + + + src_format: FileImportFormat, + + + body: bytes, + + *, client: Client, -) -> Optional[Union[FileMass, Error]]: + + + + + + + + + + + +) -> Optional[Union[FileMass, Error]] : """We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale. - This endpoint assumes if you are giving a material density in a specific mass unit per cubic measure unit, we return a mass in mass units. The same mass units as passed in the material density. - In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. - Get the mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. - If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint. - """ # noqa: E501 +This endpoint assumes if you are giving a material density in a specific mass unit per cubic measure unit, we return a mass in mass units. The same mass units as passed in the material density. +In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. +Get the mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. +If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501 return sync_detailed( + material_density=material_density, + material_density_unit=material_density_unit, + output_unit=output_unit, + src_format=src_format, + body=body, + client=client, ).parsed async def asyncio_detailed( + + material_density: float, + + + material_density_unit: UnitDensity, + + + output_unit: UnitMass, + + + src_format: FileImportFormat, + + + body: bytes, + + *, client: Client, -) -> Response[Optional[Union[FileMass, Error]]]: + + + + + + + + + + + +) -> Response[Optional[Union[FileMass, Error]]]: kwargs = _get_kwargs( + material_density=material_density, + material_density_unit=material_density_unit, + output_unit=output_unit, + src_format=src_format, + body=body, + client=client, ) @@ -161,28 +297,60 @@ async def asyncio_detailed( async def asyncio( + + material_density: float, + + + material_density_unit: UnitDensity, + + + output_unit: UnitMass, + + + src_format: FileImportFormat, + + + body: bytes, + + *, client: Client, -) -> Optional[Union[FileMass, Error]]: + + + + + + + + + + + +) -> Optional[Union[FileMass, Error]] : """We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale. - This endpoint assumes if you are giving a material density in a specific mass unit per cubic measure unit, we return a mass in mass units. The same mass units as passed in the material density. - In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. - Get the mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. - If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint. - """ # noqa: E501 +This endpoint assumes if you are giving a material density in a specific mass unit per cubic measure unit, we return a mass in mass units. The same mass units as passed in the material density. +In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. +Get the mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. +If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501 return ( await asyncio_detailed( + material_density=material_density, + material_density_unit=material_density_unit, + output_unit=output_unit, + src_format=src_format, + body=body, + client=client, ) ).parsed diff --git a/kittycad/api/file/create_file_surface_area.py b/kittycad/api/file/create_file_surface_area.py index 2399901b8..1b0285b6c 100644 --- a/kittycad/api/file/create_file_surface_area.py +++ b/kittycad/api/file/create_file_surface_area.py @@ -11,27 +11,50 @@ from ...types import Response def _get_kwargs( + + output_unit: UnitArea, + + + src_format: FileImportFormat, + + + body: bytes, + + *, client: Client, + + + + + + + ) -> Dict[str, Any]: - url = "{}/file/surface-area".format( - client.base_url, - ) # noqa: E501 - + url = "{}/file/surface-area".format(client.base_url, ) # noqa: E501 + + if output_unit is not None: if "?" in url: url = url + "&output_unit=" + str(output_unit) else: url = url + "?output_unit=" + str(output_unit) - + + + if src_format is not None: if "?" in url: url = url + "&src_format=" + str(src_format) else: url = url + "?src_format=" + str(src_format) + + + + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -45,24 +68,23 @@ def _get_kwargs( } -def _parse_response( - *, response: httpx.Response -) -> Optional[Union[FileSurfaceArea, Error]]: - if response.status_code == 201: - response_201 = FileSurfaceArea.from_dict(response.json()) - return response_201 - 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 _parse_response(*, response: httpx.Response) -> Optional[Union[FileSurfaceArea, Error]] : + if response.status_code == 201: + response_201 = FileSurfaceArea.from_dict(response.json()) + return response_201 + 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[FileSurfaceArea, Error]]]: +) -> Response[Optional[Union[FileSurfaceArea, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -72,16 +94,37 @@ def _build_response( def sync_detailed( + + output_unit: UnitArea, + + + src_format: FileImportFormat, + + + body: bytes, + + *, client: Client, -) -> Response[Optional[Union[FileSurfaceArea, Error]]]: + + + + + + + +) -> Response[Optional[Union[FileSurfaceArea, Error]]]: kwargs = _get_kwargs( + output_unit=output_unit, + src_format=src_format, + body=body, + client=client, ) @@ -94,38 +137,79 @@ def sync_detailed( def sync( + + output_unit: UnitArea, + + + src_format: FileImportFormat, + + + body: bytes, + + *, client: Client, -) -> Optional[Union[FileSurfaceArea, Error]]: + + + + + + + +) -> Optional[Union[FileSurfaceArea, Error]] : """We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale. - This endpoint returns the square measure units. - In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. - Get the surface area of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. - If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint. - """ # noqa: E501 +This endpoint returns the square measure units. +In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. +Get the surface area of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. +If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501 return sync_detailed( + output_unit=output_unit, + src_format=src_format, + body=body, + client=client, ).parsed async def asyncio_detailed( + + output_unit: UnitArea, + + + src_format: FileImportFormat, + + + body: bytes, + + *, client: Client, -) -> Response[Optional[Union[FileSurfaceArea, Error]]]: + + + + + + + +) -> Response[Optional[Union[FileSurfaceArea, Error]]]: kwargs = _get_kwargs( + output_unit=output_unit, + src_format=src_format, + body=body, + client=client, ) @@ -136,24 +220,44 @@ async def asyncio_detailed( async def asyncio( + + output_unit: UnitArea, + + + src_format: FileImportFormat, + + + body: bytes, + + *, client: Client, -) -> Optional[Union[FileSurfaceArea, Error]]: + + + + + + + +) -> Optional[Union[FileSurfaceArea, Error]] : """We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale. - This endpoint returns the square measure units. - In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. - Get the surface area of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. - If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint. - """ # noqa: E501 +This endpoint returns the square measure units. +In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. +Get the surface area of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. +If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501 return ( await asyncio_detailed( + output_unit=output_unit, + src_format=src_format, + body=body, + client=client, ) ).parsed diff --git a/kittycad/api/file/create_file_volume.py b/kittycad/api/file/create_file_volume.py index 040c2f234..d559f3faf 100644 --- a/kittycad/api/file/create_file_volume.py +++ b/kittycad/api/file/create_file_volume.py @@ -11,27 +11,50 @@ from ...types import Response def _get_kwargs( + + output_unit: UnitVolume, + + + src_format: FileImportFormat, + + + body: bytes, + + *, client: Client, + + + + + + + ) -> Dict[str, Any]: - url = "{}/file/volume".format( - client.base_url, - ) # noqa: E501 - + url = "{}/file/volume".format(client.base_url, ) # noqa: E501 + + if output_unit is not None: if "?" in url: url = url + "&output_unit=" + str(output_unit) else: url = url + "?output_unit=" + str(output_unit) - + + + if src_format is not None: if "?" in url: url = url + "&src_format=" + str(src_format) else: url = url + "?src_format=" + str(src_format) + + + + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -45,22 +68,23 @@ def _get_kwargs( } -def _parse_response(*, response: httpx.Response) -> Optional[Union[FileVolume, Error]]: - if response.status_code == 201: - response_201 = FileVolume.from_dict(response.json()) - return response_201 - 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 _parse_response(*, response: httpx.Response) -> Optional[Union[FileVolume, Error]] : + if response.status_code == 201: + response_201 = FileVolume.from_dict(response.json()) + return response_201 + 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[FileVolume, Error]]]: +) -> Response[Optional[Union[FileVolume, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -70,16 +94,37 @@ def _build_response( def sync_detailed( + + output_unit: UnitVolume, + + + src_format: FileImportFormat, + + + body: bytes, + + *, client: Client, -) -> Response[Optional[Union[FileVolume, Error]]]: + + + + + + + +) -> Response[Optional[Union[FileVolume, Error]]]: kwargs = _get_kwargs( + output_unit=output_unit, + src_format=src_format, + body=body, + client=client, ) @@ -92,38 +137,79 @@ def sync_detailed( def sync( + + output_unit: UnitVolume, + + + src_format: FileImportFormat, + + + body: bytes, + + *, client: Client, -) -> Optional[Union[FileVolume, Error]]: + + + + + + + +) -> Optional[Union[FileVolume, Error]] : """We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale. - This endpoint returns the cubic measure units. - In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. - Get the volume of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. - If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint. - """ # noqa: E501 +This endpoint returns the cubic measure units. +In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. +Get the volume of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. +If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501 return sync_detailed( + output_unit=output_unit, + src_format=src_format, + body=body, + client=client, ).parsed async def asyncio_detailed( + + output_unit: UnitVolume, + + + src_format: FileImportFormat, + + + body: bytes, + + *, client: Client, -) -> Response[Optional[Union[FileVolume, Error]]]: + + + + + + + +) -> Response[Optional[Union[FileVolume, Error]]]: kwargs = _get_kwargs( + output_unit=output_unit, + src_format=src_format, + body=body, + client=client, ) @@ -134,24 +220,44 @@ async def asyncio_detailed( async def asyncio( + + output_unit: UnitVolume, + + + src_format: FileImportFormat, + + + body: bytes, + + *, client: Client, -) -> Optional[Union[FileVolume, Error]]: + + + + + + + +) -> Optional[Union[FileVolume, Error]] : """We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale. - This endpoint returns the cubic measure units. - In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. - Get the volume of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. - If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint. - """ # noqa: E501 +This endpoint returns the cubic measure units. +In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. +Get the volume of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. +If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501 return ( await asyncio_detailed( + output_unit=output_unit, + src_format=src_format, + body=body, + client=client, ) ).parsed diff --git a/kittycad/api/hidden/__init__.py b/kittycad/api/hidden/__init__.py index 99e49766f..7f6e82030 100644 --- a/kittycad/api/hidden/__init__.py +++ b/kittycad/api/hidden/__init__.py @@ -1 +1 @@ -""" Contains methods for accessing the hidden API paths: Hidden API endpoints that should not show up in the docs. """ # noqa: E501 +""" Contains methods for accessing the hidden API paths: Hidden API endpoints that should not show up in the docs. """ # noqa: E501 diff --git a/kittycad/api/hidden/auth_email.py b/kittycad/api/hidden/auth_email.py index 4487132a8..d520b8e71 100644 --- a/kittycad/api/hidden/auth_email.py +++ b/kittycad/api/hidden/auth_email.py @@ -10,13 +10,22 @@ from ...types import Response def _get_kwargs( + + body: EmailAuthenticationForm, + + *, client: Client, + + + ) -> Dict[str, Any]: - url = "{}/auth/email".format( - client.base_url, - ) # noqa: E501 + url = "{}/auth/email".format(client.base_url, ) # noqa: E501 + + + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -30,24 +39,23 @@ def _get_kwargs( } -def _parse_response( - *, response: httpx.Response -) -> Optional[Union[VerificationToken, Error]]: - if response.status_code == 201: - response_201 = VerificationToken.from_dict(response.json()) - return response_201 - 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 _parse_response(*, response: httpx.Response) -> Optional[Union[VerificationToken, Error]] : + if response.status_code == 201: + response_201 = VerificationToken.from_dict(response.json()) + return response_201 + 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[VerificationToken, Error]]]: +) -> Response[Optional[Union[VerificationToken, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -57,12 +65,21 @@ def _build_response( def sync_detailed( + + body: EmailAuthenticationForm, + + *, client: Client, -) -> Response[Optional[Union[VerificationToken, Error]]]: + + + +) -> Response[Optional[Union[VerificationToken, Error]]]: kwargs = _get_kwargs( + body=body, + client=client, ) @@ -75,23 +92,43 @@ def sync_detailed( def sync( + + body: EmailAuthenticationForm, + + *, client: Client, -) -> Optional[Union[VerificationToken, Error]]: + + + +) -> Optional[Union[VerificationToken, Error]] : + + return sync_detailed( + body=body, + client=client, ).parsed async def asyncio_detailed( + + body: EmailAuthenticationForm, + + *, client: Client, -) -> Response[Optional[Union[VerificationToken, Error]]]: + + + +) -> Response[Optional[Union[VerificationToken, Error]]]: kwargs = _get_kwargs( + body=body, + client=client, ) @@ -102,13 +139,24 @@ async def asyncio_detailed( async def asyncio( + + body: EmailAuthenticationForm, + + *, client: Client, -) -> Optional[Union[VerificationToken, Error]]: + + + +) -> Optional[Union[VerificationToken, Error]] : + + return ( await asyncio_detailed( + body=body, + client=client, ) ).parsed diff --git a/kittycad/api/hidden/auth_email_callback.py b/kittycad/api/hidden/auth_email_callback.py index 0a60803b6..499bd0592 100644 --- a/kittycad/api/hidden/auth_email_callback.py +++ b/kittycad/api/hidden/auth_email_callback.py @@ -8,33 +8,56 @@ from ...types import Response def _get_kwargs( + + + + email: str, + + + token: str, + + *, client: Client, + + callback_url: Optional[str] = None, + + + + + + ) -> Dict[str, Any]: - url = "{}/auth/email/callback".format( - client.base_url, - ) # noqa: E501 - + url = "{}/auth/email/callback".format(client.base_url, ) # noqa: E501 + + if callback_url is not None: if "?" in url: url = url + "&callback_url=" + str(callback_url) else: url = url + "?callback_url=" + str(callback_url) - + + + if email is not None: if "?" in url: url = url + "&email=" + str(email) else: url = url + "?email=" + str(email) - + + + if token is not None: if "?" in url: url = url + "&token=" + str(token) else: url = url + "?token=" + str(token) + + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -44,21 +67,25 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -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 - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) +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 + 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[Error]]: + +def _build_response( + *, response: httpx.Response +) -> Response[Optional[Error]]: return Response( status_code=response.status_code, content=response.content, @@ -68,16 +95,37 @@ def _build_response(*, response: httpx.Response) -> Response[Optional[Error]]: def sync_detailed( + + + + email: str, + + + token: str, + + *, client: Client, + + callback_url: Optional[str] = None, -) -> Response[Optional[Error]]: + + + + + + +) -> Response[Optional[Error]]: kwargs = _get_kwargs( + callback_url=callback_url, + email=email, + token=token, + client=client, ) @@ -90,31 +138,75 @@ def sync_detailed( def sync( + + + + email: str, + + + token: str, + + *, client: Client, + + callback_url: Optional[str] = None, -) -> Optional[Error]: + + + + + + +) -> Optional[Error] : + + return sync_detailed( + callback_url=callback_url, + email=email, + token=token, + client=client, ).parsed async def asyncio_detailed( + + + + email: str, + + + token: str, + + *, client: Client, + + callback_url: Optional[str] = None, -) -> Response[Optional[Error]]: + + + + + + +) -> Response[Optional[Error]]: kwargs = _get_kwargs( + callback_url=callback_url, + email=email, + token=token, + client=client, ) @@ -125,17 +217,40 @@ async def asyncio_detailed( async def asyncio( + + + + email: str, + + + token: str, + + *, client: Client, + + callback_url: Optional[str] = None, -) -> Optional[Error]: + + + + + + +) -> Optional[Error] : + + return ( await asyncio_detailed( + callback_url=callback_url, + email=email, + token=token, + client=client, ) ).parsed diff --git a/kittycad/api/hidden/logout.py b/kittycad/api/hidden/logout.py index b8e3bbae9..d1bac2f40 100644 --- a/kittycad/api/hidden/logout.py +++ b/kittycad/api/hidden/logout.py @@ -8,12 +8,14 @@ from ...types import Response def _get_kwargs( + *, client: Client, + ) -> Dict[str, Any]: - url = "{}/logout".format( - client.base_url, - ) # noqa: E501 + url = "{}/logout".format(client.base_url, ) # noqa: E501 + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -23,21 +25,25 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -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 - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) +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 + 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[Error]]: + +def _build_response( + *, response: httpx.Response +) -> Response[Optional[Error]]: return Response( status_code=response.status_code, content=response.content, @@ -47,10 +53,13 @@ def _build_response(*, response: httpx.Response) -> Response[Optional[Error]]: def sync_detailed( + *, client: Client, -) -> Response[Optional[Error]]: + +) -> Response[Optional[Error]]: kwargs = _get_kwargs( + client=client, ) @@ -63,21 +72,27 @@ def sync_detailed( def sync( + *, client: Client, -) -> Optional[Error]: + +) -> Optional[Error] : """This is used in logout scenarios.""" # noqa: E501 return sync_detailed( + client=client, ).parsed async def asyncio_detailed( + *, client: Client, -) -> Response[Optional[Error]]: + +) -> Response[Optional[Error]]: kwargs = _get_kwargs( + client=client, ) @@ -88,13 +103,16 @@ async def asyncio_detailed( async def asyncio( + *, client: Client, -) -> Optional[Error]: + +) -> Optional[Error] : """This is used in logout scenarios.""" # noqa: E501 return ( await asyncio_detailed( + client=client, ) ).parsed diff --git a/kittycad/api/meta/__init__.py b/kittycad/api/meta/__init__.py index 5e7351a95..3787b335e 100644 --- a/kittycad/api/meta/__init__.py +++ b/kittycad/api/meta/__init__.py @@ -1 +1 @@ -""" Contains methods for accessing the meta API paths: Meta information about the API. """ # noqa: E501 +""" Contains methods for accessing the meta API paths: Meta information about the API. """ # noqa: E501 diff --git a/kittycad/api/meta/get_ai_plugin_manifest.py b/kittycad/api/meta/get_ai_plugin_manifest.py index a7f6cf90b..57b3e685c 100644 --- a/kittycad/api/meta/get_ai_plugin_manifest.py +++ b/kittycad/api/meta/get_ai_plugin_manifest.py @@ -9,12 +9,14 @@ from ...types import Response def _get_kwargs( + *, client: Client, + ) -> Dict[str, Any]: - url = "{}/.well-known/ai-plugin.json".format( - client.base_url, - ) # noqa: E501 + url = "{}/.well-known/ai-plugin.json".format(client.base_url, ) # noqa: E501 + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -24,27 +26,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -def _parse_response( - *, response: httpx.Response -) -> Optional[Union[AiPluginManifest, Error]]: - if response.status_code == 200: - response_200 = AiPluginManifest.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 _parse_response(*, response: httpx.Response) -> Optional[Union[AiPluginManifest, Error]] : + if response.status_code == 200: + response_200 = AiPluginManifest.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[AiPluginManifest, Error]]]: +) -> Response[Optional[Union[AiPluginManifest, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -54,10 +56,13 @@ def _build_response( def sync_detailed( + *, client: Client, -) -> Response[Optional[Union[AiPluginManifest, Error]]]: + +) -> Response[Optional[Union[AiPluginManifest, Error]]]: kwargs = _get_kwargs( + client=client, ) @@ -70,19 +75,27 @@ def sync_detailed( def sync( + *, client: Client, -) -> Optional[Union[AiPluginManifest, Error]]: + +) -> Optional[Union[AiPluginManifest, Error]] : + + return sync_detailed( + client=client, ).parsed async def asyncio_detailed( + *, client: Client, -) -> Response[Optional[Union[AiPluginManifest, Error]]]: + +) -> Response[Optional[Union[AiPluginManifest, Error]]]: kwargs = _get_kwargs( + client=client, ) @@ -93,11 +106,16 @@ async def asyncio_detailed( async def asyncio( + *, client: Client, -) -> Optional[Union[AiPluginManifest, Error]]: + +) -> Optional[Union[AiPluginManifest, Error]] : + + return ( await asyncio_detailed( + client=client, ) ).parsed diff --git a/kittycad/api/meta/get_metadata.py b/kittycad/api/meta/get_metadata.py index 8add017f6..7e50c6405 100644 --- a/kittycad/api/meta/get_metadata.py +++ b/kittycad/api/meta/get_metadata.py @@ -9,12 +9,14 @@ from ...types import Response def _get_kwargs( + *, client: Client, + ) -> Dict[str, Any]: - url = "{}/_meta/info".format( - client.base_url, - ) # noqa: E501 + url = "{}/_meta/info".format(client.base_url, ) # noqa: E501 + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -24,25 +26,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -def _parse_response(*, response: httpx.Response) -> Optional[Union[Metadata, Error]]: - if response.status_code == 200: - response_200 = Metadata.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 _parse_response(*, response: httpx.Response) -> Optional[Union[Metadata, Error]] : + if response.status_code == 200: + response_200 = Metadata.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[Metadata, Error]]]: +) -> Response[Optional[Union[Metadata, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -52,10 +56,13 @@ def _build_response( def sync_detailed( + *, client: Client, -) -> Response[Optional[Union[Metadata, Error]]]: + +) -> Response[Optional[Union[Metadata, Error]]]: kwargs = _get_kwargs( + client=client, ) @@ -68,22 +75,28 @@ def sync_detailed( def sync( + *, client: Client, -) -> Optional[Union[Metadata, Error]]: + +) -> Optional[Union[Metadata, Error]] : """This includes information on any of our other distributed systems it is connected to. - You must be a KittyCAD employee to perform this request.""" # noqa: E501 +You must be a KittyCAD employee to perform this request.""" # noqa: E501 return sync_detailed( + client=client, ).parsed async def asyncio_detailed( + *, client: Client, -) -> Response[Optional[Union[Metadata, Error]]]: + +) -> Response[Optional[Union[Metadata, Error]]]: kwargs = _get_kwargs( + client=client, ) @@ -94,14 +107,17 @@ async def asyncio_detailed( async def asyncio( + *, client: Client, -) -> Optional[Union[Metadata, Error]]: + +) -> Optional[Union[Metadata, Error]] : """This includes information on any of our other distributed systems it is connected to. - You must be a KittyCAD employee to perform this request.""" # noqa: E501 +You must be a KittyCAD employee to perform this request.""" # noqa: E501 return ( await asyncio_detailed( + client=client, ) ).parsed diff --git a/kittycad/api/meta/get_openai_schema.py b/kittycad/api/meta/get_openai_schema.py index 72a38e14c..e0251d180 100644 --- a/kittycad/api/meta/get_openai_schema.py +++ b/kittycad/api/meta/get_openai_schema.py @@ -8,12 +8,14 @@ from ...types import Response def _get_kwargs( + *, client: Client, + ) -> Dict[str, Any]: - url = "{}/openai/openapi.json".format( - client.base_url, - ) # noqa: E501 + url = "{}/openai/openapi.json".format(client.base_url, ) # noqa: E501 + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -23,25 +25,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -def _parse_response(*, response: httpx.Response) -> Optional[Union[dict, Error]]: - if response.status_code == 200: - response_200 = 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 _parse_response(*, response: httpx.Response) -> Optional[Union[dict, Error]] : + if response.status_code == 200: + response_200 = 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[dict, Error]]]: +) -> Response[Optional[Union[dict, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -51,10 +55,13 @@ def _build_response( def sync_detailed( + *, client: Client, -) -> Response[Optional[Union[dict, Error]]]: + +) -> Response[Optional[Union[dict, Error]]]: kwargs = _get_kwargs( + client=client, ) @@ -67,21 +74,27 @@ def sync_detailed( def sync( + *, client: Client, -) -> Optional[Union[dict, Error]]: + +) -> Optional[Union[dict, Error]] : """This is the same as the OpenAPI schema, BUT it has some modifications to make it compatible with OpenAI. For example, descriptions must be < 300 chars.""" # noqa: E501 return sync_detailed( + client=client, ).parsed async def asyncio_detailed( + *, client: Client, -) -> Response[Optional[Union[dict, Error]]]: + +) -> Response[Optional[Union[dict, Error]]]: kwargs = _get_kwargs( + client=client, ) @@ -92,13 +105,16 @@ async def asyncio_detailed( async def asyncio( + *, client: Client, -) -> Optional[Union[dict, Error]]: + +) -> Optional[Union[dict, Error]] : """This is the same as the OpenAPI schema, BUT it has some modifications to make it compatible with OpenAI. For example, descriptions must be < 300 chars.""" # noqa: E501 return ( await asyncio_detailed( + client=client, ) ).parsed diff --git a/kittycad/api/meta/get_schema.py b/kittycad/api/meta/get_schema.py index 7b9788435..a67137de9 100644 --- a/kittycad/api/meta/get_schema.py +++ b/kittycad/api/meta/get_schema.py @@ -8,12 +8,14 @@ from ...types import Response def _get_kwargs( + *, client: Client, + ) -> Dict[str, Any]: - url = "{}/".format( - client.base_url, - ) # noqa: E501 + url = "{}/".format(client.base_url, ) # noqa: E501 + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -23,25 +25,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -def _parse_response(*, response: httpx.Response) -> Optional[Union[dict, Error]]: - if response.status_code == 200: - response_200 = 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 _parse_response(*, response: httpx.Response) -> Optional[Union[dict, Error]] : + if response.status_code == 200: + response_200 = 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[dict, Error]]]: +) -> Response[Optional[Union[dict, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -51,10 +55,13 @@ def _build_response( def sync_detailed( + *, client: Client, -) -> Response[Optional[Union[dict, Error]]]: + +) -> Response[Optional[Union[dict, Error]]]: kwargs = _get_kwargs( + client=client, ) @@ -67,19 +74,27 @@ def sync_detailed( def sync( + *, client: Client, -) -> Optional[Union[dict, Error]]: + +) -> Optional[Union[dict, Error]] : + + return sync_detailed( + client=client, ).parsed async def asyncio_detailed( + *, client: Client, -) -> Response[Optional[Union[dict, Error]]]: + +) -> Response[Optional[Union[dict, Error]]]: kwargs = _get_kwargs( + client=client, ) @@ -90,11 +105,16 @@ async def asyncio_detailed( async def asyncio( + *, client: Client, -) -> Optional[Union[dict, Error]]: + +) -> Optional[Union[dict, Error]] : + + return ( await asyncio_detailed( + client=client, ) ).parsed diff --git a/kittycad/api/meta/ping.py b/kittycad/api/meta/ping.py index 81c5a4d62..4bb39726e 100644 --- a/kittycad/api/meta/ping.py +++ b/kittycad/api/meta/ping.py @@ -9,12 +9,14 @@ from ...types import Response def _get_kwargs( + *, client: Client, + ) -> Dict[str, Any]: - url = "{}/ping".format( - client.base_url, - ) # noqa: E501 + url = "{}/ping".format(client.base_url, ) # noqa: E501 + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -24,25 +26,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -def _parse_response(*, response: httpx.Response) -> Optional[Union[Pong, Error]]: - if response.status_code == 200: - response_200 = Pong.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 _parse_response(*, response: httpx.Response) -> Optional[Union[Pong, Error]] : + if response.status_code == 200: + response_200 = Pong.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[Pong, Error]]]: +) -> Response[Optional[Union[Pong, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -52,10 +56,13 @@ def _build_response( def sync_detailed( + *, client: Client, -) -> Response[Optional[Union[Pong, Error]]]: + +) -> Response[Optional[Union[Pong, Error]]]: kwargs = _get_kwargs( + client=client, ) @@ -68,19 +75,27 @@ def sync_detailed( def sync( + *, client: Client, -) -> Optional[Union[Pong, Error]]: + +) -> Optional[Union[Pong, Error]] : + + return sync_detailed( + client=client, ).parsed async def asyncio_detailed( + *, client: Client, -) -> Response[Optional[Union[Pong, Error]]]: + +) -> Response[Optional[Union[Pong, Error]]]: kwargs = _get_kwargs( + client=client, ) @@ -91,11 +106,16 @@ async def asyncio_detailed( async def asyncio( + *, client: Client, -) -> Optional[Union[Pong, Error]]: + +) -> Optional[Union[Pong, Error]] : + + return ( await asyncio_detailed( + client=client, ) ).parsed diff --git a/kittycad/api/modeling/__init__.py b/kittycad/api/modeling/__init__.py index b4772b30f..f71ff6fd0 100644 --- a/kittycad/api/modeling/__init__.py +++ b/kittycad/api/modeling/__init__.py @@ -1 +1 @@ -""" Contains methods for accessing the modeling API paths: Modeling API for updating your 3D files using the KittyCAD engine. """ # noqa: E501 +""" Contains methods for accessing the modeling API paths: Modeling API for updating your 3D files using the KittyCAD engine. """ # noqa: E501 diff --git a/kittycad/api/modeling/modeling_commands_ws.py b/kittycad/api/modeling/modeling_commands_ws.py index 33fbd43e5..7067b6d86 100644 --- a/kittycad/api/modeling/modeling_commands_ws.py +++ b/kittycad/api/modeling/modeling_commands_ws.py @@ -8,45 +8,84 @@ from ...models.error import Error def _get_kwargs( + + fps: int, + + + unlocked_framerate: bool, + + + video_res_height: int, + + + video_res_width: int, + + + webrtc: bool, + + *, client: Client, + + + + + + + + + + + ) -> Dict[str, Any]: - url = "{}/ws/modeling/commands".format(client.base_url) # noqa: E501 - + url = "{}/ws/modeling/commands".format(client.base_url) # noqa: E501 + + if fps is not None: if "?" in url: url = url + "&fps=" + str(fps) else: url = url + "?fps=" + str(fps) - + + + if unlocked_framerate is not None: if "?" in url: url = url + "&unlocked_framerate=" + str(unlocked_framerate) else: url = url + "?unlocked_framerate=" + str(unlocked_framerate) - + + + if video_res_height is not None: if "?" in url: url = url + "&video_res_height=" + str(video_res_height) else: url = url + "?video_res_height=" + str(video_res_height) - + + + if video_res_width is not None: if "?" in url: url = url + "&video_res_width=" + str(video_res_width) else: url = url + "?video_res_width=" + str(video_res_width) - + + + if webrtc is not None: if "?" in url: url = url + "&webrtc=" + str(webrtc) else: url = url + "?webrtc=" + str(webrtc) + + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -56,62 +95,125 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } def sync( + + fps: int, + + + unlocked_framerate: bool, + + + video_res_height: int, + + + video_res_width: int, + + + webrtc: bool, + + *, client: Client, + + + + + + + + + + + ) -> ClientConnection: """Pass those commands to the engine via websocket, and pass responses back to the client. Basically, this is a websocket proxy between the frontend/client and the engine.""" # noqa: E501 kwargs = _get_kwargs( + fps=fps, + unlocked_framerate=unlocked_framerate, + video_res_height=video_res_height, + video_res_width=video_res_width, + webrtc=webrtc, + client=client, ) - with ws_connect( - kwargs["url"].replace("https://", "wss://"), - additional_headers=kwargs["headers"], - ) as websocket: - return websocket # type: ignore + with ws_connect(kwargs["url"].replace("https://", "wss://"), additional_headers=kwargs["headers"]) as websocket: + return websocket # type: ignore # Return an error if we got here. return Error(message="An error occurred while connecting to the websocket.") + async def asyncio( + + fps: int, + + + unlocked_framerate: bool, + + + video_res_height: int, + + + video_res_width: int, + + + webrtc: bool, + + *, client: Client, + + + + + + + + + + + ) -> WebSocketClientProtocol: """Pass those commands to the engine via websocket, and pass responses back to the client. Basically, this is a websocket proxy between the frontend/client and the engine.""" # noqa: E501 kwargs = _get_kwargs( + fps=fps, + unlocked_framerate=unlocked_framerate, + video_res_height=video_res_height, + video_res_width=video_res_width, + webrtc=webrtc, + client=client, ) - async with ws_connect_async( - kwargs["url"].replace("https://", "wss://"), extra_headers=kwargs["headers"] - ) as websocket: + async with ws_connect_async(kwargs["url"].replace("https://", "wss://"), extra_headers=kwargs["headers"]) as websocket: return websocket # Return an error if we got here. diff --git a/kittycad/api/oauth2/__init__.py b/kittycad/api/oauth2/__init__.py index 1e216c556..b1cf06475 100644 --- a/kittycad/api/oauth2/__init__.py +++ b/kittycad/api/oauth2/__init__.py @@ -1 +1 @@ -""" Contains methods for accessing the oauth2 API paths: Endpoints that implement OAuth 2.0 grant flows. """ # noqa: E501 +""" Contains methods for accessing the oauth2 API paths: Endpoints that implement OAuth 2.0 grant flows. """ # noqa: E501 diff --git a/kittycad/api/payments/__init__.py b/kittycad/api/payments/__init__.py index 61da5c79f..189680fd2 100644 --- a/kittycad/api/payments/__init__.py +++ b/kittycad/api/payments/__init__.py @@ -1 +1 @@ -""" Contains methods for accessing the payments API paths: Operations around payments and billing. """ # noqa: E501 +""" Contains methods for accessing the payments API paths: Operations around payments and billing. """ # noqa: E501 diff --git a/kittycad/api/payments/create_payment_information_for_user.py b/kittycad/api/payments/create_payment_information_for_user.py index a29c97371..6395eb16d 100644 --- a/kittycad/api/payments/create_payment_information_for_user.py +++ b/kittycad/api/payments/create_payment_information_for_user.py @@ -10,13 +10,22 @@ from ...types import Response def _get_kwargs( + + body: BillingInfo, + + *, client: Client, + + + ) -> Dict[str, Any]: - url = "{}/user/payment".format( - client.base_url, - ) # noqa: E501 + url = "{}/user/payment".format(client.base_url, ) # noqa: E501 + + + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -30,22 +39,23 @@ def _get_kwargs( } -def _parse_response(*, response: httpx.Response) -> Optional[Union[Customer, Error]]: - if response.status_code == 201: - response_201 = Customer.from_dict(response.json()) - return response_201 - 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 _parse_response(*, response: httpx.Response) -> Optional[Union[Customer, Error]] : + if response.status_code == 201: + response_201 = Customer.from_dict(response.json()) + return response_201 + 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[Customer, Error]]]: +) -> Response[Optional[Union[Customer, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -55,12 +65,21 @@ def _build_response( def sync_detailed( + + body: BillingInfo, + + *, client: Client, -) -> Response[Optional[Union[Customer, Error]]]: + + + +) -> Response[Optional[Union[Customer, Error]]]: kwargs = _get_kwargs( + body=body, + client=client, ) @@ -73,27 +92,44 @@ def sync_detailed( def sync( + + body: BillingInfo, + + *, client: Client, -) -> Optional[Union[Customer, Error]]: + + + +) -> Optional[Union[Customer, Error]] : """This includes billing address, phone, and name. - This endpoint requires authentication by any KittyCAD user. It creates the payment information for the authenticated user. - """ # noqa: E501 +This endpoint requires authentication by any KittyCAD user. It creates the payment information for the authenticated user.""" # noqa: E501 return sync_detailed( + body=body, + client=client, ).parsed async def asyncio_detailed( + + body: BillingInfo, + + *, client: Client, -) -> Response[Optional[Union[Customer, Error]]]: + + + +) -> Response[Optional[Union[Customer, Error]]]: kwargs = _get_kwargs( + body=body, + client=client, ) @@ -104,17 +140,25 @@ async def asyncio_detailed( async def asyncio( + + body: BillingInfo, + + *, client: Client, -) -> Optional[Union[Customer, Error]]: + + + +) -> Optional[Union[Customer, Error]] : """This includes billing address, phone, and name. - This endpoint requires authentication by any KittyCAD user. It creates the payment information for the authenticated user. - """ # noqa: E501 +This endpoint requires authentication by any KittyCAD user. It creates the payment information for the authenticated user.""" # noqa: E501 return ( await asyncio_detailed( + body=body, + client=client, ) ).parsed diff --git a/kittycad/api/payments/create_payment_intent_for_user.py b/kittycad/api/payments/create_payment_intent_for_user.py index c212b22f1..520bfadf2 100644 --- a/kittycad/api/payments/create_payment_intent_for_user.py +++ b/kittycad/api/payments/create_payment_intent_for_user.py @@ -9,12 +9,14 @@ from ...types import Response def _get_kwargs( + *, client: Client, + ) -> Dict[str, Any]: - url = "{}/user/payment/intent".format( - client.base_url, - ) # noqa: E501 + url = "{}/user/payment/intent".format(client.base_url, ) # noqa: E501 + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -24,27 +26,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -def _parse_response( - *, response: httpx.Response -) -> Optional[Union[PaymentIntent, Error]]: - if response.status_code == 201: - response_201 = PaymentIntent.from_dict(response.json()) - return response_201 - 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 _parse_response(*, response: httpx.Response) -> Optional[Union[PaymentIntent, Error]] : + if response.status_code == 201: + response_201 = PaymentIntent.from_dict(response.json()) + return response_201 + 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[PaymentIntent, Error]]]: +) -> Response[Optional[Union[PaymentIntent, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -54,10 +56,13 @@ def _build_response( def sync_detailed( + *, client: Client, -) -> Response[Optional[Union[PaymentIntent, Error]]]: + +) -> Response[Optional[Union[PaymentIntent, Error]]]: kwargs = _get_kwargs( + client=client, ) @@ -70,21 +75,27 @@ def sync_detailed( def sync( + *, client: Client, -) -> Optional[Union[PaymentIntent, Error]]: + +) -> Optional[Union[PaymentIntent, Error]] : """This endpoint requires authentication by any KittyCAD user. It creates a new payment intent for the authenticated user.""" # noqa: E501 return sync_detailed( + client=client, ).parsed async def asyncio_detailed( + *, client: Client, -) -> Response[Optional[Union[PaymentIntent, Error]]]: + +) -> Response[Optional[Union[PaymentIntent, Error]]]: kwargs = _get_kwargs( + client=client, ) @@ -95,13 +106,16 @@ async def asyncio_detailed( async def asyncio( + *, client: Client, -) -> Optional[Union[PaymentIntent, Error]]: + +) -> Optional[Union[PaymentIntent, Error]] : """This endpoint requires authentication by any KittyCAD user. It creates a new payment intent for the authenticated user.""" # noqa: E501 return ( await asyncio_detailed( + client=client, ) ).parsed diff --git a/kittycad/api/payments/delete_payment_information_for_user.py b/kittycad/api/payments/delete_payment_information_for_user.py index 159f523a2..5c716bfce 100644 --- a/kittycad/api/payments/delete_payment_information_for_user.py +++ b/kittycad/api/payments/delete_payment_information_for_user.py @@ -8,12 +8,14 @@ from ...types import Response def _get_kwargs( + *, client: Client, + ) -> Dict[str, Any]: - url = "{}/user/payment".format( - client.base_url, - ) # noqa: E501 + url = "{}/user/payment".format(client.base_url, ) # noqa: E501 + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -23,21 +25,25 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -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 - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) +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 + 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[Error]]: + +def _build_response( + *, response: httpx.Response +) -> Response[Optional[Error]]: return Response( status_code=response.status_code, content=response.content, @@ -47,10 +53,13 @@ def _build_response(*, response: httpx.Response) -> Response[Optional[Error]]: def sync_detailed( + *, client: Client, -) -> Response[Optional[Error]]: + +) -> Response[Optional[Error]]: kwargs = _get_kwargs( + client=client, ) @@ -63,23 +72,28 @@ def sync_detailed( def sync( + *, client: Client, -) -> Optional[Error]: + +) -> Optional[Error] : """This includes billing address, phone, and name. - This endpoint requires authentication by any KittyCAD user. It deletes the payment information for the authenticated user. - """ # noqa: E501 +This endpoint requires authentication by any KittyCAD user. It deletes the payment information for the authenticated user.""" # noqa: E501 return sync_detailed( + client=client, ).parsed async def asyncio_detailed( + *, client: Client, -) -> Response[Optional[Error]]: + +) -> Response[Optional[Error]]: kwargs = _get_kwargs( + client=client, ) @@ -90,15 +104,17 @@ async def asyncio_detailed( async def asyncio( + *, client: Client, -) -> Optional[Error]: + +) -> Optional[Error] : """This includes billing address, phone, and name. - This endpoint requires authentication by any KittyCAD user. It deletes the payment information for the authenticated user. - """ # noqa: E501 +This endpoint requires authentication by any KittyCAD user. It deletes the payment information for the authenticated user.""" # noqa: E501 return ( await asyncio_detailed( + client=client, ) ).parsed diff --git a/kittycad/api/payments/delete_payment_method_for_user.py b/kittycad/api/payments/delete_payment_method_for_user.py index 52f69e264..2697434ce 100644 --- a/kittycad/api/payments/delete_payment_method_for_user.py +++ b/kittycad/api/payments/delete_payment_method_for_user.py @@ -8,14 +8,22 @@ from ...types import Response def _get_kwargs( + + id: str, + + *, client: Client, + + + ) -> Dict[str, Any]: - url = "{}/user/payment/methods/{id}".format( - client.base_url, - id=id, - ) # noqa: E501 + url = "{}/user/payment/methods/{id}".format(client.base_url, id=id,) # noqa: E501 + + + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -25,21 +33,25 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -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 - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) +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 + 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[Error]]: + +def _build_response( + *, response: httpx.Response +) -> Response[Optional[Error]]: return Response( status_code=response.status_code, content=response.content, @@ -49,12 +61,21 @@ def _build_response(*, response: httpx.Response) -> Response[Optional[Error]]: def sync_detailed( + + id: str, + + *, client: Client, -) -> Response[Optional[Error]]: + + + +) -> Response[Optional[Error]]: kwargs = _get_kwargs( + id=id, + client=client, ) @@ -67,25 +88,43 @@ def sync_detailed( def sync( + + id: str, + + *, client: Client, -) -> Optional[Error]: + + + +) -> Optional[Error] : """This endpoint requires authentication by any KittyCAD user. It deletes the specified payment method for the authenticated user.""" # noqa: E501 return sync_detailed( + id=id, + client=client, ).parsed async def asyncio_detailed( + + id: str, + + *, client: Client, -) -> Response[Optional[Error]]: + + + +) -> Response[Optional[Error]]: kwargs = _get_kwargs( + id=id, + client=client, ) @@ -96,15 +135,24 @@ async def asyncio_detailed( async def asyncio( + + id: str, + + *, client: Client, -) -> Optional[Error]: + + + +) -> Optional[Error] : """This endpoint requires authentication by any KittyCAD user. It deletes the specified payment method for the authenticated user.""" # noqa: E501 return ( await asyncio_detailed( + id=id, + client=client, ) ).parsed diff --git a/kittycad/api/payments/get_payment_balance_for_user.py b/kittycad/api/payments/get_payment_balance_for_user.py index 4de88e376..5b9fda73c 100644 --- a/kittycad/api/payments/get_payment_balance_for_user.py +++ b/kittycad/api/payments/get_payment_balance_for_user.py @@ -9,12 +9,14 @@ from ...types import Response def _get_kwargs( + *, client: Client, + ) -> Dict[str, Any]: - url = "{}/user/payment/balance".format( - client.base_url, - ) # noqa: E501 + url = "{}/user/payment/balance".format(client.base_url, ) # noqa: E501 + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -24,27 +26,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -def _parse_response( - *, response: httpx.Response -) -> Optional[Union[CustomerBalance, Error]]: - if response.status_code == 200: - response_200 = CustomerBalance.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 _parse_response(*, response: httpx.Response) -> Optional[Union[CustomerBalance, Error]] : + if response.status_code == 200: + response_200 = CustomerBalance.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[CustomerBalance, Error]]]: +) -> Response[Optional[Union[CustomerBalance, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -54,10 +56,13 @@ def _build_response( def sync_detailed( + *, client: Client, -) -> Response[Optional[Union[CustomerBalance, Error]]]: + +) -> Response[Optional[Union[CustomerBalance, Error]]]: kwargs = _get_kwargs( + client=client, ) @@ -70,21 +75,27 @@ def sync_detailed( def sync( + *, client: Client, -) -> Optional[Union[CustomerBalance, Error]]: + +) -> Optional[Union[CustomerBalance, Error]] : """This endpoint requires authentication by any KittyCAD user. It gets the balance information for the authenticated user.""" # noqa: E501 return sync_detailed( + client=client, ).parsed async def asyncio_detailed( + *, client: Client, -) -> Response[Optional[Union[CustomerBalance, Error]]]: + +) -> Response[Optional[Union[CustomerBalance, Error]]]: kwargs = _get_kwargs( + client=client, ) @@ -95,13 +106,16 @@ async def asyncio_detailed( async def asyncio( + *, client: Client, -) -> Optional[Union[CustomerBalance, Error]]: + +) -> Optional[Union[CustomerBalance, Error]] : """This endpoint requires authentication by any KittyCAD user. It gets the balance information for the authenticated user.""" # noqa: E501 return ( await asyncio_detailed( + client=client, ) ).parsed diff --git a/kittycad/api/payments/get_payment_information_for_user.py b/kittycad/api/payments/get_payment_information_for_user.py index 44f5692e5..c3ea85938 100644 --- a/kittycad/api/payments/get_payment_information_for_user.py +++ b/kittycad/api/payments/get_payment_information_for_user.py @@ -9,12 +9,14 @@ from ...types import Response def _get_kwargs( + *, client: Client, + ) -> Dict[str, Any]: - url = "{}/user/payment".format( - client.base_url, - ) # noqa: E501 + url = "{}/user/payment".format(client.base_url, ) # noqa: E501 + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -24,25 +26,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -def _parse_response(*, response: httpx.Response) -> Optional[Union[Customer, Error]]: - if response.status_code == 200: - response_200 = Customer.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 _parse_response(*, response: httpx.Response) -> Optional[Union[Customer, Error]] : + if response.status_code == 200: + response_200 = Customer.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[Customer, Error]]]: +) -> Response[Optional[Union[Customer, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -52,10 +56,13 @@ def _build_response( def sync_detailed( + *, client: Client, -) -> Response[Optional[Union[Customer, Error]]]: + +) -> Response[Optional[Union[Customer, Error]]]: kwargs = _get_kwargs( + client=client, ) @@ -68,23 +75,28 @@ def sync_detailed( def sync( + *, client: Client, -) -> Optional[Union[Customer, Error]]: + +) -> Optional[Union[Customer, Error]] : """This includes billing address, phone, and name. - This endpoint requires authentication by any KittyCAD user. It gets the payment information for the authenticated user. - """ # noqa: E501 +This endpoint requires authentication by any KittyCAD user. It gets the payment information for the authenticated user.""" # noqa: E501 return sync_detailed( + client=client, ).parsed async def asyncio_detailed( + *, client: Client, -) -> Response[Optional[Union[Customer, Error]]]: + +) -> Response[Optional[Union[Customer, Error]]]: kwargs = _get_kwargs( + client=client, ) @@ -95,15 +107,17 @@ async def asyncio_detailed( async def asyncio( + *, client: Client, -) -> Optional[Union[Customer, Error]]: + +) -> Optional[Union[Customer, Error]] : """This includes billing address, phone, and name. - This endpoint requires authentication by any KittyCAD user. It gets the payment information for the authenticated user. - """ # noqa: E501 +This endpoint requires authentication by any KittyCAD user. It gets the payment information for the authenticated user.""" # noqa: E501 return ( await asyncio_detailed( + client=client, ) ).parsed diff --git a/kittycad/api/payments/list_invoices_for_user.py b/kittycad/api/payments/list_invoices_for_user.py index 2af14491d..1e7558f19 100644 --- a/kittycad/api/payments/list_invoices_for_user.py +++ b/kittycad/api/payments/list_invoices_for_user.py @@ -9,12 +9,14 @@ from ...types import Response def _get_kwargs( + *, client: Client, + ) -> Dict[str, Any]: - url = "{}/user/payment/invoices".format( - client.base_url, - ) # noqa: E501 + url = "{}/user/payment/invoices".format(client.base_url, ) # noqa: E501 + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -24,27 +26,30 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -def _parse_response( - *, response: httpx.Response -) -> Optional[Union[List[Invoice], Error]]: - if response.status_code == 200: - response_200 = [Invoice.from_dict(item) for item in 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 _parse_response(*, response: httpx.Response) -> Optional[Union[List[Invoice], Error]] : + if response.status_code == 200: + response_200 = [ + Invoice.from_dict(item) + for item in 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[List[Invoice], Error]]]: +) -> Response[Optional[Union[List[Invoice], Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -54,10 +59,13 @@ def _build_response( def sync_detailed( + *, client: Client, -) -> Response[Optional[Union[List[Invoice], Error]]]: + +) -> Response[Optional[Union[List[Invoice], Error]]]: kwargs = _get_kwargs( + client=client, ) @@ -70,21 +78,27 @@ def sync_detailed( def sync( + *, client: Client, -) -> Optional[Union[List[Invoice], Error]]: + +) -> Optional[Union[List[Invoice], Error]] : """This endpoint requires authentication by any KittyCAD user. It lists invoices for the authenticated user.""" # noqa: E501 return sync_detailed( + client=client, ).parsed async def asyncio_detailed( + *, client: Client, -) -> Response[Optional[Union[List[Invoice], Error]]]: + +) -> Response[Optional[Union[List[Invoice], Error]]]: kwargs = _get_kwargs( + client=client, ) @@ -95,13 +109,16 @@ async def asyncio_detailed( async def asyncio( + *, client: Client, -) -> Optional[Union[List[Invoice], Error]]: + +) -> Optional[Union[List[Invoice], Error]] : """This endpoint requires authentication by any KittyCAD user. It lists invoices for the authenticated user.""" # noqa: E501 return ( await asyncio_detailed( + client=client, ) ).parsed diff --git a/kittycad/api/payments/list_payment_methods_for_user.py b/kittycad/api/payments/list_payment_methods_for_user.py index f23fc4d9c..37b0dd02b 100644 --- a/kittycad/api/payments/list_payment_methods_for_user.py +++ b/kittycad/api/payments/list_payment_methods_for_user.py @@ -9,12 +9,14 @@ from ...types import Response def _get_kwargs( + *, client: Client, + ) -> Dict[str, Any]: - url = "{}/user/payment/methods".format( - client.base_url, - ) # noqa: E501 + url = "{}/user/payment/methods".format(client.base_url, ) # noqa: E501 + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -24,27 +26,30 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -def _parse_response( - *, response: httpx.Response -) -> Optional[Union[List[PaymentMethod], Error]]: - if response.status_code == 200: - response_200 = [PaymentMethod.from_dict(item) for item in 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 _parse_response(*, response: httpx.Response) -> Optional[Union[List[PaymentMethod], Error]] : + if response.status_code == 200: + response_200 = [ + PaymentMethod.from_dict(item) + for item in 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[List[PaymentMethod], Error]]]: +) -> Response[Optional[Union[List[PaymentMethod], Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -54,10 +59,13 @@ def _build_response( def sync_detailed( + *, client: Client, -) -> Response[Optional[Union[List[PaymentMethod], Error]]]: + +) -> Response[Optional[Union[List[PaymentMethod], Error]]]: kwargs = _get_kwargs( + client=client, ) @@ -70,21 +78,27 @@ def sync_detailed( def sync( + *, client: Client, -) -> Optional[Union[List[PaymentMethod], Error]]: + +) -> Optional[Union[List[PaymentMethod], Error]] : """This endpoint requires authentication by any KittyCAD user. It lists payment methods for the authenticated user.""" # noqa: E501 return sync_detailed( + client=client, ).parsed async def asyncio_detailed( + *, client: Client, -) -> Response[Optional[Union[List[PaymentMethod], Error]]]: + +) -> Response[Optional[Union[List[PaymentMethod], Error]]]: kwargs = _get_kwargs( + client=client, ) @@ -95,13 +109,16 @@ async def asyncio_detailed( async def asyncio( + *, client: Client, -) -> Optional[Union[List[PaymentMethod], Error]]: + +) -> Optional[Union[List[PaymentMethod], Error]] : """This endpoint requires authentication by any KittyCAD user. It lists payment methods for the authenticated user.""" # noqa: E501 return ( await asyncio_detailed( + client=client, ) ).parsed diff --git a/kittycad/api/payments/update_payment_information_for_user.py b/kittycad/api/payments/update_payment_information_for_user.py index e4ab3a8c7..5b1546078 100644 --- a/kittycad/api/payments/update_payment_information_for_user.py +++ b/kittycad/api/payments/update_payment_information_for_user.py @@ -10,13 +10,22 @@ from ...types import Response def _get_kwargs( + + body: BillingInfo, + + *, client: Client, + + + ) -> Dict[str, Any]: - url = "{}/user/payment".format( - client.base_url, - ) # noqa: E501 + url = "{}/user/payment".format(client.base_url, ) # noqa: E501 + + + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -30,22 +39,23 @@ def _get_kwargs( } -def _parse_response(*, response: httpx.Response) -> Optional[Union[Customer, Error]]: - if response.status_code == 200: - response_200 = Customer.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 _parse_response(*, response: httpx.Response) -> Optional[Union[Customer, Error]] : + if response.status_code == 200: + response_200 = Customer.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[Customer, Error]]]: +) -> Response[Optional[Union[Customer, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -55,12 +65,21 @@ def _build_response( def sync_detailed( + + body: BillingInfo, + + *, client: Client, -) -> Response[Optional[Union[Customer, Error]]]: + + + +) -> Response[Optional[Union[Customer, Error]]]: kwargs = _get_kwargs( + body=body, + client=client, ) @@ -73,27 +92,44 @@ def sync_detailed( def sync( + + body: BillingInfo, + + *, client: Client, -) -> Optional[Union[Customer, Error]]: + + + +) -> Optional[Union[Customer, Error]] : """This includes billing address, phone, and name. - This endpoint requires authentication by any KittyCAD user. It updates the payment information for the authenticated user. - """ # noqa: E501 +This endpoint requires authentication by any KittyCAD user. It updates the payment information for the authenticated user.""" # noqa: E501 return sync_detailed( + body=body, + client=client, ).parsed async def asyncio_detailed( + + body: BillingInfo, + + *, client: Client, -) -> Response[Optional[Union[Customer, Error]]]: + + + +) -> Response[Optional[Union[Customer, Error]]]: kwargs = _get_kwargs( + body=body, + client=client, ) @@ -104,17 +140,25 @@ async def asyncio_detailed( async def asyncio( + + body: BillingInfo, + + *, client: Client, -) -> Optional[Union[Customer, Error]]: + + + +) -> Optional[Union[Customer, Error]] : """This includes billing address, phone, and name. - This endpoint requires authentication by any KittyCAD user. It updates the payment information for the authenticated user. - """ # noqa: E501 +This endpoint requires authentication by any KittyCAD user. It updates the payment information for the authenticated user.""" # noqa: E501 return ( await asyncio_detailed( + body=body, + client=client, ) ).parsed diff --git a/kittycad/api/payments/validate_customer_tax_information_for_user.py b/kittycad/api/payments/validate_customer_tax_information_for_user.py index fab999d0a..258a9b041 100644 --- a/kittycad/api/payments/validate_customer_tax_information_for_user.py +++ b/kittycad/api/payments/validate_customer_tax_information_for_user.py @@ -8,12 +8,14 @@ from ...types import Response def _get_kwargs( + *, client: Client, + ) -> Dict[str, Any]: - url = "{}/user/payment/tax".format( - client.base_url, - ) # noqa: E501 + url = "{}/user/payment/tax".format(client.base_url, ) # noqa: E501 + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -23,21 +25,25 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -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 - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) +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 + 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[Error]]: + +def _build_response( + *, response: httpx.Response +) -> Response[Optional[Error]]: return Response( status_code=response.status_code, content=response.content, @@ -47,10 +53,13 @@ def _build_response(*, response: httpx.Response) -> Response[Optional[Error]]: def sync_detailed( + *, client: Client, -) -> Response[Optional[Error]]: + +) -> Response[Optional[Error]]: kwargs = _get_kwargs( + client=client, ) @@ -63,21 +72,27 @@ def sync_detailed( def sync( + *, client: Client, -) -> Optional[Error]: + +) -> Optional[Error] : """This endpoint requires authentication by any KittyCAD user. It will return an error if the customer's information is not valid for automatic tax. Otherwise, it will return an empty successful response.""" # noqa: E501 return sync_detailed( + client=client, ).parsed async def asyncio_detailed( + *, client: Client, -) -> Response[Optional[Error]]: + +) -> Response[Optional[Error]]: kwargs = _get_kwargs( + client=client, ) @@ -88,13 +103,16 @@ async def asyncio_detailed( async def asyncio( + *, client: Client, -) -> Optional[Error]: + +) -> Optional[Error] : """This endpoint requires authentication by any KittyCAD user. It will return an error if the customer's information is not valid for automatic tax. Otherwise, it will return an empty successful response.""" # noqa: E501 return ( await asyncio_detailed( + client=client, ) ).parsed diff --git a/kittycad/api/unit/__init__.py b/kittycad/api/unit/__init__.py index e6b3722c9..606ed2d49 100644 --- a/kittycad/api/unit/__init__.py +++ b/kittycad/api/unit/__init__.py @@ -1 +1 @@ -""" Contains methods for accessing the unit API paths: Unit conversion operations. """ # noqa: E501 +""" Contains methods for accessing the unit API paths: Unit conversion operations. """ # noqa: E501 diff --git a/kittycad/api/unit/get_angle_unit_conversion.py b/kittycad/api/unit/get_angle_unit_conversion.py index 08703bb66..628c79837 100644 --- a/kittycad/api/unit/get_angle_unit_conversion.py +++ b/kittycad/api/unit/get_angle_unit_conversion.py @@ -10,23 +10,44 @@ from ...types import Response def _get_kwargs( + + input_unit: UnitAngle, + + + output_unit: UnitAngle, + + + value: float, + + *, client: Client, + + + + + + + ) -> Dict[str, Any]: - url = "{}/unit/conversion/angle/{input_unit}/{output_unit}".format( - client.base_url, - input_unit=input_unit, - output_unit=output_unit, - ) # noqa: E501 - + url = "{}/unit/conversion/angle/{input_unit}/{output_unit}".format(client.base_url, input_unit=input_unit,output_unit=output_unit,) # noqa: E501 + + + + + + if value is not None: if "?" in url: url = url + "&value=" + str(value) else: url = url + "?value=" + str(value) + + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -36,27 +57,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -def _parse_response( - *, response: httpx.Response -) -> Optional[Union[UnitAngleConversion, Error]]: - if response.status_code == 200: - response_200 = UnitAngleConversion.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 _parse_response(*, response: httpx.Response) -> Optional[Union[UnitAngleConversion, Error]] : + if response.status_code == 200: + response_200 = UnitAngleConversion.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[UnitAngleConversion, Error]]]: +) -> Response[Optional[Union[UnitAngleConversion, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -66,16 +87,37 @@ def _build_response( def sync_detailed( + + input_unit: UnitAngle, + + + output_unit: UnitAngle, + + + value: float, + + *, client: Client, -) -> Response[Optional[Union[UnitAngleConversion, Error]]]: + + + + + + + +) -> Response[Optional[Union[UnitAngleConversion, Error]]]: kwargs = _get_kwargs( + input_unit=input_unit, + output_unit=output_unit, + value=value, + client=client, ) @@ -88,33 +130,75 @@ def sync_detailed( def sync( + + input_unit: UnitAngle, + + + output_unit: UnitAngle, + + + value: float, + + *, client: Client, -) -> Optional[Union[UnitAngleConversion, Error]]: + + + + + + + +) -> Optional[Union[UnitAngleConversion, Error]] : """Convert an angle unit value to another angle unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501 return sync_detailed( + input_unit=input_unit, + output_unit=output_unit, + value=value, + client=client, ).parsed async def asyncio_detailed( + + input_unit: UnitAngle, + + + output_unit: UnitAngle, + + + value: float, + + *, client: Client, -) -> Response[Optional[Union[UnitAngleConversion, Error]]]: + + + + + + + +) -> Response[Optional[Union[UnitAngleConversion, Error]]]: kwargs = _get_kwargs( + input_unit=input_unit, + output_unit=output_unit, + value=value, + client=client, ) @@ -125,19 +209,40 @@ async def asyncio_detailed( async def asyncio( + + input_unit: UnitAngle, + + + output_unit: UnitAngle, + + + value: float, + + *, client: Client, -) -> Optional[Union[UnitAngleConversion, Error]]: + + + + + + + +) -> Optional[Union[UnitAngleConversion, Error]] : """Convert an angle unit value to another angle unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501 return ( await asyncio_detailed( + input_unit=input_unit, + output_unit=output_unit, + value=value, + client=client, ) ).parsed diff --git a/kittycad/api/unit/get_area_unit_conversion.py b/kittycad/api/unit/get_area_unit_conversion.py index 1ae8b2e43..9f97719ee 100644 --- a/kittycad/api/unit/get_area_unit_conversion.py +++ b/kittycad/api/unit/get_area_unit_conversion.py @@ -10,23 +10,44 @@ from ...types import Response def _get_kwargs( + + input_unit: UnitArea, + + + output_unit: UnitArea, + + + value: float, + + *, client: Client, + + + + + + + ) -> Dict[str, Any]: - url = "{}/unit/conversion/area/{input_unit}/{output_unit}".format( - client.base_url, - input_unit=input_unit, - output_unit=output_unit, - ) # noqa: E501 - + url = "{}/unit/conversion/area/{input_unit}/{output_unit}".format(client.base_url, input_unit=input_unit,output_unit=output_unit,) # noqa: E501 + + + + + + if value is not None: if "?" in url: url = url + "&value=" + str(value) else: url = url + "?value=" + str(value) + + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -36,27 +57,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -def _parse_response( - *, response: httpx.Response -) -> Optional[Union[UnitAreaConversion, Error]]: - if response.status_code == 200: - response_200 = UnitAreaConversion.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 _parse_response(*, response: httpx.Response) -> Optional[Union[UnitAreaConversion, Error]] : + if response.status_code == 200: + response_200 = UnitAreaConversion.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[UnitAreaConversion, Error]]]: +) -> Response[Optional[Union[UnitAreaConversion, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -66,16 +87,37 @@ def _build_response( def sync_detailed( + + input_unit: UnitArea, + + + output_unit: UnitArea, + + + value: float, + + *, client: Client, -) -> Response[Optional[Union[UnitAreaConversion, Error]]]: + + + + + + + +) -> Response[Optional[Union[UnitAreaConversion, Error]]]: kwargs = _get_kwargs( + input_unit=input_unit, + output_unit=output_unit, + value=value, + client=client, ) @@ -88,33 +130,75 @@ def sync_detailed( def sync( + + input_unit: UnitArea, + + + output_unit: UnitArea, + + + value: float, + + *, client: Client, -) -> Optional[Union[UnitAreaConversion, Error]]: + + + + + + + +) -> Optional[Union[UnitAreaConversion, Error]] : """Convert an area unit value to another area unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501 return sync_detailed( + input_unit=input_unit, + output_unit=output_unit, + value=value, + client=client, ).parsed async def asyncio_detailed( + + input_unit: UnitArea, + + + output_unit: UnitArea, + + + value: float, + + *, client: Client, -) -> Response[Optional[Union[UnitAreaConversion, Error]]]: + + + + + + + +) -> Response[Optional[Union[UnitAreaConversion, Error]]]: kwargs = _get_kwargs( + input_unit=input_unit, + output_unit=output_unit, + value=value, + client=client, ) @@ -125,19 +209,40 @@ async def asyncio_detailed( async def asyncio( + + input_unit: UnitArea, + + + output_unit: UnitArea, + + + value: float, + + *, client: Client, -) -> Optional[Union[UnitAreaConversion, Error]]: + + + + + + + +) -> Optional[Union[UnitAreaConversion, Error]] : """Convert an area unit value to another area unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501 return ( await asyncio_detailed( + input_unit=input_unit, + output_unit=output_unit, + value=value, + client=client, ) ).parsed diff --git a/kittycad/api/unit/get_current_unit_conversion.py b/kittycad/api/unit/get_current_unit_conversion.py index f5fde0e2d..96db2e892 100644 --- a/kittycad/api/unit/get_current_unit_conversion.py +++ b/kittycad/api/unit/get_current_unit_conversion.py @@ -10,23 +10,44 @@ from ...types import Response def _get_kwargs( + + input_unit: UnitCurrent, + + + output_unit: UnitCurrent, + + + value: float, + + *, client: Client, + + + + + + + ) -> Dict[str, Any]: - url = "{}/unit/conversion/current/{input_unit}/{output_unit}".format( - client.base_url, - input_unit=input_unit, - output_unit=output_unit, - ) # noqa: E501 - + url = "{}/unit/conversion/current/{input_unit}/{output_unit}".format(client.base_url, input_unit=input_unit,output_unit=output_unit,) # noqa: E501 + + + + + + if value is not None: if "?" in url: url = url + "&value=" + str(value) else: url = url + "?value=" + str(value) + + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -36,27 +57,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -def _parse_response( - *, response: httpx.Response -) -> Optional[Union[UnitCurrentConversion, Error]]: - if response.status_code == 200: - response_200 = UnitCurrentConversion.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 _parse_response(*, response: httpx.Response) -> Optional[Union[UnitCurrentConversion, Error]] : + if response.status_code == 200: + response_200 = UnitCurrentConversion.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[UnitCurrentConversion, Error]]]: +) -> Response[Optional[Union[UnitCurrentConversion, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -66,16 +87,37 @@ def _build_response( def sync_detailed( + + input_unit: UnitCurrent, + + + output_unit: UnitCurrent, + + + value: float, + + *, client: Client, -) -> Response[Optional[Union[UnitCurrentConversion, Error]]]: + + + + + + + +) -> Response[Optional[Union[UnitCurrentConversion, Error]]]: kwargs = _get_kwargs( + input_unit=input_unit, + output_unit=output_unit, + value=value, + client=client, ) @@ -88,33 +130,75 @@ def sync_detailed( def sync( + + input_unit: UnitCurrent, + + + output_unit: UnitCurrent, + + + value: float, + + *, client: Client, -) -> Optional[Union[UnitCurrentConversion, Error]]: + + + + + + + +) -> Optional[Union[UnitCurrentConversion, Error]] : """Convert a current unit value to another current unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501 return sync_detailed( + input_unit=input_unit, + output_unit=output_unit, + value=value, + client=client, ).parsed async def asyncio_detailed( + + input_unit: UnitCurrent, + + + output_unit: UnitCurrent, + + + value: float, + + *, client: Client, -) -> Response[Optional[Union[UnitCurrentConversion, Error]]]: + + + + + + + +) -> Response[Optional[Union[UnitCurrentConversion, Error]]]: kwargs = _get_kwargs( + input_unit=input_unit, + output_unit=output_unit, + value=value, + client=client, ) @@ -125,19 +209,40 @@ async def asyncio_detailed( async def asyncio( + + input_unit: UnitCurrent, + + + output_unit: UnitCurrent, + + + value: float, + + *, client: Client, -) -> Optional[Union[UnitCurrentConversion, Error]]: + + + + + + + +) -> Optional[Union[UnitCurrentConversion, Error]] : """Convert a current unit value to another current unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501 return ( await asyncio_detailed( + input_unit=input_unit, + output_unit=output_unit, + value=value, + client=client, ) ).parsed diff --git a/kittycad/api/unit/get_energy_unit_conversion.py b/kittycad/api/unit/get_energy_unit_conversion.py index e64c61da2..aee279e9b 100644 --- a/kittycad/api/unit/get_energy_unit_conversion.py +++ b/kittycad/api/unit/get_energy_unit_conversion.py @@ -10,23 +10,44 @@ from ...types import Response def _get_kwargs( + + input_unit: UnitEnergy, + + + output_unit: UnitEnergy, + + + value: float, + + *, client: Client, + + + + + + + ) -> Dict[str, Any]: - url = "{}/unit/conversion/energy/{input_unit}/{output_unit}".format( - client.base_url, - input_unit=input_unit, - output_unit=output_unit, - ) # noqa: E501 - + url = "{}/unit/conversion/energy/{input_unit}/{output_unit}".format(client.base_url, input_unit=input_unit,output_unit=output_unit,) # noqa: E501 + + + + + + if value is not None: if "?" in url: url = url + "&value=" + str(value) else: url = url + "?value=" + str(value) + + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -36,27 +57,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -def _parse_response( - *, response: httpx.Response -) -> Optional[Union[UnitEnergyConversion, Error]]: - if response.status_code == 200: - response_200 = UnitEnergyConversion.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 _parse_response(*, response: httpx.Response) -> Optional[Union[UnitEnergyConversion, Error]] : + if response.status_code == 200: + response_200 = UnitEnergyConversion.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[UnitEnergyConversion, Error]]]: +) -> Response[Optional[Union[UnitEnergyConversion, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -66,16 +87,37 @@ def _build_response( def sync_detailed( + + input_unit: UnitEnergy, + + + output_unit: UnitEnergy, + + + value: float, + + *, client: Client, -) -> Response[Optional[Union[UnitEnergyConversion, Error]]]: + + + + + + + +) -> Response[Optional[Union[UnitEnergyConversion, Error]]]: kwargs = _get_kwargs( + input_unit=input_unit, + output_unit=output_unit, + value=value, + client=client, ) @@ -88,33 +130,75 @@ def sync_detailed( def sync( + + input_unit: UnitEnergy, + + + output_unit: UnitEnergy, + + + value: float, + + *, client: Client, -) -> Optional[Union[UnitEnergyConversion, Error]]: + + + + + + + +) -> Optional[Union[UnitEnergyConversion, Error]] : """Convert a energy unit value to another energy unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501 return sync_detailed( + input_unit=input_unit, + output_unit=output_unit, + value=value, + client=client, ).parsed async def asyncio_detailed( + + input_unit: UnitEnergy, + + + output_unit: UnitEnergy, + + + value: float, + + *, client: Client, -) -> Response[Optional[Union[UnitEnergyConversion, Error]]]: + + + + + + + +) -> Response[Optional[Union[UnitEnergyConversion, Error]]]: kwargs = _get_kwargs( + input_unit=input_unit, + output_unit=output_unit, + value=value, + client=client, ) @@ -125,19 +209,40 @@ async def asyncio_detailed( async def asyncio( + + input_unit: UnitEnergy, + + + output_unit: UnitEnergy, + + + value: float, + + *, client: Client, -) -> Optional[Union[UnitEnergyConversion, Error]]: + + + + + + + +) -> Optional[Union[UnitEnergyConversion, Error]] : """Convert a energy unit value to another energy unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501 return ( await asyncio_detailed( + input_unit=input_unit, + output_unit=output_unit, + value=value, + client=client, ) ).parsed diff --git a/kittycad/api/unit/get_force_unit_conversion.py b/kittycad/api/unit/get_force_unit_conversion.py index 1aa100ab0..a57412418 100644 --- a/kittycad/api/unit/get_force_unit_conversion.py +++ b/kittycad/api/unit/get_force_unit_conversion.py @@ -10,23 +10,44 @@ from ...types import Response def _get_kwargs( + + input_unit: UnitForce, + + + output_unit: UnitForce, + + + value: float, + + *, client: Client, + + + + + + + ) -> Dict[str, Any]: - url = "{}/unit/conversion/force/{input_unit}/{output_unit}".format( - client.base_url, - input_unit=input_unit, - output_unit=output_unit, - ) # noqa: E501 - + url = "{}/unit/conversion/force/{input_unit}/{output_unit}".format(client.base_url, input_unit=input_unit,output_unit=output_unit,) # noqa: E501 + + + + + + if value is not None: if "?" in url: url = url + "&value=" + str(value) else: url = url + "?value=" + str(value) + + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -36,27 +57,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -def _parse_response( - *, response: httpx.Response -) -> Optional[Union[UnitForceConversion, Error]]: - if response.status_code == 200: - response_200 = UnitForceConversion.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 _parse_response(*, response: httpx.Response) -> Optional[Union[UnitForceConversion, Error]] : + if response.status_code == 200: + response_200 = UnitForceConversion.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[UnitForceConversion, Error]]]: +) -> Response[Optional[Union[UnitForceConversion, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -66,16 +87,37 @@ def _build_response( def sync_detailed( + + input_unit: UnitForce, + + + output_unit: UnitForce, + + + value: float, + + *, client: Client, -) -> Response[Optional[Union[UnitForceConversion, Error]]]: + + + + + + + +) -> Response[Optional[Union[UnitForceConversion, Error]]]: kwargs = _get_kwargs( + input_unit=input_unit, + output_unit=output_unit, + value=value, + client=client, ) @@ -88,33 +130,75 @@ def sync_detailed( def sync( + + input_unit: UnitForce, + + + output_unit: UnitForce, + + + value: float, + + *, client: Client, -) -> Optional[Union[UnitForceConversion, Error]]: + + + + + + + +) -> Optional[Union[UnitForceConversion, Error]] : """Convert a force unit value to another force unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501 return sync_detailed( + input_unit=input_unit, + output_unit=output_unit, + value=value, + client=client, ).parsed async def asyncio_detailed( + + input_unit: UnitForce, + + + output_unit: UnitForce, + + + value: float, + + *, client: Client, -) -> Response[Optional[Union[UnitForceConversion, Error]]]: + + + + + + + +) -> Response[Optional[Union[UnitForceConversion, Error]]]: kwargs = _get_kwargs( + input_unit=input_unit, + output_unit=output_unit, + value=value, + client=client, ) @@ -125,19 +209,40 @@ async def asyncio_detailed( async def asyncio( + + input_unit: UnitForce, + + + output_unit: UnitForce, + + + value: float, + + *, client: Client, -) -> Optional[Union[UnitForceConversion, Error]]: + + + + + + + +) -> Optional[Union[UnitForceConversion, Error]] : """Convert a force unit value to another force unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501 return ( await asyncio_detailed( + input_unit=input_unit, + output_unit=output_unit, + value=value, + client=client, ) ).parsed diff --git a/kittycad/api/unit/get_frequency_unit_conversion.py b/kittycad/api/unit/get_frequency_unit_conversion.py index 9ffc58c91..aa31fc7b5 100644 --- a/kittycad/api/unit/get_frequency_unit_conversion.py +++ b/kittycad/api/unit/get_frequency_unit_conversion.py @@ -10,23 +10,44 @@ from ...types import Response def _get_kwargs( + + input_unit: UnitFrequency, + + + output_unit: UnitFrequency, + + + value: float, + + *, client: Client, + + + + + + + ) -> Dict[str, Any]: - url = "{}/unit/conversion/frequency/{input_unit}/{output_unit}".format( - client.base_url, - input_unit=input_unit, - output_unit=output_unit, - ) # noqa: E501 - + url = "{}/unit/conversion/frequency/{input_unit}/{output_unit}".format(client.base_url, input_unit=input_unit,output_unit=output_unit,) # noqa: E501 + + + + + + if value is not None: if "?" in url: url = url + "&value=" + str(value) else: url = url + "?value=" + str(value) + + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -36,27 +57,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -def _parse_response( - *, response: httpx.Response -) -> Optional[Union[UnitFrequencyConversion, Error]]: - if response.status_code == 200: - response_200 = UnitFrequencyConversion.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 _parse_response(*, response: httpx.Response) -> Optional[Union[UnitFrequencyConversion, Error]] : + if response.status_code == 200: + response_200 = UnitFrequencyConversion.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[UnitFrequencyConversion, Error]]]: +) -> Response[Optional[Union[UnitFrequencyConversion, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -66,16 +87,37 @@ def _build_response( def sync_detailed( + + input_unit: UnitFrequency, + + + output_unit: UnitFrequency, + + + value: float, + + *, client: Client, -) -> Response[Optional[Union[UnitFrequencyConversion, Error]]]: + + + + + + + +) -> Response[Optional[Union[UnitFrequencyConversion, Error]]]: kwargs = _get_kwargs( + input_unit=input_unit, + output_unit=output_unit, + value=value, + client=client, ) @@ -88,33 +130,75 @@ def sync_detailed( def sync( + + input_unit: UnitFrequency, + + + output_unit: UnitFrequency, + + + value: float, + + *, client: Client, -) -> Optional[Union[UnitFrequencyConversion, Error]]: + + + + + + + +) -> Optional[Union[UnitFrequencyConversion, Error]] : """Convert a frequency unit value to another frequency unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501 return sync_detailed( + input_unit=input_unit, + output_unit=output_unit, + value=value, + client=client, ).parsed async def asyncio_detailed( + + input_unit: UnitFrequency, + + + output_unit: UnitFrequency, + + + value: float, + + *, client: Client, -) -> Response[Optional[Union[UnitFrequencyConversion, Error]]]: + + + + + + + +) -> Response[Optional[Union[UnitFrequencyConversion, Error]]]: kwargs = _get_kwargs( + input_unit=input_unit, + output_unit=output_unit, + value=value, + client=client, ) @@ -125,19 +209,40 @@ async def asyncio_detailed( async def asyncio( + + input_unit: UnitFrequency, + + + output_unit: UnitFrequency, + + + value: float, + + *, client: Client, -) -> Optional[Union[UnitFrequencyConversion, Error]]: + + + + + + + +) -> Optional[Union[UnitFrequencyConversion, Error]] : """Convert a frequency unit value to another frequency unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501 return ( await asyncio_detailed( + input_unit=input_unit, + output_unit=output_unit, + value=value, + client=client, ) ).parsed diff --git a/kittycad/api/unit/get_length_unit_conversion.py b/kittycad/api/unit/get_length_unit_conversion.py index 29ae76ce6..cf00e43bf 100644 --- a/kittycad/api/unit/get_length_unit_conversion.py +++ b/kittycad/api/unit/get_length_unit_conversion.py @@ -10,23 +10,44 @@ from ...types import Response def _get_kwargs( + + input_unit: UnitLength, + + + output_unit: UnitLength, + + + value: float, + + *, client: Client, + + + + + + + ) -> Dict[str, Any]: - url = "{}/unit/conversion/length/{input_unit}/{output_unit}".format( - client.base_url, - input_unit=input_unit, - output_unit=output_unit, - ) # noqa: E501 - + url = "{}/unit/conversion/length/{input_unit}/{output_unit}".format(client.base_url, input_unit=input_unit,output_unit=output_unit,) # noqa: E501 + + + + + + if value is not None: if "?" in url: url = url + "&value=" + str(value) else: url = url + "?value=" + str(value) + + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -36,27 +57,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -def _parse_response( - *, response: httpx.Response -) -> Optional[Union[UnitLengthConversion, Error]]: - if response.status_code == 200: - response_200 = UnitLengthConversion.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 _parse_response(*, response: httpx.Response) -> Optional[Union[UnitLengthConversion, Error]] : + if response.status_code == 200: + response_200 = UnitLengthConversion.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[UnitLengthConversion, Error]]]: +) -> Response[Optional[Union[UnitLengthConversion, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -66,16 +87,37 @@ def _build_response( def sync_detailed( + + input_unit: UnitLength, + + + output_unit: UnitLength, + + + value: float, + + *, client: Client, -) -> Response[Optional[Union[UnitLengthConversion, Error]]]: + + + + + + + +) -> Response[Optional[Union[UnitLengthConversion, Error]]]: kwargs = _get_kwargs( + input_unit=input_unit, + output_unit=output_unit, + value=value, + client=client, ) @@ -88,33 +130,75 @@ def sync_detailed( def sync( + + input_unit: UnitLength, + + + output_unit: UnitLength, + + + value: float, + + *, client: Client, -) -> Optional[Union[UnitLengthConversion, Error]]: + + + + + + + +) -> Optional[Union[UnitLengthConversion, Error]] : """Convert a length unit value to another length unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501 return sync_detailed( + input_unit=input_unit, + output_unit=output_unit, + value=value, + client=client, ).parsed async def asyncio_detailed( + + input_unit: UnitLength, + + + output_unit: UnitLength, + + + value: float, + + *, client: Client, -) -> Response[Optional[Union[UnitLengthConversion, Error]]]: + + + + + + + +) -> Response[Optional[Union[UnitLengthConversion, Error]]]: kwargs = _get_kwargs( + input_unit=input_unit, + output_unit=output_unit, + value=value, + client=client, ) @@ -125,19 +209,40 @@ async def asyncio_detailed( async def asyncio( + + input_unit: UnitLength, + + + output_unit: UnitLength, + + + value: float, + + *, client: Client, -) -> Optional[Union[UnitLengthConversion, Error]]: + + + + + + + +) -> Optional[Union[UnitLengthConversion, Error]] : """Convert a length unit value to another length unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501 return ( await asyncio_detailed( + input_unit=input_unit, + output_unit=output_unit, + value=value, + client=client, ) ).parsed diff --git a/kittycad/api/unit/get_mass_unit_conversion.py b/kittycad/api/unit/get_mass_unit_conversion.py index 3f743ce73..5c0641259 100644 --- a/kittycad/api/unit/get_mass_unit_conversion.py +++ b/kittycad/api/unit/get_mass_unit_conversion.py @@ -10,23 +10,44 @@ from ...types import Response def _get_kwargs( + + input_unit: UnitMass, + + + output_unit: UnitMass, + + + value: float, + + *, client: Client, + + + + + + + ) -> Dict[str, Any]: - url = "{}/unit/conversion/mass/{input_unit}/{output_unit}".format( - client.base_url, - input_unit=input_unit, - output_unit=output_unit, - ) # noqa: E501 - + url = "{}/unit/conversion/mass/{input_unit}/{output_unit}".format(client.base_url, input_unit=input_unit,output_unit=output_unit,) # noqa: E501 + + + + + + if value is not None: if "?" in url: url = url + "&value=" + str(value) else: url = url + "?value=" + str(value) + + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -36,27 +57,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -def _parse_response( - *, response: httpx.Response -) -> Optional[Union[UnitMassConversion, Error]]: - if response.status_code == 200: - response_200 = UnitMassConversion.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 _parse_response(*, response: httpx.Response) -> Optional[Union[UnitMassConversion, Error]] : + if response.status_code == 200: + response_200 = UnitMassConversion.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[UnitMassConversion, Error]]]: +) -> Response[Optional[Union[UnitMassConversion, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -66,16 +87,37 @@ def _build_response( def sync_detailed( + + input_unit: UnitMass, + + + output_unit: UnitMass, + + + value: float, + + *, client: Client, -) -> Response[Optional[Union[UnitMassConversion, Error]]]: + + + + + + + +) -> Response[Optional[Union[UnitMassConversion, Error]]]: kwargs = _get_kwargs( + input_unit=input_unit, + output_unit=output_unit, + value=value, + client=client, ) @@ -88,33 +130,75 @@ def sync_detailed( def sync( + + input_unit: UnitMass, + + + output_unit: UnitMass, + + + value: float, + + *, client: Client, -) -> Optional[Union[UnitMassConversion, Error]]: + + + + + + + +) -> Optional[Union[UnitMassConversion, Error]] : """Convert a mass unit value to another mass unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501 return sync_detailed( + input_unit=input_unit, + output_unit=output_unit, + value=value, + client=client, ).parsed async def asyncio_detailed( + + input_unit: UnitMass, + + + output_unit: UnitMass, + + + value: float, + + *, client: Client, -) -> Response[Optional[Union[UnitMassConversion, Error]]]: + + + + + + + +) -> Response[Optional[Union[UnitMassConversion, Error]]]: kwargs = _get_kwargs( + input_unit=input_unit, + output_unit=output_unit, + value=value, + client=client, ) @@ -125,19 +209,40 @@ async def asyncio_detailed( async def asyncio( + + input_unit: UnitMass, + + + output_unit: UnitMass, + + + value: float, + + *, client: Client, -) -> Optional[Union[UnitMassConversion, Error]]: + + + + + + + +) -> Optional[Union[UnitMassConversion, Error]] : """Convert a mass unit value to another mass unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501 return ( await asyncio_detailed( + input_unit=input_unit, + output_unit=output_unit, + value=value, + client=client, ) ).parsed diff --git a/kittycad/api/unit/get_power_unit_conversion.py b/kittycad/api/unit/get_power_unit_conversion.py index f9c75f44d..9e2ebf912 100644 --- a/kittycad/api/unit/get_power_unit_conversion.py +++ b/kittycad/api/unit/get_power_unit_conversion.py @@ -10,23 +10,44 @@ from ...types import Response def _get_kwargs( + + input_unit: UnitPower, + + + output_unit: UnitPower, + + + value: float, + + *, client: Client, + + + + + + + ) -> Dict[str, Any]: - url = "{}/unit/conversion/power/{input_unit}/{output_unit}".format( - client.base_url, - input_unit=input_unit, - output_unit=output_unit, - ) # noqa: E501 - + url = "{}/unit/conversion/power/{input_unit}/{output_unit}".format(client.base_url, input_unit=input_unit,output_unit=output_unit,) # noqa: E501 + + + + + + if value is not None: if "?" in url: url = url + "&value=" + str(value) else: url = url + "?value=" + str(value) + + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -36,27 +57,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -def _parse_response( - *, response: httpx.Response -) -> Optional[Union[UnitPowerConversion, Error]]: - if response.status_code == 200: - response_200 = UnitPowerConversion.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 _parse_response(*, response: httpx.Response) -> Optional[Union[UnitPowerConversion, Error]] : + if response.status_code == 200: + response_200 = UnitPowerConversion.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[UnitPowerConversion, Error]]]: +) -> Response[Optional[Union[UnitPowerConversion, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -66,16 +87,37 @@ def _build_response( def sync_detailed( + + input_unit: UnitPower, + + + output_unit: UnitPower, + + + value: float, + + *, client: Client, -) -> Response[Optional[Union[UnitPowerConversion, Error]]]: + + + + + + + +) -> Response[Optional[Union[UnitPowerConversion, Error]]]: kwargs = _get_kwargs( + input_unit=input_unit, + output_unit=output_unit, + value=value, + client=client, ) @@ -88,33 +130,75 @@ def sync_detailed( def sync( + + input_unit: UnitPower, + + + output_unit: UnitPower, + + + value: float, + + *, client: Client, -) -> Optional[Union[UnitPowerConversion, Error]]: + + + + + + + +) -> Optional[Union[UnitPowerConversion, Error]] : """Convert a power unit value to another power unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501 return sync_detailed( + input_unit=input_unit, + output_unit=output_unit, + value=value, + client=client, ).parsed async def asyncio_detailed( + + input_unit: UnitPower, + + + output_unit: UnitPower, + + + value: float, + + *, client: Client, -) -> Response[Optional[Union[UnitPowerConversion, Error]]]: + + + + + + + +) -> Response[Optional[Union[UnitPowerConversion, Error]]]: kwargs = _get_kwargs( + input_unit=input_unit, + output_unit=output_unit, + value=value, + client=client, ) @@ -125,19 +209,40 @@ async def asyncio_detailed( async def asyncio( + + input_unit: UnitPower, + + + output_unit: UnitPower, + + + value: float, + + *, client: Client, -) -> Optional[Union[UnitPowerConversion, Error]]: + + + + + + + +) -> Optional[Union[UnitPowerConversion, Error]] : """Convert a power unit value to another power unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501 return ( await asyncio_detailed( + input_unit=input_unit, + output_unit=output_unit, + value=value, + client=client, ) ).parsed diff --git a/kittycad/api/unit/get_pressure_unit_conversion.py b/kittycad/api/unit/get_pressure_unit_conversion.py index 1eb6f25ad..02fdbd4e4 100644 --- a/kittycad/api/unit/get_pressure_unit_conversion.py +++ b/kittycad/api/unit/get_pressure_unit_conversion.py @@ -10,23 +10,44 @@ from ...types import Response def _get_kwargs( + + input_unit: UnitPressure, + + + output_unit: UnitPressure, + + + value: float, + + *, client: Client, + + + + + + + ) -> Dict[str, Any]: - url = "{}/unit/conversion/pressure/{input_unit}/{output_unit}".format( - client.base_url, - input_unit=input_unit, - output_unit=output_unit, - ) # noqa: E501 - + url = "{}/unit/conversion/pressure/{input_unit}/{output_unit}".format(client.base_url, input_unit=input_unit,output_unit=output_unit,) # noqa: E501 + + + + + + if value is not None: if "?" in url: url = url + "&value=" + str(value) else: url = url + "?value=" + str(value) + + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -36,27 +57,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -def _parse_response( - *, response: httpx.Response -) -> Optional[Union[UnitPressureConversion, Error]]: - if response.status_code == 200: - response_200 = UnitPressureConversion.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 _parse_response(*, response: httpx.Response) -> Optional[Union[UnitPressureConversion, Error]] : + if response.status_code == 200: + response_200 = UnitPressureConversion.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[UnitPressureConversion, Error]]]: +) -> Response[Optional[Union[UnitPressureConversion, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -66,16 +87,37 @@ def _build_response( def sync_detailed( + + input_unit: UnitPressure, + + + output_unit: UnitPressure, + + + value: float, + + *, client: Client, -) -> Response[Optional[Union[UnitPressureConversion, Error]]]: + + + + + + + +) -> Response[Optional[Union[UnitPressureConversion, Error]]]: kwargs = _get_kwargs( + input_unit=input_unit, + output_unit=output_unit, + value=value, + client=client, ) @@ -88,33 +130,75 @@ def sync_detailed( def sync( + + input_unit: UnitPressure, + + + output_unit: UnitPressure, + + + value: float, + + *, client: Client, -) -> Optional[Union[UnitPressureConversion, Error]]: + + + + + + + +) -> Optional[Union[UnitPressureConversion, Error]] : """Convert a pressure unit value to another pressure unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501 return sync_detailed( + input_unit=input_unit, + output_unit=output_unit, + value=value, + client=client, ).parsed async def asyncio_detailed( + + input_unit: UnitPressure, + + + output_unit: UnitPressure, + + + value: float, + + *, client: Client, -) -> Response[Optional[Union[UnitPressureConversion, Error]]]: + + + + + + + +) -> Response[Optional[Union[UnitPressureConversion, Error]]]: kwargs = _get_kwargs( + input_unit=input_unit, + output_unit=output_unit, + value=value, + client=client, ) @@ -125,19 +209,40 @@ async def asyncio_detailed( async def asyncio( + + input_unit: UnitPressure, + + + output_unit: UnitPressure, + + + value: float, + + *, client: Client, -) -> Optional[Union[UnitPressureConversion, Error]]: + + + + + + + +) -> Optional[Union[UnitPressureConversion, Error]] : """Convert a pressure unit value to another pressure unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501 return ( await asyncio_detailed( + input_unit=input_unit, + output_unit=output_unit, + value=value, + client=client, ) ).parsed diff --git a/kittycad/api/unit/get_temperature_unit_conversion.py b/kittycad/api/unit/get_temperature_unit_conversion.py index 8b22b53c7..1bbd70e62 100644 --- a/kittycad/api/unit/get_temperature_unit_conversion.py +++ b/kittycad/api/unit/get_temperature_unit_conversion.py @@ -10,23 +10,44 @@ from ...types import Response def _get_kwargs( + + input_unit: UnitTemperature, + + + output_unit: UnitTemperature, + + + value: float, + + *, client: Client, + + + + + + + ) -> Dict[str, Any]: - url = "{}/unit/conversion/temperature/{input_unit}/{output_unit}".format( - client.base_url, - input_unit=input_unit, - output_unit=output_unit, - ) # noqa: E501 - + url = "{}/unit/conversion/temperature/{input_unit}/{output_unit}".format(client.base_url, input_unit=input_unit,output_unit=output_unit,) # noqa: E501 + + + + + + if value is not None: if "?" in url: url = url + "&value=" + str(value) else: url = url + "?value=" + str(value) + + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -36,27 +57,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -def _parse_response( - *, response: httpx.Response -) -> Optional[Union[UnitTemperatureConversion, Error]]: - if response.status_code == 200: - response_200 = UnitTemperatureConversion.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 _parse_response(*, response: httpx.Response) -> Optional[Union[UnitTemperatureConversion, Error]] : + if response.status_code == 200: + response_200 = UnitTemperatureConversion.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[UnitTemperatureConversion, Error]]]: +) -> Response[Optional[Union[UnitTemperatureConversion, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -66,16 +87,37 @@ def _build_response( def sync_detailed( + + input_unit: UnitTemperature, + + + output_unit: UnitTemperature, + + + value: float, + + *, client: Client, -) -> Response[Optional[Union[UnitTemperatureConversion, Error]]]: + + + + + + + +) -> Response[Optional[Union[UnitTemperatureConversion, Error]]]: kwargs = _get_kwargs( + input_unit=input_unit, + output_unit=output_unit, + value=value, + client=client, ) @@ -88,33 +130,75 @@ def sync_detailed( def sync( + + input_unit: UnitTemperature, + + + output_unit: UnitTemperature, + + + value: float, + + *, client: Client, -) -> Optional[Union[UnitTemperatureConversion, Error]]: + + + + + + + +) -> Optional[Union[UnitTemperatureConversion, Error]] : """Convert a temperature unit value to another temperature unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501 return sync_detailed( + input_unit=input_unit, + output_unit=output_unit, + value=value, + client=client, ).parsed async def asyncio_detailed( + + input_unit: UnitTemperature, + + + output_unit: UnitTemperature, + + + value: float, + + *, client: Client, -) -> Response[Optional[Union[UnitTemperatureConversion, Error]]]: + + + + + + + +) -> Response[Optional[Union[UnitTemperatureConversion, Error]]]: kwargs = _get_kwargs( + input_unit=input_unit, + output_unit=output_unit, + value=value, + client=client, ) @@ -125,19 +209,40 @@ async def asyncio_detailed( async def asyncio( + + input_unit: UnitTemperature, + + + output_unit: UnitTemperature, + + + value: float, + + *, client: Client, -) -> Optional[Union[UnitTemperatureConversion, Error]]: + + + + + + + +) -> Optional[Union[UnitTemperatureConversion, Error]] : """Convert a temperature unit value to another temperature unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501 return ( await asyncio_detailed( + input_unit=input_unit, + output_unit=output_unit, + value=value, + client=client, ) ).parsed diff --git a/kittycad/api/unit/get_torque_unit_conversion.py b/kittycad/api/unit/get_torque_unit_conversion.py index f0406e79e..30077e952 100644 --- a/kittycad/api/unit/get_torque_unit_conversion.py +++ b/kittycad/api/unit/get_torque_unit_conversion.py @@ -10,23 +10,44 @@ from ...types import Response def _get_kwargs( + + input_unit: UnitTorque, + + + output_unit: UnitTorque, + + + value: float, + + *, client: Client, + + + + + + + ) -> Dict[str, Any]: - url = "{}/unit/conversion/torque/{input_unit}/{output_unit}".format( - client.base_url, - input_unit=input_unit, - output_unit=output_unit, - ) # noqa: E501 - + url = "{}/unit/conversion/torque/{input_unit}/{output_unit}".format(client.base_url, input_unit=input_unit,output_unit=output_unit,) # noqa: E501 + + + + + + if value is not None: if "?" in url: url = url + "&value=" + str(value) else: url = url + "?value=" + str(value) + + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -36,27 +57,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -def _parse_response( - *, response: httpx.Response -) -> Optional[Union[UnitTorqueConversion, Error]]: - if response.status_code == 200: - response_200 = UnitTorqueConversion.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 _parse_response(*, response: httpx.Response) -> Optional[Union[UnitTorqueConversion, Error]] : + if response.status_code == 200: + response_200 = UnitTorqueConversion.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[UnitTorqueConversion, Error]]]: +) -> Response[Optional[Union[UnitTorqueConversion, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -66,16 +87,37 @@ def _build_response( def sync_detailed( + + input_unit: UnitTorque, + + + output_unit: UnitTorque, + + + value: float, + + *, client: Client, -) -> Response[Optional[Union[UnitTorqueConversion, Error]]]: + + + + + + + +) -> Response[Optional[Union[UnitTorqueConversion, Error]]]: kwargs = _get_kwargs( + input_unit=input_unit, + output_unit=output_unit, + value=value, + client=client, ) @@ -88,33 +130,75 @@ def sync_detailed( def sync( + + input_unit: UnitTorque, + + + output_unit: UnitTorque, + + + value: float, + + *, client: Client, -) -> Optional[Union[UnitTorqueConversion, Error]]: + + + + + + + +) -> Optional[Union[UnitTorqueConversion, Error]] : """Convert a torque unit value to another torque unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501 return sync_detailed( + input_unit=input_unit, + output_unit=output_unit, + value=value, + client=client, ).parsed async def asyncio_detailed( + + input_unit: UnitTorque, + + + output_unit: UnitTorque, + + + value: float, + + *, client: Client, -) -> Response[Optional[Union[UnitTorqueConversion, Error]]]: + + + + + + + +) -> Response[Optional[Union[UnitTorqueConversion, Error]]]: kwargs = _get_kwargs( + input_unit=input_unit, + output_unit=output_unit, + value=value, + client=client, ) @@ -125,19 +209,40 @@ async def asyncio_detailed( async def asyncio( + + input_unit: UnitTorque, + + + output_unit: UnitTorque, + + + value: float, + + *, client: Client, -) -> Optional[Union[UnitTorqueConversion, Error]]: + + + + + + + +) -> Optional[Union[UnitTorqueConversion, Error]] : """Convert a torque unit value to another torque unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501 return ( await asyncio_detailed( + input_unit=input_unit, + output_unit=output_unit, + value=value, + client=client, ) ).parsed diff --git a/kittycad/api/unit/get_volume_unit_conversion.py b/kittycad/api/unit/get_volume_unit_conversion.py index 8711169a5..2babc6499 100644 --- a/kittycad/api/unit/get_volume_unit_conversion.py +++ b/kittycad/api/unit/get_volume_unit_conversion.py @@ -10,23 +10,44 @@ from ...types import Response def _get_kwargs( + + input_unit: UnitVolume, + + + output_unit: UnitVolume, + + + value: float, + + *, client: Client, + + + + + + + ) -> Dict[str, Any]: - url = "{}/unit/conversion/volume/{input_unit}/{output_unit}".format( - client.base_url, - input_unit=input_unit, - output_unit=output_unit, - ) # noqa: E501 - + url = "{}/unit/conversion/volume/{input_unit}/{output_unit}".format(client.base_url, input_unit=input_unit,output_unit=output_unit,) # noqa: E501 + + + + + + if value is not None: if "?" in url: url = url + "&value=" + str(value) else: url = url + "?value=" + str(value) + + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -36,27 +57,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -def _parse_response( - *, response: httpx.Response -) -> Optional[Union[UnitVolumeConversion, Error]]: - if response.status_code == 200: - response_200 = UnitVolumeConversion.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 _parse_response(*, response: httpx.Response) -> Optional[Union[UnitVolumeConversion, Error]] : + if response.status_code == 200: + response_200 = UnitVolumeConversion.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[UnitVolumeConversion, Error]]]: +) -> Response[Optional[Union[UnitVolumeConversion, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -66,16 +87,37 @@ def _build_response( def sync_detailed( + + input_unit: UnitVolume, + + + output_unit: UnitVolume, + + + value: float, + + *, client: Client, -) -> Response[Optional[Union[UnitVolumeConversion, Error]]]: + + + + + + + +) -> Response[Optional[Union[UnitVolumeConversion, Error]]]: kwargs = _get_kwargs( + input_unit=input_unit, + output_unit=output_unit, + value=value, + client=client, ) @@ -88,33 +130,75 @@ def sync_detailed( def sync( + + input_unit: UnitVolume, + + + output_unit: UnitVolume, + + + value: float, + + *, client: Client, -) -> Optional[Union[UnitVolumeConversion, Error]]: + + + + + + + +) -> Optional[Union[UnitVolumeConversion, Error]] : """Convert a volume unit value to another volume unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501 return sync_detailed( + input_unit=input_unit, + output_unit=output_unit, + value=value, + client=client, ).parsed async def asyncio_detailed( + + input_unit: UnitVolume, + + + output_unit: UnitVolume, + + + value: float, + + *, client: Client, -) -> Response[Optional[Union[UnitVolumeConversion, Error]]]: + + + + + + + +) -> Response[Optional[Union[UnitVolumeConversion, Error]]]: kwargs = _get_kwargs( + input_unit=input_unit, + output_unit=output_unit, + value=value, + client=client, ) @@ -125,19 +209,40 @@ async def asyncio_detailed( async def asyncio( + + input_unit: UnitVolume, + + + output_unit: UnitVolume, + + + value: float, + + *, client: Client, -) -> Optional[Union[UnitVolumeConversion, Error]]: + + + + + + + +) -> Optional[Union[UnitVolumeConversion, Error]] : """Convert a volume unit value to another volume unit value. This is a nice endpoint to use for helper functions.""" # noqa: E501 return ( await asyncio_detailed( + input_unit=input_unit, + output_unit=output_unit, + value=value, + client=client, ) ).parsed diff --git a/kittycad/api/users/__init__.py b/kittycad/api/users/__init__.py index c26e25d42..a3c3d8d06 100644 --- a/kittycad/api/users/__init__.py +++ b/kittycad/api/users/__init__.py @@ -1 +1 @@ -""" Contains methods for accessing the users API paths: A user is someone who uses the KittyCAD API. Here, we can create, delete, and list users. We can also get information about a user. Operations will only be authorized if the user is requesting information about themselves. """ # noqa: E501 +""" Contains methods for accessing the users API paths: A user is someone who uses the KittyCAD API. Here, we can create, delete, and list users. We can also get information about a user. Operations will only be authorized if the user is requesting information about themselves. """ # noqa: E501 diff --git a/kittycad/api/users/delete_user_self.py b/kittycad/api/users/delete_user_self.py index 836b59333..bc2e9ce92 100644 --- a/kittycad/api/users/delete_user_self.py +++ b/kittycad/api/users/delete_user_self.py @@ -8,12 +8,14 @@ from ...types import Response def _get_kwargs( + *, client: Client, + ) -> Dict[str, Any]: - url = "{}/user".format( - client.base_url, - ) # noqa: E501 + url = "{}/user".format(client.base_url, ) # noqa: E501 + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -23,21 +25,25 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -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 - if response.status_code == 500: - response_5XX = Error.from_dict(response.json()) - return response_5XX - return Error.from_dict(response.json()) +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 + 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[Error]]: + +def _build_response( + *, response: httpx.Response +) -> Response[Optional[Error]]: return Response( status_code=response.status_code, content=response.content, @@ -47,10 +53,13 @@ def _build_response(*, response: httpx.Response) -> Response[Optional[Error]]: def sync_detailed( + *, client: Client, -) -> Response[Optional[Error]]: + +) -> Response[Optional[Error]]: kwargs = _get_kwargs( + client=client, ) @@ -63,23 +72,28 @@ def sync_detailed( def sync( + *, client: Client, -) -> Optional[Error]: + +) -> Optional[Error] : """This endpoint requires authentication by any KittyCAD user. It deletes the authenticated user from KittyCAD's database. - This call will only succeed if all invoices associated with the user have been paid in full and there is no outstanding balance. - """ # noqa: E501 +This call will only succeed if all invoices associated with the user have been paid in full and there is no outstanding balance.""" # noqa: E501 return sync_detailed( + client=client, ).parsed async def asyncio_detailed( + *, client: Client, -) -> Response[Optional[Error]]: + +) -> Response[Optional[Error]]: kwargs = _get_kwargs( + client=client, ) @@ -90,15 +104,17 @@ async def asyncio_detailed( async def asyncio( + *, client: Client, -) -> Optional[Error]: + +) -> Optional[Error] : """This endpoint requires authentication by any KittyCAD user. It deletes the authenticated user from KittyCAD's database. - This call will only succeed if all invoices associated with the user have been paid in full and there is no outstanding balance. - """ # noqa: E501 +This call will only succeed if all invoices associated with the user have been paid in full and there is no outstanding balance.""" # noqa: E501 return ( await asyncio_detailed( + client=client, ) ).parsed diff --git a/kittycad/api/users/get_session_for_user.py b/kittycad/api/users/get_session_for_user.py index 629a31ad7..dd2a70bf3 100644 --- a/kittycad/api/users/get_session_for_user.py +++ b/kittycad/api/users/get_session_for_user.py @@ -9,14 +9,22 @@ from ...types import Response def _get_kwargs( + + token: str, + + *, client: Client, + + + ) -> Dict[str, Any]: - url = "{}/user/session/{token}".format( - client.base_url, - token=token, - ) # noqa: E501 + url = "{}/user/session/{token}".format(client.base_url, token=token,) # noqa: E501 + + + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -26,25 +34,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -def _parse_response(*, response: httpx.Response) -> Optional[Union[Session, Error]]: - if response.status_code == 200: - response_200 = Session.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 _parse_response(*, response: httpx.Response) -> Optional[Union[Session, Error]] : + if response.status_code == 200: + response_200 = Session.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[Session, Error]]]: +) -> Response[Optional[Union[Session, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -54,12 +64,21 @@ def _build_response( def sync_detailed( + + token: str, + + *, client: Client, -) -> Response[Optional[Union[Session, Error]]]: + + + +) -> Response[Optional[Union[Session, Error]]]: kwargs = _get_kwargs( + token=token, + client=client, ) @@ -72,25 +91,43 @@ def sync_detailed( def sync( + + token: str, + + *, client: Client, -) -> Optional[Union[Session, Error]]: + + + +) -> Optional[Union[Session, Error]] : """This endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the user.""" # noqa: E501 return sync_detailed( + token=token, + client=client, ).parsed async def asyncio_detailed( + + token: str, + + *, client: Client, -) -> Response[Optional[Union[Session, Error]]]: + + + +) -> Response[Optional[Union[Session, Error]]]: kwargs = _get_kwargs( + token=token, + client=client, ) @@ -101,15 +138,24 @@ async def asyncio_detailed( async def asyncio( + + token: str, + + *, client: Client, -) -> Optional[Union[Session, Error]]: + + + +) -> Optional[Union[Session, Error]] : """This endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the user.""" # noqa: E501 return ( await asyncio_detailed( + token=token, + client=client, ) ).parsed diff --git a/kittycad/api/users/get_user.py b/kittycad/api/users/get_user.py index 0497b7252..bda3a36e0 100644 --- a/kittycad/api/users/get_user.py +++ b/kittycad/api/users/get_user.py @@ -9,14 +9,22 @@ from ...types import Response def _get_kwargs( + + id: str, + + *, client: Client, + + + ) -> Dict[str, Any]: - url = "{}/users/{id}".format( - client.base_url, - id=id, - ) # noqa: E501 + url = "{}/users/{id}".format(client.base_url, id=id,) # noqa: E501 + + + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -26,25 +34,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -def _parse_response(*, response: httpx.Response) -> Optional[Union[User, Error]]: - if response.status_code == 200: - response_200 = User.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 _parse_response(*, response: httpx.Response) -> Optional[Union[User, Error]] : + if response.status_code == 200: + response_200 = User.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[User, Error]]]: +) -> Response[Optional[Union[User, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -54,12 +64,21 @@ def _build_response( def sync_detailed( + + id: str, + + *, client: Client, -) -> Response[Optional[Union[User, Error]]]: + + + +) -> Response[Optional[Union[User, Error]]]: kwargs = _get_kwargs( + id=id, + client=client, ) @@ -72,27 +91,45 @@ def sync_detailed( def sync( + + id: str, + + *, client: Client, -) -> Optional[Union[User, Error]]: + + + +) -> Optional[Union[User, Error]] : """To get information about yourself, use `/users/me` as the endpoint. By doing so you will get the user information for the authenticated user. - Alternatively, to get information about the authenticated user, use `/user` endpoint. - To get information about any KittyCAD user, you must be a KittyCAD employee.""" # noqa: E501 +Alternatively, to get information about the authenticated user, use `/user` endpoint. +To get information about any KittyCAD user, you must be a KittyCAD employee.""" # noqa: E501 return sync_detailed( + id=id, + client=client, ).parsed async def asyncio_detailed( + + id: str, + + *, client: Client, -) -> Response[Optional[Union[User, Error]]]: + + + +) -> Response[Optional[Union[User, Error]]]: kwargs = _get_kwargs( + id=id, + client=client, ) @@ -103,17 +140,26 @@ async def asyncio_detailed( async def asyncio( + + id: str, + + *, client: Client, -) -> Optional[Union[User, Error]]: + + + +) -> Optional[Union[User, Error]] : """To get information about yourself, use `/users/me` as the endpoint. By doing so you will get the user information for the authenticated user. - Alternatively, to get information about the authenticated user, use `/user` endpoint. - To get information about any KittyCAD user, you must be a KittyCAD employee.""" # noqa: E501 +Alternatively, to get information about the authenticated user, use `/user` endpoint. +To get information about any KittyCAD user, you must be a KittyCAD employee.""" # noqa: E501 return ( await asyncio_detailed( + id=id, + client=client, ) ).parsed diff --git a/kittycad/api/users/get_user_extended.py b/kittycad/api/users/get_user_extended.py index 44ce69869..a39a07f7f 100644 --- a/kittycad/api/users/get_user_extended.py +++ b/kittycad/api/users/get_user_extended.py @@ -9,14 +9,22 @@ from ...types import Response def _get_kwargs( + + id: str, + + *, client: Client, + + + ) -> Dict[str, Any]: - url = "{}/users-extended/{id}".format( - client.base_url, - id=id, - ) # noqa: E501 + url = "{}/users-extended/{id}".format(client.base_url, id=id,) # noqa: E501 + + + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -26,27 +34,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -def _parse_response( - *, response: httpx.Response -) -> Optional[Union[ExtendedUser, Error]]: - if response.status_code == 200: - response_200 = ExtendedUser.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 _parse_response(*, response: httpx.Response) -> Optional[Union[ExtendedUser, Error]] : + if response.status_code == 200: + response_200 = ExtendedUser.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[ExtendedUser, Error]]]: +) -> Response[Optional[Union[ExtendedUser, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -56,12 +64,21 @@ def _build_response( def sync_detailed( + + id: str, + + *, client: Client, -) -> Response[Optional[Union[ExtendedUser, Error]]]: + + + +) -> Response[Optional[Union[ExtendedUser, Error]]]: kwargs = _get_kwargs( + id=id, + client=client, ) @@ -74,27 +91,45 @@ def sync_detailed( def sync( + + id: str, + + *, client: Client, -) -> Optional[Union[ExtendedUser, Error]]: + + + +) -> Optional[Union[ExtendedUser, Error]] : """To get information about yourself, use `/users-extended/me` as the endpoint. By doing so you will get the user information for the authenticated user. - Alternatively, to get information about the authenticated user, use `/user/extended` endpoint. - To get information about any KittyCAD user, you must be a KittyCAD employee.""" # noqa: E501 +Alternatively, to get information about the authenticated user, use `/user/extended` endpoint. +To get information about any KittyCAD user, you must be a KittyCAD employee.""" # noqa: E501 return sync_detailed( + id=id, + client=client, ).parsed async def asyncio_detailed( + + id: str, + + *, client: Client, -) -> Response[Optional[Union[ExtendedUser, Error]]]: + + + +) -> Response[Optional[Union[ExtendedUser, Error]]]: kwargs = _get_kwargs( + id=id, + client=client, ) @@ -105,17 +140,26 @@ async def asyncio_detailed( async def asyncio( + + id: str, + + *, client: Client, -) -> Optional[Union[ExtendedUser, Error]]: + + + +) -> Optional[Union[ExtendedUser, Error]] : """To get information about yourself, use `/users-extended/me` as the endpoint. By doing so you will get the user information for the authenticated user. - Alternatively, to get information about the authenticated user, use `/user/extended` endpoint. - To get information about any KittyCAD user, you must be a KittyCAD employee.""" # noqa: E501 +Alternatively, to get information about the authenticated user, use `/user/extended` endpoint. +To get information about any KittyCAD user, you must be a KittyCAD employee.""" # noqa: E501 return ( await asyncio_detailed( + id=id, + client=client, ) ).parsed diff --git a/kittycad/api/users/get_user_front_hash_self.py b/kittycad/api/users/get_user_front_hash_self.py index e2eda71e4..5548e33d3 100644 --- a/kittycad/api/users/get_user_front_hash_self.py +++ b/kittycad/api/users/get_user_front_hash_self.py @@ -8,12 +8,14 @@ from ...types import Response def _get_kwargs( + *, client: Client, + ) -> Dict[str, Any]: - url = "{}/user/front-hash".format( - client.base_url, - ) # noqa: E501 + url = "{}/user/front-hash".format(client.base_url, ) # noqa: E501 + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -23,25 +25,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -def _parse_response(*, response: httpx.Response) -> Optional[Union[str, Error]]: - if response.status_code == 200: - response_200 = response.text - 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 _parse_response(*, response: httpx.Response) -> Optional[Union[str, Error]] : + if response.status_code == 200: + response_200 = response.text + 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[str, Error]]]: +) -> Response[Optional[Union[str, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -51,10 +55,13 @@ def _build_response( def sync_detailed( + *, client: Client, -) -> Response[Optional[Union[str, Error]]]: + +) -> Response[Optional[Union[str, Error]]]: kwargs = _get_kwargs( + client=client, ) @@ -67,21 +74,27 @@ def sync_detailed( def sync( + *, client: Client, -) -> Optional[Union[str, Error]]: + +) -> Optional[Union[str, Error]] : """This info is sent to front when initialing the front chat, it prevents impersonations using js hacks in the browser""" # noqa: E501 return sync_detailed( + client=client, ).parsed async def asyncio_detailed( + *, client: Client, -) -> Response[Optional[Union[str, Error]]]: + +) -> Response[Optional[Union[str, Error]]]: kwargs = _get_kwargs( + client=client, ) @@ -92,13 +105,16 @@ async def asyncio_detailed( async def asyncio( + *, client: Client, -) -> Optional[Union[str, Error]]: + +) -> Optional[Union[str, Error]] : """This info is sent to front when initialing the front chat, it prevents impersonations using js hacks in the browser""" # noqa: E501 return ( await asyncio_detailed( + client=client, ) ).parsed diff --git a/kittycad/api/users/get_user_onboarding_self.py b/kittycad/api/users/get_user_onboarding_self.py index db56949b6..e89435e16 100644 --- a/kittycad/api/users/get_user_onboarding_self.py +++ b/kittycad/api/users/get_user_onboarding_self.py @@ -9,12 +9,14 @@ from ...types import Response def _get_kwargs( + *, client: Client, + ) -> Dict[str, Any]: - url = "{}/user/onboarding".format( - client.base_url, - ) # noqa: E501 + url = "{}/user/onboarding".format(client.base_url, ) # noqa: E501 + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -24,25 +26,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -def _parse_response(*, response: httpx.Response) -> Optional[Union[Onboarding, Error]]: - if response.status_code == 200: - response_200 = Onboarding.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 _parse_response(*, response: httpx.Response) -> Optional[Union[Onboarding, Error]] : + if response.status_code == 200: + response_200 = Onboarding.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[Onboarding, Error]]]: +) -> Response[Optional[Union[Onboarding, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -52,10 +56,13 @@ def _build_response( def sync_detailed( + *, client: Client, -) -> Response[Optional[Union[Onboarding, Error]]]: + +) -> Response[Optional[Union[Onboarding, Error]]]: kwargs = _get_kwargs( + client=client, ) @@ -68,21 +75,27 @@ def sync_detailed( def sync( + *, client: Client, -) -> Optional[Union[Onboarding, Error]]: + +) -> Optional[Union[Onboarding, Error]] : """Checks key part of their api usage to determine their onboarding progress""" # noqa: E501 return sync_detailed( + client=client, ).parsed async def asyncio_detailed( + *, client: Client, -) -> Response[Optional[Union[Onboarding, Error]]]: + +) -> Response[Optional[Union[Onboarding, Error]]]: kwargs = _get_kwargs( + client=client, ) @@ -93,13 +106,16 @@ async def asyncio_detailed( async def asyncio( + *, client: Client, -) -> Optional[Union[Onboarding, Error]]: + +) -> Optional[Union[Onboarding, Error]] : """Checks key part of their api usage to determine their onboarding progress""" # noqa: E501 return ( await asyncio_detailed( + client=client, ) ).parsed diff --git a/kittycad/api/users/get_user_self.py b/kittycad/api/users/get_user_self.py index b7c58c9cf..02c730e94 100644 --- a/kittycad/api/users/get_user_self.py +++ b/kittycad/api/users/get_user_self.py @@ -9,12 +9,14 @@ from ...types import Response def _get_kwargs( + *, client: Client, + ) -> Dict[str, Any]: - url = "{}/user".format( - client.base_url, - ) # noqa: E501 + url = "{}/user".format(client.base_url, ) # noqa: E501 + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -24,25 +26,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -def _parse_response(*, response: httpx.Response) -> Optional[Union[User, Error]]: - if response.status_code == 200: - response_200 = User.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 _parse_response(*, response: httpx.Response) -> Optional[Union[User, Error]] : + if response.status_code == 200: + response_200 = User.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[User, Error]]]: +) -> Response[Optional[Union[User, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -52,10 +56,13 @@ def _build_response( def sync_detailed( + *, client: Client, -) -> Response[Optional[Union[User, Error]]]: + +) -> Response[Optional[Union[User, Error]]]: kwargs = _get_kwargs( + client=client, ) @@ -68,22 +75,28 @@ def sync_detailed( def sync( + *, client: Client, -) -> Optional[Union[User, Error]]: + +) -> Optional[Union[User, Error]] : """Get the user information for the authenticated user. - Alternatively, you can also use the `/users/me` endpoint.""" # noqa: E501 +Alternatively, you can also use the `/users/me` endpoint.""" # noqa: E501 return sync_detailed( + client=client, ).parsed async def asyncio_detailed( + *, client: Client, -) -> Response[Optional[Union[User, Error]]]: + +) -> Response[Optional[Union[User, Error]]]: kwargs = _get_kwargs( + client=client, ) @@ -94,14 +107,17 @@ async def asyncio_detailed( async def asyncio( + *, client: Client, -) -> Optional[Union[User, Error]]: + +) -> Optional[Union[User, Error]] : """Get the user information for the authenticated user. - Alternatively, you can also use the `/users/me` endpoint.""" # noqa: E501 +Alternatively, you can also use the `/users/me` endpoint.""" # noqa: E501 return ( await asyncio_detailed( + client=client, ) ).parsed diff --git a/kittycad/api/users/get_user_self_extended.py b/kittycad/api/users/get_user_self_extended.py index 5d663247b..949d1fd8e 100644 --- a/kittycad/api/users/get_user_self_extended.py +++ b/kittycad/api/users/get_user_self_extended.py @@ -9,12 +9,14 @@ from ...types import Response def _get_kwargs( + *, client: Client, + ) -> Dict[str, Any]: - url = "{}/user/extended".format( - client.base_url, - ) # noqa: E501 + url = "{}/user/extended".format(client.base_url, ) # noqa: E501 + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -24,27 +26,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -def _parse_response( - *, response: httpx.Response -) -> Optional[Union[ExtendedUser, Error]]: - if response.status_code == 200: - response_200 = ExtendedUser.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 _parse_response(*, response: httpx.Response) -> Optional[Union[ExtendedUser, Error]] : + if response.status_code == 200: + response_200 = ExtendedUser.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[ExtendedUser, Error]]]: +) -> Response[Optional[Union[ExtendedUser, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -54,10 +56,13 @@ def _build_response( def sync_detailed( + *, client: Client, -) -> Response[Optional[Union[ExtendedUser, Error]]]: + +) -> Response[Optional[Union[ExtendedUser, Error]]]: kwargs = _get_kwargs( + client=client, ) @@ -70,22 +75,28 @@ def sync_detailed( def sync( + *, client: Client, -) -> Optional[Union[ExtendedUser, Error]]: + +) -> Optional[Union[ExtendedUser, Error]] : """Get the user information for the authenticated user. - Alternatively, you can also use the `/users-extended/me` endpoint.""" # noqa: E501 +Alternatively, you can also use the `/users-extended/me` endpoint.""" # noqa: E501 return sync_detailed( + client=client, ).parsed async def asyncio_detailed( + *, client: Client, -) -> Response[Optional[Union[ExtendedUser, Error]]]: + +) -> Response[Optional[Union[ExtendedUser, Error]]]: kwargs = _get_kwargs( + client=client, ) @@ -96,14 +107,17 @@ async def asyncio_detailed( async def asyncio( + *, client: Client, -) -> Optional[Union[ExtendedUser, Error]]: + +) -> Optional[Union[ExtendedUser, Error]] : """Get the user information for the authenticated user. - Alternatively, you can also use the `/users-extended/me` endpoint.""" # noqa: E501 +Alternatively, you can also use the `/users-extended/me` endpoint.""" # noqa: E501 return ( await asyncio_detailed( + client=client, ) ).parsed diff --git a/kittycad/api/users/list_users.py b/kittycad/api/users/list_users.py index 4da2aab96..9180e56a5 100644 --- a/kittycad/api/users/list_users.py +++ b/kittycad/api/users/list_users.py @@ -10,33 +10,56 @@ 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 = "{}/users".format( - client.base_url, - ) # noqa: E501 - + url = "{}/users".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() @@ -46,27 +69,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -def _parse_response( - *, response: httpx.Response -) -> Optional[Union[UserResultsPage, Error]]: - if response.status_code == 200: - response_200 = UserResultsPage.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 _parse_response(*, response: httpx.Response) -> Optional[Union[UserResultsPage, Error]] : + if response.status_code == 200: + response_200 = UserResultsPage.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[UserResultsPage, Error]]]: +) -> Response[Optional[Union[UserResultsPage, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -76,16 +99,37 @@ def _build_response( def sync_detailed( + + + + + + sort_by: CreatedAtSortMode, + + *, client: Client, + + limit: Optional[int] = None, + + + page_token: Optional[str] = None, -) -> Response[Optional[Union[UserResultsPage, Error]]]: + + + + +) -> Response[Optional[Union[UserResultsPage, Error]]]: kwargs = _get_kwargs( + limit=limit, + page_token=page_token, + sort_by=sort_by, + client=client, ) @@ -98,33 +142,75 @@ def sync_detailed( def sync( + + + + + + sort_by: CreatedAtSortMode, + + *, client: Client, + + limit: Optional[int] = None, + + + page_token: Optional[str] = None, -) -> Optional[Union[UserResultsPage, Error]]: + + + + +) -> Optional[Union[UserResultsPage, Error]] : """This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users 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[UserResultsPage, Error]]]: + + + + +) -> Response[Optional[Union[UserResultsPage, Error]]]: kwargs = _get_kwargs( + limit=limit, + page_token=page_token, + sort_by=sort_by, + client=client, ) @@ -135,19 +221,40 @@ async def asyncio_detailed( async def asyncio( + + + + + + sort_by: CreatedAtSortMode, + + *, client: Client, + + limit: Optional[int] = None, + + + page_token: Optional[str] = None, -) -> Optional[Union[UserResultsPage, Error]]: + + + + +) -> Optional[Union[UserResultsPage, Error]] : """This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.""" # noqa: E501 return ( await asyncio_detailed( + limit=limit, + page_token=page_token, + sort_by=sort_by, + client=client, ) ).parsed diff --git a/kittycad/api/users/list_users_extended.py b/kittycad/api/users/list_users_extended.py index 05043587e..490429ede 100644 --- a/kittycad/api/users/list_users_extended.py +++ b/kittycad/api/users/list_users_extended.py @@ -10,33 +10,56 @@ 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 = "{}/users-extended".format( - client.base_url, - ) # noqa: E501 - + url = "{}/users-extended".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() @@ -46,27 +69,27 @@ def _get_kwargs( "headers": headers, "cookies": cookies, "timeout": client.get_timeout(), + } -def _parse_response( - *, response: httpx.Response -) -> Optional[Union[ExtendedUserResultsPage, Error]]: - if response.status_code == 200: - response_200 = ExtendedUserResultsPage.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 _parse_response(*, response: httpx.Response) -> Optional[Union[ExtendedUserResultsPage, Error]] : + if response.status_code == 200: + response_200 = ExtendedUserResultsPage.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[ExtendedUserResultsPage, Error]]]: +) -> Response[Optional[Union[ExtendedUserResultsPage, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -76,16 +99,37 @@ def _build_response( def sync_detailed( + + + + + + sort_by: CreatedAtSortMode, + + *, client: Client, + + limit: Optional[int] = None, + + + page_token: Optional[str] = None, -) -> Response[Optional[Union[ExtendedUserResultsPage, Error]]]: + + + + +) -> Response[Optional[Union[ExtendedUserResultsPage, Error]]]: kwargs = _get_kwargs( + limit=limit, + page_token=page_token, + sort_by=sort_by, + client=client, ) @@ -98,33 +142,75 @@ def sync_detailed( def sync( + + + + + + sort_by: CreatedAtSortMode, + + *, client: Client, + + limit: Optional[int] = None, + + + page_token: Optional[str] = None, -) -> Optional[Union[ExtendedUserResultsPage, Error]]: + + + + +) -> Optional[Union[ExtendedUserResultsPage, Error]] : """This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users 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[ExtendedUserResultsPage, Error]]]: + + + + +) -> Response[Optional[Union[ExtendedUserResultsPage, Error]]]: kwargs = _get_kwargs( + limit=limit, + page_token=page_token, + sort_by=sort_by, + client=client, ) @@ -135,19 +221,40 @@ async def asyncio_detailed( async def asyncio( + + + + + + sort_by: CreatedAtSortMode, + + *, client: Client, + + limit: Optional[int] = None, + + + page_token: Optional[str] = None, -) -> Optional[Union[ExtendedUserResultsPage, Error]]: + + + + +) -> Optional[Union[ExtendedUserResultsPage, Error]] : """This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.""" # noqa: E501 return ( await asyncio_detailed( + limit=limit, + page_token=page_token, + sort_by=sort_by, + client=client, ) ).parsed diff --git a/kittycad/api/users/update_user_self.py b/kittycad/api/users/update_user_self.py index 8bf2ef538..4e556ee28 100644 --- a/kittycad/api/users/update_user_self.py +++ b/kittycad/api/users/update_user_self.py @@ -10,13 +10,22 @@ from ...types import Response def _get_kwargs( + + body: UpdateUser, + + *, client: Client, + + + ) -> Dict[str, Any]: - url = "{}/user".format( - client.base_url, - ) # noqa: E501 + url = "{}/user".format(client.base_url, ) # noqa: E501 + + + + headers: Dict[str, Any] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -30,22 +39,23 @@ def _get_kwargs( } -def _parse_response(*, response: httpx.Response) -> Optional[Union[User, Error]]: - if response.status_code == 200: - response_200 = User.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 _parse_response(*, response: httpx.Response) -> Optional[Union[User, Error]] : + if response.status_code == 200: + response_200 = User.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[User, Error]]]: +) -> Response[Optional[Union[User, Error]]]: return Response( status_code=response.status_code, content=response.content, @@ -55,12 +65,21 @@ def _build_response( def sync_detailed( + + body: UpdateUser, + + *, client: Client, -) -> Response[Optional[Union[User, Error]]]: + + + +) -> Response[Optional[Union[User, Error]]]: kwargs = _get_kwargs( + body=body, + client=client, ) @@ -73,25 +92,43 @@ def sync_detailed( def sync( + + body: UpdateUser, + + *, client: Client, -) -> Optional[Union[User, Error]]: + + + +) -> Optional[Union[User, Error]] : """This endpoint requires authentication by any KittyCAD user. It updates information about the authenticated user.""" # noqa: E501 return sync_detailed( + body=body, + client=client, ).parsed async def asyncio_detailed( + + body: UpdateUser, + + *, client: Client, -) -> Response[Optional[Union[User, Error]]]: + + + +) -> Response[Optional[Union[User, Error]]]: kwargs = _get_kwargs( + body=body, + client=client, ) @@ -102,15 +139,24 @@ async def asyncio_detailed( async def asyncio( + + body: UpdateUser, + + *, client: Client, -) -> Optional[Union[User, Error]]: + + + +) -> Optional[Union[User, Error]] : """This endpoint requires authentication by any KittyCAD user. It updates information about the authenticated user.""" # noqa: E501 return ( await asyncio_detailed( + body=body, + client=client, ) ).parsed diff --git a/kittycad/models/account_provider.py b/kittycad/models/account_provider.py index fdc3c081b..6221c2f1a 100644 --- a/kittycad/models/account_provider.py +++ b/kittycad/models/account_provider.py @@ -2,12 +2,11 @@ from enum import Enum class AccountProvider(str, Enum): - """An account provider.""" # noqa: E501 + """ An account provider. """ # noqa: E501 + """# The Google account provider. """ # noqa: E501 + GOOGLE = 'google' + """# The GitHub account provider. """ # noqa: E501 + GITHUB = 'github' - """# The Google account provider. """ # noqa: E501 - GOOGLE = "google" - """# The GitHub account provider. """ # noqa: E501 - GITHUB = "github" - - def __str__(self) -> str: - return str(self.value) + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/ai_plugin_api.py b/kittycad/models/ai_plugin_api.py index e5d2c2e0e..ddd3babb0 100644 --- a/kittycad/models/ai_plugin_api.py +++ b/kittycad/models/ai_plugin_api.py @@ -7,70 +7,69 @@ from ..types import UNSET, Unset SB = TypeVar("SB", bound="AiPluginApi") - @attr.s(auto_attribs=True) class AiPluginApi: - """AI plugin api information.""" # noqa: E501 + """ AI plugin api information. """ # noqa: E501 + is_user_authenticated: Union[Unset, bool] = False + type: Union[Unset, AiPluginApiType] = UNSET + url: Union[Unset, str] = UNSET - is_user_authenticated: Union[Unset, bool] = False - type: Union[Unset, AiPluginApiType] = UNSET - url: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + is_user_authenticated = self.is_user_authenticated + if not isinstance(self.type, Unset): + type = self.type + url = self.url - def to_dict(self) -> Dict[str, Any]: - is_user_authenticated = self.is_user_authenticated - if not isinstance(self.type, Unset): - type = self.type - url = self.url + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if is_user_authenticated is not UNSET: + field_dict['is_user_authenticated'] = is_user_authenticated + if type is not UNSET: + field_dict['type'] = type + if url is not UNSET: + field_dict['url'] = url - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if is_user_authenticated is not UNSET: - field_dict["is_user_authenticated"] = is_user_authenticated - if type is not UNSET: - field_dict["type"] = type - if url is not UNSET: - field_dict["url"] = url + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[SB], src_dict: Dict[str, Any]) -> SB: + d = src_dict.copy() + is_user_authenticated = d.pop("is_user_authenticated", UNSET) - @classmethod - def from_dict(cls: Type[SB], src_dict: Dict[str, Any]) -> SB: - d = src_dict.copy() - is_user_authenticated = d.pop("is_user_authenticated", UNSET) + _type = d.pop("type", UNSET) + type: Union[Unset, AiPluginApiType] + if isinstance(_type, Unset): + type = UNSET + else: + type = _type # type: ignore[arg-type] - _type = d.pop("type", UNSET) - type: Union[Unset, AiPluginApiType] - if isinstance(_type, Unset): - type = UNSET - else: - type = _type # type: ignore[arg-type] + url = d.pop("url", UNSET) - url = d.pop("url", UNSET) - ai_plugin_api = cls( - is_user_authenticated=is_user_authenticated, - type=type, - url=url, - ) + ai_plugin_api = cls( + is_user_authenticated= is_user_authenticated, + type= type, + url= url, + ) - ai_plugin_api.additional_properties = d - return ai_plugin_api + ai_plugin_api.additional_properties = d + return ai_plugin_api - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/ai_plugin_api_type.py b/kittycad/models/ai_plugin_api_type.py index c058bfcf2..691d57db5 100644 --- a/kittycad/models/ai_plugin_api_type.py +++ b/kittycad/models/ai_plugin_api_type.py @@ -2,10 +2,9 @@ from enum import Enum class AiPluginApiType(str, Enum): - """AI plugin api type.""" # noqa: E501 + """ AI plugin api type. """ # noqa: E501 + """# An OpenAPI specification. """ # noqa: E501 + OPENAPI = 'openapi' - """# An OpenAPI specification. """ # noqa: E501 - OPENAPI = "openapi" - - def __str__(self) -> str: - return str(self.value) + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/ai_plugin_auth.py b/kittycad/models/ai_plugin_auth.py index 022281367..41ebc6a3e 100644 --- a/kittycad/models/ai_plugin_auth.py +++ b/kittycad/models/ai_plugin_auth.py @@ -8,69 +8,68 @@ from ..types import UNSET, Unset NP = TypeVar("NP", bound="AiPluginAuth") - @attr.s(auto_attribs=True) class AiPluginAuth: - """AI plugin auth information.""" # noqa: E501 + """ AI plugin auth information. """ # noqa: E501 + authorization_type: Union[Unset, AiPluginHttpAuthType] = UNSET + type: Union[Unset, AiPluginAuthType] = UNSET - authorization_type: Union[Unset, AiPluginHttpAuthType] = UNSET - type: Union[Unset, AiPluginAuthType] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.authorization_type, Unset): + authorization_type = self.authorization_type + if not isinstance(self.type, Unset): + type = self.type - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.authorization_type, Unset): - authorization_type = self.authorization_type - if not isinstance(self.type, Unset): - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if authorization_type is not UNSET: + field_dict['authorization_type'] = authorization_type + if type is not UNSET: + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if authorization_type is not UNSET: - field_dict["authorization_type"] = authorization_type - if type is not UNSET: - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[NP], src_dict: Dict[str, Any]) -> NP: + d = src_dict.copy() + _authorization_type = d.pop("authorization_type", UNSET) + authorization_type: Union[Unset, AiPluginHttpAuthType] + if isinstance(_authorization_type, Unset): + authorization_type = UNSET + else: + authorization_type = _authorization_type # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[NP], src_dict: Dict[str, Any]) -> NP: - d = src_dict.copy() - _authorization_type = d.pop("authorization_type", UNSET) - authorization_type: Union[Unset, AiPluginHttpAuthType] - if isinstance(_authorization_type, Unset): - authorization_type = UNSET - else: - authorization_type = _authorization_type # type: ignore[arg-type] + _type = d.pop("type", UNSET) + type: Union[Unset, AiPluginAuthType] + if isinstance(_type, Unset): + type = UNSET + else: + type = _type # type: ignore[arg-type] - _type = d.pop("type", UNSET) - type: Union[Unset, AiPluginAuthType] - if isinstance(_type, Unset): - type = UNSET - else: - type = _type # type: ignore[arg-type] - ai_plugin_auth = cls( - authorization_type=authorization_type, - type=type, - ) + ai_plugin_auth = cls( + authorization_type= authorization_type, + type= type, + ) - ai_plugin_auth.additional_properties = d - return ai_plugin_auth + ai_plugin_auth.additional_properties = d + return ai_plugin_auth - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/ai_plugin_auth_type.py b/kittycad/models/ai_plugin_auth_type.py index 72764a86d..3bfa7aa6d 100644 --- a/kittycad/models/ai_plugin_auth_type.py +++ b/kittycad/models/ai_plugin_auth_type.py @@ -2,16 +2,15 @@ from enum import Enum class AiPluginAuthType(str, Enum): - """AI plugin auth type.""" # noqa: E501 + """ AI plugin auth type. """ # noqa: E501 + """# None. """ # noqa: E501 + NONE = 'none' + """# User http. """ # noqa: E501 + USER_HTTP = 'user_http' + """# Service http. """ # noqa: E501 + SERVICE_HTTP = 'service_http' + """# OAuth. """ # noqa: E501 + OAUTH = 'oauth' - """# None. """ # noqa: E501 - NONE = "none" - """# User http. """ # noqa: E501 - USER_HTTP = "user_http" - """# Service http. """ # noqa: E501 - SERVICE_HTTP = "service_http" - """# OAuth. """ # noqa: E501 - OAUTH = "oauth" - - def __str__(self) -> str: - return str(self.value) + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/ai_plugin_http_auth_type.py b/kittycad/models/ai_plugin_http_auth_type.py index 879ce8b0e..911ab36a0 100644 --- a/kittycad/models/ai_plugin_http_auth_type.py +++ b/kittycad/models/ai_plugin_http_auth_type.py @@ -2,12 +2,11 @@ from enum import Enum class AiPluginHttpAuthType(str, Enum): - """AI plugin http auth type.""" # noqa: E501 + """ AI plugin http auth type. """ # noqa: E501 + """# Basic. """ # noqa: E501 + BASIC = 'basic' + """# Bearer. """ # noqa: E501 + BEARER = 'bearer' - """# Basic. """ # noqa: E501 - BASIC = "basic" - """# Bearer. """ # noqa: E501 - BEARER = "bearer" - - def __str__(self) -> str: - return str(self.value) + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/ai_plugin_manifest.py b/kittycad/models/ai_plugin_manifest.py index b59b1ca30..549634a91 100644 --- a/kittycad/models/ai_plugin_manifest.py +++ b/kittycad/models/ai_plugin_manifest.py @@ -8,128 +8,126 @@ from ..types import UNSET, Unset SA = TypeVar("SA", bound="AiPluginManifest") - @attr.s(auto_attribs=True) class AiPluginManifest: - """AI plugin manifest. + """ AI plugin manifest. - This is used for OpenAI's ChatGPT plugins. You can read more about them [here](https://platform.openai.com/docs/plugins/getting-started/plugin-manifest). - """ # noqa: E501 +This is used for OpenAI's ChatGPT plugins. You can read more about them [here](https://platform.openai.com/docs/plugins/getting-started/plugin-manifest). """ # noqa: E501 + api: Union[Unset, AiPluginApi] = UNSET + auth: Union[Unset, AiPluginAuth] = UNSET + contact_email: Union[Unset, str] = UNSET + description_for_human: Union[Unset, str] = UNSET + description_for_model: Union[Unset, str] = UNSET + legal_info_url: Union[Unset, str] = UNSET + logo_url: Union[Unset, str] = UNSET + name_for_human: Union[Unset, str] = UNSET + name_for_model: Union[Unset, str] = UNSET + schema_version: Union[Unset, str] = UNSET - api: Union[Unset, AiPluginApi] = UNSET - auth: Union[Unset, AiPluginAuth] = UNSET - contact_email: Union[Unset, str] = UNSET - description_for_human: Union[Unset, str] = UNSET - description_for_model: Union[Unset, str] = UNSET - legal_info_url: Union[Unset, str] = UNSET - logo_url: Union[Unset, str] = UNSET - name_for_human: Union[Unset, str] = UNSET - name_for_model: Union[Unset, str] = UNSET - schema_version: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.api, Unset): + api = self.api + if not isinstance(self.auth, Unset): + auth = self.auth + contact_email = self.contact_email + description_for_human = self.description_for_human + description_for_model = self.description_for_model + legal_info_url = self.legal_info_url + logo_url = self.logo_url + name_for_human = self.name_for_human + name_for_model = self.name_for_model + schema_version = self.schema_version - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.api, Unset): - api = self.api - if not isinstance(self.auth, Unset): - auth = self.auth - contact_email = self.contact_email - description_for_human = self.description_for_human - description_for_model = self.description_for_model - legal_info_url = self.legal_info_url - logo_url = self.logo_url - name_for_human = self.name_for_human - name_for_model = self.name_for_model - schema_version = self.schema_version + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if api is not UNSET: + field_dict['api'] = api + if auth is not UNSET: + field_dict['auth'] = auth + if contact_email is not UNSET: + field_dict['contact_email'] = contact_email + if description_for_human is not UNSET: + field_dict['description_for_human'] = description_for_human + if description_for_model is not UNSET: + field_dict['description_for_model'] = description_for_model + if legal_info_url is not UNSET: + field_dict['legal_info_url'] = legal_info_url + if logo_url is not UNSET: + field_dict['logo_url'] = logo_url + if name_for_human is not UNSET: + field_dict['name_for_human'] = name_for_human + if name_for_model is not UNSET: + field_dict['name_for_model'] = name_for_model + if schema_version is not UNSET: + field_dict['schema_version'] = schema_version - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if api is not UNSET: - field_dict["api"] = api - if auth is not UNSET: - field_dict["auth"] = auth - if contact_email is not UNSET: - field_dict["contact_email"] = contact_email - if description_for_human is not UNSET: - field_dict["description_for_human"] = description_for_human - if description_for_model is not UNSET: - field_dict["description_for_model"] = description_for_model - if legal_info_url is not UNSET: - field_dict["legal_info_url"] = legal_info_url - if logo_url is not UNSET: - field_dict["logo_url"] = logo_url - if name_for_human is not UNSET: - field_dict["name_for_human"] = name_for_human - if name_for_model is not UNSET: - field_dict["name_for_model"] = name_for_model - if schema_version is not UNSET: - field_dict["schema_version"] = schema_version + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[SA], src_dict: Dict[str, Any]) -> SA: + d = src_dict.copy() + _api = d.pop("api", UNSET) + api: Union[Unset, AiPluginApi] + if isinstance(_api, Unset): + api = UNSET + else: + api = _api # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[SA], src_dict: Dict[str, Any]) -> SA: - d = src_dict.copy() - _api = d.pop("api", UNSET) - api: Union[Unset, AiPluginApi] - if isinstance(_api, Unset): - api = UNSET - else: - api = _api # type: ignore[arg-type] + _auth = d.pop("auth", UNSET) + auth: Union[Unset, AiPluginAuth] + if isinstance(_auth, Unset): + auth = UNSET + else: + auth = _auth # type: ignore[arg-type] - _auth = d.pop("auth", UNSET) - auth: Union[Unset, AiPluginAuth] - if isinstance(_auth, Unset): - auth = UNSET - else: - auth = _auth # type: ignore[arg-type] + contact_email = d.pop("contact_email", UNSET) - contact_email = d.pop("contact_email", UNSET) + description_for_human = d.pop("description_for_human", UNSET) - description_for_human = d.pop("description_for_human", UNSET) + description_for_model = d.pop("description_for_model", UNSET) - description_for_model = d.pop("description_for_model", UNSET) + legal_info_url = d.pop("legal_info_url", UNSET) - legal_info_url = d.pop("legal_info_url", UNSET) + logo_url = d.pop("logo_url", UNSET) - logo_url = d.pop("logo_url", UNSET) + name_for_human = d.pop("name_for_human", UNSET) - name_for_human = d.pop("name_for_human", UNSET) + name_for_model = d.pop("name_for_model", UNSET) - name_for_model = d.pop("name_for_model", UNSET) + schema_version = d.pop("schema_version", UNSET) - schema_version = d.pop("schema_version", UNSET) - ai_plugin_manifest = cls( - api=api, - auth=auth, - contact_email=contact_email, - description_for_human=description_for_human, - description_for_model=description_for_model, - legal_info_url=legal_info_url, - logo_url=logo_url, - name_for_human=name_for_human, - name_for_model=name_for_model, - schema_version=schema_version, - ) + ai_plugin_manifest = cls( + api= api, + auth= auth, + contact_email= contact_email, + description_for_human= description_for_human, + description_for_model= description_for_model, + legal_info_url= legal_info_url, + logo_url= logo_url, + name_for_human= name_for_human, + name_for_model= name_for_model, + schema_version= schema_version, + ) - ai_plugin_manifest.additional_properties = d - return ai_plugin_manifest + ai_plugin_manifest.additional_properties = d + return ai_plugin_manifest - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/angle.py b/kittycad/models/angle.py index e331581b6..42543c1e4 100644 --- a/kittycad/models/angle.py +++ b/kittycad/models/angle.py @@ -7,63 +7,62 @@ from ..types import UNSET, Unset GO = TypeVar("GO", bound="Angle") - @attr.s(auto_attribs=True) class Angle: - """An angle, with a specific unit.""" # noqa: E501 + """ An angle, with a specific unit. """ # noqa: E501 + unit: Union[Unset, UnitAngle] = UNSET + value: Union[Unset, float] = UNSET - unit: Union[Unset, UnitAngle] = UNSET - value: Union[Unset, float] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.unit, Unset): + unit = self.unit + value = self.value - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.unit, Unset): - unit = self.unit - value = self.value + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if unit is not UNSET: + field_dict['unit'] = unit + if value is not UNSET: + field_dict['value'] = value - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if unit is not UNSET: - field_dict["unit"] = unit - if value is not UNSET: - field_dict["value"] = value + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[GO], src_dict: Dict[str, Any]) -> GO: + d = src_dict.copy() + _unit = d.pop("unit", UNSET) + unit: Union[Unset, UnitAngle] + if isinstance(_unit, Unset): + unit = UNSET + else: + unit = _unit # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[GO], src_dict: Dict[str, Any]) -> GO: - d = src_dict.copy() - _unit = d.pop("unit", UNSET) - unit: Union[Unset, UnitAngle] - if isinstance(_unit, Unset): - unit = UNSET - else: - unit = _unit # type: ignore[arg-type] + value = d.pop("value", UNSET) - value = d.pop("value", UNSET) - angle = cls( - unit=unit, - value=value, - ) + angle = cls( + unit= unit, + value= value, + ) - angle.additional_properties = d - return angle + angle.additional_properties = d + return angle - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/annotation_line_end.py b/kittycad/models/annotation_line_end.py index 85eedc629..8ea0fdde3 100644 --- a/kittycad/models/annotation_line_end.py +++ b/kittycad/models/annotation_line_end.py @@ -2,10 +2,9 @@ from enum import Enum class AnnotationLineEnd(str, Enum): - """Annotation line end type""" # noqa: E501 + """ Annotation line end type """ # noqa: E501 + NONE = 'none' + ARROW = 'arrow' - NONE = "none" - ARROW = "arrow" - - def __str__(self) -> str: - return str(self.value) + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/annotation_line_end_options.py b/kittycad/models/annotation_line_end_options.py index b57db268c..f20c87507 100644 --- a/kittycad/models/annotation_line_end_options.py +++ b/kittycad/models/annotation_line_end_options.py @@ -7,69 +7,68 @@ from ..types import UNSET, Unset PI = TypeVar("PI", bound="AnnotationLineEndOptions") - @attr.s(auto_attribs=True) class AnnotationLineEndOptions: - """Options for annotation text""" # noqa: E501 + """ Options for annotation text """ # noqa: E501 + end: Union[Unset, AnnotationLineEnd] = UNSET + start: Union[Unset, AnnotationLineEnd] = UNSET - end: Union[Unset, AnnotationLineEnd] = UNSET - start: Union[Unset, AnnotationLineEnd] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.end, Unset): + end = self.end + if not isinstance(self.start, Unset): + start = self.start - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.end, Unset): - end = self.end - if not isinstance(self.start, Unset): - start = self.start + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if end is not UNSET: + field_dict['end'] = end + if start is not UNSET: + field_dict['start'] = start - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if end is not UNSET: - field_dict["end"] = end - if start is not UNSET: - field_dict["start"] = start + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[PI], src_dict: Dict[str, Any]) -> PI: + d = src_dict.copy() + _end = d.pop("end", UNSET) + end: Union[Unset, AnnotationLineEnd] + if isinstance(_end, Unset): + end = UNSET + else: + end = _end # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[PI], src_dict: Dict[str, Any]) -> PI: - d = src_dict.copy() - _end = d.pop("end", UNSET) - end: Union[Unset, AnnotationLineEnd] - if isinstance(_end, Unset): - end = UNSET - else: - end = _end # type: ignore[arg-type] + _start = d.pop("start", UNSET) + start: Union[Unset, AnnotationLineEnd] + if isinstance(_start, Unset): + start = UNSET + else: + start = _start # type: ignore[arg-type] - _start = d.pop("start", UNSET) - start: Union[Unset, AnnotationLineEnd] - if isinstance(_start, Unset): - start = UNSET - else: - start = _start # type: ignore[arg-type] - annotation_line_end_options = cls( - end=end, - start=start, - ) + annotation_line_end_options = cls( + end= end, + start= start, + ) - annotation_line_end_options.additional_properties = d - return annotation_line_end_options + annotation_line_end_options.additional_properties = d + return annotation_line_end_options - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/annotation_options.py b/kittycad/models/annotation_options.py index 59353e975..5df0bb3aa 100644 --- a/kittycad/models/annotation_options.py +++ b/kittycad/models/annotation_options.py @@ -10,102 +10,101 @@ from ..types import UNSET, Unset UZ = TypeVar("UZ", bound="AnnotationOptions") - @attr.s(auto_attribs=True) class AnnotationOptions: - """Options for annotations""" # noqa: E501 + """ Options for annotations """ # noqa: E501 + color: Union[Unset, Color] = UNSET + line_ends: Union[Unset, AnnotationLineEndOptions] = UNSET + line_width: Union[Unset, float] = UNSET + position: Union[Unset, Point3d] = UNSET + text: Union[Unset, AnnotationTextOptions] = UNSET - color: Union[Unset, Color] = UNSET - line_ends: Union[Unset, AnnotationLineEndOptions] = UNSET - line_width: Union[Unset, float] = UNSET - position: Union[Unset, Point3d] = UNSET - text: Union[Unset, AnnotationTextOptions] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.color, Unset): + color = self.color + if not isinstance(self.line_ends, Unset): + line_ends = self.line_ends + line_width = self.line_width + if not isinstance(self.position, Unset): + position = self.position + if not isinstance(self.text, Unset): + text = self.text - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.color, Unset): - color = self.color - if not isinstance(self.line_ends, Unset): - line_ends = self.line_ends - line_width = self.line_width - if not isinstance(self.position, Unset): - position = self.position - if not isinstance(self.text, Unset): - text = self.text + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if color is not UNSET: + field_dict['color'] = color + if line_ends is not UNSET: + field_dict['line_ends'] = line_ends + if line_width is not UNSET: + field_dict['line_width'] = line_width + if position is not UNSET: + field_dict['position'] = position + if text is not UNSET: + field_dict['text'] = text - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if color is not UNSET: - field_dict["color"] = color - if line_ends is not UNSET: - field_dict["line_ends"] = line_ends - if line_width is not UNSET: - field_dict["line_width"] = line_width - if position is not UNSET: - field_dict["position"] = position - if text is not UNSET: - field_dict["text"] = text + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[UZ], src_dict: Dict[str, Any]) -> UZ: + d = src_dict.copy() + _color = d.pop("color", UNSET) + color: Union[Unset, Color] + if isinstance(_color, Unset): + color = UNSET + else: + color = _color # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[UZ], src_dict: Dict[str, Any]) -> UZ: - d = src_dict.copy() - _color = d.pop("color", UNSET) - color: Union[Unset, Color] - if isinstance(_color, Unset): - color = UNSET - else: - color = _color # type: ignore[arg-type] + _line_ends = d.pop("line_ends", UNSET) + line_ends: Union[Unset, AnnotationLineEndOptions] + if isinstance(_line_ends, Unset): + line_ends = UNSET + else: + line_ends = _line_ends # type: ignore[arg-type] - _line_ends = d.pop("line_ends", UNSET) - line_ends: Union[Unset, AnnotationLineEndOptions] - if isinstance(_line_ends, Unset): - line_ends = UNSET - else: - line_ends = _line_ends # type: ignore[arg-type] + line_width = d.pop("line_width", UNSET) - line_width = d.pop("line_width", UNSET) + _position = d.pop("position", UNSET) + position: Union[Unset, Point3d] + if isinstance(_position, Unset): + position = UNSET + else: + position = _position # type: ignore[arg-type] - _position = d.pop("position", UNSET) - position: Union[Unset, Point3d] - if isinstance(_position, Unset): - position = UNSET - else: - position = _position # type: ignore[arg-type] + _text = d.pop("text", UNSET) + text: Union[Unset, AnnotationTextOptions] + if isinstance(_text, Unset): + text = UNSET + else: + text = _text # type: ignore[arg-type] - _text = d.pop("text", UNSET) - text: Union[Unset, AnnotationTextOptions] - if isinstance(_text, Unset): - text = UNSET - else: - text = _text # type: ignore[arg-type] - annotation_options = cls( - color=color, - line_ends=line_ends, - line_width=line_width, - position=position, - text=text, - ) + annotation_options = cls( + color= color, + line_ends= line_ends, + line_width= line_width, + position= position, + text= text, + ) - annotation_options.additional_properties = d - return annotation_options + annotation_options.additional_properties = d + return annotation_options - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/annotation_text_alignment_x.py b/kittycad/models/annotation_text_alignment_x.py index 1b0b42901..c667bd469 100644 --- a/kittycad/models/annotation_text_alignment_x.py +++ b/kittycad/models/annotation_text_alignment_x.py @@ -2,11 +2,10 @@ from enum import Enum class AnnotationTextAlignmentX(str, Enum): - """Horizontal Text aligment""" # noqa: E501 + """ Horizontal Text aligment """ # noqa: E501 + LEFT = 'left' + CENTER = 'center' + RIGHT = 'right' - LEFT = "left" - CENTER = "center" - RIGHT = "right" - - def __str__(self) -> str: - return str(self.value) + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/annotation_text_alignment_y.py b/kittycad/models/annotation_text_alignment_y.py index 3fc4842ca..fa04e8340 100644 --- a/kittycad/models/annotation_text_alignment_y.py +++ b/kittycad/models/annotation_text_alignment_y.py @@ -2,11 +2,10 @@ from enum import Enum class AnnotationTextAlignmentY(str, Enum): - """Vertical Text aligment""" # noqa: E501 + """ Vertical Text aligment """ # noqa: E501 + BOTTOM = 'bottom' + CENTER = 'center' + TOP = 'top' - BOTTOM = "bottom" - CENTER = "center" - TOP = "top" - - def __str__(self) -> str: - return str(self.value) + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/annotation_text_options.py b/kittycad/models/annotation_text_options.py index 3c7579251..f8f98588c 100644 --- a/kittycad/models/annotation_text_options.py +++ b/kittycad/models/annotation_text_options.py @@ -8,83 +8,82 @@ from ..types import UNSET, Unset FB = TypeVar("FB", bound="AnnotationTextOptions") - @attr.s(auto_attribs=True) class AnnotationTextOptions: - """Options for annotation text""" # noqa: E501 + """ Options for annotation text """ # noqa: E501 + point_size: Union[Unset, int] = UNSET + text: Union[Unset, str] = UNSET + x: Union[Unset, AnnotationTextAlignmentX] = UNSET + y: Union[Unset, AnnotationTextAlignmentY] = UNSET - point_size: Union[Unset, int] = UNSET - text: Union[Unset, str] = UNSET - x: Union[Unset, AnnotationTextAlignmentX] = UNSET - y: Union[Unset, AnnotationTextAlignmentY] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + point_size = self.point_size + text = self.text + if not isinstance(self.x, Unset): + x = self.x + if not isinstance(self.y, Unset): + y = self.y - def to_dict(self) -> Dict[str, Any]: - point_size = self.point_size - text = self.text - if not isinstance(self.x, Unset): - x = self.x - if not isinstance(self.y, Unset): - y = self.y + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if point_size is not UNSET: + field_dict['point_size'] = point_size + if text is not UNSET: + field_dict['text'] = text + if x is not UNSET: + field_dict['x'] = x + if y is not UNSET: + field_dict['y'] = y - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if point_size is not UNSET: - field_dict["point_size"] = point_size - if text is not UNSET: - field_dict["text"] = text - if x is not UNSET: - field_dict["x"] = x - if y is not UNSET: - field_dict["y"] = y + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[FB], src_dict: Dict[str, Any]) -> FB: + d = src_dict.copy() + point_size = d.pop("point_size", UNSET) - @classmethod - def from_dict(cls: Type[FB], src_dict: Dict[str, Any]) -> FB: - d = src_dict.copy() - point_size = d.pop("point_size", UNSET) + text = d.pop("text", UNSET) - text = d.pop("text", UNSET) + _x = d.pop("x", UNSET) + x: Union[Unset, AnnotationTextAlignmentX] + if isinstance(_x, Unset): + x = UNSET + else: + x = _x # type: ignore[arg-type] - _x = d.pop("x", UNSET) - x: Union[Unset, AnnotationTextAlignmentX] - if isinstance(_x, Unset): - x = UNSET - else: - x = _x # type: ignore[arg-type] + _y = d.pop("y", UNSET) + y: Union[Unset, AnnotationTextAlignmentY] + if isinstance(_y, Unset): + y = UNSET + else: + y = _y # type: ignore[arg-type] - _y = d.pop("y", UNSET) - y: Union[Unset, AnnotationTextAlignmentY] - if isinstance(_y, Unset): - y = UNSET - else: - y = _y # type: ignore[arg-type] - annotation_text_options = cls( - point_size=point_size, - text=text, - x=x, - y=y, - ) + annotation_text_options = cls( + point_size= point_size, + text= text, + x= x, + y= y, + ) - annotation_text_options.additional_properties = d - return annotation_text_options + annotation_text_options.additional_properties = d + return annotation_text_options - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/annotation_type.py b/kittycad/models/annotation_type.py index 1fb492929..4fe3895f0 100644 --- a/kittycad/models/annotation_type.py +++ b/kittycad/models/annotation_type.py @@ -2,12 +2,11 @@ from enum import Enum class AnnotationType(str, Enum): - """The type of annotation""" # noqa: E501 + """ The type of annotation """ # noqa: E501 + """# 2D annotation type (screen or planar space) """ # noqa: E501 + T2D = 't2d' + """# 3D annotation type """ # noqa: E501 + T3D = 't3d' - """# 2D annotation type (screen or planar space) """ # noqa: E501 - T2D = "t2d" - """# 3D annotation type """ # noqa: E501 - T3D = "t3d" - - def __str__(self) -> str: - return str(self.value) + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/api_call_query_group.py b/kittycad/models/api_call_query_group.py index 200595dc1..4ee5c2b16 100644 --- a/kittycad/models/api_call_query_group.py +++ b/kittycad/models/api_call_query_group.py @@ -6,57 +6,56 @@ from ..types import UNSET, Unset QP = TypeVar("QP", bound="ApiCallQueryGroup") - @attr.s(auto_attribs=True) class ApiCallQueryGroup: - """A response for a query on the API call table that is grouped by something.""" # noqa: E501 + """ A response for a query on the API call table that is grouped by something. """ # noqa: E501 + count: Union[Unset, int] = UNSET + query: Union[Unset, str] = UNSET - count: Union[Unset, int] = UNSET - query: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + count = self.count + query = self.query - def to_dict(self) -> Dict[str, Any]: - count = self.count - query = self.query + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if count is not UNSET: + field_dict['count'] = count + if query is not UNSET: + field_dict['query'] = query - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if count is not UNSET: - field_dict["count"] = count - if query is not UNSET: - field_dict["query"] = query + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[QP], src_dict: Dict[str, Any]) -> QP: + d = src_dict.copy() + count = d.pop("count", UNSET) - @classmethod - def from_dict(cls: Type[QP], src_dict: Dict[str, Any]) -> QP: - d = src_dict.copy() - count = d.pop("count", UNSET) + query = d.pop("query", UNSET) - query = d.pop("query", UNSET) - api_call_query_group = cls( - count=count, - query=query, - ) + api_call_query_group = cls( + count= count, + query= query, + ) - api_call_query_group.additional_properties = d - return api_call_query_group + api_call_query_group.additional_properties = d + return api_call_query_group - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/api_call_query_group_by.py b/kittycad/models/api_call_query_group_by.py index c5024cb81..d00635c5b 100644 --- a/kittycad/models/api_call_query_group_by.py +++ b/kittycad/models/api_call_query_group_by.py @@ -2,20 +2,19 @@ from enum import Enum class ApiCallQueryGroupBy(str, Enum): - """The field of an API call to group by.""" # noqa: E501 + """ The field of an API call to group by. """ # noqa: E501 + """# The email of the user that requested the API call. """ # noqa: E501 + EMAIL = 'email' + """# The HTTP method of the API call. """ # noqa: E501 + METHOD = 'method' + """# The endpoint of the API call. """ # noqa: E501 + ENDPOINT = 'endpoint' + """# The user ID of the user that requested the API call. """ # noqa: E501 + USER_ID = 'user_id' + """# The origin of the API call. This is parsed from the `Origin` header. """ # noqa: E501 + ORIGIN = 'origin' + """# The IP address of the user making the API call. """ # noqa: E501 + IP_ADDRESS = 'ip_address' - """# The email of the user that requested the API call. """ # noqa: E501 - EMAIL = "email" - """# The HTTP method of the API call. """ # noqa: E501 - METHOD = "method" - """# The endpoint of the API call. """ # noqa: E501 - ENDPOINT = "endpoint" - """# The user ID of the user that requested the API call. """ # noqa: E501 - USER_ID = "user_id" - """# The origin of the API call. This is parsed from the `Origin` header. """ # noqa: E501 - ORIGIN = "origin" - """# The IP address of the user making the API call. """ # noqa: E501 - IP_ADDRESS = "ip_address" - - def __str__(self) -> str: - return str(self.value) + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/api_call_status.py b/kittycad/models/api_call_status.py index 6c0361196..6b0bd9d1b 100644 --- a/kittycad/models/api_call_status.py +++ b/kittycad/models/api_call_status.py @@ -2,18 +2,17 @@ from enum import Enum class ApiCallStatus(str, Enum): - """The status of an async API call.""" # noqa: E501 + """ The status of an async API call. """ # noqa: E501 + """# The async API call is queued. """ # noqa: E501 + QUEUED = 'queued' + """# The async API call was uploaded to be converted. """ # noqa: E501 + UPLOADED = 'uploaded' + """# The async API call is in progress. """ # noqa: E501 + IN_PROGRESS = 'in_progress' + """# The async API call has completed. """ # noqa: E501 + COMPLETED = 'completed' + """# The async API call has failed. """ # noqa: E501 + FAILED = 'failed' - """# The async API call is queued. """ # noqa: E501 - QUEUED = "queued" - """# The async API call was uploaded to be converted. """ # noqa: E501 - UPLOADED = "uploaded" - """# The async API call is in progress. """ # noqa: E501 - IN_PROGRESS = "in_progress" - """# The async API call has completed. """ # noqa: E501 - COMPLETED = "completed" - """# The async API call has failed. """ # noqa: E501 - FAILED = "failed" - - def __str__(self) -> str: - return str(self.value) + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/api_call_with_price.py b/kittycad/models/api_call_with_price.py index 76ef5acb8..2525f40c1 100644 --- a/kittycad/models/api_call_with_price.py +++ b/kittycad/models/api_call_with_price.py @@ -10,243 +10,242 @@ from ..types import UNSET, Unset KC = TypeVar("KC", bound="ApiCallWithPrice") - @attr.s(auto_attribs=True) class ApiCallWithPrice: - """An API call with the price. + """ An API call with the price. - This is a join of the `ApiCall` and `ApiCallPrice` tables.""" # noqa: E501 +This is a join of the `ApiCall` and `ApiCallPrice` tables. """ # noqa: E501 + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + duration: Union[Unset, int] = UNSET + email: Union[Unset, str] = UNSET + endpoint: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + ip_address: Union[Unset, str] = UNSET + litterbox: Union[Unset, bool] = False + method: Union[Unset, Method] = UNSET + minutes: Union[Unset, int] = UNSET + origin: Union[Unset, str] = UNSET + price: Union[Unset, float] = UNSET + request_body: Union[Unset, str] = UNSET + request_query_params: Union[Unset, str] = UNSET + response_body: Union[Unset, str] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status_code: Union[Unset, int] = UNSET + stripe_invoice_item_id: Union[Unset, str] = UNSET + token: Union[Unset, str] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_agent: Union[Unset, str] = UNSET + user_id: Union[Unset, str] = UNSET - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - duration: Union[Unset, int] = UNSET - email: Union[Unset, str] = UNSET - endpoint: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - ip_address: Union[Unset, str] = UNSET - litterbox: Union[Unset, bool] = False - method: Union[Unset, Method] = UNSET - minutes: Union[Unset, int] = UNSET - origin: Union[Unset, str] = UNSET - price: Union[Unset, float] = UNSET - request_body: Union[Unset, str] = UNSET - request_query_params: Union[Unset, str] = UNSET - response_body: Union[Unset, str] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status_code: Union[Unset, int] = UNSET - stripe_invoice_item_id: Union[Unset, str] = UNSET - token: Union[Unset, str] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - user_agent: Union[Unset, str] = UNSET - user_id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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() + duration = self.duration + email = self.email + endpoint = self.endpoint + id = self.id + ip_address = self.ip_address + litterbox = self.litterbox + if not isinstance(self.method, Unset): + method = self.method + minutes = self.minutes + origin = self.origin + price = self.price + request_body = self.request_body + request_query_params = self.request_query_params + response_body = self.response_body + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + status_code = self.status_code + stripe_invoice_item_id = self.stripe_invoice_item_id + token = self.token + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_agent = self.user_agent + user_id = self.user_id - 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() - duration = self.duration - email = self.email - endpoint = self.endpoint - id = self.id - ip_address = self.ip_address - litterbox = self.litterbox - if not isinstance(self.method, Unset): - method = self.method - minutes = self.minutes - origin = self.origin - price = self.price - request_body = self.request_body - request_query_params = self.request_query_params - response_body = self.response_body - started_at: Union[Unset, str] = UNSET - if not isinstance(self.started_at, Unset): - started_at = self.started_at.isoformat() - status_code = self.status_code - stripe_invoice_item_id = self.stripe_invoice_item_id - token = self.token - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() - user_agent = self.user_agent - 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 duration is not UNSET: + field_dict['duration'] = duration + if email is not UNSET: + field_dict['email'] = email + if endpoint is not UNSET: + field_dict['endpoint'] = endpoint + if id is not UNSET: + field_dict['id'] = id + if ip_address is not UNSET: + field_dict['ip_address'] = ip_address + if litterbox is not UNSET: + field_dict['litterbox'] = litterbox + if method is not UNSET: + field_dict['method'] = method + if minutes is not UNSET: + field_dict['minutes'] = minutes + if origin is not UNSET: + field_dict['origin'] = origin + if price is not UNSET: + field_dict['price'] = price + if request_body is not UNSET: + field_dict['request_body'] = request_body + if request_query_params is not UNSET: + field_dict['request_query_params'] = request_query_params + if response_body is not UNSET: + field_dict['response_body'] = response_body + if started_at is not UNSET: + field_dict['started_at'] = started_at + if status_code is not UNSET: + field_dict['status_code'] = status_code + if stripe_invoice_item_id is not UNSET: + field_dict['stripe_invoice_item_id'] = stripe_invoice_item_id + if token is not UNSET: + field_dict['token'] = token + if updated_at is not UNSET: + field_dict['updated_at'] = updated_at + if user_agent is not UNSET: + field_dict['user_agent'] = user_agent + if user_id is not UNSET: + field_dict['user_id'] = 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 duration is not UNSET: - field_dict["duration"] = duration - if email is not UNSET: - field_dict["email"] = email - if endpoint is not UNSET: - field_dict["endpoint"] = endpoint - if id is not UNSET: - field_dict["id"] = id - if ip_address is not UNSET: - field_dict["ip_address"] = ip_address - if litterbox is not UNSET: - field_dict["litterbox"] = litterbox - if method is not UNSET: - field_dict["method"] = method - if minutes is not UNSET: - field_dict["minutes"] = minutes - if origin is not UNSET: - field_dict["origin"] = origin - if price is not UNSET: - field_dict["price"] = price - if request_body is not UNSET: - field_dict["request_body"] = request_body - if request_query_params is not UNSET: - field_dict["request_query_params"] = request_query_params - if response_body is not UNSET: - field_dict["response_body"] = response_body - if started_at is not UNSET: - field_dict["started_at"] = started_at - if status_code is not UNSET: - field_dict["status_code"] = status_code - if stripe_invoice_item_id is not UNSET: - field_dict["stripe_invoice_item_id"] = stripe_invoice_item_id - if token is not UNSET: - field_dict["token"] = token - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - if user_agent is not UNSET: - field_dict["user_agent"] = user_agent - if user_id is not UNSET: - field_dict["user_id"] = user_id + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[KC], src_dict: Dict[str, Any]) -> KC: + d = src_dict.copy() + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) - @classmethod - def from_dict(cls: Type[KC], src_dict: Dict[str, Any]) -> KC: - d = src_dict.copy() - _completed_at = d.pop("completed_at", UNSET) - completed_at: Union[Unset, datetime.datetime] - 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) - _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) + duration = d.pop("duration", UNSET) - duration = d.pop("duration", UNSET) + email = d.pop("email", UNSET) - email = d.pop("email", UNSET) + endpoint = d.pop("endpoint", UNSET) - endpoint = d.pop("endpoint", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # 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] + ip_address = d.pop("ip_address", UNSET) - ip_address = d.pop("ip_address", UNSET) + litterbox = d.pop("litterbox", UNSET) - litterbox = d.pop("litterbox", UNSET) + _method = d.pop("method", UNSET) + method: Union[Unset, Method] + if isinstance(_method, Unset): + method = UNSET + else: + method = _method # type: ignore[arg-type] - _method = d.pop("method", UNSET) - method: Union[Unset, Method] - if isinstance(_method, Unset): - method = UNSET - else: - method = _method # type: ignore[arg-type] + minutes = d.pop("minutes", UNSET) - minutes = d.pop("minutes", UNSET) + origin = d.pop("origin", UNSET) - origin = d.pop("origin", UNSET) + price = d.pop("price", UNSET) - price = d.pop("price", UNSET) + request_body = d.pop("request_body", UNSET) - request_body = d.pop("request_body", UNSET) + request_query_params = d.pop("request_query_params", UNSET) - request_query_params = d.pop("request_query_params", UNSET) + response_body = d.pop("response_body", UNSET) - response_body = d.pop("response_body", 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) - _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_code = d.pop("status_code", UNSET) - status_code = d.pop("status_code", UNSET) + stripe_invoice_item_id = d.pop("stripe_invoice_item_id", UNSET) - stripe_invoice_item_id = d.pop("stripe_invoice_item_id", UNSET) + _token = d.pop("token", UNSET) + token: Union[Unset, Uuid] + if isinstance(_token, Unset): + token = UNSET + else: + token = _token # type: ignore[arg-type] - _token = d.pop("token", UNSET) - token: Union[Unset, Uuid] - if isinstance(_token, Unset): - token = UNSET - else: - token = _token # type: ignore[arg-type] + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) - _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_agent = d.pop("user_agent", UNSET) - user_agent = d.pop("user_agent", UNSET) + user_id = d.pop("user_id", UNSET) - user_id = d.pop("user_id", UNSET) - api_call_with_price = cls( - completed_at=completed_at, - created_at=created_at, - duration=duration, - email=email, - endpoint=endpoint, - id=id, - ip_address=ip_address, - litterbox=litterbox, - method=method, - minutes=minutes, - origin=origin, - price=price, - request_body=request_body, - request_query_params=request_query_params, - response_body=response_body, - started_at=started_at, - status_code=status_code, - stripe_invoice_item_id=stripe_invoice_item_id, - token=token, - updated_at=updated_at, - user_agent=user_agent, - user_id=user_id, - ) + api_call_with_price = cls( + completed_at= completed_at, + created_at= created_at, + duration= duration, + email= email, + endpoint= endpoint, + id= id, + ip_address= ip_address, + litterbox= litterbox, + method= method, + minutes= minutes, + origin= origin, + price= price, + request_body= request_body, + request_query_params= request_query_params, + response_body= response_body, + started_at= started_at, + status_code= status_code, + stripe_invoice_item_id= stripe_invoice_item_id, + token= token, + updated_at= updated_at, + user_agent= user_agent, + user_id= user_id, + ) - api_call_with_price.additional_properties = d - return api_call_with_price + api_call_with_price.additional_properties = d + return api_call_with_price - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/api_call_with_price_results_page.py b/kittycad/models/api_call_with_price_results_page.py index b33a5da4c..11375a3e7 100644 --- a/kittycad/models/api_call_with_price_results_page.py +++ b/kittycad/models/api_call_with_price_results_page.py @@ -6,65 +6,61 @@ from ..types import UNSET, Unset HX = TypeVar("HX", bound="ApiCallWithPriceResultsPage") - @attr.s(auto_attribs=True) class ApiCallWithPriceResultsPage: - """A single page of results""" # noqa: E501 + """ A single page of results """ # noqa: E501 + from ..models.api_call_with_price import ApiCallWithPrice + items: Union[Unset, List[ApiCallWithPrice]] = UNSET + next_page: Union[Unset, str] = UNSET - from ..models.api_call_with_price import ApiCallWithPrice + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - items: Union[Unset, List[ApiCallWithPrice]] = UNSET - next_page: Union[Unset, str] = UNSET + def to_dict(self) -> Dict[str, Any]: + from ..models.api_call_with_price import ApiCallWithPrice + items: Union[Unset, List[ApiCallWithPrice]] = UNSET + if not isinstance(self.items, Unset): + items = self.items + next_page = self.next_page - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if items is not UNSET: + field_dict['items'] = items + if next_page is not UNSET: + field_dict['next_page'] = next_page - def to_dict(self) -> Dict[str, Any]: - from ..models.api_call_with_price import ApiCallWithPrice + return field_dict - items: Union[Unset, List[ApiCallWithPrice]] = UNSET - if not isinstance(self.items, Unset): - items = self.items - next_page = self.next_page + @classmethod + def from_dict(cls: Type[HX], src_dict: Dict[str, Any]) -> HX: + d = src_dict.copy() + from ..models.api_call_with_price import ApiCallWithPrice + items = cast(List[ApiCallWithPrice], d.pop("items", UNSET)) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if items is not UNSET: - field_dict["items"] = items - if next_page is not UNSET: - field_dict["next_page"] = next_page + next_page = d.pop("next_page", UNSET) - return field_dict - @classmethod - def from_dict(cls: Type[HX], src_dict: Dict[str, Any]) -> HX: - d = src_dict.copy() - from ..models.api_call_with_price import ApiCallWithPrice + api_call_with_price_results_page = cls( + items= items, + next_page= next_page, + ) - items = cast(List[ApiCallWithPrice], d.pop("items", UNSET)) + api_call_with_price_results_page.additional_properties = d + return api_call_with_price_results_page - next_page = d.pop("next_page", UNSET) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - api_call_with_price_results_page = cls( - items=items, - next_page=next_page, - ) + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - api_call_with_price_results_page.additional_properties = d - return api_call_with_price_results_page + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - 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 + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/api_error.py b/kittycad/models/api_error.py index d124426a4..e86e1185e 100644 --- a/kittycad/models/api_error.py +++ b/kittycad/models/api_error.py @@ -7,63 +7,62 @@ from ..types import UNSET, Unset LB = TypeVar("LB", bound="ApiError") - @attr.s(auto_attribs=True) class ApiError: - """An error.""" # noqa: E501 + """ An error. """ # noqa: E501 + error_code: Union[Unset, ErrorCode] = UNSET + message: Union[Unset, str] = UNSET - error_code: Union[Unset, ErrorCode] = UNSET - message: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.error_code, Unset): + error_code = self.error_code + message = self.message - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.error_code, Unset): - error_code = self.error_code - message = self.message + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if error_code is not UNSET: + field_dict['error_code'] = error_code + if message is not UNSET: + field_dict['message'] = message - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if error_code is not UNSET: - field_dict["error_code"] = error_code - if message is not UNSET: - field_dict["message"] = message + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[LB], src_dict: Dict[str, Any]) -> LB: + d = src_dict.copy() + _error_code = d.pop("error_code", UNSET) + error_code: Union[Unset, ErrorCode] + if isinstance(_error_code, Unset): + error_code = UNSET + else: + error_code = _error_code # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[LB], src_dict: Dict[str, Any]) -> LB: - d = src_dict.copy() - _error_code = d.pop("error_code", UNSET) - error_code: Union[Unset, ErrorCode] - if isinstance(_error_code, Unset): - error_code = UNSET - else: - error_code = _error_code # type: ignore[arg-type] + message = d.pop("message", UNSET) - message = d.pop("message", UNSET) - api_error = cls( - error_code=error_code, - message=message, - ) + api_error = cls( + error_code= error_code, + message= message, + ) - api_error.additional_properties = d - return api_error + api_error.additional_properties = d + return api_error - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/api_token.py b/kittycad/models/api_token.py index 3070d4cf3..33cb96b2b 100644 --- a/kittycad/models/api_token.py +++ b/kittycad/models/api_token.py @@ -9,106 +9,105 @@ from ..types import UNSET, Unset NE = TypeVar("NE", bound="ApiToken") - @attr.s(auto_attribs=True) class ApiToken: - """An API token. + """ An API token. - These are used to authenticate users with Bearer authentication.""" # noqa: E501 +These are used to authenticate users with Bearer authentication. """ # noqa: E501 + created_at: Union[Unset, datetime.datetime] = UNSET + id: Union[Unset, str] = UNSET + is_valid: Union[Unset, bool] = False + token: Union[Unset, str] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - id: Union[Unset, str] = UNSET - is_valid: Union[Unset, bool] = False - token: Union[Unset, str] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + id = self.id + is_valid = self.is_valid + token = self.token + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id - def to_dict(self) -> Dict[str, Any]: - created_at: Union[Unset, str] = UNSET - if not isinstance(self.created_at, Unset): - created_at = self.created_at.isoformat() - id = self.id - is_valid = self.is_valid - token = self.token - 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 created_at is not UNSET: + field_dict['created_at'] = created_at + if id is not UNSET: + field_dict['id'] = id + if is_valid is not UNSET: + field_dict['is_valid'] = is_valid + if token is not UNSET: + field_dict['token'] = token + if updated_at is not UNSET: + field_dict['updated_at'] = updated_at + if user_id is not UNSET: + field_dict['user_id'] = user_id - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if created_at is not UNSET: - field_dict["created_at"] = created_at - if id is not UNSET: - field_dict["id"] = id - if is_valid is not UNSET: - field_dict["is_valid"] = is_valid - if token is not UNSET: - field_dict["token"] = token - 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 - return field_dict + @classmethod + def from_dict(cls: Type[NE], src_dict: Dict[str, Any]) -> NE: + d = src_dict.copy() + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) - @classmethod - def from_dict(cls: Type[NE], src_dict: Dict[str, Any]) -> NE: - d = src_dict.copy() - _created_at = d.pop("created_at", UNSET) - created_at: Union[Unset, datetime.datetime] - if isinstance(_created_at, Unset): - created_at = UNSET - else: - created_at = isoparse(_created_at) + id = d.pop("id", UNSET) - id = d.pop("id", UNSET) + is_valid = d.pop("is_valid", UNSET) - is_valid = d.pop("is_valid", UNSET) + _token = d.pop("token", UNSET) + token: Union[Unset, Uuid] + if isinstance(_token, Unset): + token = UNSET + else: + token = _token # type: ignore[arg-type] - _token = d.pop("token", UNSET) - token: Union[Unset, Uuid] - if isinstance(_token, Unset): - token = UNSET - else: - token = _token # type: ignore[arg-type] + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) - _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) - user_id = d.pop("user_id", UNSET) - api_token = cls( - created_at=created_at, - id=id, - is_valid=is_valid, - token=token, - updated_at=updated_at, - user_id=user_id, - ) + api_token = cls( + created_at= created_at, + id= id, + is_valid= is_valid, + token= token, + updated_at= updated_at, + user_id= user_id, + ) - api_token.additional_properties = d - return api_token + api_token.additional_properties = d + return api_token - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/api_token_results_page.py b/kittycad/models/api_token_results_page.py index cf9f1095a..574d71129 100644 --- a/kittycad/models/api_token_results_page.py +++ b/kittycad/models/api_token_results_page.py @@ -6,65 +6,61 @@ from ..types import UNSET, Unset TL = TypeVar("TL", bound="ApiTokenResultsPage") - @attr.s(auto_attribs=True) class ApiTokenResultsPage: - """A single page of results""" # noqa: E501 + """ A single page of results """ # noqa: E501 + from ..models.api_token import ApiToken + items: Union[Unset, List[ApiToken]] = UNSET + next_page: Union[Unset, str] = UNSET - from ..models.api_token import ApiToken + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - items: Union[Unset, List[ApiToken]] = UNSET - next_page: Union[Unset, str] = UNSET + def to_dict(self) -> Dict[str, Any]: + from ..models.api_token import ApiToken + items: Union[Unset, List[ApiToken]] = UNSET + if not isinstance(self.items, Unset): + items = self.items + next_page = self.next_page - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if items is not UNSET: + field_dict['items'] = items + if next_page is not UNSET: + field_dict['next_page'] = next_page - def to_dict(self) -> Dict[str, Any]: - from ..models.api_token import ApiToken + return field_dict - items: Union[Unset, List[ApiToken]] = UNSET - if not isinstance(self.items, Unset): - items = self.items - next_page = self.next_page + @classmethod + def from_dict(cls: Type[TL], src_dict: Dict[str, Any]) -> TL: + d = src_dict.copy() + from ..models.api_token import ApiToken + items = cast(List[ApiToken], d.pop("items", UNSET)) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if items is not UNSET: - field_dict["items"] = items - if next_page is not UNSET: - field_dict["next_page"] = next_page + next_page = d.pop("next_page", UNSET) - return field_dict - @classmethod - def from_dict(cls: Type[TL], src_dict: Dict[str, Any]) -> TL: - d = src_dict.copy() - from ..models.api_token import ApiToken + api_token_results_page = cls( + items= items, + next_page= next_page, + ) - items = cast(List[ApiToken], d.pop("items", UNSET)) + api_token_results_page.additional_properties = d + return api_token_results_page - next_page = d.pop("next_page", UNSET) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - api_token_results_page = cls( - items=items, - next_page=next_page, - ) + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - api_token_results_page.additional_properties = d - return api_token_results_page + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - 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 + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/app_client_info.py b/kittycad/models/app_client_info.py index d74890b7d..39acebacc 100644 --- a/kittycad/models/app_client_info.py +++ b/kittycad/models/app_client_info.py @@ -6,50 +6,49 @@ from ..types import UNSET, Unset MN = TypeVar("MN", bound="AppClientInfo") - @attr.s(auto_attribs=True) class AppClientInfo: - """Information about a third party app client.""" # noqa: E501 + """ Information about a third party app client. """ # noqa: E501 + url: Union[Unset, str] = UNSET - url: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + url = self.url - def to_dict(self) -> Dict[str, Any]: - url = self.url + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if url is not UNSET: + field_dict['url'] = url - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if url is not UNSET: - field_dict["url"] = url + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[MN], src_dict: Dict[str, Any]) -> MN: + d = src_dict.copy() + url = d.pop("url", UNSET) - @classmethod - def from_dict(cls: Type[MN], src_dict: Dict[str, Any]) -> MN: - d = src_dict.copy() - url = d.pop("url", UNSET) - app_client_info = cls( - url=url, - ) + app_client_info = cls( + url= url, + ) - app_client_info.additional_properties = d - return app_client_info + app_client_info.additional_properties = d + return app_client_info - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/async_api_call.py b/kittycad/models/async_api_call.py index acac65897..8b0bb2b94 100644 --- a/kittycad/models/async_api_call.py +++ b/kittycad/models/async_api_call.py @@ -11,170 +11,169 @@ from ..types import UNSET, Unset JV = TypeVar("JV", bound="AsyncApiCall") - @attr.s(auto_attribs=True) class AsyncApiCall: - """An async API call.""" # noqa: E501 + """ An async API call. """ # noqa: E501 + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + input: Union[Unset, Any] = UNSET + output: Union[Unset, Any] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + type: Union[Unset, AsyncApiCallType] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET + worker: Union[Unset, str] = UNSET - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - input: Union[Unset, Any] = UNSET - output: Union[Unset, Any] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - type: Union[Unset, AsyncApiCallType] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET - worker: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 + id = self.id + input = self.input + output = self.output + 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 + if not isinstance(self.type, Unset): + 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 + worker = self.worker - 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 - id = self.id - input = self.input - output = self.output - 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 - if not isinstance(self.type, Unset): - 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 - worker = self.worker + 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 id is not UNSET: + field_dict['id'] = id + if input is not UNSET: + field_dict['input'] = input + if output is not UNSET: + field_dict['output'] = output + if started_at is not UNSET: + field_dict['started_at'] = started_at + if status is not UNSET: + field_dict['status'] = status + if type is not UNSET: + field_dict['type'] = type + if updated_at is not UNSET: + field_dict['updated_at'] = updated_at + if user_id is not UNSET: + field_dict['user_id'] = user_id + if worker is not UNSET: + field_dict['worker'] = worker - 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 id is not UNSET: - field_dict["id"] = id - if input is not UNSET: - field_dict["input"] = input - if output is not UNSET: - field_dict["output"] = output - if started_at is not UNSET: - field_dict["started_at"] = started_at - if status is not UNSET: - field_dict["status"] = status - if type is not UNSET: - field_dict["type"] = type - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - if user_id is not UNSET: - field_dict["user_id"] = user_id - if worker is not UNSET: - field_dict["worker"] = worker + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[JV], src_dict: Dict[str, Any]) -> JV: + d = src_dict.copy() + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) - @classmethod - def from_dict(cls: Type[JV], src_dict: Dict[str, Any]) -> JV: - d = src_dict.copy() - _completed_at = d.pop("completed_at", UNSET) - completed_at: Union[Unset, datetime.datetime] - 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) - _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) - error = d.pop("error", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] + input = d.pop("input", UNSET) + output = d.pop("output", 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) - input = d.pop("input", UNSET) - output = d.pop("output", 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] - _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) + type: Union[Unset, AsyncApiCallType] + if isinstance(_type, Unset): + type = UNSET + else: + type = _type # type: ignore[arg-type] - _type = d.pop("type", UNSET) - type: Union[Unset, AsyncApiCallType] - if isinstance(_type, Unset): - type = UNSET - else: - type = _type # type: ignore[arg-type] + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) - _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) - user_id = d.pop("user_id", UNSET) + worker = d.pop("worker", UNSET) - worker = d.pop("worker", UNSET) - async_api_call = cls( - completed_at=completed_at, - created_at=created_at, - error=error, - id=id, - input=input, - output=output, - started_at=started_at, - status=status, - type=type, - updated_at=updated_at, - user_id=user_id, - worker=worker, - ) + async_api_call = cls( + completed_at= completed_at, + created_at= created_at, + error= error, + id= id, + input= input, + output= output, + started_at= started_at, + status= status, + type= type, + updated_at= updated_at, + user_id= user_id, + worker= worker, + ) - async_api_call.additional_properties = d - return async_api_call + async_api_call.additional_properties = d + return async_api_call - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/async_api_call_output.py b/kittycad/models/async_api_call_output.py index 98bcfda3d..76ee9a1ce 100644 --- a/kittycad/models/async_api_call_output.py +++ b/kittycad/models/async_api_call_output.py @@ -21,1161 +21,1157 @@ from ..types import UNSET, Unset IO = TypeVar("IO", bound="file_conversion") - @attr.s(auto_attribs=True) class file_conversion: - """A file conversion.""" # noqa: E501 + """ A file conversion. """ # noqa: E501 + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + output_format: Union[Unset, FileExportFormat] = UNSET + output_format_options: Union[Unset, OutputFormat] = UNSET + outputs: Union[Unset, Dict[str, Base64Data]] = UNSET + src_format: Union[Unset, FileImportFormat] = UNSET + src_format_options: Union[Unset, InputFormat] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + type: str = "file_conversion" + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - output_format: Union[Unset, FileExportFormat] = UNSET - output_format_options: Union[Unset, OutputFormat] = UNSET - outputs: Union[Unset, Dict[str, Base64Data]] = UNSET - src_format: Union[Unset, FileImportFormat] = UNSET - src_format_options: Union[Unset, InputFormat] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - type: str = "file_conversion" - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 + id = self.id + if not isinstance(self.output_format, Unset): + output_format = self.output_format + if not isinstance(self.output_format_options, Unset): + output_format_options = self.output_format_options + 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 + if not isinstance(self.src_format, Unset): + src_format = self.src_format + if not isinstance(self.src_format_options, Unset): + src_format_options = self.src_format_options + 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 - 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 - id = self.id - if not isinstance(self.output_format, Unset): - output_format = self.output_format - if not isinstance(self.output_format_options, Unset): - output_format_options = self.output_format_options - 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 - if not isinstance(self.src_format, Unset): - src_format = self.src_format - if not isinstance(self.src_format_options, Unset): - src_format_options = self.src_format_options - 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 id is not UNSET: + field_dict['id'] = id + if output_format is not UNSET: + field_dict['output_format'] = output_format + if output_format_options is not UNSET: + field_dict['output_format_options'] = output_format_options + if outputs is not UNSET: + field_dict['outputs'] = outputs + if src_format is not UNSET: + field_dict['src_format'] = src_format + if src_format_options is not UNSET: + field_dict['src_format_options'] = src_format_options + 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 - 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 id is not UNSET: - field_dict["id"] = id - if output_format is not UNSET: - field_dict["output_format"] = output_format - if output_format_options is not UNSET: - field_dict["output_format_options"] = output_format_options - if outputs is not UNSET: - field_dict["outputs"] = outputs - if src_format is not UNSET: - field_dict["src_format"] = src_format - if src_format_options is not UNSET: - field_dict["src_format_options"] = src_format_options - 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 - return field_dict + @classmethod + def from_dict(cls: Type[IO], src_dict: Dict[str, Any]) -> IO: + d = src_dict.copy() + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) - @classmethod - def from_dict(cls: Type[IO], src_dict: Dict[str, Any]) -> IO: - d = src_dict.copy() - _completed_at = d.pop("completed_at", UNSET) - completed_at: Union[Unset, datetime.datetime] - 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) - _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) - error = d.pop("error", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] + _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] - _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] + _output_format_options = d.pop("output_format_options", UNSET) + output_format_options: Union[Unset, OutputFormat] + if isinstance(_output_format_options, Unset): + output_format_options = UNSET + else: + output_format_options = _output_format_options # type: ignore[arg-type] - _output_format_options = d.pop("output_format_options", UNSET) - output_format_options: Union[Unset, OutputFormat] - if isinstance(_output_format_options, Unset): - output_format_options = UNSET - else: - output_format_options = _output_format_options # 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 - _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 + _src_format = d.pop("src_format", UNSET) + src_format: Union[Unset, FileImportFormat] + if isinstance(_src_format, Unset): + src_format = UNSET + else: + src_format = _src_format # type: ignore[arg-type] - _src_format = d.pop("src_format", UNSET) - src_format: Union[Unset, FileImportFormat] - if isinstance(_src_format, Unset): - src_format = UNSET - else: - src_format = _src_format # type: ignore[arg-type] + _src_format_options = d.pop("src_format_options", UNSET) + src_format_options: Union[Unset, InputFormat] + if isinstance(_src_format_options, Unset): + src_format_options = UNSET + else: + src_format_options = _src_format_options # type: ignore[arg-type] - _src_format_options = d.pop("src_format_options", UNSET) - src_format_options: Union[Unset, InputFormat] - if isinstance(_src_format_options, Unset): - src_format_options = UNSET - else: - src_format_options = _src_format_options # type: ignore[arg-type] + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) - _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] - _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) - 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) - _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) - user_id = d.pop("user_id", UNSET) - file_conversion = cls( - completed_at=completed_at, - created_at=created_at, - error=error, - id=id, - output_format=output_format, - output_format_options=output_format_options, - outputs=outputs, - src_format=src_format, - src_format_options=src_format_options, - started_at=started_at, - status=status, - type=type, - updated_at=updated_at, - user_id=user_id, - ) + file_conversion = cls( + completed_at= completed_at, + created_at= created_at, + error= error, + id= id, + output_format= output_format, + output_format_options= output_format_options, + outputs= outputs, + src_format= src_format, + src_format_options= src_format_options, + started_at= started_at, + status= status, + type= type, + updated_at= updated_at, + user_id= user_id, + ) - file_conversion.additional_properties = d - return file_conversion + file_conversion.additional_properties = d + return file_conversion - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties FV = TypeVar("FV", bound="file_center_of_mass") - @attr.s(auto_attribs=True) class file_center_of_mass: - """File center of mass.""" # noqa: E501 + """ File center of mass. """ # noqa: E501 + center_of_mass: Union[Unset, Point3d] = UNSET + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + output_unit: Union[Unset, UnitLength] = UNSET + src_format: Union[Unset, FileImportFormat] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + type: str = "file_center_of_mass" + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET - center_of_mass: Union[Unset, Point3d] = UNSET - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - output_unit: Union[Unset, UnitLength] = UNSET - src_format: Union[Unset, FileImportFormat] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - type: str = "file_center_of_mass" - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.center_of_mass, Unset): + center_of_mass = self.center_of_mass + 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 + id = self.id + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + if not isinstance(self.src_format, Unset): + src_format = self.src_format + started_at: Union[Unset, str] = UNSET + 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 - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.center_of_mass, Unset): - center_of_mass = self.center_of_mass - 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 - id = self.id - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - if not isinstance(self.src_format, Unset): - src_format = self.src_format - started_at: Union[Unset, str] = UNSET - 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 center_of_mass is not UNSET: + field_dict['center_of_mass'] = center_of_mass + 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 id is not UNSET: + field_dict['id'] = id + if output_unit is not UNSET: + field_dict['output_unit'] = output_unit + if src_format is not UNSET: + field_dict['src_format'] = src_format + if started_at is not UNSET: + 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 - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if center_of_mass is not UNSET: - field_dict["center_of_mass"] = center_of_mass - if 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 id is not UNSET: - field_dict["id"] = id - if output_unit is not UNSET: - field_dict["output_unit"] = output_unit - if src_format is not UNSET: - field_dict["src_format"] = src_format - if started_at is not UNSET: - 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 - return field_dict + @classmethod + def from_dict(cls: Type[FV], src_dict: Dict[str, Any]) -> FV: + d = src_dict.copy() + _center_of_mass = d.pop("center_of_mass", UNSET) + center_of_mass: Union[Unset, Point3d] + if isinstance(_center_of_mass, Unset): + center_of_mass = UNSET + else: + center_of_mass = _center_of_mass # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[FV], src_dict: Dict[str, Any]) -> FV: - d = src_dict.copy() - _center_of_mass = d.pop("center_of_mass", UNSET) - center_of_mass: Union[Unset, Point3d] - if isinstance(_center_of_mass, Unset): - center_of_mass = UNSET - else: - center_of_mass = _center_of_mass # type: ignore[arg-type] + _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) - _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) - _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) - error = d.pop("error", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitLength] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitLength] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] + _src_format = d.pop("src_format", UNSET) + src_format: Union[Unset, FileImportFormat] + if isinstance(_src_format, Unset): + src_format = UNSET + else: + src_format = _src_format # type: ignore[arg-type] - _src_format = d.pop("src_format", UNSET) - src_format: Union[Unset, FileImportFormat] - if isinstance(_src_format, Unset): - src_format = UNSET - else: - src_format = _src_format # type: ignore[arg-type] + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) - _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] - _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) - 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) - _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) - user_id = d.pop("user_id", UNSET) - file_center_of_mass = cls( - center_of_mass=center_of_mass, - completed_at=completed_at, - created_at=created_at, - error=error, - id=id, - output_unit=output_unit, - src_format=src_format, - started_at=started_at, - status=status, - type=type, - updated_at=updated_at, - user_id=user_id, - ) + file_center_of_mass = cls( + center_of_mass= center_of_mass, + completed_at= completed_at, + created_at= created_at, + error= error, + id= id, + output_unit= output_unit, + src_format= src_format, + started_at= started_at, + status= status, + type= type, + updated_at= updated_at, + user_id= user_id, + ) - file_center_of_mass.additional_properties = d - return file_center_of_mass + file_center_of_mass.additional_properties = d + return file_center_of_mass - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties LE = TypeVar("LE", bound="file_mass") - @attr.s(auto_attribs=True) class file_mass: - """A file mass.""" # noqa: E501 + """ A file mass. """ # noqa: E501 + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + mass: Union[Unset, float] = UNSET + material_density: Union[Unset, float] = UNSET + material_density_unit: Union[Unset, UnitDensity] = UNSET + output_unit: Union[Unset, UnitMass] = UNSET + src_format: Union[Unset, FileImportFormat] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + type: str = "file_mass" + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - mass: Union[Unset, float] = UNSET - material_density: Union[Unset, float] = UNSET - material_density_unit: Union[Unset, UnitDensity] = UNSET - output_unit: Union[Unset, UnitMass] = UNSET - src_format: Union[Unset, FileImportFormat] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - type: str = "file_mass" - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 + id = self.id + mass = self.mass + material_density = self.material_density + if not isinstance(self.material_density_unit, Unset): + material_density_unit = self.material_density_unit + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + if not isinstance(self.src_format, Unset): + src_format = self.src_format + started_at: Union[Unset, str] = UNSET + 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 - 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 - id = self.id - mass = self.mass - material_density = self.material_density - if not isinstance(self.material_density_unit, Unset): - material_density_unit = self.material_density_unit - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - if not isinstance(self.src_format, Unset): - src_format = self.src_format - started_at: Union[Unset, str] = UNSET - 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 id is not UNSET: + field_dict['id'] = id + if mass is not UNSET: + field_dict['mass'] = mass + if material_density is not UNSET: + field_dict['material_density'] = material_density + if material_density_unit is not UNSET: + field_dict['material_density_unit'] = material_density_unit + if output_unit is not UNSET: + field_dict['output_unit'] = output_unit + if src_format is not UNSET: + field_dict['src_format'] = src_format + if started_at is not UNSET: + 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 - 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 id is not UNSET: - field_dict["id"] = id - if mass is not UNSET: - field_dict["mass"] = mass - if material_density is not UNSET: - field_dict["material_density"] = material_density - if material_density_unit is not UNSET: - field_dict["material_density_unit"] = material_density_unit - if output_unit is not UNSET: - field_dict["output_unit"] = output_unit - if src_format is not UNSET: - field_dict["src_format"] = src_format - if started_at is not UNSET: - 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 - return field_dict + @classmethod + def from_dict(cls: Type[LE], src_dict: Dict[str, Any]) -> LE: + d = src_dict.copy() + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) - @classmethod - def from_dict(cls: Type[LE], src_dict: Dict[str, Any]) -> LE: - d = src_dict.copy() - _completed_at = d.pop("completed_at", UNSET) - completed_at: Union[Unset, datetime.datetime] - 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) - _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) - error = d.pop("error", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] + mass = d.pop("mass", UNSET) - mass = d.pop("mass", UNSET) + material_density = d.pop("material_density", UNSET) - material_density = d.pop("material_density", UNSET) + _material_density_unit = d.pop("material_density_unit", UNSET) + material_density_unit: Union[Unset, UnitDensity] + if isinstance(_material_density_unit, Unset): + material_density_unit = UNSET + else: + material_density_unit = _material_density_unit # type: ignore[arg-type] - _material_density_unit = d.pop("material_density_unit", UNSET) - material_density_unit: Union[Unset, UnitDensity] - if isinstance(_material_density_unit, Unset): - material_density_unit = UNSET - else: - material_density_unit = _material_density_unit # type: ignore[arg-type] + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitMass] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitMass] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] + _src_format = d.pop("src_format", UNSET) + src_format: Union[Unset, FileImportFormat] + if isinstance(_src_format, Unset): + src_format = UNSET + else: + src_format = _src_format # type: ignore[arg-type] - _src_format = d.pop("src_format", UNSET) - src_format: Union[Unset, FileImportFormat] - if isinstance(_src_format, Unset): - src_format = UNSET - else: - src_format = _src_format # type: ignore[arg-type] + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) - _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] - _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) - 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) - _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) - user_id = d.pop("user_id", UNSET) - file_mass = cls( - completed_at=completed_at, - created_at=created_at, - error=error, - id=id, - mass=mass, - material_density=material_density, - material_density_unit=material_density_unit, - output_unit=output_unit, - src_format=src_format, - started_at=started_at, - status=status, - type=type, - updated_at=updated_at, - user_id=user_id, - ) + file_mass = cls( + completed_at= completed_at, + created_at= created_at, + error= error, + id= id, + mass= mass, + material_density= material_density, + material_density_unit= material_density_unit, + output_unit= output_unit, + src_format= src_format, + started_at= started_at, + status= status, + type= type, + updated_at= updated_at, + user_id= user_id, + ) - file_mass.additional_properties = d - return file_mass + file_mass.additional_properties = d + return file_mass - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties OY = TypeVar("OY", bound="file_volume") - @attr.s(auto_attribs=True) class file_volume: - """A file volume.""" # noqa: E501 + """ A file volume. """ # noqa: E501 + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + output_unit: Union[Unset, UnitVolume] = UNSET + src_format: Union[Unset, FileImportFormat] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + type: str = "file_volume" + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET + volume: Union[Unset, float] = UNSET - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - output_unit: Union[Unset, UnitVolume] = UNSET - src_format: Union[Unset, FileImportFormat] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - type: str = "file_volume" - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET - volume: Union[Unset, float] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 + id = self.id + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + if not isinstance(self.src_format, Unset): + src_format = self.src_format + started_at: Union[Unset, str] = UNSET + 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 + volume = self.volume - 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 - id = self.id - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - if not isinstance(self.src_format, Unset): - src_format = self.src_format - started_at: Union[Unset, str] = UNSET - 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 - volume = self.volume + 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 id is not UNSET: + field_dict['id'] = id + if output_unit is not UNSET: + field_dict['output_unit'] = output_unit + if src_format is not UNSET: + field_dict['src_format'] = src_format + if started_at is not UNSET: + 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 + if volume is not UNSET: + field_dict['volume'] = volume - 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 id is not UNSET: - field_dict["id"] = id - if output_unit is not UNSET: - field_dict["output_unit"] = output_unit - if src_format is not UNSET: - field_dict["src_format"] = src_format - if started_at is not UNSET: - 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 - if volume is not UNSET: - field_dict["volume"] = volume + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[OY], src_dict: Dict[str, Any]) -> OY: + d = src_dict.copy() + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) - @classmethod - def from_dict(cls: Type[OY], src_dict: Dict[str, Any]) -> OY: - d = src_dict.copy() - _completed_at = d.pop("completed_at", UNSET) - completed_at: Union[Unset, datetime.datetime] - 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) - _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) - error = d.pop("error", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitVolume] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitVolume] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] + _src_format = d.pop("src_format", UNSET) + src_format: Union[Unset, FileImportFormat] + if isinstance(_src_format, Unset): + src_format = UNSET + else: + src_format = _src_format # type: ignore[arg-type] - _src_format = d.pop("src_format", UNSET) - src_format: Union[Unset, FileImportFormat] - if isinstance(_src_format, Unset): - src_format = UNSET - else: - src_format = _src_format # type: ignore[arg-type] + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) - _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] - _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) - 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) - _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) - user_id = d.pop("user_id", UNSET) + volume = d.pop("volume", UNSET) - volume = d.pop("volume", UNSET) - file_volume = cls( - completed_at=completed_at, - created_at=created_at, - error=error, - id=id, - output_unit=output_unit, - src_format=src_format, - started_at=started_at, - status=status, - type=type, - updated_at=updated_at, - user_id=user_id, - volume=volume, - ) + file_volume = cls( + completed_at= completed_at, + created_at= created_at, + error= error, + id= id, + output_unit= output_unit, + src_format= src_format, + started_at= started_at, + status= status, + type= type, + updated_at= updated_at, + user_id= user_id, + volume= volume, + ) - file_volume.additional_properties = d - return file_volume + file_volume.additional_properties = d + return file_volume - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties HO = TypeVar("HO", bound="file_density") - @attr.s(auto_attribs=True) class file_density: - """A file density.""" # noqa: E501 + """ A file density. """ # noqa: E501 + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + density: Union[Unset, float] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + material_mass: Union[Unset, float] = UNSET + material_mass_unit: Union[Unset, UnitMass] = UNSET + output_unit: Union[Unset, UnitDensity] = UNSET + src_format: Union[Unset, FileImportFormat] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + type: str = "file_density" + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - density: Union[Unset, float] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - material_mass: Union[Unset, float] = UNSET - material_mass_unit: Union[Unset, UnitMass] = UNSET - output_unit: Union[Unset, UnitDensity] = UNSET - src_format: Union[Unset, FileImportFormat] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - type: str = "file_density" - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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() + density = self.density + error = self.error + id = self.id + material_mass = self.material_mass + if not isinstance(self.material_mass_unit, Unset): + material_mass_unit = self.material_mass_unit + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + if not isinstance(self.src_format, Unset): + src_format = self.src_format + started_at: Union[Unset, str] = UNSET + 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 - 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() - density = self.density - error = self.error - id = self.id - material_mass = self.material_mass - if not isinstance(self.material_mass_unit, Unset): - material_mass_unit = self.material_mass_unit - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - if not isinstance(self.src_format, Unset): - src_format = self.src_format - started_at: Union[Unset, str] = UNSET - 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 density is not UNSET: + field_dict['density'] = density + if error is not UNSET: + field_dict['error'] = error + if id is not UNSET: + field_dict['id'] = id + if material_mass is not UNSET: + field_dict['material_mass'] = material_mass + if material_mass_unit is not UNSET: + field_dict['material_mass_unit'] = material_mass_unit + if output_unit is not UNSET: + field_dict['output_unit'] = output_unit + if src_format is not UNSET: + field_dict['src_format'] = src_format + if started_at is not UNSET: + 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 - 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 density is not UNSET: - field_dict["density"] = density - if error is not UNSET: - field_dict["error"] = error - if id is not UNSET: - field_dict["id"] = id - if material_mass is not UNSET: - field_dict["material_mass"] = material_mass - if material_mass_unit is not UNSET: - field_dict["material_mass_unit"] = material_mass_unit - if output_unit is not UNSET: - field_dict["output_unit"] = output_unit - if src_format is not UNSET: - field_dict["src_format"] = src_format - if started_at is not UNSET: - 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 - return field_dict + @classmethod + def from_dict(cls: Type[HO], src_dict: Dict[str, Any]) -> HO: + d = src_dict.copy() + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) - @classmethod - def from_dict(cls: Type[HO], src_dict: Dict[str, Any]) -> HO: - d = src_dict.copy() - _completed_at = d.pop("completed_at", UNSET) - completed_at: Union[Unset, datetime.datetime] - 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) - _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) + density = d.pop("density", UNSET) - density = d.pop("density", UNSET) + error = d.pop("error", UNSET) - error = d.pop("error", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] + material_mass = d.pop("material_mass", UNSET) - material_mass = d.pop("material_mass", UNSET) + _material_mass_unit = d.pop("material_mass_unit", UNSET) + material_mass_unit: Union[Unset, UnitMass] + if isinstance(_material_mass_unit, Unset): + material_mass_unit = UNSET + else: + material_mass_unit = _material_mass_unit # type: ignore[arg-type] - _material_mass_unit = d.pop("material_mass_unit", UNSET) - material_mass_unit: Union[Unset, UnitMass] - if isinstance(_material_mass_unit, Unset): - material_mass_unit = UNSET - else: - material_mass_unit = _material_mass_unit # type: ignore[arg-type] + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitDensity] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitDensity] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] + _src_format = d.pop("src_format", UNSET) + src_format: Union[Unset, FileImportFormat] + if isinstance(_src_format, Unset): + src_format = UNSET + else: + src_format = _src_format # type: ignore[arg-type] - _src_format = d.pop("src_format", UNSET) - src_format: Union[Unset, FileImportFormat] - if isinstance(_src_format, Unset): - src_format = UNSET - else: - src_format = _src_format # type: ignore[arg-type] + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) - _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] - _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) - 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) - _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) - user_id = d.pop("user_id", UNSET) - file_density = cls( - completed_at=completed_at, - created_at=created_at, - density=density, - error=error, - id=id, - material_mass=material_mass, - material_mass_unit=material_mass_unit, - output_unit=output_unit, - src_format=src_format, - started_at=started_at, - status=status, - type=type, - updated_at=updated_at, - user_id=user_id, - ) + file_density = cls( + completed_at= completed_at, + created_at= created_at, + density= density, + error= error, + id= id, + material_mass= material_mass, + material_mass_unit= material_mass_unit, + output_unit= output_unit, + src_format= src_format, + started_at= started_at, + status= status, + type= type, + updated_at= updated_at, + user_id= user_id, + ) - file_density.additional_properties = d - return file_density + file_density.additional_properties = d + return file_density - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties TM = TypeVar("TM", bound="file_surface_area") - @attr.s(auto_attribs=True) class file_surface_area: - """A file surface area.""" # noqa: E501 + """ A file surface area. """ # noqa: E501 + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + output_unit: Union[Unset, UnitArea] = UNSET + src_format: Union[Unset, FileImportFormat] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + surface_area: Union[Unset, float] = UNSET + type: str = "file_surface_area" + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - output_unit: Union[Unset, UnitArea] = UNSET - src_format: Union[Unset, FileImportFormat] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - surface_area: Union[Unset, float] = UNSET - type: str = "file_surface_area" - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 + id = self.id + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + if not isinstance(self.src_format, Unset): + src_format = self.src_format + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + if not isinstance(self.status, Unset): + status = self.status + surface_area = self.surface_area + 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 - 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 - id = self.id - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - if not isinstance(self.src_format, Unset): - src_format = self.src_format - started_at: Union[Unset, str] = UNSET - if not isinstance(self.started_at, Unset): - started_at = self.started_at.isoformat() - if not isinstance(self.status, Unset): - status = self.status - surface_area = self.surface_area - 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 id is not UNSET: + field_dict['id'] = id + if output_unit is not UNSET: + field_dict['output_unit'] = output_unit + if src_format is not UNSET: + field_dict['src_format'] = src_format + if started_at is not UNSET: + field_dict['started_at'] = started_at + if status is not UNSET: + field_dict['status'] = status + if surface_area is not UNSET: + field_dict['surface_area'] = surface_area + 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 - 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 id is not UNSET: - field_dict["id"] = id - if output_unit is not UNSET: - field_dict["output_unit"] = output_unit - if src_format is not UNSET: - field_dict["src_format"] = src_format - if started_at is not UNSET: - field_dict["started_at"] = started_at - if status is not UNSET: - field_dict["status"] = status - if surface_area is not UNSET: - field_dict["surface_area"] = surface_area - 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 - return field_dict + @classmethod + def from_dict(cls: Type[TM], src_dict: Dict[str, Any]) -> TM: + d = src_dict.copy() + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) - @classmethod - def from_dict(cls: Type[TM], src_dict: Dict[str, Any]) -> TM: - d = src_dict.copy() - _completed_at = d.pop("completed_at", UNSET) - completed_at: Union[Unset, datetime.datetime] - 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) - _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) - error = d.pop("error", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitArea] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitArea] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] + _src_format = d.pop("src_format", UNSET) + src_format: Union[Unset, FileImportFormat] + if isinstance(_src_format, Unset): + src_format = UNSET + else: + src_format = _src_format # type: ignore[arg-type] - _src_format = d.pop("src_format", UNSET) - src_format: Union[Unset, FileImportFormat] - if isinstance(_src_format, Unset): - src_format = UNSET - else: - src_format = _src_format # type: ignore[arg-type] + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) - _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] - _status = d.pop("status", UNSET) - status: Union[Unset, ApiCallStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = _status # type: ignore[arg-type] + surface_area = d.pop("surface_area", UNSET) - surface_area = d.pop("surface_area", UNSET) + type = d.pop("type", UNSET) - 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) - _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) - - file_surface_area = cls( - completed_at=completed_at, - created_at=created_at, - error=error, - id=id, - output_unit=output_unit, - src_format=src_format, - started_at=started_at, - status=status, - surface_area=surface_area, - type=type, - updated_at=updated_at, - user_id=user_id, - ) - - file_surface_area.additional_properties = d - return file_surface_area - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + user_id = d.pop("user_id", UNSET) -AsyncApiCallOutput = Union[ - file_conversion, - file_center_of_mass, - file_mass, - file_volume, - file_density, - file_surface_area, -] + file_surface_area = cls( + completed_at= completed_at, + created_at= created_at, + error= error, + id= id, + output_unit= output_unit, + src_format= src_format, + started_at= started_at, + status= status, + surface_area= surface_area, + type= type, + updated_at= updated_at, + user_id= user_id, + ) + + file_surface_area.additional_properties = d + return file_surface_area + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + +AsyncApiCallOutput = Union[file_conversion, file_center_of_mass, file_mass, file_volume, file_density, file_surface_area] diff --git a/kittycad/models/async_api_call_results_page.py b/kittycad/models/async_api_call_results_page.py index c8749db59..2863034b2 100644 --- a/kittycad/models/async_api_call_results_page.py +++ b/kittycad/models/async_api_call_results_page.py @@ -6,65 +6,61 @@ from ..types import UNSET, Unset BS = TypeVar("BS", bound="AsyncApiCallResultsPage") - @attr.s(auto_attribs=True) class AsyncApiCallResultsPage: - """A single page of results""" # noqa: E501 + """ A single page of results """ # noqa: E501 + from ..models.async_api_call import AsyncApiCall + items: Union[Unset, List[AsyncApiCall]] = UNSET + next_page: Union[Unset, str] = UNSET - from ..models.async_api_call import AsyncApiCall + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - items: Union[Unset, List[AsyncApiCall]] = UNSET - next_page: Union[Unset, str] = UNSET + def to_dict(self) -> Dict[str, Any]: + from ..models.async_api_call import AsyncApiCall + items: Union[Unset, List[AsyncApiCall]] = UNSET + if not isinstance(self.items, Unset): + items = self.items + next_page = self.next_page - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if items is not UNSET: + field_dict['items'] = items + if next_page is not UNSET: + field_dict['next_page'] = next_page - def to_dict(self) -> Dict[str, Any]: - from ..models.async_api_call import AsyncApiCall + return field_dict - items: Union[Unset, List[AsyncApiCall]] = UNSET - if not isinstance(self.items, Unset): - items = self.items - next_page = self.next_page + @classmethod + def from_dict(cls: Type[BS], src_dict: Dict[str, Any]) -> BS: + d = src_dict.copy() + from ..models.async_api_call import AsyncApiCall + items = cast(List[AsyncApiCall], d.pop("items", UNSET)) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if items is not UNSET: - field_dict["items"] = items - if next_page is not UNSET: - field_dict["next_page"] = next_page + next_page = d.pop("next_page", UNSET) - return field_dict - @classmethod - def from_dict(cls: Type[BS], src_dict: Dict[str, Any]) -> BS: - d = src_dict.copy() - from ..models.async_api_call import AsyncApiCall + async_api_call_results_page = cls( + items= items, + next_page= next_page, + ) - items = cast(List[AsyncApiCall], d.pop("items", UNSET)) + async_api_call_results_page.additional_properties = d + return async_api_call_results_page - next_page = d.pop("next_page", UNSET) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - async_api_call_results_page = cls( - items=items, - next_page=next_page, - ) + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - async_api_call_results_page.additional_properties = d - return async_api_call_results_page + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - 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 + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/async_api_call_type.py b/kittycad/models/async_api_call_type.py index 12870e17c..1a6c99161 100644 --- a/kittycad/models/async_api_call_type.py +++ b/kittycad/models/async_api_call_type.py @@ -2,20 +2,19 @@ from enum import Enum class AsyncApiCallType(str, Enum): - """The type of async API call.""" # noqa: E501 + """ The type of async API call. """ # noqa: E501 + """# File conversion. """ # noqa: E501 + FILE_CONVERSION = 'file_conversion' + """# File volume. """ # noqa: E501 + FILE_VOLUME = 'file_volume' + """# File center of mass. """ # noqa: E501 + FILE_CENTER_OF_MASS = 'file_center_of_mass' + """# File mass. """ # noqa: E501 + FILE_MASS = 'file_mass' + """# File density. """ # noqa: E501 + FILE_DENSITY = 'file_density' + """# File surface area. """ # noqa: E501 + FILE_SURFACE_AREA = 'file_surface_area' - """# File conversion. """ # noqa: E501 - FILE_CONVERSION = "file_conversion" - """# File volume. """ # noqa: E501 - FILE_VOLUME = "file_volume" - """# File center of mass. """ # noqa: E501 - FILE_CENTER_OF_MASS = "file_center_of_mass" - """# File mass. """ # noqa: E501 - FILE_MASS = "file_mass" - """# File density. """ # noqa: E501 - FILE_DENSITY = "file_density" - """# File surface area. """ # noqa: E501 - FILE_SURFACE_AREA = "file_surface_area" - - def __str__(self) -> str: - return str(self.value) + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/axis.py b/kittycad/models/axis.py index e8d15f3f7..595ed4f03 100644 --- a/kittycad/models/axis.py +++ b/kittycad/models/axis.py @@ -2,17 +2,15 @@ from enum import Enum class Axis(str, Enum): - """Co-ordinate axis specifier. + """ Co-ordinate axis specifier. - See [cglearn.eu] for background reading. +See [cglearn.eu] for background reading. - [cglearn.eu]: https://cglearn.eu/pub/computer-graphics/introduction-to-geometry#material-coordinate-systems-1 - """ # noqa: E501 +[cglearn.eu]: https://cglearn.eu/pub/computer-graphics/introduction-to-geometry#material-coordinate-systems-1 """ # noqa: E501 + """# 'Y' axis. """ # noqa: E501 + Y = 'y' + """# 'Z' axis. """ # noqa: E501 + Z = 'z' - """# 'Y' axis. """ # noqa: E501 - Y = "y" - """# 'Z' axis. """ # noqa: E501 - Z = "z" - - def __str__(self) -> str: - return str(self.value) + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/axis_direction_pair.py b/kittycad/models/axis_direction_pair.py index 460ac860f..8ada17a0b 100644 --- a/kittycad/models/axis_direction_pair.py +++ b/kittycad/models/axis_direction_pair.py @@ -8,69 +8,68 @@ from ..types import UNSET, Unset AH = TypeVar("AH", bound="AxisDirectionPair") - @attr.s(auto_attribs=True) class AxisDirectionPair: - """An [`Axis`] paired with a [`Direction`].""" # noqa: E501 + """ An [`Axis`] paired with a [`Direction`]. """ # noqa: E501 + axis: Union[Unset, Axis] = UNSET + direction: Union[Unset, Direction] = UNSET - axis: Union[Unset, Axis] = UNSET - direction: Union[Unset, Direction] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.axis, Unset): + axis = self.axis + if not isinstance(self.direction, Unset): + direction = self.direction - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.axis, Unset): - axis = self.axis - if not isinstance(self.direction, Unset): - direction = self.direction + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if axis is not UNSET: + field_dict['axis'] = axis + if direction is not UNSET: + field_dict['direction'] = direction - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if axis is not UNSET: - field_dict["axis"] = axis - if direction is not UNSET: - field_dict["direction"] = direction + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[AH], src_dict: Dict[str, Any]) -> AH: + d = src_dict.copy() + _axis = d.pop("axis", UNSET) + axis: Union[Unset, Axis] + if isinstance(_axis, Unset): + axis = UNSET + else: + axis = _axis # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[AH], src_dict: Dict[str, Any]) -> AH: - d = src_dict.copy() - _axis = d.pop("axis", UNSET) - axis: Union[Unset, Axis] - if isinstance(_axis, Unset): - axis = UNSET - else: - axis = _axis # type: ignore[arg-type] + _direction = d.pop("direction", UNSET) + direction: Union[Unset, Direction] + if isinstance(_direction, Unset): + direction = UNSET + else: + direction = _direction # type: ignore[arg-type] - _direction = d.pop("direction", UNSET) - direction: Union[Unset, Direction] - if isinstance(_direction, Unset): - direction = UNSET - else: - direction = _direction # type: ignore[arg-type] - axis_direction_pair = cls( - axis=axis, - direction=direction, - ) + axis_direction_pair = cls( + axis= axis, + direction= direction, + ) - axis_direction_pair.additional_properties = d - return axis_direction_pair + axis_direction_pair.additional_properties = d + return axis_direction_pair - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/billing_info.py b/kittycad/models/billing_info.py index 949d764c9..1f2bbe357 100644 --- a/kittycad/models/billing_info.py +++ b/kittycad/models/billing_info.py @@ -7,70 +7,69 @@ from ..types import UNSET, Unset EG = TypeVar("EG", bound="BillingInfo") - @attr.s(auto_attribs=True) class BillingInfo: - """The billing information for payments.""" # noqa: E501 + """ The billing information for payments. """ # noqa: E501 + address: Union[Unset, NewAddress] = UNSET + name: Union[Unset, str] = UNSET + phone: Union[Unset, str] = UNSET - address: Union[Unset, NewAddress] = UNSET - name: Union[Unset, str] = UNSET - phone: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.address, Unset): + address = self.address + name = self.name + phone = self.phone - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.address, Unset): - address = self.address - name = self.name - phone = self.phone + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if address is not UNSET: + field_dict['address'] = address + if name is not UNSET: + field_dict['name'] = name + if phone is not UNSET: + field_dict['phone'] = phone - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if address is not UNSET: - field_dict["address"] = address - if name is not UNSET: - field_dict["name"] = name - if phone is not UNSET: - field_dict["phone"] = phone + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[EG], src_dict: Dict[str, Any]) -> EG: + d = src_dict.copy() + _address = d.pop("address", UNSET) + address: Union[Unset, NewAddress] + if isinstance(_address, Unset): + address = UNSET + else: + address = _address # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[EG], src_dict: Dict[str, Any]) -> EG: - d = src_dict.copy() - _address = d.pop("address", UNSET) - address: Union[Unset, NewAddress] - if isinstance(_address, Unset): - address = UNSET - else: - address = _address # type: ignore[arg-type] + name = d.pop("name", UNSET) - name = d.pop("name", UNSET) + phone = d.pop("phone", UNSET) - phone = d.pop("phone", UNSET) - billing_info = cls( - address=address, - name=name, - phone=phone, - ) + billing_info = cls( + address= address, + name= name, + phone= phone, + ) - billing_info.additional_properties = d - return billing_info + billing_info.additional_properties = d + return billing_info - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/cache_metadata.py b/kittycad/models/cache_metadata.py index 4044a5851..d5dd0743c 100644 --- a/kittycad/models/cache_metadata.py +++ b/kittycad/models/cache_metadata.py @@ -6,52 +6,51 @@ from ..types import UNSET, Unset JR = TypeVar("JR", bound="CacheMetadata") - @attr.s(auto_attribs=True) class CacheMetadata: - """Metadata about our cache. + """ Metadata about our cache. - This is mostly used for internal purposes and debugging.""" # noqa: E501 +This is mostly used for internal purposes and debugging. """ # noqa: E501 + ok: Union[Unset, bool] = False - ok: Union[Unset, bool] = False + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + ok = self.ok - def to_dict(self) -> Dict[str, Any]: - ok = self.ok + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if ok is not UNSET: + field_dict['ok'] = ok - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if ok is not UNSET: - field_dict["ok"] = ok + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[JR], src_dict: Dict[str, Any]) -> JR: + d = src_dict.copy() + ok = d.pop("ok", UNSET) - @classmethod - def from_dict(cls: Type[JR], src_dict: Dict[str, Any]) -> JR: - d = src_dict.copy() - ok = d.pop("ok", UNSET) - cache_metadata = cls( - ok=ok, - ) + cache_metadata = cls( + ok= ok, + ) - cache_metadata.additional_properties = d - return cache_metadata + cache_metadata.additional_properties = d + return cache_metadata - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/camera_drag_interaction_type.py b/kittycad/models/camera_drag_interaction_type.py index 9de78e7fc..186cc0e7d 100644 --- a/kittycad/models/camera_drag_interaction_type.py +++ b/kittycad/models/camera_drag_interaction_type.py @@ -2,14 +2,13 @@ from enum import Enum class CameraDragInteractionType(str, Enum): - """The type of camera drag interaction.""" # noqa: E501 + """ The type of camera drag interaction. """ # noqa: E501 + """# Camera pan """ # noqa: E501 + PAN = 'pan' + """# Camera rotate (revolve/orbit) """ # noqa: E501 + ROTATE = 'rotate' + """# Camera zoom (increase or decrease distance to reference point center) """ # noqa: E501 + ZOOM = 'zoom' - """# Camera pan """ # noqa: E501 - PAN = "pan" - """# Camera rotate (revolve/orbit) """ # noqa: E501 - ROTATE = "rotate" - """# Camera zoom (increase or decrease distance to reference point center) """ # noqa: E501 - ZOOM = "zoom" - - def __str__(self) -> str: - return str(self.value) + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/card_details.py b/kittycad/models/card_details.py index 72ec18f06..47fd6791c 100644 --- a/kittycad/models/card_details.py +++ b/kittycad/models/card_details.py @@ -7,105 +7,104 @@ from ..types import UNSET, Unset LY = TypeVar("LY", bound="CardDetails") - @attr.s(auto_attribs=True) class CardDetails: - """The card details of a payment method.""" # noqa: E501 + """ The card details of a payment method. """ # noqa: E501 + brand: Union[Unset, str] = UNSET + checks: Union[Unset, PaymentMethodCardChecks] = UNSET + country: Union[Unset, str] = UNSET + exp_month: Union[Unset, int] = UNSET + exp_year: Union[Unset, int] = UNSET + fingerprint: Union[Unset, str] = UNSET + funding: Union[Unset, str] = UNSET + last4: Union[Unset, str] = UNSET - brand: Union[Unset, str] = UNSET - checks: Union[Unset, PaymentMethodCardChecks] = UNSET - country: Union[Unset, str] = UNSET - exp_month: Union[Unset, int] = UNSET - exp_year: Union[Unset, int] = UNSET - fingerprint: Union[Unset, str] = UNSET - funding: Union[Unset, str] = UNSET - last4: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + brand = self.brand + if not isinstance(self.checks, Unset): + checks = self.checks + country = self.country + exp_month = self.exp_month + exp_year = self.exp_year + fingerprint = self.fingerprint + funding = self.funding + last4 = self.last4 - def to_dict(self) -> Dict[str, Any]: - brand = self.brand - if not isinstance(self.checks, Unset): - checks = self.checks - country = self.country - exp_month = self.exp_month - exp_year = self.exp_year - fingerprint = self.fingerprint - funding = self.funding - last4 = self.last4 + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if brand is not UNSET: + field_dict['brand'] = brand + if checks is not UNSET: + field_dict['checks'] = checks + if country is not UNSET: + field_dict['country'] = country + if exp_month is not UNSET: + field_dict['exp_month'] = exp_month + if exp_year is not UNSET: + field_dict['exp_year'] = exp_year + if fingerprint is not UNSET: + field_dict['fingerprint'] = fingerprint + if funding is not UNSET: + field_dict['funding'] = funding + if last4 is not UNSET: + field_dict['last4'] = last4 - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if brand is not UNSET: - field_dict["brand"] = brand - if checks is not UNSET: - field_dict["checks"] = checks - if country is not UNSET: - field_dict["country"] = country - if exp_month is not UNSET: - field_dict["exp_month"] = exp_month - if exp_year is not UNSET: - field_dict["exp_year"] = exp_year - if fingerprint is not UNSET: - field_dict["fingerprint"] = fingerprint - if funding is not UNSET: - field_dict["funding"] = funding - if last4 is not UNSET: - field_dict["last4"] = last4 + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[LY], src_dict: Dict[str, Any]) -> LY: + d = src_dict.copy() + brand = d.pop("brand", UNSET) - @classmethod - def from_dict(cls: Type[LY], src_dict: Dict[str, Any]) -> LY: - d = src_dict.copy() - brand = d.pop("brand", UNSET) + _checks = d.pop("checks", UNSET) + checks: Union[Unset, PaymentMethodCardChecks] + if isinstance(_checks, Unset): + checks = UNSET + else: + checks = _checks # type: ignore[arg-type] - _checks = d.pop("checks", UNSET) - checks: Union[Unset, PaymentMethodCardChecks] - if isinstance(_checks, Unset): - checks = UNSET - else: - checks = _checks # type: ignore[arg-type] + country = d.pop("country", UNSET) - country = d.pop("country", UNSET) + exp_month = d.pop("exp_month", UNSET) - exp_month = d.pop("exp_month", UNSET) + exp_year = d.pop("exp_year", UNSET) - exp_year = d.pop("exp_year", UNSET) + fingerprint = d.pop("fingerprint", UNSET) - fingerprint = d.pop("fingerprint", UNSET) + funding = d.pop("funding", UNSET) - funding = d.pop("funding", UNSET) + last4 = d.pop("last4", UNSET) - last4 = d.pop("last4", UNSET) - card_details = cls( - brand=brand, - checks=checks, - country=country, - exp_month=exp_month, - exp_year=exp_year, - fingerprint=fingerprint, - funding=funding, - last4=last4, - ) + card_details = cls( + brand= brand, + checks= checks, + country= country, + exp_month= exp_month, + exp_year= exp_year, + fingerprint= fingerprint, + funding= funding, + last4= last4, + ) - card_details.additional_properties = d - return card_details + card_details.additional_properties = d + return card_details - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/center_of_mass.py b/kittycad/models/center_of_mass.py index bc35dec19..88ca59121 100644 --- a/kittycad/models/center_of_mass.py +++ b/kittycad/models/center_of_mass.py @@ -8,69 +8,68 @@ from ..types import UNSET, Unset HK = TypeVar("HK", bound="CenterOfMass") - @attr.s(auto_attribs=True) class CenterOfMass: - """The center of mass response.""" # noqa: E501 + """ The center of mass response. """ # noqa: E501 + center_of_mass: Union[Unset, Point3d] = UNSET + output_unit: Union[Unset, UnitLength] = UNSET - center_of_mass: Union[Unset, Point3d] = UNSET - output_unit: Union[Unset, UnitLength] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.center_of_mass, Unset): + center_of_mass = self.center_of_mass + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.center_of_mass, Unset): - center_of_mass = self.center_of_mass - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if center_of_mass is not UNSET: + field_dict['center_of_mass'] = center_of_mass + if output_unit is not UNSET: + field_dict['output_unit'] = output_unit - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if center_of_mass is not UNSET: - field_dict["center_of_mass"] = center_of_mass - if output_unit is not UNSET: - field_dict["output_unit"] = output_unit + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[HK], src_dict: Dict[str, Any]) -> HK: + d = src_dict.copy() + _center_of_mass = d.pop("center_of_mass", UNSET) + center_of_mass: Union[Unset, Point3d] + if isinstance(_center_of_mass, Unset): + center_of_mass = UNSET + else: + center_of_mass = _center_of_mass # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[HK], src_dict: Dict[str, Any]) -> HK: - d = src_dict.copy() - _center_of_mass = d.pop("center_of_mass", UNSET) - center_of_mass: Union[Unset, Point3d] - if isinstance(_center_of_mass, Unset): - center_of_mass = UNSET - else: - center_of_mass = _center_of_mass # type: ignore[arg-type] + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitLength] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitLength] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] - center_of_mass = cls( - center_of_mass=center_of_mass, - output_unit=output_unit, - ) + center_of_mass = cls( + center_of_mass= center_of_mass, + output_unit= output_unit, + ) - center_of_mass.additional_properties = d - return center_of_mass + center_of_mass.additional_properties = d + return center_of_mass - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/client_metrics.py b/kittycad/models/client_metrics.py index 65e97989a..22ae51239 100644 --- a/kittycad/models/client_metrics.py +++ b/kittycad/models/client_metrics.py @@ -6,101 +6,98 @@ from ..types import UNSET, Unset VR = TypeVar("VR", bound="ClientMetrics") - @attr.s(auto_attribs=True) class ClientMetrics: - """ClientMetrics contains information regarding the state of the peer.""" # noqa: E501 + """ ClientMetrics contains information regarding the state of the peer. """ # noqa: E501 + rtc_frames_decoded: Union[Unset, int] = UNSET + rtc_frames_dropped: Union[Unset, int] = UNSET + rtc_frames_per_second: Union[Unset, int] = UNSET + rtc_frames_received: Union[Unset, int] = UNSET + rtc_freeze_count: Union[Unset, int] = UNSET + rtc_jitter_sec: Union[Unset, float] = UNSET + rtc_keyframes_decoded: Union[Unset, int] = UNSET + rtc_total_freezes_duration_sec: Union[Unset, float] = UNSET - rtc_frames_decoded: Union[Unset, int] = UNSET - rtc_frames_dropped: Union[Unset, int] = UNSET - rtc_frames_per_second: Union[Unset, int] = UNSET - rtc_frames_received: Union[Unset, int] = UNSET - rtc_freeze_count: Union[Unset, int] = UNSET - rtc_jitter_sec: Union[Unset, float] = UNSET - rtc_keyframes_decoded: Union[Unset, int] = UNSET - rtc_total_freezes_duration_sec: Union[Unset, float] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + rtc_frames_decoded = self.rtc_frames_decoded + rtc_frames_dropped = self.rtc_frames_dropped + rtc_frames_per_second = self.rtc_frames_per_second + rtc_frames_received = self.rtc_frames_received + rtc_freeze_count = self.rtc_freeze_count + rtc_jitter_sec = self.rtc_jitter_sec + rtc_keyframes_decoded = self.rtc_keyframes_decoded + rtc_total_freezes_duration_sec = self.rtc_total_freezes_duration_sec - def to_dict(self) -> Dict[str, Any]: - rtc_frames_decoded = self.rtc_frames_decoded - rtc_frames_dropped = self.rtc_frames_dropped - rtc_frames_per_second = self.rtc_frames_per_second - rtc_frames_received = self.rtc_frames_received - rtc_freeze_count = self.rtc_freeze_count - rtc_jitter_sec = self.rtc_jitter_sec - rtc_keyframes_decoded = self.rtc_keyframes_decoded - rtc_total_freezes_duration_sec = self.rtc_total_freezes_duration_sec + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if rtc_frames_decoded is not UNSET: + field_dict['rtc_frames_decoded'] = rtc_frames_decoded + if rtc_frames_dropped is not UNSET: + field_dict['rtc_frames_dropped'] = rtc_frames_dropped + if rtc_frames_per_second is not UNSET: + field_dict['rtc_frames_per_second'] = rtc_frames_per_second + if rtc_frames_received is not UNSET: + field_dict['rtc_frames_received'] = rtc_frames_received + if rtc_freeze_count is not UNSET: + field_dict['rtc_freeze_count'] = rtc_freeze_count + if rtc_jitter_sec is not UNSET: + field_dict['rtc_jitter_sec'] = rtc_jitter_sec + if rtc_keyframes_decoded is not UNSET: + field_dict['rtc_keyframes_decoded'] = rtc_keyframes_decoded + if rtc_total_freezes_duration_sec is not UNSET: + field_dict['rtc_total_freezes_duration_sec'] = rtc_total_freezes_duration_sec - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if rtc_frames_decoded is not UNSET: - field_dict["rtc_frames_decoded"] = rtc_frames_decoded - if rtc_frames_dropped is not UNSET: - field_dict["rtc_frames_dropped"] = rtc_frames_dropped - if rtc_frames_per_second is not UNSET: - field_dict["rtc_frames_per_second"] = rtc_frames_per_second - if rtc_frames_received is not UNSET: - field_dict["rtc_frames_received"] = rtc_frames_received - if rtc_freeze_count is not UNSET: - field_dict["rtc_freeze_count"] = rtc_freeze_count - if rtc_jitter_sec is not UNSET: - field_dict["rtc_jitter_sec"] = rtc_jitter_sec - if rtc_keyframes_decoded is not UNSET: - field_dict["rtc_keyframes_decoded"] = rtc_keyframes_decoded - if rtc_total_freezes_duration_sec is not UNSET: - field_dict[ - "rtc_total_freezes_duration_sec" - ] = rtc_total_freezes_duration_sec + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[VR], src_dict: Dict[str, Any]) -> VR: + d = src_dict.copy() + rtc_frames_decoded = d.pop("rtc_frames_decoded", UNSET) - @classmethod - def from_dict(cls: Type[VR], src_dict: Dict[str, Any]) -> VR: - d = src_dict.copy() - rtc_frames_decoded = d.pop("rtc_frames_decoded", UNSET) + rtc_frames_dropped = d.pop("rtc_frames_dropped", UNSET) - rtc_frames_dropped = d.pop("rtc_frames_dropped", UNSET) + rtc_frames_per_second = d.pop("rtc_frames_per_second", UNSET) - rtc_frames_per_second = d.pop("rtc_frames_per_second", UNSET) + rtc_frames_received = d.pop("rtc_frames_received", UNSET) - rtc_frames_received = d.pop("rtc_frames_received", UNSET) + rtc_freeze_count = d.pop("rtc_freeze_count", UNSET) - rtc_freeze_count = d.pop("rtc_freeze_count", UNSET) + rtc_jitter_sec = d.pop("rtc_jitter_sec", UNSET) - rtc_jitter_sec = d.pop("rtc_jitter_sec", UNSET) + rtc_keyframes_decoded = d.pop("rtc_keyframes_decoded", UNSET) - rtc_keyframes_decoded = d.pop("rtc_keyframes_decoded", UNSET) + rtc_total_freezes_duration_sec = d.pop("rtc_total_freezes_duration_sec", UNSET) - rtc_total_freezes_duration_sec = d.pop("rtc_total_freezes_duration_sec", UNSET) - client_metrics = cls( - rtc_frames_decoded=rtc_frames_decoded, - rtc_frames_dropped=rtc_frames_dropped, - rtc_frames_per_second=rtc_frames_per_second, - rtc_frames_received=rtc_frames_received, - rtc_freeze_count=rtc_freeze_count, - rtc_jitter_sec=rtc_jitter_sec, - rtc_keyframes_decoded=rtc_keyframes_decoded, - rtc_total_freezes_duration_sec=rtc_total_freezes_duration_sec, - ) + client_metrics = cls( + rtc_frames_decoded= rtc_frames_decoded, + rtc_frames_dropped= rtc_frames_dropped, + rtc_frames_per_second= rtc_frames_per_second, + rtc_frames_received= rtc_frames_received, + rtc_freeze_count= rtc_freeze_count, + rtc_jitter_sec= rtc_jitter_sec, + rtc_keyframes_decoded= rtc_keyframes_decoded, + rtc_total_freezes_duration_sec= rtc_total_freezes_duration_sec, + ) - client_metrics.additional_properties = d - return client_metrics + client_metrics.additional_properties = d + return client_metrics - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/cluster.py b/kittycad/models/cluster.py index 448173366..5c5a5ab72 100644 --- a/kittycad/models/cluster.py +++ b/kittycad/models/cluster.py @@ -6,87 +6,86 @@ from ..types import UNSET, Unset ON = TypeVar("ON", bound="Cluster") - @attr.s(auto_attribs=True) class Cluster: - """Cluster information.""" # noqa: E501 + """ Cluster information. """ # noqa: E501 + addr: Union[Unset, str] = UNSET + auth_timeout: Union[Unset, int] = UNSET + cluster_port: Union[Unset, int] = UNSET + name: Union[Unset, str] = UNSET + tls_timeout: Union[Unset, int] = UNSET + urls: Union[Unset, List[str]] = UNSET - addr: Union[Unset, str] = UNSET - auth_timeout: Union[Unset, int] = UNSET - cluster_port: Union[Unset, int] = UNSET - name: Union[Unset, str] = UNSET - tls_timeout: Union[Unset, int] = UNSET - urls: Union[Unset, List[str]] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + addr = self.addr + auth_timeout = self.auth_timeout + cluster_port = self.cluster_port + name = self.name + tls_timeout = self.tls_timeout + urls: Union[Unset, List[str]] = UNSET + if not isinstance(self.urls, Unset): + urls = self.urls - def to_dict(self) -> Dict[str, Any]: - addr = self.addr - auth_timeout = self.auth_timeout - cluster_port = self.cluster_port - name = self.name - tls_timeout = self.tls_timeout - urls: Union[Unset, List[str]] = UNSET - if not isinstance(self.urls, Unset): - urls = self.urls + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if addr is not UNSET: + field_dict['addr'] = addr + if auth_timeout is not UNSET: + field_dict['auth_timeout'] = auth_timeout + if cluster_port is not UNSET: + field_dict['cluster_port'] = cluster_port + if name is not UNSET: + field_dict['name'] = name + if tls_timeout is not UNSET: + field_dict['tls_timeout'] = tls_timeout + if urls is not UNSET: + field_dict['urls'] = urls - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if addr is not UNSET: - field_dict["addr"] = addr - if auth_timeout is not UNSET: - field_dict["auth_timeout"] = auth_timeout - if cluster_port is not UNSET: - field_dict["cluster_port"] = cluster_port - if name is not UNSET: - field_dict["name"] = name - if tls_timeout is not UNSET: - field_dict["tls_timeout"] = tls_timeout - if urls is not UNSET: - field_dict["urls"] = urls + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[ON], src_dict: Dict[str, Any]) -> ON: + d = src_dict.copy() + addr = d.pop("addr", UNSET) - @classmethod - def from_dict(cls: Type[ON], src_dict: Dict[str, Any]) -> ON: - d = src_dict.copy() - addr = d.pop("addr", UNSET) + auth_timeout = d.pop("auth_timeout", UNSET) - auth_timeout = d.pop("auth_timeout", UNSET) + cluster_port = d.pop("cluster_port", UNSET) - cluster_port = d.pop("cluster_port", UNSET) + name = d.pop("name", UNSET) - name = d.pop("name", UNSET) + tls_timeout = d.pop("tls_timeout", UNSET) - tls_timeout = d.pop("tls_timeout", UNSET) + urls = cast(List[str], d.pop("urls", UNSET)) - urls = cast(List[str], d.pop("urls", UNSET)) - cluster = cls( - addr=addr, - auth_timeout=auth_timeout, - cluster_port=cluster_port, - name=name, - tls_timeout=tls_timeout, - urls=urls, - ) + cluster = cls( + addr= addr, + auth_timeout= auth_timeout, + cluster_port= cluster_port, + name= name, + tls_timeout= tls_timeout, + urls= urls, + ) - cluster.additional_properties = d - return cluster + cluster.additional_properties = d + return cluster - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/code_language.py b/kittycad/models/code_language.py index 43088c5c3..29527e01d 100644 --- a/kittycad/models/code_language.py +++ b/kittycad/models/code_language.py @@ -2,14 +2,13 @@ from enum import Enum class CodeLanguage(str, Enum): - """The language code is written in.""" # noqa: E501 + """ The language code is written in. """ # noqa: E501 + """# The `go` programming language. """ # noqa: E501 + GO = 'go' + """# The `python` programming language. """ # noqa: E501 + PYTHON = 'python' + """# The `node` programming language. """ # noqa: E501 + NODE = 'node' - """# The `go` programming language. """ # noqa: E501 - GO = "go" - """# The `python` programming language. """ # noqa: E501 - PYTHON = "python" - """# The `node` programming language. """ # noqa: E501 - NODE = "node" - - def __str__(self) -> str: - return str(self.value) + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/code_output.py b/kittycad/models/code_output.py index 882922e40..733801496 100644 --- a/kittycad/models/code_output.py +++ b/kittycad/models/code_output.py @@ -6,72 +6,68 @@ from ..types import UNSET, Unset PC = TypeVar("PC", bound="CodeOutput") - @attr.s(auto_attribs=True) class CodeOutput: - """Output of the code being executed.""" # noqa: E501 + """ Output of the code being executed. """ # noqa: E501 + from ..models.output_file import OutputFile + output_files: Union[Unset, List[OutputFile]] = UNSET + stderr: Union[Unset, str] = UNSET + stdout: Union[Unset, str] = UNSET - from ..models.output_file import OutputFile + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - output_files: Union[Unset, List[OutputFile]] = UNSET - stderr: Union[Unset, str] = UNSET - stdout: Union[Unset, str] = UNSET + def to_dict(self) -> Dict[str, Any]: + from ..models.output_file import OutputFile + output_files: Union[Unset, List[OutputFile]] = UNSET + if not isinstance(self.output_files, Unset): + output_files = self.output_files + stderr = self.stderr + stdout = self.stdout - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if output_files is not UNSET: + field_dict['output_files'] = output_files + if stderr is not UNSET: + field_dict['stderr'] = stderr + if stdout is not UNSET: + field_dict['stdout'] = stdout - def to_dict(self) -> Dict[str, Any]: - from ..models.output_file import OutputFile + return field_dict - output_files: Union[Unset, List[OutputFile]] = UNSET - if not isinstance(self.output_files, Unset): - output_files = self.output_files - stderr = self.stderr - stdout = self.stdout + @classmethod + def from_dict(cls: Type[PC], src_dict: Dict[str, Any]) -> PC: + d = src_dict.copy() + from ..models.output_file import OutputFile + output_files = cast(List[OutputFile], d.pop("output_files", UNSET)) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if output_files is not UNSET: - field_dict["output_files"] = output_files - if stderr is not UNSET: - field_dict["stderr"] = stderr - if stdout is not UNSET: - field_dict["stdout"] = stdout + stderr = d.pop("stderr", UNSET) - return field_dict + stdout = d.pop("stdout", UNSET) - @classmethod - def from_dict(cls: Type[PC], src_dict: Dict[str, Any]) -> PC: - d = src_dict.copy() - from ..models.output_file import OutputFile - output_files = cast(List[OutputFile], d.pop("output_files", UNSET)) + code_output = cls( + output_files= output_files, + stderr= stderr, + stdout= stdout, + ) - stderr = d.pop("stderr", UNSET) + code_output.additional_properties = d + return code_output - stdout = d.pop("stdout", UNSET) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - code_output = cls( - output_files=output_files, - stderr=stderr, - stdout=stdout, - ) + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - code_output.additional_properties = d - return code_output + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - 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 + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/color.py b/kittycad/models/color.py index 789270305..f8004a002 100644 --- a/kittycad/models/color.py +++ b/kittycad/models/color.py @@ -6,71 +6,70 @@ from ..types import UNSET, Unset US = TypeVar("US", bound="Color") - @attr.s(auto_attribs=True) class Color: - """An RGBA color""" # noqa: E501 + """ An RGBA color """ # noqa: E501 + a: Union[Unset, float] = UNSET + b: Union[Unset, float] = UNSET + g: Union[Unset, float] = UNSET + r: Union[Unset, float] = UNSET - a: Union[Unset, float] = UNSET - b: Union[Unset, float] = UNSET - g: Union[Unset, float] = UNSET - r: Union[Unset, float] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + a = self.a + b = self.b + g = self.g + r = self.r - def to_dict(self) -> Dict[str, Any]: - a = self.a - b = self.b - g = self.g - r = self.r + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if a is not UNSET: + field_dict['a'] = a + if b is not UNSET: + field_dict['b'] = b + if g is not UNSET: + field_dict['g'] = g + if r is not UNSET: + field_dict['r'] = r - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if a is not UNSET: - field_dict["a"] = a - if b is not UNSET: - field_dict["b"] = b - if g is not UNSET: - field_dict["g"] = g - if r is not UNSET: - field_dict["r"] = r + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[US], src_dict: Dict[str, Any]) -> US: + d = src_dict.copy() + a = d.pop("a", UNSET) - @classmethod - def from_dict(cls: Type[US], src_dict: Dict[str, Any]) -> US: - d = src_dict.copy() - a = d.pop("a", UNSET) + b = d.pop("b", UNSET) - b = d.pop("b", UNSET) + g = d.pop("g", UNSET) - g = d.pop("g", UNSET) + r = d.pop("r", UNSET) - r = d.pop("r", UNSET) - color = cls( - a=a, - b=b, - g=g, - r=r, - ) + color = cls( + a= a, + b= b, + g= g, + r= r, + ) - color.additional_properties = d - return color + color.additional_properties = d + return color - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/connection.py b/kittycad/models/connection.py index b643b4bd7..884796971 100644 --- a/kittycad/models/connection.py +++ b/kittycad/models/connection.py @@ -12,413 +12,412 @@ from ..types import UNSET, Unset KQ = TypeVar("KQ", bound="Connection") - @attr.s(auto_attribs=True) class Connection: - """Metadata about a pub-sub connection. + """ Metadata about a pub-sub connection. - This is mostly used for internal purposes and debugging.""" # noqa: E501 +This is mostly used for internal purposes and debugging. """ # noqa: E501 + auth_timeout: Union[Unset, int] = UNSET + cluster: Union[Unset, Cluster] = UNSET + config_load_time: Union[Unset, datetime.datetime] = UNSET + connections: Union[Unset, int] = UNSET + cores: Union[Unset, int] = UNSET + cpu: Union[Unset, float] = UNSET + gateway: Union[Unset, Gateway] = UNSET + git_commit: Union[Unset, str] = UNSET + go: Union[Unset, str] = UNSET + gomaxprocs: Union[Unset, int] = UNSET + host: Union[Unset, str] = UNSET + http_base_path: Union[Unset, str] = UNSET + http_host: Union[Unset, str] = UNSET + http_port: Union[Unset, int] = UNSET + http_req_stats: Union[Unset, Dict[str, int]] = UNSET + https_port: Union[Unset, int] = UNSET + in_bytes: Union[Unset, int] = UNSET + in_msgs: Union[Unset, int] = UNSET + jetstream: Union[Unset, Jetstream] = UNSET + leaf: Union[Unset, LeafNode] = UNSET + leafnodes: Union[Unset, int] = UNSET + max_connections: Union[Unset, int] = UNSET + max_control_line: Union[Unset, int] = UNSET + max_payload: Union[Unset, int] = UNSET + max_pending: Union[Unset, int] = UNSET + mem: Union[Unset, int] = UNSET + now: Union[Unset, datetime.datetime] = UNSET + out_bytes: Union[Unset, int] = UNSET + out_msgs: Union[Unset, int] = UNSET + ping_interval: Union[Unset, int] = UNSET + ping_max: Union[Unset, int] = UNSET + port: Union[Unset, int] = UNSET + proto: Union[Unset, int] = UNSET + remotes: Union[Unset, int] = UNSET + routes: Union[Unset, int] = UNSET + server_id: Union[Unset, str] = UNSET + server_name: Union[Unset, str] = UNSET + slow_consumers: Union[Unset, int] = UNSET + start: Union[Unset, datetime.datetime] = UNSET + subscriptions: Union[Unset, int] = UNSET + system_account: Union[Unset, str] = UNSET + tls_timeout: Union[Unset, int] = UNSET + total_connections: Union[Unset, int] = UNSET + uptime: Union[Unset, str] = UNSET + version: Union[Unset, str] = UNSET + write_deadline: Union[Unset, int] = UNSET - auth_timeout: Union[Unset, int] = UNSET - cluster: Union[Unset, Cluster] = UNSET - config_load_time: Union[Unset, datetime.datetime] = UNSET - connections: Union[Unset, int] = UNSET - cores: Union[Unset, int] = UNSET - cpu: Union[Unset, float] = UNSET - gateway: Union[Unset, Gateway] = UNSET - git_commit: Union[Unset, str] = UNSET - go: Union[Unset, str] = UNSET - gomaxprocs: Union[Unset, int] = UNSET - host: Union[Unset, str] = UNSET - http_base_path: Union[Unset, str] = UNSET - http_host: Union[Unset, str] = UNSET - http_port: Union[Unset, int] = UNSET - http_req_stats: Union[Unset, Dict[str, int]] = UNSET - https_port: Union[Unset, int] = UNSET - in_bytes: Union[Unset, int] = UNSET - in_msgs: Union[Unset, int] = UNSET - jetstream: Union[Unset, Jetstream] = UNSET - leaf: Union[Unset, LeafNode] = UNSET - leafnodes: Union[Unset, int] = UNSET - max_connections: Union[Unset, int] = UNSET - max_control_line: Union[Unset, int] = UNSET - max_payload: Union[Unset, int] = UNSET - max_pending: Union[Unset, int] = UNSET - mem: Union[Unset, int] = UNSET - now: Union[Unset, datetime.datetime] = UNSET - out_bytes: Union[Unset, int] = UNSET - out_msgs: Union[Unset, int] = UNSET - ping_interval: Union[Unset, int] = UNSET - ping_max: Union[Unset, int] = UNSET - port: Union[Unset, int] = UNSET - proto: Union[Unset, int] = UNSET - remotes: Union[Unset, int] = UNSET - routes: Union[Unset, int] = UNSET - server_id: Union[Unset, str] = UNSET - server_name: Union[Unset, str] = UNSET - slow_consumers: Union[Unset, int] = UNSET - start: Union[Unset, datetime.datetime] = UNSET - subscriptions: Union[Unset, int] = UNSET - system_account: Union[Unset, str] = UNSET - tls_timeout: Union[Unset, int] = UNSET - total_connections: Union[Unset, int] = UNSET - uptime: Union[Unset, str] = UNSET - version: Union[Unset, str] = UNSET - write_deadline: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + auth_timeout = self.auth_timeout + if not isinstance(self.cluster, Unset): + cluster = self.cluster + config_load_time: Union[Unset, str] = UNSET + if not isinstance(self.config_load_time, Unset): + config_load_time = self.config_load_time.isoformat() + connections = self.connections + cores = self.cores + cpu = self.cpu + if not isinstance(self.gateway, Unset): + gateway = self.gateway + git_commit = self.git_commit + go = self.go + gomaxprocs = self.gomaxprocs + host = self.host + http_base_path = self.http_base_path + http_host = self.http_host + http_port = self.http_port + http_req_stats = self.http_req_stats - def to_dict(self) -> Dict[str, Any]: - auth_timeout = self.auth_timeout - if not isinstance(self.cluster, Unset): - cluster = self.cluster - config_load_time: Union[Unset, str] = UNSET - if not isinstance(self.config_load_time, Unset): - config_load_time = self.config_load_time.isoformat() - connections = self.connections - cores = self.cores - cpu = self.cpu - if not isinstance(self.gateway, Unset): - gateway = self.gateway - git_commit = self.git_commit - go = self.go - gomaxprocs = self.gomaxprocs - host = self.host - http_base_path = self.http_base_path - http_host = self.http_host - http_port = self.http_port - http_req_stats = self.http_req_stats + https_port = self.https_port + in_bytes = self.in_bytes + in_msgs = self.in_msgs + if not isinstance(self.jetstream, Unset): + jetstream = self.jetstream + if not isinstance(self.leaf, Unset): + leaf = self.leaf + leafnodes = self.leafnodes + max_connections = self.max_connections + max_control_line = self.max_control_line + max_payload = self.max_payload + max_pending = self.max_pending + mem = self.mem + now: Union[Unset, str] = UNSET + if not isinstance(self.now, Unset): + now = self.now.isoformat() + out_bytes = self.out_bytes + out_msgs = self.out_msgs + ping_interval = self.ping_interval + ping_max = self.ping_max + port = self.port + proto = self.proto + remotes = self.remotes + routes = self.routes + server_id = self.server_id + server_name = self.server_name + slow_consumers = self.slow_consumers + start: Union[Unset, str] = UNSET + if not isinstance(self.start, Unset): + start = self.start.isoformat() + subscriptions = self.subscriptions + system_account = self.system_account + tls_timeout = self.tls_timeout + total_connections = self.total_connections + uptime = self.uptime + version = self.version + write_deadline = self.write_deadline - https_port = self.https_port - in_bytes = self.in_bytes - in_msgs = self.in_msgs - if not isinstance(self.jetstream, Unset): - jetstream = self.jetstream - if not isinstance(self.leaf, Unset): - leaf = self.leaf - leafnodes = self.leafnodes - max_connections = self.max_connections - max_control_line = self.max_control_line - max_payload = self.max_payload - max_pending = self.max_pending - mem = self.mem - now: Union[Unset, str] = UNSET - if not isinstance(self.now, Unset): - now = self.now.isoformat() - out_bytes = self.out_bytes - out_msgs = self.out_msgs - ping_interval = self.ping_interval - ping_max = self.ping_max - port = self.port - proto = self.proto - remotes = self.remotes - routes = self.routes - server_id = self.server_id - server_name = self.server_name - slow_consumers = self.slow_consumers - start: Union[Unset, str] = UNSET - if not isinstance(self.start, Unset): - start = self.start.isoformat() - subscriptions = self.subscriptions - system_account = self.system_account - tls_timeout = self.tls_timeout - total_connections = self.total_connections - uptime = self.uptime - version = self.version - write_deadline = self.write_deadline + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if auth_timeout is not UNSET: + field_dict['auth_timeout'] = auth_timeout + if cluster is not UNSET: + field_dict['cluster'] = cluster + if config_load_time is not UNSET: + field_dict['config_load_time'] = config_load_time + if connections is not UNSET: + field_dict['connections'] = connections + if cores is not UNSET: + field_dict['cores'] = cores + if cpu is not UNSET: + field_dict['cpu'] = cpu + if gateway is not UNSET: + field_dict['gateway'] = gateway + if git_commit is not UNSET: + field_dict['git_commit'] = git_commit + if go is not UNSET: + field_dict['go'] = go + if gomaxprocs is not UNSET: + field_dict['gomaxprocs'] = gomaxprocs + if host is not UNSET: + field_dict['host'] = host + if http_base_path is not UNSET: + field_dict['http_base_path'] = http_base_path + if http_host is not UNSET: + field_dict['http_host'] = http_host + if http_port is not UNSET: + field_dict['http_port'] = http_port + if http_req_stats is not UNSET: + field_dict['http_req_stats'] = http_req_stats + if https_port is not UNSET: + field_dict['https_port'] = https_port + if in_bytes is not UNSET: + field_dict['in_bytes'] = in_bytes + if in_msgs is not UNSET: + field_dict['in_msgs'] = in_msgs + if jetstream is not UNSET: + field_dict['jetstream'] = jetstream + if leaf is not UNSET: + field_dict['leaf'] = leaf + if leafnodes is not UNSET: + field_dict['leafnodes'] = leafnodes + if max_connections is not UNSET: + field_dict['max_connections'] = max_connections + if max_control_line is not UNSET: + field_dict['max_control_line'] = max_control_line + if max_payload is not UNSET: + field_dict['max_payload'] = max_payload + if max_pending is not UNSET: + field_dict['max_pending'] = max_pending + if mem is not UNSET: + field_dict['mem'] = mem + if now is not UNSET: + field_dict['now'] = now + if out_bytes is not UNSET: + field_dict['out_bytes'] = out_bytes + if out_msgs is not UNSET: + field_dict['out_msgs'] = out_msgs + if ping_interval is not UNSET: + field_dict['ping_interval'] = ping_interval + if ping_max is not UNSET: + field_dict['ping_max'] = ping_max + if port is not UNSET: + field_dict['port'] = port + if proto is not UNSET: + field_dict['proto'] = proto + if remotes is not UNSET: + field_dict['remotes'] = remotes + if routes is not UNSET: + field_dict['routes'] = routes + if server_id is not UNSET: + field_dict['server_id'] = server_id + if server_name is not UNSET: + field_dict['server_name'] = server_name + if slow_consumers is not UNSET: + field_dict['slow_consumers'] = slow_consumers + if start is not UNSET: + field_dict['start'] = start + if subscriptions is not UNSET: + field_dict['subscriptions'] = subscriptions + if system_account is not UNSET: + field_dict['system_account'] = system_account + if tls_timeout is not UNSET: + field_dict['tls_timeout'] = tls_timeout + if total_connections is not UNSET: + field_dict['total_connections'] = total_connections + if uptime is not UNSET: + field_dict['uptime'] = uptime + if version is not UNSET: + field_dict['version'] = version + if write_deadline is not UNSET: + field_dict['write_deadline'] = write_deadline - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if auth_timeout is not UNSET: - field_dict["auth_timeout"] = auth_timeout - if cluster is not UNSET: - field_dict["cluster"] = cluster - if config_load_time is not UNSET: - field_dict["config_load_time"] = config_load_time - if connections is not UNSET: - field_dict["connections"] = connections - if cores is not UNSET: - field_dict["cores"] = cores - if cpu is not UNSET: - field_dict["cpu"] = cpu - if gateway is not UNSET: - field_dict["gateway"] = gateway - if git_commit is not UNSET: - field_dict["git_commit"] = git_commit - if go is not UNSET: - field_dict["go"] = go - if gomaxprocs is not UNSET: - field_dict["gomaxprocs"] = gomaxprocs - if host is not UNSET: - field_dict["host"] = host - if http_base_path is not UNSET: - field_dict["http_base_path"] = http_base_path - if http_host is not UNSET: - field_dict["http_host"] = http_host - if http_port is not UNSET: - field_dict["http_port"] = http_port - if http_req_stats is not UNSET: - field_dict["http_req_stats"] = http_req_stats - if https_port is not UNSET: - field_dict["https_port"] = https_port - if in_bytes is not UNSET: - field_dict["in_bytes"] = in_bytes - if in_msgs is not UNSET: - field_dict["in_msgs"] = in_msgs - if jetstream is not UNSET: - field_dict["jetstream"] = jetstream - if leaf is not UNSET: - field_dict["leaf"] = leaf - if leafnodes is not UNSET: - field_dict["leafnodes"] = leafnodes - if max_connections is not UNSET: - field_dict["max_connections"] = max_connections - if max_control_line is not UNSET: - field_dict["max_control_line"] = max_control_line - if max_payload is not UNSET: - field_dict["max_payload"] = max_payload - if max_pending is not UNSET: - field_dict["max_pending"] = max_pending - if mem is not UNSET: - field_dict["mem"] = mem - if now is not UNSET: - field_dict["now"] = now - if out_bytes is not UNSET: - field_dict["out_bytes"] = out_bytes - if out_msgs is not UNSET: - field_dict["out_msgs"] = out_msgs - if ping_interval is not UNSET: - field_dict["ping_interval"] = ping_interval - if ping_max is not UNSET: - field_dict["ping_max"] = ping_max - if port is not UNSET: - field_dict["port"] = port - if proto is not UNSET: - field_dict["proto"] = proto - if remotes is not UNSET: - field_dict["remotes"] = remotes - if routes is not UNSET: - field_dict["routes"] = routes - if server_id is not UNSET: - field_dict["server_id"] = server_id - if server_name is not UNSET: - field_dict["server_name"] = server_name - if slow_consumers is not UNSET: - field_dict["slow_consumers"] = slow_consumers - if start is not UNSET: - field_dict["start"] = start - if subscriptions is not UNSET: - field_dict["subscriptions"] = subscriptions - if system_account is not UNSET: - field_dict["system_account"] = system_account - if tls_timeout is not UNSET: - field_dict["tls_timeout"] = tls_timeout - if total_connections is not UNSET: - field_dict["total_connections"] = total_connections - if uptime is not UNSET: - field_dict["uptime"] = uptime - if version is not UNSET: - field_dict["version"] = version - if write_deadline is not UNSET: - field_dict["write_deadline"] = write_deadline + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[KQ], src_dict: Dict[str, Any]) -> KQ: + d = src_dict.copy() + auth_timeout = d.pop("auth_timeout", UNSET) - @classmethod - def from_dict(cls: Type[KQ], src_dict: Dict[str, Any]) -> KQ: - d = src_dict.copy() - auth_timeout = d.pop("auth_timeout", UNSET) + _cluster = d.pop("cluster", UNSET) + cluster: Union[Unset, Cluster] + if isinstance(_cluster, Unset): + cluster = UNSET + else: + cluster = _cluster # type: ignore[arg-type] - _cluster = d.pop("cluster", UNSET) - cluster: Union[Unset, Cluster] - if isinstance(_cluster, Unset): - cluster = UNSET - else: - cluster = _cluster # type: ignore[arg-type] + _config_load_time = d.pop("config_load_time", UNSET) + config_load_time: Union[Unset, datetime.datetime] + if isinstance(_config_load_time, Unset): + config_load_time = UNSET + else: + config_load_time = isoparse(_config_load_time) - _config_load_time = d.pop("config_load_time", UNSET) - config_load_time: Union[Unset, datetime.datetime] - if isinstance(_config_load_time, Unset): - config_load_time = UNSET - else: - config_load_time = isoparse(_config_load_time) + connections = d.pop("connections", UNSET) - connections = d.pop("connections", UNSET) + cores = d.pop("cores", UNSET) - cores = d.pop("cores", UNSET) + cpu = d.pop("cpu", UNSET) - cpu = d.pop("cpu", UNSET) + _gateway = d.pop("gateway", UNSET) + gateway: Union[Unset, Gateway] + if isinstance(_gateway, Unset): + gateway = UNSET + else: + gateway = _gateway # type: ignore[arg-type] - _gateway = d.pop("gateway", UNSET) - gateway: Union[Unset, Gateway] - if isinstance(_gateway, Unset): - gateway = UNSET - else: - gateway = _gateway # type: ignore[arg-type] + git_commit = d.pop("git_commit", UNSET) - git_commit = d.pop("git_commit", UNSET) + go = d.pop("go", UNSET) - go = d.pop("go", UNSET) + gomaxprocs = d.pop("gomaxprocs", UNSET) - gomaxprocs = d.pop("gomaxprocs", UNSET) + host = d.pop("host", UNSET) - host = d.pop("host", UNSET) + http_base_path = d.pop("http_base_path", UNSET) - http_base_path = d.pop("http_base_path", UNSET) + http_host = d.pop("http_host", UNSET) - http_host = d.pop("http_host", UNSET) + http_port = d.pop("http_port", UNSET) - http_port = d.pop("http_port", UNSET) + http_req_stats = d.pop("http_req_stats", UNSET) - http_req_stats = d.pop("http_req_stats", UNSET) + https_port = d.pop("https_port", UNSET) - https_port = d.pop("https_port", UNSET) + in_bytes = d.pop("in_bytes", UNSET) - in_bytes = d.pop("in_bytes", UNSET) + in_msgs = d.pop("in_msgs", UNSET) - in_msgs = d.pop("in_msgs", UNSET) + _jetstream = d.pop("jetstream", UNSET) + jetstream: Union[Unset, Jetstream] + if isinstance(_jetstream, Unset): + jetstream = UNSET + else: + jetstream = _jetstream # type: ignore[arg-type] - _jetstream = d.pop("jetstream", UNSET) - jetstream: Union[Unset, Jetstream] - if isinstance(_jetstream, Unset): - jetstream = UNSET - else: - jetstream = _jetstream # type: ignore[arg-type] + _leaf = d.pop("leaf", UNSET) + leaf: Union[Unset, LeafNode] + if isinstance(_leaf, Unset): + leaf = UNSET + else: + leaf = _leaf # type: ignore[arg-type] - _leaf = d.pop("leaf", UNSET) - leaf: Union[Unset, LeafNode] - if isinstance(_leaf, Unset): - leaf = UNSET - else: - leaf = _leaf # type: ignore[arg-type] + leafnodes = d.pop("leafnodes", UNSET) - leafnodes = d.pop("leafnodes", UNSET) + max_connections = d.pop("max_connections", UNSET) - max_connections = d.pop("max_connections", UNSET) + max_control_line = d.pop("max_control_line", UNSET) - max_control_line = d.pop("max_control_line", UNSET) + max_payload = d.pop("max_payload", UNSET) - max_payload = d.pop("max_payload", UNSET) + max_pending = d.pop("max_pending", UNSET) - max_pending = d.pop("max_pending", UNSET) + mem = d.pop("mem", UNSET) - mem = d.pop("mem", UNSET) + _now = d.pop("now", UNSET) + now: Union[Unset, datetime.datetime] + if isinstance(_now, Unset): + now = UNSET + else: + now = isoparse(_now) - _now = d.pop("now", UNSET) - now: Union[Unset, datetime.datetime] - if isinstance(_now, Unset): - now = UNSET - else: - now = isoparse(_now) + out_bytes = d.pop("out_bytes", UNSET) - out_bytes = d.pop("out_bytes", UNSET) + out_msgs = d.pop("out_msgs", UNSET) - out_msgs = d.pop("out_msgs", UNSET) + ping_interval = d.pop("ping_interval", UNSET) - ping_interval = d.pop("ping_interval", UNSET) + ping_max = d.pop("ping_max", UNSET) - ping_max = d.pop("ping_max", UNSET) + port = d.pop("port", UNSET) - port = d.pop("port", UNSET) + proto = d.pop("proto", UNSET) - proto = d.pop("proto", UNSET) + remotes = d.pop("remotes", UNSET) - remotes = d.pop("remotes", UNSET) + routes = d.pop("routes", UNSET) - routes = d.pop("routes", UNSET) + server_id = d.pop("server_id", UNSET) - server_id = d.pop("server_id", UNSET) + server_name = d.pop("server_name", UNSET) - server_name = d.pop("server_name", UNSET) + slow_consumers = d.pop("slow_consumers", UNSET) - slow_consumers = d.pop("slow_consumers", UNSET) + _start = d.pop("start", UNSET) + start: Union[Unset, datetime.datetime] + if isinstance(_start, Unset): + start = UNSET + else: + start = isoparse(_start) - _start = d.pop("start", UNSET) - start: Union[Unset, datetime.datetime] - if isinstance(_start, Unset): - start = UNSET - else: - start = isoparse(_start) + subscriptions = d.pop("subscriptions", UNSET) - subscriptions = d.pop("subscriptions", UNSET) + system_account = d.pop("system_account", UNSET) - system_account = d.pop("system_account", UNSET) + tls_timeout = d.pop("tls_timeout", UNSET) - tls_timeout = d.pop("tls_timeout", UNSET) + total_connections = d.pop("total_connections", UNSET) - total_connections = d.pop("total_connections", UNSET) + uptime = d.pop("uptime", UNSET) - uptime = d.pop("uptime", UNSET) + version = d.pop("version", UNSET) - version = d.pop("version", UNSET) + write_deadline = d.pop("write_deadline", UNSET) - write_deadline = d.pop("write_deadline", UNSET) - connection = cls( - auth_timeout=auth_timeout, - cluster=cluster, - config_load_time=config_load_time, - connections=connections, - cores=cores, - cpu=cpu, - gateway=gateway, - git_commit=git_commit, - go=go, - gomaxprocs=gomaxprocs, - host=host, - http_base_path=http_base_path, - http_host=http_host, - http_port=http_port, - http_req_stats=http_req_stats, - https_port=https_port, - in_bytes=in_bytes, - in_msgs=in_msgs, - jetstream=jetstream, - leaf=leaf, - leafnodes=leafnodes, - max_connections=max_connections, - max_control_line=max_control_line, - max_payload=max_payload, - max_pending=max_pending, - mem=mem, - now=now, - out_bytes=out_bytes, - out_msgs=out_msgs, - ping_interval=ping_interval, - ping_max=ping_max, - port=port, - proto=proto, - remotes=remotes, - routes=routes, - server_id=server_id, - server_name=server_name, - slow_consumers=slow_consumers, - start=start, - subscriptions=subscriptions, - system_account=system_account, - tls_timeout=tls_timeout, - total_connections=total_connections, - uptime=uptime, - version=version, - write_deadline=write_deadline, - ) + connection = cls( + auth_timeout= auth_timeout, + cluster= cluster, + config_load_time= config_load_time, + connections= connections, + cores= cores, + cpu= cpu, + gateway= gateway, + git_commit= git_commit, + go= go, + gomaxprocs= gomaxprocs, + host= host, + http_base_path= http_base_path, + http_host= http_host, + http_port= http_port, + http_req_stats= http_req_stats, + https_port= https_port, + in_bytes= in_bytes, + in_msgs= in_msgs, + jetstream= jetstream, + leaf= leaf, + leafnodes= leafnodes, + max_connections= max_connections, + max_control_line= max_control_line, + max_payload= max_payload, + max_pending= max_pending, + mem= mem, + now= now, + out_bytes= out_bytes, + out_msgs= out_msgs, + ping_interval= ping_interval, + ping_max= ping_max, + port= port, + proto= proto, + remotes= remotes, + routes= routes, + server_id= server_id, + server_name= server_name, + slow_consumers= slow_consumers, + start= start, + subscriptions= subscriptions, + system_account= system_account, + tls_timeout= tls_timeout, + total_connections= total_connections, + uptime= uptime, + version= version, + write_deadline= write_deadline, + ) - connection.additional_properties = d - return connection + connection.additional_properties = d + return connection - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/country_code.py b/kittycad/models/country_code.py index f7df3965d..b3d1ed5f6 100644 --- a/kittycad/models/country_code.py +++ b/kittycad/models/country_code.py @@ -1,3 +1,4 @@ class CountryCode(str): - def __str__(self) -> str: - return self + + def __str__(self) -> str: + return self diff --git a/kittycad/models/coupon.py b/kittycad/models/coupon.py index c164ca2ac..d3af62c47 100644 --- a/kittycad/models/coupon.py +++ b/kittycad/models/coupon.py @@ -6,71 +6,70 @@ from ..types import UNSET, Unset FH = TypeVar("FH", bound="Coupon") - @attr.s(auto_attribs=True) class Coupon: - """The resource representing a Coupon.""" # noqa: E501 + """ The resource representing a Coupon. """ # noqa: E501 + amount_off: Union[Unset, float] = UNSET + deleted: Union[Unset, bool] = False + id: Union[Unset, str] = UNSET + percent_off: Union[Unset, float] = UNSET - amount_off: Union[Unset, float] = UNSET - deleted: Union[Unset, bool] = False - id: Union[Unset, str] = UNSET - percent_off: Union[Unset, float] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + amount_off = self.amount_off + deleted = self.deleted + id = self.id + percent_off = self.percent_off - def to_dict(self) -> Dict[str, Any]: - amount_off = self.amount_off - deleted = self.deleted - id = self.id - percent_off = self.percent_off + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if amount_off is not UNSET: + field_dict['amount_off'] = amount_off + if deleted is not UNSET: + field_dict['deleted'] = deleted + if id is not UNSET: + field_dict['id'] = id + if percent_off is not UNSET: + field_dict['percent_off'] = percent_off - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if amount_off is not UNSET: - field_dict["amount_off"] = amount_off - if deleted is not UNSET: - field_dict["deleted"] = deleted - if id is not UNSET: - field_dict["id"] = id - if percent_off is not UNSET: - field_dict["percent_off"] = percent_off + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[FH], src_dict: Dict[str, Any]) -> FH: + d = src_dict.copy() + amount_off = d.pop("amount_off", UNSET) - @classmethod - def from_dict(cls: Type[FH], src_dict: Dict[str, Any]) -> FH: - d = src_dict.copy() - amount_off = d.pop("amount_off", UNSET) + deleted = d.pop("deleted", UNSET) - deleted = d.pop("deleted", UNSET) + id = d.pop("id", UNSET) - id = d.pop("id", UNSET) + percent_off = d.pop("percent_off", UNSET) - percent_off = d.pop("percent_off", UNSET) - coupon = cls( - amount_off=amount_off, - deleted=deleted, - id=id, - percent_off=percent_off, - ) + coupon = cls( + amount_off= amount_off, + deleted= deleted, + id= id, + percent_off= percent_off, + ) - coupon.additional_properties = d - return coupon + coupon.additional_properties = d + return coupon - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/created_at_sort_mode.py b/kittycad/models/created_at_sort_mode.py index c76588552..1615f9355 100644 --- a/kittycad/models/created_at_sort_mode.py +++ b/kittycad/models/created_at_sort_mode.py @@ -2,14 +2,13 @@ from enum import Enum class CreatedAtSortMode(str, Enum): - """Supported set of sort modes for scanning by created_at only. + """ Supported set of sort modes for scanning by created_at only. - Currently, we only support scanning in ascending order.""" # noqa: E501 +Currently, we only support scanning in ascending order. """ # noqa: E501 + """# Sort in increasing order of "created_at". """ # noqa: E501 + CREATED_AT_ASCENDING = 'created_at_ascending' + """# Sort in decreasing order of "created_at". """ # noqa: E501 + CREATED_AT_DESCENDING = 'created_at_descending' - """# Sort in increasing order of "created_at". """ # noqa: E501 - CREATED_AT_ASCENDING = "created_at_ascending" - """# Sort in decreasing order of "created_at". """ # noqa: E501 - CREATED_AT_DESCENDING = "created_at_descending" - - def __str__(self) -> str: - return str(self.value) + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/currency.py b/kittycad/models/currency.py index 1e0e1a589..4b097a874 100644 --- a/kittycad/models/currency.py +++ b/kittycad/models/currency.py @@ -1,3 +1,4 @@ class Currency(str): - def __str__(self) -> str: - return self + + def __str__(self) -> str: + return self diff --git a/kittycad/models/curve_get_control_points.py b/kittycad/models/curve_get_control_points.py index 8467a26fc..b1d4f1949 100644 --- a/kittycad/models/curve_get_control_points.py +++ b/kittycad/models/curve_get_control_points.py @@ -6,58 +6,54 @@ from ..types import UNSET, Unset NH = TypeVar("NH", bound="CurveGetControlPoints") - @attr.s(auto_attribs=True) class CurveGetControlPoints: - """The response from the `CurveGetControlPoints` command.""" # noqa: E501 + """ The response from the `CurveGetControlPoints` command. """ # noqa: E501 + from ..models.point3d import Point3d + control_points: Union[Unset, List[Point3d]] = UNSET - from ..models.point3d import Point3d + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - control_points: Union[Unset, List[Point3d]] = UNSET + def to_dict(self) -> Dict[str, Any]: + from ..models.point3d import Point3d + control_points: Union[Unset, List[Point3d]] = UNSET + if not isinstance(self.control_points, Unset): + control_points = self.control_points - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if control_points is not UNSET: + field_dict['control_points'] = control_points - def to_dict(self) -> Dict[str, Any]: - from ..models.point3d import Point3d + return field_dict - control_points: Union[Unset, List[Point3d]] = UNSET - if not isinstance(self.control_points, Unset): - control_points = self.control_points + @classmethod + def from_dict(cls: Type[NH], src_dict: Dict[str, Any]) -> NH: + d = src_dict.copy() + from ..models.point3d import Point3d + control_points = cast(List[Point3d], d.pop("control_points", UNSET)) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if control_points is not UNSET: - field_dict["control_points"] = control_points - return field_dict + curve_get_control_points = cls( + control_points= control_points, + ) - @classmethod - def from_dict(cls: Type[NH], src_dict: Dict[str, Any]) -> NH: - d = src_dict.copy() - from ..models.point3d import Point3d + curve_get_control_points.additional_properties = d + return curve_get_control_points - control_points = cast(List[Point3d], d.pop("control_points", UNSET)) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - curve_get_control_points = cls( - control_points=control_points, - ) + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - curve_get_control_points.additional_properties = d - return curve_get_control_points + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - 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 + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/curve_get_end_points.py b/kittycad/models/curve_get_end_points.py index 9cfafdaf4..b7d3959fc 100644 --- a/kittycad/models/curve_get_end_points.py +++ b/kittycad/models/curve_get_end_points.py @@ -7,69 +7,68 @@ from ..types import UNSET, Unset BB = TypeVar("BB", bound="CurveGetEndPoints") - @attr.s(auto_attribs=True) class CurveGetEndPoints: - """Endpoints of a curve""" # noqa: E501 + """ Endpoints of a curve """ # noqa: E501 + end: Union[Unset, Point3d] = UNSET + start: Union[Unset, Point3d] = UNSET - end: Union[Unset, Point3d] = UNSET - start: Union[Unset, Point3d] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.end, Unset): + end = self.end + if not isinstance(self.start, Unset): + start = self.start - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.end, Unset): - end = self.end - if not isinstance(self.start, Unset): - start = self.start + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if end is not UNSET: + field_dict['end'] = end + if start is not UNSET: + field_dict['start'] = start - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if end is not UNSET: - field_dict["end"] = end - if start is not UNSET: - field_dict["start"] = start + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[BB], src_dict: Dict[str, Any]) -> BB: + d = src_dict.copy() + _end = d.pop("end", UNSET) + end: Union[Unset, Point3d] + if isinstance(_end, Unset): + end = UNSET + else: + end = _end # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[BB], src_dict: Dict[str, Any]) -> BB: - d = src_dict.copy() - _end = d.pop("end", UNSET) - end: Union[Unset, Point3d] - if isinstance(_end, Unset): - end = UNSET - else: - end = _end # type: ignore[arg-type] + _start = d.pop("start", UNSET) + start: Union[Unset, Point3d] + if isinstance(_start, Unset): + start = UNSET + else: + start = _start # type: ignore[arg-type] - _start = d.pop("start", UNSET) - start: Union[Unset, Point3d] - if isinstance(_start, Unset): - start = UNSET - else: - start = _start # type: ignore[arg-type] - curve_get_end_points = cls( - end=end, - start=start, - ) + curve_get_end_points = cls( + end= end, + start= start, + ) - curve_get_end_points.additional_properties = d - return curve_get_end_points + curve_get_end_points.additional_properties = d + return curve_get_end_points - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/curve_get_type.py b/kittycad/models/curve_get_type.py index dd031718b..1c1ade4c9 100644 --- a/kittycad/models/curve_get_type.py +++ b/kittycad/models/curve_get_type.py @@ -7,56 +7,55 @@ from ..types import UNSET, Unset PJ = TypeVar("PJ", bound="CurveGetType") - @attr.s(auto_attribs=True) class CurveGetType: - """The response from the `CurveGetType` command.""" # noqa: E501 + """ The response from the `CurveGetType` command. """ # noqa: E501 + curve_type: Union[Unset, CurveType] = UNSET - curve_type: Union[Unset, CurveType] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.curve_type, Unset): + curve_type = self.curve_type - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.curve_type, Unset): - curve_type = self.curve_type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if curve_type is not UNSET: + field_dict['curve_type'] = curve_type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if curve_type is not UNSET: - field_dict["curve_type"] = curve_type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[PJ], src_dict: Dict[str, Any]) -> PJ: + d = src_dict.copy() + _curve_type = d.pop("curve_type", UNSET) + curve_type: Union[Unset, CurveType] + if isinstance(_curve_type, Unset): + curve_type = UNSET + else: + curve_type = _curve_type # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[PJ], src_dict: Dict[str, Any]) -> PJ: - d = src_dict.copy() - _curve_type = d.pop("curve_type", UNSET) - curve_type: Union[Unset, CurveType] - if isinstance(_curve_type, Unset): - curve_type = UNSET - else: - curve_type = _curve_type # type: ignore[arg-type] - curve_get_type = cls( - curve_type=curve_type, - ) + curve_get_type = cls( + curve_type= curve_type, + ) - curve_get_type.additional_properties = d - return curve_get_type + curve_get_type.additional_properties = d + return curve_get_type - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/curve_type.py b/kittycad/models/curve_type.py index 2e7efc988..1e3a91539 100644 --- a/kittycad/models/curve_type.py +++ b/kittycad/models/curve_type.py @@ -2,11 +2,10 @@ from enum import Enum class CurveType(str, Enum): - """The type of Curve (embedded within path)""" # noqa: E501 + """ The type of Curve (embedded within path) """ # noqa: E501 + LINE = 'line' + ARC = 'arc' + NURBS = 'nurbs' - LINE = "line" - ARC = "arc" - NURBS = "nurbs" - - def __str__(self) -> str: - return str(self.value) + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/customer.py b/kittycad/models/customer.py index 30517045c..8a75bf0f3 100644 --- a/kittycad/models/customer.py +++ b/kittycad/models/customer.py @@ -10,133 +10,132 @@ from ..types import UNSET, Unset TV = TypeVar("TV", bound="Customer") - @attr.s(auto_attribs=True) class Customer: - """The resource representing a payment "Customer".""" # noqa: E501 + """ The resource representing a payment "Customer". """ # noqa: E501 + address: Union[Unset, NewAddress] = UNSET + balance: Union[Unset, float] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + currency: Union[Unset, Currency] = UNSET + delinquent: Union[Unset, bool] = False + email: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + metadata: Union[Unset, Dict[str, str]] = UNSET + name: Union[Unset, str] = UNSET + phone: Union[Unset, str] = UNSET - address: Union[Unset, NewAddress] = UNSET - balance: Union[Unset, float] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - currency: Union[Unset, Currency] = UNSET - delinquent: Union[Unset, bool] = False - email: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - metadata: Union[Unset, Dict[str, str]] = UNSET - name: Union[Unset, str] = UNSET - phone: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.address, Unset): + address = self.address + balance = self.balance + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + if not isinstance(self.currency, Unset): + currency = self.currency + delinquent = self.delinquent + email = self.email + id = self.id + metadata = self.metadata - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.address, Unset): - address = self.address - balance = self.balance - created_at: Union[Unset, str] = UNSET - if not isinstance(self.created_at, Unset): - created_at = self.created_at.isoformat() - if not isinstance(self.currency, Unset): - currency = self.currency - delinquent = self.delinquent - email = self.email - id = self.id - metadata = self.metadata + name = self.name + phone = self.phone - name = self.name - phone = self.phone + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if address is not UNSET: + field_dict['address'] = address + if balance is not UNSET: + field_dict['balance'] = balance + if created_at is not UNSET: + field_dict['created_at'] = created_at + if currency is not UNSET: + field_dict['currency'] = currency + if delinquent is not UNSET: + field_dict['delinquent'] = delinquent + if email is not UNSET: + field_dict['email'] = email + if id is not UNSET: + field_dict['id'] = id + if metadata is not UNSET: + field_dict['metadata'] = metadata + if name is not UNSET: + field_dict['name'] = name + if phone is not UNSET: + field_dict['phone'] = phone - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if address is not UNSET: - field_dict["address"] = address - if balance is not UNSET: - field_dict["balance"] = balance - if created_at is not UNSET: - field_dict["created_at"] = created_at - if currency is not UNSET: - field_dict["currency"] = currency - if delinquent is not UNSET: - field_dict["delinquent"] = delinquent - if email is not UNSET: - field_dict["email"] = email - if id is not UNSET: - field_dict["id"] = id - if metadata is not UNSET: - field_dict["metadata"] = metadata - if name is not UNSET: - field_dict["name"] = name - if phone is not UNSET: - field_dict["phone"] = phone + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[TV], src_dict: Dict[str, Any]) -> TV: + d = src_dict.copy() + _address = d.pop("address", UNSET) + address: Union[Unset, NewAddress] + if isinstance(_address, Unset): + address = UNSET + else: + address = _address # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[TV], src_dict: Dict[str, Any]) -> TV: - d = src_dict.copy() - _address = d.pop("address", UNSET) - address: Union[Unset, NewAddress] - if isinstance(_address, Unset): - address = UNSET - else: - address = _address # type: ignore[arg-type] + balance = d.pop("balance", UNSET) - balance = d.pop("balance", UNSET) + _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) - _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) + _currency = d.pop("currency", UNSET) + currency: Union[Unset, Currency] + if isinstance(_currency, Unset): + currency = UNSET + else: + currency = _currency # type: ignore[arg-type] - _currency = d.pop("currency", UNSET) - currency: Union[Unset, Currency] - if isinstance(_currency, Unset): - currency = UNSET - else: - currency = _currency # type: ignore[arg-type] + delinquent = d.pop("delinquent", UNSET) - delinquent = d.pop("delinquent", UNSET) + email = d.pop("email", UNSET) - email = d.pop("email", UNSET) + id = d.pop("id", UNSET) - id = d.pop("id", UNSET) + metadata = d.pop("metadata", UNSET) - metadata = d.pop("metadata", UNSET) + name = d.pop("name", UNSET) - name = d.pop("name", UNSET) + phone = d.pop("phone", UNSET) - phone = d.pop("phone", UNSET) - customer = cls( - address=address, - balance=balance, - created_at=created_at, - currency=currency, - delinquent=delinquent, - email=email, - id=id, - metadata=metadata, - name=name, - phone=phone, - ) + customer = cls( + address= address, + balance= balance, + created_at= created_at, + currency= currency, + delinquent= delinquent, + email= email, + id= id, + metadata= metadata, + name= name, + phone= phone, + ) - customer.additional_properties = d - return customer + customer.additional_properties = d + return customer - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/customer_balance.py b/kittycad/models/customer_balance.py index 325db97bc..cb4cdfebb 100644 --- a/kittycad/models/customer_balance.py +++ b/kittycad/models/customer_balance.py @@ -9,120 +9,119 @@ from ..types import UNSET, Unset CR = TypeVar("CR", bound="CustomerBalance") - @attr.s(auto_attribs=True) class CustomerBalance: - """A balance for a user. + """ A balance for a user. - This holds information about the financial balance for the user.""" # noqa: E501 +This holds information about the financial balance for the user. """ # noqa: E501 + created_at: Union[Unset, datetime.datetime] = UNSET + id: Union[Unset, str] = UNSET + monthly_credits_remaining: Union[Unset, float] = UNSET + pre_pay_cash_remaining: Union[Unset, float] = UNSET + pre_pay_credits_remaining: Union[Unset, float] = UNSET + total_due: Union[Unset, float] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - id: Union[Unset, str] = UNSET - monthly_credits_remaining: Union[Unset, float] = UNSET - pre_pay_cash_remaining: Union[Unset, float] = UNSET - pre_pay_credits_remaining: Union[Unset, float] = UNSET - total_due: Union[Unset, float] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + id = self.id + monthly_credits_remaining = self.monthly_credits_remaining + pre_pay_cash_remaining = self.pre_pay_cash_remaining + pre_pay_credits_remaining = self.pre_pay_credits_remaining + total_due = self.total_due + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id - def to_dict(self) -> Dict[str, Any]: - created_at: Union[Unset, str] = UNSET - if not isinstance(self.created_at, Unset): - created_at = self.created_at.isoformat() - id = self.id - monthly_credits_remaining = self.monthly_credits_remaining - pre_pay_cash_remaining = self.pre_pay_cash_remaining - pre_pay_credits_remaining = self.pre_pay_credits_remaining - total_due = self.total_due - 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 created_at is not UNSET: + field_dict['created_at'] = created_at + if id is not UNSET: + field_dict['id'] = id + if monthly_credits_remaining is not UNSET: + field_dict['monthly_credits_remaining'] = monthly_credits_remaining + if pre_pay_cash_remaining is not UNSET: + field_dict['pre_pay_cash_remaining'] = pre_pay_cash_remaining + if pre_pay_credits_remaining is not UNSET: + field_dict['pre_pay_credits_remaining'] = pre_pay_credits_remaining + if total_due is not UNSET: + field_dict['total_due'] = total_due + if updated_at is not UNSET: + field_dict['updated_at'] = updated_at + if user_id is not UNSET: + field_dict['user_id'] = user_id - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if created_at is not UNSET: - field_dict["created_at"] = created_at - if id is not UNSET: - field_dict["id"] = id - if monthly_credits_remaining is not UNSET: - field_dict["monthly_credits_remaining"] = monthly_credits_remaining - if pre_pay_cash_remaining is not UNSET: - field_dict["pre_pay_cash_remaining"] = pre_pay_cash_remaining - if pre_pay_credits_remaining is not UNSET: - field_dict["pre_pay_credits_remaining"] = pre_pay_credits_remaining - if total_due is not UNSET: - field_dict["total_due"] = total_due - 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 - return field_dict + @classmethod + def from_dict(cls: Type[CR], src_dict: Dict[str, Any]) -> CR: + d = src_dict.copy() + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) - @classmethod - def from_dict(cls: Type[CR], src_dict: Dict[str, Any]) -> CR: - d = src_dict.copy() - _created_at = d.pop("created_at", UNSET) - created_at: Union[Unset, datetime.datetime] - if isinstance(_created_at, Unset): - created_at = UNSET - else: - created_at = isoparse(_created_at) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # 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] + monthly_credits_remaining = d.pop("monthly_credits_remaining", UNSET) - monthly_credits_remaining = d.pop("monthly_credits_remaining", UNSET) + pre_pay_cash_remaining = d.pop("pre_pay_cash_remaining", UNSET) - pre_pay_cash_remaining = d.pop("pre_pay_cash_remaining", UNSET) + pre_pay_credits_remaining = d.pop("pre_pay_credits_remaining", UNSET) - pre_pay_credits_remaining = d.pop("pre_pay_credits_remaining", UNSET) + total_due = d.pop("total_due", UNSET) - total_due = d.pop("total_due", 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) - _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) - user_id = d.pop("user_id", UNSET) - customer_balance = cls( - created_at=created_at, - id=id, - monthly_credits_remaining=monthly_credits_remaining, - pre_pay_cash_remaining=pre_pay_cash_remaining, - pre_pay_credits_remaining=pre_pay_credits_remaining, - total_due=total_due, - updated_at=updated_at, - user_id=user_id, - ) + customer_balance = cls( + created_at= created_at, + id= id, + monthly_credits_remaining= monthly_credits_remaining, + pre_pay_cash_remaining= pre_pay_cash_remaining, + pre_pay_credits_remaining= pre_pay_credits_remaining, + total_due= total_due, + updated_at= updated_at, + user_id= user_id, + ) - customer_balance.additional_properties = d - return customer_balance + customer_balance.additional_properties = d + return customer_balance - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/density.py b/kittycad/models/density.py index 7399e0006..f5032e587 100644 --- a/kittycad/models/density.py +++ b/kittycad/models/density.py @@ -7,63 +7,62 @@ from ..types import UNSET, Unset CE = TypeVar("CE", bound="Density") - @attr.s(auto_attribs=True) class Density: - """The density response.""" # noqa: E501 + """ The density response. """ # noqa: E501 + density: Union[Unset, float] = UNSET + output_unit: Union[Unset, UnitDensity] = UNSET - density: Union[Unset, float] = UNSET - output_unit: Union[Unset, UnitDensity] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + density = self.density + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit - def to_dict(self) -> Dict[str, Any]: - density = self.density - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if density is not UNSET: + field_dict['density'] = density + if output_unit is not UNSET: + field_dict['output_unit'] = output_unit - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if density is not UNSET: - field_dict["density"] = density - if output_unit is not UNSET: - field_dict["output_unit"] = output_unit + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[CE], src_dict: Dict[str, Any]) -> CE: + d = src_dict.copy() + density = d.pop("density", UNSET) - @classmethod - def from_dict(cls: Type[CE], src_dict: Dict[str, Any]) -> CE: - d = src_dict.copy() - density = d.pop("density", UNSET) + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitDensity] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitDensity] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] - density = cls( - density=density, - output_unit=output_unit, - ) + density = cls( + density= density, + output_unit= output_unit, + ) - density.additional_properties = d - return density + density.additional_properties = d + return density - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/device_access_token_request_form.py b/kittycad/models/device_access_token_request_form.py index 0fc3746ce..b11244a34 100644 --- a/kittycad/models/device_access_token_request_form.py +++ b/kittycad/models/device_access_token_request_form.py @@ -7,70 +7,69 @@ from ..types import UNSET, Unset MS = TypeVar("MS", bound="DeviceAccessTokenRequestForm") - @attr.s(auto_attribs=True) class DeviceAccessTokenRequestForm: - """The form for a device access token request.""" # noqa: E501 + """ The form for a device access token request. """ # noqa: E501 + client_id: Union[Unset, str] = UNSET + device_code: Union[Unset, str] = UNSET + grant_type: Union[Unset, OAuth2GrantType] = UNSET - client_id: Union[Unset, str] = UNSET - device_code: Union[Unset, str] = UNSET - grant_type: Union[Unset, OAuth2GrantType] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + client_id = self.client_id + device_code = self.device_code + if not isinstance(self.grant_type, Unset): + grant_type = self.grant_type - def to_dict(self) -> Dict[str, Any]: - client_id = self.client_id - device_code = self.device_code - if not isinstance(self.grant_type, Unset): - grant_type = self.grant_type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if client_id is not UNSET: + field_dict['client_id'] = client_id + if device_code is not UNSET: + field_dict['device_code'] = device_code + if grant_type is not UNSET: + field_dict['grant_type'] = grant_type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if client_id is not UNSET: - field_dict["client_id"] = client_id - if device_code is not UNSET: - field_dict["device_code"] = device_code - if grant_type is not UNSET: - field_dict["grant_type"] = grant_type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[MS], src_dict: Dict[str, Any]) -> MS: + d = src_dict.copy() + client_id = d.pop("client_id", UNSET) - @classmethod - def from_dict(cls: Type[MS], src_dict: Dict[str, Any]) -> MS: - d = src_dict.copy() - client_id = d.pop("client_id", UNSET) + device_code = d.pop("device_code", UNSET) - device_code = d.pop("device_code", UNSET) + _grant_type = d.pop("grant_type", UNSET) + grant_type: Union[Unset, OAuth2GrantType] + if isinstance(_grant_type, Unset): + grant_type = UNSET + else: + grant_type = _grant_type # type: ignore[arg-type] - _grant_type = d.pop("grant_type", UNSET) - grant_type: Union[Unset, OAuth2GrantType] - if isinstance(_grant_type, Unset): - grant_type = UNSET - else: - grant_type = _grant_type # type: ignore[arg-type] - device_access_token_request_form = cls( - client_id=client_id, - device_code=device_code, - grant_type=grant_type, - ) + device_access_token_request_form = cls( + client_id= client_id, + device_code= device_code, + grant_type= grant_type, + ) - device_access_token_request_form.additional_properties = d - return device_access_token_request_form + device_access_token_request_form.additional_properties = d + return device_access_token_request_form - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/device_auth_request_form.py b/kittycad/models/device_auth_request_form.py index db655dd5c..3a68181f1 100644 --- a/kittycad/models/device_auth_request_form.py +++ b/kittycad/models/device_auth_request_form.py @@ -6,50 +6,49 @@ from ..types import UNSET, Unset LT = TypeVar("LT", bound="DeviceAuthRequestForm") - @attr.s(auto_attribs=True) class DeviceAuthRequestForm: - """The request parameters for the OAuth 2.0 Device Authorization Grant flow.""" # noqa: E501 + """ The request parameters for the OAuth 2.0 Device Authorization Grant flow. """ # noqa: E501 + client_id: Union[Unset, str] = UNSET - client_id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + client_id = self.client_id - def to_dict(self) -> Dict[str, Any]: - client_id = self.client_id + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if client_id is not UNSET: + field_dict['client_id'] = client_id - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if client_id is not UNSET: - field_dict["client_id"] = client_id + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[LT], src_dict: Dict[str, Any]) -> LT: + d = src_dict.copy() + client_id = d.pop("client_id", UNSET) - @classmethod - def from_dict(cls: Type[LT], src_dict: Dict[str, Any]) -> LT: - d = src_dict.copy() - client_id = d.pop("client_id", UNSET) - device_auth_request_form = cls( - client_id=client_id, - ) + device_auth_request_form = cls( + client_id= client_id, + ) - device_auth_request_form.additional_properties = d - return device_auth_request_form + device_auth_request_form.additional_properties = d + return device_auth_request_form - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/device_auth_verify_params.py b/kittycad/models/device_auth_verify_params.py index f66b2b4be..ef7ed1dff 100644 --- a/kittycad/models/device_auth_verify_params.py +++ b/kittycad/models/device_auth_verify_params.py @@ -6,50 +6,49 @@ from ..types import UNSET, Unset ED = TypeVar("ED", bound="DeviceAuthVerifyParams") - @attr.s(auto_attribs=True) class DeviceAuthVerifyParams: - """The request parameters to verify the `user_code` for the OAuth 2.0 Device Authorization Grant.""" # noqa: E501 + """ The request parameters to verify the `user_code` for the OAuth 2.0 Device Authorization Grant. """ # noqa: E501 + user_code: Union[Unset, str] = UNSET - user_code: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + user_code = self.user_code - def to_dict(self) -> Dict[str, Any]: - user_code = self.user_code + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if user_code is not UNSET: + field_dict['user_code'] = user_code - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if user_code is not UNSET: - field_dict["user_code"] = user_code + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[ED], src_dict: Dict[str, Any]) -> ED: + d = src_dict.copy() + user_code = d.pop("user_code", UNSET) - @classmethod - def from_dict(cls: Type[ED], src_dict: Dict[str, Any]) -> ED: - d = src_dict.copy() - user_code = d.pop("user_code", UNSET) - device_auth_verify_params = cls( - user_code=user_code, - ) + device_auth_verify_params = cls( + user_code= user_code, + ) - device_auth_verify_params.additional_properties = d - return device_auth_verify_params + device_auth_verify_params.additional_properties = d + return device_auth_verify_params - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/direction.py b/kittycad/models/direction.py index d1496b465..2d9b976d1 100644 --- a/kittycad/models/direction.py +++ b/kittycad/models/direction.py @@ -2,12 +2,11 @@ from enum import Enum class Direction(str, Enum): - """Specifies the sign of a co-ordinate axis.""" # noqa: E501 + """ Specifies the sign of a co-ordinate axis. """ # noqa: E501 + """# Increasing numbers. """ # noqa: E501 + POSITIVE = 'positive' + """# Decreasing numbers. """ # noqa: E501 + NEGATIVE = 'negative' - """# Increasing numbers. """ # noqa: E501 - POSITIVE = "positive" - """# Decreasing numbers. """ # noqa: E501 - NEGATIVE = "negative" - - def __str__(self) -> str: - return str(self.value) + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/discount.py b/kittycad/models/discount.py index 037d21144..c312f6d22 100644 --- a/kittycad/models/discount.py +++ b/kittycad/models/discount.py @@ -7,56 +7,55 @@ from ..types import UNSET, Unset YY = TypeVar("YY", bound="Discount") - @attr.s(auto_attribs=True) class Discount: - """The resource representing a Discount.""" # noqa: E501 + """ The resource representing a Discount. """ # noqa: E501 + coupon: Union[Unset, Coupon] = UNSET - coupon: Union[Unset, Coupon] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.coupon, Unset): + coupon = self.coupon - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.coupon, Unset): - coupon = self.coupon + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if coupon is not UNSET: + field_dict['coupon'] = coupon - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if coupon is not UNSET: - field_dict["coupon"] = coupon + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[YY], src_dict: Dict[str, Any]) -> YY: + d = src_dict.copy() + _coupon = d.pop("coupon", UNSET) + coupon: Union[Unset, Coupon] + if isinstance(_coupon, Unset): + coupon = UNSET + else: + coupon = _coupon # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[YY], src_dict: Dict[str, Any]) -> YY: - d = src_dict.copy() - _coupon = d.pop("coupon", UNSET) - coupon: Union[Unset, Coupon] - if isinstance(_coupon, Unset): - coupon = UNSET - else: - coupon = _coupon # type: ignore[arg-type] - discount = cls( - coupon=coupon, - ) + discount = cls( + coupon= coupon, + ) - discount.additional_properties = d - return discount + discount.additional_properties = d + return discount - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/email_authentication_form.py b/kittycad/models/email_authentication_form.py index 2db722f0c..9f627a455 100644 --- a/kittycad/models/email_authentication_form.py +++ b/kittycad/models/email_authentication_form.py @@ -6,57 +6,56 @@ from ..types import UNSET, Unset DO = TypeVar("DO", bound="EmailAuthenticationForm") - @attr.s(auto_attribs=True) class EmailAuthenticationForm: - """The body of the form for email authentication.""" # noqa: E501 + """ The body of the form for email authentication. """ # noqa: E501 + callback_url: Union[Unset, str] = UNSET + email: Union[Unset, str] = UNSET - callback_url: Union[Unset, str] = UNSET - email: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + callback_url = self.callback_url + email = self.email - def to_dict(self) -> Dict[str, Any]: - callback_url = self.callback_url - email = self.email + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if callback_url is not UNSET: + field_dict['callback_url'] = callback_url + if email is not UNSET: + field_dict['email'] = email - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if callback_url is not UNSET: - field_dict["callback_url"] = callback_url - if email is not UNSET: - field_dict["email"] = email + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[DO], src_dict: Dict[str, Any]) -> DO: + d = src_dict.copy() + callback_url = d.pop("callback_url", UNSET) - @classmethod - def from_dict(cls: Type[DO], src_dict: Dict[str, Any]) -> DO: - d = src_dict.copy() - callback_url = d.pop("callback_url", UNSET) + email = d.pop("email", UNSET) - email = d.pop("email", UNSET) - email_authentication_form = cls( - callback_url=callback_url, - email=email, - ) + email_authentication_form = cls( + callback_url= callback_url, + email= email, + ) - email_authentication_form.additional_properties = d - return email_authentication_form + email_authentication_form.additional_properties = d + return email_authentication_form - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/entity_get_all_child_uuids.py b/kittycad/models/entity_get_all_child_uuids.py index 29e4bf521..5105ee030 100644 --- a/kittycad/models/entity_get_all_child_uuids.py +++ b/kittycad/models/entity_get_all_child_uuids.py @@ -6,52 +6,51 @@ from ..types import UNSET, Unset FZ = TypeVar("FZ", bound="EntityGetAllChildUuids") - @attr.s(auto_attribs=True) class EntityGetAllChildUuids: - """The response from the `EntityGetAllChildUuids` command.""" # noqa: E501 + """ The response from the `EntityGetAllChildUuids` command. """ # noqa: E501 + entity_ids: Union[Unset, List[str]] = UNSET - entity_ids: Union[Unset, List[str]] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + entity_ids: Union[Unset, List[str]] = UNSET + if not isinstance(self.entity_ids, Unset): + entity_ids = self.entity_ids - def to_dict(self) -> Dict[str, Any]: - entity_ids: Union[Unset, List[str]] = UNSET - if not isinstance(self.entity_ids, Unset): - entity_ids = self.entity_ids + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entity_ids is not UNSET: + field_dict['entity_ids'] = entity_ids - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if entity_ids is not UNSET: - field_dict["entity_ids"] = entity_ids + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[FZ], src_dict: Dict[str, Any]) -> FZ: + d = src_dict.copy() + entity_ids = cast(List[str], d.pop("entity_ids", UNSET)) - @classmethod - def from_dict(cls: Type[FZ], src_dict: Dict[str, Any]) -> FZ: - d = src_dict.copy() - entity_ids = cast(List[str], d.pop("entity_ids", UNSET)) - entity_get_all_child_uuids = cls( - entity_ids=entity_ids, - ) + entity_get_all_child_uuids = cls( + entity_ids= entity_ids, + ) - entity_get_all_child_uuids.additional_properties = d - return entity_get_all_child_uuids + entity_get_all_child_uuids.additional_properties = d + return entity_get_all_child_uuids - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/entity_get_child_uuid.py b/kittycad/models/entity_get_child_uuid.py index d8a2110db..677219ccf 100644 --- a/kittycad/models/entity_get_child_uuid.py +++ b/kittycad/models/entity_get_child_uuid.py @@ -6,50 +6,49 @@ from ..types import UNSET, Unset GL = TypeVar("GL", bound="EntityGetChildUuid") - @attr.s(auto_attribs=True) class EntityGetChildUuid: - """The response from the `EntityGetChildUuid` command.""" # noqa: E501 + """ The response from the `EntityGetChildUuid` command. """ # noqa: E501 + entity_id: Union[Unset, str] = UNSET - entity_id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + entity_id = self.entity_id - def to_dict(self) -> Dict[str, Any]: - entity_id = self.entity_id + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entity_id is not UNSET: + field_dict['entity_id'] = entity_id - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if entity_id is not UNSET: - field_dict["entity_id"] = entity_id + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[GL], src_dict: Dict[str, Any]) -> GL: + d = src_dict.copy() + entity_id = d.pop("entity_id", UNSET) - @classmethod - def from_dict(cls: Type[GL], src_dict: Dict[str, Any]) -> GL: - d = src_dict.copy() - entity_id = d.pop("entity_id", UNSET) - entity_get_child_uuid = cls( - entity_id=entity_id, - ) + entity_get_child_uuid = cls( + entity_id= entity_id, + ) - entity_get_child_uuid.additional_properties = d - return entity_get_child_uuid + entity_get_child_uuid.additional_properties = d + return entity_get_child_uuid - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/entity_get_num_children.py b/kittycad/models/entity_get_num_children.py index 100adb24a..fb73e20c4 100644 --- a/kittycad/models/entity_get_num_children.py +++ b/kittycad/models/entity_get_num_children.py @@ -6,50 +6,49 @@ from ..types import UNSET, Unset NN = TypeVar("NN", bound="EntityGetNumChildren") - @attr.s(auto_attribs=True) class EntityGetNumChildren: - """The response from the `EntityGetNumChildren` command.""" # noqa: E501 + """ The response from the `EntityGetNumChildren` command. """ # noqa: E501 + num: Union[Unset, int] = UNSET - num: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + num = self.num - def to_dict(self) -> Dict[str, Any]: - num = self.num + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if num is not UNSET: + field_dict['num'] = num - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if num is not UNSET: - field_dict["num"] = num + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[NN], src_dict: Dict[str, Any]) -> NN: + d = src_dict.copy() + num = d.pop("num", UNSET) - @classmethod - def from_dict(cls: Type[NN], src_dict: Dict[str, Any]) -> NN: - d = src_dict.copy() - num = d.pop("num", UNSET) - entity_get_num_children = cls( - num=num, - ) + entity_get_num_children = cls( + num= num, + ) - entity_get_num_children.additional_properties = d - return entity_get_num_children + entity_get_num_children.additional_properties = d + return entity_get_num_children - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/entity_get_parent_id.py b/kittycad/models/entity_get_parent_id.py index a332b2740..3e58b3716 100644 --- a/kittycad/models/entity_get_parent_id.py +++ b/kittycad/models/entity_get_parent_id.py @@ -6,50 +6,49 @@ from ..types import UNSET, Unset OH = TypeVar("OH", bound="EntityGetParentId") - @attr.s(auto_attribs=True) class EntityGetParentId: - """The response from the `EntityGetParentId` command.""" # noqa: E501 + """ The response from the `EntityGetParentId` command. """ # noqa: E501 + entity_id: Union[Unset, str] = UNSET - entity_id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + entity_id = self.entity_id - def to_dict(self) -> Dict[str, Any]: - entity_id = self.entity_id + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entity_id is not UNSET: + field_dict['entity_id'] = entity_id - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if entity_id is not UNSET: - field_dict["entity_id"] = entity_id + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[OH], src_dict: Dict[str, Any]) -> OH: + d = src_dict.copy() + entity_id = d.pop("entity_id", UNSET) - @classmethod - def from_dict(cls: Type[OH], src_dict: Dict[str, Any]) -> OH: - d = src_dict.copy() - entity_id = d.pop("entity_id", UNSET) - entity_get_parent_id = cls( - entity_id=entity_id, - ) + entity_get_parent_id = cls( + entity_id= entity_id, + ) - entity_get_parent_id.additional_properties = d - return entity_get_parent_id + entity_get_parent_id.additional_properties = d + return entity_get_parent_id - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/entity_type.py b/kittycad/models/entity_type.py index 05fe5c865..ad4c3d69c 100644 --- a/kittycad/models/entity_type.py +++ b/kittycad/models/entity_type.py @@ -2,17 +2,16 @@ from enum import Enum class EntityType(str, Enum): - """The type of entity""" # noqa: E501 + """ The type of entity """ # noqa: E501 + ENTITY = 'entity' + OBJECT = 'object' + PATH = 'path' + CURVE = 'curve' + SOLID2D = 'solid2d' + SOLID3D = 'solid3d' + EDGE = 'edge' + FACE = 'face' + PLANE = 'plane' - ENTITY = "entity" - OBJECT = "object" - PATH = "path" - CURVE = "curve" - SOLID2D = "solid2d" - SOLID3D = "solid3d" - EDGE = "edge" - FACE = "face" - PLANE = "plane" - - def __str__(self) -> str: - return str(self.value) + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/environment.py b/kittycad/models/environment.py index 11163148f..247118f7a 100644 --- a/kittycad/models/environment.py +++ b/kittycad/models/environment.py @@ -2,14 +2,13 @@ from enum import Enum class Environment(str, Enum): - """The environment the server is running in.""" # noqa: E501 + """ The environment the server is running in. """ # noqa: E501 + """# The development environment. This is for running locally. """ # noqa: E501 + DEVELOPMENT = 'DEVELOPMENT' + """# The preview environment. This is when PRs are created and a service is deployed for testing. """ # noqa: E501 + PREVIEW = 'PREVIEW' + """# The production environment. """ # noqa: E501 + PRODUCTION = 'PRODUCTION' - """# The development environment. This is for running locally. """ # noqa: E501 - DEVELOPMENT = "DEVELOPMENT" - """# The preview environment. This is when PRs are created and a service is deployed for testing. """ # noqa: E501 - PREVIEW = "PREVIEW" - """# The production environment. """ # noqa: E501 - PRODUCTION = "PRODUCTION" - - def __str__(self) -> str: - return str(self.value) + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/error.py b/kittycad/models/error.py index 631282579..7afe3f6dc 100644 --- a/kittycad/models/error.py +++ b/kittycad/models/error.py @@ -6,64 +6,63 @@ from ..types import UNSET, Unset VI = TypeVar("VI", bound="Error") - @attr.s(auto_attribs=True) class Error: - """Error information from a response.""" # noqa: E501 + """ Error information from a response. """ # noqa: E501 + error_code: Union[Unset, str] = UNSET + message: Union[Unset, str] = UNSET + request_id: Union[Unset, str] = UNSET - error_code: Union[Unset, str] = UNSET - message: Union[Unset, str] = UNSET - request_id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + error_code = self.error_code + message = self.message + request_id = self.request_id - def to_dict(self) -> Dict[str, Any]: - error_code = self.error_code - message = self.message - request_id = self.request_id + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if error_code is not UNSET: + field_dict['error_code'] = error_code + if message is not UNSET: + field_dict['message'] = message + if request_id is not UNSET: + field_dict['request_id'] = request_id - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if error_code is not UNSET: - field_dict["error_code"] = error_code - if message is not UNSET: - field_dict["message"] = message - if request_id is not UNSET: - field_dict["request_id"] = request_id + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[VI], src_dict: Dict[str, Any]) -> VI: + d = src_dict.copy() + error_code = d.pop("error_code", UNSET) - @classmethod - def from_dict(cls: Type[VI], src_dict: Dict[str, Any]) -> VI: - d = src_dict.copy() - error_code = d.pop("error_code", UNSET) + message = d.pop("message", UNSET) - message = d.pop("message", UNSET) + request_id = d.pop("request_id", UNSET) - request_id = d.pop("request_id", UNSET) - error = cls( - error_code=error_code, - message=message, - request_id=request_id, - ) + error = cls( + error_code= error_code, + message= message, + request_id= request_id, + ) - error.additional_properties = d - return error + error.additional_properties = d + return error - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/error_code.py b/kittycad/models/error_code.py index 298238615..bf7dc4546 100644 --- a/kittycad/models/error_code.py +++ b/kittycad/models/error_code.py @@ -2,26 +2,25 @@ from enum import Enum class ErrorCode(str, Enum): - """The type of error sent by the KittyCAD API.""" # noqa: E501 + """ The type of error sent by the KittyCAD API. """ # noqa: E501 + """# Graphics engine failed to complete request, consider retrying """ # noqa: E501 + INTERNAL_ENGINE = 'internal_engine' + """# API failed to complete request, consider retrying """ # noqa: E501 + INTERNAL_API = 'internal_api' + """# User requested something geometrically or graphically impossible. Don't retry this request, as it's inherently impossible. Instead, read the error message and change your request. """ # noqa: E501 + BAD_REQUEST = 'bad_request' + """# Client sent invalid JSON. """ # noqa: E501 + INVALID_JSON = 'invalid_json' + """# Client sent invalid BSON. """ # noqa: E501 + INVALID_BSON = 'invalid_bson' + """# Client sent a message which is not accepted over this protocol. """ # noqa: E501 + WRONG_PROTOCOL = 'wrong_protocol' + """# Problem sending data between client and KittyCAD API. """ # noqa: E501 + CONNECTION_PROBLEM = 'connection_problem' + """# Client sent a Websocket message type which the KittyCAD API does not handle. """ # noqa: E501 + MESSAGE_TYPE_NOT_ACCEPTED = 'message_type_not_accepted' + """# Client sent a Websocket message intended for WebRTC but it was configured as a WebRTC connection. """ # noqa: E501 + MESSAGE_TYPE_NOT_ACCEPTED_FOR_WEB_R_T_C = 'message_type_not_accepted_for_web_r_t_c' - """# Graphics engine failed to complete request, consider retrying """ # noqa: E501 - INTERNAL_ENGINE = "internal_engine" - """# API failed to complete request, consider retrying """ # noqa: E501 - INTERNAL_API = "internal_api" - """# User requested something geometrically or graphically impossible. Don't retry this request, as it's inherently impossible. Instead, read the error message and change your request. """ # noqa: E501 - BAD_REQUEST = "bad_request" - """# Client sent invalid JSON. """ # noqa: E501 - INVALID_JSON = "invalid_json" - """# Client sent invalid BSON. """ # noqa: E501 - INVALID_BSON = "invalid_bson" - """# Client sent a message which is not accepted over this protocol. """ # noqa: E501 - WRONG_PROTOCOL = "wrong_protocol" - """# Problem sending data between client and KittyCAD API. """ # noqa: E501 - CONNECTION_PROBLEM = "connection_problem" - """# Client sent a Websocket message type which the KittyCAD API does not handle. """ # noqa: E501 - MESSAGE_TYPE_NOT_ACCEPTED = "message_type_not_accepted" - """# Client sent a Websocket message intended for WebRTC but it was configured as a WebRTC connection. """ # noqa: E501 - MESSAGE_TYPE_NOT_ACCEPTED_FOR_WEB_R_T_C = "message_type_not_accepted_for_web_r_t_c" - - def __str__(self) -> str: - return str(self.value) + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/export.py b/kittycad/models/export.py index a417301d6..234472618 100644 --- a/kittycad/models/export.py +++ b/kittycad/models/export.py @@ -6,58 +6,54 @@ from ..types import UNSET, Unset ET = TypeVar("ET", bound="Export") - @attr.s(auto_attribs=True) class Export: - """The response from the `Export` endpoint.""" # noqa: E501 + """ The response from the `Export` endpoint. """ # noqa: E501 + from ..models.export_file import ExportFile + files: Union[Unset, List[ExportFile]] = UNSET - from ..models.export_file import ExportFile + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - files: Union[Unset, List[ExportFile]] = UNSET + def to_dict(self) -> Dict[str, Any]: + from ..models.export_file import ExportFile + files: Union[Unset, List[ExportFile]] = UNSET + if not isinstance(self.files, Unset): + files = self.files - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if files is not UNSET: + field_dict['files'] = files - def to_dict(self) -> Dict[str, Any]: - from ..models.export_file import ExportFile + return field_dict - files: Union[Unset, List[ExportFile]] = UNSET - if not isinstance(self.files, Unset): - files = self.files + @classmethod + def from_dict(cls: Type[ET], src_dict: Dict[str, Any]) -> ET: + d = src_dict.copy() + from ..models.export_file import ExportFile + files = cast(List[ExportFile], d.pop("files", UNSET)) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if files is not UNSET: - field_dict["files"] = files - return field_dict + export = cls( + files= files, + ) - @classmethod - def from_dict(cls: Type[ET], src_dict: Dict[str, Any]) -> ET: - d = src_dict.copy() - from ..models.export_file import ExportFile + export.additional_properties = d + return export - files = cast(List[ExportFile], d.pop("files", UNSET)) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - export = cls( - files=files, - ) + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - export.additional_properties = d - return export + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - 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 + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/export_file.py b/kittycad/models/export_file.py index f7000bfaa..8a98ac359 100644 --- a/kittycad/models/export_file.py +++ b/kittycad/models/export_file.py @@ -7,64 +7,63 @@ from ..types import UNSET, Unset QF = TypeVar("QF", bound="ExportFile") - @attr.s(auto_attribs=True) class ExportFile: - """A file to be exported to the client.""" # noqa: E501 + """ A file to be exported to the client. """ # noqa: E501 + contents: Union[Unset, Base64Data] = UNSET + name: Union[Unset, str] = UNSET - contents: Union[Unset, Base64Data] = UNSET - name: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + contents: Union[Unset, str] = UNSET + if not isinstance(self.contents, Unset): + contents = self.contents.get_encoded() + name = self.name - def to_dict(self) -> Dict[str, Any]: - contents: Union[Unset, str] = UNSET - if not isinstance(self.contents, Unset): - contents = self.contents.get_encoded() - name = self.name + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if contents is not UNSET: + field_dict['contents'] = contents + if name is not UNSET: + field_dict['name'] = name - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if contents is not UNSET: - field_dict["contents"] = contents - if name is not UNSET: - field_dict["name"] = name + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[QF], src_dict: Dict[str, Any]) -> QF: + d = src_dict.copy() + _contents = d.pop("contents", UNSET) + contents: Union[Unset, Base64Data] + if isinstance(_contents, Unset): + contents = UNSET + else: + contents = Base64Data(bytes(_contents, 'utf-8')) - @classmethod - def from_dict(cls: Type[QF], src_dict: Dict[str, Any]) -> QF: - d = src_dict.copy() - _contents = d.pop("contents", UNSET) - contents: Union[Unset, Base64Data] - if isinstance(_contents, Unset): - contents = UNSET - else: - contents = Base64Data(bytes(_contents, "utf-8")) + name = d.pop("name", UNSET) - name = d.pop("name", UNSET) - export_file = cls( - contents=contents, - name=name, - ) + export_file = cls( + contents= contents, + name= name, + ) - export_file.additional_properties = d - return export_file + export_file.additional_properties = d + return export_file - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/extended_user.py b/kittycad/models/extended_user.py index 6c44e8f19..e135d26d4 100644 --- a/kittycad/models/extended_user.py +++ b/kittycad/models/extended_user.py @@ -8,179 +8,177 @@ from ..types import UNSET, Unset DI = TypeVar("DI", bound="ExtendedUser") - @attr.s(auto_attribs=True) class ExtendedUser: - """Extended user information. + """ Extended user information. - This is mostly used for internal purposes. It returns a mapping of the user's information, including that of our third party services we use for users: MailChimp, Stripe, and Front - """ # noqa: E501 +This is mostly used for internal purposes. It returns a mapping of the user's information, including that of our third party services we use for users: MailChimp, Stripe, and Front """ # noqa: E501 + company: Union[Unset, str] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + discord: Union[Unset, str] = UNSET + email: Union[Unset, str] = UNSET + email_verified: Union[Unset, datetime.datetime] = UNSET + first_name: Union[Unset, str] = UNSET + front_id: Union[Unset, str] = UNSET + github: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + image: Union[Unset, str] = UNSET + last_name: Union[Unset, str] = UNSET + mailchimp_id: Union[Unset, str] = UNSET + name: Union[Unset, str] = UNSET + phone: Union[Unset, str] = UNSET + stripe_id: Union[Unset, str] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET - company: Union[Unset, str] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - discord: Union[Unset, str] = UNSET - email: Union[Unset, str] = UNSET - email_verified: Union[Unset, datetime.datetime] = UNSET - first_name: Union[Unset, str] = UNSET - front_id: Union[Unset, str] = UNSET - github: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - image: Union[Unset, str] = UNSET - last_name: Union[Unset, str] = UNSET - mailchimp_id: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET - phone: Union[Unset, str] = UNSET - stripe_id: Union[Unset, str] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + company = self.company + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + discord = self.discord + email = self.email + email_verified: Union[Unset, str] = UNSET + if not isinstance(self.email_verified, Unset): + email_verified = self.email_verified.isoformat() + first_name = self.first_name + front_id = self.front_id + github = self.github + id = self.id + image = self.image + last_name = self.last_name + mailchimp_id = self.mailchimp_id + name = self.name + phone = self.phone + stripe_id = self.stripe_id + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() - def to_dict(self) -> Dict[str, Any]: - company = self.company - created_at: Union[Unset, str] = UNSET - if not isinstance(self.created_at, Unset): - created_at = self.created_at.isoformat() - discord = self.discord - email = self.email - email_verified: Union[Unset, str] = UNSET - if not isinstance(self.email_verified, Unset): - email_verified = self.email_verified.isoformat() - first_name = self.first_name - front_id = self.front_id - github = self.github - id = self.id - image = self.image - last_name = self.last_name - mailchimp_id = self.mailchimp_id - name = self.name - phone = self.phone - stripe_id = self.stripe_id - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if company is not UNSET: + field_dict['company'] = company + if created_at is not UNSET: + field_dict['created_at'] = created_at + if discord is not UNSET: + field_dict['discord'] = discord + if email is not UNSET: + field_dict['email'] = email + if email_verified is not UNSET: + field_dict['email_verified'] = email_verified + if first_name is not UNSET: + field_dict['first_name'] = first_name + if front_id is not UNSET: + field_dict['front_id'] = front_id + if github is not UNSET: + field_dict['github'] = github + if id is not UNSET: + field_dict['id'] = id + if image is not UNSET: + field_dict['image'] = image + if last_name is not UNSET: + field_dict['last_name'] = last_name + if mailchimp_id is not UNSET: + field_dict['mailchimp_id'] = mailchimp_id + if name is not UNSET: + field_dict['name'] = name + if phone is not UNSET: + field_dict['phone'] = phone + if stripe_id is not UNSET: + field_dict['stripe_id'] = stripe_id + if updated_at is not UNSET: + field_dict['updated_at'] = updated_at - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if company is not UNSET: - field_dict["company"] = company - if created_at is not UNSET: - field_dict["created_at"] = created_at - if discord is not UNSET: - field_dict["discord"] = discord - if email is not UNSET: - field_dict["email"] = email - if email_verified is not UNSET: - field_dict["email_verified"] = email_verified - if first_name is not UNSET: - field_dict["first_name"] = first_name - if front_id is not UNSET: - field_dict["front_id"] = front_id - if github is not UNSET: - field_dict["github"] = github - if id is not UNSET: - field_dict["id"] = id - if image is not UNSET: - field_dict["image"] = image - if last_name is not UNSET: - field_dict["last_name"] = last_name - if mailchimp_id is not UNSET: - field_dict["mailchimp_id"] = mailchimp_id - if name is not UNSET: - field_dict["name"] = name - if phone is not UNSET: - field_dict["phone"] = phone - if stripe_id is not UNSET: - field_dict["stripe_id"] = stripe_id - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[DI], src_dict: Dict[str, Any]) -> DI: + d = src_dict.copy() + company = d.pop("company", UNSET) - @classmethod - def from_dict(cls: Type[DI], src_dict: Dict[str, Any]) -> DI: - d = src_dict.copy() - company = d.pop("company", UNSET) + _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) - _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) + discord = d.pop("discord", UNSET) - discord = d.pop("discord", UNSET) + email = d.pop("email", UNSET) - email = d.pop("email", UNSET) + _email_verified = d.pop("email_verified", UNSET) + email_verified: Union[Unset, datetime.datetime] + if isinstance(_email_verified, Unset): + email_verified = UNSET + else: + email_verified = isoparse(_email_verified) - _email_verified = d.pop("email_verified", UNSET) - email_verified: Union[Unset, datetime.datetime] - if isinstance(_email_verified, Unset): - email_verified = UNSET - else: - email_verified = isoparse(_email_verified) + first_name = d.pop("first_name", UNSET) - first_name = d.pop("first_name", UNSET) + front_id = d.pop("front_id", UNSET) - front_id = d.pop("front_id", UNSET) + github = d.pop("github", UNSET) - github = d.pop("github", UNSET) + id = d.pop("id", UNSET) - id = d.pop("id", UNSET) + image = d.pop("image", UNSET) - image = d.pop("image", UNSET) + last_name = d.pop("last_name", UNSET) - last_name = d.pop("last_name", UNSET) + mailchimp_id = d.pop("mailchimp_id", UNSET) - mailchimp_id = d.pop("mailchimp_id", UNSET) + name = d.pop("name", UNSET) - name = d.pop("name", UNSET) + phone = d.pop("phone", UNSET) - phone = d.pop("phone", UNSET) + stripe_id = d.pop("stripe_id", UNSET) - stripe_id = d.pop("stripe_id", 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) - _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) - extended_user = cls( - company=company, - created_at=created_at, - discord=discord, - email=email, - email_verified=email_verified, - first_name=first_name, - front_id=front_id, - github=github, - id=id, - image=image, - last_name=last_name, - mailchimp_id=mailchimp_id, - name=name, - phone=phone, - stripe_id=stripe_id, - updated_at=updated_at, - ) + extended_user = cls( + company= company, + created_at= created_at, + discord= discord, + email= email, + email_verified= email_verified, + first_name= first_name, + front_id= front_id, + github= github, + id= id, + image= image, + last_name= last_name, + mailchimp_id= mailchimp_id, + name= name, + phone= phone, + stripe_id= stripe_id, + updated_at= updated_at, + ) - extended_user.additional_properties = d - return extended_user + extended_user.additional_properties = d + return extended_user - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/extended_user_results_page.py b/kittycad/models/extended_user_results_page.py index c04c6171d..52cf46da1 100644 --- a/kittycad/models/extended_user_results_page.py +++ b/kittycad/models/extended_user_results_page.py @@ -6,65 +6,61 @@ from ..types import UNSET, Unset OJ = TypeVar("OJ", bound="ExtendedUserResultsPage") - @attr.s(auto_attribs=True) class ExtendedUserResultsPage: - """A single page of results""" # noqa: E501 + """ A single page of results """ # noqa: E501 + from ..models.extended_user import ExtendedUser + items: Union[Unset, List[ExtendedUser]] = UNSET + next_page: Union[Unset, str] = UNSET - from ..models.extended_user import ExtendedUser + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - items: Union[Unset, List[ExtendedUser]] = UNSET - next_page: Union[Unset, str] = UNSET + def to_dict(self) -> Dict[str, Any]: + from ..models.extended_user import ExtendedUser + items: Union[Unset, List[ExtendedUser]] = UNSET + if not isinstance(self.items, Unset): + items = self.items + next_page = self.next_page - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if items is not UNSET: + field_dict['items'] = items + if next_page is not UNSET: + field_dict['next_page'] = next_page - def to_dict(self) -> Dict[str, Any]: - from ..models.extended_user import ExtendedUser + return field_dict - items: Union[Unset, List[ExtendedUser]] = UNSET - if not isinstance(self.items, Unset): - items = self.items - next_page = self.next_page + @classmethod + def from_dict(cls: Type[OJ], src_dict: Dict[str, Any]) -> OJ: + d = src_dict.copy() + from ..models.extended_user import ExtendedUser + items = cast(List[ExtendedUser], d.pop("items", UNSET)) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if items is not UNSET: - field_dict["items"] = items - if next_page is not UNSET: - field_dict["next_page"] = next_page + next_page = d.pop("next_page", UNSET) - return field_dict - @classmethod - def from_dict(cls: Type[OJ], src_dict: Dict[str, Any]) -> OJ: - d = src_dict.copy() - from ..models.extended_user import ExtendedUser + extended_user_results_page = cls( + items= items, + next_page= next_page, + ) - items = cast(List[ExtendedUser], d.pop("items", UNSET)) + extended_user_results_page.additional_properties = d + return extended_user_results_page - next_page = d.pop("next_page", UNSET) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - extended_user_results_page = cls( - items=items, - next_page=next_page, - ) + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - extended_user_results_page.additional_properties = d - return extended_user_results_page + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - 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 + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/failure_web_socket_response.py b/kittycad/models/failure_web_socket_response.py index 6719e32c8..4a2bafab1 100644 --- a/kittycad/models/failure_web_socket_response.py +++ b/kittycad/models/failure_web_socket_response.py @@ -6,72 +6,68 @@ from ..types import UNSET, Unset UF = TypeVar("UF", bound="FailureWebSocketResponse") - @attr.s(auto_attribs=True) class FailureWebSocketResponse: - """Unsuccessful Websocket response.""" # noqa: E501 + """ Unsuccessful Websocket response. """ # noqa: E501 + from ..models.api_error import ApiError + errors: Union[Unset, List[ApiError]] = UNSET + request_id: Union[Unset, str] = UNSET + success: Union[Unset, bool] = False - from ..models.api_error import ApiError + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - errors: Union[Unset, List[ApiError]] = UNSET - request_id: Union[Unset, str] = UNSET - success: Union[Unset, bool] = False + def to_dict(self) -> Dict[str, Any]: + from ..models.api_error import ApiError + errors: Union[Unset, List[ApiError]] = UNSET + if not isinstance(self.errors, Unset): + errors = self.errors + request_id = self.request_id + success = self.success - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if errors is not UNSET: + field_dict['errors'] = errors + if request_id is not UNSET: + field_dict['request_id'] = request_id + if success is not UNSET: + field_dict['success'] = success - def to_dict(self) -> Dict[str, Any]: - from ..models.api_error import ApiError + return field_dict - errors: Union[Unset, List[ApiError]] = UNSET - if not isinstance(self.errors, Unset): - errors = self.errors - request_id = self.request_id - success = self.success + @classmethod + def from_dict(cls: Type[UF], src_dict: Dict[str, Any]) -> UF: + d = src_dict.copy() + from ..models.api_error import ApiError + errors = cast(List[ApiError], d.pop("errors", UNSET)) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if errors is not UNSET: - field_dict["errors"] = errors - if request_id is not UNSET: - field_dict["request_id"] = request_id - if success is not UNSET: - field_dict["success"] = success + request_id = d.pop("request_id", UNSET) - return field_dict + success = d.pop("success", UNSET) - @classmethod - def from_dict(cls: Type[UF], src_dict: Dict[str, Any]) -> UF: - d = src_dict.copy() - from ..models.api_error import ApiError - errors = cast(List[ApiError], d.pop("errors", UNSET)) + failure_web_socket_response = cls( + errors= errors, + request_id= request_id, + success= success, + ) - request_id = d.pop("request_id", UNSET) + failure_web_socket_response.additional_properties = d + return failure_web_socket_response - success = d.pop("success", UNSET) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - failure_web_socket_response = cls( - errors=errors, - request_id=request_id, - success=success, - ) + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - failure_web_socket_response.additional_properties = d - return failure_web_socket_response + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - 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 + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/fbx_storage.py b/kittycad/models/fbx_storage.py index b3dc44cc4..a90daf0ec 100644 --- a/kittycad/models/fbx_storage.py +++ b/kittycad/models/fbx_storage.py @@ -2,12 +2,11 @@ from enum import Enum class FbxStorage(str, Enum): - """Describes the storage format of an FBX file.""" # noqa: E501 + """ Describes the storage format of an FBX file. """ # noqa: E501 + """# ASCII FBX encoding. """ # noqa: E501 + ASCII = 'ascii' + """# Binary FBX encoding. """ # noqa: E501 + BINARY = 'binary' - """# ASCII FBX encoding. """ # noqa: E501 - ASCII = "ascii" - """# Binary FBX encoding. """ # noqa: E501 - BINARY = "binary" - - def __str__(self) -> str: - return str(self.value) + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/file_center_of_mass.py b/kittycad/models/file_center_of_mass.py index 1f96e4304..0de04485a 100644 --- a/kittycad/models/file_center_of_mass.py +++ b/kittycad/models/file_center_of_mass.py @@ -13,177 +13,176 @@ from ..types import UNSET, Unset YF = TypeVar("YF", bound="FileCenterOfMass") - @attr.s(auto_attribs=True) class FileCenterOfMass: - """A file center of mass result.""" # noqa: E501 + """ A file center of mass result. """ # noqa: E501 + center_of_mass: Union[Unset, Point3d] = UNSET + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + output_unit: Union[Unset, UnitLength] = UNSET + src_format: Union[Unset, FileImportFormat] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET - center_of_mass: Union[Unset, Point3d] = UNSET - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - output_unit: Union[Unset, UnitLength] = UNSET - src_format: Union[Unset, FileImportFormat] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.center_of_mass, Unset): + center_of_mass = self.center_of_mass + 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 + id = self.id + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + if not isinstance(self.src_format, Unset): + src_format = self.src_format + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + if not isinstance(self.status, Unset): + status = self.status + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.center_of_mass, Unset): - center_of_mass = self.center_of_mass - 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 - id = self.id - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - if not isinstance(self.src_format, Unset): - src_format = self.src_format - started_at: Union[Unset, str] = UNSET - if not isinstance(self.started_at, Unset): - started_at = self.started_at.isoformat() - if not isinstance(self.status, Unset): - status = self.status - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() - user_id = self.user_id + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if center_of_mass is not UNSET: + field_dict['center_of_mass'] = center_of_mass + if 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 id is not UNSET: + field_dict['id'] = id + if output_unit is not UNSET: + field_dict['output_unit'] = output_unit + if src_format is not UNSET: + field_dict['src_format'] = src_format + if started_at is not UNSET: + field_dict['started_at'] = started_at + if status is not UNSET: + field_dict['status'] = status + if updated_at is not UNSET: + field_dict['updated_at'] = updated_at + if user_id is not UNSET: + field_dict['user_id'] = user_id - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if center_of_mass is not UNSET: - field_dict["center_of_mass"] = center_of_mass - if 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 id is not UNSET: - field_dict["id"] = id - if output_unit is not UNSET: - field_dict["output_unit"] = output_unit - if src_format is not UNSET: - field_dict["src_format"] = src_format - if started_at is not UNSET: - field_dict["started_at"] = started_at - if status is not UNSET: - field_dict["status"] = status - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - if user_id is not UNSET: - field_dict["user_id"] = user_id + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[YF], src_dict: Dict[str, Any]) -> YF: + d = src_dict.copy() + _center_of_mass = d.pop("center_of_mass", UNSET) + center_of_mass: Union[Unset, Point3d] + if isinstance(_center_of_mass, Unset): + center_of_mass = UNSET + else: + center_of_mass = _center_of_mass # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[YF], src_dict: Dict[str, Any]) -> YF: - d = src_dict.copy() - _center_of_mass = d.pop("center_of_mass", UNSET) - center_of_mass: Union[Unset, Point3d] - if isinstance(_center_of_mass, Unset): - center_of_mass = UNSET - else: - center_of_mass = _center_of_mass # type: ignore[arg-type] + _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) - _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) - _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) - error = d.pop("error", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitLength] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitLength] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] + _src_format = d.pop("src_format", UNSET) + src_format: Union[Unset, FileImportFormat] + if isinstance(_src_format, Unset): + src_format = UNSET + else: + src_format = _src_format # type: ignore[arg-type] - _src_format = d.pop("src_format", UNSET) - src_format: Union[Unset, FileImportFormat] - if isinstance(_src_format, Unset): - src_format = UNSET - else: - src_format = _src_format # type: ignore[arg-type] + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) - _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] - _status = d.pop("status", UNSET) - status: Union[Unset, ApiCallStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = _status # type: ignore[arg-type] + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) - _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) - user_id = d.pop("user_id", UNSET) - file_center_of_mass = cls( - center_of_mass=center_of_mass, - completed_at=completed_at, - created_at=created_at, - error=error, - id=id, - output_unit=output_unit, - src_format=src_format, - started_at=started_at, - status=status, - updated_at=updated_at, - user_id=user_id, - ) + file_center_of_mass = cls( + center_of_mass= center_of_mass, + completed_at= completed_at, + created_at= created_at, + error= error, + id= id, + output_unit= output_unit, + src_format= src_format, + started_at= started_at, + status= status, + updated_at= updated_at, + user_id= user_id, + ) - file_center_of_mass.additional_properties = d - return file_center_of_mass + file_center_of_mass.additional_properties = d + return file_center_of_mass - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/file_conversion.py b/kittycad/models/file_conversion.py index fdc0ab115..5aa4d73c0 100644 --- a/kittycad/models/file_conversion.py +++ b/kittycad/models/file_conversion.py @@ -15,209 +15,208 @@ from ..types import UNSET, Unset PY = TypeVar("PY", bound="FileConversion") - @attr.s(auto_attribs=True) class FileConversion: - """A file conversion.""" # noqa: E501 + """ A file conversion. """ # noqa: E501 + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + output_format: Union[Unset, FileExportFormat] = UNSET + output_format_options: Union[Unset, OutputFormat] = UNSET + outputs: Union[Unset, Dict[str, Base64Data]] = UNSET + src_format: Union[Unset, FileImportFormat] = UNSET + src_format_options: Union[Unset, InputFormat] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - output_format: Union[Unset, FileExportFormat] = UNSET - output_format_options: Union[Unset, OutputFormat] = UNSET - outputs: Union[Unset, Dict[str, Base64Data]] = UNSET - src_format: Union[Unset, FileImportFormat] = UNSET - src_format_options: Union[Unset, InputFormat] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 + id = self.id + if not isinstance(self.output_format, Unset): + output_format = self.output_format + if not isinstance(self.output_format_options, Unset): + output_format_options = self.output_format_options + 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 + if not isinstance(self.src_format, Unset): + src_format = self.src_format + if not isinstance(self.src_format_options, Unset): + src_format_options = self.src_format_options + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + if not isinstance(self.status, Unset): + status = self.status + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id - 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 - id = self.id - if not isinstance(self.output_format, Unset): - output_format = self.output_format - if not isinstance(self.output_format_options, Unset): - output_format_options = self.output_format_options - 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 - if not isinstance(self.src_format, Unset): - src_format = self.src_format - if not isinstance(self.src_format_options, Unset): - src_format_options = self.src_format_options - started_at: Union[Unset, str] = UNSET - if not isinstance(self.started_at, Unset): - started_at = self.started_at.isoformat() - if not isinstance(self.status, Unset): - status = self.status - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() - user_id = self.user_id + 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 id is not UNSET: + field_dict['id'] = id + if output_format is not UNSET: + field_dict['output_format'] = output_format + if output_format_options is not UNSET: + field_dict['output_format_options'] = output_format_options + if outputs is not UNSET: + field_dict['outputs'] = outputs + if src_format is not UNSET: + field_dict['src_format'] = src_format + if src_format_options is not UNSET: + field_dict['src_format_options'] = src_format_options + if started_at is not UNSET: + field_dict['started_at'] = started_at + if status is not UNSET: + field_dict['status'] = status + if updated_at is not UNSET: + field_dict['updated_at'] = updated_at + if user_id is not UNSET: + field_dict['user_id'] = user_id - 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 id is not UNSET: - field_dict["id"] = id - if output_format is not UNSET: - field_dict["output_format"] = output_format - if output_format_options is not UNSET: - field_dict["output_format_options"] = output_format_options - if outputs is not UNSET: - field_dict["outputs"] = outputs - if src_format is not UNSET: - field_dict["src_format"] = src_format - if src_format_options is not UNSET: - field_dict["src_format_options"] = src_format_options - if started_at is not UNSET: - field_dict["started_at"] = started_at - if status is not UNSET: - field_dict["status"] = status - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - if user_id is not UNSET: - field_dict["user_id"] = user_id + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[PY], src_dict: Dict[str, Any]) -> PY: + d = src_dict.copy() + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) - @classmethod - def from_dict(cls: Type[PY], src_dict: Dict[str, Any]) -> PY: - d = src_dict.copy() - _completed_at = d.pop("completed_at", UNSET) - completed_at: Union[Unset, datetime.datetime] - 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) - _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) - error = d.pop("error", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] + _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] - _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] + _output_format_options = d.pop("output_format_options", UNSET) + output_format_options: Union[Unset, OutputFormat] + if isinstance(_output_format_options, Unset): + output_format_options = UNSET + else: + output_format_options = _output_format_options # type: ignore[arg-type] - _output_format_options = d.pop("output_format_options", UNSET) - output_format_options: Union[Unset, OutputFormat] - if isinstance(_output_format_options, Unset): - output_format_options = UNSET - else: - output_format_options = _output_format_options # 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 - _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 + _src_format = d.pop("src_format", UNSET) + src_format: Union[Unset, FileImportFormat] + if isinstance(_src_format, Unset): + src_format = UNSET + else: + src_format = _src_format # type: ignore[arg-type] - _src_format = d.pop("src_format", UNSET) - src_format: Union[Unset, FileImportFormat] - if isinstance(_src_format, Unset): - src_format = UNSET - else: - src_format = _src_format # type: ignore[arg-type] + _src_format_options = d.pop("src_format_options", UNSET) + src_format_options: Union[Unset, InputFormat] + if isinstance(_src_format_options, Unset): + src_format_options = UNSET + else: + src_format_options = _src_format_options # type: ignore[arg-type] - _src_format_options = d.pop("src_format_options", UNSET) - src_format_options: Union[Unset, InputFormat] - if isinstance(_src_format_options, Unset): - src_format_options = UNSET - else: - src_format_options = _src_format_options # type: ignore[arg-type] + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) - _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] - _status = d.pop("status", UNSET) - status: Union[Unset, ApiCallStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = _status # type: ignore[arg-type] + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) - _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) - user_id = d.pop("user_id", UNSET) - file_conversion = cls( - completed_at=completed_at, - created_at=created_at, - error=error, - id=id, - output_format=output_format, - output_format_options=output_format_options, - outputs=outputs, - src_format=src_format, - src_format_options=src_format_options, - started_at=started_at, - status=status, - updated_at=updated_at, - user_id=user_id, - ) + file_conversion = cls( + completed_at= completed_at, + created_at= created_at, + error= error, + id= id, + output_format= output_format, + output_format_options= output_format_options, + outputs= outputs, + src_format= src_format, + src_format_options= src_format_options, + started_at= started_at, + status= status, + updated_at= updated_at, + user_id= user_id, + ) - file_conversion.additional_properties = d - return file_conversion + file_conversion.additional_properties = d + return file_conversion - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/file_density.py b/kittycad/models/file_density.py index 2bf072ef4..62c65650c 100644 --- a/kittycad/models/file_density.py +++ b/kittycad/models/file_density.py @@ -13,191 +13,190 @@ from ..types import UNSET, Unset LK = TypeVar("LK", bound="FileDensity") - @attr.s(auto_attribs=True) class FileDensity: - """A file density result.""" # noqa: E501 + """ A file density result. """ # noqa: E501 + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + density: Union[Unset, float] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + material_mass: Union[Unset, float] = UNSET + material_mass_unit: Union[Unset, UnitMass] = UNSET + output_unit: Union[Unset, UnitDensity] = UNSET + src_format: Union[Unset, FileImportFormat] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - density: Union[Unset, float] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - material_mass: Union[Unset, float] = UNSET - material_mass_unit: Union[Unset, UnitMass] = UNSET - output_unit: Union[Unset, UnitDensity] = UNSET - src_format: Union[Unset, FileImportFormat] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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() + density = self.density + error = self.error + id = self.id + material_mass = self.material_mass + if not isinstance(self.material_mass_unit, Unset): + material_mass_unit = self.material_mass_unit + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + if not isinstance(self.src_format, Unset): + src_format = self.src_format + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + if not isinstance(self.status, Unset): + status = self.status + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id - 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() - density = self.density - error = self.error - id = self.id - material_mass = self.material_mass - if not isinstance(self.material_mass_unit, Unset): - material_mass_unit = self.material_mass_unit - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - if not isinstance(self.src_format, Unset): - src_format = self.src_format - started_at: Union[Unset, str] = UNSET - if not isinstance(self.started_at, Unset): - started_at = self.started_at.isoformat() - if not isinstance(self.status, Unset): - status = self.status - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() - user_id = self.user_id + 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 density is not UNSET: + field_dict['density'] = density + if error is not UNSET: + field_dict['error'] = error + if id is not UNSET: + field_dict['id'] = id + if material_mass is not UNSET: + field_dict['material_mass'] = material_mass + if material_mass_unit is not UNSET: + field_dict['material_mass_unit'] = material_mass_unit + if output_unit is not UNSET: + field_dict['output_unit'] = output_unit + if src_format is not UNSET: + field_dict['src_format'] = src_format + if started_at is not UNSET: + field_dict['started_at'] = started_at + if status is not UNSET: + field_dict['status'] = status + if updated_at is not UNSET: + field_dict['updated_at'] = updated_at + if user_id is not UNSET: + field_dict['user_id'] = user_id - 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 density is not UNSET: - field_dict["density"] = density - if error is not UNSET: - field_dict["error"] = error - if id is not UNSET: - field_dict["id"] = id - if material_mass is not UNSET: - field_dict["material_mass"] = material_mass - if material_mass_unit is not UNSET: - field_dict["material_mass_unit"] = material_mass_unit - if output_unit is not UNSET: - field_dict["output_unit"] = output_unit - if src_format is not UNSET: - field_dict["src_format"] = src_format - if started_at is not UNSET: - field_dict["started_at"] = started_at - if status is not UNSET: - field_dict["status"] = status - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - if user_id is not UNSET: - field_dict["user_id"] = user_id + return field_dict - return field_dict + @classmethod + 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] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) - @classmethod - 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] - 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) - _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) + density = d.pop("density", UNSET) - density = d.pop("density", UNSET) + error = d.pop("error", UNSET) - error = d.pop("error", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] + material_mass = d.pop("material_mass", UNSET) - material_mass = d.pop("material_mass", UNSET) + _material_mass_unit = d.pop("material_mass_unit", UNSET) + material_mass_unit: Union[Unset, UnitMass] + if isinstance(_material_mass_unit, Unset): + material_mass_unit = UNSET + else: + material_mass_unit = _material_mass_unit # type: ignore[arg-type] - _material_mass_unit = d.pop("material_mass_unit", UNSET) - material_mass_unit: Union[Unset, UnitMass] - if isinstance(_material_mass_unit, Unset): - material_mass_unit = UNSET - else: - material_mass_unit = _material_mass_unit # type: ignore[arg-type] + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitDensity] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitDensity] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] + _src_format = d.pop("src_format", UNSET) + src_format: Union[Unset, FileImportFormat] + if isinstance(_src_format, Unset): + src_format = UNSET + else: + src_format = _src_format # type: ignore[arg-type] - _src_format = d.pop("src_format", UNSET) - src_format: Union[Unset, FileImportFormat] - if isinstance(_src_format, Unset): - src_format = UNSET - else: - src_format = _src_format # type: ignore[arg-type] + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) - _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] - _status = d.pop("status", UNSET) - status: Union[Unset, ApiCallStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = _status # type: ignore[arg-type] + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) - _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) - user_id = d.pop("user_id", UNSET) - file_density = cls( - completed_at=completed_at, - created_at=created_at, - density=density, - error=error, - id=id, - material_mass=material_mass, - material_mass_unit=material_mass_unit, - output_unit=output_unit, - src_format=src_format, - started_at=started_at, - status=status, - updated_at=updated_at, - user_id=user_id, - ) + file_density = cls( + completed_at= completed_at, + created_at= created_at, + density= density, + error= error, + id= id, + material_mass= material_mass, + material_mass_unit= material_mass_unit, + output_unit= output_unit, + src_format= src_format, + started_at= started_at, + status= status, + updated_at= updated_at, + user_id= user_id, + ) - file_density.additional_properties = d - return file_density + file_density.additional_properties = d + return file_density - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/file_export_format.py b/kittycad/models/file_export_format.py index d1eee8886..6fbb8fe52 100644 --- a/kittycad/models/file_export_format.py +++ b/kittycad/models/file_export_format.py @@ -2,32 +2,31 @@ from enum import Enum class FileExportFormat(str, Enum): - """The valid types of output file formats.""" # noqa: E501 - - """# Autodesk Filmbox (FBX) format. """ # noqa: E501 - FBX = "fbx" - """# Binary glTF 2.0. + """ The valid types of output file formats. """ # noqa: E501 + """# Autodesk Filmbox (FBX) format. """ # noqa: E501 + FBX = 'fbx' + """# Binary glTF 2.0. This is a single binary with .glb extension. -This is better if you want a compressed format as opposed to the human readable glTF that lacks compression. """ # noqa: E501 - GLB = "glb" - """# glTF 2.0. Embedded glTF 2.0 (pretty printed). +This is better if you want a compressed format as opposed to the human readable glTF that lacks compression. """ # noqa: E501 + GLB = 'glb' + """# glTF 2.0. Embedded glTF 2.0 (pretty printed). Single JSON file with .gltf extension binary data encoded as base64 data URIs. The JSON contents are pretty printed. -It is human readable, single file, and you can view the diff easily in a git commit. """ # noqa: E501 - GLTF = "gltf" - """# The OBJ file format. It may or may not have an an attached material (mtl // mtllib) within the file, but we interact with it as if it does not. """ # noqa: E501 - OBJ = "obj" - """# The PLY file format. """ # noqa: E501 - PLY = "ply" - """# The STEP file format. """ # noqa: E501 - STEP = "step" - """# The STL file format. """ # noqa: E501 - STL = "stl" +It is human readable, single file, and you can view the diff easily in a git commit. """ # noqa: E501 + GLTF = 'gltf' + """# The OBJ file format. It may or may not have an an attached material (mtl // mtllib) within the file, but we interact with it as if it does not. """ # noqa: E501 + OBJ = 'obj' + """# The PLY file format. """ # noqa: E501 + PLY = 'ply' + """# The STEP file format. """ # noqa: E501 + STEP = 'step' + """# The STL file format. """ # noqa: E501 + STL = 'stl' - def __str__(self) -> str: - return str(self.value) + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/file_import_format.py b/kittycad/models/file_import_format.py index 92ae78571..377b0a773 100644 --- a/kittycad/models/file_import_format.py +++ b/kittycad/models/file_import_format.py @@ -2,22 +2,21 @@ from enum import Enum class FileImportFormat(str, Enum): - """The valid types of source file formats.""" # noqa: E501 + """ The valid types of source file formats. """ # noqa: E501 + """# Autodesk Filmbox (FBX) format. """ # noqa: E501 + FBX = 'fbx' + """# glTF 2.0. """ # noqa: E501 + GLTF = 'gltf' + """# The OBJ file format. It may or may not have an an attached material (mtl // mtllib) within the file, but we interact with it as if it does not. """ # noqa: E501 + OBJ = 'obj' + """# The PLY file format. """ # noqa: E501 + PLY = 'ply' + """# SolidWorks part (SLDPRT) format. """ # noqa: E501 + SLDPRT = 'sldprt' + """# The STEP file format. """ # noqa: E501 + STEP = 'step' + """# The STL file format. """ # noqa: E501 + STL = 'stl' - """# Autodesk Filmbox (FBX) format. """ # noqa: E501 - FBX = "fbx" - """# glTF 2.0. """ # noqa: E501 - GLTF = "gltf" - """# The OBJ file format. It may or may not have an an attached material (mtl // mtllib) within the file, but we interact with it as if it does not. """ # noqa: E501 - OBJ = "obj" - """# The PLY file format. """ # noqa: E501 - PLY = "ply" - """# SolidWorks part (SLDPRT) format. """ # noqa: E501 - SLDPRT = "sldprt" - """# The STEP file format. """ # noqa: E501 - STEP = "step" - """# The STL file format. """ # noqa: E501 - STL = "stl" - - def __str__(self) -> str: - return str(self.value) + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/file_mass.py b/kittycad/models/file_mass.py index e26a50142..66cc7d38e 100644 --- a/kittycad/models/file_mass.py +++ b/kittycad/models/file_mass.py @@ -13,191 +13,190 @@ from ..types import UNSET, Unset AR = TypeVar("AR", bound="FileMass") - @attr.s(auto_attribs=True) class FileMass: - """A file mass result.""" # noqa: E501 + """ A file mass result. """ # noqa: E501 + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + mass: Union[Unset, float] = UNSET + material_density: Union[Unset, float] = UNSET + material_density_unit: Union[Unset, UnitDensity] = UNSET + output_unit: Union[Unset, UnitMass] = UNSET + src_format: Union[Unset, FileImportFormat] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - mass: Union[Unset, float] = UNSET - material_density: Union[Unset, float] = UNSET - material_density_unit: Union[Unset, UnitDensity] = UNSET - output_unit: Union[Unset, UnitMass] = UNSET - src_format: Union[Unset, FileImportFormat] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 + id = self.id + mass = self.mass + material_density = self.material_density + if not isinstance(self.material_density_unit, Unset): + material_density_unit = self.material_density_unit + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + if not isinstance(self.src_format, Unset): + src_format = self.src_format + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + if not isinstance(self.status, Unset): + status = self.status + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id - 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 - id = self.id - mass = self.mass - material_density = self.material_density - if not isinstance(self.material_density_unit, Unset): - material_density_unit = self.material_density_unit - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - if not isinstance(self.src_format, Unset): - src_format = self.src_format - started_at: Union[Unset, str] = UNSET - if not isinstance(self.started_at, Unset): - started_at = self.started_at.isoformat() - if not isinstance(self.status, Unset): - status = self.status - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() - user_id = self.user_id + 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 id is not UNSET: + field_dict['id'] = id + if mass is not UNSET: + field_dict['mass'] = mass + if material_density is not UNSET: + field_dict['material_density'] = material_density + if material_density_unit is not UNSET: + field_dict['material_density_unit'] = material_density_unit + if output_unit is not UNSET: + field_dict['output_unit'] = output_unit + if src_format is not UNSET: + field_dict['src_format'] = src_format + if started_at is not UNSET: + field_dict['started_at'] = started_at + if status is not UNSET: + field_dict['status'] = status + if updated_at is not UNSET: + field_dict['updated_at'] = updated_at + if user_id is not UNSET: + field_dict['user_id'] = user_id - 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 id is not UNSET: - field_dict["id"] = id - if mass is not UNSET: - field_dict["mass"] = mass - if material_density is not UNSET: - field_dict["material_density"] = material_density - if material_density_unit is not UNSET: - field_dict["material_density_unit"] = material_density_unit - if output_unit is not UNSET: - field_dict["output_unit"] = output_unit - if src_format is not UNSET: - field_dict["src_format"] = src_format - if started_at is not UNSET: - field_dict["started_at"] = started_at - if status is not UNSET: - field_dict["status"] = status - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - if user_id is not UNSET: - field_dict["user_id"] = user_id + return field_dict - return field_dict + @classmethod + 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] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) - @classmethod - 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] - 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) - _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) - error = d.pop("error", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] + mass = d.pop("mass", UNSET) - mass = d.pop("mass", UNSET) + material_density = d.pop("material_density", UNSET) - material_density = d.pop("material_density", UNSET) + _material_density_unit = d.pop("material_density_unit", UNSET) + material_density_unit: Union[Unset, UnitDensity] + if isinstance(_material_density_unit, Unset): + material_density_unit = UNSET + else: + material_density_unit = _material_density_unit # type: ignore[arg-type] - _material_density_unit = d.pop("material_density_unit", UNSET) - material_density_unit: Union[Unset, UnitDensity] - if isinstance(_material_density_unit, Unset): - material_density_unit = UNSET - else: - material_density_unit = _material_density_unit # type: ignore[arg-type] + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitMass] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitMass] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] + _src_format = d.pop("src_format", UNSET) + src_format: Union[Unset, FileImportFormat] + if isinstance(_src_format, Unset): + src_format = UNSET + else: + src_format = _src_format # type: ignore[arg-type] - _src_format = d.pop("src_format", UNSET) - src_format: Union[Unset, FileImportFormat] - if isinstance(_src_format, Unset): - src_format = UNSET - else: - src_format = _src_format # type: ignore[arg-type] + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) - _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] - _status = d.pop("status", UNSET) - status: Union[Unset, ApiCallStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = _status # type: ignore[arg-type] + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) - _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) - user_id = d.pop("user_id", UNSET) - file_mass = cls( - completed_at=completed_at, - created_at=created_at, - error=error, - id=id, - mass=mass, - material_density=material_density, - material_density_unit=material_density_unit, - output_unit=output_unit, - src_format=src_format, - started_at=started_at, - status=status, - updated_at=updated_at, - user_id=user_id, - ) + file_mass = cls( + completed_at= completed_at, + created_at= created_at, + error= error, + id= id, + mass= mass, + material_density= material_density, + material_density_unit= material_density_unit, + output_unit= output_unit, + src_format= src_format, + started_at= started_at, + status= status, + updated_at= updated_at, + user_id= user_id, + ) - file_mass.additional_properties = d - return file_mass + file_mass.additional_properties = d + return file_mass - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/file_surface_area.py b/kittycad/models/file_surface_area.py index 423ee65fe..125c90306 100644 --- a/kittycad/models/file_surface_area.py +++ b/kittycad/models/file_surface_area.py @@ -12,171 +12,170 @@ from ..types import UNSET, Unset WB = TypeVar("WB", bound="FileSurfaceArea") - @attr.s(auto_attribs=True) class FileSurfaceArea: - """A file surface area result.""" # noqa: E501 + """ A file surface area result. """ # noqa: E501 + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + output_unit: Union[Unset, UnitArea] = UNSET + src_format: Union[Unset, FileImportFormat] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + surface_area: Union[Unset, float] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - output_unit: Union[Unset, UnitArea] = UNSET - src_format: Union[Unset, FileImportFormat] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - surface_area: Union[Unset, float] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 + id = self.id + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + if not isinstance(self.src_format, Unset): + src_format = self.src_format + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + if not isinstance(self.status, Unset): + status = self.status + surface_area = self.surface_area + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id - 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 - id = self.id - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - if not isinstance(self.src_format, Unset): - src_format = self.src_format - started_at: Union[Unset, str] = UNSET - if not isinstance(self.started_at, Unset): - started_at = self.started_at.isoformat() - if not isinstance(self.status, Unset): - status = self.status - surface_area = self.surface_area - 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 id is not UNSET: + field_dict['id'] = id + if output_unit is not UNSET: + field_dict['output_unit'] = output_unit + if src_format is not UNSET: + field_dict['src_format'] = src_format + if started_at is not UNSET: + field_dict['started_at'] = started_at + if status is not UNSET: + field_dict['status'] = status + if surface_area is not UNSET: + field_dict['surface_area'] = surface_area + if updated_at is not UNSET: + field_dict['updated_at'] = updated_at + if user_id is not UNSET: + field_dict['user_id'] = 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 id is not UNSET: - field_dict["id"] = id - if output_unit is not UNSET: - field_dict["output_unit"] = output_unit - if src_format is not UNSET: - field_dict["src_format"] = src_format - if started_at is not UNSET: - field_dict["started_at"] = started_at - if status is not UNSET: - field_dict["status"] = status - if surface_area is not UNSET: - field_dict["surface_area"] = surface_area - 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 - return field_dict + @classmethod + 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] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) - @classmethod - 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] - 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) - _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) - error = d.pop("error", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitArea] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitArea] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] + _src_format = d.pop("src_format", UNSET) + src_format: Union[Unset, FileImportFormat] + if isinstance(_src_format, Unset): + src_format = UNSET + else: + src_format = _src_format # type: ignore[arg-type] - _src_format = d.pop("src_format", UNSET) - src_format: Union[Unset, FileImportFormat] - if isinstance(_src_format, Unset): - src_format = UNSET - else: - src_format = _src_format # type: ignore[arg-type] + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) - _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] - _status = d.pop("status", UNSET) - status: Union[Unset, ApiCallStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = _status # type: ignore[arg-type] + surface_area = d.pop("surface_area", UNSET) - surface_area = d.pop("surface_area", 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) - _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) - user_id = d.pop("user_id", UNSET) - file_surface_area = cls( - completed_at=completed_at, - created_at=created_at, - error=error, - id=id, - output_unit=output_unit, - src_format=src_format, - started_at=started_at, - status=status, - surface_area=surface_area, - updated_at=updated_at, - user_id=user_id, - ) + file_surface_area = cls( + completed_at= completed_at, + created_at= created_at, + error= error, + id= id, + output_unit= output_unit, + src_format= src_format, + started_at= started_at, + status= status, + surface_area= surface_area, + updated_at= updated_at, + user_id= user_id, + ) - file_surface_area.additional_properties = d - return file_surface_area + file_surface_area.additional_properties = d + return file_surface_area - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/file_system_metadata.py b/kittycad/models/file_system_metadata.py index 6fd3307b2..c612f26a2 100644 --- a/kittycad/models/file_system_metadata.py +++ b/kittycad/models/file_system_metadata.py @@ -6,52 +6,51 @@ from ..types import UNSET, Unset KK = TypeVar("KK", bound="FileSystemMetadata") - @attr.s(auto_attribs=True) class FileSystemMetadata: - """Metadata about our file system. + """ Metadata about our file system. - This is mostly used for internal purposes and debugging.""" # noqa: E501 +This is mostly used for internal purposes and debugging. """ # noqa: E501 + ok: Union[Unset, bool] = False - ok: Union[Unset, bool] = False + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + ok = self.ok - def to_dict(self) -> Dict[str, Any]: - ok = self.ok + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if ok is not UNSET: + field_dict['ok'] = ok - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if ok is not UNSET: - field_dict["ok"] = ok + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[KK], src_dict: Dict[str, Any]) -> KK: + d = src_dict.copy() + ok = d.pop("ok", UNSET) - @classmethod - def from_dict(cls: Type[KK], src_dict: Dict[str, Any]) -> KK: - d = src_dict.copy() - ok = d.pop("ok", UNSET) - file_system_metadata = cls( - ok=ok, - ) + file_system_metadata = cls( + ok= ok, + ) - file_system_metadata.additional_properties = d - return file_system_metadata + file_system_metadata.additional_properties = d + return file_system_metadata - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/file_volume.py b/kittycad/models/file_volume.py index 2284f6b0c..6aa9b2f21 100644 --- a/kittycad/models/file_volume.py +++ b/kittycad/models/file_volume.py @@ -12,171 +12,170 @@ from ..types import UNSET, Unset HC = TypeVar("HC", bound="FileVolume") - @attr.s(auto_attribs=True) class FileVolume: - """A file volume result.""" # noqa: E501 + """ A file volume result. """ # noqa: E501 + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + output_unit: Union[Unset, UnitVolume] = UNSET + src_format: Union[Unset, FileImportFormat] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET + volume: Union[Unset, float] = UNSET - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - output_unit: Union[Unset, UnitVolume] = UNSET - src_format: Union[Unset, FileImportFormat] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET - volume: Union[Unset, float] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 + id = self.id + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + if not isinstance(self.src_format, Unset): + src_format = self.src_format + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + if not isinstance(self.status, Unset): + status = self.status + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id + volume = self.volume - 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 - id = self.id - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - if not isinstance(self.src_format, Unset): - src_format = self.src_format - started_at: Union[Unset, str] = UNSET - if not isinstance(self.started_at, Unset): - started_at = self.started_at.isoformat() - if not isinstance(self.status, Unset): - status = self.status - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() - user_id = self.user_id - volume = self.volume + 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 id is not UNSET: + field_dict['id'] = id + if output_unit is not UNSET: + field_dict['output_unit'] = output_unit + if src_format is not UNSET: + field_dict['src_format'] = src_format + if started_at is not UNSET: + field_dict['started_at'] = started_at + if status is not UNSET: + field_dict['status'] = status + if updated_at is not UNSET: + field_dict['updated_at'] = updated_at + if user_id is not UNSET: + field_dict['user_id'] = user_id + if volume is not UNSET: + field_dict['volume'] = volume - 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 id is not UNSET: - field_dict["id"] = id - if output_unit is not UNSET: - field_dict["output_unit"] = output_unit - if src_format is not UNSET: - field_dict["src_format"] = src_format - if started_at is not UNSET: - field_dict["started_at"] = started_at - if status is not UNSET: - field_dict["status"] = status - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - if user_id is not UNSET: - field_dict["user_id"] = user_id - if volume is not UNSET: - field_dict["volume"] = volume + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[HC], src_dict: Dict[str, Any]) -> HC: + d = src_dict.copy() + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) - @classmethod - def from_dict(cls: Type[HC], src_dict: Dict[str, Any]) -> HC: - d = src_dict.copy() - _completed_at = d.pop("completed_at", UNSET) - completed_at: Union[Unset, datetime.datetime] - 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) - _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) - error = d.pop("error", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitVolume] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitVolume] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] + _src_format = d.pop("src_format", UNSET) + src_format: Union[Unset, FileImportFormat] + if isinstance(_src_format, Unset): + src_format = UNSET + else: + src_format = _src_format # type: ignore[arg-type] - _src_format = d.pop("src_format", UNSET) - src_format: Union[Unset, FileImportFormat] - if isinstance(_src_format, Unset): - src_format = UNSET - else: - src_format = _src_format # type: ignore[arg-type] + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) - _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] - _status = d.pop("status", UNSET) - status: Union[Unset, ApiCallStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = _status # type: ignore[arg-type] + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) - _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) - user_id = d.pop("user_id", UNSET) + volume = d.pop("volume", UNSET) - volume = d.pop("volume", UNSET) - file_volume = cls( - completed_at=completed_at, - created_at=created_at, - error=error, - id=id, - output_unit=output_unit, - src_format=src_format, - started_at=started_at, - status=status, - updated_at=updated_at, - user_id=user_id, - volume=volume, - ) + file_volume = cls( + completed_at= completed_at, + created_at= created_at, + error= error, + id= id, + output_unit= output_unit, + src_format= src_format, + started_at= started_at, + status= status, + updated_at= updated_at, + user_id= user_id, + volume= volume, + ) - file_volume.additional_properties = d - return file_volume + file_volume.additional_properties = d + return file_volume - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/gateway.py b/kittycad/models/gateway.py index a01276844..86b3fcb94 100644 --- a/kittycad/models/gateway.py +++ b/kittycad/models/gateway.py @@ -6,78 +6,77 @@ from ..types import UNSET, Unset FM = TypeVar("FM", bound="Gateway") - @attr.s(auto_attribs=True) class Gateway: - """Gateway information.""" # noqa: E501 + """ Gateway information. """ # noqa: E501 + auth_timeout: Union[Unset, int] = UNSET + host: Union[Unset, str] = UNSET + name: Union[Unset, str] = UNSET + port: Union[Unset, int] = UNSET + tls_timeout: Union[Unset, int] = UNSET - auth_timeout: Union[Unset, int] = UNSET - host: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET - port: Union[Unset, int] = UNSET - tls_timeout: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + auth_timeout = self.auth_timeout + host = self.host + name = self.name + port = self.port + tls_timeout = self.tls_timeout - def to_dict(self) -> Dict[str, Any]: - auth_timeout = self.auth_timeout - host = self.host - name = self.name - port = self.port - tls_timeout = self.tls_timeout + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if auth_timeout is not UNSET: + field_dict['auth_timeout'] = auth_timeout + if host is not UNSET: + field_dict['host'] = host + if name is not UNSET: + field_dict['name'] = name + if port is not UNSET: + field_dict['port'] = port + if tls_timeout is not UNSET: + field_dict['tls_timeout'] = tls_timeout - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if auth_timeout is not UNSET: - field_dict["auth_timeout"] = auth_timeout - if host is not UNSET: - field_dict["host"] = host - if name is not UNSET: - field_dict["name"] = name - if port is not UNSET: - field_dict["port"] = port - if tls_timeout is not UNSET: - field_dict["tls_timeout"] = tls_timeout + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[FM], src_dict: Dict[str, Any]) -> FM: + d = src_dict.copy() + auth_timeout = d.pop("auth_timeout", UNSET) - @classmethod - def from_dict(cls: Type[FM], src_dict: Dict[str, Any]) -> FM: - d = src_dict.copy() - auth_timeout = d.pop("auth_timeout", UNSET) + host = d.pop("host", UNSET) - host = d.pop("host", UNSET) + name = d.pop("name", UNSET) - name = d.pop("name", UNSET) + port = d.pop("port", UNSET) - port = d.pop("port", UNSET) + tls_timeout = d.pop("tls_timeout", UNSET) - tls_timeout = d.pop("tls_timeout", UNSET) - gateway = cls( - auth_timeout=auth_timeout, - host=host, - name=name, - port=port, - tls_timeout=tls_timeout, - ) + gateway = cls( + auth_timeout= auth_timeout, + host= host, + name= name, + port= port, + tls_timeout= tls_timeout, + ) - gateway.additional_properties = d - return gateway + gateway.additional_properties = d + return gateway - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/get_entity_type.py b/kittycad/models/get_entity_type.py index 4db489dbb..445b36b3f 100644 --- a/kittycad/models/get_entity_type.py +++ b/kittycad/models/get_entity_type.py @@ -7,56 +7,55 @@ from ..types import UNSET, Unset PV = TypeVar("PV", bound="GetEntityType") - @attr.s(auto_attribs=True) class GetEntityType: - """The response from the `GetEntityType` command.""" # noqa: E501 + """ The response from the `GetEntityType` command. """ # noqa: E501 + entity_type: Union[Unset, EntityType] = UNSET - entity_type: Union[Unset, EntityType] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.entity_type, Unset): + entity_type = self.entity_type - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.entity_type, Unset): - entity_type = self.entity_type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entity_type is not UNSET: + field_dict['entity_type'] = entity_type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if entity_type is not UNSET: - field_dict["entity_type"] = entity_type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[PV], src_dict: Dict[str, Any]) -> PV: + d = src_dict.copy() + _entity_type = d.pop("entity_type", UNSET) + entity_type: Union[Unset, EntityType] + if isinstance(_entity_type, Unset): + entity_type = UNSET + else: + entity_type = _entity_type # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[PV], src_dict: Dict[str, Any]) -> PV: - d = src_dict.copy() - _entity_type = d.pop("entity_type", UNSET) - entity_type: Union[Unset, EntityType] - if isinstance(_entity_type, Unset): - entity_type = UNSET - else: - entity_type = _entity_type # type: ignore[arg-type] - get_entity_type = cls( - entity_type=entity_type, - ) + get_entity_type = cls( + entity_type= entity_type, + ) - get_entity_type.additional_properties = d - return get_entity_type + get_entity_type.additional_properties = d + return get_entity_type - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/gltf_presentation.py b/kittycad/models/gltf_presentation.py index 95c38a630..17ea6e1c4 100644 --- a/kittycad/models/gltf_presentation.py +++ b/kittycad/models/gltf_presentation.py @@ -2,14 +2,13 @@ from enum import Enum class GltfPresentation(str, Enum): - """Describes the presentation style of the glTF JSON.""" # noqa: E501 + """ Describes the presentation style of the glTF JSON. """ # noqa: E501 + """# Condense the JSON into the smallest possible size. """ # noqa: E501 + COMPACT = 'compact' + """# Expand the JSON into a more human readable format. - """# Condense the JSON into the smallest possible size. """ # noqa: E501 - COMPACT = "compact" - """# Expand the JSON into a more human readable format. +This is the default setting. """ # noqa: E501 + PRETTY = 'pretty' -This is the default setting. """ # noqa: E501 - PRETTY = "pretty" - - def __str__(self) -> str: - return str(self.value) + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/gltf_storage.py b/kittycad/models/gltf_storage.py index 525b7320b..d0756149e 100644 --- a/kittycad/models/gltf_storage.py +++ b/kittycad/models/gltf_storage.py @@ -2,22 +2,21 @@ from enum import Enum class GltfStorage(str, Enum): - """Describes the storage format of a glTF 2.0 scene.""" # noqa: E501 + """ Describes the storage format of a glTF 2.0 scene. """ # noqa: E501 + """# Binary glTF 2.0. - """# Binary glTF 2.0. +This is a single binary with .glb extension. """ # noqa: E501 + BINARY = 'binary' + """# Standard glTF 2.0. -This is a single binary with .glb extension. """ # noqa: E501 - BINARY = "binary" - """# Standard glTF 2.0. - -This is a JSON file with .gltf extension paired with a separate binary blob file with .bin extension. """ # noqa: E501 - STANDARD = "standard" - """# Embedded glTF 2.0. +This is a JSON file with .gltf extension paired with a separate binary blob file with .bin extension. """ # noqa: E501 + STANDARD = 'standard' + """# Embedded glTF 2.0. Single JSON file with .gltf extension binary data encoded as base64 data URIs. -This is the default setting. """ # noqa: E501 - EMBEDDED = "embedded" +This is the default setting. """ # noqa: E501 + EMBEDDED = 'embedded' - def __str__(self) -> str: - return str(self.value) + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/highlight_set_entity.py b/kittycad/models/highlight_set_entity.py index 3b4bafd9f..fa1c8b47b 100644 --- a/kittycad/models/highlight_set_entity.py +++ b/kittycad/models/highlight_set_entity.py @@ -6,57 +6,56 @@ from ..types import UNSET, Unset QI = TypeVar("QI", bound="HighlightSetEntity") - @attr.s(auto_attribs=True) class HighlightSetEntity: - """The response from the `HighlightSetEntity` command.""" # noqa: E501 + """ The response from the `HighlightSetEntity` command. """ # noqa: E501 + entity_id: Union[Unset, str] = UNSET + sequence: Union[Unset, int] = UNSET - entity_id: Union[Unset, str] = UNSET - sequence: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + entity_id = self.entity_id + sequence = self.sequence - def to_dict(self) -> Dict[str, Any]: - entity_id = self.entity_id - sequence = self.sequence + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entity_id is not UNSET: + field_dict['entity_id'] = entity_id + if sequence is not UNSET: + field_dict['sequence'] = sequence - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if entity_id is not UNSET: - field_dict["entity_id"] = entity_id - if sequence is not UNSET: - field_dict["sequence"] = sequence + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[QI], src_dict: Dict[str, Any]) -> QI: + d = src_dict.copy() + entity_id = d.pop("entity_id", UNSET) - @classmethod - def from_dict(cls: Type[QI], src_dict: Dict[str, Any]) -> QI: - d = src_dict.copy() - entity_id = d.pop("entity_id", UNSET) + sequence = d.pop("sequence", UNSET) - sequence = d.pop("sequence", UNSET) - highlight_set_entity = cls( - entity_id=entity_id, - sequence=sequence, - ) + highlight_set_entity = cls( + entity_id= entity_id, + sequence= sequence, + ) - highlight_set_entity.additional_properties = d - return highlight_set_entity + highlight_set_entity.additional_properties = d + return highlight_set_entity - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/ice_server.py b/kittycad/models/ice_server.py index 2895a3976..aab26a562 100644 --- a/kittycad/models/ice_server.py +++ b/kittycad/models/ice_server.py @@ -6,66 +6,65 @@ from ..types import UNSET, Unset TP = TypeVar("TP", bound="IceServer") - @attr.s(auto_attribs=True) class IceServer: - """Representation of an ICE server used for STUN/TURN Used to initiate WebRTC connections based on """ # noqa: E501 + """ Representation of an ICE server used for STUN/TURN Used to initiate WebRTC connections based on """ # noqa: E501 + credential: Union[Unset, str] = UNSET + urls: Union[Unset, List[str]] = UNSET + username: Union[Unset, str] = UNSET - credential: Union[Unset, str] = UNSET - urls: Union[Unset, List[str]] = UNSET - username: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + credential = self.credential + urls: Union[Unset, List[str]] = UNSET + if not isinstance(self.urls, Unset): + urls = self.urls + username = self.username - def to_dict(self) -> Dict[str, Any]: - credential = self.credential - urls: Union[Unset, List[str]] = UNSET - if not isinstance(self.urls, Unset): - urls = self.urls - username = self.username + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if credential is not UNSET: + field_dict['credential'] = credential + if urls is not UNSET: + field_dict['urls'] = urls + if username is not UNSET: + field_dict['username'] = username - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if credential is not UNSET: - field_dict["credential"] = credential - if urls is not UNSET: - field_dict["urls"] = urls - if username is not UNSET: - field_dict["username"] = username + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[TP], src_dict: Dict[str, Any]) -> TP: + d = src_dict.copy() + credential = d.pop("credential", UNSET) - @classmethod - def from_dict(cls: Type[TP], src_dict: Dict[str, Any]) -> TP: - d = src_dict.copy() - credential = d.pop("credential", UNSET) + urls = cast(List[str], d.pop("urls", UNSET)) - urls = cast(List[str], d.pop("urls", UNSET)) + username = d.pop("username", UNSET) - username = d.pop("username", UNSET) - ice_server = cls( - credential=credential, - urls=urls, - username=username, - ) + ice_server = cls( + credential= credential, + urls= urls, + username= username, + ) - ice_server.additional_properties = d - return ice_server + ice_server.additional_properties = d + return ice_server - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/image_format.py b/kittycad/models/image_format.py index 01671688a..bb1690104 100644 --- a/kittycad/models/image_format.py +++ b/kittycad/models/image_format.py @@ -2,12 +2,11 @@ from enum import Enum class ImageFormat(str, Enum): - """Enum containing the variety of image formats snapshots may be exported to.""" # noqa: E501 + """ Enum containing the variety of image formats snapshots may be exported to. """ # noqa: E501 + """# .png format """ # noqa: E501 + PNG = 'png' + """# .jpeg format """ # noqa: E501 + JPEG = 'jpeg' - """# .png format """ # noqa: E501 - PNG = "png" - """# .jpeg format """ # noqa: E501 - JPEG = "jpeg" - - def __str__(self) -> str: - return str(self.value) + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/image_type.py b/kittycad/models/image_type.py index ef43475fd..c793858b5 100644 --- a/kittycad/models/image_type.py +++ b/kittycad/models/image_type.py @@ -2,10 +2,9 @@ from enum import Enum class ImageType(str, Enum): - """An enumeration.""" # noqa: E501 + """ An enumeration. """ # noqa: E501 + PNG = 'png' + JPG = 'jpg' - PNG = "png" - JPG = "jpg" - - def __str__(self) -> str: - return str(self.value) + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/import_file.py b/kittycad/models/import_file.py index 3ff7b9de6..b581a26ff 100644 --- a/kittycad/models/import_file.py +++ b/kittycad/models/import_file.py @@ -6,59 +6,58 @@ from ..types import UNSET, Unset CF = TypeVar("CF", bound="ImportFile") - @attr.s(auto_attribs=True) class ImportFile: - """File to import into the current model""" # noqa: E501 + """ File to import into the current model """ # noqa: E501 + data: Union[Unset, List[int]] = UNSET + path: Union[Unset, str] = UNSET - data: Union[Unset, List[int]] = UNSET - path: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + data: Union[Unset, List[int]] = UNSET + if not isinstance(self.data, Unset): + data = self.data + path = self.path - def to_dict(self) -> Dict[str, Any]: - data: Union[Unset, List[int]] = UNSET - if not isinstance(self.data, Unset): - data = self.data - path = self.path + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict['data'] = data + if path is not UNSET: + field_dict['path'] = path - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if data is not UNSET: - field_dict["data"] = data - if path is not UNSET: - field_dict["path"] = path + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[CF], src_dict: Dict[str, Any]) -> CF: + d = src_dict.copy() + data = cast(List[int], d.pop("data", UNSET)) - @classmethod - def from_dict(cls: Type[CF], src_dict: Dict[str, Any]) -> CF: - d = src_dict.copy() - data = cast(List[int], d.pop("data", UNSET)) + path = d.pop("path", UNSET) - path = d.pop("path", UNSET) - import_file = cls( - data=data, - path=path, - ) + import_file = cls( + data= data, + path= path, + ) - import_file.additional_properties = d - return import_file + import_file.additional_properties = d + return import_file - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/import_files.py b/kittycad/models/import_files.py index f7bf08cf9..f78f2a422 100644 --- a/kittycad/models/import_files.py +++ b/kittycad/models/import_files.py @@ -6,50 +6,49 @@ from ..types import UNSET, Unset OM = TypeVar("OM", bound="ImportFiles") - @attr.s(auto_attribs=True) class ImportFiles: - """Data from importing the files""" # noqa: E501 + """ Data from importing the files """ # noqa: E501 + object_id: Union[Unset, str] = UNSET - object_id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + object_id = self.object_id - def to_dict(self) -> Dict[str, Any]: - object_id = self.object_id + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if object_id is not UNSET: + field_dict['object_id'] = object_id - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if object_id is not UNSET: - field_dict["object_id"] = object_id + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[OM], src_dict: Dict[str, Any]) -> OM: + d = src_dict.copy() + object_id = d.pop("object_id", UNSET) - @classmethod - def from_dict(cls: Type[OM], src_dict: Dict[str, Any]) -> OM: - d = src_dict.copy() - object_id = d.pop("object_id", UNSET) - import_files = cls( - object_id=object_id, - ) + import_files = cls( + object_id= object_id, + ) - import_files.additional_properties = d - return import_files + import_files.additional_properties = d + return import_files - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/input_format.py b/kittycad/models/input_format.py index 11c68de05..0ac4dafe3 100644 --- a/kittycad/models/input_format.py +++ b/kittycad/models/input_format.py @@ -8,430 +8,434 @@ from ..types import UNSET, Unset EN = TypeVar("EN", bound="fbx") - @attr.s(auto_attribs=True) class fbx: - """Autodesk Filmbox (FBX) format.""" # noqa: E501 + """ Autodesk Filmbox (FBX) format. """ # noqa: E501 + type: str = "fbx" - type: str = "fbx" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + type = self.type - def to_dict(self) -> Dict[str, Any]: - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[EN], src_dict: Dict[str, Any]) -> EN: + d = src_dict.copy() + type = d.pop("type", UNSET) - @classmethod - def from_dict(cls: Type[EN], src_dict: Dict[str, Any]) -> EN: - d = src_dict.copy() - type = d.pop("type", UNSET) - fbx = cls( - type=type, - ) + fbx = cls( + type= type, + ) - fbx.additional_properties = d - return fbx + fbx.additional_properties = d + return fbx - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties RS = TypeVar("RS", bound="gltf") - @attr.s(auto_attribs=True) class gltf: - """Binary glTF 2.0. We refer to this as glTF since that is how our customers refer to it, but this can also import binary glTF (glb).""" # noqa: E501 + """ Binary glTF 2.0. We refer to this as glTF since that is how our customers refer to it, but this can also import binary glTF (glb). """ # noqa: E501 + type: str = "gltf" - type: str = "gltf" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + type = self.type - def to_dict(self) -> Dict[str, Any]: - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[RS], src_dict: Dict[str, Any]) -> RS: + d = src_dict.copy() + type = d.pop("type", UNSET) - @classmethod - def from_dict(cls: Type[RS], src_dict: Dict[str, Any]) -> RS: - d = src_dict.copy() - type = d.pop("type", UNSET) - gltf = cls( - type=type, - ) + gltf = cls( + type= type, + ) - gltf.additional_properties = d - return gltf + gltf.additional_properties = d + return gltf - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties LR = TypeVar("LR", bound="obj") - @attr.s(auto_attribs=True) class obj: - """Wavefront OBJ format.""" # noqa: E501 + """ Wavefront OBJ format. """ # noqa: E501 + coords: Union[Unset, System] = UNSET + type: str = "obj" + units: Union[Unset, UnitLength] = UNSET - coords: Union[Unset, System] = UNSET - type: str = "obj" - units: Union[Unset, UnitLength] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.coords, Unset): + coords = self.coords + type = self.type + if not isinstance(self.units, Unset): + units = self.units - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.coords, Unset): - coords = self.coords - type = self.type - if not isinstance(self.units, Unset): - units = self.units + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if coords is not UNSET: + field_dict['coords'] = coords + field_dict['type'] = type + if units is not UNSET: + field_dict['units'] = units - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if coords is not UNSET: - field_dict["coords"] = coords - field_dict["type"] = type - if units is not UNSET: - field_dict["units"] = units + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[LR], src_dict: Dict[str, Any]) -> LR: + d = src_dict.copy() + _coords = d.pop("coords", UNSET) + coords: Union[Unset, System] + if isinstance(_coords, Unset): + coords = UNSET + else: + coords = _coords # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[LR], src_dict: Dict[str, Any]) -> LR: - d = src_dict.copy() - _coords = d.pop("coords", UNSET) - coords: Union[Unset, System] - if isinstance(_coords, Unset): - coords = UNSET - else: - coords = _coords # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) + _units = d.pop("units", UNSET) + units: Union[Unset, UnitLength] + if isinstance(_units, Unset): + units = UNSET + else: + units = _units # type: ignore[arg-type] - _units = d.pop("units", UNSET) - units: Union[Unset, UnitLength] - if isinstance(_units, Unset): - units = UNSET - else: - units = _units # type: ignore[arg-type] - obj = cls( - coords=coords, - type=type, - units=units, - ) + obj = cls( + coords= coords, + type= type, + units= units, + ) - obj.additional_properties = d - return obj + obj.additional_properties = d + return obj - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties MP = TypeVar("MP", bound="ply") - @attr.s(auto_attribs=True) class ply: - """The PLY Polygon File Format.""" # noqa: E501 + """ The PLY Polygon File Format. """ # noqa: E501 + coords: Union[Unset, System] = UNSET + type: str = "ply" + units: Union[Unset, UnitLength] = UNSET - coords: Union[Unset, System] = UNSET - type: str = "ply" - units: Union[Unset, UnitLength] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.coords, Unset): + coords = self.coords + type = self.type + if not isinstance(self.units, Unset): + units = self.units - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.coords, Unset): - coords = self.coords - type = self.type - if not isinstance(self.units, Unset): - units = self.units + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if coords is not UNSET: + field_dict['coords'] = coords + field_dict['type'] = type + if units is not UNSET: + field_dict['units'] = units - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if coords is not UNSET: - field_dict["coords"] = coords - field_dict["type"] = type - if units is not UNSET: - field_dict["units"] = units + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[MP], src_dict: Dict[str, Any]) -> MP: + d = src_dict.copy() + _coords = d.pop("coords", UNSET) + coords: Union[Unset, System] + if isinstance(_coords, Unset): + coords = UNSET + else: + coords = _coords # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[MP], src_dict: Dict[str, Any]) -> MP: - d = src_dict.copy() - _coords = d.pop("coords", UNSET) - coords: Union[Unset, System] - if isinstance(_coords, Unset): - coords = UNSET - else: - coords = _coords # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) + _units = d.pop("units", UNSET) + units: Union[Unset, UnitLength] + if isinstance(_units, Unset): + units = UNSET + else: + units = _units # type: ignore[arg-type] - _units = d.pop("units", UNSET) - units: Union[Unset, UnitLength] - if isinstance(_units, Unset): - units = UNSET - else: - units = _units # type: ignore[arg-type] - ply = cls( - coords=coords, - type=type, - units=units, - ) + ply = cls( + coords= coords, + type= type, + units= units, + ) - ply.additional_properties = d - return ply + ply.additional_properties = d + return ply - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties WF = TypeVar("WF", bound="sldprt") - @attr.s(auto_attribs=True) class sldprt: - """SolidWorks part (SLDPRT) format.""" # noqa: E501 + """ SolidWorks part (SLDPRT) format. """ # noqa: E501 + type: str = "sldprt" - type: str = "sldprt" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + type = self.type - def to_dict(self) -> Dict[str, Any]: - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[WF], src_dict: Dict[str, Any]) -> WF: + d = src_dict.copy() + type = d.pop("type", UNSET) - @classmethod - def from_dict(cls: Type[WF], src_dict: Dict[str, Any]) -> WF: - d = src_dict.copy() - type = d.pop("type", UNSET) - sldprt = cls( - type=type, - ) + sldprt = cls( + type= type, + ) - sldprt.additional_properties = d - return sldprt + sldprt.additional_properties = d + return sldprt - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties RO = TypeVar("RO", bound="step") - @attr.s(auto_attribs=True) class step: - """ISO 10303-21 (STEP) format.""" # noqa: E501 + """ ISO 10303-21 (STEP) format. """ # noqa: E501 + type: str = "step" - type: str = "step" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + type = self.type - def to_dict(self) -> Dict[str, Any]: - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[RO], src_dict: Dict[str, Any]) -> RO: + d = src_dict.copy() + type = d.pop("type", UNSET) - @classmethod - def from_dict(cls: Type[RO], src_dict: Dict[str, Any]) -> RO: - d = src_dict.copy() - type = d.pop("type", UNSET) - step = cls( - type=type, - ) + step = cls( + type= type, + ) - step.additional_properties = d - return step + step.additional_properties = d + return step - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties DN = TypeVar("DN", bound="stl") - @attr.s(auto_attribs=True) class stl: - """*ST**ereo**L**ithography format.""" # noqa: E501 + """ *ST**ereo**L**ithography format. """ # noqa: E501 + coords: Union[Unset, System] = UNSET + type: str = "stl" + units: Union[Unset, UnitLength] = UNSET - coords: Union[Unset, System] = UNSET - type: str = "stl" - units: Union[Unset, UnitLength] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.coords, Unset): + coords = self.coords + type = self.type + if not isinstance(self.units, Unset): + units = self.units - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.coords, Unset): - coords = self.coords - type = self.type - if not isinstance(self.units, Unset): - units = self.units + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if coords is not UNSET: + field_dict['coords'] = coords + field_dict['type'] = type + if units is not UNSET: + field_dict['units'] = units - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if coords is not UNSET: - field_dict["coords"] = coords - field_dict["type"] = type - if units is not UNSET: - field_dict["units"] = units + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[DN], src_dict: Dict[str, Any]) -> DN: + d = src_dict.copy() + _coords = d.pop("coords", UNSET) + coords: Union[Unset, System] + if isinstance(_coords, Unset): + coords = UNSET + else: + coords = _coords # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[DN], src_dict: Dict[str, Any]) -> DN: - d = src_dict.copy() - _coords = d.pop("coords", UNSET) - coords: Union[Unset, System] - if isinstance(_coords, Unset): - coords = UNSET - else: - coords = _coords # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) + _units = d.pop("units", UNSET) + units: Union[Unset, UnitLength] + if isinstance(_units, Unset): + units = UNSET + else: + units = _units # type: ignore[arg-type] - _units = d.pop("units", UNSET) - units: Union[Unset, UnitLength] - if isinstance(_units, Unset): - units = UNSET - else: - units = _units # type: ignore[arg-type] - stl = cls( - coords=coords, - type=type, - units=units, - ) + stl = cls( + coords= coords, + type= type, + units= units, + ) - stl.additional_properties = d - return stl + stl.additional_properties = d + return stl - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties InputFormat = Union[fbx, gltf, obj, ply, sldprt, step, stl] diff --git a/kittycad/models/invoice.py b/kittycad/models/invoice.py index a35649385..0123937b4 100644 --- a/kittycad/models/invoice.py +++ b/kittycad/models/invoice.py @@ -10,254 +10,247 @@ from ..types import UNSET, Unset BA = TypeVar("BA", bound="Invoice") - @attr.s(auto_attribs=True) class Invoice: - """An invoice.""" # noqa: E501 + """ An invoice. """ # noqa: E501 + amount_due: Union[Unset, float] = UNSET + amount_paid: Union[Unset, float] = UNSET + amount_remaining: Union[Unset, float] = UNSET + attempt_count: Union[Unset, int] = UNSET + attempted: Union[Unset, bool] = False + created_at: Union[Unset, datetime.datetime] = UNSET + currency: Union[Unset, Currency] = UNSET + customer_email: Union[Unset, str] = UNSET + customer_id: Union[Unset, str] = UNSET + default_payment_method: Union[Unset, str] = UNSET + description: Union[Unset, str] = UNSET + from ..models.discount import Discount + discounts: Union[Unset, List[Discount]] = UNSET + id: Union[Unset, str] = UNSET + from ..models.invoice_line_item import InvoiceLineItem + lines: Union[Unset, List[InvoiceLineItem]] = UNSET + metadata: Union[Unset, Dict[str, str]] = UNSET + number: Union[Unset, str] = UNSET + paid: Union[Unset, bool] = False + pdf: Union[Unset, str] = UNSET + receipt_number: Union[Unset, str] = UNSET + statement_descriptor: Union[Unset, str] = UNSET + status: Union[Unset, InvoiceStatus] = UNSET + subtotal: Union[Unset, float] = UNSET + tax: Union[Unset, float] = UNSET + total: Union[Unset, float] = UNSET + url: Union[Unset, str] = UNSET - amount_due: Union[Unset, float] = UNSET - amount_paid: Union[Unset, float] = UNSET - amount_remaining: Union[Unset, float] = UNSET - attempt_count: Union[Unset, int] = UNSET - attempted: Union[Unset, bool] = False - created_at: Union[Unset, datetime.datetime] = UNSET - currency: Union[Unset, Currency] = UNSET - customer_email: Union[Unset, str] = UNSET - customer_id: Union[Unset, str] = UNSET - default_payment_method: Union[Unset, str] = UNSET - description: Union[Unset, str] = UNSET - from ..models.discount import Discount + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - discounts: Union[Unset, List[Discount]] = UNSET - id: Union[Unset, str] = UNSET - from ..models.invoice_line_item import InvoiceLineItem + def to_dict(self) -> Dict[str, Any]: + amount_due = self.amount_due + amount_paid = self.amount_paid + amount_remaining = self.amount_remaining + attempt_count = self.attempt_count + attempted = self.attempted + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + if not isinstance(self.currency, Unset): + currency = self.currency + customer_email = self.customer_email + customer_id = self.customer_id + default_payment_method = self.default_payment_method + description = self.description + from ..models.discount import Discount + discounts: Union[Unset, List[Discount]] = UNSET + if not isinstance(self.discounts, Unset): + discounts = self.discounts + id = self.id + from ..models.invoice_line_item import InvoiceLineItem + lines: Union[Unset, List[InvoiceLineItem]] = UNSET + if not isinstance(self.lines, Unset): + lines = self.lines + metadata = self.metadata - lines: Union[Unset, List[InvoiceLineItem]] = UNSET - metadata: Union[Unset, Dict[str, str]] = UNSET - number: Union[Unset, str] = UNSET - paid: Union[Unset, bool] = False - pdf: Union[Unset, str] = UNSET - receipt_number: Union[Unset, str] = UNSET - statement_descriptor: Union[Unset, str] = UNSET - status: Union[Unset, InvoiceStatus] = UNSET - subtotal: Union[Unset, float] = UNSET - tax: Union[Unset, float] = UNSET - total: Union[Unset, float] = UNSET - url: Union[Unset, str] = UNSET + number = self.number + paid = self.paid + pdf = self.pdf + receipt_number = self.receipt_number + statement_descriptor = self.statement_descriptor + if not isinstance(self.status, Unset): + status = self.status + subtotal = self.subtotal + tax = self.tax + total = self.total + url = self.url - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if amount_due is not UNSET: + field_dict['amount_due'] = amount_due + if amount_paid is not UNSET: + field_dict['amount_paid'] = amount_paid + if amount_remaining is not UNSET: + field_dict['amount_remaining'] = amount_remaining + if attempt_count is not UNSET: + field_dict['attempt_count'] = attempt_count + if attempted is not UNSET: + field_dict['attempted'] = attempted + if created_at is not UNSET: + field_dict['created_at'] = created_at + if currency is not UNSET: + field_dict['currency'] = currency + if customer_email is not UNSET: + field_dict['customer_email'] = customer_email + if customer_id is not UNSET: + field_dict['customer_id'] = customer_id + if default_payment_method is not UNSET: + field_dict['default_payment_method'] = default_payment_method + if description is not UNSET: + field_dict['description'] = description + if discounts is not UNSET: + field_dict['discounts'] = discounts + if id is not UNSET: + field_dict['id'] = id + if lines is not UNSET: + field_dict['lines'] = lines + if metadata is not UNSET: + field_dict['metadata'] = metadata + if number is not UNSET: + field_dict['number'] = number + if paid is not UNSET: + field_dict['paid'] = paid + if pdf is not UNSET: + field_dict['pdf'] = pdf + if receipt_number is not UNSET: + field_dict['receipt_number'] = receipt_number + if statement_descriptor is not UNSET: + field_dict['statement_descriptor'] = statement_descriptor + if status is not UNSET: + field_dict['status'] = status + if subtotal is not UNSET: + field_dict['subtotal'] = subtotal + if tax is not UNSET: + field_dict['tax'] = tax + if total is not UNSET: + field_dict['total'] = total + if url is not UNSET: + field_dict['url'] = url - def to_dict(self) -> Dict[str, Any]: - amount_due = self.amount_due - amount_paid = self.amount_paid - amount_remaining = self.amount_remaining - attempt_count = self.attempt_count - attempted = self.attempted - created_at: Union[Unset, str] = UNSET - if not isinstance(self.created_at, Unset): - created_at = self.created_at.isoformat() - if not isinstance(self.currency, Unset): - currency = self.currency - customer_email = self.customer_email - customer_id = self.customer_id - default_payment_method = self.default_payment_method - description = self.description - from ..models.discount import Discount + return field_dict - discounts: Union[Unset, List[Discount]] = UNSET - if not isinstance(self.discounts, Unset): - discounts = self.discounts - id = self.id - from ..models.invoice_line_item import InvoiceLineItem + @classmethod + def from_dict(cls: Type[BA], src_dict: Dict[str, Any]) -> BA: + d = src_dict.copy() + amount_due = d.pop("amount_due", UNSET) - lines: Union[Unset, List[InvoiceLineItem]] = UNSET - if not isinstance(self.lines, Unset): - lines = self.lines - metadata = self.metadata + amount_paid = d.pop("amount_paid", UNSET) - number = self.number - paid = self.paid - pdf = self.pdf - receipt_number = self.receipt_number - statement_descriptor = self.statement_descriptor - if not isinstance(self.status, Unset): - status = self.status - subtotal = self.subtotal - tax = self.tax - total = self.total - url = self.url + amount_remaining = d.pop("amount_remaining", UNSET) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if amount_due is not UNSET: - field_dict["amount_due"] = amount_due - if amount_paid is not UNSET: - field_dict["amount_paid"] = amount_paid - if amount_remaining is not UNSET: - field_dict["amount_remaining"] = amount_remaining - if attempt_count is not UNSET: - field_dict["attempt_count"] = attempt_count - if attempted is not UNSET: - field_dict["attempted"] = attempted - if created_at is not UNSET: - field_dict["created_at"] = created_at - if currency is not UNSET: - field_dict["currency"] = currency - if customer_email is not UNSET: - field_dict["customer_email"] = customer_email - if customer_id is not UNSET: - field_dict["customer_id"] = customer_id - if default_payment_method is not UNSET: - field_dict["default_payment_method"] = default_payment_method - if description is not UNSET: - field_dict["description"] = description - if discounts is not UNSET: - field_dict["discounts"] = discounts - if id is not UNSET: - field_dict["id"] = id - if lines is not UNSET: - field_dict["lines"] = lines - if metadata is not UNSET: - field_dict["metadata"] = metadata - if number is not UNSET: - field_dict["number"] = number - if paid is not UNSET: - field_dict["paid"] = paid - if pdf is not UNSET: - field_dict["pdf"] = pdf - if receipt_number is not UNSET: - field_dict["receipt_number"] = receipt_number - if statement_descriptor is not UNSET: - field_dict["statement_descriptor"] = statement_descriptor - if status is not UNSET: - field_dict["status"] = status - if subtotal is not UNSET: - field_dict["subtotal"] = subtotal - if tax is not UNSET: - field_dict["tax"] = tax - if total is not UNSET: - field_dict["total"] = total - if url is not UNSET: - field_dict["url"] = url + attempt_count = d.pop("attempt_count", UNSET) - return field_dict + attempted = d.pop("attempted", UNSET) - @classmethod - def from_dict(cls: Type[BA], src_dict: Dict[str, Any]) -> BA: - d = src_dict.copy() - amount_due = d.pop("amount_due", UNSET) + _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) - amount_paid = d.pop("amount_paid", UNSET) + _currency = d.pop("currency", UNSET) + currency: Union[Unset, Currency] + if isinstance(_currency, Unset): + currency = UNSET + else: + currency = _currency # type: ignore[arg-type] - amount_remaining = d.pop("amount_remaining", UNSET) + customer_email = d.pop("customer_email", UNSET) - attempt_count = d.pop("attempt_count", UNSET) + customer_id = d.pop("customer_id", UNSET) - attempted = d.pop("attempted", UNSET) + default_payment_method = d.pop("default_payment_method", UNSET) - _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) + description = d.pop("description", UNSET) - _currency = d.pop("currency", UNSET) - currency: Union[Unset, Currency] - if isinstance(_currency, Unset): - currency = UNSET - else: - currency = _currency # type: ignore[arg-type] + from ..models.discount import Discount + discounts = cast(List[Discount], d.pop("discounts", UNSET)) - customer_email = d.pop("customer_email", UNSET) + id = d.pop("id", UNSET) - customer_id = d.pop("customer_id", UNSET) + from ..models.invoice_line_item import InvoiceLineItem + lines = cast(List[InvoiceLineItem], d.pop("lines", UNSET)) - default_payment_method = d.pop("default_payment_method", UNSET) + metadata = d.pop("metadata", UNSET) - description = d.pop("description", UNSET) + number = d.pop("number", UNSET) - from ..models.discount import Discount + paid = d.pop("paid", UNSET) - discounts = cast(List[Discount], d.pop("discounts", UNSET)) + pdf = d.pop("pdf", UNSET) - id = d.pop("id", UNSET) + receipt_number = d.pop("receipt_number", UNSET) - from ..models.invoice_line_item import InvoiceLineItem + statement_descriptor = d.pop("statement_descriptor", UNSET) - lines = cast(List[InvoiceLineItem], d.pop("lines", UNSET)) + _status = d.pop("status", UNSET) + status: Union[Unset, InvoiceStatus] + if isinstance(_status, Unset): + status = UNSET + else: + status = _status # type: ignore[arg-type] - metadata = d.pop("metadata", UNSET) + subtotal = d.pop("subtotal", UNSET) - number = d.pop("number", UNSET) + tax = d.pop("tax", UNSET) - paid = d.pop("paid", UNSET) + total = d.pop("total", UNSET) - pdf = d.pop("pdf", UNSET) + url = d.pop("url", UNSET) - receipt_number = d.pop("receipt_number", UNSET) - statement_descriptor = d.pop("statement_descriptor", UNSET) + invoice = cls( + amount_due= amount_due, + amount_paid= amount_paid, + amount_remaining= amount_remaining, + attempt_count= attempt_count, + attempted= attempted, + created_at= created_at, + currency= currency, + customer_email= customer_email, + customer_id= customer_id, + default_payment_method= default_payment_method, + description= description, + discounts= discounts, + id= id, + lines= lines, + metadata= metadata, + number= number, + paid= paid, + pdf= pdf, + receipt_number= receipt_number, + statement_descriptor= statement_descriptor, + status= status, + subtotal= subtotal, + tax= tax, + total= total, + url= url, + ) - _status = d.pop("status", UNSET) - status: Union[Unset, InvoiceStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = _status # type: ignore[arg-type] + invoice.additional_properties = d + return invoice - subtotal = d.pop("subtotal", UNSET) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - tax = d.pop("tax", UNSET) + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - total = d.pop("total", UNSET) + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - url = d.pop("url", UNSET) + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - invoice = cls( - amount_due=amount_due, - amount_paid=amount_paid, - amount_remaining=amount_remaining, - attempt_count=attempt_count, - attempted=attempted, - created_at=created_at, - currency=currency, - customer_email=customer_email, - customer_id=customer_id, - default_payment_method=default_payment_method, - description=description, - discounts=discounts, - id=id, - lines=lines, - metadata=metadata, - number=number, - paid=paid, - pdf=pdf, - receipt_number=receipt_number, - statement_descriptor=statement_descriptor, - status=status, - subtotal=subtotal, - tax=tax, - total=total, - url=url, - ) - - invoice.additional_properties = d - return invoice - - @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 + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/invoice_line_item.py b/kittycad/models/invoice_line_item.py index 63b263c22..90757c0fe 100644 --- a/kittycad/models/invoice_line_item.py +++ b/kittycad/models/invoice_line_item.py @@ -7,91 +7,91 @@ from ..types import UNSET, Unset OR = TypeVar("OR", bound="InvoiceLineItem") - @attr.s(auto_attribs=True) class InvoiceLineItem: - """An invoice line item.""" # noqa: E501 + """ An invoice line item. """ # noqa: E501 + amount: Union[Unset, float] = UNSET + currency: Union[Unset, Currency] = UNSET + description: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + invoice_item: Union[Unset, str] = UNSET + metadata: Union[Unset, Dict[str, str]] = UNSET - amount: Union[Unset, float] = UNSET - currency: Union[Unset, Currency] = UNSET - description: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - invoice_item: Union[Unset, str] = UNSET - metadata: Union[Unset, Dict[str, str]] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + amount = self.amount + if not isinstance(self.currency, Unset): + currency = self.currency + description = self.description + id = self.id + invoice_item = self.invoice_item + metadata = self.metadata - def to_dict(self) -> Dict[str, Any]: - amount = self.amount - if not isinstance(self.currency, Unset): - currency = self.currency - description = self.description - id = self.id - invoice_item = self.invoice_item - metadata = self.metadata - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if amount is not UNSET: - field_dict["amount"] = amount - if currency is not UNSET: - field_dict["currency"] = currency - if description is not UNSET: - field_dict["description"] = description - if id is not UNSET: - field_dict["id"] = id - if invoice_item is not UNSET: - field_dict["invoice_item"] = invoice_item - if metadata is not UNSET: - field_dict["metadata"] = metadata + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if amount is not UNSET: + field_dict['amount'] = amount + if currency is not UNSET: + field_dict['currency'] = currency + if description is not UNSET: + field_dict['description'] = description + if id is not UNSET: + field_dict['id'] = id + if invoice_item is not UNSET: + field_dict['invoice_item'] = invoice_item + if metadata is not UNSET: + field_dict['metadata'] = metadata - return field_dict + return field_dict - @classmethod - def from_dict(cls: Type[OR], src_dict: Dict[str, Any]) -> OR: - d = src_dict.copy() - amount = d.pop("amount", UNSET) + @classmethod + def from_dict(cls: Type[OR], src_dict: Dict[str, Any]) -> OR: + d = src_dict.copy() + amount = d.pop("amount", UNSET) - _currency = d.pop("currency", UNSET) - currency: Union[Unset, Currency] - if isinstance(_currency, Unset): - currency = UNSET - else: - currency = _currency # type: ignore[arg-type] + _currency = d.pop("currency", UNSET) + currency: Union[Unset, Currency] + if isinstance(_currency, Unset): + currency = UNSET + else: + currency = _currency # type: ignore[arg-type] - description = d.pop("description", UNSET) + description = d.pop("description", UNSET) - id = d.pop("id", UNSET) + id = d.pop("id", UNSET) - invoice_item = d.pop("invoice_item", UNSET) + invoice_item = d.pop("invoice_item", UNSET) - metadata = d.pop("metadata", UNSET) + metadata = d.pop("metadata", UNSET) - invoice_line_item = cls( - amount=amount, - currency=currency, - description=description, - id=id, - invoice_item=invoice_item, - metadata=metadata, - ) - invoice_line_item.additional_properties = d - return invoice_line_item + invoice_line_item = cls( + amount= amount, + currency= currency, + description= description, + id= id, + invoice_item= invoice_item, + metadata= metadata, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + invoice_line_item.additional_properties = d + return invoice_line_item - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/invoice_status.py b/kittycad/models/invoice_status.py index 56117a214..efb0e687a 100644 --- a/kittycad/models/invoice_status.py +++ b/kittycad/models/invoice_status.py @@ -2,20 +2,19 @@ from enum import Enum class InvoiceStatus(str, Enum): - """An enum representing the possible values of an `Invoice`'s `status` field.""" # noqa: E501 + """ An enum representing the possible values of an `Invoice`'s `status` field. """ # noqa: E501 + """# Deleted. """ # noqa: E501 + DELETED = 'deleted' + """# Draft. """ # noqa: E501 + DRAFT = 'draft' + """# Open. """ # noqa: E501 + OPEN = 'open' + """# Paid. """ # noqa: E501 + PAID = 'paid' + """# Uncollectible. """ # noqa: E501 + UNCOLLECTIBLE = 'uncollectible' + """# Void. """ # noqa: E501 + VOID = 'void' - """# Deleted. """ # noqa: E501 - DELETED = "deleted" - """# Draft. """ # noqa: E501 - DRAFT = "draft" - """# Open. """ # noqa: E501 - OPEN = "open" - """# Paid. """ # noqa: E501 - PAID = "paid" - """# Uncollectible. """ # noqa: E501 - UNCOLLECTIBLE = "uncollectible" - """# Void. """ # noqa: E501 - VOID = "void" - - def __str__(self) -> str: - return str(self.value) + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/jetstream.py b/kittycad/models/jetstream.py index d7968d5fd..b66eb5cb6 100644 --- a/kittycad/models/jetstream.py +++ b/kittycad/models/jetstream.py @@ -9,82 +9,81 @@ from ..types import UNSET, Unset CB = TypeVar("CB", bound="Jetstream") - @attr.s(auto_attribs=True) class Jetstream: - """Jetstream information.""" # noqa: E501 + """ Jetstream information. """ # noqa: E501 + config: Union[Unset, JetstreamConfig] = UNSET + meta: Union[Unset, MetaClusterInfo] = UNSET + stats: Union[Unset, JetstreamStats] = UNSET - config: Union[Unset, JetstreamConfig] = UNSET - meta: Union[Unset, MetaClusterInfo] = UNSET - stats: Union[Unset, JetstreamStats] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.config, Unset): + config = self.config + if not isinstance(self.meta, Unset): + meta = self.meta + if not isinstance(self.stats, Unset): + stats = self.stats - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.config, Unset): - config = self.config - if not isinstance(self.meta, Unset): - meta = self.meta - if not isinstance(self.stats, Unset): - stats = self.stats + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if config is not UNSET: + field_dict['config'] = config + if meta is not UNSET: + field_dict['meta'] = meta + if stats is not UNSET: + field_dict['stats'] = stats - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if config is not UNSET: - field_dict["config"] = config - if meta is not UNSET: - field_dict["meta"] = meta - if stats is not UNSET: - field_dict["stats"] = stats + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[CB], src_dict: Dict[str, Any]) -> CB: + d = src_dict.copy() + _config = d.pop("config", UNSET) + config: Union[Unset, JetstreamConfig] + if isinstance(_config, Unset): + config = UNSET + else: + config = _config # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[CB], src_dict: Dict[str, Any]) -> CB: - d = src_dict.copy() - _config = d.pop("config", UNSET) - config: Union[Unset, JetstreamConfig] - if isinstance(_config, Unset): - config = UNSET - else: - config = _config # type: ignore[arg-type] + _meta = d.pop("meta", UNSET) + meta: Union[Unset, MetaClusterInfo] + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = _meta # type: ignore[arg-type] - _meta = d.pop("meta", UNSET) - meta: Union[Unset, MetaClusterInfo] - if isinstance(_meta, Unset): - meta = UNSET - else: - meta = _meta # type: ignore[arg-type] + _stats = d.pop("stats", UNSET) + stats: Union[Unset, JetstreamStats] + if isinstance(_stats, Unset): + stats = UNSET + else: + stats = _stats # type: ignore[arg-type] - _stats = d.pop("stats", UNSET) - stats: Union[Unset, JetstreamStats] - if isinstance(_stats, Unset): - stats = UNSET - else: - stats = _stats # type: ignore[arg-type] - jetstream = cls( - config=config, - meta=meta, - stats=stats, - ) + jetstream = cls( + config= config, + meta= meta, + stats= stats, + ) - jetstream.additional_properties = d - return jetstream + jetstream.additional_properties = d + return jetstream - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/jetstream_api_stats.py b/kittycad/models/jetstream_api_stats.py index c0721e89e..7f88dd674 100644 --- a/kittycad/models/jetstream_api_stats.py +++ b/kittycad/models/jetstream_api_stats.py @@ -6,64 +6,63 @@ from ..types import UNSET, Unset LC = TypeVar("LC", bound="JetstreamApiStats") - @attr.s(auto_attribs=True) class JetstreamApiStats: - """Jetstream API statistics.""" # noqa: E501 + """ Jetstream API statistics. """ # noqa: E501 + errors: Union[Unset, int] = UNSET + inflight: Union[Unset, int] = UNSET + total: Union[Unset, int] = UNSET - errors: Union[Unset, int] = UNSET - inflight: Union[Unset, int] = UNSET - total: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + errors = self.errors + inflight = self.inflight + total = self.total - def to_dict(self) -> Dict[str, Any]: - errors = self.errors - inflight = self.inflight - total = self.total + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if errors is not UNSET: + field_dict['errors'] = errors + if inflight is not UNSET: + field_dict['inflight'] = inflight + if total is not UNSET: + field_dict['total'] = total - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if errors is not UNSET: - field_dict["errors"] = errors - if inflight is not UNSET: - field_dict["inflight"] = inflight - if total is not UNSET: - field_dict["total"] = total + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[LC], src_dict: Dict[str, Any]) -> LC: + d = src_dict.copy() + errors = d.pop("errors", UNSET) - @classmethod - def from_dict(cls: Type[LC], src_dict: Dict[str, Any]) -> LC: - d = src_dict.copy() - errors = d.pop("errors", UNSET) + inflight = d.pop("inflight", UNSET) - inflight = d.pop("inflight", UNSET) + total = d.pop("total", UNSET) - total = d.pop("total", UNSET) - jetstream_api_stats = cls( - errors=errors, - inflight=inflight, - total=total, - ) + jetstream_api_stats = cls( + errors= errors, + inflight= inflight, + total= total, + ) - jetstream_api_stats.additional_properties = d - return jetstream_api_stats + jetstream_api_stats.additional_properties = d + return jetstream_api_stats - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/jetstream_config.py b/kittycad/models/jetstream_config.py index 6873f5acd..20a4b1001 100644 --- a/kittycad/models/jetstream_config.py +++ b/kittycad/models/jetstream_config.py @@ -6,71 +6,70 @@ from ..types import UNSET, Unset TO = TypeVar("TO", bound="JetstreamConfig") - @attr.s(auto_attribs=True) class JetstreamConfig: - """Jetstream configuration.""" # noqa: E501 + """ Jetstream configuration. """ # noqa: E501 + domain: Union[Unset, str] = UNSET + max_memory: Union[Unset, int] = UNSET + max_storage: Union[Unset, int] = UNSET + store_dir: Union[Unset, str] = UNSET - domain: Union[Unset, str] = UNSET - max_memory: Union[Unset, int] = UNSET - max_storage: Union[Unset, int] = UNSET - store_dir: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + domain = self.domain + max_memory = self.max_memory + max_storage = self.max_storage + store_dir = self.store_dir - def to_dict(self) -> Dict[str, Any]: - domain = self.domain - max_memory = self.max_memory - max_storage = self.max_storage - store_dir = self.store_dir + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if domain is not UNSET: + field_dict['domain'] = domain + if max_memory is not UNSET: + field_dict['max_memory'] = max_memory + if max_storage is not UNSET: + field_dict['max_storage'] = max_storage + if store_dir is not UNSET: + field_dict['store_dir'] = store_dir - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if domain is not UNSET: - field_dict["domain"] = domain - if max_memory is not UNSET: - field_dict["max_memory"] = max_memory - if max_storage is not UNSET: - field_dict["max_storage"] = max_storage - if store_dir is not UNSET: - field_dict["store_dir"] = store_dir + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[TO], src_dict: Dict[str, Any]) -> TO: + d = src_dict.copy() + domain = d.pop("domain", UNSET) - @classmethod - def from_dict(cls: Type[TO], src_dict: Dict[str, Any]) -> TO: - d = src_dict.copy() - domain = d.pop("domain", UNSET) + max_memory = d.pop("max_memory", UNSET) - max_memory = d.pop("max_memory", UNSET) + max_storage = d.pop("max_storage", UNSET) - max_storage = d.pop("max_storage", UNSET) + store_dir = d.pop("store_dir", UNSET) - store_dir = d.pop("store_dir", UNSET) - jetstream_config = cls( - domain=domain, - max_memory=max_memory, - max_storage=max_storage, - store_dir=store_dir, - ) + jetstream_config = cls( + domain= domain, + max_memory= max_memory, + max_storage= max_storage, + store_dir= store_dir, + ) - jetstream_config.additional_properties = d - return jetstream_config + jetstream_config.additional_properties = d + return jetstream_config - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/jetstream_stats.py b/kittycad/models/jetstream_stats.py index 1f78cfbf9..9eeff5913 100644 --- a/kittycad/models/jetstream_stats.py +++ b/kittycad/models/jetstream_stats.py @@ -7,98 +7,97 @@ from ..types import UNSET, Unset ZP = TypeVar("ZP", bound="JetstreamStats") - @attr.s(auto_attribs=True) class JetstreamStats: - """Jetstream statistics.""" # noqa: E501 + """ Jetstream statistics. """ # noqa: E501 + accounts: Union[Unset, int] = UNSET + api: Union[Unset, JetstreamApiStats] = UNSET + ha_assets: Union[Unset, int] = UNSET + memory: Union[Unset, int] = UNSET + reserved_memory: Union[Unset, int] = UNSET + reserved_store: Union[Unset, int] = UNSET + store: Union[Unset, int] = UNSET - accounts: Union[Unset, int] = UNSET - api: Union[Unset, JetstreamApiStats] = UNSET - ha_assets: Union[Unset, int] = UNSET - memory: Union[Unset, int] = UNSET - reserved_memory: Union[Unset, int] = UNSET - reserved_store: Union[Unset, int] = UNSET - store: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + accounts = self.accounts + if not isinstance(self.api, Unset): + api = self.api + ha_assets = self.ha_assets + memory = self.memory + reserved_memory = self.reserved_memory + reserved_store = self.reserved_store + store = self.store - def to_dict(self) -> Dict[str, Any]: - accounts = self.accounts - if not isinstance(self.api, Unset): - api = self.api - ha_assets = self.ha_assets - memory = self.memory - reserved_memory = self.reserved_memory - reserved_store = self.reserved_store - store = self.store + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if accounts is not UNSET: + field_dict['accounts'] = accounts + if api is not UNSET: + field_dict['api'] = api + if ha_assets is not UNSET: + field_dict['ha_assets'] = ha_assets + if memory is not UNSET: + field_dict['memory'] = memory + if reserved_memory is not UNSET: + field_dict['reserved_memory'] = reserved_memory + if reserved_store is not UNSET: + field_dict['reserved_store'] = reserved_store + if store is not UNSET: + field_dict['store'] = store - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if accounts is not UNSET: - field_dict["accounts"] = accounts - if api is not UNSET: - field_dict["api"] = api - if ha_assets is not UNSET: - field_dict["ha_assets"] = ha_assets - if memory is not UNSET: - field_dict["memory"] = memory - if reserved_memory is not UNSET: - field_dict["reserved_memory"] = reserved_memory - if reserved_store is not UNSET: - field_dict["reserved_store"] = reserved_store - if store is not UNSET: - field_dict["store"] = store + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[ZP], src_dict: Dict[str, Any]) -> ZP: + d = src_dict.copy() + accounts = d.pop("accounts", UNSET) - @classmethod - def from_dict(cls: Type[ZP], src_dict: Dict[str, Any]) -> ZP: - d = src_dict.copy() - accounts = d.pop("accounts", UNSET) + _api = d.pop("api", UNSET) + api: Union[Unset, JetstreamApiStats] + if isinstance(_api, Unset): + api = UNSET + else: + api = _api # type: ignore[arg-type] - _api = d.pop("api", UNSET) - api: Union[Unset, JetstreamApiStats] - if isinstance(_api, Unset): - api = UNSET - else: - api = _api # type: ignore[arg-type] + ha_assets = d.pop("ha_assets", UNSET) - ha_assets = d.pop("ha_assets", UNSET) + memory = d.pop("memory", UNSET) - memory = d.pop("memory", UNSET) + reserved_memory = d.pop("reserved_memory", UNSET) - reserved_memory = d.pop("reserved_memory", UNSET) + reserved_store = d.pop("reserved_store", UNSET) - reserved_store = d.pop("reserved_store", UNSET) + store = d.pop("store", UNSET) - store = d.pop("store", UNSET) - jetstream_stats = cls( - accounts=accounts, - api=api, - ha_assets=ha_assets, - memory=memory, - reserved_memory=reserved_memory, - reserved_store=reserved_store, - store=store, - ) + jetstream_stats = cls( + accounts= accounts, + api= api, + ha_assets= ha_assets, + memory= memory, + reserved_memory= reserved_memory, + reserved_store= reserved_store, + store= store, + ) - jetstream_stats.additional_properties = d - return jetstream_stats + jetstream_stats.additional_properties = d + return jetstream_stats - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/leaf_node.py b/kittycad/models/leaf_node.py index 507daef4d..1e57fbc2d 100644 --- a/kittycad/models/leaf_node.py +++ b/kittycad/models/leaf_node.py @@ -6,71 +6,70 @@ from ..types import UNSET, Unset EO = TypeVar("EO", bound="LeafNode") - @attr.s(auto_attribs=True) class LeafNode: - """Leaf node information.""" # noqa: E501 + """ Leaf node information. """ # noqa: E501 + auth_timeout: Union[Unset, int] = UNSET + host: Union[Unset, str] = UNSET + port: Union[Unset, int] = UNSET + tls_timeout: Union[Unset, int] = UNSET - auth_timeout: Union[Unset, int] = UNSET - host: Union[Unset, str] = UNSET - port: Union[Unset, int] = UNSET - tls_timeout: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + auth_timeout = self.auth_timeout + host = self.host + port = self.port + tls_timeout = self.tls_timeout - def to_dict(self) -> Dict[str, Any]: - auth_timeout = self.auth_timeout - host = self.host - port = self.port - tls_timeout = self.tls_timeout + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if auth_timeout is not UNSET: + field_dict['auth_timeout'] = auth_timeout + if host is not UNSET: + field_dict['host'] = host + if port is not UNSET: + field_dict['port'] = port + if tls_timeout is not UNSET: + field_dict['tls_timeout'] = tls_timeout - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if auth_timeout is not UNSET: - field_dict["auth_timeout"] = auth_timeout - if host is not UNSET: - field_dict["host"] = host - if port is not UNSET: - field_dict["port"] = port - if tls_timeout is not UNSET: - field_dict["tls_timeout"] = tls_timeout + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[EO], src_dict: Dict[str, Any]) -> EO: + d = src_dict.copy() + auth_timeout = d.pop("auth_timeout", UNSET) - @classmethod - def from_dict(cls: Type[EO], src_dict: Dict[str, Any]) -> EO: - d = src_dict.copy() - auth_timeout = d.pop("auth_timeout", UNSET) + host = d.pop("host", UNSET) - host = d.pop("host", UNSET) + port = d.pop("port", UNSET) - port = d.pop("port", UNSET) + tls_timeout = d.pop("tls_timeout", UNSET) - tls_timeout = d.pop("tls_timeout", UNSET) - leaf_node = cls( - auth_timeout=auth_timeout, - host=host, - port=port, - tls_timeout=tls_timeout, - ) + leaf_node = cls( + auth_timeout= auth_timeout, + host= host, + port= port, + tls_timeout= tls_timeout, + ) - leaf_node.additional_properties = d - return leaf_node + leaf_node.additional_properties = d + return leaf_node - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/mass.py b/kittycad/models/mass.py index c130f0fe8..8ac73f569 100644 --- a/kittycad/models/mass.py +++ b/kittycad/models/mass.py @@ -7,63 +7,62 @@ from ..types import UNSET, Unset NY = TypeVar("NY", bound="Mass") - @attr.s(auto_attribs=True) class Mass: - """The mass response.""" # noqa: E501 + """ The mass response. """ # noqa: E501 + mass: Union[Unset, float] = UNSET + output_unit: Union[Unset, UnitMass] = UNSET - mass: Union[Unset, float] = UNSET - output_unit: Union[Unset, UnitMass] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + mass = self.mass + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit - def to_dict(self) -> Dict[str, Any]: - mass = self.mass - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if mass is not UNSET: + field_dict['mass'] = mass + if output_unit is not UNSET: + field_dict['output_unit'] = output_unit - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if mass is not UNSET: - field_dict["mass"] = mass - if output_unit is not UNSET: - field_dict["output_unit"] = output_unit + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[NY], src_dict: Dict[str, Any]) -> NY: + d = src_dict.copy() + mass = d.pop("mass", UNSET) - @classmethod - def from_dict(cls: Type[NY], src_dict: Dict[str, Any]) -> NY: - d = src_dict.copy() - mass = d.pop("mass", UNSET) + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitMass] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitMass] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] - mass = cls( - mass=mass, - output_unit=output_unit, - ) + mass = cls( + mass= mass, + output_unit= output_unit, + ) - mass.additional_properties = d - return mass + mass.additional_properties = d + return mass - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/mesh.py b/kittycad/models/mesh.py index 0defdeb0d..2575cd48a 100644 --- a/kittycad/models/mesh.py +++ b/kittycad/models/mesh.py @@ -6,48 +6,48 @@ from ..types import UNSET, Unset QO = TypeVar("QO", bound="Mesh") - @attr.s(auto_attribs=True) class Mesh: - mesh: Union[Unset, str] = UNSET + mesh: Union[Unset, str] = UNSET - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - def to_dict(self) -> Dict[str, Any]: - mesh = self.mesh + def to_dict(self) -> Dict[str, Any]: + mesh = self.mesh - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if mesh is not UNSET: - field_dict["mesh"] = mesh + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if mesh is not UNSET: + field_dict['mesh'] = mesh - return field_dict + return field_dict - @classmethod - def from_dict(cls: Type[QO], src_dict: Dict[str, Any]) -> QO: - d = src_dict.copy() - mesh = d.pop("mesh", UNSET) + @classmethod + def from_dict(cls: Type[QO], src_dict: Dict[str, Any]) -> QO: + d = src_dict.copy() + mesh = d.pop("mesh", UNSET) - mesh = cls( - mesh=mesh, - ) - mesh.additional_properties = d - return mesh + mesh = cls( + mesh= mesh, + ) - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + mesh.additional_properties = d + return mesh - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/meta_cluster_info.py b/kittycad/models/meta_cluster_info.py index 741b5d6d5..a133f70c5 100644 --- a/kittycad/models/meta_cluster_info.py +++ b/kittycad/models/meta_cluster_info.py @@ -6,64 +6,63 @@ from ..types import UNSET, Unset KX = TypeVar("KX", bound="MetaClusterInfo") - @attr.s(auto_attribs=True) class MetaClusterInfo: - """Jetstream statistics.""" # noqa: E501 + """ Jetstream statistics. """ # noqa: E501 + cluster_size: Union[Unset, int] = UNSET + leader: Union[Unset, str] = UNSET + name: Union[Unset, str] = UNSET - cluster_size: Union[Unset, int] = UNSET - leader: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + cluster_size = self.cluster_size + leader = self.leader + name = self.name - def to_dict(self) -> Dict[str, Any]: - cluster_size = self.cluster_size - leader = self.leader - name = self.name + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if cluster_size is not UNSET: + field_dict['cluster_size'] = cluster_size + if leader is not UNSET: + field_dict['leader'] = leader + if name is not UNSET: + field_dict['name'] = name - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if cluster_size is not UNSET: - field_dict["cluster_size"] = cluster_size - if leader is not UNSET: - field_dict["leader"] = leader - if name is not UNSET: - field_dict["name"] = name + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[KX], src_dict: Dict[str, Any]) -> KX: + d = src_dict.copy() + cluster_size = d.pop("cluster_size", UNSET) - @classmethod - def from_dict(cls: Type[KX], src_dict: Dict[str, Any]) -> KX: - d = src_dict.copy() - cluster_size = d.pop("cluster_size", UNSET) + leader = d.pop("leader", UNSET) - leader = d.pop("leader", UNSET) + name = d.pop("name", UNSET) - name = d.pop("name", UNSET) - meta_cluster_info = cls( - cluster_size=cluster_size, - leader=leader, - name=name, - ) + meta_cluster_info = cls( + cluster_size= cluster_size, + leader= leader, + name= name, + ) - meta_cluster_info.additional_properties = d - return meta_cluster_info + meta_cluster_info.additional_properties = d + return meta_cluster_info - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/metadata.py b/kittycad/models/metadata.py index 17f0215ca..1c7e53b5f 100644 --- a/kittycad/models/metadata.py +++ b/kittycad/models/metadata.py @@ -11,117 +11,116 @@ from ..types import UNSET, Unset IZ = TypeVar("IZ", bound="Metadata") - @attr.s(auto_attribs=True) class Metadata: - """Metadata about our currently running server. + """ Metadata about our currently running server. - This is mostly used for internal purposes and debugging.""" # noqa: E501 +This is mostly used for internal purposes and debugging. """ # noqa: E501 + cache: Union[Unset, CacheMetadata] = UNSET + 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 - cache: Union[Unset, CacheMetadata] = UNSET - 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) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.cache, Unset): + cache = self.cache + if not isinstance(self.environment, Unset): + environment = self.environment + if not isinstance(self.fs, Unset): + fs = self.fs + git_hash = self.git_hash + if not isinstance(self.point_e, Unset): + point_e = self.point_e + if not isinstance(self.pubsub, Unset): + pubsub = self.pubsub - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.cache, Unset): - cache = self.cache - if not isinstance(self.environment, Unset): - environment = self.environment - if not isinstance(self.fs, Unset): - fs = self.fs - git_hash = self.git_hash - if not isinstance(self.point_e, Unset): - point_e = self.point_e - if not isinstance(self.pubsub, Unset): - pubsub = self.pubsub + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if cache is not UNSET: + field_dict['cache'] = cache + if environment is not UNSET: + field_dict['environment'] = environment + if fs is not UNSET: + field_dict['fs'] = fs + if git_hash is not UNSET: + field_dict['git_hash'] = git_hash + if point_e is not UNSET: + field_dict['point_e'] = point_e + if pubsub is not UNSET: + field_dict['pubsub'] = pubsub - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if cache is not UNSET: - field_dict["cache"] = cache - if environment is not UNSET: - field_dict["environment"] = environment - if fs is not UNSET: - field_dict["fs"] = fs - if git_hash is not UNSET: - field_dict["git_hash"] = git_hash - if point_e is not UNSET: - field_dict["point_e"] = point_e - if pubsub is not UNSET: - field_dict["pubsub"] = pubsub + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[IZ], src_dict: Dict[str, Any]) -> IZ: + d = src_dict.copy() + _cache = d.pop("cache", UNSET) + cache: Union[Unset, CacheMetadata] + if isinstance(_cache, Unset): + cache = UNSET + else: + cache = _cache # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[IZ], src_dict: Dict[str, Any]) -> IZ: - d = src_dict.copy() - _cache = d.pop("cache", UNSET) - cache: Union[Unset, CacheMetadata] - if isinstance(_cache, Unset): - cache = UNSET - else: - cache = _cache # type: ignore[arg-type] + _environment = d.pop("environment", UNSET) + environment: Union[Unset, Environment] + if isinstance(_environment, Unset): + environment = UNSET + else: + environment = _environment # type: ignore[arg-type] - _environment = d.pop("environment", UNSET) - environment: Union[Unset, Environment] - if isinstance(_environment, Unset): - environment = UNSET - else: - environment = _environment # type: ignore[arg-type] + _fs = d.pop("fs", UNSET) + fs: Union[Unset, FileSystemMetadata] + if isinstance(_fs, Unset): + fs = UNSET + else: + fs = _fs # type: ignore[arg-type] - _fs = d.pop("fs", UNSET) - fs: Union[Unset, FileSystemMetadata] - if isinstance(_fs, Unset): - fs = UNSET - else: - fs = _fs # type: ignore[arg-type] + git_hash = d.pop("git_hash", UNSET) - 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] - _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): + pubsub = UNSET + else: + pubsub = _pubsub # type: ignore[arg-type] - _pubsub = d.pop("pubsub", UNSET) - pubsub: Union[Unset, Connection] - if isinstance(_pubsub, Unset): - pubsub = UNSET - else: - pubsub = _pubsub # type: ignore[arg-type] - metadata = cls( - cache=cache, - environment=environment, - fs=fs, - git_hash=git_hash, - point_e=point_e, - pubsub=pubsub, - ) + metadata = cls( + cache= cache, + environment= environment, + fs= fs, + git_hash= git_hash, + point_e= point_e, + pubsub= pubsub, + ) - metadata.additional_properties = d - return metadata + metadata.additional_properties = d + return metadata - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/method.py b/kittycad/models/method.py index 02c0b186a..666a8900f 100644 --- a/kittycad/models/method.py +++ b/kittycad/models/method.py @@ -2,33 +2,31 @@ from enum import Enum class Method(str, Enum): - """The Request Method (VERB) + """ The Request Method (VERB) - This type also contains constants for a number of common HTTP methods such as GET, POST, etc. +This type also contains constants for a number of common HTTP methods such as GET, POST, etc. - Currently includes 8 variants representing the 8 methods defined in [RFC 7230](https://tools.ietf.org/html/rfc7231#section-4.1), plus PATCH, and an Extension variant for all extensions. - """ # noqa: E501 +Currently includes 8 variants representing the 8 methods defined in [RFC 7230](https://tools.ietf.org/html/rfc7231#section-4.1), plus PATCH, and an Extension variant for all extensions. """ # noqa: E501 + """# The `OPTIONS` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.2.1). """ # noqa: E501 + OPTIONS = 'OPTIONS' + """# The `GET` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3.1). """ # noqa: E501 + GET = 'GET' + """# The `POST` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3.1). """ # noqa: E501 + POST = 'POST' + """# The `PUT` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3.1). """ # noqa: E501 + PUT = 'PUT' + """# The `DELETE` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3.5). """ # noqa: E501 + DELETE = 'DELETE' + """# The `HEAD` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3.2). """ # noqa: E501 + HEAD = 'HEAD' + """# The `TRACE` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3). """ # noqa: E501 + TRACE = 'TRACE' + """# The `CONNECT` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3.6). """ # noqa: E501 + CONNECT = 'CONNECT' + """# The `PATCH` method as defined in [RFC 5789](https://tools.ietf.org/html/rfc5789). """ # noqa: E501 + PATCH = 'PATCH' + """# A catch all. """ # noqa: E501 + EXTENSION = 'EXTENSION' - """# The `OPTIONS` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.2.1). """ # noqa: E501 - OPTIONS = "OPTIONS" - """# The `GET` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3.1). """ # noqa: E501 - GET = "GET" - """# The `POST` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3.1). """ # noqa: E501 - POST = "POST" - """# The `PUT` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3.1). """ # noqa: E501 - PUT = "PUT" - """# The `DELETE` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3.5). """ # noqa: E501 - DELETE = "DELETE" - """# The `HEAD` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3.2). """ # noqa: E501 - HEAD = "HEAD" - """# The `TRACE` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3). """ # noqa: E501 - TRACE = "TRACE" - """# The `CONNECT` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3.6). """ # noqa: E501 - CONNECT = "CONNECT" - """# The `PATCH` method as defined in [RFC 5789](https://tools.ietf.org/html/rfc5789). """ # noqa: E501 - PATCH = "PATCH" - """# A catch all. """ # noqa: E501 - EXTENSION = "EXTENSION" - - def __str__(self) -> str: - return str(self.value) + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/modeling_cmd.py b/kittycad/models/modeling_cmd.py index 1be898ee4..16bab619e 100644 --- a/kittycad/models/modeling_cmd.py +++ b/kittycad/models/modeling_cmd.py @@ -23,4518 +23,4511 @@ from ..types import UNSET, Unset WO = TypeVar("WO", bound="start_path") - @attr.s(auto_attribs=True) class start_path: - """Start a path.""" # noqa: E501 + """ Start a path. """ # noqa: E501 + type: str = "start_path" - type: str = "start_path" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + type = self.type - def to_dict(self) -> Dict[str, Any]: - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[WO], src_dict: Dict[str, Any]) -> WO: + d = src_dict.copy() + type = d.pop("type", UNSET) - @classmethod - def from_dict(cls: Type[WO], src_dict: Dict[str, Any]) -> WO: - d = src_dict.copy() - type = d.pop("type", UNSET) - start_path = cls( - type=type, - ) + start_path = cls( + type= type, + ) - start_path.additional_properties = d - return start_path + start_path.additional_properties = d + return start_path - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties NK = TypeVar("NK", bound="move_path_pen") - @attr.s(auto_attribs=True) class move_path_pen: - """Move the path's "pen".""" # noqa: E501 + """ Move the path's "pen". """ # noqa: E501 + path: Union[Unset, ModelingCmdId] = UNSET + to: Union[Unset, Point3d] = UNSET + type: str = "move_path_pen" - path: Union[Unset, ModelingCmdId] = UNSET - to: Union[Unset, Point3d] = UNSET - type: str = "move_path_pen" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.path, Unset): + path = self.path + if not isinstance(self.to, Unset): + to = self.to + type = self.type - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.path, Unset): - path = self.path - if not isinstance(self.to, Unset): - to = self.to - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if path is not UNSET: + field_dict['path'] = path + if to is not UNSET: + field_dict['to'] = to + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if path is not UNSET: - field_dict["path"] = path - if to is not UNSET: - field_dict["to"] = to - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[NK], src_dict: Dict[str, Any]) -> NK: + d = src_dict.copy() + _path = d.pop("path", UNSET) + path: Union[Unset, ModelingCmdId] + if isinstance(_path, Unset): + path = UNSET + else: + path = _path # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[NK], src_dict: Dict[str, Any]) -> NK: - d = src_dict.copy() - _path = d.pop("path", UNSET) - path: Union[Unset, ModelingCmdId] - if isinstance(_path, Unset): - path = UNSET - else: - path = _path # type: ignore[arg-type] + _to = d.pop("to", UNSET) + to: Union[Unset, Point3d] + if isinstance(_to, Unset): + to = UNSET + else: + to = _to # type: ignore[arg-type] - _to = d.pop("to", UNSET) - to: Union[Unset, Point3d] - if isinstance(_to, Unset): - to = UNSET - else: - to = _to # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - move_path_pen = cls( - path=path, - to=to, - type=type, - ) + move_path_pen = cls( + path= path, + to= to, + type= type, + ) - move_path_pen.additional_properties = d - return move_path_pen + move_path_pen.additional_properties = d + return move_path_pen - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties UQ = TypeVar("UQ", bound="extend_path") - @attr.s(auto_attribs=True) class extend_path: - """Extend a path by adding a new segment which starts at the path's "pen". If no "pen" location has been set before (via `MovePen`), then the pen is at the origin.""" # noqa: E501 + """ Extend a path by adding a new segment which starts at the path's "pen". If no "pen" location has been set before (via `MovePen`), then the pen is at the origin. """ # noqa: E501 + path: Union[Unset, ModelingCmdId] = UNSET + segment: Union[Unset, PathSegment] = UNSET + type: str = "extend_path" - path: Union[Unset, ModelingCmdId] = UNSET - segment: Union[Unset, PathSegment] = UNSET - type: str = "extend_path" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.path, Unset): + path = self.path + if not isinstance(self.segment, Unset): + segment = self.segment + type = self.type - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.path, Unset): - path = self.path - if not isinstance(self.segment, Unset): - segment = self.segment - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if path is not UNSET: + field_dict['path'] = path + if segment is not UNSET: + field_dict['segment'] = segment + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if path is not UNSET: - field_dict["path"] = path - if segment is not UNSET: - field_dict["segment"] = segment - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[UQ], src_dict: Dict[str, Any]) -> UQ: + d = src_dict.copy() + _path = d.pop("path", UNSET) + path: Union[Unset, ModelingCmdId] + if isinstance(_path, Unset): + path = UNSET + else: + path = _path # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[UQ], src_dict: Dict[str, Any]) -> UQ: - d = src_dict.copy() - _path = d.pop("path", UNSET) - path: Union[Unset, ModelingCmdId] - if isinstance(_path, Unset): - path = UNSET - else: - path = _path # type: ignore[arg-type] + _segment = d.pop("segment", UNSET) + segment: Union[Unset, PathSegment] + if isinstance(_segment, Unset): + segment = UNSET + else: + segment = _segment # type: ignore[arg-type] - _segment = d.pop("segment", UNSET) - segment: Union[Unset, PathSegment] - if isinstance(_segment, Unset): - segment = UNSET - else: - segment = _segment # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - extend_path = cls( - path=path, - segment=segment, - type=type, - ) + extend_path = cls( + path= path, + segment= segment, + type= type, + ) - extend_path.additional_properties = d - return extend_path + extend_path.additional_properties = d + return extend_path - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties QE = TypeVar("QE", bound="extrude") - @attr.s(auto_attribs=True) class extrude: - """Extrude a 2D solid.""" # noqa: E501 + """ Extrude a 2D solid. """ # noqa: E501 + cap: Union[Unset, bool] = False + distance: Union[Unset, float] = UNSET + target: Union[Unset, ModelingCmdId] = UNSET + type: str = "extrude" - cap: Union[Unset, bool] = False - distance: Union[Unset, float] = UNSET - target: Union[Unset, ModelingCmdId] = UNSET - type: str = "extrude" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + cap = self.cap + distance = self.distance + if not isinstance(self.target, Unset): + target = self.target + type = self.type - def to_dict(self) -> Dict[str, Any]: - cap = self.cap - distance = self.distance - if not isinstance(self.target, Unset): - target = self.target - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if cap is not UNSET: + field_dict['cap'] = cap + if distance is not UNSET: + field_dict['distance'] = distance + if target is not UNSET: + field_dict['target'] = target + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if cap is not UNSET: - field_dict["cap"] = cap - if distance is not UNSET: - field_dict["distance"] = distance - if target is not UNSET: - field_dict["target"] = target - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[QE], src_dict: Dict[str, Any]) -> QE: + d = src_dict.copy() + cap = d.pop("cap", UNSET) - @classmethod - def from_dict(cls: Type[QE], src_dict: Dict[str, Any]) -> QE: - d = src_dict.copy() - cap = d.pop("cap", UNSET) + distance = d.pop("distance", UNSET) - distance = d.pop("distance", UNSET) + _target = d.pop("target", UNSET) + target: Union[Unset, ModelingCmdId] + if isinstance(_target, Unset): + target = UNSET + else: + target = _target # type: ignore[arg-type] - _target = d.pop("target", UNSET) - target: Union[Unset, ModelingCmdId] - if isinstance(_target, Unset): - target = UNSET - else: - target = _target # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - extrude = cls( - cap=cap, - distance=distance, - target=target, - type=type, - ) + extrude = cls( + cap= cap, + distance= distance, + target= target, + type= type, + ) - extrude.additional_properties = d - return extrude + extrude.additional_properties = d + return extrude - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties XH = TypeVar("XH", bound="close_path") - @attr.s(auto_attribs=True) class close_path: - """Closes a path, converting it to a 2D solid.""" # noqa: E501 + """ Closes a path, converting it to a 2D solid. """ # noqa: E501 + path_id: Union[Unset, str] = UNSET + type: str = "close_path" - path_id: Union[Unset, str] = UNSET - type: str = "close_path" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 - 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 - 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 - return field_dict + @classmethod + def from_dict(cls: Type[XH], src_dict: Dict[str, Any]) -> XH: + d = src_dict.copy() + path_id = d.pop("path_id", UNSET) - @classmethod - def from_dict(cls: Type[XH], src_dict: Dict[str, Any]) -> XH: - d = src_dict.copy() - path_id = d.pop("path_id", UNSET) + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - close_path = cls( - path_id=path_id, - type=type, - ) + close_path = cls( + path_id= path_id, + type= type, + ) - close_path.additional_properties = d - return close_path + close_path.additional_properties = d + return close_path - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties KT = TypeVar("KT", bound="camera_drag_start") - @attr.s(auto_attribs=True) class camera_drag_start: - """Camera drag started.""" # noqa: E501 + """ Camera drag started. """ # noqa: E501 + interaction: Union[Unset, CameraDragInteractionType] = UNSET + type: str = "camera_drag_start" + window: Union[Unset, Point2d] = UNSET - interaction: Union[Unset, CameraDragInteractionType] = UNSET - type: str = "camera_drag_start" - window: Union[Unset, Point2d] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.interaction, Unset): + interaction = self.interaction + type = self.type + if not isinstance(self.window, Unset): + window = self.window - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.interaction, Unset): - interaction = self.interaction - type = self.type - if not isinstance(self.window, Unset): - window = self.window + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if interaction is not UNSET: + field_dict['interaction'] = interaction + field_dict['type'] = type + if window is not UNSET: + field_dict['window'] = window - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if interaction is not UNSET: - field_dict["interaction"] = interaction - field_dict["type"] = type - if window is not UNSET: - field_dict["window"] = window + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[KT], src_dict: Dict[str, Any]) -> KT: + d = src_dict.copy() + _interaction = d.pop("interaction", UNSET) + interaction: Union[Unset, CameraDragInteractionType] + if isinstance(_interaction, Unset): + interaction = UNSET + else: + interaction = _interaction # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[KT], src_dict: Dict[str, Any]) -> KT: - d = src_dict.copy() - _interaction = d.pop("interaction", UNSET) - interaction: Union[Unset, CameraDragInteractionType] - if isinstance(_interaction, Unset): - interaction = UNSET - else: - interaction = _interaction # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) + _window = d.pop("window", UNSET) + window: Union[Unset, Point2d] + if isinstance(_window, Unset): + window = UNSET + else: + window = _window # type: ignore[arg-type] - _window = d.pop("window", UNSET) - window: Union[Unset, Point2d] - if isinstance(_window, Unset): - window = UNSET - else: - window = _window # type: ignore[arg-type] - camera_drag_start = cls( - interaction=interaction, - type=type, - window=window, - ) + camera_drag_start = cls( + interaction= interaction, + type= type, + window= window, + ) - camera_drag_start.additional_properties = d - return camera_drag_start + camera_drag_start.additional_properties = d + return camera_drag_start - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties BV = TypeVar("BV", bound="camera_drag_move") - @attr.s(auto_attribs=True) class camera_drag_move: - """Camera drag continued.""" # noqa: E501 + """ Camera drag continued. """ # noqa: E501 + interaction: Union[Unset, CameraDragInteractionType] = UNSET + sequence: Union[Unset, int] = UNSET + type: str = "camera_drag_move" + window: Union[Unset, Point2d] = UNSET - interaction: Union[Unset, CameraDragInteractionType] = UNSET - sequence: Union[Unset, int] = UNSET - type: str = "camera_drag_move" - window: Union[Unset, Point2d] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.interaction, Unset): + interaction = self.interaction + sequence = self.sequence + type = self.type + if not isinstance(self.window, Unset): + window = self.window - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.interaction, Unset): - interaction = self.interaction - sequence = self.sequence - type = self.type - if not isinstance(self.window, Unset): - window = self.window + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if interaction is not UNSET: + field_dict['interaction'] = interaction + if sequence is not UNSET: + field_dict['sequence'] = sequence + field_dict['type'] = type + if window is not UNSET: + field_dict['window'] = window - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if interaction is not UNSET: - field_dict["interaction"] = interaction - if sequence is not UNSET: - field_dict["sequence"] = sequence - field_dict["type"] = type - if window is not UNSET: - field_dict["window"] = window + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[BV], src_dict: Dict[str, Any]) -> BV: + d = src_dict.copy() + _interaction = d.pop("interaction", UNSET) + interaction: Union[Unset, CameraDragInteractionType] + if isinstance(_interaction, Unset): + interaction = UNSET + else: + interaction = _interaction # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[BV], src_dict: Dict[str, Any]) -> BV: - d = src_dict.copy() - _interaction = d.pop("interaction", UNSET) - interaction: Union[Unset, CameraDragInteractionType] - if isinstance(_interaction, Unset): - interaction = UNSET - else: - interaction = _interaction # type: ignore[arg-type] + sequence = d.pop("sequence", UNSET) - sequence = d.pop("sequence", UNSET) + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) + _window = d.pop("window", UNSET) + window: Union[Unset, Point2d] + if isinstance(_window, Unset): + window = UNSET + else: + window = _window # type: ignore[arg-type] - _window = d.pop("window", UNSET) - window: Union[Unset, Point2d] - if isinstance(_window, Unset): - window = UNSET - else: - window = _window # type: ignore[arg-type] - camera_drag_move = cls( - interaction=interaction, - sequence=sequence, - type=type, - window=window, - ) + camera_drag_move = cls( + interaction= interaction, + sequence= sequence, + type= type, + window= window, + ) - camera_drag_move.additional_properties = d - return camera_drag_move + camera_drag_move.additional_properties = d + return camera_drag_move - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties GU = TypeVar("GU", bound="camera_drag_end") - @attr.s(auto_attribs=True) class camera_drag_end: - """Camera drag ended.""" # noqa: E501 + """ Camera drag ended. """ # noqa: E501 + interaction: Union[Unset, CameraDragInteractionType] = UNSET + type: str = "camera_drag_end" + window: Union[Unset, Point2d] = UNSET - interaction: Union[Unset, CameraDragInteractionType] = UNSET - type: str = "camera_drag_end" - window: Union[Unset, Point2d] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.interaction, Unset): + interaction = self.interaction + type = self.type + if not isinstance(self.window, Unset): + window = self.window - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.interaction, Unset): - interaction = self.interaction - type = self.type - if not isinstance(self.window, Unset): - window = self.window + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if interaction is not UNSET: + field_dict['interaction'] = interaction + field_dict['type'] = type + if window is not UNSET: + field_dict['window'] = window - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if interaction is not UNSET: - field_dict["interaction"] = interaction - field_dict["type"] = type - if window is not UNSET: - field_dict["window"] = window + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[GU], src_dict: Dict[str, Any]) -> GU: + d = src_dict.copy() + _interaction = d.pop("interaction", UNSET) + interaction: Union[Unset, CameraDragInteractionType] + if isinstance(_interaction, Unset): + interaction = UNSET + else: + interaction = _interaction # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[GU], src_dict: Dict[str, Any]) -> GU: - d = src_dict.copy() - _interaction = d.pop("interaction", UNSET) - interaction: Union[Unset, CameraDragInteractionType] - if isinstance(_interaction, Unset): - interaction = UNSET - else: - interaction = _interaction # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) + _window = d.pop("window", UNSET) + window: Union[Unset, Point2d] + if isinstance(_window, Unset): + window = UNSET + else: + window = _window # type: ignore[arg-type] - _window = d.pop("window", UNSET) - window: Union[Unset, Point2d] - if isinstance(_window, Unset): - window = UNSET - else: - window = _window # type: ignore[arg-type] - camera_drag_end = cls( - interaction=interaction, - type=type, - window=window, - ) + camera_drag_end = cls( + interaction= interaction, + type= type, + window= window, + ) - camera_drag_end.additional_properties = d - return camera_drag_end + camera_drag_end.additional_properties = d + return camera_drag_end - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties SS = TypeVar("SS", bound="default_camera_look_at") - @attr.s(auto_attribs=True) class default_camera_look_at: - """Change what the default camera is looking at.""" # noqa: E501 + """ Change what the default camera is looking at. """ # noqa: E501 + center: Union[Unset, Point3d] = UNSET + type: str = "default_camera_look_at" + up: Union[Unset, Point3d] = UNSET + vantage: Union[Unset, Point3d] = UNSET - center: Union[Unset, Point3d] = UNSET - type: str = "default_camera_look_at" - up: Union[Unset, Point3d] = UNSET - vantage: Union[Unset, Point3d] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.center, Unset): + center = self.center + type = self.type + if not isinstance(self.up, Unset): + up = self.up + if not isinstance(self.vantage, Unset): + vantage = self.vantage - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.center, Unset): - center = self.center - type = self.type - if not isinstance(self.up, Unset): - up = self.up - if not isinstance(self.vantage, Unset): - vantage = self.vantage + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if center is not UNSET: + field_dict['center'] = center + field_dict['type'] = type + if up is not UNSET: + field_dict['up'] = up + if vantage is not UNSET: + field_dict['vantage'] = vantage - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if center is not UNSET: - field_dict["center"] = center - field_dict["type"] = type - if up is not UNSET: - field_dict["up"] = up - if vantage is not UNSET: - field_dict["vantage"] = vantage + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[SS], src_dict: Dict[str, Any]) -> SS: + d = src_dict.copy() + _center = d.pop("center", UNSET) + center: Union[Unset, Point3d] + if isinstance(_center, Unset): + center = UNSET + else: + center = _center # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[SS], src_dict: Dict[str, Any]) -> SS: - d = src_dict.copy() - _center = d.pop("center", UNSET) - center: Union[Unset, Point3d] - if isinstance(_center, Unset): - center = UNSET - else: - center = _center # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) + _up = d.pop("up", UNSET) + up: Union[Unset, Point3d] + if isinstance(_up, Unset): + up = UNSET + else: + up = _up # type: ignore[arg-type] - _up = d.pop("up", UNSET) - up: Union[Unset, Point3d] - if isinstance(_up, Unset): - up = UNSET - else: - up = _up # type: ignore[arg-type] + _vantage = d.pop("vantage", UNSET) + vantage: Union[Unset, Point3d] + if isinstance(_vantage, Unset): + vantage = UNSET + else: + vantage = _vantage # type: ignore[arg-type] - _vantage = d.pop("vantage", UNSET) - vantage: Union[Unset, Point3d] - if isinstance(_vantage, Unset): - vantage = UNSET - else: - vantage = _vantage # type: ignore[arg-type] - default_camera_look_at = cls( - center=center, - type=type, - up=up, - vantage=vantage, - ) + default_camera_look_at = cls( + center= center, + type= type, + up= up, + vantage= vantage, + ) - default_camera_look_at.additional_properties = d - return default_camera_look_at + default_camera_look_at.additional_properties = d + return default_camera_look_at - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties UP = TypeVar("UP", bound="default_camera_zoom") - @attr.s(auto_attribs=True) class default_camera_zoom: - """Adjust zoom of the default camera.""" # noqa: E501 + """ Adjust zoom of the default camera. """ # noqa: E501 + magnitude: Union[Unset, float] = UNSET + type: str = "default_camera_zoom" - magnitude: Union[Unset, float] = UNSET - type: str = "default_camera_zoom" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + magnitude = self.magnitude + type = self.type - def to_dict(self) -> Dict[str, Any]: - magnitude = self.magnitude - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if magnitude is not UNSET: + field_dict['magnitude'] = magnitude + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if magnitude is not UNSET: - field_dict["magnitude"] = magnitude - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[UP], src_dict: Dict[str, Any]) -> UP: + d = src_dict.copy() + magnitude = d.pop("magnitude", UNSET) - @classmethod - def from_dict(cls: Type[UP], src_dict: Dict[str, Any]) -> UP: - d = src_dict.copy() - magnitude = d.pop("magnitude", UNSET) + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - default_camera_zoom = cls( - magnitude=magnitude, - type=type, - ) + default_camera_zoom = cls( + magnitude= magnitude, + type= type, + ) - default_camera_zoom.additional_properties = d - return default_camera_zoom + default_camera_zoom.additional_properties = d + return default_camera_zoom - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties AZ = TypeVar("AZ", bound="default_camera_enable_sketch_mode") - @attr.s(auto_attribs=True) class default_camera_enable_sketch_mode: - """Enable sketch mode, where users can sketch 2D geometry. Users choose a plane to sketch on.""" # noqa: E501 + """ Enable sketch mode, where users can sketch 2D geometry. Users choose a plane to sketch on. """ # noqa: E501 + animated: Union[Unset, bool] = False + distance_to_plane: Union[Unset, float] = UNSET + origin: Union[Unset, Point3d] = UNSET + ortho: Union[Unset, bool] = False + type: str = "default_camera_enable_sketch_mode" + x_axis: Union[Unset, Point3d] = UNSET + y_axis: Union[Unset, Point3d] = UNSET - animated: Union[Unset, bool] = False - distance_to_plane: Union[Unset, float] = UNSET - origin: Union[Unset, Point3d] = UNSET - ortho: Union[Unset, bool] = False - type: str = "default_camera_enable_sketch_mode" - x_axis: Union[Unset, Point3d] = UNSET - y_axis: Union[Unset, Point3d] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + animated = self.animated + distance_to_plane = self.distance_to_plane + if not isinstance(self.origin, Unset): + origin = self.origin + ortho = self.ortho + type = self.type + if not isinstance(self.x_axis, Unset): + x_axis = self.x_axis + if not isinstance(self.y_axis, Unset): + y_axis = self.y_axis - def to_dict(self) -> Dict[str, Any]: - animated = self.animated - distance_to_plane = self.distance_to_plane - if not isinstance(self.origin, Unset): - origin = self.origin - ortho = self.ortho - type = self.type - if not isinstance(self.x_axis, Unset): - x_axis = self.x_axis - if not isinstance(self.y_axis, Unset): - y_axis = self.y_axis + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if animated is not UNSET: + field_dict['animated'] = animated + if distance_to_plane is not UNSET: + field_dict['distance_to_plane'] = distance_to_plane + if origin is not UNSET: + field_dict['origin'] = origin + if ortho is not UNSET: + field_dict['ortho'] = ortho + field_dict['type'] = type + if x_axis is not UNSET: + field_dict['x_axis'] = x_axis + if y_axis is not UNSET: + field_dict['y_axis'] = y_axis - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if animated is not UNSET: - field_dict["animated"] = animated - if distance_to_plane is not UNSET: - field_dict["distance_to_plane"] = distance_to_plane - if origin is not UNSET: - field_dict["origin"] = origin - if ortho is not UNSET: - field_dict["ortho"] = ortho - field_dict["type"] = type - if x_axis is not UNSET: - field_dict["x_axis"] = x_axis - if y_axis is not UNSET: - field_dict["y_axis"] = y_axis + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[AZ], src_dict: Dict[str, Any]) -> AZ: + d = src_dict.copy() + animated = d.pop("animated", UNSET) - @classmethod - def from_dict(cls: Type[AZ], src_dict: Dict[str, Any]) -> AZ: - d = src_dict.copy() - animated = d.pop("animated", UNSET) + distance_to_plane = d.pop("distance_to_plane", UNSET) - distance_to_plane = d.pop("distance_to_plane", UNSET) + _origin = d.pop("origin", UNSET) + origin: Union[Unset, Point3d] + if isinstance(_origin, Unset): + origin = UNSET + else: + origin = _origin # type: ignore[arg-type] - _origin = d.pop("origin", UNSET) - origin: Union[Unset, Point3d] - if isinstance(_origin, Unset): - origin = UNSET - else: - origin = _origin # type: ignore[arg-type] + ortho = d.pop("ortho", UNSET) - ortho = d.pop("ortho", UNSET) + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) + _x_axis = d.pop("x_axis", UNSET) + x_axis: Union[Unset, Point3d] + if isinstance(_x_axis, Unset): + x_axis = UNSET + else: + x_axis = _x_axis # type: ignore[arg-type] - _x_axis = d.pop("x_axis", UNSET) - x_axis: Union[Unset, Point3d] - if isinstance(_x_axis, Unset): - x_axis = UNSET - else: - x_axis = _x_axis # type: ignore[arg-type] + _y_axis = d.pop("y_axis", UNSET) + y_axis: Union[Unset, Point3d] + if isinstance(_y_axis, Unset): + y_axis = UNSET + else: + y_axis = _y_axis # type: ignore[arg-type] - _y_axis = d.pop("y_axis", UNSET) - y_axis: Union[Unset, Point3d] - if isinstance(_y_axis, Unset): - y_axis = UNSET - else: - y_axis = _y_axis # type: ignore[arg-type] - default_camera_enable_sketch_mode = cls( - animated=animated, - distance_to_plane=distance_to_plane, - origin=origin, - ortho=ortho, - type=type, - x_axis=x_axis, - y_axis=y_axis, - ) + default_camera_enable_sketch_mode = cls( + animated= animated, + distance_to_plane= distance_to_plane, + origin= origin, + ortho= ortho, + type= type, + x_axis= x_axis, + y_axis= y_axis, + ) - default_camera_enable_sketch_mode.additional_properties = d - return default_camera_enable_sketch_mode + default_camera_enable_sketch_mode.additional_properties = d + return default_camera_enable_sketch_mode - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties DJ = TypeVar("DJ", bound="default_camera_disable_sketch_mode") - @attr.s(auto_attribs=True) class default_camera_disable_sketch_mode: - """Disable sketch mode, from the default camera.""" # noqa: E501 + """ Disable sketch mode, from the default camera. """ # noqa: E501 + type: str = "default_camera_disable_sketch_mode" - type: str = "default_camera_disable_sketch_mode" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + type = self.type - def to_dict(self) -> Dict[str, Any]: - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[DJ], src_dict: Dict[str, Any]) -> DJ: + d = src_dict.copy() + type = d.pop("type", UNSET) - @classmethod - def from_dict(cls: Type[DJ], src_dict: Dict[str, Any]) -> DJ: - d = src_dict.copy() - type = d.pop("type", UNSET) - default_camera_disable_sketch_mode = cls( - type=type, - ) + default_camera_disable_sketch_mode = cls( + type= type, + ) - default_camera_disable_sketch_mode.additional_properties = d - return default_camera_disable_sketch_mode + default_camera_disable_sketch_mode.additional_properties = d + return default_camera_disable_sketch_mode - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties WJ = TypeVar("WJ", bound="export") - @attr.s(auto_attribs=True) class export: - """Export the scene to a file.""" # noqa: E501 + """ Export the scene to a file. """ # noqa: E501 + entity_ids: Union[Unset, List[str]] = UNSET + format: Union[Unset, OutputFormat] = UNSET + source_unit: Union[Unset, UnitLength] = UNSET + type: str = "export" - entity_ids: Union[Unset, List[str]] = UNSET - format: Union[Unset, OutputFormat] = UNSET - source_unit: Union[Unset, UnitLength] = UNSET - type: str = "export" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + entity_ids: Union[Unset, List[str]] = UNSET + if not isinstance(self.entity_ids, Unset): + entity_ids = self.entity_ids + if not isinstance(self.format, Unset): + format = self.format + if not isinstance(self.source_unit, Unset): + source_unit = self.source_unit + type = self.type - def to_dict(self) -> Dict[str, Any]: - entity_ids: Union[Unset, List[str]] = UNSET - if not isinstance(self.entity_ids, Unset): - entity_ids = self.entity_ids - if not isinstance(self.format, Unset): - format = self.format - if not isinstance(self.source_unit, Unset): - source_unit = self.source_unit - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entity_ids is not UNSET: + field_dict['entity_ids'] = entity_ids + if format is not UNSET: + field_dict['format'] = format + if source_unit is not UNSET: + field_dict['source_unit'] = source_unit + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if entity_ids is not UNSET: - field_dict["entity_ids"] = entity_ids - if format is not UNSET: - field_dict["format"] = format - if source_unit is not UNSET: - field_dict["source_unit"] = source_unit - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[WJ], src_dict: Dict[str, Any]) -> WJ: + d = src_dict.copy() + entity_ids = cast(List[str], d.pop("entity_ids", UNSET)) - @classmethod - def from_dict(cls: Type[WJ], src_dict: Dict[str, Any]) -> WJ: - d = src_dict.copy() - entity_ids = cast(List[str], d.pop("entity_ids", UNSET)) + _format = d.pop("format", UNSET) + format: Union[Unset, OutputFormat] + if isinstance(_format, Unset): + format = UNSET + else: + format = _format # type: ignore[arg-type] - _format = d.pop("format", UNSET) - format: Union[Unset, OutputFormat] - if isinstance(_format, Unset): - format = UNSET - else: - format = _format # type: ignore[arg-type] + _source_unit = d.pop("source_unit", UNSET) + source_unit: Union[Unset, UnitLength] + if isinstance(_source_unit, Unset): + source_unit = UNSET + else: + source_unit = _source_unit # type: ignore[arg-type] - _source_unit = d.pop("source_unit", UNSET) - source_unit: Union[Unset, UnitLength] - if isinstance(_source_unit, Unset): - source_unit = UNSET - else: - source_unit = _source_unit # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - export = cls( - entity_ids=entity_ids, - format=format, - source_unit=source_unit, - type=type, - ) + export = cls( + entity_ids= entity_ids, + format= format, + source_unit= source_unit, + type= type, + ) - export.additional_properties = d - return export + export.additional_properties = d + return export - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties TR = TypeVar("TR", bound="entity_get_parent_id") - @attr.s(auto_attribs=True) class entity_get_parent_id: - """What is this entity's parent?""" # noqa: E501 + """ What is this entity's parent? """ # noqa: E501 + entity_id: Union[Unset, str] = UNSET + type: str = "entity_get_parent_id" - entity_id: Union[Unset, str] = UNSET - type: str = "entity_get_parent_id" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + entity_id = self.entity_id + type = self.type - def to_dict(self) -> Dict[str, Any]: - entity_id = self.entity_id - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entity_id is not UNSET: + field_dict['entity_id'] = entity_id + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if entity_id is not UNSET: - field_dict["entity_id"] = entity_id - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[TR], src_dict: Dict[str, Any]) -> TR: + d = src_dict.copy() + entity_id = d.pop("entity_id", UNSET) - @classmethod - def from_dict(cls: Type[TR], src_dict: Dict[str, Any]) -> TR: - d = src_dict.copy() - entity_id = d.pop("entity_id", UNSET) + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - entity_get_parent_id = cls( - entity_id=entity_id, - type=type, - ) + entity_get_parent_id = cls( + entity_id= entity_id, + type= type, + ) - entity_get_parent_id.additional_properties = d - return entity_get_parent_id + entity_get_parent_id.additional_properties = d + return entity_get_parent_id - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties YD = TypeVar("YD", bound="entity_get_num_children") - @attr.s(auto_attribs=True) class entity_get_num_children: - """How many children does the entity have?""" # noqa: E501 + """ How many children does the entity have? """ # noqa: E501 + entity_id: Union[Unset, str] = UNSET + type: str = "entity_get_num_children" - entity_id: Union[Unset, str] = UNSET - type: str = "entity_get_num_children" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + entity_id = self.entity_id + type = self.type - def to_dict(self) -> Dict[str, Any]: - entity_id = self.entity_id - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entity_id is not UNSET: + field_dict['entity_id'] = entity_id + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if entity_id is not UNSET: - field_dict["entity_id"] = entity_id - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[YD], src_dict: Dict[str, Any]) -> YD: + d = src_dict.copy() + entity_id = d.pop("entity_id", UNSET) - @classmethod - def from_dict(cls: Type[YD], src_dict: Dict[str, Any]) -> YD: - d = src_dict.copy() - entity_id = d.pop("entity_id", UNSET) + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - entity_get_num_children = cls( - entity_id=entity_id, - type=type, - ) + entity_get_num_children = cls( + entity_id= entity_id, + type= type, + ) - entity_get_num_children.additional_properties = d - return entity_get_num_children + entity_get_num_children.additional_properties = d + return entity_get_num_children - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties JF = TypeVar("JF", bound="entity_get_child_uuid") - @attr.s(auto_attribs=True) class entity_get_child_uuid: - """What is the UUID of this entity's n-th child?""" # noqa: E501 + """ What is the UUID of this entity's n-th child? """ # noqa: E501 + child_index: Union[Unset, int] = UNSET + entity_id: Union[Unset, str] = UNSET + type: str = "entity_get_child_uuid" - child_index: Union[Unset, int] = UNSET - entity_id: Union[Unset, str] = UNSET - type: str = "entity_get_child_uuid" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + child_index = self.child_index + entity_id = self.entity_id + type = self.type - def to_dict(self) -> Dict[str, Any]: - child_index = self.child_index - entity_id = self.entity_id - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if child_index is not UNSET: + field_dict['child_index'] = child_index + if entity_id is not UNSET: + field_dict['entity_id'] = entity_id + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if child_index is not UNSET: - field_dict["child_index"] = child_index - if entity_id is not UNSET: - field_dict["entity_id"] = entity_id - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[JF], src_dict: Dict[str, Any]) -> JF: + d = src_dict.copy() + child_index = d.pop("child_index", UNSET) - @classmethod - def from_dict(cls: Type[JF], src_dict: Dict[str, Any]) -> JF: - d = src_dict.copy() - child_index = d.pop("child_index", UNSET) + entity_id = d.pop("entity_id", UNSET) - entity_id = d.pop("entity_id", UNSET) + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - entity_get_child_uuid = cls( - child_index=child_index, - entity_id=entity_id, - type=type, - ) + entity_get_child_uuid = cls( + child_index= child_index, + entity_id= entity_id, + type= type, + ) - entity_get_child_uuid.additional_properties = d - return entity_get_child_uuid + entity_get_child_uuid.additional_properties = d + return entity_get_child_uuid - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties VP = TypeVar("VP", bound="entity_get_all_child_uuids") - @attr.s(auto_attribs=True) class entity_get_all_child_uuids: - """What are all UUIDs of this entity's children?""" # noqa: E501 + """ What are all UUIDs of this entity's children? """ # noqa: E501 + entity_id: Union[Unset, str] = UNSET + type: str = "entity_get_all_child_uuids" - entity_id: Union[Unset, str] = UNSET - type: str = "entity_get_all_child_uuids" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + entity_id = self.entity_id + type = self.type - def to_dict(self) -> Dict[str, Any]: - entity_id = self.entity_id - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entity_id is not UNSET: + field_dict['entity_id'] = entity_id + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if entity_id is not UNSET: - field_dict["entity_id"] = entity_id - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[VP], src_dict: Dict[str, Any]) -> VP: + d = src_dict.copy() + entity_id = d.pop("entity_id", UNSET) - @classmethod - def from_dict(cls: Type[VP], src_dict: Dict[str, Any]) -> VP: - d = src_dict.copy() - entity_id = d.pop("entity_id", UNSET) + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - entity_get_all_child_uuids = cls( - entity_id=entity_id, - type=type, - ) + entity_get_all_child_uuids = cls( + entity_id= entity_id, + type= type, + ) - entity_get_all_child_uuids.additional_properties = d - return entity_get_all_child_uuids + entity_get_all_child_uuids.additional_properties = d + return entity_get_all_child_uuids - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties EL = TypeVar("EL", bound="edit_mode_enter") - @attr.s(auto_attribs=True) class edit_mode_enter: - """Enter edit mode""" # noqa: E501 + """ Enter edit mode """ # noqa: E501 + target: Union[Unset, str] = UNSET + type: str = "edit_mode_enter" - target: Union[Unset, str] = UNSET - type: str = "edit_mode_enter" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + target = self.target + type = self.type - def to_dict(self) -> Dict[str, Any]: - target = self.target - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if target is not UNSET: + field_dict['target'] = target + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if target is not UNSET: - field_dict["target"] = target - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[EL], src_dict: Dict[str, Any]) -> EL: + d = src_dict.copy() + target = d.pop("target", UNSET) - @classmethod - def from_dict(cls: Type[EL], src_dict: Dict[str, Any]) -> EL: - d = src_dict.copy() - target = d.pop("target", UNSET) + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - edit_mode_enter = cls( - target=target, - type=type, - ) + edit_mode_enter = cls( + target= target, + type= type, + ) - edit_mode_enter.additional_properties = d - return edit_mode_enter + edit_mode_enter.additional_properties = d + return edit_mode_enter - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties ZG = TypeVar("ZG", bound="edit_mode_exit") - @attr.s(auto_attribs=True) class edit_mode_exit: - """Exit edit mode""" # noqa: E501 + """ Exit edit mode """ # noqa: E501 + type: str = "edit_mode_exit" - type: str = "edit_mode_exit" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + type = self.type - def to_dict(self) -> Dict[str, Any]: - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[ZG], src_dict: Dict[str, Any]) -> ZG: + d = src_dict.copy() + type = d.pop("type", UNSET) - @classmethod - def from_dict(cls: Type[ZG], src_dict: Dict[str, Any]) -> ZG: - d = src_dict.copy() - type = d.pop("type", UNSET) - edit_mode_exit = cls( - type=type, - ) + edit_mode_exit = cls( + type= type, + ) - edit_mode_exit.additional_properties = d - return edit_mode_exit + edit_mode_exit.additional_properties = d + return edit_mode_exit - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties LF = TypeVar("LF", bound="select_with_point") - @attr.s(auto_attribs=True) class select_with_point: - """Modifies the selection by simulating a "mouse click" at the given x,y window coordinate Returns ID of whatever was selected.""" # noqa: E501 + """ Modifies the selection by simulating a "mouse click" at the given x,y window coordinate Returns ID of whatever was selected. """ # noqa: E501 + selected_at_window: Union[Unset, Point2d] = UNSET + selection_type: Union[Unset, SceneSelectionType] = UNSET + type: str = "select_with_point" - selected_at_window: Union[Unset, Point2d] = UNSET - selection_type: Union[Unset, SceneSelectionType] = UNSET - type: str = "select_with_point" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.selected_at_window, Unset): + selected_at_window = self.selected_at_window + if not isinstance(self.selection_type, Unset): + selection_type = self.selection_type + type = self.type - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.selected_at_window, Unset): - selected_at_window = self.selected_at_window - if not isinstance(self.selection_type, Unset): - selection_type = self.selection_type - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if selected_at_window is not UNSET: + field_dict['selected_at_window'] = selected_at_window + if selection_type is not UNSET: + field_dict['selection_type'] = selection_type + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if selected_at_window is not UNSET: - field_dict["selected_at_window"] = selected_at_window - if selection_type is not UNSET: - field_dict["selection_type"] = selection_type - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[LF], src_dict: Dict[str, Any]) -> LF: + d = src_dict.copy() + _selected_at_window = d.pop("selected_at_window", UNSET) + selected_at_window: Union[Unset, Point2d] + if isinstance(_selected_at_window, Unset): + selected_at_window = UNSET + else: + selected_at_window = _selected_at_window # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[LF], src_dict: Dict[str, Any]) -> LF: - d = src_dict.copy() - _selected_at_window = d.pop("selected_at_window", UNSET) - selected_at_window: Union[Unset, Point2d] - if isinstance(_selected_at_window, Unset): - selected_at_window = UNSET - else: - selected_at_window = _selected_at_window # type: ignore[arg-type] + _selection_type = d.pop("selection_type", UNSET) + selection_type: Union[Unset, SceneSelectionType] + if isinstance(_selection_type, Unset): + selection_type = UNSET + else: + selection_type = _selection_type # type: ignore[arg-type] - _selection_type = d.pop("selection_type", UNSET) - selection_type: Union[Unset, SceneSelectionType] - if isinstance(_selection_type, Unset): - selection_type = UNSET - else: - selection_type = _selection_type # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - select_with_point = cls( - selected_at_window=selected_at_window, - selection_type=selection_type, - type=type, - ) + select_with_point = cls( + selected_at_window= selected_at_window, + selection_type= selection_type, + type= type, + ) - select_with_point.additional_properties = d - return select_with_point + select_with_point.additional_properties = d + return select_with_point - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties CS = TypeVar("CS", bound="select_clear") - @attr.s(auto_attribs=True) class select_clear: - """Clear the selection""" # noqa: E501 + """ Clear the selection """ # noqa: E501 + type: str = "select_clear" - type: str = "select_clear" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + type = self.type - def to_dict(self) -> Dict[str, Any]: - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[CS], src_dict: Dict[str, Any]) -> CS: + d = src_dict.copy() + type = d.pop("type", UNSET) - @classmethod - def from_dict(cls: Type[CS], src_dict: Dict[str, Any]) -> CS: - d = src_dict.copy() - type = d.pop("type", UNSET) - select_clear = cls( - type=type, - ) + select_clear = cls( + type= type, + ) - select_clear.additional_properties = d - return select_clear + select_clear.additional_properties = d + return select_clear - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties GN = TypeVar("GN", bound="select_add") - @attr.s(auto_attribs=True) class select_add: - """Adds one or more entities (by UUID) to the selection.""" # noqa: E501 + """ Adds one or more entities (by UUID) to the selection. """ # noqa: E501 + entities: Union[Unset, List[str]] = UNSET + type: str = "select_add" - entities: Union[Unset, List[str]] = UNSET - type: str = "select_add" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + entities: Union[Unset, List[str]] = UNSET + if not isinstance(self.entities, Unset): + entities = self.entities + type = self.type - def to_dict(self) -> Dict[str, Any]: - entities: Union[Unset, List[str]] = UNSET - if not isinstance(self.entities, Unset): - entities = self.entities - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entities is not UNSET: + field_dict['entities'] = entities + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if entities is not UNSET: - field_dict["entities"] = entities - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[GN], src_dict: Dict[str, Any]) -> GN: + d = src_dict.copy() + entities = cast(List[str], d.pop("entities", UNSET)) - @classmethod - def from_dict(cls: Type[GN], src_dict: Dict[str, Any]) -> GN: - d = src_dict.copy() - entities = cast(List[str], d.pop("entities", UNSET)) + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - select_add = cls( - entities=entities, - type=type, - ) + select_add = cls( + entities= entities, + type= type, + ) - select_add.additional_properties = d - return select_add + select_add.additional_properties = d + return select_add - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties GD = TypeVar("GD", bound="select_remove") - @attr.s(auto_attribs=True) class select_remove: - """Removes one or more entities (by UUID) from the selection.""" # noqa: E501 + """ Removes one or more entities (by UUID) from the selection. """ # noqa: E501 + entities: Union[Unset, List[str]] = UNSET + type: str = "select_remove" - entities: Union[Unset, List[str]] = UNSET - type: str = "select_remove" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + entities: Union[Unset, List[str]] = UNSET + if not isinstance(self.entities, Unset): + entities = self.entities + type = self.type - def to_dict(self) -> Dict[str, Any]: - entities: Union[Unset, List[str]] = UNSET - if not isinstance(self.entities, Unset): - entities = self.entities - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entities is not UNSET: + field_dict['entities'] = entities + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if entities is not UNSET: - field_dict["entities"] = entities - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[GD], src_dict: Dict[str, Any]) -> GD: + d = src_dict.copy() + entities = cast(List[str], d.pop("entities", UNSET)) - @classmethod - def from_dict(cls: Type[GD], src_dict: Dict[str, Any]) -> GD: - d = src_dict.copy() - entities = cast(List[str], d.pop("entities", UNSET)) + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - select_remove = cls( - entities=entities, - type=type, - ) + select_remove = cls( + entities= entities, + type= type, + ) - select_remove.additional_properties = d - return select_remove + select_remove.additional_properties = d + return select_remove - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties VJ = TypeVar("VJ", bound="select_replace") - @attr.s(auto_attribs=True) class select_replace: - """Replaces the current selection with these new entities (by UUID). Equivalent to doing SelectClear then SelectAdd.""" # noqa: E501 + """ Replaces the current selection with these new entities (by UUID). Equivalent to doing SelectClear then SelectAdd. """ # noqa: E501 + entities: Union[Unset, List[str]] = UNSET + type: str = "select_replace" - entities: Union[Unset, List[str]] = UNSET - type: str = "select_replace" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + entities: Union[Unset, List[str]] = UNSET + if not isinstance(self.entities, Unset): + entities = self.entities + type = self.type - def to_dict(self) -> Dict[str, Any]: - entities: Union[Unset, List[str]] = UNSET - if not isinstance(self.entities, Unset): - entities = self.entities - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entities is not UNSET: + field_dict['entities'] = entities + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if entities is not UNSET: - field_dict["entities"] = entities - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[VJ], src_dict: Dict[str, Any]) -> VJ: + d = src_dict.copy() + entities = cast(List[str], d.pop("entities", UNSET)) - @classmethod - def from_dict(cls: Type[VJ], src_dict: Dict[str, Any]) -> VJ: - d = src_dict.copy() - entities = cast(List[str], d.pop("entities", UNSET)) + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - select_replace = cls( - entities=entities, - type=type, - ) + select_replace = cls( + entities= entities, + type= type, + ) - select_replace.additional_properties = d - return select_replace + select_replace.additional_properties = d + return select_replace - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties OX = TypeVar("OX", bound="select_get") - @attr.s(auto_attribs=True) class select_get: - """Find all IDs of selected entities""" # noqa: E501 + """ Find all IDs of selected entities """ # noqa: E501 + type: str = "select_get" - type: str = "select_get" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + type = self.type - def to_dict(self) -> Dict[str, Any]: - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[OX], src_dict: Dict[str, Any]) -> OX: + d = src_dict.copy() + type = d.pop("type", UNSET) - @classmethod - def from_dict(cls: Type[OX], src_dict: Dict[str, Any]) -> OX: - d = src_dict.copy() - type = d.pop("type", UNSET) - select_get = cls( - type=type, - ) + select_get = cls( + type= type, + ) - select_get.additional_properties = d - return select_get + select_get.additional_properties = d + return select_get - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties YW = TypeVar("YW", bound="highlight_set_entity") - @attr.s(auto_attribs=True) class highlight_set_entity: - """Changes the current highlighted entity to whichever one is at the given window coordinate. If there's no entity at this location, clears the highlight.""" # noqa: E501 + """ Changes the current highlighted entity to whichever one is at the given window coordinate. If there's no entity at this location, clears the highlight. """ # noqa: E501 + selected_at_window: Union[Unset, Point2d] = UNSET + sequence: Union[Unset, int] = UNSET + type: str = "highlight_set_entity" - selected_at_window: Union[Unset, Point2d] = UNSET - sequence: Union[Unset, int] = UNSET - type: str = "highlight_set_entity" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.selected_at_window, Unset): + selected_at_window = self.selected_at_window + sequence = self.sequence + type = self.type - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.selected_at_window, Unset): - selected_at_window = self.selected_at_window - sequence = self.sequence - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if selected_at_window is not UNSET: + field_dict['selected_at_window'] = selected_at_window + if sequence is not UNSET: + field_dict['sequence'] = sequence + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if selected_at_window is not UNSET: - field_dict["selected_at_window"] = selected_at_window - if sequence is not UNSET: - field_dict["sequence"] = sequence - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[YW], src_dict: Dict[str, Any]) -> YW: + d = src_dict.copy() + _selected_at_window = d.pop("selected_at_window", UNSET) + selected_at_window: Union[Unset, Point2d] + if isinstance(_selected_at_window, Unset): + selected_at_window = UNSET + else: + selected_at_window = _selected_at_window # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[YW], src_dict: Dict[str, Any]) -> YW: - d = src_dict.copy() - _selected_at_window = d.pop("selected_at_window", UNSET) - selected_at_window: Union[Unset, Point2d] - if isinstance(_selected_at_window, Unset): - selected_at_window = UNSET - else: - selected_at_window = _selected_at_window # type: ignore[arg-type] + sequence = d.pop("sequence", UNSET) - sequence = d.pop("sequence", UNSET) + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - highlight_set_entity = cls( - selected_at_window=selected_at_window, - sequence=sequence, - type=type, - ) + highlight_set_entity = cls( + selected_at_window= selected_at_window, + sequence= sequence, + type= type, + ) - highlight_set_entity.additional_properties = d - return highlight_set_entity + highlight_set_entity.additional_properties = d + return highlight_set_entity - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties QX = TypeVar("QX", bound="highlight_set_entities") - @attr.s(auto_attribs=True) class highlight_set_entities: - """Changes the current highlighted entity to these entities.""" # noqa: E501 + """ Changes the current highlighted entity to these entities. """ # noqa: E501 + entities: Union[Unset, List[str]] = UNSET + type: str = "highlight_set_entities" - entities: Union[Unset, List[str]] = UNSET - type: str = "highlight_set_entities" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + entities: Union[Unset, List[str]] = UNSET + if not isinstance(self.entities, Unset): + entities = self.entities + type = self.type - def to_dict(self) -> Dict[str, Any]: - entities: Union[Unset, List[str]] = UNSET - if not isinstance(self.entities, Unset): - entities = self.entities - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entities is not UNSET: + field_dict['entities'] = entities + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if entities is not UNSET: - field_dict["entities"] = entities - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[QX], src_dict: Dict[str, Any]) -> QX: + d = src_dict.copy() + entities = cast(List[str], d.pop("entities", UNSET)) - @classmethod - def from_dict(cls: Type[QX], src_dict: Dict[str, Any]) -> QX: - d = src_dict.copy() - entities = cast(List[str], d.pop("entities", UNSET)) + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - highlight_set_entities = cls( - entities=entities, - type=type, - ) + highlight_set_entities = cls( + entities= entities, + type= type, + ) - highlight_set_entities.additional_properties = d - return highlight_set_entities + highlight_set_entities.additional_properties = d + return highlight_set_entities - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties NO = TypeVar("NO", bound="new_annotation") - @attr.s(auto_attribs=True) class new_annotation: - """Create a new annotation""" # noqa: E501 + """ Create a new annotation """ # noqa: E501 + annotation_type: Union[Unset, AnnotationType] = UNSET + clobber: Union[Unset, bool] = False + options: Union[Unset, AnnotationOptions] = UNSET + type: str = "new_annotation" - annotation_type: Union[Unset, AnnotationType] = UNSET - clobber: Union[Unset, bool] = False - options: Union[Unset, AnnotationOptions] = UNSET - type: str = "new_annotation" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.annotation_type, Unset): + annotation_type = self.annotation_type + clobber = self.clobber + if not isinstance(self.options, Unset): + options = self.options + type = self.type - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.annotation_type, Unset): - annotation_type = self.annotation_type - clobber = self.clobber - if not isinstance(self.options, Unset): - options = self.options - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if annotation_type is not UNSET: + field_dict['annotation_type'] = annotation_type + if clobber is not UNSET: + field_dict['clobber'] = clobber + if options is not UNSET: + field_dict['options'] = options + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if annotation_type is not UNSET: - field_dict["annotation_type"] = annotation_type - if clobber is not UNSET: - field_dict["clobber"] = clobber - if options is not UNSET: - field_dict["options"] = options - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[NO], src_dict: Dict[str, Any]) -> NO: + d = src_dict.copy() + _annotation_type = d.pop("annotation_type", UNSET) + annotation_type: Union[Unset, AnnotationType] + if isinstance(_annotation_type, Unset): + annotation_type = UNSET + else: + annotation_type = _annotation_type # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[NO], src_dict: Dict[str, Any]) -> NO: - d = src_dict.copy() - _annotation_type = d.pop("annotation_type", UNSET) - annotation_type: Union[Unset, AnnotationType] - if isinstance(_annotation_type, Unset): - annotation_type = UNSET - else: - annotation_type = _annotation_type # type: ignore[arg-type] + clobber = d.pop("clobber", UNSET) - clobber = d.pop("clobber", UNSET) + _options = d.pop("options", UNSET) + options: Union[Unset, AnnotationOptions] + if isinstance(_options, Unset): + options = UNSET + else: + options = _options # type: ignore[arg-type] - _options = d.pop("options", UNSET) - options: Union[Unset, AnnotationOptions] - if isinstance(_options, Unset): - options = UNSET - else: - options = _options # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - new_annotation = cls( - annotation_type=annotation_type, - clobber=clobber, - options=options, - type=type, - ) + new_annotation = cls( + annotation_type= annotation_type, + clobber= clobber, + options= options, + type= type, + ) - new_annotation.additional_properties = d - return new_annotation + new_annotation.additional_properties = d + return new_annotation - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties VX = TypeVar("VX", bound="update_annotation") - @attr.s(auto_attribs=True) class update_annotation: - """Update an annotation""" # noqa: E501 + """ Update an annotation """ # noqa: E501 + annotation_id: Union[Unset, str] = UNSET + options: Union[Unset, AnnotationOptions] = UNSET + type: str = "update_annotation" - annotation_id: Union[Unset, str] = UNSET - options: Union[Unset, AnnotationOptions] = UNSET - type: str = "update_annotation" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + annotation_id = self.annotation_id + if not isinstance(self.options, Unset): + options = self.options + type = self.type - def to_dict(self) -> Dict[str, Any]: - annotation_id = self.annotation_id - if not isinstance(self.options, Unset): - options = self.options - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if annotation_id is not UNSET: + field_dict['annotation_id'] = annotation_id + if options is not UNSET: + field_dict['options'] = options + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if annotation_id is not UNSET: - field_dict["annotation_id"] = annotation_id - if options is not UNSET: - field_dict["options"] = options - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[VX], src_dict: Dict[str, Any]) -> VX: + d = src_dict.copy() + annotation_id = d.pop("annotation_id", UNSET) - @classmethod - def from_dict(cls: Type[VX], src_dict: Dict[str, Any]) -> VX: - d = src_dict.copy() - annotation_id = d.pop("annotation_id", UNSET) + _options = d.pop("options", UNSET) + options: Union[Unset, AnnotationOptions] + if isinstance(_options, Unset): + options = UNSET + else: + options = _options # type: ignore[arg-type] - _options = d.pop("options", UNSET) - options: Union[Unset, AnnotationOptions] - if isinstance(_options, Unset): - options = UNSET - else: - options = _options # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - update_annotation = cls( - annotation_id=annotation_id, - options=options, - type=type, - ) + update_annotation = cls( + annotation_id= annotation_id, + options= options, + type= type, + ) - update_annotation.additional_properties = d - return update_annotation + update_annotation.additional_properties = d + return update_annotation - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties RG = TypeVar("RG", bound="object_visible") - @attr.s(auto_attribs=True) class object_visible: - """Hide or show an object""" # noqa: E501 + """ Hide or show an object """ # noqa: E501 + hidden: Union[Unset, bool] = False + object_id: Union[Unset, str] = UNSET + type: str = "object_visible" - hidden: Union[Unset, bool] = False - object_id: Union[Unset, str] = UNSET - type: str = "object_visible" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + hidden = self.hidden + object_id = self.object_id + type = self.type - def to_dict(self) -> Dict[str, Any]: - hidden = self.hidden - object_id = self.object_id - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if hidden is not UNSET: + field_dict['hidden'] = hidden + if object_id is not UNSET: + field_dict['object_id'] = object_id + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if hidden is not UNSET: - field_dict["hidden"] = hidden - if object_id is not UNSET: - field_dict["object_id"] = object_id - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[RG], src_dict: Dict[str, Any]) -> RG: + d = src_dict.copy() + hidden = d.pop("hidden", UNSET) - @classmethod - def from_dict(cls: Type[RG], src_dict: Dict[str, Any]) -> RG: - d = src_dict.copy() - hidden = d.pop("hidden", UNSET) + object_id = d.pop("object_id", UNSET) - object_id = d.pop("object_id", UNSET) + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - object_visible = cls( - hidden=hidden, - object_id=object_id, - type=type, - ) + object_visible = cls( + hidden= hidden, + object_id= object_id, + type= type, + ) - object_visible.additional_properties = d - return object_visible + object_visible.additional_properties = d + return object_visible - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties IT = TypeVar("IT", bound="get_entity_type") - @attr.s(auto_attribs=True) class get_entity_type: - """What type of entity is this?""" # noqa: E501 + """ What type of entity is this? """ # noqa: E501 + entity_id: Union[Unset, str] = UNSET + type: str = "get_entity_type" - entity_id: Union[Unset, str] = UNSET - type: str = "get_entity_type" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + entity_id = self.entity_id + type = self.type - def to_dict(self) -> Dict[str, Any]: - entity_id = self.entity_id - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entity_id is not UNSET: + field_dict['entity_id'] = entity_id + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if entity_id is not UNSET: - field_dict["entity_id"] = entity_id - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[IT], src_dict: Dict[str, Any]) -> IT: + d = src_dict.copy() + entity_id = d.pop("entity_id", UNSET) - @classmethod - def from_dict(cls: Type[IT], src_dict: Dict[str, Any]) -> IT: - d = src_dict.copy() - entity_id = d.pop("entity_id", UNSET) + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - get_entity_type = cls( - entity_id=entity_id, - type=type, - ) + get_entity_type = cls( + entity_id= entity_id, + type= type, + ) - get_entity_type.additional_properties = d - return get_entity_type + get_entity_type.additional_properties = d + return get_entity_type - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties LD = TypeVar("LD", bound="solid3d_get_all_edge_faces") - @attr.s(auto_attribs=True) class solid3d_get_all_edge_faces: - """Gets all faces which use the given edge.""" # noqa: E501 + """ Gets all faces which use the given edge. """ # noqa: E501 + edge_id: Union[Unset, str] = UNSET + object_id: Union[Unset, str] = UNSET + type: str = "solid3d_get_all_edge_faces" - edge_id: Union[Unset, str] = UNSET - object_id: Union[Unset, str] = UNSET - type: str = "solid3d_get_all_edge_faces" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + edge_id = self.edge_id + object_id = self.object_id + type = self.type - def to_dict(self) -> Dict[str, Any]: - edge_id = self.edge_id - object_id = self.object_id - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if edge_id is not UNSET: + field_dict['edge_id'] = edge_id + if object_id is not UNSET: + field_dict['object_id'] = object_id + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if edge_id is not UNSET: - field_dict["edge_id"] = edge_id - if object_id is not UNSET: - field_dict["object_id"] = object_id - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[LD], src_dict: Dict[str, Any]) -> LD: + d = src_dict.copy() + edge_id = d.pop("edge_id", UNSET) - @classmethod - def from_dict(cls: Type[LD], src_dict: Dict[str, Any]) -> LD: - d = src_dict.copy() - edge_id = d.pop("edge_id", UNSET) + object_id = d.pop("object_id", UNSET) - object_id = d.pop("object_id", UNSET) + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - solid3d_get_all_edge_faces = cls( - edge_id=edge_id, - object_id=object_id, - type=type, - ) + solid3d_get_all_edge_faces = cls( + edge_id= edge_id, + object_id= object_id, + type= type, + ) - solid3d_get_all_edge_faces.additional_properties = d - return solid3d_get_all_edge_faces + solid3d_get_all_edge_faces.additional_properties = d + return solid3d_get_all_edge_faces - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties UA = TypeVar("UA", bound="solid3d_get_all_opposite_edges") - @attr.s(auto_attribs=True) class solid3d_get_all_opposite_edges: - """Gets all edges which are opposite the given edge, across all possible faces.""" # noqa: E501 + """ Gets all edges which are opposite the given edge, across all possible faces. """ # noqa: E501 + along_vector: Union[Unset, Point3d] = UNSET + edge_id: Union[Unset, str] = UNSET + object_id: Union[Unset, str] = UNSET + type: str = "solid3d_get_all_opposite_edges" - along_vector: Union[Unset, Point3d] = UNSET - edge_id: Union[Unset, str] = UNSET - object_id: Union[Unset, str] = UNSET - type: str = "solid3d_get_all_opposite_edges" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.along_vector, Unset): + along_vector = self.along_vector + edge_id = self.edge_id + object_id = self.object_id + type = self.type - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.along_vector, Unset): - along_vector = self.along_vector - edge_id = self.edge_id - object_id = self.object_id - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if along_vector is not UNSET: + field_dict['along_vector'] = along_vector + if edge_id is not UNSET: + field_dict['edge_id'] = edge_id + if object_id is not UNSET: + field_dict['object_id'] = object_id + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if along_vector is not UNSET: - field_dict["along_vector"] = along_vector - if edge_id is not UNSET: - field_dict["edge_id"] = edge_id - if object_id is not UNSET: - field_dict["object_id"] = object_id - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[UA], src_dict: Dict[str, Any]) -> UA: + d = src_dict.copy() + _along_vector = d.pop("along_vector", UNSET) + along_vector: Union[Unset, Point3d] + if isinstance(_along_vector, Unset): + along_vector = UNSET + else: + along_vector = _along_vector # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[UA], src_dict: Dict[str, Any]) -> UA: - d = src_dict.copy() - _along_vector = d.pop("along_vector", UNSET) - along_vector: Union[Unset, Point3d] - if isinstance(_along_vector, Unset): - along_vector = UNSET - else: - along_vector = _along_vector # type: ignore[arg-type] + edge_id = d.pop("edge_id", UNSET) - edge_id = d.pop("edge_id", UNSET) + object_id = d.pop("object_id", UNSET) - object_id = d.pop("object_id", UNSET) + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - solid3d_get_all_opposite_edges = cls( - along_vector=along_vector, - edge_id=edge_id, - object_id=object_id, - type=type, - ) + solid3d_get_all_opposite_edges = cls( + along_vector= along_vector, + edge_id= edge_id, + object_id= object_id, + type= type, + ) - solid3d_get_all_opposite_edges.additional_properties = d - return solid3d_get_all_opposite_edges + solid3d_get_all_opposite_edges.additional_properties = d + return solid3d_get_all_opposite_edges - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties TN = TypeVar("TN", bound="solid3d_get_opposite_edge") - @attr.s(auto_attribs=True) class solid3d_get_opposite_edge: - """Gets the edge opposite the given edge, along the given face.""" # noqa: E501 + """ Gets the edge opposite the given edge, along the given face. """ # noqa: E501 + edge_id: Union[Unset, str] = UNSET + face_id: Union[Unset, str] = UNSET + object_id: Union[Unset, str] = UNSET + type: str = "solid3d_get_opposite_edge" - edge_id: Union[Unset, str] = UNSET - face_id: Union[Unset, str] = UNSET - object_id: Union[Unset, str] = UNSET - type: str = "solid3d_get_opposite_edge" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + edge_id = self.edge_id + face_id = self.face_id + object_id = self.object_id + type = self.type - def to_dict(self) -> Dict[str, Any]: - edge_id = self.edge_id - face_id = self.face_id - object_id = self.object_id - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if edge_id is not UNSET: + field_dict['edge_id'] = edge_id + if face_id is not UNSET: + field_dict['face_id'] = face_id + if object_id is not UNSET: + field_dict['object_id'] = object_id + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if edge_id is not UNSET: - field_dict["edge_id"] = edge_id - if face_id is not UNSET: - field_dict["face_id"] = face_id - if object_id is not UNSET: - field_dict["object_id"] = object_id - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[TN], src_dict: Dict[str, Any]) -> TN: + d = src_dict.copy() + edge_id = d.pop("edge_id", UNSET) - @classmethod - def from_dict(cls: Type[TN], src_dict: Dict[str, Any]) -> TN: - d = src_dict.copy() - edge_id = d.pop("edge_id", UNSET) + face_id = d.pop("face_id", UNSET) - face_id = d.pop("face_id", UNSET) + object_id = d.pop("object_id", UNSET) - object_id = d.pop("object_id", UNSET) + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - solid3d_get_opposite_edge = cls( - edge_id=edge_id, - face_id=face_id, - object_id=object_id, - type=type, - ) + solid3d_get_opposite_edge = cls( + edge_id= edge_id, + face_id= face_id, + object_id= object_id, + type= type, + ) - solid3d_get_opposite_edge.additional_properties = d - return solid3d_get_opposite_edge + solid3d_get_opposite_edge.additional_properties = d + return solid3d_get_opposite_edge - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - 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_next_adjacent_edge") - @attr.s(auto_attribs=True) class solid3d_get_next_adjacent_edge: - """Gets the next adjacent edge for the given edge, along the given face.""" # noqa: E501 + """ Gets the next adjacent edge for the given edge, along the given face. """ # noqa: E501 + edge_id: Union[Unset, str] = UNSET + face_id: Union[Unset, str] = UNSET + object_id: Union[Unset, str] = UNSET + type: str = "solid3d_get_next_adjacent_edge" - edge_id: Union[Unset, str] = UNSET - face_id: Union[Unset, str] = UNSET - object_id: Union[Unset, str] = UNSET - type: str = "solid3d_get_next_adjacent_edge" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + edge_id = self.edge_id + face_id = self.face_id + object_id = self.object_id + type = self.type - def to_dict(self) -> Dict[str, Any]: - edge_id = self.edge_id - face_id = self.face_id - object_id = self.object_id - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if edge_id is not UNSET: + field_dict['edge_id'] = edge_id + if face_id is not UNSET: + field_dict['face_id'] = face_id + if object_id is not UNSET: + field_dict['object_id'] = object_id + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if edge_id is not UNSET: - field_dict["edge_id"] = edge_id - if face_id is not UNSET: - field_dict["face_id"] = face_id - if object_id is not UNSET: - field_dict["object_id"] = object_id - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[MZ], src_dict: Dict[str, Any]) -> MZ: + d = src_dict.copy() + edge_id = d.pop("edge_id", UNSET) - @classmethod - def from_dict(cls: Type[MZ], src_dict: Dict[str, Any]) -> MZ: - d = src_dict.copy() - edge_id = d.pop("edge_id", UNSET) + face_id = d.pop("face_id", UNSET) - face_id = d.pop("face_id", UNSET) + object_id = d.pop("object_id", UNSET) - object_id = d.pop("object_id", UNSET) + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - solid3d_get_next_adjacent_edge = cls( - edge_id=edge_id, - face_id=face_id, - object_id=object_id, - type=type, - ) + solid3d_get_next_adjacent_edge = cls( + edge_id= edge_id, + face_id= face_id, + object_id= object_id, + type= type, + ) - solid3d_get_next_adjacent_edge.additional_properties = d - return solid3d_get_next_adjacent_edge + solid3d_get_next_adjacent_edge.additional_properties = d + return solid3d_get_next_adjacent_edge - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties UG = TypeVar("UG", bound="solid3d_get_prev_adjacent_edge") - @attr.s(auto_attribs=True) class solid3d_get_prev_adjacent_edge: - """Gets the previous adjacent edge for the given edge, along the given face.""" # noqa: E501 + """ Gets the previous adjacent edge for the given edge, along the given face. """ # noqa: E501 + edge_id: Union[Unset, str] = UNSET + face_id: Union[Unset, str] = UNSET + object_id: Union[Unset, str] = UNSET + type: str = "solid3d_get_prev_adjacent_edge" - edge_id: Union[Unset, str] = UNSET - face_id: Union[Unset, str] = UNSET - object_id: Union[Unset, str] = UNSET - type: str = "solid3d_get_prev_adjacent_edge" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + edge_id = self.edge_id + face_id = self.face_id + object_id = self.object_id + type = self.type - def to_dict(self) -> Dict[str, Any]: - edge_id = self.edge_id - face_id = self.face_id - object_id = self.object_id - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if edge_id is not UNSET: + field_dict['edge_id'] = edge_id + if face_id is not UNSET: + field_dict['face_id'] = face_id + if object_id is not UNSET: + field_dict['object_id'] = object_id + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if edge_id is not UNSET: - field_dict["edge_id"] = edge_id - if face_id is not UNSET: - field_dict["face_id"] = face_id - if object_id is not UNSET: - field_dict["object_id"] = object_id - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[UG], src_dict: Dict[str, Any]) -> UG: + d = src_dict.copy() + edge_id = d.pop("edge_id", UNSET) - @classmethod - def from_dict(cls: Type[UG], src_dict: Dict[str, Any]) -> UG: - d = src_dict.copy() - edge_id = d.pop("edge_id", UNSET) + face_id = d.pop("face_id", UNSET) - face_id = d.pop("face_id", UNSET) + object_id = d.pop("object_id", UNSET) - object_id = d.pop("object_id", UNSET) + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - solid3d_get_prev_adjacent_edge = cls( - edge_id=edge_id, - face_id=face_id, - object_id=object_id, - type=type, - ) + solid3d_get_prev_adjacent_edge = cls( + edge_id= edge_id, + face_id= face_id, + object_id= object_id, + type= type, + ) - solid3d_get_prev_adjacent_edge.additional_properties = d - return solid3d_get_prev_adjacent_edge + solid3d_get_prev_adjacent_edge.additional_properties = d + return solid3d_get_prev_adjacent_edge - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties CY = TypeVar("CY", bound="send_object") - @attr.s(auto_attribs=True) class send_object: - """Sends object to front or back.""" # noqa: E501 + """ Sends object to front or back. """ # noqa: E501 + front: Union[Unset, bool] = False + object_id: Union[Unset, str] = UNSET + type: str = "send_object" - front: Union[Unset, bool] = False - object_id: Union[Unset, str] = UNSET - type: str = "send_object" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + front = self.front + object_id = self.object_id + type = self.type - def to_dict(self) -> Dict[str, Any]: - front = self.front - object_id = self.object_id - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if front is not UNSET: + field_dict['front'] = front + if object_id is not UNSET: + field_dict['object_id'] = object_id + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if front is not UNSET: - field_dict["front"] = front - if object_id is not UNSET: - field_dict["object_id"] = object_id - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[CY], src_dict: Dict[str, Any]) -> CY: + d = src_dict.copy() + front = d.pop("front", UNSET) - @classmethod - def from_dict(cls: Type[CY], src_dict: Dict[str, Any]) -> CY: - d = src_dict.copy() - front = d.pop("front", UNSET) + object_id = d.pop("object_id", UNSET) - object_id = d.pop("object_id", UNSET) + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - send_object = cls( - front=front, - object_id=object_id, - type=type, - ) + send_object = cls( + front= front, + object_id= object_id, + type= type, + ) - send_object.additional_properties = d - return send_object + send_object.additional_properties = d + return send_object - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties NZ = TypeVar("NZ", bound="entity_set_opacity") - @attr.s(auto_attribs=True) class entity_set_opacity: - """Set opacity of the entity.""" # noqa: E501 + """ Set opacity of the entity. """ # noqa: E501 + entity_id: Union[Unset, str] = UNSET + opacity: Union[Unset, float] = UNSET + type: str = "entity_set_opacity" - entity_id: Union[Unset, str] = UNSET - opacity: Union[Unset, float] = UNSET - type: str = "entity_set_opacity" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + entity_id = self.entity_id + opacity = self.opacity + type = self.type - def to_dict(self) -> Dict[str, Any]: - entity_id = self.entity_id - opacity = self.opacity - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entity_id is not UNSET: + field_dict['entity_id'] = entity_id + if opacity is not UNSET: + field_dict['opacity'] = opacity + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if entity_id is not UNSET: - field_dict["entity_id"] = entity_id - if opacity is not UNSET: - field_dict["opacity"] = opacity - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[NZ], src_dict: Dict[str, Any]) -> NZ: + d = src_dict.copy() + entity_id = d.pop("entity_id", UNSET) - @classmethod - def from_dict(cls: Type[NZ], src_dict: Dict[str, Any]) -> NZ: - d = src_dict.copy() - entity_id = d.pop("entity_id", UNSET) + opacity = d.pop("opacity", UNSET) - opacity = d.pop("opacity", UNSET) + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - entity_set_opacity = cls( - entity_id=entity_id, - opacity=opacity, - type=type, - ) + entity_set_opacity = cls( + entity_id= entity_id, + opacity= opacity, + type= type, + ) - entity_set_opacity.additional_properties = d - return entity_set_opacity + entity_set_opacity.additional_properties = d + return entity_set_opacity - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties LI = TypeVar("LI", bound="entity_fade") - @attr.s(auto_attribs=True) class entity_fade: - """Fade the entity in or out.""" # noqa: E501 + """ Fade the entity in or out. """ # noqa: E501 + duration_seconds: Union[Unset, float] = UNSET + entity_id: Union[Unset, str] = UNSET + fade_in: Union[Unset, bool] = False + type: str = "entity_fade" - duration_seconds: Union[Unset, float] = UNSET - entity_id: Union[Unset, str] = UNSET - fade_in: Union[Unset, bool] = False - type: str = "entity_fade" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + duration_seconds = self.duration_seconds + entity_id = self.entity_id + fade_in = self.fade_in + type = self.type - def to_dict(self) -> Dict[str, Any]: - duration_seconds = self.duration_seconds - entity_id = self.entity_id - fade_in = self.fade_in - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if duration_seconds is not UNSET: + field_dict['duration_seconds'] = duration_seconds + if entity_id is not UNSET: + field_dict['entity_id'] = entity_id + if fade_in is not UNSET: + field_dict['fade_in'] = fade_in + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if duration_seconds is not UNSET: - field_dict["duration_seconds"] = duration_seconds - if entity_id is not UNSET: - field_dict["entity_id"] = entity_id - if fade_in is not UNSET: - field_dict["fade_in"] = fade_in - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[LI], src_dict: Dict[str, Any]) -> LI: + d = src_dict.copy() + duration_seconds = d.pop("duration_seconds", UNSET) - @classmethod - def from_dict(cls: Type[LI], src_dict: Dict[str, Any]) -> LI: - d = src_dict.copy() - duration_seconds = d.pop("duration_seconds", UNSET) + entity_id = d.pop("entity_id", UNSET) - entity_id = d.pop("entity_id", UNSET) + fade_in = d.pop("fade_in", UNSET) - fade_in = d.pop("fade_in", UNSET) + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - entity_fade = cls( - duration_seconds=duration_seconds, - entity_id=entity_id, - fade_in=fade_in, - type=type, - ) + entity_fade = cls( + duration_seconds= duration_seconds, + entity_id= entity_id, + fade_in= fade_in, + type= type, + ) - entity_fade.additional_properties = d - return entity_fade + entity_fade.additional_properties = d + return entity_fade - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties LO = TypeVar("LO", bound="make_plane") - @attr.s(auto_attribs=True) class make_plane: - """Make a plane.""" # noqa: E501 + """ Make a plane. """ # noqa: E501 + clobber: Union[Unset, bool] = False + origin: Union[Unset, Point3d] = UNSET + size: Union[Unset, float] = UNSET + type: str = "make_plane" + x_axis: Union[Unset, Point3d] = UNSET + y_axis: Union[Unset, Point3d] = UNSET - clobber: Union[Unset, bool] = False - origin: Union[Unset, Point3d] = UNSET - size: Union[Unset, float] = UNSET - type: str = "make_plane" - x_axis: Union[Unset, Point3d] = UNSET - y_axis: Union[Unset, Point3d] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + clobber = self.clobber + if not isinstance(self.origin, Unset): + origin = self.origin + size = self.size + type = self.type + if not isinstance(self.x_axis, Unset): + x_axis = self.x_axis + if not isinstance(self.y_axis, Unset): + y_axis = self.y_axis - def to_dict(self) -> Dict[str, Any]: - clobber = self.clobber - if not isinstance(self.origin, Unset): - origin = self.origin - size = self.size - type = self.type - if not isinstance(self.x_axis, Unset): - x_axis = self.x_axis - if not isinstance(self.y_axis, Unset): - y_axis = self.y_axis + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if clobber is not UNSET: + field_dict['clobber'] = clobber + if origin is not UNSET: + field_dict['origin'] = origin + if size is not UNSET: + field_dict['size'] = size + field_dict['type'] = type + if x_axis is not UNSET: + field_dict['x_axis'] = x_axis + if y_axis is not UNSET: + field_dict['y_axis'] = y_axis - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if clobber is not UNSET: - field_dict["clobber"] = clobber - if origin is not UNSET: - field_dict["origin"] = origin - if size is not UNSET: - field_dict["size"] = size - field_dict["type"] = type - if x_axis is not UNSET: - field_dict["x_axis"] = x_axis - if y_axis is not UNSET: - field_dict["y_axis"] = y_axis + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[LO], src_dict: Dict[str, Any]) -> LO: + d = src_dict.copy() + clobber = d.pop("clobber", UNSET) - @classmethod - def from_dict(cls: Type[LO], src_dict: Dict[str, Any]) -> LO: - d = src_dict.copy() - clobber = d.pop("clobber", UNSET) + _origin = d.pop("origin", UNSET) + origin: Union[Unset, Point3d] + if isinstance(_origin, Unset): + origin = UNSET + else: + origin = _origin # type: ignore[arg-type] - _origin = d.pop("origin", UNSET) - origin: Union[Unset, Point3d] - if isinstance(_origin, Unset): - origin = UNSET - else: - origin = _origin # type: ignore[arg-type] + size = d.pop("size", UNSET) - size = d.pop("size", UNSET) + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) + _x_axis = d.pop("x_axis", UNSET) + x_axis: Union[Unset, Point3d] + if isinstance(_x_axis, Unset): + x_axis = UNSET + else: + x_axis = _x_axis # type: ignore[arg-type] - _x_axis = d.pop("x_axis", UNSET) - x_axis: Union[Unset, Point3d] - if isinstance(_x_axis, Unset): - x_axis = UNSET - else: - x_axis = _x_axis # type: ignore[arg-type] + _y_axis = d.pop("y_axis", UNSET) + y_axis: Union[Unset, Point3d] + if isinstance(_y_axis, Unset): + y_axis = UNSET + else: + y_axis = _y_axis # type: ignore[arg-type] - _y_axis = d.pop("y_axis", UNSET) - y_axis: Union[Unset, Point3d] - if isinstance(_y_axis, Unset): - y_axis = UNSET - else: - y_axis = _y_axis # type: ignore[arg-type] - make_plane = cls( - clobber=clobber, - origin=origin, - size=size, - type=type, - x_axis=x_axis, - y_axis=y_axis, - ) + make_plane = cls( + clobber= clobber, + origin= origin, + size= size, + type= type, + x_axis= x_axis, + y_axis= y_axis, + ) - make_plane.additional_properties = d - return make_plane + make_plane.additional_properties = d + return make_plane - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties XJ = TypeVar("XJ", bound="plane_set_color") - @attr.s(auto_attribs=True) class plane_set_color: - """Set the plane's color.""" # noqa: E501 + """ Set the plane's color. """ # noqa: E501 + color: Union[Unset, Color] = UNSET + plane_id: Union[Unset, str] = UNSET + type: str = "plane_set_color" - color: Union[Unset, Color] = UNSET - plane_id: Union[Unset, str] = UNSET - type: str = "plane_set_color" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.color, Unset): + color = self.color + plane_id = self.plane_id + type = self.type - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.color, Unset): - color = self.color - plane_id = self.plane_id - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if color is not UNSET: + field_dict['color'] = color + if plane_id is not UNSET: + field_dict['plane_id'] = plane_id + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if color is not UNSET: - field_dict["color"] = color - if plane_id is not UNSET: - field_dict["plane_id"] = plane_id - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[XJ], src_dict: Dict[str, Any]) -> XJ: + d = src_dict.copy() + _color = d.pop("color", UNSET) + color: Union[Unset, Color] + if isinstance(_color, Unset): + color = UNSET + else: + color = _color # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[XJ], src_dict: Dict[str, Any]) -> XJ: - d = src_dict.copy() - _color = d.pop("color", UNSET) - color: Union[Unset, Color] - if isinstance(_color, Unset): - color = UNSET - else: - color = _color # type: ignore[arg-type] + plane_id = d.pop("plane_id", UNSET) - plane_id = d.pop("plane_id", UNSET) + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - plane_set_color = cls( - color=color, - plane_id=plane_id, - type=type, - ) + plane_set_color = cls( + color= color, + plane_id= plane_id, + type= type, + ) - plane_set_color.additional_properties = d - return plane_set_color + plane_set_color.additional_properties = d + return plane_set_color - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties OW = TypeVar("OW", bound="set_tool") - @attr.s(auto_attribs=True) class set_tool: - """Set the active tool.""" # noqa: E501 + """ Set the active tool. """ # noqa: E501 + tool: Union[Unset, SceneToolType] = UNSET + type: str = "set_tool" - tool: Union[Unset, SceneToolType] = UNSET - type: str = "set_tool" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.tool, Unset): + tool = self.tool + type = self.type - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.tool, Unset): - tool = self.tool - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if tool is not UNSET: + field_dict['tool'] = tool + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if tool is not UNSET: - field_dict["tool"] = tool - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[OW], src_dict: Dict[str, Any]) -> OW: + d = src_dict.copy() + _tool = d.pop("tool", UNSET) + tool: Union[Unset, SceneToolType] + if isinstance(_tool, Unset): + tool = UNSET + else: + tool = _tool # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[OW], src_dict: Dict[str, Any]) -> OW: - d = src_dict.copy() - _tool = d.pop("tool", UNSET) - tool: Union[Unset, SceneToolType] - if isinstance(_tool, Unset): - tool = UNSET - else: - tool = _tool # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - set_tool = cls( - tool=tool, - type=type, - ) + set_tool = cls( + tool= tool, + type= type, + ) - set_tool.additional_properties = d - return set_tool + set_tool.additional_properties = d + return set_tool - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties JQ = TypeVar("JQ", bound="mouse_move") - @attr.s(auto_attribs=True) class mouse_move: - """Send a mouse move event.""" # noqa: E501 + """ Send a mouse move event. """ # noqa: E501 + sequence: Union[Unset, int] = UNSET + type: str = "mouse_move" + window: Union[Unset, Point2d] = UNSET - sequence: Union[Unset, int] = UNSET - type: str = "mouse_move" - window: Union[Unset, Point2d] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + sequence = self.sequence + type = self.type + if not isinstance(self.window, Unset): + window = self.window - def to_dict(self) -> Dict[str, Any]: - sequence = self.sequence - type = self.type - if not isinstance(self.window, Unset): - window = self.window + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if sequence is not UNSET: + field_dict['sequence'] = sequence + field_dict['type'] = type + if window is not UNSET: + field_dict['window'] = window - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if sequence is not UNSET: - field_dict["sequence"] = sequence - field_dict["type"] = type - if window is not UNSET: - field_dict["window"] = window + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[JQ], src_dict: Dict[str, Any]) -> JQ: + d = src_dict.copy() + sequence = d.pop("sequence", UNSET) - @classmethod - def from_dict(cls: Type[JQ], src_dict: Dict[str, Any]) -> JQ: - d = src_dict.copy() - sequence = d.pop("sequence", UNSET) + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) + _window = d.pop("window", UNSET) + window: Union[Unset, Point2d] + if isinstance(_window, Unset): + window = UNSET + else: + window = _window # type: ignore[arg-type] - _window = d.pop("window", UNSET) - window: Union[Unset, Point2d] - if isinstance(_window, Unset): - window = UNSET - else: - window = _window # type: ignore[arg-type] - mouse_move = cls( - sequence=sequence, - type=type, - window=window, - ) + mouse_move = cls( + sequence= sequence, + type= type, + window= window, + ) - mouse_move.additional_properties = d - return mouse_move + mouse_move.additional_properties = d + return mouse_move - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties PQ = TypeVar("PQ", bound="mouse_click") - @attr.s(auto_attribs=True) class mouse_click: - """Send a mouse click event. Updates modified/selected entities.""" # noqa: E501 + """ Send a mouse click event. Updates modified/selected entities. """ # noqa: E501 + type: str = "mouse_click" + window: Union[Unset, Point2d] = UNSET - type: str = "mouse_click" - window: Union[Unset, Point2d] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + type = self.type + if not isinstance(self.window, Unset): + window = self.window - def to_dict(self) -> Dict[str, Any]: - type = self.type - if not isinstance(self.window, Unset): - window = self.window + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + field_dict['type'] = type + if window is not UNSET: + field_dict['window'] = window - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - field_dict["type"] = type - if window is not UNSET: - field_dict["window"] = window + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[PQ], src_dict: Dict[str, Any]) -> PQ: + d = src_dict.copy() + type = d.pop("type", UNSET) - @classmethod - def from_dict(cls: Type[PQ], src_dict: Dict[str, Any]) -> PQ: - d = src_dict.copy() - type = d.pop("type", UNSET) + _window = d.pop("window", UNSET) + window: Union[Unset, Point2d] + if isinstance(_window, Unset): + window = UNSET + else: + window = _window # type: ignore[arg-type] - _window = d.pop("window", UNSET) - window: Union[Unset, Point2d] - if isinstance(_window, Unset): - window = UNSET - else: - window = _window # type: ignore[arg-type] - mouse_click = cls( - type=type, - window=window, - ) + mouse_click = cls( + type= type, + window= window, + ) - mouse_click.additional_properties = d - return mouse_click + mouse_click.additional_properties = d + return mouse_click - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties IM = TypeVar("IM", bound="sketch_mode_enable") - @attr.s(auto_attribs=True) class sketch_mode_enable: - """Enable sketch mode on the given plane.""" # noqa: E501 + """ Enable sketch mode on the given plane. """ # noqa: E501 + animated: Union[Unset, bool] = False + ortho: Union[Unset, bool] = False + plane_id: Union[Unset, str] = UNSET + type: str = "sketch_mode_enable" - animated: Union[Unset, bool] = False - ortho: Union[Unset, bool] = False - plane_id: Union[Unset, str] = UNSET - type: str = "sketch_mode_enable" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + animated = self.animated + ortho = self.ortho + plane_id = self.plane_id + type = self.type - def to_dict(self) -> Dict[str, Any]: - animated = self.animated - ortho = self.ortho - plane_id = self.plane_id - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if animated is not UNSET: + field_dict['animated'] = animated + if ortho is not UNSET: + field_dict['ortho'] = ortho + if plane_id is not UNSET: + field_dict['plane_id'] = plane_id + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if animated is not UNSET: - field_dict["animated"] = animated - if ortho is not UNSET: - field_dict["ortho"] = ortho - if plane_id is not UNSET: - field_dict["plane_id"] = plane_id - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[IM], src_dict: Dict[str, Any]) -> IM: + d = src_dict.copy() + animated = d.pop("animated", UNSET) - @classmethod - def from_dict(cls: Type[IM], src_dict: Dict[str, Any]) -> IM: - d = src_dict.copy() - animated = d.pop("animated", UNSET) + ortho = d.pop("ortho", UNSET) - ortho = d.pop("ortho", UNSET) + plane_id = d.pop("plane_id", UNSET) - plane_id = d.pop("plane_id", UNSET) + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - sketch_mode_enable = cls( - animated=animated, - ortho=ortho, - plane_id=plane_id, - type=type, - ) + sketch_mode_enable = cls( + animated= animated, + ortho= ortho, + plane_id= plane_id, + type= type, + ) - sketch_mode_enable.additional_properties = d - return sketch_mode_enable + sketch_mode_enable.additional_properties = d + return sketch_mode_enable - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties OU = TypeVar("OU", bound="sketch_mode_disable") - @attr.s(auto_attribs=True) class sketch_mode_disable: - """Disable sketch mode.""" # noqa: E501 + """ Disable sketch mode. """ # noqa: E501 + type: str = "sketch_mode_disable" - type: str = "sketch_mode_disable" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + type = self.type - def to_dict(self) -> Dict[str, Any]: - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[OU], src_dict: Dict[str, Any]) -> OU: + d = src_dict.copy() + type = d.pop("type", UNSET) - @classmethod - def from_dict(cls: Type[OU], src_dict: Dict[str, Any]) -> OU: - d = src_dict.copy() - type = d.pop("type", UNSET) - sketch_mode_disable = cls( - type=type, - ) + sketch_mode_disable = cls( + type= type, + ) - sketch_mode_disable.additional_properties = d - return sketch_mode_disable + sketch_mode_disable.additional_properties = d + return sketch_mode_disable - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties KL = TypeVar("KL", bound="curve_get_type") - @attr.s(auto_attribs=True) class curve_get_type: - """Get type of a given curve.""" # noqa: E501 + """ Get type of a given curve. """ # noqa: E501 + curve_id: Union[Unset, str] = UNSET + type: str = "curve_get_type" - curve_id: Union[Unset, str] = UNSET - type: str = "curve_get_type" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + curve_id = self.curve_id + type = self.type - def to_dict(self) -> Dict[str, Any]: - curve_id = self.curve_id - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if curve_id is not UNSET: + field_dict['curve_id'] = curve_id + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if curve_id is not UNSET: - field_dict["curve_id"] = curve_id - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[KL], src_dict: Dict[str, Any]) -> KL: + d = src_dict.copy() + curve_id = d.pop("curve_id", UNSET) - @classmethod - def from_dict(cls: Type[KL], src_dict: Dict[str, Any]) -> KL: - d = src_dict.copy() - curve_id = d.pop("curve_id", UNSET) + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - curve_get_type = cls( - curve_id=curve_id, - type=type, - ) + curve_get_type = cls( + curve_id= curve_id, + type= type, + ) - curve_get_type.additional_properties = d - return curve_get_type + curve_get_type.additional_properties = d + return curve_get_type - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties XI = TypeVar("XI", bound="curve_get_control_points") - @attr.s(auto_attribs=True) class curve_get_control_points: - """Get control points of a given curve.""" # noqa: E501 + """ Get control points of a given curve. """ # noqa: E501 + curve_id: Union[Unset, str] = UNSET + type: str = "curve_get_control_points" - curve_id: Union[Unset, str] = UNSET - type: str = "curve_get_control_points" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + curve_id = self.curve_id + type = self.type - def to_dict(self) -> Dict[str, Any]: - curve_id = self.curve_id - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if curve_id is not UNSET: + field_dict['curve_id'] = curve_id + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if curve_id is not UNSET: - field_dict["curve_id"] = curve_id - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[XI], src_dict: Dict[str, Any]) -> XI: + d = src_dict.copy() + curve_id = d.pop("curve_id", UNSET) - @classmethod - def from_dict(cls: Type[XI], src_dict: Dict[str, Any]) -> XI: - d = src_dict.copy() - curve_id = d.pop("curve_id", UNSET) + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - curve_get_control_points = cls( - curve_id=curve_id, - type=type, - ) + curve_get_control_points = cls( + curve_id= curve_id, + type= type, + ) - curve_get_control_points.additional_properties = d - return curve_get_control_points + curve_get_control_points.additional_properties = d + return curve_get_control_points - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties PO = TypeVar("PO", bound="take_snapshot") - @attr.s(auto_attribs=True) class take_snapshot: - """Take a snapshot.""" # noqa: E501 + """ Take a snapshot. """ # noqa: E501 + format: Union[Unset, ImageFormat] = UNSET + type: str = "take_snapshot" - format: Union[Unset, ImageFormat] = UNSET - type: str = "take_snapshot" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.format, Unset): + format = self.format + type = self.type - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.format, Unset): - format = self.format - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if format is not UNSET: + field_dict['format'] = format + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if format is not UNSET: - field_dict["format"] = format - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[PO], src_dict: Dict[str, Any]) -> PO: + d = src_dict.copy() + _format = d.pop("format", UNSET) + format: Union[Unset, ImageFormat] + if isinstance(_format, Unset): + format = UNSET + else: + format = _format # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[PO], src_dict: Dict[str, Any]) -> PO: - d = src_dict.copy() - _format = d.pop("format", UNSET) - format: Union[Unset, ImageFormat] - if isinstance(_format, Unset): - format = UNSET - else: - format = _format # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - take_snapshot = cls( - format=format, - type=type, - ) + take_snapshot = cls( + format= format, + type= type, + ) - take_snapshot.additional_properties = d - return take_snapshot + take_snapshot.additional_properties = d + return take_snapshot - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties PS = TypeVar("PS", bound="make_axes_gizmo") - @attr.s(auto_attribs=True) class make_axes_gizmo: - """Add a gizmo showing the axes.""" # noqa: E501 + """ Add a gizmo showing the axes. """ # noqa: E501 + clobber: Union[Unset, bool] = False + gizmo_mode: Union[Unset, bool] = False + type: str = "make_axes_gizmo" - clobber: Union[Unset, bool] = False - gizmo_mode: Union[Unset, bool] = False - type: str = "make_axes_gizmo" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + clobber = self.clobber + gizmo_mode = self.gizmo_mode + type = self.type - def to_dict(self) -> Dict[str, Any]: - clobber = self.clobber - gizmo_mode = self.gizmo_mode - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if clobber is not UNSET: + field_dict['clobber'] = clobber + if gizmo_mode is not UNSET: + field_dict['gizmo_mode'] = gizmo_mode + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if clobber is not UNSET: - field_dict["clobber"] = clobber - if gizmo_mode is not UNSET: - field_dict["gizmo_mode"] = gizmo_mode - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[PS], src_dict: Dict[str, Any]) -> PS: + d = src_dict.copy() + clobber = d.pop("clobber", UNSET) - @classmethod - def from_dict(cls: Type[PS], src_dict: Dict[str, Any]) -> PS: - d = src_dict.copy() - clobber = d.pop("clobber", UNSET) + gizmo_mode = d.pop("gizmo_mode", UNSET) - gizmo_mode = d.pop("gizmo_mode", UNSET) + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - make_axes_gizmo = cls( - clobber=clobber, - gizmo_mode=gizmo_mode, - type=type, - ) + make_axes_gizmo = cls( + clobber= clobber, + gizmo_mode= gizmo_mode, + type= type, + ) - make_axes_gizmo.additional_properties = d - return make_axes_gizmo + make_axes_gizmo.additional_properties = d + return make_axes_gizmo - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties WR = TypeVar("WR", bound="path_get_info") - @attr.s(auto_attribs=True) class path_get_info: - """Query the given path""" # noqa: E501 + """ Query the given path """ # noqa: E501 + path_id: Union[Unset, str] = UNSET + type: str = "path_get_info" - path_id: Union[Unset, str] = UNSET - type: str = "path_get_info" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 - 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 - 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 - return field_dict + @classmethod + def from_dict(cls: Type[WR], src_dict: Dict[str, Any]) -> WR: + d = src_dict.copy() + path_id = d.pop("path_id", UNSET) - @classmethod - def from_dict(cls: Type[WR], src_dict: Dict[str, Any]) -> WR: - d = src_dict.copy() - path_id = d.pop("path_id", UNSET) + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - path_get_info = cls( - path_id=path_id, - type=type, - ) + path_get_info = cls( + path_id= path_id, + type= type, + ) - path_get_info.additional_properties = d - return path_get_info + path_get_info.additional_properties = d + return path_get_info - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties XL = TypeVar("XL", bound="path_get_curve_uuids_for_vertices") - @attr.s(auto_attribs=True) class path_get_curve_uuids_for_vertices: - """Get curves for vertices within a path""" # noqa: E501 + """ Get curves for vertices within a path """ # noqa: E501 + path_id: Union[Unset, str] = UNSET + type: str = "path_get_curve_uuids_for_vertices" + vertex_ids: Union[Unset, List[str]] = UNSET - path_id: Union[Unset, str] = UNSET - type: str = "path_get_curve_uuids_for_vertices" - vertex_ids: Union[Unset, List[str]] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + path_id = self.path_id + type = self.type + vertex_ids: Union[Unset, List[str]] = UNSET + if not isinstance(self.vertex_ids, Unset): + vertex_ids = self.vertex_ids - def to_dict(self) -> Dict[str, Any]: - path_id = self.path_id - type = self.type - vertex_ids: Union[Unset, List[str]] = UNSET - if not isinstance(self.vertex_ids, Unset): - vertex_ids = self.vertex_ids + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if path_id is not UNSET: + field_dict['path_id'] = path_id + field_dict['type'] = type + if vertex_ids is not UNSET: + field_dict['vertex_ids'] = vertex_ids - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if path_id is not UNSET: - field_dict["path_id"] = path_id - field_dict["type"] = type - if vertex_ids is not UNSET: - field_dict["vertex_ids"] = vertex_ids + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[XL], src_dict: Dict[str, Any]) -> XL: + d = src_dict.copy() + path_id = d.pop("path_id", UNSET) - @classmethod - def from_dict(cls: Type[XL], src_dict: Dict[str, Any]) -> XL: - d = src_dict.copy() - path_id = d.pop("path_id", UNSET) + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) + vertex_ids = cast(List[str], d.pop("vertex_ids", UNSET)) - vertex_ids = cast(List[str], d.pop("vertex_ids", UNSET)) - path_get_curve_uuids_for_vertices = cls( - path_id=path_id, - type=type, - vertex_ids=vertex_ids, - ) + path_get_curve_uuids_for_vertices = cls( + path_id= path_id, + type= type, + vertex_ids= vertex_ids, + ) - path_get_curve_uuids_for_vertices.additional_properties = d - return path_get_curve_uuids_for_vertices + path_get_curve_uuids_for_vertices.additional_properties = d + return path_get_curve_uuids_for_vertices - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties ZX = TypeVar("ZX", bound="handle_mouse_drag_start") - @attr.s(auto_attribs=True) class handle_mouse_drag_start: - """Start dragging mouse.""" # noqa: E501 + """ Start dragging mouse. """ # noqa: E501 + type: str = "handle_mouse_drag_start" + window: Union[Unset, Point2d] = UNSET - type: str = "handle_mouse_drag_start" - window: Union[Unset, Point2d] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + type = self.type + if not isinstance(self.window, Unset): + window = self.window - def to_dict(self) -> Dict[str, Any]: - type = self.type - if not isinstance(self.window, Unset): - window = self.window + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + field_dict['type'] = type + if window is not UNSET: + field_dict['window'] = window - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - field_dict["type"] = type - if window is not UNSET: - field_dict["window"] = window + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[ZX], src_dict: Dict[str, Any]) -> ZX: + d = src_dict.copy() + type = d.pop("type", UNSET) - @classmethod - def from_dict(cls: Type[ZX], src_dict: Dict[str, Any]) -> ZX: - d = src_dict.copy() - type = d.pop("type", UNSET) + _window = d.pop("window", UNSET) + window: Union[Unset, Point2d] + if isinstance(_window, Unset): + window = UNSET + else: + window = _window # type: ignore[arg-type] - _window = d.pop("window", UNSET) - window: Union[Unset, Point2d] - if isinstance(_window, Unset): - window = UNSET - else: - window = _window # type: ignore[arg-type] - handle_mouse_drag_start = cls( - type=type, - window=window, - ) + handle_mouse_drag_start = cls( + type= type, + window= window, + ) - handle_mouse_drag_start.additional_properties = d - return handle_mouse_drag_start + handle_mouse_drag_start.additional_properties = d + return handle_mouse_drag_start - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties FT = TypeVar("FT", bound="handle_mouse_drag_move") - @attr.s(auto_attribs=True) class handle_mouse_drag_move: - """Continue dragging mouse.""" # noqa: E501 + """ Continue dragging mouse. """ # noqa: E501 + sequence: Union[Unset, int] = UNSET + type: str = "handle_mouse_drag_move" + window: Union[Unset, Point2d] = UNSET - sequence: Union[Unset, int] = UNSET - type: str = "handle_mouse_drag_move" - window: Union[Unset, Point2d] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + sequence = self.sequence + type = self.type + if not isinstance(self.window, Unset): + window = self.window - def to_dict(self) -> Dict[str, Any]: - sequence = self.sequence - type = self.type - if not isinstance(self.window, Unset): - window = self.window + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if sequence is not UNSET: + field_dict['sequence'] = sequence + field_dict['type'] = type + if window is not UNSET: + field_dict['window'] = window - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if sequence is not UNSET: - field_dict["sequence"] = sequence - field_dict["type"] = type - if window is not UNSET: - field_dict["window"] = window + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[FT], src_dict: Dict[str, Any]) -> FT: + d = src_dict.copy() + sequence = d.pop("sequence", UNSET) - @classmethod - def from_dict(cls: Type[FT], src_dict: Dict[str, Any]) -> FT: - d = src_dict.copy() - sequence = d.pop("sequence", UNSET) + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) + _window = d.pop("window", UNSET) + window: Union[Unset, Point2d] + if isinstance(_window, Unset): + window = UNSET + else: + window = _window # type: ignore[arg-type] - _window = d.pop("window", UNSET) - window: Union[Unset, Point2d] - if isinstance(_window, Unset): - window = UNSET - else: - window = _window # type: ignore[arg-type] - handle_mouse_drag_move = cls( - sequence=sequence, - type=type, - window=window, - ) + handle_mouse_drag_move = cls( + sequence= sequence, + type= type, + window= window, + ) - handle_mouse_drag_move.additional_properties = d - return handle_mouse_drag_move + handle_mouse_drag_move.additional_properties = d + return handle_mouse_drag_move - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties NX = TypeVar("NX", bound="handle_mouse_drag_end") - @attr.s(auto_attribs=True) class handle_mouse_drag_end: - """Stop dragging mouse.""" # noqa: E501 + """ Stop dragging mouse. """ # noqa: E501 + type: str = "handle_mouse_drag_end" + window: Union[Unset, Point2d] = UNSET - type: str = "handle_mouse_drag_end" - window: Union[Unset, Point2d] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + type = self.type + if not isinstance(self.window, Unset): + window = self.window - def to_dict(self) -> Dict[str, Any]: - type = self.type - if not isinstance(self.window, Unset): - window = self.window + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + field_dict['type'] = type + if window is not UNSET: + field_dict['window'] = window - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - field_dict["type"] = type - if window is not UNSET: - field_dict["window"] = window + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[NX], src_dict: Dict[str, Any]) -> NX: + d = src_dict.copy() + type = d.pop("type", UNSET) - @classmethod - def from_dict(cls: Type[NX], src_dict: Dict[str, Any]) -> NX: - d = src_dict.copy() - type = d.pop("type", UNSET) + _window = d.pop("window", UNSET) + window: Union[Unset, Point2d] + if isinstance(_window, Unset): + window = UNSET + else: + window = _window # type: ignore[arg-type] - _window = d.pop("window", UNSET) - window: Union[Unset, Point2d] - if isinstance(_window, Unset): - window = UNSET - else: - window = _window # type: ignore[arg-type] - handle_mouse_drag_end = cls( - type=type, - window=window, - ) + handle_mouse_drag_end = cls( + type= type, + window= window, + ) - handle_mouse_drag_end.additional_properties = d - return handle_mouse_drag_end + handle_mouse_drag_end.additional_properties = d + return handle_mouse_drag_end - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties SC = TypeVar("SC", bound="remove_scene_objects") - @attr.s(auto_attribs=True) class remove_scene_objects: - """Remove scene objects.""" # noqa: E501 + """ Remove scene objects. """ # noqa: E501 + object_ids: Union[Unset, List[str]] = UNSET + type: str = "remove_scene_objects" - object_ids: Union[Unset, List[str]] = UNSET - type: str = "remove_scene_objects" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + object_ids: Union[Unset, List[str]] = UNSET + if not isinstance(self.object_ids, Unset): + object_ids = self.object_ids + type = self.type - def to_dict(self) -> Dict[str, Any]: - object_ids: Union[Unset, List[str]] = UNSET - if not isinstance(self.object_ids, Unset): - object_ids = self.object_ids - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if object_ids is not UNSET: + field_dict['object_ids'] = object_ids + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if object_ids is not UNSET: - field_dict["object_ids"] = object_ids - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[SC], src_dict: Dict[str, Any]) -> SC: + d = src_dict.copy() + object_ids = cast(List[str], d.pop("object_ids", UNSET)) - @classmethod - def from_dict(cls: Type[SC], src_dict: Dict[str, Any]) -> SC: - d = src_dict.copy() - object_ids = cast(List[str], d.pop("object_ids", UNSET)) + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - remove_scene_objects = cls( - object_ids=object_ids, - type=type, - ) + remove_scene_objects = cls( + object_ids= object_ids, + type= type, + ) - remove_scene_objects.additional_properties = d - return remove_scene_objects + remove_scene_objects.additional_properties = d + return remove_scene_objects - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - 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="plane_intersect_and_project") - @attr.s(auto_attribs=True) class plane_intersect_and_project: - """Utility method. Performs both a ray cast and projection to plane-local coordinates. Returns the plane coordinates for the given window coordinates.""" # noqa: E501 + """ Utility method. Performs both a ray cast and projection to plane-local coordinates. Returns the plane coordinates for the given window coordinates. """ # noqa: E501 + plane_id: Union[Unset, str] = UNSET + type: str = "plane_intersect_and_project" + window: Union[Unset, Point2d] = UNSET - plane_id: Union[Unset, str] = UNSET - type: str = "plane_intersect_and_project" - window: Union[Unset, Point2d] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + plane_id = self.plane_id + type = self.type + if not isinstance(self.window, Unset): + window = self.window - def to_dict(self) -> Dict[str, Any]: - plane_id = self.plane_id - type = self.type - if not isinstance(self.window, Unset): - window = self.window + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if plane_id is not UNSET: + field_dict['plane_id'] = plane_id + field_dict['type'] = type + if window is not UNSET: + field_dict['window'] = window - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if plane_id is not UNSET: - field_dict["plane_id"] = plane_id - field_dict["type"] = type - if window is not UNSET: - field_dict["window"] = window + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[TX], src_dict: Dict[str, Any]) -> TX: + d = src_dict.copy() + plane_id = d.pop("plane_id", UNSET) - @classmethod - def from_dict(cls: Type[TX], src_dict: Dict[str, Any]) -> TX: - d = src_dict.copy() - plane_id = d.pop("plane_id", UNSET) + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) + _window = d.pop("window", UNSET) + window: Union[Unset, Point2d] + if isinstance(_window, Unset): + window = UNSET + else: + window = _window # type: ignore[arg-type] - _window = d.pop("window", UNSET) - window: Union[Unset, Point2d] - if isinstance(_window, Unset): - window = UNSET - else: - window = _window # type: ignore[arg-type] - plane_intersect_and_project = cls( - plane_id=plane_id, - type=type, - window=window, - ) + plane_intersect_and_project = cls( + plane_id= plane_id, + type= type, + window= window, + ) - plane_intersect_and_project.additional_properties = d - return plane_intersect_and_project + plane_intersect_and_project.additional_properties = d + return plane_intersect_and_project - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties JA = TypeVar("JA", bound="curve_get_end_points") - @attr.s(auto_attribs=True) class curve_get_end_points: - """Find the start and end of a curve.""" # noqa: E501 + """ Find the start and end of a curve. """ # noqa: E501 + curve_id: Union[Unset, str] = UNSET + type: str = "curve_get_end_points" - curve_id: Union[Unset, str] = UNSET - type: str = "curve_get_end_points" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + curve_id = self.curve_id + type = self.type - def to_dict(self) -> Dict[str, Any]: - curve_id = self.curve_id - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if curve_id is not UNSET: + field_dict['curve_id'] = curve_id + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if curve_id is not UNSET: - field_dict["curve_id"] = curve_id - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[JA], src_dict: Dict[str, Any]) -> JA: + d = src_dict.copy() + curve_id = d.pop("curve_id", UNSET) - @classmethod - def from_dict(cls: Type[JA], src_dict: Dict[str, Any]) -> JA: - d = src_dict.copy() - curve_id = d.pop("curve_id", UNSET) + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - curve_get_end_points = cls( - curve_id=curve_id, - type=type, - ) + curve_get_end_points = cls( + curve_id= curve_id, + type= type, + ) - curve_get_end_points.additional_properties = d - return curve_get_end_points + curve_get_end_points.additional_properties = d + return curve_get_end_points - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties SK = TypeVar("SK", bound="reconfigure_stream") - @attr.s(auto_attribs=True) class reconfigure_stream: - """Reconfigure the stream.""" # noqa: E501 + """ Reconfigure the stream. """ # noqa: E501 + fps: Union[Unset, int] = UNSET + height: Union[Unset, int] = UNSET + type: str = "reconfigure_stream" + width: Union[Unset, int] = UNSET - fps: Union[Unset, int] = UNSET - height: Union[Unset, int] = UNSET - type: str = "reconfigure_stream" - width: Union[Unset, int] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + fps = self.fps + height = self.height + type = self.type + width = self.width - def to_dict(self) -> Dict[str, Any]: - fps = self.fps - height = self.height - type = self.type - width = self.width + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if fps is not UNSET: + field_dict['fps'] = fps + if height is not UNSET: + field_dict['height'] = height + field_dict['type'] = type + if width is not UNSET: + field_dict['width'] = width - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if fps is not UNSET: - field_dict["fps"] = fps - if height is not UNSET: - field_dict["height"] = height - field_dict["type"] = type - if width is not UNSET: - field_dict["width"] = width + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[SK], src_dict: Dict[str, Any]) -> SK: + d = src_dict.copy() + fps = d.pop("fps", UNSET) - @classmethod - def from_dict(cls: Type[SK], src_dict: Dict[str, Any]) -> SK: - d = src_dict.copy() - fps = d.pop("fps", UNSET) + height = d.pop("height", UNSET) - height = d.pop("height", UNSET) + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) + width = d.pop("width", UNSET) - width = d.pop("width", UNSET) - reconfigure_stream = cls( - fps=fps, - height=height, - type=type, - width=width, - ) + reconfigure_stream = cls( + fps= fps, + height= height, + type= type, + width= width, + ) - reconfigure_stream.additional_properties = d - return reconfigure_stream + reconfigure_stream.additional_properties = d + return reconfigure_stream - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties UK = TypeVar("UK", bound="import_files") - @attr.s(auto_attribs=True) class import_files: - """Import files to the current model.""" # noqa: E501 + """ Import files to the current model. """ # noqa: E501 + from ..models.import_file import ImportFile + files: Union[Unset, List[ImportFile]] = UNSET + type: str = "import_files" - from ..models.import_file import ImportFile + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - files: Union[Unset, List[ImportFile]] = UNSET - type: str = "import_files" + def to_dict(self) -> Dict[str, Any]: + from ..models.import_file import ImportFile + files: Union[Unset, List[ImportFile]] = UNSET + if not isinstance(self.files, Unset): + files = self.files + type = self.type - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if files is not UNSET: + field_dict['files'] = files + field_dict['type'] = type - def to_dict(self) -> Dict[str, Any]: - from ..models.import_file import ImportFile + return field_dict - files: Union[Unset, List[ImportFile]] = UNSET - if not isinstance(self.files, Unset): - files = self.files - type = self.type + @classmethod + def from_dict(cls: Type[UK], src_dict: Dict[str, Any]) -> UK: + d = src_dict.copy() + from ..models.import_file import ImportFile + files = cast(List[ImportFile], d.pop("files", UNSET)) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if files is not UNSET: - field_dict["files"] = files - field_dict["type"] = type + type = d.pop("type", UNSET) - return field_dict - @classmethod - def from_dict(cls: Type[UK], src_dict: Dict[str, Any]) -> UK: - d = src_dict.copy() - from ..models.import_file import ImportFile + import_files = cls( + files= files, + type= type, + ) - files = cast(List[ImportFile], d.pop("files", UNSET)) + import_files.additional_properties = d + return import_files - type = d.pop("type", UNSET) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - import_files = cls( - files=files, - type=type, - ) + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - import_files.additional_properties = d - return import_files + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties CX = TypeVar("CX", bound="mass") - @attr.s(auto_attribs=True) class mass: - """Get the mass of entities in the scene or the default scene.""" # noqa: E501 + """ Get the mass of entities in the scene or the default scene. """ # noqa: E501 + entity_ids: Union[Unset, List[str]] = UNSET + material_density: Union[Unset, float] = UNSET + material_density_unit: Union[Unset, UnitDensity] = UNSET + output_unit: Union[Unset, UnitMass] = UNSET + source_unit: Union[Unset, UnitLength] = UNSET + type: str = "mass" - entity_ids: Union[Unset, List[str]] = UNSET - material_density: Union[Unset, float] = UNSET - material_density_unit: Union[Unset, UnitDensity] = UNSET - output_unit: Union[Unset, UnitMass] = UNSET - source_unit: Union[Unset, UnitLength] = UNSET - type: str = "mass" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + entity_ids: Union[Unset, List[str]] = UNSET + if not isinstance(self.entity_ids, Unset): + entity_ids = self.entity_ids + material_density = self.material_density + if not isinstance(self.material_density_unit, Unset): + material_density_unit = self.material_density_unit + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + if not isinstance(self.source_unit, Unset): + source_unit = self.source_unit + type = self.type - def to_dict(self) -> Dict[str, Any]: - entity_ids: Union[Unset, List[str]] = UNSET - if not isinstance(self.entity_ids, Unset): - entity_ids = self.entity_ids - material_density = self.material_density - if not isinstance(self.material_density_unit, Unset): - material_density_unit = self.material_density_unit - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - if not isinstance(self.source_unit, Unset): - source_unit = self.source_unit - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entity_ids is not UNSET: + field_dict['entity_ids'] = entity_ids + if material_density is not UNSET: + field_dict['material_density'] = material_density + if material_density_unit is not UNSET: + field_dict['material_density_unit'] = material_density_unit + if output_unit is not UNSET: + field_dict['output_unit'] = output_unit + if source_unit is not UNSET: + field_dict['source_unit'] = source_unit + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if entity_ids is not UNSET: - field_dict["entity_ids"] = entity_ids - if material_density is not UNSET: - field_dict["material_density"] = material_density - if material_density_unit is not UNSET: - field_dict["material_density_unit"] = material_density_unit - if output_unit is not UNSET: - field_dict["output_unit"] = output_unit - if source_unit is not UNSET: - field_dict["source_unit"] = source_unit - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[CX], src_dict: Dict[str, Any]) -> CX: + d = src_dict.copy() + entity_ids = cast(List[str], d.pop("entity_ids", UNSET)) - @classmethod - def from_dict(cls: Type[CX], src_dict: Dict[str, Any]) -> CX: - d = src_dict.copy() - entity_ids = cast(List[str], d.pop("entity_ids", UNSET)) + material_density = d.pop("material_density", UNSET) - material_density = d.pop("material_density", UNSET) + _material_density_unit = d.pop("material_density_unit", UNSET) + material_density_unit: Union[Unset, UnitDensity] + if isinstance(_material_density_unit, Unset): + material_density_unit = UNSET + else: + material_density_unit = _material_density_unit # type: ignore[arg-type] - _material_density_unit = d.pop("material_density_unit", UNSET) - material_density_unit: Union[Unset, UnitDensity] - if isinstance(_material_density_unit, Unset): - material_density_unit = UNSET - else: - material_density_unit = _material_density_unit # type: ignore[arg-type] + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitMass] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitMass] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] + _source_unit = d.pop("source_unit", UNSET) + source_unit: Union[Unset, UnitLength] + if isinstance(_source_unit, Unset): + source_unit = UNSET + else: + source_unit = _source_unit # type: ignore[arg-type] - _source_unit = d.pop("source_unit", UNSET) - source_unit: Union[Unset, UnitLength] - if isinstance(_source_unit, Unset): - source_unit = UNSET - else: - source_unit = _source_unit # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - mass = cls( - entity_ids=entity_ids, - material_density=material_density, - material_density_unit=material_density_unit, - output_unit=output_unit, - source_unit=source_unit, - type=type, - ) + mass = cls( + entity_ids= entity_ids, + material_density= material_density, + material_density_unit= material_density_unit, + output_unit= output_unit, + source_unit= source_unit, + type= type, + ) - mass.additional_properties = d - return mass + mass.additional_properties = d + return mass - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties MT = TypeVar("MT", bound="density") - @attr.s(auto_attribs=True) class density: - """Get the density of entities in the scene or the default scene.""" # noqa: E501 + """ Get the density of entities in the scene or the default scene. """ # noqa: E501 + entity_ids: Union[Unset, List[str]] = UNSET + material_mass: Union[Unset, float] = UNSET + material_mass_unit: Union[Unset, UnitMass] = UNSET + output_unit: Union[Unset, UnitDensity] = UNSET + source_unit: Union[Unset, UnitLength] = UNSET + type: str = "density" - entity_ids: Union[Unset, List[str]] = UNSET - material_mass: Union[Unset, float] = UNSET - material_mass_unit: Union[Unset, UnitMass] = UNSET - output_unit: Union[Unset, UnitDensity] = UNSET - source_unit: Union[Unset, UnitLength] = UNSET - type: str = "density" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + entity_ids: Union[Unset, List[str]] = UNSET + if not isinstance(self.entity_ids, Unset): + entity_ids = self.entity_ids + material_mass = self.material_mass + if not isinstance(self.material_mass_unit, Unset): + material_mass_unit = self.material_mass_unit + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + if not isinstance(self.source_unit, Unset): + source_unit = self.source_unit + type = self.type - def to_dict(self) -> Dict[str, Any]: - entity_ids: Union[Unset, List[str]] = UNSET - if not isinstance(self.entity_ids, Unset): - entity_ids = self.entity_ids - material_mass = self.material_mass - if not isinstance(self.material_mass_unit, Unset): - material_mass_unit = self.material_mass_unit - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - if not isinstance(self.source_unit, Unset): - source_unit = self.source_unit - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entity_ids is not UNSET: + field_dict['entity_ids'] = entity_ids + if material_mass is not UNSET: + field_dict['material_mass'] = material_mass + if material_mass_unit is not UNSET: + field_dict['material_mass_unit'] = material_mass_unit + if output_unit is not UNSET: + field_dict['output_unit'] = output_unit + if source_unit is not UNSET: + field_dict['source_unit'] = source_unit + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if entity_ids is not UNSET: - field_dict["entity_ids"] = entity_ids - if material_mass is not UNSET: - field_dict["material_mass"] = material_mass - if material_mass_unit is not UNSET: - field_dict["material_mass_unit"] = material_mass_unit - if output_unit is not UNSET: - field_dict["output_unit"] = output_unit - if source_unit is not UNSET: - field_dict["source_unit"] = source_unit - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[MT], src_dict: Dict[str, Any]) -> MT: + d = src_dict.copy() + entity_ids = cast(List[str], d.pop("entity_ids", UNSET)) - @classmethod - def from_dict(cls: Type[MT], src_dict: Dict[str, Any]) -> MT: - d = src_dict.copy() - entity_ids = cast(List[str], d.pop("entity_ids", UNSET)) + material_mass = d.pop("material_mass", UNSET) - material_mass = d.pop("material_mass", UNSET) + _material_mass_unit = d.pop("material_mass_unit", UNSET) + material_mass_unit: Union[Unset, UnitMass] + if isinstance(_material_mass_unit, Unset): + material_mass_unit = UNSET + else: + material_mass_unit = _material_mass_unit # type: ignore[arg-type] - _material_mass_unit = d.pop("material_mass_unit", UNSET) - material_mass_unit: Union[Unset, UnitMass] - if isinstance(_material_mass_unit, Unset): - material_mass_unit = UNSET - else: - material_mass_unit = _material_mass_unit # type: ignore[arg-type] + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitDensity] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitDensity] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] + _source_unit = d.pop("source_unit", UNSET) + source_unit: Union[Unset, UnitLength] + if isinstance(_source_unit, Unset): + source_unit = UNSET + else: + source_unit = _source_unit # type: ignore[arg-type] - _source_unit = d.pop("source_unit", UNSET) - source_unit: Union[Unset, UnitLength] - if isinstance(_source_unit, Unset): - source_unit = UNSET - else: - source_unit = _source_unit # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - density = cls( - entity_ids=entity_ids, - material_mass=material_mass, - material_mass_unit=material_mass_unit, - output_unit=output_unit, - source_unit=source_unit, - type=type, - ) + density = cls( + entity_ids= entity_ids, + material_mass= material_mass, + material_mass_unit= material_mass_unit, + output_unit= output_unit, + source_unit= source_unit, + type= type, + ) - density.additional_properties = d - return density + density.additional_properties = d + return density - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties LJ = TypeVar("LJ", bound="volume") - @attr.s(auto_attribs=True) class volume: - """Get the volume of entities in the scene or the default scene.""" # noqa: E501 + """ Get the volume of entities in the scene or the default scene. """ # noqa: E501 + entity_ids: Union[Unset, List[str]] = UNSET + output_unit: Union[Unset, UnitVolume] = UNSET + source_unit: Union[Unset, UnitLength] = UNSET + type: str = "volume" - entity_ids: Union[Unset, List[str]] = UNSET - output_unit: Union[Unset, UnitVolume] = UNSET - source_unit: Union[Unset, UnitLength] = UNSET - type: str = "volume" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + entity_ids: Union[Unset, List[str]] = UNSET + if not isinstance(self.entity_ids, Unset): + entity_ids = self.entity_ids + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + if not isinstance(self.source_unit, Unset): + source_unit = self.source_unit + type = self.type - def to_dict(self) -> Dict[str, Any]: - entity_ids: Union[Unset, List[str]] = UNSET - if not isinstance(self.entity_ids, Unset): - entity_ids = self.entity_ids - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - if not isinstance(self.source_unit, Unset): - source_unit = self.source_unit - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entity_ids is not UNSET: + field_dict['entity_ids'] = entity_ids + if output_unit is not UNSET: + field_dict['output_unit'] = output_unit + if source_unit is not UNSET: + field_dict['source_unit'] = source_unit + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if entity_ids is not UNSET: - field_dict["entity_ids"] = entity_ids - if output_unit is not UNSET: - field_dict["output_unit"] = output_unit - if source_unit is not UNSET: - field_dict["source_unit"] = source_unit - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[LJ], src_dict: Dict[str, Any]) -> LJ: + d = src_dict.copy() + entity_ids = cast(List[str], d.pop("entity_ids", UNSET)) - @classmethod - def from_dict(cls: Type[LJ], src_dict: Dict[str, Any]) -> LJ: - d = src_dict.copy() - entity_ids = cast(List[str], d.pop("entity_ids", UNSET)) + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitVolume] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitVolume] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] + _source_unit = d.pop("source_unit", UNSET) + source_unit: Union[Unset, UnitLength] + if isinstance(_source_unit, Unset): + source_unit = UNSET + else: + source_unit = _source_unit # type: ignore[arg-type] - _source_unit = d.pop("source_unit", UNSET) - source_unit: Union[Unset, UnitLength] - if isinstance(_source_unit, Unset): - source_unit = UNSET - else: - source_unit = _source_unit # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - volume = cls( - entity_ids=entity_ids, - output_unit=output_unit, - source_unit=source_unit, - type=type, - ) + volume = cls( + entity_ids= entity_ids, + output_unit= output_unit, + source_unit= source_unit, + type= type, + ) - volume.additional_properties = d - return volume + volume.additional_properties = d + return volume - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties TF = TypeVar("TF", bound="center_of_mass") - @attr.s(auto_attribs=True) class center_of_mass: - """Get the center of mass of entities in the scene or the default scene.""" # noqa: E501 + """ Get the center of mass of entities in the scene or the default scene. """ # noqa: E501 + entity_ids: Union[Unset, List[str]] = UNSET + output_unit: Union[Unset, UnitLength] = UNSET + source_unit: Union[Unset, UnitLength] = UNSET + type: str = "center_of_mass" - entity_ids: Union[Unset, List[str]] = UNSET - output_unit: Union[Unset, UnitLength] = UNSET - source_unit: Union[Unset, UnitLength] = UNSET - type: str = "center_of_mass" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + entity_ids: Union[Unset, List[str]] = UNSET + if not isinstance(self.entity_ids, Unset): + entity_ids = self.entity_ids + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + if not isinstance(self.source_unit, Unset): + source_unit = self.source_unit + type = self.type - def to_dict(self) -> Dict[str, Any]: - entity_ids: Union[Unset, List[str]] = UNSET - if not isinstance(self.entity_ids, Unset): - entity_ids = self.entity_ids - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - if not isinstance(self.source_unit, Unset): - source_unit = self.source_unit - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entity_ids is not UNSET: + field_dict['entity_ids'] = entity_ids + if output_unit is not UNSET: + field_dict['output_unit'] = output_unit + if source_unit is not UNSET: + field_dict['source_unit'] = source_unit + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if entity_ids is not UNSET: - field_dict["entity_ids"] = entity_ids - if output_unit is not UNSET: - field_dict["output_unit"] = output_unit - if source_unit is not UNSET: - field_dict["source_unit"] = source_unit - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[TF], src_dict: Dict[str, Any]) -> TF: + d = src_dict.copy() + entity_ids = cast(List[str], d.pop("entity_ids", UNSET)) - @classmethod - def from_dict(cls: Type[TF], src_dict: Dict[str, Any]) -> TF: - d = src_dict.copy() - entity_ids = cast(List[str], d.pop("entity_ids", UNSET)) + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitLength] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitLength] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] + _source_unit = d.pop("source_unit", UNSET) + source_unit: Union[Unset, UnitLength] + if isinstance(_source_unit, Unset): + source_unit = UNSET + else: + source_unit = _source_unit # type: ignore[arg-type] - _source_unit = d.pop("source_unit", UNSET) - source_unit: Union[Unset, UnitLength] - if isinstance(_source_unit, Unset): - source_unit = UNSET - else: - source_unit = _source_unit # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - center_of_mass = cls( - entity_ids=entity_ids, - output_unit=output_unit, - source_unit=source_unit, - type=type, - ) + center_of_mass = cls( + entity_ids= entity_ids, + output_unit= output_unit, + source_unit= source_unit, + type= type, + ) - center_of_mass.additional_properties = d - return center_of_mass + center_of_mass.additional_properties = d + return center_of_mass - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties HF = TypeVar("HF", bound="surface_area") - @attr.s(auto_attribs=True) class surface_area: - """Get the surface area of entities in the scene or the default scene.""" # noqa: E501 + """ Get the surface area of entities in the scene or the default scene. """ # noqa: E501 + entity_ids: Union[Unset, List[str]] = UNSET + output_unit: Union[Unset, UnitArea] = UNSET + source_unit: Union[Unset, UnitLength] = UNSET + type: str = "surface_area" - entity_ids: Union[Unset, List[str]] = UNSET - output_unit: Union[Unset, UnitArea] = UNSET - source_unit: Union[Unset, UnitLength] = UNSET - type: str = "surface_area" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + entity_ids: Union[Unset, List[str]] = UNSET + if not isinstance(self.entity_ids, Unset): + entity_ids = self.entity_ids + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + if not isinstance(self.source_unit, Unset): + source_unit = self.source_unit + type = self.type - def to_dict(self) -> Dict[str, Any]: - entity_ids: Union[Unset, List[str]] = UNSET - if not isinstance(self.entity_ids, Unset): - entity_ids = self.entity_ids - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - if not isinstance(self.source_unit, Unset): - source_unit = self.source_unit - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entity_ids is not UNSET: + field_dict['entity_ids'] = entity_ids + if output_unit is not UNSET: + field_dict['output_unit'] = output_unit + if source_unit is not UNSET: + field_dict['source_unit'] = source_unit + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if entity_ids is not UNSET: - field_dict["entity_ids"] = entity_ids - if output_unit is not UNSET: - field_dict["output_unit"] = output_unit - if source_unit is not UNSET: - field_dict["source_unit"] = source_unit - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[HF], src_dict: Dict[str, Any]) -> HF: + d = src_dict.copy() + entity_ids = cast(List[str], d.pop("entity_ids", UNSET)) - @classmethod - def from_dict(cls: Type[HF], src_dict: Dict[str, Any]) -> HF: - d = src_dict.copy() - entity_ids = cast(List[str], d.pop("entity_ids", UNSET)) + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitArea] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitArea] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] + _source_unit = d.pop("source_unit", UNSET) + source_unit: Union[Unset, UnitLength] + if isinstance(_source_unit, Unset): + source_unit = UNSET + else: + source_unit = _source_unit # type: ignore[arg-type] - _source_unit = d.pop("source_unit", UNSET) - source_unit: Union[Unset, UnitLength] - if isinstance(_source_unit, Unset): - source_unit = UNSET - else: - source_unit = _source_unit # type: ignore[arg-type] - - type = d.pop("type", UNSET) - - surface_area = cls( - entity_ids=entity_ids, - output_unit=output_unit, - source_unit=source_unit, - type=type, - ) - - surface_area.additional_properties = d - return surface_area - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + type = d.pop("type", UNSET) -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, - 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, -] + surface_area = cls( + entity_ids= entity_ids, + output_unit= output_unit, + source_unit= source_unit, + type= type, + ) + + surface_area.additional_properties = d + return surface_area + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + +ModelingCmd = Union[start_path, move_path_pen, 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, 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] diff --git a/kittycad/models/modeling_cmd_id.py b/kittycad/models/modeling_cmd_id.py index a2fce8cff..cbe28ffc8 100644 --- a/kittycad/models/modeling_cmd_id.py +++ b/kittycad/models/modeling_cmd_id.py @@ -1,3 +1,4 @@ class ModelingCmdId(str): - def __str__(self) -> str: - return self + + def __str__(self) -> str: + return self diff --git a/kittycad/models/mouse_click.py b/kittycad/models/mouse_click.py index e7d6f2f03..e54909e32 100644 --- a/kittycad/models/mouse_click.py +++ b/kittycad/models/mouse_click.py @@ -6,61 +6,60 @@ from ..types import UNSET, Unset JD = TypeVar("JD", bound="MouseClick") - @attr.s(auto_attribs=True) class MouseClick: - """The response from the `MouseClick` command.""" # noqa: E501 + """ The response from the `MouseClick` command. """ # noqa: E501 + entities_modified: Union[Unset, List[str]] = UNSET + entities_selected: Union[Unset, List[str]] = UNSET - entities_modified: Union[Unset, List[str]] = UNSET - entities_selected: Union[Unset, List[str]] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + entities_modified: Union[Unset, List[str]] = UNSET + if not isinstance(self.entities_modified, Unset): + entities_modified = self.entities_modified + entities_selected: Union[Unset, List[str]] = UNSET + if not isinstance(self.entities_selected, Unset): + entities_selected = self.entities_selected - def to_dict(self) -> Dict[str, Any]: - entities_modified: Union[Unset, List[str]] = UNSET - if not isinstance(self.entities_modified, Unset): - entities_modified = self.entities_modified - entities_selected: Union[Unset, List[str]] = UNSET - if not isinstance(self.entities_selected, Unset): - entities_selected = self.entities_selected + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entities_modified is not UNSET: + field_dict['entities_modified'] = entities_modified + if entities_selected is not UNSET: + field_dict['entities_selected'] = entities_selected - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if entities_modified is not UNSET: - field_dict["entities_modified"] = entities_modified - if entities_selected is not UNSET: - field_dict["entities_selected"] = entities_selected + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[JD], src_dict: Dict[str, Any]) -> JD: + d = src_dict.copy() + entities_modified = cast(List[str], d.pop("entities_modified", UNSET)) - @classmethod - def from_dict(cls: Type[JD], src_dict: Dict[str, Any]) -> JD: - d = src_dict.copy() - entities_modified = cast(List[str], d.pop("entities_modified", UNSET)) + entities_selected = cast(List[str], d.pop("entities_selected", UNSET)) - entities_selected = cast(List[str], d.pop("entities_selected", UNSET)) - mouse_click = cls( - entities_modified=entities_modified, - entities_selected=entities_selected, - ) + mouse_click = cls( + entities_modified= entities_modified, + entities_selected= entities_selected, + ) - mouse_click.additional_properties = d - return mouse_click + mouse_click.additional_properties = d + return mouse_click - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/new_address.py b/kittycad/models/new_address.py index 44e77d465..c88d47510 100644 --- a/kittycad/models/new_address.py +++ b/kittycad/models/new_address.py @@ -7,98 +7,97 @@ from ..types import UNSET, Unset RZ = TypeVar("RZ", bound="NewAddress") - @attr.s(auto_attribs=True) class NewAddress: - """The struct that is used to create a new record. This is automatically generated and has all the same fields as the main struct only it is missing the `id`.""" # noqa: E501 + """ The struct that is used to create a new record. This is automatically generated and has all the same fields as the main struct only it is missing the `id`. """ # noqa: E501 + city: Union[Unset, str] = UNSET + country: Union[Unset, CountryCode] = UNSET + state: Union[Unset, str] = UNSET + street1: Union[Unset, str] = UNSET + street2: Union[Unset, str] = UNSET + user_id: Union[Unset, str] = UNSET + zip: Union[Unset, str] = UNSET - city: Union[Unset, str] = UNSET - country: Union[Unset, CountryCode] = UNSET - state: Union[Unset, str] = UNSET - street1: Union[Unset, str] = UNSET - street2: Union[Unset, str] = UNSET - user_id: Union[Unset, str] = UNSET - zip: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + city = self.city + if not isinstance(self.country, Unset): + country = self.country + state = self.state + street1 = self.street1 + street2 = self.street2 + user_id = self.user_id + zip = self.zip - def to_dict(self) -> Dict[str, Any]: - city = self.city - if not isinstance(self.country, Unset): - country = self.country - state = self.state - street1 = self.street1 - street2 = self.street2 - user_id = self.user_id - zip = self.zip + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if city is not UNSET: + field_dict['city'] = city + if country is not UNSET: + field_dict['country'] = country + if state is not UNSET: + field_dict['state'] = state + if street1 is not UNSET: + field_dict['street1'] = street1 + if street2 is not UNSET: + field_dict['street2'] = street2 + if user_id is not UNSET: + field_dict['user_id'] = user_id + if zip is not UNSET: + field_dict['zip'] = zip - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if city is not UNSET: - field_dict["city"] = city - if country is not UNSET: - field_dict["country"] = country - if state is not UNSET: - field_dict["state"] = state - if street1 is not UNSET: - field_dict["street1"] = street1 - if street2 is not UNSET: - field_dict["street2"] = street2 - if user_id is not UNSET: - field_dict["user_id"] = user_id - if zip is not UNSET: - field_dict["zip"] = zip + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[RZ], src_dict: Dict[str, Any]) -> RZ: + d = src_dict.copy() + city = d.pop("city", UNSET) - @classmethod - def from_dict(cls: Type[RZ], src_dict: Dict[str, Any]) -> RZ: - d = src_dict.copy() - city = d.pop("city", UNSET) + _country = d.pop("country", UNSET) + country: Union[Unset, CountryCode] + if isinstance(_country, Unset): + country = UNSET + else: + country = _country # type: ignore[arg-type] - _country = d.pop("country", UNSET) - country: Union[Unset, CountryCode] - if isinstance(_country, Unset): - country = UNSET - else: - country = _country # type: ignore[arg-type] + state = d.pop("state", UNSET) - state = d.pop("state", UNSET) + street1 = d.pop("street1", UNSET) - street1 = d.pop("street1", UNSET) + street2 = d.pop("street2", UNSET) - street2 = d.pop("street2", UNSET) + user_id = d.pop("user_id", UNSET) - user_id = d.pop("user_id", UNSET) + zip = d.pop("zip", UNSET) - zip = d.pop("zip", UNSET) - new_address = cls( - city=city, - country=country, - state=state, - street1=street1, - street2=street2, - user_id=user_id, - zip=zip, - ) + new_address = cls( + city= city, + country= country, + state= state, + street1= street1, + street2= street2, + user_id= user_id, + zip= zip, + ) - new_address.additional_properties = d - return new_address + new_address.additional_properties = d + return new_address - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/o_auth2_client_info.py b/kittycad/models/o_auth2_client_info.py index e6096215c..2d69f24c2 100644 --- a/kittycad/models/o_auth2_client_info.py +++ b/kittycad/models/o_auth2_client_info.py @@ -6,64 +6,63 @@ from ..types import UNSET, Unset BH = TypeVar("BH", bound="OAuth2ClientInfo") - @attr.s(auto_attribs=True) class OAuth2ClientInfo: - """Information about an OAuth 2.0 client.""" # noqa: E501 + """ Information about an OAuth 2.0 client. """ # noqa: E501 + csrf_token: Union[Unset, str] = UNSET + pkce_code_verifier: Union[Unset, str] = UNSET + url: Union[Unset, str] = UNSET - csrf_token: Union[Unset, str] = UNSET - pkce_code_verifier: Union[Unset, str] = UNSET - url: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + csrf_token = self.csrf_token + pkce_code_verifier = self.pkce_code_verifier + url = self.url - def to_dict(self) -> Dict[str, Any]: - csrf_token = self.csrf_token - pkce_code_verifier = self.pkce_code_verifier - url = self.url + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if csrf_token is not UNSET: + field_dict['csrf_token'] = csrf_token + if pkce_code_verifier is not UNSET: + field_dict['pkce_code_verifier'] = pkce_code_verifier + if url is not UNSET: + field_dict['url'] = url - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if csrf_token is not UNSET: - field_dict["csrf_token"] = csrf_token - if pkce_code_verifier is not UNSET: - field_dict["pkce_code_verifier"] = pkce_code_verifier - if url is not UNSET: - field_dict["url"] = url + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[BH], src_dict: Dict[str, Any]) -> BH: + d = src_dict.copy() + csrf_token = d.pop("csrf_token", UNSET) - @classmethod - def from_dict(cls: Type[BH], src_dict: Dict[str, Any]) -> BH: - d = src_dict.copy() - csrf_token = d.pop("csrf_token", UNSET) + pkce_code_verifier = d.pop("pkce_code_verifier", UNSET) - pkce_code_verifier = d.pop("pkce_code_verifier", UNSET) + url = d.pop("url", UNSET) - url = d.pop("url", UNSET) - o_auth2_client_info = cls( - csrf_token=csrf_token, - pkce_code_verifier=pkce_code_verifier, - url=url, - ) + o_auth2_client_info = cls( + csrf_token= csrf_token, + pkce_code_verifier= pkce_code_verifier, + url= url, + ) - o_auth2_client_info.additional_properties = d - return o_auth2_client_info + o_auth2_client_info.additional_properties = d + return o_auth2_client_info - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/o_auth2_grant_type.py b/kittycad/models/o_auth2_grant_type.py index 1ddeb3381..cf98a177f 100644 --- a/kittycad/models/o_auth2_grant_type.py +++ b/kittycad/models/o_auth2_grant_type.py @@ -2,12 +2,9 @@ from enum import Enum class OAuth2GrantType(str, Enum): - """An OAuth 2.0 Grant Type. These are documented here: .""" # noqa: E501 + """ An OAuth 2.0 Grant Type. These are documented here: . """ # noqa: E501 + """# An OAuth 2.0 Device Authorization Grant. """ # noqa: E501 + URN_IETF_PARAMS_OAUTH_GRANT_TYPE_DEVICE_CODE = 'urn:ietf:params:oauth:grant-type:device_code' - """# An OAuth 2.0 Device Authorization Grant. """ # noqa: E501 - URN_IETF_PARAMS_OAUTH_GRANT_TYPE_DEVICE_CODE = ( - "urn:ietf:params:oauth:grant-type:device_code" - ) - - def __str__(self) -> str: - return str(self.value) + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/ok_modeling_cmd_response.py b/kittycad/models/ok_modeling_cmd_response.py index f1f09a988..75ef4af51 100644 --- a/kittycad/models/ok_modeling_cmd_response.py +++ b/kittycad/models/ok_modeling_cmd_response.py @@ -34,1846 +34,1842 @@ from ..types import UNSET, Unset SX = TypeVar("SX", bound="empty") - @attr.s(auto_attribs=True) class empty: - """An empty response, used for any command that does not explicitly have a response defined here.""" # noqa: E501 + """ An empty response, used for any command that does not explicitly have a response defined here. """ # noqa: E501 + type: str = "empty" - type: str = "empty" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + type = self.type - def to_dict(self) -> Dict[str, Any]: - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[SX], src_dict: Dict[str, Any]) -> SX: + d = src_dict.copy() + type = d.pop("type", UNSET) - @classmethod - def from_dict(cls: Type[SX], src_dict: Dict[str, Any]) -> SX: - d = src_dict.copy() - type = d.pop("type", UNSET) - empty = cls( - type=type, - ) + empty = cls( + type= type, + ) - empty.additional_properties = d - return empty + empty.additional_properties = d + return empty - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties CN = TypeVar("CN", bound="export") - @attr.s(auto_attribs=True) class export: - """The response from the `Export` command. When this is being performed over a websocket, this is sent as binary not JSON. The binary data can be deserialized as `bincode` into a `Vec`.""" # noqa: E501 + """ The response from the `Export` command. When this is being performed over a websocket, this is sent as binary not JSON. The binary data can be deserialized as `bincode` into a `Vec`. """ # noqa: E501 + data: Union[Unset, Export] = UNSET + type: str = "export" - data: Union[Unset, Export] = UNSET - type: str = "export" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 - 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 - 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 - return field_dict + @classmethod + def from_dict(cls: Type[CN], src_dict: Dict[str, Any]) -> CN: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, Export] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[CN], src_dict: Dict[str, Any]) -> CN: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, Export] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - export = cls( - data=data, - type=type, - ) + export = cls( + data= data, + type= type, + ) - export.additional_properties = d - return export + export.additional_properties = d + return export - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties GS = TypeVar("GS", bound="select_with_point") - @attr.s(auto_attribs=True) class select_with_point: - """The response from the `SelectWithPoint` command.""" # noqa: E501 + """ The response from the `SelectWithPoint` command. """ # noqa: E501 + data: Union[Unset, SelectWithPoint] = UNSET + type: str = "select_with_point" - data: Union[Unset, SelectWithPoint] = UNSET - type: str = "select_with_point" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 - 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 - 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 - return field_dict + @classmethod + def from_dict(cls: Type[GS], src_dict: Dict[str, Any]) -> GS: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, SelectWithPoint] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[GS], src_dict: Dict[str, Any]) -> GS: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, SelectWithPoint] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - select_with_point = cls( - data=data, - type=type, - ) + select_with_point = cls( + data= data, + type= type, + ) - select_with_point.additional_properties = d - return select_with_point + select_with_point.additional_properties = d + return select_with_point - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties SO = TypeVar("SO", bound="highlight_set_entity") - @attr.s(auto_attribs=True) class highlight_set_entity: - """The response from the `HighlightSetEntity` command.""" # noqa: E501 + """ The response from the `HighlightSetEntity` command. """ # noqa: E501 + data: Union[Unset, HighlightSetEntity] = UNSET + type: str = "highlight_set_entity" - data: Union[Unset, HighlightSetEntity] = UNSET - type: str = "highlight_set_entity" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 - 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 - 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 - return field_dict + @classmethod + def from_dict(cls: Type[SO], src_dict: Dict[str, Any]) -> SO: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, HighlightSetEntity] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[SO], src_dict: Dict[str, Any]) -> SO: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, HighlightSetEntity] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - highlight_set_entity = cls( - data=data, - type=type, - ) + highlight_set_entity = cls( + data= data, + type= type, + ) - highlight_set_entity.additional_properties = d - return highlight_set_entity + highlight_set_entity.additional_properties = d + return highlight_set_entity - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties ZS = TypeVar("ZS", bound="entity_get_child_uuid") - @attr.s(auto_attribs=True) class entity_get_child_uuid: - """The response from the `EntityGetChildUuid` command.""" # noqa: E501 + """ The response from the `EntityGetChildUuid` command. """ # noqa: E501 + data: Union[Unset, EntityGetChildUuid] = UNSET + type: str = "entity_get_child_uuid" - data: Union[Unset, EntityGetChildUuid] = UNSET - type: str = "entity_get_child_uuid" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 - 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 - 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 - return field_dict + @classmethod + def from_dict(cls: Type[ZS], src_dict: Dict[str, Any]) -> ZS: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, EntityGetChildUuid] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[ZS], src_dict: Dict[str, Any]) -> ZS: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, EntityGetChildUuid] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - entity_get_child_uuid = cls( - data=data, - type=type, - ) + entity_get_child_uuid = cls( + data= data, + type= type, + ) - entity_get_child_uuid.additional_properties = d - return entity_get_child_uuid + entity_get_child_uuid.additional_properties = d + return entity_get_child_uuid - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties AM = TypeVar("AM", bound="entity_get_num_children") - @attr.s(auto_attribs=True) class entity_get_num_children: - """The response from the `EntityGetNumChildren` command.""" # noqa: E501 + """ The response from the `EntityGetNumChildren` command. """ # noqa: E501 + data: Union[Unset, EntityGetNumChildren] = UNSET + type: str = "entity_get_num_children" - data: Union[Unset, EntityGetNumChildren] = UNSET - type: str = "entity_get_num_children" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 - 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 - 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 - return field_dict + @classmethod + def from_dict(cls: Type[AM], src_dict: Dict[str, Any]) -> AM: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, EntityGetNumChildren] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[AM], src_dict: Dict[str, Any]) -> AM: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, EntityGetNumChildren] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - entity_get_num_children = cls( - data=data, - type=type, - ) + entity_get_num_children = cls( + data= data, + type= type, + ) - entity_get_num_children.additional_properties = d - return entity_get_num_children + entity_get_num_children.additional_properties = d + return entity_get_num_children - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties GK = TypeVar("GK", bound="entity_get_parent_id") - @attr.s(auto_attribs=True) class entity_get_parent_id: - """The response from the `EntityGetParentId` command.""" # noqa: E501 + """ The response from the `EntityGetParentId` command. """ # noqa: E501 + data: Union[Unset, EntityGetParentId] = UNSET + type: str = "entity_get_parent_id" - data: Union[Unset, EntityGetParentId] = UNSET - type: str = "entity_get_parent_id" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 - 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 - 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 - return field_dict + @classmethod + def from_dict(cls: Type[GK], src_dict: Dict[str, Any]) -> GK: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, EntityGetParentId] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[GK], src_dict: Dict[str, Any]) -> GK: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, EntityGetParentId] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - entity_get_parent_id = cls( - data=data, - type=type, - ) + entity_get_parent_id = cls( + data= data, + type= type, + ) - entity_get_parent_id.additional_properties = d - return entity_get_parent_id + entity_get_parent_id.additional_properties = d + return entity_get_parent_id - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties SG = TypeVar("SG", bound="entity_get_all_child_uuids") - @attr.s(auto_attribs=True) class entity_get_all_child_uuids: - """The response from the `EntityGetAllChildUuids` command.""" # noqa: E501 + """ The response from the `EntityGetAllChildUuids` command. """ # noqa: E501 + data: Union[Unset, EntityGetAllChildUuids] = UNSET + type: str = "entity_get_all_child_uuids" - data: Union[Unset, EntityGetAllChildUuids] = UNSET - type: str = "entity_get_all_child_uuids" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 - 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 - 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 - return field_dict + @classmethod + def from_dict(cls: Type[SG], src_dict: Dict[str, Any]) -> SG: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, EntityGetAllChildUuids] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[SG], src_dict: Dict[str, Any]) -> SG: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, EntityGetAllChildUuids] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - entity_get_all_child_uuids = cls( - data=data, - type=type, - ) + entity_get_all_child_uuids = cls( + data= data, + type= type, + ) - entity_get_all_child_uuids.additional_properties = d - return entity_get_all_child_uuids + entity_get_all_child_uuids.additional_properties = d + return entity_get_all_child_uuids - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties QZ = TypeVar("QZ", bound="select_get") - @attr.s(auto_attribs=True) class select_get: - """The response from the `SelectGet` command.""" # noqa: E501 + """ The response from the `SelectGet` command. """ # noqa: E501 + data: Union[Unset, SelectGet] = UNSET + type: str = "select_get" - data: Union[Unset, SelectGet] = UNSET - type: str = "select_get" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 - 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 - 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 - return field_dict + @classmethod + def from_dict(cls: Type[QZ], src_dict: Dict[str, Any]) -> QZ: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, SelectGet] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[QZ], src_dict: Dict[str, Any]) -> QZ: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, SelectGet] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - select_get = cls( - data=data, - type=type, - ) + select_get = cls( + data= data, + type= type, + ) - select_get.additional_properties = d - return select_get + select_get.additional_properties = d + return select_get - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties SY = TypeVar("SY", bound="get_entity_type") - @attr.s(auto_attribs=True) class get_entity_type: - """The response from the `GetEntityType` command.""" # noqa: E501 + """ The response from the `GetEntityType` command. """ # noqa: E501 + data: Union[Unset, GetEntityType] = UNSET + type: str = "get_entity_type" - data: Union[Unset, GetEntityType] = UNSET - type: str = "get_entity_type" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 - 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 - 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 - return field_dict + @classmethod + def from_dict(cls: Type[SY], src_dict: Dict[str, Any]) -> SY: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, GetEntityType] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[SY], src_dict: Dict[str, Any]) -> SY: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, GetEntityType] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - get_entity_type = cls( - data=data, - type=type, - ) + get_entity_type = cls( + data= data, + type= type, + ) - get_entity_type.additional_properties = d - return get_entity_type + get_entity_type.additional_properties = d + return get_entity_type - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties YK = TypeVar("YK", bound="solid3d_get_all_edge_faces") - @attr.s(auto_attribs=True) class solid3d_get_all_edge_faces: - """The response from the `Solid3dGetAllEdgeFaces` command.""" # noqa: E501 + """ The response from the `Solid3dGetAllEdgeFaces` command. """ # noqa: E501 + data: Union[Unset, Solid3dGetAllEdgeFaces] = UNSET + type: str = "solid3d_get_all_edge_faces" - data: Union[Unset, Solid3dGetAllEdgeFaces] = UNSET - type: str = "solid3d_get_all_edge_faces" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 - 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 - 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 - return field_dict + @classmethod + def from_dict(cls: Type[YK], src_dict: Dict[str, Any]) -> YK: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, Solid3dGetAllEdgeFaces] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[YK], src_dict: Dict[str, Any]) -> YK: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, Solid3dGetAllEdgeFaces] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - solid3d_get_all_edge_faces = cls( - data=data, - type=type, - ) + solid3d_get_all_edge_faces = cls( + data= data, + type= type, + ) - solid3d_get_all_edge_faces.additional_properties = d - return solid3d_get_all_edge_faces + solid3d_get_all_edge_faces.additional_properties = d + return solid3d_get_all_edge_faces - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties WS = TypeVar("WS", bound="solid3d_get_all_opposite_edges") - @attr.s(auto_attribs=True) class solid3d_get_all_opposite_edges: - """The response from the `Solid3dGetAllOppositeEdges` command.""" # noqa: E501 + """ The response from the `Solid3dGetAllOppositeEdges` command. """ # noqa: E501 + data: Union[Unset, Solid3dGetAllOppositeEdges] = UNSET + type: str = "solid3d_get_all_opposite_edges" - data: Union[Unset, Solid3dGetAllOppositeEdges] = UNSET - type: str = "solid3d_get_all_opposite_edges" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 - 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 - 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 - return field_dict + @classmethod + def from_dict(cls: Type[WS], src_dict: Dict[str, Any]) -> WS: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, Solid3dGetAllOppositeEdges] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[WS], src_dict: Dict[str, Any]) -> WS: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, Solid3dGetAllOppositeEdges] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - solid3d_get_all_opposite_edges = cls( - data=data, - type=type, - ) + solid3d_get_all_opposite_edges = cls( + data= data, + type= type, + ) - solid3d_get_all_opposite_edges.additional_properties = d - return solid3d_get_all_opposite_edges + solid3d_get_all_opposite_edges.additional_properties = d + return solid3d_get_all_opposite_edges - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties SL = TypeVar("SL", bound="solid3d_get_opposite_edge") - @attr.s(auto_attribs=True) class solid3d_get_opposite_edge: - """The response from the `Solid3dGetOppositeEdge` command.""" # noqa: E501 + """ The response from the `Solid3dGetOppositeEdge` command. """ # noqa: E501 + data: Union[Unset, Solid3dGetOppositeEdge] = UNSET + type: str = "solid3d_get_opposite_edge" - data: Union[Unset, Solid3dGetOppositeEdge] = UNSET - type: str = "solid3d_get_opposite_edge" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 - 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 - 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 - return field_dict + @classmethod + def from_dict(cls: Type[SL], src_dict: Dict[str, Any]) -> SL: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, Solid3dGetOppositeEdge] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[SL], src_dict: Dict[str, Any]) -> SL: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, Solid3dGetOppositeEdge] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - solid3d_get_opposite_edge = cls( - data=data, - type=type, - ) + solid3d_get_opposite_edge = cls( + data= data, + type= type, + ) - solid3d_get_opposite_edge.additional_properties = d - return solid3d_get_opposite_edge + solid3d_get_opposite_edge.additional_properties = d + return solid3d_get_opposite_edge - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties MK = TypeVar("MK", bound="solid3d_get_prev_adjacent_edge") - @attr.s(auto_attribs=True) class solid3d_get_prev_adjacent_edge: - """The response from the `Solid3dGetPrevAdjacentEdge` command.""" # noqa: E501 + """ The response from the `Solid3dGetPrevAdjacentEdge` command. """ # noqa: E501 + data: Union[Unset, Solid3dGetPrevAdjacentEdge] = UNSET + type: str = "solid3d_get_prev_adjacent_edge" - data: Union[Unset, Solid3dGetPrevAdjacentEdge] = UNSET - type: str = "solid3d_get_prev_adjacent_edge" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 - 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 - 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 - return field_dict + @classmethod + def from_dict(cls: Type[MK], src_dict: Dict[str, Any]) -> MK: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, Solid3dGetPrevAdjacentEdge] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[MK], src_dict: Dict[str, Any]) -> MK: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, Solid3dGetPrevAdjacentEdge] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - solid3d_get_prev_adjacent_edge = cls( - data=data, - type=type, - ) + solid3d_get_prev_adjacent_edge = cls( + data= data, + type= type, + ) - solid3d_get_prev_adjacent_edge.additional_properties = d - return solid3d_get_prev_adjacent_edge + solid3d_get_prev_adjacent_edge.additional_properties = d + return solid3d_get_prev_adjacent_edge - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties TU = TypeVar("TU", bound="solid3d_get_next_adjacent_edge") - @attr.s(auto_attribs=True) class solid3d_get_next_adjacent_edge: - """The response from the `Solid3dGetNextAdjacentEdge` command.""" # noqa: E501 + """ The response from the `Solid3dGetNextAdjacentEdge` command. """ # noqa: E501 + data: Union[Unset, Solid3dGetNextAdjacentEdge] = UNSET + type: str = "solid3d_get_next_adjacent_edge" - data: Union[Unset, Solid3dGetNextAdjacentEdge] = UNSET - type: str = "solid3d_get_next_adjacent_edge" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 - 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 - 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 - return field_dict + @classmethod + def from_dict(cls: Type[TU], src_dict: Dict[str, Any]) -> TU: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, Solid3dGetNextAdjacentEdge] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[TU], src_dict: Dict[str, Any]) -> TU: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, Solid3dGetNextAdjacentEdge] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - solid3d_get_next_adjacent_edge = cls( - data=data, - type=type, - ) + solid3d_get_next_adjacent_edge = cls( + data= data, + type= type, + ) - solid3d_get_next_adjacent_edge.additional_properties = d - return solid3d_get_next_adjacent_edge + solid3d_get_next_adjacent_edge.additional_properties = d + return solid3d_get_next_adjacent_edge - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties FY = TypeVar("FY", bound="mouse_click") - @attr.s(auto_attribs=True) class mouse_click: - """The response from the `MouseClick` command.""" # noqa: E501 + """ The response from the `MouseClick` command. """ # noqa: E501 + data: Union[Unset, MouseClick] = UNSET + type: str = "mouse_click" - data: Union[Unset, MouseClick] = UNSET - type: str = "mouse_click" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 - 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 - 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 - return field_dict + @classmethod + def from_dict(cls: Type[FY], src_dict: Dict[str, Any]) -> FY: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, MouseClick] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[FY], src_dict: Dict[str, Any]) -> FY: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, MouseClick] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - mouse_click = cls( - data=data, - type=type, - ) + mouse_click = cls( + data= data, + type= type, + ) - mouse_click.additional_properties = d - return mouse_click + mouse_click.additional_properties = d + return mouse_click - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties FD = TypeVar("FD", bound="curve_get_type") - @attr.s(auto_attribs=True) class curve_get_type: - """The response from the `CurveGetType` command.""" # noqa: E501 + """ The response from the `CurveGetType` command. """ # noqa: E501 + data: Union[Unset, CurveGetType] = UNSET + type: str = "curve_get_type" - data: Union[Unset, CurveGetType] = UNSET - type: str = "curve_get_type" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 - 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 - 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 - return field_dict + @classmethod + def from_dict(cls: Type[FD], src_dict: Dict[str, Any]) -> FD: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, CurveGetType] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[FD], src_dict: Dict[str, Any]) -> FD: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, CurveGetType] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - curve_get_type = cls( - data=data, - type=type, - ) + curve_get_type = cls( + data= data, + type= type, + ) - curve_get_type.additional_properties = d - return curve_get_type + curve_get_type.additional_properties = d + return curve_get_type - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties TZ = TypeVar("TZ", bound="curve_get_control_points") - @attr.s(auto_attribs=True) class curve_get_control_points: - """The response from the `CurveGetControlPoints` command.""" # noqa: E501 + """ The response from the `CurveGetControlPoints` command. """ # noqa: E501 + data: Union[Unset, CurveGetControlPoints] = UNSET + type: str = "curve_get_control_points" - data: Union[Unset, CurveGetControlPoints] = UNSET - type: str = "curve_get_control_points" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 - 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 - 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 - return field_dict + @classmethod + def from_dict(cls: Type[TZ], src_dict: Dict[str, Any]) -> TZ: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, CurveGetControlPoints] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[TZ], src_dict: Dict[str, Any]) -> TZ: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, CurveGetControlPoints] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - curve_get_control_points = cls( - data=data, - type=type, - ) + curve_get_control_points = cls( + data= data, + type= type, + ) - curve_get_control_points.additional_properties = d - return curve_get_control_points + curve_get_control_points.additional_properties = d + return curve_get_control_points - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties AX = TypeVar("AX", bound="take_snapshot") - @attr.s(auto_attribs=True) class take_snapshot: - """The response from the `Take Snapshot` command.""" # noqa: E501 + """ The response from the `Take Snapshot` command. """ # noqa: E501 + data: Union[Unset, TakeSnapshot] = UNSET + type: str = "take_snapshot" - data: Union[Unset, TakeSnapshot] = UNSET - type: str = "take_snapshot" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 - 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 - 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 - return field_dict + @classmethod + def from_dict(cls: Type[AX], src_dict: Dict[str, Any]) -> AX: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, TakeSnapshot] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[AX], src_dict: Dict[str, Any]) -> AX: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, TakeSnapshot] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - take_snapshot = cls( - data=data, - type=type, - ) + take_snapshot = cls( + data= data, + type= type, + ) - take_snapshot.additional_properties = d - return take_snapshot + take_snapshot.additional_properties = d + return take_snapshot - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties RQ = TypeVar("RQ", bound="path_get_info") - @attr.s(auto_attribs=True) class path_get_info: - """The response from the `Path Get Info` command.""" # noqa: E501 + """ The response from the `Path Get Info` command. """ # noqa: E501 + data: Union[Unset, PathGetInfo] = UNSET + type: str = "path_get_info" - data: Union[Unset, PathGetInfo] = UNSET - type: str = "path_get_info" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 - 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 - 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 - return field_dict + @classmethod + def from_dict(cls: Type[RQ], src_dict: Dict[str, Any]) -> RQ: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, PathGetInfo] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[RQ], src_dict: Dict[str, Any]) -> RQ: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, PathGetInfo] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - path_get_info = cls( - data=data, - type=type, - ) + path_get_info = cls( + data= data, + type= type, + ) - path_get_info.additional_properties = d - return path_get_info + path_get_info.additional_properties = d + return path_get_info - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties ZL = TypeVar("ZL", bound="path_get_curve_uuids_for_vertices") - @attr.s(auto_attribs=True) class path_get_curve_uuids_for_vertices: - """The response from the `Path Get Curve UUIDs for Vertices` command.""" # noqa: E501 + """ The response from the `Path Get Curve UUIDs for Vertices` command. """ # noqa: E501 + data: Union[Unset, PathGetCurveUuidsForVertices] = UNSET + type: str = "path_get_curve_uuids_for_vertices" - data: Union[Unset, PathGetCurveUuidsForVertices] = UNSET - type: str = "path_get_curve_uuids_for_vertices" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 - 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 - 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 - return field_dict + @classmethod + def from_dict(cls: Type[ZL], src_dict: Dict[str, Any]) -> ZL: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, PathGetCurveUuidsForVertices] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[ZL], src_dict: Dict[str, Any]) -> ZL: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, PathGetCurveUuidsForVertices] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - path_get_curve_uuids_for_vertices = cls( - data=data, - type=type, - ) + path_get_curve_uuids_for_vertices = cls( + data= data, + type= type, + ) - path_get_curve_uuids_for_vertices.additional_properties = d - return path_get_curve_uuids_for_vertices + path_get_curve_uuids_for_vertices.additional_properties = d + return path_get_curve_uuids_for_vertices - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties CM = TypeVar("CM", bound="plane_intersect_and_project") - @attr.s(auto_attribs=True) class plane_intersect_and_project: - """The response from the `PlaneIntersectAndProject` command.""" # noqa: E501 + """ The response from the `PlaneIntersectAndProject` command. """ # noqa: E501 + data: Union[Unset, PlaneIntersectAndProject] = UNSET + type: str = "plane_intersect_and_project" - data: Union[Unset, PlaneIntersectAndProject] = UNSET - type: str = "plane_intersect_and_project" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 - 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 - 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 - return field_dict + @classmethod + def from_dict(cls: Type[CM], src_dict: Dict[str, Any]) -> CM: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, PlaneIntersectAndProject] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[CM], src_dict: Dict[str, Any]) -> CM: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, PlaneIntersectAndProject] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - plane_intersect_and_project = cls( - data=data, - type=type, - ) + plane_intersect_and_project = cls( + data= data, + type= type, + ) - plane_intersect_and_project.additional_properties = d - return plane_intersect_and_project + plane_intersect_and_project.additional_properties = d + return plane_intersect_and_project - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties OS = TypeVar("OS", bound="curve_get_end_points") - @attr.s(auto_attribs=True) class curve_get_end_points: - """The response from the `CurveGetEndPoints` command.""" # noqa: E501 + """ The response from the `CurveGetEndPoints` command. """ # noqa: E501 + data: Union[Unset, CurveGetEndPoints] = UNSET + type: str = "curve_get_end_points" - data: Union[Unset, CurveGetEndPoints] = UNSET - type: str = "curve_get_end_points" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 - 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 - 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 - return field_dict + @classmethod + def from_dict(cls: Type[OS], src_dict: Dict[str, Any]) -> OS: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, CurveGetEndPoints] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[OS], src_dict: Dict[str, Any]) -> OS: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, CurveGetEndPoints] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - curve_get_end_points = cls( - data=data, - type=type, - ) + curve_get_end_points = cls( + data= data, + type= type, + ) - curve_get_end_points.additional_properties = d - return curve_get_end_points + curve_get_end_points.additional_properties = d + return curve_get_end_points - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties WP = TypeVar("WP", bound="import_files") - @attr.s(auto_attribs=True) class import_files: - """The response from the `ImportFiles` command.""" # noqa: E501 + """ The response from the `ImportFiles` command. """ # noqa: E501 + data: Union[Unset, ImportFiles] = UNSET + type: str = "import_files" - data: Union[Unset, ImportFiles] = UNSET - type: str = "import_files" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 - 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 - 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 - return field_dict + @classmethod + def from_dict(cls: Type[WP], src_dict: Dict[str, Any]) -> WP: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, ImportFiles] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[WP], src_dict: Dict[str, Any]) -> WP: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, ImportFiles] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - import_files = cls( - data=data, - type=type, - ) + import_files = cls( + data= data, + type= type, + ) - import_files.additional_properties = d - return import_files + import_files.additional_properties = d + return import_files - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties XO = TypeVar("XO", bound="mass") - @attr.s(auto_attribs=True) class mass: - """The response from the `Mass` command.""" # noqa: E501 + """ The response from the `Mass` command. """ # noqa: E501 + data: Union[Unset, Mass] = UNSET + type: str = "mass" - data: Union[Unset, Mass] = UNSET - type: str = "mass" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 - 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 - 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 - return field_dict + @classmethod + def from_dict(cls: Type[XO], src_dict: Dict[str, Any]) -> XO: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, Mass] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[XO], src_dict: Dict[str, Any]) -> XO: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, Mass] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - mass = cls( - data=data, - type=type, - ) + mass = cls( + data= data, + type= type, + ) - mass.additional_properties = d - return mass + mass.additional_properties = d + return mass - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties LN = TypeVar("LN", bound="volume") - @attr.s(auto_attribs=True) class volume: - """The response from the `Volume` command.""" # noqa: E501 + """ The response from the `Volume` command. """ # noqa: E501 + data: Union[Unset, Volume] = UNSET + type: str = "volume" - data: Union[Unset, Volume] = UNSET - type: str = "volume" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 - 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 - 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 - return field_dict + @classmethod + def from_dict(cls: Type[LN], src_dict: Dict[str, Any]) -> LN: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, Volume] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[LN], src_dict: Dict[str, Any]) -> LN: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, Volume] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - volume = cls( - data=data, - type=type, - ) + volume = cls( + data= data, + type= type, + ) - volume.additional_properties = d - return volume + volume.additional_properties = d + return volume - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties KR = TypeVar("KR", bound="density") - @attr.s(auto_attribs=True) class density: - """The response from the `Density` command.""" # noqa: E501 + """ The response from the `Density` command. """ # noqa: E501 + data: Union[Unset, Density] = UNSET + type: str = "density" - data: Union[Unset, Density] = UNSET - type: str = "density" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 - 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 - 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 - return field_dict + @classmethod + def from_dict(cls: Type[KR], src_dict: Dict[str, Any]) -> KR: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, Density] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[KR], src_dict: Dict[str, Any]) -> KR: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, Density] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - density = cls( - data=data, - type=type, - ) + density = cls( + data= data, + type= type, + ) - density.additional_properties = d - return density + density.additional_properties = d + return density - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties MG = TypeVar("MG", bound="surface_area") - @attr.s(auto_attribs=True) class surface_area: - """The response from the `SurfaceArea` command.""" # noqa: E501 + """ The response from the `SurfaceArea` command. """ # noqa: E501 + data: Union[Unset, SurfaceArea] = UNSET + type: str = "surface_area" - data: Union[Unset, SurfaceArea] = UNSET - type: str = "surface_area" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 - 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 - 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 - return field_dict + @classmethod + def from_dict(cls: Type[MG], src_dict: Dict[str, Any]) -> MG: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, SurfaceArea] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[MG], src_dict: Dict[str, Any]) -> MG: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, SurfaceArea] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - surface_area = cls( - data=data, - type=type, - ) + surface_area = cls( + data= data, + type= type, + ) - surface_area.additional_properties = d - return surface_area + surface_area.additional_properties = d + return surface_area - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties UE = TypeVar("UE", bound="center_of_mass") - @attr.s(auto_attribs=True) class center_of_mass: - """The response from the `CenterOfMass` command.""" # noqa: E501 + """ The response from the `CenterOfMass` command. """ # noqa: E501 + data: Union[Unset, CenterOfMass] = UNSET + type: str = "center_of_mass" - data: Union[Unset, CenterOfMass] = UNSET - type: str = "center_of_mass" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 - 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 - 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 - return field_dict + @classmethod + def from_dict(cls: Type[UE], src_dict: Dict[str, Any]) -> UE: + d = src_dict.copy() + _data = d.pop("data", UNSET) + data: Union[Unset, CenterOfMass] + if isinstance(_data, Unset): + data = UNSET + else: + data = _data # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[UE], src_dict: Dict[str, Any]) -> UE: - d = src_dict.copy() - _data = d.pop("data", UNSET) - data: Union[Unset, CenterOfMass] - if isinstance(_data, Unset): - data = UNSET - else: - data = _data # type: ignore[arg-type] - - type = d.pop("type", UNSET) - - center_of_mass = cls( - data=data, - type=type, - ) - - center_of_mass.additional_properties = d - return center_of_mass - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + type = d.pop("type", UNSET) -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, -] + center_of_mass = cls( + data= data, + type= type, + ) + + center_of_mass.additional_properties = d + return center_of_mass + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + +OkModelingCmdResponse = Union[empty, export, 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] diff --git a/kittycad/models/ok_web_socket_response_data.py b/kittycad/models/ok_web_socket_response_data.py index 3959e91e3..ced633279 100644 --- a/kittycad/models/ok_web_socket_response_data.py +++ b/kittycad/models/ok_web_socket_response_data.py @@ -6,340 +6,341 @@ from ..types import UNSET, Unset BF = TypeVar("BF", bound="ice_server_info") - @attr.s(auto_attribs=True) class ice_server_info: - """Information about the ICE servers.""" # noqa: E501 + """ Information about the ICE servers. """ # noqa: E501 + data: Union[Unset, Any] = UNSET + type: str = "ice_server_info" - data: Union[Unset, Any] = UNSET - type: str = "ice_server_info" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + data = self.data + type = self.type - def to_dict(self) -> Dict[str, Any]: - data = self.data - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict['data'] = data + field_dict['type'] = type - 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 - return field_dict + @classmethod + def from_dict(cls: Type[BF], src_dict: Dict[str, Any]) -> BF: + d = src_dict.copy() + data = d.pop("data", UNSET) + type = d.pop("type", UNSET) - @classmethod - def from_dict(cls: Type[BF], src_dict: Dict[str, Any]) -> BF: - d = src_dict.copy() - data = d.pop("data", UNSET) - type = d.pop("type", UNSET) - ice_server_info = cls( - data=data, - type=type, - ) + ice_server_info = cls( + data= data, + type= type, + ) - ice_server_info.additional_properties = d - return ice_server_info + ice_server_info.additional_properties = d + return ice_server_info - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties UU = TypeVar("UU", bound="trickle_ice") - @attr.s(auto_attribs=True) class trickle_ice: - """The trickle ICE candidate response.""" # noqa: E501 + """ The trickle ICE candidate response. """ # noqa: E501 + data: Union[Unset, Any] = UNSET + type: str = "trickle_ice" - data: Union[Unset, Any] = UNSET - type: str = "trickle_ice" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + data = self.data + type = self.type - def to_dict(self) -> Dict[str, Any]: - data = self.data - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict['data'] = data + field_dict['type'] = type - 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 - return field_dict + @classmethod + def from_dict(cls: Type[UU], src_dict: Dict[str, Any]) -> UU: + d = src_dict.copy() + data = d.pop("data", UNSET) + type = d.pop("type", UNSET) - @classmethod - def from_dict(cls: Type[UU], src_dict: Dict[str, Any]) -> UU: - d = src_dict.copy() - data = d.pop("data", UNSET) - type = d.pop("type", UNSET) - trickle_ice = cls( - data=data, - type=type, - ) + trickle_ice = cls( + data= data, + type= type, + ) - trickle_ice.additional_properties = d - return trickle_ice + trickle_ice.additional_properties = d + return trickle_ice - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties MB = TypeVar("MB", bound="sdp_answer") - @attr.s(auto_attribs=True) class sdp_answer: - """The SDP answer response.""" # noqa: E501 + """ The SDP answer response. """ # noqa: E501 + data: Union[Unset, Any] = UNSET + type: str = "sdp_answer" - data: Union[Unset, Any] = UNSET - type: str = "sdp_answer" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + data = self.data + type = self.type - def to_dict(self) -> Dict[str, Any]: - data = self.data - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict['data'] = data + field_dict['type'] = type - 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 - return field_dict + @classmethod + def from_dict(cls: Type[MB], src_dict: Dict[str, Any]) -> MB: + d = src_dict.copy() + data = d.pop("data", UNSET) + type = d.pop("type", UNSET) - @classmethod - def from_dict(cls: Type[MB], src_dict: Dict[str, Any]) -> MB: - d = src_dict.copy() - data = d.pop("data", UNSET) - type = d.pop("type", UNSET) - sdp_answer = cls( - data=data, - type=type, - ) + sdp_answer = cls( + data= data, + type= type, + ) - sdp_answer.additional_properties = d - return sdp_answer + sdp_answer.additional_properties = d + return sdp_answer - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties TB = TypeVar("TB", bound="modeling") - @attr.s(auto_attribs=True) class modeling: - """The modeling command response.""" # noqa: E501 + """ The modeling command response. """ # noqa: E501 + data: Union[Unset, Any] = UNSET + type: str = "modeling" - data: Union[Unset, Any] = UNSET - type: str = "modeling" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + data = self.data + type = self.type - def to_dict(self) -> Dict[str, Any]: - data = self.data - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict['data'] = data + field_dict['type'] = type - 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 - return field_dict + @classmethod + def from_dict(cls: Type[TB], src_dict: Dict[str, Any]) -> TB: + d = src_dict.copy() + data = d.pop("data", UNSET) + type = d.pop("type", UNSET) - @classmethod - def from_dict(cls: Type[TB], src_dict: Dict[str, Any]) -> TB: - d = src_dict.copy() - data = d.pop("data", UNSET) - type = d.pop("type", UNSET) - modeling = cls( - data=data, - type=type, - ) + modeling = cls( + data= data, + type= type, + ) - modeling.additional_properties = d - return modeling + modeling.additional_properties = d + return modeling - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties FJ = TypeVar("FJ", bound="export") - @attr.s(auto_attribs=True) class export: - """The exported files.""" # noqa: E501 + """ The exported files. """ # noqa: E501 + data: Union[Unset, Any] = UNSET + type: str = "export" - data: Union[Unset, Any] = UNSET - type: str = "export" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + data = self.data + type = self.type - def to_dict(self) -> Dict[str, Any]: - data = self.data - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict['data'] = data + field_dict['type'] = type - 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 - return field_dict + @classmethod + def from_dict(cls: Type[FJ], src_dict: Dict[str, Any]) -> FJ: + d = src_dict.copy() + data = d.pop("data", UNSET) + type = d.pop("type", UNSET) - @classmethod - def from_dict(cls: Type[FJ], src_dict: Dict[str, Any]) -> FJ: - d = src_dict.copy() - data = d.pop("data", UNSET) - type = d.pop("type", UNSET) - export = cls( - data=data, - type=type, - ) + export = cls( + data= data, + type= type, + ) - export.additional_properties = d - return export + export.additional_properties = d + return export - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties HB = TypeVar("HB", bound="metrics_request") - @attr.s(auto_attribs=True) class metrics_request: - """Request a collection of metrics, to include WebRTC.""" # noqa: E501 + """ Request a collection of metrics, to include WebRTC. """ # noqa: E501 + data: Union[Unset, Any] = UNSET + type: str = "metrics_request" - data: Union[Unset, Any] = UNSET - type: str = "metrics_request" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + data = self.data + type = self.type - def to_dict(self) -> Dict[str, Any]: - data = self.data - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if data is not UNSET: + field_dict['data'] = data + field_dict['type'] = type - 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 - return field_dict - - @classmethod - def from_dict(cls: Type[HB], src_dict: Dict[str, Any]) -> HB: - d = src_dict.copy() - data = d.pop("data", UNSET) - type = d.pop("type", UNSET) - - metrics_request = cls( - data=data, - type=type, - ) - - metrics_request.additional_properties = d - return metrics_request - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + @classmethod + def from_dict(cls: Type[HB], src_dict: Dict[str, Any]) -> HB: + d = src_dict.copy() + data = d.pop("data", UNSET) + type = d.pop("type", UNSET) -OkWebSocketResponseData = Union[ - ice_server_info, trickle_ice, sdp_answer, modeling, export, metrics_request -] + metrics_request = cls( + data= data, + type= type, + ) + + metrics_request.additional_properties = d + return metrics_request + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + +OkWebSocketResponseData = Union[ice_server_info, trickle_ice, sdp_answer, modeling, export, metrics_request] diff --git a/kittycad/models/onboarding.py b/kittycad/models/onboarding.py index fcd0d9324..80e5785af 100644 --- a/kittycad/models/onboarding.py +++ b/kittycad/models/onboarding.py @@ -6,68 +6,63 @@ from ..types import UNSET, Unset SF = TypeVar("SF", bound="Onboarding") - @attr.s(auto_attribs=True) class Onboarding: - """Onboarding details""" # noqa: E501 + """ Onboarding details """ # noqa: E501 + first_call_from__their_machine_date: Union[Unset, str] = UNSET + first_litterbox_execute_date: Union[Unset, str] = UNSET + first_token_date: Union[Unset, str] = UNSET - first_call_from__their_machine_date: Union[Unset, str] = UNSET - first_litterbox_execute_date: Union[Unset, str] = UNSET - first_token_date: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + first_call_from__their_machine_date = self.first_call_from__their_machine_date + first_litterbox_execute_date = self.first_litterbox_execute_date + first_token_date = self.first_token_date - def to_dict(self) -> Dict[str, Any]: - first_call_from__their_machine_date = self.first_call_from__their_machine_date - first_litterbox_execute_date = self.first_litterbox_execute_date - first_token_date = self.first_token_date + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if first_call_from__their_machine_date is not UNSET: + field_dict['first_call_from_their_machine_date'] = first_call_from__their_machine_date + if first_litterbox_execute_date is not UNSET: + field_dict['first_litterbox_execute_date'] = first_litterbox_execute_date + if first_token_date is not UNSET: + field_dict['first_token_date'] = first_token_date - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if first_call_from__their_machine_date is not UNSET: - field_dict[ - "first_call_from_their_machine_date" - ] = first_call_from__their_machine_date - if first_litterbox_execute_date is not UNSET: - field_dict["first_litterbox_execute_date"] = first_litterbox_execute_date - if first_token_date is not UNSET: - field_dict["first_token_date"] = first_token_date + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[SF], src_dict: Dict[str, Any]) -> SF: + d = src_dict.copy() + first_call_from__their_machine_date = d.pop("first_call_from_their_machine_date", UNSET) - @classmethod - def from_dict(cls: Type[SF], src_dict: Dict[str, Any]) -> SF: - d = src_dict.copy() - first_call_from__their_machine_date = d.pop( - "first_call_from_their_machine_date", UNSET - ) + first_litterbox_execute_date = d.pop("first_litterbox_execute_date", UNSET) - first_litterbox_execute_date = d.pop("first_litterbox_execute_date", UNSET) + first_token_date = d.pop("first_token_date", UNSET) - first_token_date = d.pop("first_token_date", UNSET) - onboarding = cls( - first_call_from__their_machine_date=first_call_from__their_machine_date, - first_litterbox_execute_date=first_litterbox_execute_date, - first_token_date=first_token_date, - ) + onboarding = cls( + first_call_from__their_machine_date= first_call_from__their_machine_date, + first_litterbox_execute_date= first_litterbox_execute_date, + first_token_date= first_token_date, + ) - onboarding.additional_properties = d - return onboarding + onboarding.additional_properties = d + return onboarding - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/output_file.py b/kittycad/models/output_file.py index 4956a3b99..504d56982 100644 --- a/kittycad/models/output_file.py +++ b/kittycad/models/output_file.py @@ -6,57 +6,56 @@ from ..types import UNSET, Unset DU = TypeVar("DU", bound="OutputFile") - @attr.s(auto_attribs=True) class OutputFile: - """Output file contents.""" # noqa: E501 + """ Output file contents. """ # noqa: E501 + contents: Union[Unset, str] = UNSET + name: Union[Unset, str] = UNSET - contents: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + contents = self.contents + name = self.name - def to_dict(self) -> Dict[str, Any]: - contents = self.contents - name = self.name + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if contents is not UNSET: + field_dict['contents'] = contents + if name is not UNSET: + field_dict['name'] = name - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if contents is not UNSET: - field_dict["contents"] = contents - if name is not UNSET: - field_dict["name"] = name + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[DU], src_dict: Dict[str, Any]) -> DU: + d = src_dict.copy() + contents = d.pop("contents", UNSET) - @classmethod - def from_dict(cls: Type[DU], src_dict: Dict[str, Any]) -> DU: - d = src_dict.copy() - contents = d.pop("contents", UNSET) + name = d.pop("name", UNSET) - name = d.pop("name", UNSET) - output_file = cls( - contents=contents, - name=name, - ) + output_file = cls( + contents= contents, + name= name, + ) - output_file.additional_properties = d - return output_file + output_file.additional_properties = d + return output_file - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/output_format.py b/kittycad/models/output_format.py index c17e4e260..f29567673 100644 --- a/kittycad/models/output_format.py +++ b/kittycad/models/output_format.py @@ -13,445 +13,448 @@ from ..types import UNSET, Unset BM = TypeVar("BM", bound="fbx") - @attr.s(auto_attribs=True) class fbx: - """Autodesk Filmbox (FBX) format.""" # noqa: E501 + """ Autodesk Filmbox (FBX) format. """ # noqa: E501 + storage: Union[Unset, FbxStorage] = UNSET + type: str = "fbx" - storage: Union[Unset, FbxStorage] = UNSET - type: str = "fbx" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.storage, Unset): + storage = self.storage + type = self.type - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.storage, Unset): - storage = self.storage - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if storage is not UNSET: + field_dict['storage'] = storage + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if storage is not UNSET: - field_dict["storage"] = storage - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[BM], src_dict: Dict[str, Any]) -> BM: + d = src_dict.copy() + _storage = d.pop("storage", UNSET) + storage: Union[Unset, FbxStorage] + if isinstance(_storage, Unset): + storage = UNSET + else: + storage = _storage # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[BM], src_dict: Dict[str, Any]) -> BM: - d = src_dict.copy() - _storage = d.pop("storage", UNSET) - storage: Union[Unset, FbxStorage] - if isinstance(_storage, Unset): - storage = UNSET - else: - storage = _storage # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - fbx = cls( - storage=storage, - type=type, - ) + fbx = cls( + storage= storage, + type= type, + ) - fbx.additional_properties = d - return fbx + fbx.additional_properties = d + return fbx - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties TY = TypeVar("TY", bound="gltf") - @attr.s(auto_attribs=True) class gltf: - """glTF 2.0. We refer to this as glTF since that is how our customers refer to it, although by default it will be in binary format and thus technically (glb). If you prefer ascii output, you can set that option for the export.""" # noqa: E501 + """ glTF 2.0. We refer to this as glTF since that is how our customers refer to it, although by default it will be in binary format and thus technically (glb). If you prefer ascii output, you can set that option for the export. """ # noqa: E501 + presentation: Union[Unset, GltfPresentation] = UNSET + storage: Union[Unset, GltfStorage] = UNSET + type: str = "gltf" - presentation: Union[Unset, GltfPresentation] = UNSET - storage: Union[Unset, GltfStorage] = UNSET - type: str = "gltf" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.presentation, Unset): + presentation = self.presentation + if not isinstance(self.storage, Unset): + storage = self.storage + type = self.type - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.presentation, Unset): - presentation = self.presentation - if not isinstance(self.storage, Unset): - storage = self.storage - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if presentation is not UNSET: + field_dict['presentation'] = presentation + if storage is not UNSET: + field_dict['storage'] = storage + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if presentation is not UNSET: - field_dict["presentation"] = presentation - if storage is not UNSET: - field_dict["storage"] = storage - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[TY], src_dict: Dict[str, Any]) -> TY: + d = src_dict.copy() + _presentation = d.pop("presentation", UNSET) + presentation: Union[Unset, GltfPresentation] + if isinstance(_presentation, Unset): + presentation = UNSET + else: + presentation = _presentation # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[TY], src_dict: Dict[str, Any]) -> TY: - d = src_dict.copy() - _presentation = d.pop("presentation", UNSET) - presentation: Union[Unset, GltfPresentation] - if isinstance(_presentation, Unset): - presentation = UNSET - else: - presentation = _presentation # type: ignore[arg-type] + _storage = d.pop("storage", UNSET) + storage: Union[Unset, GltfStorage] + if isinstance(_storage, Unset): + storage = UNSET + else: + storage = _storage # type: ignore[arg-type] - _storage = d.pop("storage", UNSET) - storage: Union[Unset, GltfStorage] - if isinstance(_storage, Unset): - storage = UNSET - else: - storage = _storage # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - gltf = cls( - presentation=presentation, - storage=storage, - type=type, - ) + gltf = cls( + presentation= presentation, + storage= storage, + type= type, + ) - gltf.additional_properties = d - return gltf + gltf.additional_properties = d + return gltf - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties NC = TypeVar("NC", bound="obj") - @attr.s(auto_attribs=True) class obj: - """Wavefront OBJ format.""" # noqa: E501 + """ Wavefront OBJ format. """ # noqa: E501 + coords: Union[Unset, System] = UNSET + type: str = "obj" + units: Union[Unset, UnitLength] = UNSET - coords: Union[Unset, System] = UNSET - type: str = "obj" - units: Union[Unset, UnitLength] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.coords, Unset): + coords = self.coords + type = self.type + if not isinstance(self.units, Unset): + units = self.units - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.coords, Unset): - coords = self.coords - type = self.type - if not isinstance(self.units, Unset): - units = self.units + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if coords is not UNSET: + field_dict['coords'] = coords + field_dict['type'] = type + if units is not UNSET: + field_dict['units'] = units - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if coords is not UNSET: - field_dict["coords"] = coords - field_dict["type"] = type - if units is not UNSET: - field_dict["units"] = units + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[NC], src_dict: Dict[str, Any]) -> NC: + d = src_dict.copy() + _coords = d.pop("coords", UNSET) + coords: Union[Unset, System] + if isinstance(_coords, Unset): + coords = UNSET + else: + coords = _coords # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[NC], src_dict: Dict[str, Any]) -> NC: - d = src_dict.copy() - _coords = d.pop("coords", UNSET) - coords: Union[Unset, System] - if isinstance(_coords, Unset): - coords = UNSET - else: - coords = _coords # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) + _units = d.pop("units", UNSET) + units: Union[Unset, UnitLength] + if isinstance(_units, Unset): + units = UNSET + else: + units = _units # type: ignore[arg-type] - _units = d.pop("units", UNSET) - units: Union[Unset, UnitLength] - if isinstance(_units, Unset): - units = UNSET - else: - units = _units # type: ignore[arg-type] - obj = cls( - coords=coords, - type=type, - units=units, - ) + obj = cls( + coords= coords, + type= type, + units= units, + ) - obj.additional_properties = d - return obj + obj.additional_properties = d + return obj - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties GP = TypeVar("GP", bound="ply") - @attr.s(auto_attribs=True) class ply: - """The PLY Polygon File Format.""" # noqa: E501 + """ The PLY Polygon File Format. """ # noqa: E501 + coords: Union[Unset, System] = UNSET + storage: Union[Unset, PlyStorage] = UNSET + type: str = "ply" - coords: Union[Unset, System] = UNSET - storage: Union[Unset, PlyStorage] = UNSET - type: str = "ply" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.coords, Unset): + coords = self.coords + if not isinstance(self.storage, Unset): + storage = self.storage + type = self.type - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.coords, Unset): - coords = self.coords - if not isinstance(self.storage, Unset): - storage = self.storage - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if coords is not UNSET: + field_dict['coords'] = coords + if storage is not UNSET: + field_dict['storage'] = storage + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if coords is not UNSET: - field_dict["coords"] = coords - if storage is not UNSET: - field_dict["storage"] = storage - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[GP], src_dict: Dict[str, Any]) -> GP: + d = src_dict.copy() + _coords = d.pop("coords", UNSET) + coords: Union[Unset, System] + if isinstance(_coords, Unset): + coords = UNSET + else: + coords = _coords # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[GP], src_dict: Dict[str, Any]) -> GP: - d = src_dict.copy() - _coords = d.pop("coords", UNSET) - coords: Union[Unset, System] - if isinstance(_coords, Unset): - coords = UNSET - else: - coords = _coords # type: ignore[arg-type] + _storage = d.pop("storage", UNSET) + storage: Union[Unset, PlyStorage] + if isinstance(_storage, Unset): + storage = UNSET + else: + storage = _storage # type: ignore[arg-type] - _storage = d.pop("storage", UNSET) - storage: Union[Unset, PlyStorage] - if isinstance(_storage, Unset): - storage = UNSET - else: - storage = _storage # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - ply = cls( - coords=coords, - storage=storage, - type=type, - ) + ply = cls( + coords= coords, + storage= storage, + type= type, + ) - ply.additional_properties = d - return ply + ply.additional_properties = d + return ply - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties FF = TypeVar("FF", bound="step") - @attr.s(auto_attribs=True) class step: - """ISO 10303-21 (STEP) format.""" # noqa: E501 + """ ISO 10303-21 (STEP) format. """ # noqa: E501 + coords: Union[Unset, System] = UNSET + type: str = "step" - coords: Union[Unset, System] = UNSET - type: str = "step" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.coords, Unset): + coords = self.coords + type = self.type - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.coords, Unset): - coords = self.coords - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if coords is not UNSET: + field_dict['coords'] = coords + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if coords is not UNSET: - field_dict["coords"] = coords - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[FF], src_dict: Dict[str, Any]) -> FF: + d = src_dict.copy() + _coords = d.pop("coords", UNSET) + coords: Union[Unset, System] + if isinstance(_coords, Unset): + coords = UNSET + else: + coords = _coords # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[FF], src_dict: Dict[str, Any]) -> FF: - d = src_dict.copy() - _coords = d.pop("coords", UNSET) - coords: Union[Unset, System] - if isinstance(_coords, Unset): - coords = UNSET - else: - coords = _coords # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - step = cls( - coords=coords, - type=type, - ) + step = cls( + coords= coords, + type= type, + ) - step.additional_properties = d - return step + step.additional_properties = d + return step - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties YO = TypeVar("YO", bound="stl") - @attr.s(auto_attribs=True) class stl: - """*ST**ereo**L**ithography format.""" # noqa: E501 + """ *ST**ereo**L**ithography format. """ # noqa: E501 + coords: Union[Unset, System] = UNSET + storage: Union[Unset, StlStorage] = UNSET + type: str = "stl" + units: Union[Unset, UnitLength] = UNSET - coords: Union[Unset, System] = UNSET - storage: Union[Unset, StlStorage] = UNSET - type: str = "stl" - units: Union[Unset, UnitLength] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.coords, Unset): + coords = self.coords + if not isinstance(self.storage, Unset): + storage = self.storage + type = self.type + if not isinstance(self.units, Unset): + units = self.units - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.coords, Unset): - coords = self.coords - if not isinstance(self.storage, Unset): - storage = self.storage - type = self.type - if not isinstance(self.units, Unset): - units = self.units + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if coords is not UNSET: + field_dict['coords'] = coords + if storage is not UNSET: + field_dict['storage'] = storage + field_dict['type'] = type + if units is not UNSET: + field_dict['units'] = units - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if coords is not UNSET: - field_dict["coords"] = coords - if storage is not UNSET: - field_dict["storage"] = storage - field_dict["type"] = type - if units is not UNSET: - field_dict["units"] = units + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[YO], src_dict: Dict[str, Any]) -> YO: + d = src_dict.copy() + _coords = d.pop("coords", UNSET) + coords: Union[Unset, System] + if isinstance(_coords, Unset): + coords = UNSET + else: + coords = _coords # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[YO], src_dict: Dict[str, Any]) -> YO: - d = src_dict.copy() - _coords = d.pop("coords", UNSET) - coords: Union[Unset, System] - if isinstance(_coords, Unset): - coords = UNSET - else: - coords = _coords # type: ignore[arg-type] + _storage = d.pop("storage", UNSET) + storage: Union[Unset, StlStorage] + if isinstance(_storage, Unset): + storage = UNSET + else: + storage = _storage # type: ignore[arg-type] - _storage = d.pop("storage", UNSET) - storage: Union[Unset, StlStorage] - if isinstance(_storage, Unset): - storage = UNSET - else: - storage = _storage # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) + _units = d.pop("units", UNSET) + units: Union[Unset, UnitLength] + if isinstance(_units, Unset): + units = UNSET + else: + units = _units # type: ignore[arg-type] - _units = d.pop("units", UNSET) - units: Union[Unset, UnitLength] - if isinstance(_units, Unset): - units = UNSET - else: - units = _units # type: ignore[arg-type] - stl = cls( - coords=coords, - storage=storage, - type=type, - units=units, - ) + stl = cls( + coords= coords, + storage= storage, + type= type, + units= units, + ) - stl.additional_properties = d - return stl + stl.additional_properties = d + return stl - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties OutputFormat = Union[fbx, gltf, obj, ply, step, stl] diff --git a/kittycad/models/path_command.py b/kittycad/models/path_command.py index 98d26cf10..d1bc269b8 100644 --- a/kittycad/models/path_command.py +++ b/kittycad/models/path_command.py @@ -2,13 +2,12 @@ from enum import Enum class PathCommand(str, Enum): - """The path component command type (within a Path)""" # noqa: E501 + """ The path component command type (within a Path) """ # noqa: E501 + MOVE_TO = 'move_to' + LINE_TO = 'line_to' + BEZ_CURVE_TO = 'bez_curve_to' + NURBS_CURVE_TO = 'nurbs_curve_to' + ADD_ARC = 'add_arc' - MOVE_TO = "move_to" - LINE_TO = "line_to" - BEZ_CURVE_TO = "bez_curve_to" - NURBS_CURVE_TO = "nurbs_curve_to" - ADD_ARC = "add_arc" - - def __str__(self) -> str: - return str(self.value) + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/path_get_curve_uuids_for_vertices.py b/kittycad/models/path_get_curve_uuids_for_vertices.py index 7fd1fc6ba..45cb6ca95 100644 --- a/kittycad/models/path_get_curve_uuids_for_vertices.py +++ b/kittycad/models/path_get_curve_uuids_for_vertices.py @@ -6,52 +6,51 @@ from ..types import UNSET, Unset FS = TypeVar("FS", bound="PathGetCurveUuidsForVertices") - @attr.s(auto_attribs=True) class PathGetCurveUuidsForVertices: - """The response from the `PathGetCurveUuidsForVertices` command.""" # noqa: E501 + """ The response from the `PathGetCurveUuidsForVertices` command. """ # noqa: E501 + curve_ids: Union[Unset, List[str]] = UNSET - curve_ids: Union[Unset, List[str]] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + curve_ids: Union[Unset, List[str]] = UNSET + if not isinstance(self.curve_ids, Unset): + curve_ids = self.curve_ids - def to_dict(self) -> Dict[str, Any]: - curve_ids: Union[Unset, List[str]] = UNSET - if not isinstance(self.curve_ids, Unset): - curve_ids = self.curve_ids + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if curve_ids is not UNSET: + field_dict['curve_ids'] = curve_ids - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if curve_ids is not UNSET: - field_dict["curve_ids"] = curve_ids + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[FS], src_dict: Dict[str, Any]) -> FS: + d = src_dict.copy() + curve_ids = cast(List[str], d.pop("curve_ids", UNSET)) - @classmethod - def from_dict(cls: Type[FS], src_dict: Dict[str, Any]) -> FS: - d = src_dict.copy() - curve_ids = cast(List[str], d.pop("curve_ids", UNSET)) - path_get_curve_uuids_for_vertices = cls( - curve_ids=curve_ids, - ) + path_get_curve_uuids_for_vertices = cls( + curve_ids= curve_ids, + ) - path_get_curve_uuids_for_vertices.additional_properties = d - return path_get_curve_uuids_for_vertices + path_get_curve_uuids_for_vertices.additional_properties = d + return path_get_curve_uuids_for_vertices - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/path_get_info.py b/kittycad/models/path_get_info.py index 71ad07e47..19b8879b5 100644 --- a/kittycad/models/path_get_info.py +++ b/kittycad/models/path_get_info.py @@ -6,58 +6,54 @@ from ..types import UNSET, Unset WN = TypeVar("WN", bound="PathGetInfo") - @attr.s(auto_attribs=True) class PathGetInfo: - """The response from the `PathGetInfo` command.""" # noqa: E501 + """ The response from the `PathGetInfo` command. """ # noqa: E501 + from ..models.path_segment_info import PathSegmentInfo + segments: Union[Unset, List[PathSegmentInfo]] = UNSET - from ..models.path_segment_info import PathSegmentInfo + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - segments: Union[Unset, List[PathSegmentInfo]] = UNSET + def to_dict(self) -> Dict[str, Any]: + from ..models.path_segment_info import PathSegmentInfo + segments: Union[Unset, List[PathSegmentInfo]] = UNSET + if not isinstance(self.segments, Unset): + segments = self.segments - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if segments is not UNSET: + field_dict['segments'] = segments - def to_dict(self) -> Dict[str, Any]: - from ..models.path_segment_info import PathSegmentInfo + return field_dict - segments: Union[Unset, List[PathSegmentInfo]] = UNSET - if not isinstance(self.segments, Unset): - segments = self.segments + @classmethod + def from_dict(cls: Type[WN], src_dict: Dict[str, Any]) -> WN: + d = src_dict.copy() + from ..models.path_segment_info import PathSegmentInfo + segments = cast(List[PathSegmentInfo], d.pop("segments", UNSET)) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if segments is not UNSET: - field_dict["segments"] = segments - return field_dict + path_get_info = cls( + segments= segments, + ) - @classmethod - def from_dict(cls: Type[WN], src_dict: Dict[str, Any]) -> WN: - d = src_dict.copy() - from ..models.path_segment_info import PathSegmentInfo + path_get_info.additional_properties = d + return path_get_info - segments = cast(List[PathSegmentInfo], d.pop("segments", UNSET)) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - path_get_info = cls( - segments=segments, - ) + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - path_get_info.additional_properties = d - return path_get_info + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - 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 + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/path_segment.py b/kittycad/models/path_segment.py index b281f808b..da730d0a0 100644 --- a/kittycad/models/path_segment.py +++ b/kittycad/models/path_segment.py @@ -9,405 +9,407 @@ from ..types import UNSET, Unset EQ = TypeVar("EQ", bound="line") - @attr.s(auto_attribs=True) class line: - """A straight line segment. Goes from the current path "pen" to the given endpoint.""" # noqa: E501 + """ A straight line segment. Goes from the current path "pen" to the given endpoint. """ # noqa: E501 + end: Union[Unset, Point3d] = UNSET + relative: Union[Unset, bool] = False + type: str = "line" - end: Union[Unset, Point3d] = UNSET - relative: Union[Unset, bool] = False - type: str = "line" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.end, Unset): + end = self.end + relative = self.relative + type = self.type - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.end, Unset): - end = self.end - relative = self.relative - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if end is not UNSET: + field_dict['end'] = end + if relative is not UNSET: + field_dict['relative'] = relative + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if end is not UNSET: - field_dict["end"] = end - if relative is not UNSET: - field_dict["relative"] = relative - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[EQ], src_dict: Dict[str, Any]) -> EQ: + d = src_dict.copy() + _end = d.pop("end", UNSET) + end: Union[Unset, Point3d] + if isinstance(_end, Unset): + end = UNSET + else: + end = _end # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[EQ], src_dict: Dict[str, Any]) -> EQ: - d = src_dict.copy() - _end = d.pop("end", UNSET) - end: Union[Unset, Point3d] - if isinstance(_end, Unset): - end = UNSET - else: - end = _end # type: ignore[arg-type] + relative = d.pop("relative", UNSET) - relative = d.pop("relative", UNSET) + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - line = cls( - end=end, - relative=relative, - type=type, - ) + line = cls( + end= end, + relative= relative, + type= type, + ) - line.additional_properties = d - return line + line.additional_properties = d + return line - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties UW = TypeVar("UW", bound="arc") - @attr.s(auto_attribs=True) class arc: - """A circular arc segment.""" # noqa: E501 + """ A circular arc segment. """ # noqa: E501 + angle_end: Union[Unset, float] = UNSET + angle_start: Union[Unset, float] = UNSET + center: Union[Unset, Point2d] = UNSET + radius: Union[Unset, float] = UNSET + relative: Union[Unset, bool] = False + type: str = "arc" - angle_end: Union[Unset, float] = UNSET - angle_start: Union[Unset, float] = UNSET - center: Union[Unset, Point2d] = UNSET - radius: Union[Unset, float] = UNSET - relative: Union[Unset, bool] = False - type: str = "arc" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + angle_end = self.angle_end + angle_start = self.angle_start + if not isinstance(self.center, Unset): + center = self.center + radius = self.radius + relative = self.relative + type = self.type - def to_dict(self) -> Dict[str, Any]: - angle_end = self.angle_end - angle_start = self.angle_start - if not isinstance(self.center, Unset): - center = self.center - radius = self.radius - relative = self.relative - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if angle_end is not UNSET: + field_dict['angle_end'] = angle_end + if angle_start is not UNSET: + field_dict['angle_start'] = angle_start + if center is not UNSET: + field_dict['center'] = center + if radius is not UNSET: + field_dict['radius'] = radius + if relative is not UNSET: + field_dict['relative'] = relative + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if angle_end is not UNSET: - field_dict["angle_end"] = angle_end - if angle_start is not UNSET: - field_dict["angle_start"] = angle_start - if center is not UNSET: - field_dict["center"] = center - if radius is not UNSET: - field_dict["radius"] = radius - if relative is not UNSET: - field_dict["relative"] = relative - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[UW], src_dict: Dict[str, Any]) -> UW: + d = src_dict.copy() + angle_end = d.pop("angle_end", UNSET) - @classmethod - def from_dict(cls: Type[UW], src_dict: Dict[str, Any]) -> UW: - d = src_dict.copy() - angle_end = d.pop("angle_end", UNSET) + angle_start = d.pop("angle_start", UNSET) - angle_start = d.pop("angle_start", UNSET) + _center = d.pop("center", UNSET) + center: Union[Unset, Point2d] + if isinstance(_center, Unset): + center = UNSET + else: + center = _center # type: ignore[arg-type] - _center = d.pop("center", UNSET) - center: Union[Unset, Point2d] - if isinstance(_center, Unset): - center = UNSET - else: - center = _center # type: ignore[arg-type] + radius = d.pop("radius", UNSET) - radius = d.pop("radius", UNSET) + relative = d.pop("relative", UNSET) - relative = d.pop("relative", UNSET) + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - arc = cls( - angle_end=angle_end, - angle_start=angle_start, - center=center, - radius=radius, - relative=relative, - type=type, - ) + arc = cls( + angle_end= angle_end, + angle_start= angle_start, + center= center, + radius= radius, + relative= relative, + type= type, + ) - arc.additional_properties = d - return arc + arc.additional_properties = d + return arc - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties MD = TypeVar("MD", bound="bezier") - @attr.s(auto_attribs=True) class bezier: - """A cubic bezier curve segment. Start at the end of the current line, go through control point 1 and 2, then end at a given point.""" # noqa: E501 + """ A cubic bezier curve segment. Start at the end of the current line, go through control point 1 and 2, then end at a given point. """ # noqa: E501 + control1: Union[Unset, Point3d] = UNSET + control2: Union[Unset, Point3d] = UNSET + end: Union[Unset, Point3d] = UNSET + relative: Union[Unset, bool] = False + type: str = "bezier" - control1: Union[Unset, Point3d] = UNSET - control2: Union[Unset, Point3d] = UNSET - end: Union[Unset, Point3d] = UNSET - relative: Union[Unset, bool] = False - type: str = "bezier" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.control1, Unset): + control1 = self.control1 + if not isinstance(self.control2, Unset): + control2 = self.control2 + if not isinstance(self.end, Unset): + end = self.end + relative = self.relative + type = self.type - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.control1, Unset): - control1 = self.control1 - if not isinstance(self.control2, Unset): - control2 = self.control2 - if not isinstance(self.end, Unset): - end = self.end - relative = self.relative - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if control1 is not UNSET: + field_dict['control1'] = control1 + if control2 is not UNSET: + field_dict['control2'] = control2 + if end is not UNSET: + field_dict['end'] = end + if relative is not UNSET: + field_dict['relative'] = relative + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if control1 is not UNSET: - field_dict["control1"] = control1 - if control2 is not UNSET: - field_dict["control2"] = control2 - if end is not UNSET: - field_dict["end"] = end - if relative is not UNSET: - field_dict["relative"] = relative - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[MD], src_dict: Dict[str, Any]) -> MD: + d = src_dict.copy() + _control1 = d.pop("control1", UNSET) + control1: Union[Unset, Point3d] + if isinstance(_control1, Unset): + control1 = UNSET + else: + control1 = _control1 # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[MD], src_dict: Dict[str, Any]) -> MD: - d = src_dict.copy() - _control1 = d.pop("control1", UNSET) - control1: Union[Unset, Point3d] - if isinstance(_control1, Unset): - control1 = UNSET - else: - control1 = _control1 # type: ignore[arg-type] + _control2 = d.pop("control2", UNSET) + control2: Union[Unset, Point3d] + if isinstance(_control2, Unset): + control2 = UNSET + else: + control2 = _control2 # type: ignore[arg-type] - _control2 = d.pop("control2", UNSET) - control2: Union[Unset, Point3d] - if isinstance(_control2, Unset): - control2 = UNSET - else: - control2 = _control2 # type: ignore[arg-type] + _end = d.pop("end", UNSET) + end: Union[Unset, Point3d] + if isinstance(_end, Unset): + end = UNSET + else: + end = _end # type: ignore[arg-type] - _end = d.pop("end", UNSET) - end: Union[Unset, Point3d] - if isinstance(_end, Unset): - end = UNSET - else: - end = _end # type: ignore[arg-type] + relative = d.pop("relative", UNSET) - relative = d.pop("relative", UNSET) + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - bezier = cls( - control1=control1, - control2=control2, - end=end, - relative=relative, - type=type, - ) + bezier = cls( + control1= control1, + control2= control2, + end= end, + relative= relative, + type= type, + ) - bezier.additional_properties = d - return bezier + bezier.additional_properties = d + return bezier - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties HD = TypeVar("HD", bound="tangential_arc") - @attr.s(auto_attribs=True) class tangential_arc: - """Adds a tangent arc from current pen position with the given radius and angle.""" # noqa: E501 + """ Adds a tangent arc from current pen position with the given radius and angle. """ # noqa: E501 + offset: Union[Unset, Angle] = UNSET + radius: Union[Unset, float] = UNSET + type: str = "tangential_arc" - offset: Union[Unset, Angle] = UNSET - radius: Union[Unset, float] = UNSET - type: str = "tangential_arc" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.offset, Unset): + offset = self.offset + radius = self.radius + type = self.type - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.offset, Unset): - offset = self.offset - radius = self.radius - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if offset is not UNSET: + field_dict['offset'] = offset + if radius is not UNSET: + field_dict['radius'] = radius + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if offset is not UNSET: - field_dict["offset"] = offset - if radius is not UNSET: - field_dict["radius"] = radius - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[HD], src_dict: Dict[str, Any]) -> HD: + d = src_dict.copy() + _offset = d.pop("offset", UNSET) + offset: Union[Unset, Angle] + if isinstance(_offset, Unset): + offset = UNSET + else: + offset = _offset # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[HD], src_dict: Dict[str, Any]) -> HD: - d = src_dict.copy() - _offset = d.pop("offset", UNSET) - offset: Union[Unset, Angle] - if isinstance(_offset, Unset): - offset = UNSET - else: - offset = _offset # type: ignore[arg-type] + radius = d.pop("radius", UNSET) - radius = d.pop("radius", UNSET) + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - tangential_arc = cls( - offset=offset, - radius=radius, - type=type, - ) + tangential_arc = cls( + offset= offset, + radius= radius, + type= type, + ) - tangential_arc.additional_properties = d - return tangential_arc + tangential_arc.additional_properties = d + return tangential_arc - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties UJ = TypeVar("UJ", bound="tangential_arc_to") - @attr.s(auto_attribs=True) class tangential_arc_to: - """Adds a tangent arc from current pen position to the new position.""" # noqa: E501 + """ Adds a tangent arc from current pen position to the new position. """ # noqa: E501 + angle_snap_increment: Union[Unset, Angle] = UNSET + to: Union[Unset, Point3d] = UNSET + type: str = "tangential_arc_to" - angle_snap_increment: Union[Unset, Angle] = UNSET - to: Union[Unset, Point3d] = UNSET - type: str = "tangential_arc_to" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.angle_snap_increment, Unset): + angle_snap_increment = self.angle_snap_increment + if not isinstance(self.to, Unset): + to = self.to + type = self.type - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.angle_snap_increment, Unset): - angle_snap_increment = self.angle_snap_increment - if not isinstance(self.to, Unset): - to = self.to - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if angle_snap_increment is not UNSET: + field_dict['angle_snap_increment'] = angle_snap_increment + if to is not UNSET: + field_dict['to'] = to + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if angle_snap_increment is not UNSET: - field_dict["angle_snap_increment"] = angle_snap_increment - if to is not UNSET: - field_dict["to"] = to - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[UJ], src_dict: Dict[str, Any]) -> UJ: + d = src_dict.copy() + _angle_snap_increment = d.pop("angle_snap_increment", UNSET) + angle_snap_increment: Union[Unset, Angle] + if isinstance(_angle_snap_increment, Unset): + angle_snap_increment = UNSET + else: + angle_snap_increment = _angle_snap_increment # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[UJ], src_dict: Dict[str, Any]) -> UJ: - d = src_dict.copy() - _angle_snap_increment = d.pop("angle_snap_increment", UNSET) - angle_snap_increment: Union[Unset, Angle] - if isinstance(_angle_snap_increment, Unset): - angle_snap_increment = UNSET - else: - angle_snap_increment = _angle_snap_increment # type: ignore[arg-type] + _to = d.pop("to", UNSET) + to: Union[Unset, Point3d] + if isinstance(_to, Unset): + to = UNSET + else: + to = _to # type: ignore[arg-type] - _to = d.pop("to", UNSET) - to: Union[Unset, Point3d] - if isinstance(_to, Unset): - to = UNSET - else: - to = _to # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - tangential_arc_to = cls( - angle_snap_increment=angle_snap_increment, - to=to, - type=type, - ) + tangential_arc_to = cls( + angle_snap_increment= angle_snap_increment, + to= to, + type= type, + ) - tangential_arc_to.additional_properties = d - return tangential_arc_to + tangential_arc_to.additional_properties = d + return tangential_arc_to - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + def __contains__(self, key: str) -> bool: + return key in self.additional_properties PathSegment = Union[line, arc, bezier, tangential_arc, tangential_arc_to] diff --git a/kittycad/models/path_segment_info.py b/kittycad/models/path_segment_info.py index e63d5a37b..f7e108878 100644 --- a/kittycad/models/path_segment_info.py +++ b/kittycad/models/path_segment_info.py @@ -8,76 +8,75 @@ from ..types import UNSET, Unset RU = TypeVar("RU", bound="PathSegmentInfo") - @attr.s(auto_attribs=True) class PathSegmentInfo: - """Info about a path segment""" # noqa: E501 + """ Info about a path segment """ # noqa: E501 + command: Union[Unset, PathCommand] = UNSET + command_id: Union[Unset, ModelingCmdId] = UNSET + relative: Union[Unset, bool] = False - command: Union[Unset, PathCommand] = UNSET - command_id: Union[Unset, ModelingCmdId] = UNSET - relative: Union[Unset, bool] = False + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.command, Unset): + command = self.command + if not isinstance(self.command_id, Unset): + command_id = self.command_id + relative = self.relative - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.command, Unset): - command = self.command - if not isinstance(self.command_id, Unset): - command_id = self.command_id - relative = self.relative + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if command is not UNSET: + field_dict['command'] = command + if command_id is not UNSET: + field_dict['command_id'] = command_id + if relative is not UNSET: + field_dict['relative'] = relative - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if command is not UNSET: - field_dict["command"] = command - if command_id is not UNSET: - field_dict["command_id"] = command_id - if relative is not UNSET: - field_dict["relative"] = relative + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[RU], src_dict: Dict[str, Any]) -> RU: + d = src_dict.copy() + _command = d.pop("command", UNSET) + command: Union[Unset, PathCommand] + if isinstance(_command, Unset): + command = UNSET + else: + command = _command # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[RU], src_dict: Dict[str, Any]) -> RU: - d = src_dict.copy() - _command = d.pop("command", UNSET) - command: Union[Unset, PathCommand] - if isinstance(_command, Unset): - command = UNSET - else: - command = _command # type: ignore[arg-type] + _command_id = d.pop("command_id", UNSET) + command_id: Union[Unset, ModelingCmdId] + if isinstance(_command_id, Unset): + command_id = UNSET + else: + command_id = _command_id # type: ignore[arg-type] - _command_id = d.pop("command_id", UNSET) - command_id: Union[Unset, ModelingCmdId] - if isinstance(_command_id, Unset): - command_id = UNSET - else: - command_id = _command_id # type: ignore[arg-type] + relative = d.pop("relative", UNSET) - relative = d.pop("relative", UNSET) - path_segment_info = cls( - command=command, - command_id=command_id, - relative=relative, - ) + path_segment_info = cls( + command= command, + command_id= command_id, + relative= relative, + ) - path_segment_info.additional_properties = d - return path_segment_info + path_segment_info.additional_properties = d + return path_segment_info - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/payment_intent.py b/kittycad/models/payment_intent.py index 67637a0d9..617912a57 100644 --- a/kittycad/models/payment_intent.py +++ b/kittycad/models/payment_intent.py @@ -6,50 +6,49 @@ from ..types import UNSET, Unset DL = TypeVar("DL", bound="PaymentIntent") - @attr.s(auto_attribs=True) class PaymentIntent: - """A payment intent response.""" # noqa: E501 + """ A payment intent response. """ # noqa: E501 + client_secret: Union[Unset, str] = UNSET - client_secret: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + client_secret = self.client_secret - def to_dict(self) -> Dict[str, Any]: - client_secret = self.client_secret + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if client_secret is not UNSET: + field_dict['client_secret'] = client_secret - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if client_secret is not UNSET: - field_dict["client_secret"] = client_secret + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[DL], src_dict: Dict[str, Any]) -> DL: + d = src_dict.copy() + client_secret = d.pop("client_secret", UNSET) - @classmethod - def from_dict(cls: Type[DL], src_dict: Dict[str, Any]) -> DL: - d = src_dict.copy() - client_secret = d.pop("client_secret", UNSET) - payment_intent = cls( - client_secret=client_secret, - ) + payment_intent = cls( + client_secret= client_secret, + ) - payment_intent.additional_properties = d - return payment_intent + payment_intent.additional_properties = d + return payment_intent - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/payment_method.py b/kittycad/models/payment_method.py index 78225701f..971ec65e7 100644 --- a/kittycad/models/payment_method.py +++ b/kittycad/models/payment_method.py @@ -11,111 +11,110 @@ from ..types import UNSET, Unset QT = TypeVar("QT", bound="PaymentMethod") - @attr.s(auto_attribs=True) class PaymentMethod: - """A payment method.""" # noqa: E501 + """ A payment method. """ # noqa: E501 + billing_info: Union[Unset, BillingInfo] = UNSET + card: Union[Unset, CardDetails] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + id: Union[Unset, str] = UNSET + metadata: Union[Unset, Dict[str, str]] = UNSET + type: Union[Unset, PaymentMethodType] = UNSET - billing_info: Union[Unset, BillingInfo] = UNSET - card: Union[Unset, CardDetails] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - id: Union[Unset, str] = UNSET - metadata: Union[Unset, Dict[str, str]] = UNSET - type: Union[Unset, PaymentMethodType] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.billing_info, Unset): + billing_info = self.billing_info + if not isinstance(self.card, Unset): + card = self.card + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + id = self.id + metadata = self.metadata - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.billing_info, Unset): - billing_info = self.billing_info - if not isinstance(self.card, Unset): - card = self.card - created_at: Union[Unset, str] = UNSET - if not isinstance(self.created_at, Unset): - created_at = self.created_at.isoformat() - id = self.id - metadata = self.metadata + if not isinstance(self.type, Unset): + type = self.type - if not isinstance(self.type, Unset): - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if billing_info is not UNSET: + field_dict['billing_info'] = billing_info + if card is not UNSET: + field_dict['card'] = card + if created_at is not UNSET: + field_dict['created_at'] = created_at + if id is not UNSET: + field_dict['id'] = id + if metadata is not UNSET: + field_dict['metadata'] = metadata + if type is not UNSET: + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if billing_info is not UNSET: - field_dict["billing_info"] = billing_info - if card is not UNSET: - field_dict["card"] = card - if created_at is not UNSET: - field_dict["created_at"] = created_at - if id is not UNSET: - field_dict["id"] = id - if metadata is not UNSET: - field_dict["metadata"] = metadata - if type is not UNSET: - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[QT], src_dict: Dict[str, Any]) -> QT: + d = src_dict.copy() + _billing_info = d.pop("billing_info", UNSET) + billing_info: Union[Unset, BillingInfo] + if isinstance(_billing_info, Unset): + billing_info = UNSET + else: + billing_info = _billing_info # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[QT], src_dict: Dict[str, Any]) -> QT: - d = src_dict.copy() - _billing_info = d.pop("billing_info", UNSET) - billing_info: Union[Unset, BillingInfo] - if isinstance(_billing_info, Unset): - billing_info = UNSET - else: - billing_info = _billing_info # type: ignore[arg-type] + _card = d.pop("card", UNSET) + card: Union[Unset, CardDetails] + if isinstance(_card, Unset): + card = UNSET + else: + card = _card # type: ignore[arg-type] - _card = d.pop("card", UNSET) - card: Union[Unset, CardDetails] - if isinstance(_card, Unset): - card = UNSET - else: - card = _card # type: ignore[arg-type] + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) - _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) + id = d.pop("id", UNSET) - id = d.pop("id", UNSET) + metadata = d.pop("metadata", UNSET) - metadata = d.pop("metadata", UNSET) + _type = d.pop("type", UNSET) + type: Union[Unset, PaymentMethodType] + if isinstance(_type, Unset): + type = UNSET + else: + type = _type # type: ignore[arg-type] - _type = d.pop("type", UNSET) - type: Union[Unset, PaymentMethodType] - if isinstance(_type, Unset): - type = UNSET - else: - type = _type # type: ignore[arg-type] - payment_method = cls( - billing_info=billing_info, - card=card, - created_at=created_at, - id=id, - metadata=metadata, - type=type, - ) + payment_method = cls( + billing_info= billing_info, + card= card, + created_at= created_at, + id= id, + metadata= metadata, + type= type, + ) - payment_method.additional_properties = d - return payment_method + payment_method.additional_properties = d + return payment_method - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/payment_method_card_checks.py b/kittycad/models/payment_method_card_checks.py index 753024397..fccf8bae1 100644 --- a/kittycad/models/payment_method_card_checks.py +++ b/kittycad/models/payment_method_card_checks.py @@ -6,64 +6,63 @@ from ..types import UNSET, Unset PT = TypeVar("PT", bound="PaymentMethodCardChecks") - @attr.s(auto_attribs=True) class PaymentMethodCardChecks: - """Card checks.""" # noqa: E501 + """ Card checks. """ # noqa: E501 + address_line1_check: Union[Unset, str] = UNSET + address_postal_code_check: Union[Unset, str] = UNSET + cvc_check: Union[Unset, str] = UNSET - address_line1_check: Union[Unset, str] = UNSET - address_postal_code_check: Union[Unset, str] = UNSET - cvc_check: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + address_line1_check = self.address_line1_check + address_postal_code_check = self.address_postal_code_check + cvc_check = self.cvc_check - def to_dict(self) -> Dict[str, Any]: - address_line1_check = self.address_line1_check - address_postal_code_check = self.address_postal_code_check - cvc_check = self.cvc_check + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if address_line1_check is not UNSET: + field_dict['address_line1_check'] = address_line1_check + if address_postal_code_check is not UNSET: + field_dict['address_postal_code_check'] = address_postal_code_check + if cvc_check is not UNSET: + field_dict['cvc_check'] = cvc_check - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if address_line1_check is not UNSET: - field_dict["address_line1_check"] = address_line1_check - if address_postal_code_check is not UNSET: - field_dict["address_postal_code_check"] = address_postal_code_check - if cvc_check is not UNSET: - field_dict["cvc_check"] = cvc_check + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[PT], src_dict: Dict[str, Any]) -> PT: + d = src_dict.copy() + address_line1_check = d.pop("address_line1_check", UNSET) - @classmethod - def from_dict(cls: Type[PT], src_dict: Dict[str, Any]) -> PT: - d = src_dict.copy() - address_line1_check = d.pop("address_line1_check", UNSET) + address_postal_code_check = d.pop("address_postal_code_check", UNSET) - address_postal_code_check = d.pop("address_postal_code_check", UNSET) + cvc_check = d.pop("cvc_check", UNSET) - cvc_check = d.pop("cvc_check", UNSET) - payment_method_card_checks = cls( - address_line1_check=address_line1_check, - address_postal_code_check=address_postal_code_check, - cvc_check=cvc_check, - ) + payment_method_card_checks = cls( + address_line1_check= address_line1_check, + address_postal_code_check= address_postal_code_check, + cvc_check= cvc_check, + ) - payment_method_card_checks.additional_properties = d - return payment_method_card_checks + payment_method_card_checks.additional_properties = d + return payment_method_card_checks - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/payment_method_type.py b/kittycad/models/payment_method_type.py index 42ecce2dd..ec74e722f 100644 --- a/kittycad/models/payment_method_type.py +++ b/kittycad/models/payment_method_type.py @@ -2,10 +2,9 @@ from enum import Enum class PaymentMethodType(str, Enum): - """An enum representing the possible values of an `PaymentMethod`'s `type` field.""" # noqa: E501 + """ An enum representing the possible values of an `PaymentMethod`'s `type` field. """ # noqa: E501 + """# A card payment method. """ # noqa: E501 + CARD = 'card' - """# A card payment method. """ # noqa: E501 - CARD = "card" - - def __str__(self) -> str: - return str(self.value) + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/plane_intersect_and_project.py b/kittycad/models/plane_intersect_and_project.py index 67e2a5da0..3874aa3f2 100644 --- a/kittycad/models/plane_intersect_and_project.py +++ b/kittycad/models/plane_intersect_and_project.py @@ -7,56 +7,55 @@ from ..types import UNSET, Unset HR = TypeVar("HR", bound="PlaneIntersectAndProject") - @attr.s(auto_attribs=True) class PlaneIntersectAndProject: - """Corresponding coordinates of given window coordinates, intersected on given plane.""" # noqa: E501 + """ Corresponding coordinates of given window coordinates, intersected on given plane. """ # noqa: E501 + plane_coordinates: Union[Unset, Point2d] = UNSET - plane_coordinates: Union[Unset, Point2d] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.plane_coordinates, Unset): + plane_coordinates = self.plane_coordinates - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.plane_coordinates, Unset): - plane_coordinates = self.plane_coordinates + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if plane_coordinates is not UNSET: + field_dict['plane_coordinates'] = plane_coordinates - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if plane_coordinates is not UNSET: - field_dict["plane_coordinates"] = plane_coordinates + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[HR], src_dict: Dict[str, Any]) -> HR: + d = src_dict.copy() + _plane_coordinates = d.pop("plane_coordinates", UNSET) + plane_coordinates: Union[Unset, Point2d] + if isinstance(_plane_coordinates, Unset): + plane_coordinates = UNSET + else: + plane_coordinates = _plane_coordinates # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[HR], src_dict: Dict[str, Any]) -> HR: - d = src_dict.copy() - _plane_coordinates = d.pop("plane_coordinates", UNSET) - plane_coordinates: Union[Unset, Point2d] - if isinstance(_plane_coordinates, Unset): - plane_coordinates = UNSET - else: - plane_coordinates = _plane_coordinates # type: ignore[arg-type] - plane_intersect_and_project = cls( - plane_coordinates=plane_coordinates, - ) + plane_intersect_and_project = cls( + plane_coordinates= plane_coordinates, + ) - plane_intersect_and_project.additional_properties = d - return plane_intersect_and_project + plane_intersect_and_project.additional_properties = d + return plane_intersect_and_project - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/ply_storage.py b/kittycad/models/ply_storage.py index 7c48b864d..8bf73b8a7 100644 --- a/kittycad/models/ply_storage.py +++ b/kittycad/models/ply_storage.py @@ -2,14 +2,13 @@ from enum import Enum class PlyStorage(str, Enum): - """The storage for the output PLY file.""" # noqa: E501 + """ The storage for the output PLY file. """ # noqa: E501 + """# Write numbers in their ascii representation (e.g. -13, 6.28, etc.). Properties are separated by spaces and elements are separated by line breaks. """ # noqa: E501 + ASCII = 'ascii' + """# Encode payload as binary using little endian. """ # noqa: E501 + BINARY_LITTLE_ENDIAN = 'binary_little_endian' + """# Encode payload as binary using big endian. """ # noqa: E501 + BINARY_BIG_ENDIAN = 'binary_big_endian' - """# Write numbers in their ascii representation (e.g. -13, 6.28, etc.). Properties are separated by spaces and elements are separated by line breaks. """ # noqa: E501 - ASCII = "ascii" - """# Encode payload as binary using little endian. """ # noqa: E501 - BINARY_LITTLE_ENDIAN = "binary_little_endian" - """# Encode payload as binary using big endian. """ # noqa: E501 - BINARY_BIG_ENDIAN = "binary_big_endian" - - def __str__(self) -> str: - return str(self.value) + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/point2d.py b/kittycad/models/point2d.py index 0e38b82e7..4a67d6eb6 100644 --- a/kittycad/models/point2d.py +++ b/kittycad/models/point2d.py @@ -6,57 +6,56 @@ from ..types import UNSET, Unset VF = TypeVar("VF", bound="Point2d") - @attr.s(auto_attribs=True) class Point2d: - """A point in 2D space""" # noqa: E501 + """ A point in 2D space """ # noqa: E501 + x: Union[Unset, float] = UNSET + y: Union[Unset, float] = UNSET - x: Union[Unset, float] = UNSET - y: Union[Unset, float] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + x = self.x + y = self.y - def to_dict(self) -> Dict[str, Any]: - x = self.x - y = self.y + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if x is not UNSET: + field_dict['x'] = x + if y is not UNSET: + field_dict['y'] = y - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if x is not UNSET: - field_dict["x"] = x - if y is not UNSET: - field_dict["y"] = y + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[VF], src_dict: Dict[str, Any]) -> VF: + d = src_dict.copy() + x = d.pop("x", UNSET) - @classmethod - def from_dict(cls: Type[VF], src_dict: Dict[str, Any]) -> VF: - d = src_dict.copy() - x = d.pop("x", UNSET) + y = d.pop("y", UNSET) - y = d.pop("y", UNSET) - point2d = cls( - x=x, - y=y, - ) + point2d = cls( + x= x, + y= y, + ) - point2d.additional_properties = d - return point2d + point2d.additional_properties = d + return point2d - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/point3d.py b/kittycad/models/point3d.py index f3e2e0171..22186534b 100644 --- a/kittycad/models/point3d.py +++ b/kittycad/models/point3d.py @@ -6,64 +6,63 @@ from ..types import UNSET, Unset VM = TypeVar("VM", bound="Point3d") - @attr.s(auto_attribs=True) class Point3d: - """A point in 3D space""" # noqa: E501 + """ A point in 3D space """ # noqa: E501 + x: Union[Unset, float] = UNSET + y: Union[Unset, float] = UNSET + z: Union[Unset, float] = UNSET - x: Union[Unset, float] = UNSET - y: Union[Unset, float] = UNSET - z: Union[Unset, float] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + x = self.x + y = self.y + z = self.z - def to_dict(self) -> Dict[str, Any]: - x = self.x - y = self.y - z = self.z + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if x is not UNSET: + field_dict['x'] = x + if y is not UNSET: + field_dict['y'] = y + if z is not UNSET: + field_dict['z'] = z - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if x is not UNSET: - field_dict["x"] = x - if y is not UNSET: - field_dict["y"] = y - if z is not UNSET: - field_dict["z"] = z + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[VM], src_dict: Dict[str, Any]) -> VM: + d = src_dict.copy() + x = d.pop("x", UNSET) - @classmethod - def from_dict(cls: Type[VM], src_dict: Dict[str, Any]) -> VM: - d = src_dict.copy() - x = d.pop("x", UNSET) + y = d.pop("y", UNSET) - y = d.pop("y", UNSET) + z = d.pop("z", UNSET) - z = d.pop("z", UNSET) - point3d = cls( - x=x, - y=y, - z=z, - ) + point3d = cls( + x= x, + y= y, + z= z, + ) - point3d.additional_properties = d - return point3d + point3d.additional_properties = d + return point3d - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/point_e_metadata.py b/kittycad/models/point_e_metadata.py index b80dc0245..726dd06ba 100644 --- a/kittycad/models/point_e_metadata.py +++ b/kittycad/models/point_e_metadata.py @@ -6,52 +6,51 @@ from ..types import UNSET, Unset WH = TypeVar("WH", bound="PointEMetadata") - @attr.s(auto_attribs=True) class PointEMetadata: - """Metadata about our point-e instance. + """ Metadata about our point-e instance. - This is mostly used for internal purposes and debugging.""" # noqa: E501 +This is mostly used for internal purposes and debugging. """ # noqa: E501 + ok: Union[Unset, bool] = False - ok: Union[Unset, bool] = False + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + ok = self.ok - def to_dict(self) -> Dict[str, Any]: - ok = self.ok + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if ok is not UNSET: + field_dict['ok'] = ok - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if ok is not UNSET: - field_dict["ok"] = ok + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[WH], src_dict: Dict[str, Any]) -> WH: + d = src_dict.copy() + ok = d.pop("ok", UNSET) - @classmethod - def from_dict(cls: Type[WH], src_dict: Dict[str, Any]) -> WH: - d = src_dict.copy() - ok = d.pop("ok", UNSET) - point_e_metadata = cls( - ok=ok, - ) + point_e_metadata = cls( + ok= ok, + ) - point_e_metadata.additional_properties = d - return point_e_metadata + point_e_metadata.additional_properties = d + return point_e_metadata - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/pong.py b/kittycad/models/pong.py index 2ecba6178..e5cb5207b 100644 --- a/kittycad/models/pong.py +++ b/kittycad/models/pong.py @@ -6,50 +6,49 @@ from ..types import UNSET, Unset DQ = TypeVar("DQ", bound="Pong") - @attr.s(auto_attribs=True) class Pong: - """The response from the `/ping` endpoint.""" # noqa: E501 + """ The response from the `/ping` endpoint. """ # noqa: E501 + message: Union[Unset, str] = UNSET - message: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + message = self.message - def to_dict(self) -> Dict[str, Any]: - message = self.message + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if message is not UNSET: + field_dict['message'] = message - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if message is not UNSET: - field_dict["message"] = message + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[DQ], src_dict: Dict[str, Any]) -> DQ: + d = src_dict.copy() + message = d.pop("message", UNSET) - @classmethod - def from_dict(cls: Type[DQ], src_dict: Dict[str, Any]) -> DQ: - d = src_dict.copy() - message = d.pop("message", UNSET) - pong = cls( - message=message, - ) + pong = cls( + message= message, + ) - pong.additional_properties = d - return pong + pong.additional_properties = d + return pong - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/raw_file.py b/kittycad/models/raw_file.py index 3ad70fc1c..93685a3e3 100644 --- a/kittycad/models/raw_file.py +++ b/kittycad/models/raw_file.py @@ -6,59 +6,58 @@ from ..types import UNSET, Unset UY = TypeVar("UY", bound="RawFile") - @attr.s(auto_attribs=True) class RawFile: - """A raw file with unencoded contents to be passed over binary websockets.""" # noqa: E501 + """ A raw file with unencoded contents to be passed over binary websockets. """ # noqa: E501 + contents: Union[Unset, List[int]] = UNSET + name: Union[Unset, str] = UNSET - contents: Union[Unset, List[int]] = UNSET - name: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + contents: Union[Unset, List[int]] = UNSET + if not isinstance(self.contents, Unset): + contents = self.contents + name = self.name - def to_dict(self) -> Dict[str, Any]: - contents: Union[Unset, List[int]] = UNSET - if not isinstance(self.contents, Unset): - contents = self.contents - name = self.name + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if contents is not UNSET: + field_dict['contents'] = contents + if name is not UNSET: + field_dict['name'] = name - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if contents is not UNSET: - field_dict["contents"] = contents - if name is not UNSET: - field_dict["name"] = name + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[UY], src_dict: Dict[str, Any]) -> UY: + d = src_dict.copy() + contents = cast(List[int], d.pop("contents", UNSET)) - @classmethod - def from_dict(cls: Type[UY], src_dict: Dict[str, Any]) -> UY: - d = src_dict.copy() - contents = cast(List[int], d.pop("contents", UNSET)) + name = d.pop("name", UNSET) - name = d.pop("name", UNSET) - raw_file = cls( - contents=contents, - name=name, - ) + raw_file = cls( + contents= contents, + name= name, + ) - raw_file.additional_properties = d - return raw_file + raw_file.additional_properties = d + return raw_file - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/rtc_ice_candidate_init.py b/kittycad/models/rtc_ice_candidate_init.py index 2c9c3bf09..335d98822 100644 --- a/kittycad/models/rtc_ice_candidate_init.py +++ b/kittycad/models/rtc_ice_candidate_init.py @@ -6,71 +6,70 @@ from ..types import UNSET, Unset PD = TypeVar("PD", bound="RtcIceCandidateInit") - @attr.s(auto_attribs=True) class RtcIceCandidateInit: - """ICECandidateInit is used to serialize ice candidates""" # noqa: E501 + """ ICECandidateInit is used to serialize ice candidates """ # noqa: E501 + candidate: Union[Unset, str] = UNSET + sdp_m_line_index: Union[Unset, int] = UNSET + sdp_mid: Union[Unset, str] = UNSET + username_fragment: Union[Unset, str] = UNSET - candidate: Union[Unset, str] = UNSET - sdp_m_line_index: Union[Unset, int] = UNSET - sdp_mid: Union[Unset, str] = UNSET - username_fragment: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + candidate = self.candidate + sdp_m_line_index = self.sdp_m_line_index + sdp_mid = self.sdp_mid + username_fragment = self.username_fragment - def to_dict(self) -> Dict[str, Any]: - candidate = self.candidate - sdp_m_line_index = self.sdp_m_line_index - sdp_mid = self.sdp_mid - username_fragment = self.username_fragment + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if candidate is not UNSET: + field_dict['candidate'] = candidate + if sdp_m_line_index is not UNSET: + field_dict['sdpMLineIndex'] = sdp_m_line_index + if sdp_mid is not UNSET: + field_dict['sdpMid'] = sdp_mid + if username_fragment is not UNSET: + field_dict['usernameFragment'] = username_fragment - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if candidate is not UNSET: - field_dict["candidate"] = candidate - if sdp_m_line_index is not UNSET: - field_dict["sdpMLineIndex"] = sdp_m_line_index - if sdp_mid is not UNSET: - field_dict["sdpMid"] = sdp_mid - if username_fragment is not UNSET: - field_dict["usernameFragment"] = username_fragment + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[PD], src_dict: Dict[str, Any]) -> PD: + d = src_dict.copy() + candidate = d.pop("candidate", UNSET) - @classmethod - def from_dict(cls: Type[PD], src_dict: Dict[str, Any]) -> PD: - d = src_dict.copy() - candidate = d.pop("candidate", UNSET) + sdp_m_line_index = d.pop("sdpMLineIndex", UNSET) - sdp_m_line_index = d.pop("sdpMLineIndex", UNSET) + sdp_mid = d.pop("sdpMid", UNSET) - sdp_mid = d.pop("sdpMid", UNSET) + username_fragment = d.pop("usernameFragment", UNSET) - username_fragment = d.pop("usernameFragment", UNSET) - rtc_ice_candidate_init = cls( - candidate=candidate, - sdp_m_line_index=sdp_m_line_index, - sdp_mid=sdp_mid, - username_fragment=username_fragment, - ) + rtc_ice_candidate_init = cls( + candidate= candidate, + sdp_m_line_index= sdp_m_line_index, + sdp_mid= sdp_mid, + username_fragment= username_fragment, + ) - rtc_ice_candidate_init.additional_properties = d - return rtc_ice_candidate_init + rtc_ice_candidate_init.additional_properties = d + return rtc_ice_candidate_init - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/rtc_sdp_type.py b/kittycad/models/rtc_sdp_type.py index d8f67675c..3035291ad 100644 --- a/kittycad/models/rtc_sdp_type.py +++ b/kittycad/models/rtc_sdp_type.py @@ -2,18 +2,17 @@ from enum import Enum class RtcSdpType(str, Enum): - """SDPType describes the type of an SessionDescription.""" # noqa: E501 + """ SDPType describes the type of an SessionDescription. """ # noqa: E501 + """# Unspecified indicates that the type is unspecified. """ # noqa: E501 + UNSPECIFIED = 'unspecified' + """# indicates that a description MUST be treated as an SDP offer. """ # noqa: E501 + OFFER = 'offer' + """# indicates that a description MUST be treated as an SDP answer, but not a final answer. A description used as an SDP pranswer may be applied as a response to an SDP offer, or an update to a previously sent SDP pranswer. """ # noqa: E501 + PRANSWER = 'pranswer' + """# indicates that a description MUST be treated as an SDP final answer, and the offer-answer exchange MUST be considered complete. A description used as an SDP answer may be applied as a response to an SDP offer or as an update to a previously sent SDP pranswer. """ # noqa: E501 + ANSWER = 'answer' + """# indicates that a description MUST be treated as canceling the current SDP negotiation and moving the SDP offer and answer back to what it was in the previous stable state. Note the local or remote SDP descriptions in the previous stable state could be null if there has not yet been a successful offer-answer negotiation. """ # noqa: E501 + ROLLBACK = 'rollback' - """# Unspecified indicates that the type is unspecified. """ # noqa: E501 - UNSPECIFIED = "unspecified" - """# indicates that a description MUST be treated as an SDP offer. """ # noqa: E501 - OFFER = "offer" - """# indicates that a description MUST be treated as an SDP answer, but not a final answer. A description used as an SDP pranswer may be applied as a response to an SDP offer, or an update to a previously sent SDP pranswer. """ # noqa: E501 - PRANSWER = "pranswer" - """# indicates that a description MUST be treated as an SDP final answer, and the offer-answer exchange MUST be considered complete. A description used as an SDP answer may be applied as a response to an SDP offer or as an update to a previously sent SDP pranswer. """ # noqa: E501 - ANSWER = "answer" - """# indicates that a description MUST be treated as canceling the current SDP negotiation and moving the SDP offer and answer back to what it was in the previous stable state. Note the local or remote SDP descriptions in the previous stable state could be null if there has not yet been a successful offer-answer negotiation. """ # noqa: E501 - ROLLBACK = "rollback" - - def __str__(self) -> str: - return str(self.value) + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/rtc_session_description.py b/kittycad/models/rtc_session_description.py index 60dbae768..1661a0422 100644 --- a/kittycad/models/rtc_session_description.py +++ b/kittycad/models/rtc_session_description.py @@ -7,63 +7,62 @@ from ..types import UNSET, Unset SM = TypeVar("SM", bound="RtcSessionDescription") - @attr.s(auto_attribs=True) class RtcSessionDescription: - """SessionDescription is used to expose local and remote session descriptions.""" # noqa: E501 + """ SessionDescription is used to expose local and remote session descriptions. """ # noqa: E501 + sdp: Union[Unset, str] = UNSET + type: Union[Unset, RtcSdpType] = UNSET - sdp: Union[Unset, str] = UNSET - type: Union[Unset, RtcSdpType] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + sdp = self.sdp + if not isinstance(self.type, Unset): + type = self.type - def to_dict(self) -> Dict[str, Any]: - sdp = self.sdp - if not isinstance(self.type, Unset): - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if sdp is not UNSET: + field_dict['sdp'] = sdp + if type is not UNSET: + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if sdp is not UNSET: - field_dict["sdp"] = sdp - if type is not UNSET: - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[SM], src_dict: Dict[str, Any]) -> SM: + d = src_dict.copy() + sdp = d.pop("sdp", UNSET) - @classmethod - def from_dict(cls: Type[SM], src_dict: Dict[str, Any]) -> SM: - d = src_dict.copy() - sdp = d.pop("sdp", UNSET) + _type = d.pop("type", UNSET) + type: Union[Unset, RtcSdpType] + if isinstance(_type, Unset): + type = UNSET + else: + type = _type # type: ignore[arg-type] - _type = d.pop("type", UNSET) - type: Union[Unset, RtcSdpType] - if isinstance(_type, Unset): - type = UNSET - else: - type = _type # type: ignore[arg-type] - rtc_session_description = cls( - sdp=sdp, - type=type, - ) + rtc_session_description = cls( + sdp= sdp, + type= type, + ) - rtc_session_description.additional_properties = d - return rtc_session_description + rtc_session_description.additional_properties = d + return rtc_session_description - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/scene_selection_type.py b/kittycad/models/scene_selection_type.py index a4e705295..bb177d028 100644 --- a/kittycad/models/scene_selection_type.py +++ b/kittycad/models/scene_selection_type.py @@ -2,14 +2,13 @@ from enum import Enum class SceneSelectionType(str, Enum): - """The type of scene selection change""" # noqa: E501 + """ The type of scene selection change """ # noqa: E501 + """# Replaces the selection """ # noqa: E501 + REPLACE = 'replace' + """# Adds to the selection """ # noqa: E501 + ADD = 'add' + """# Removes from the selection """ # noqa: E501 + REMOVE = 'remove' - """# Replaces the selection """ # noqa: E501 - REPLACE = "replace" - """# Adds to the selection """ # noqa: E501 - ADD = "add" - """# Removes from the selection """ # noqa: E501 - REMOVE = "remove" - - def __str__(self) -> str: - return str(self.value) + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/scene_tool_type.py b/kittycad/models/scene_tool_type.py index 70354f3a2..0b6c40d67 100644 --- a/kittycad/models/scene_tool_type.py +++ b/kittycad/models/scene_tool_type.py @@ -2,14 +2,13 @@ from enum import Enum class SceneToolType(str, Enum): - """The type of scene's active tool""" # noqa: E501 + """ The type of scene's active tool """ # noqa: E501 + CAMERA_REVOLVE = 'camera_revolve' + SELECT = 'select' + MOVE = 'move' + SKETCH_LINE = 'sketch_line' + SKETCH_CURVE = 'sketch_curve' + SKETCH_CURVE_MOD = 'sketch_curve_mod' - CAMERA_REVOLVE = "camera_revolve" - SELECT = "select" - MOVE = "move" - SKETCH_LINE = "sketch_line" - SKETCH_CURVE = "sketch_curve" - SKETCH_CURVE_MOD = "sketch_curve_mod" - - def __str__(self) -> str: - return str(self.value) + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/select_get.py b/kittycad/models/select_get.py index cac7d666d..70c00e1b2 100644 --- a/kittycad/models/select_get.py +++ b/kittycad/models/select_get.py @@ -6,52 +6,51 @@ from ..types import UNSET, Unset JL = TypeVar("JL", bound="SelectGet") - @attr.s(auto_attribs=True) class SelectGet: - """The response from the `SelectGet` command.""" # noqa: E501 + """ The response from the `SelectGet` command. """ # noqa: E501 + entity_ids: Union[Unset, List[str]] = UNSET - entity_ids: Union[Unset, List[str]] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + entity_ids: Union[Unset, List[str]] = UNSET + if not isinstance(self.entity_ids, Unset): + entity_ids = self.entity_ids - def to_dict(self) -> Dict[str, Any]: - entity_ids: Union[Unset, List[str]] = UNSET - if not isinstance(self.entity_ids, Unset): - entity_ids = self.entity_ids + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entity_ids is not UNSET: + field_dict['entity_ids'] = entity_ids - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if entity_ids is not UNSET: - field_dict["entity_ids"] = entity_ids + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[JL], src_dict: Dict[str, Any]) -> JL: + d = src_dict.copy() + entity_ids = cast(List[str], d.pop("entity_ids", UNSET)) - @classmethod - def from_dict(cls: Type[JL], src_dict: Dict[str, Any]) -> JL: - d = src_dict.copy() - entity_ids = cast(List[str], d.pop("entity_ids", UNSET)) - select_get = cls( - entity_ids=entity_ids, - ) + select_get = cls( + entity_ids= entity_ids, + ) - select_get.additional_properties = d - return select_get + select_get.additional_properties = d + return select_get - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/select_with_point.py b/kittycad/models/select_with_point.py index 771f732a2..7f4779a52 100644 --- a/kittycad/models/select_with_point.py +++ b/kittycad/models/select_with_point.py @@ -6,50 +6,49 @@ from ..types import UNSET, Unset CG = TypeVar("CG", bound="SelectWithPoint") - @attr.s(auto_attribs=True) class SelectWithPoint: - """The response from the `SelectWithPoint` command.""" # noqa: E501 + """ The response from the `SelectWithPoint` command. """ # noqa: E501 + entity_id: Union[Unset, str] = UNSET - entity_id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + entity_id = self.entity_id - def to_dict(self) -> Dict[str, Any]: - entity_id = self.entity_id + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if entity_id is not UNSET: + field_dict['entity_id'] = entity_id - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if entity_id is not UNSET: - field_dict["entity_id"] = entity_id + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[CG], src_dict: Dict[str, Any]) -> CG: + d = src_dict.copy() + entity_id = d.pop("entity_id", UNSET) - @classmethod - def from_dict(cls: Type[CG], src_dict: Dict[str, Any]) -> CG: - d = src_dict.copy() - entity_id = d.pop("entity_id", UNSET) - select_with_point = cls( - entity_id=entity_id, - ) + select_with_point = cls( + entity_id= entity_id, + ) - select_with_point.additional_properties = d - return select_with_point + select_with_point.additional_properties = d + return select_with_point - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/session.py b/kittycad/models/session.py index 9e8e1e4f1..e52d3c33b 100644 --- a/kittycad/models/session.py +++ b/kittycad/models/session.py @@ -9,113 +9,112 @@ from ..types import UNSET, Unset QA = TypeVar("QA", bound="Session") - @attr.s(auto_attribs=True) class Session: - """An authentication session. + """ An authentication session. - For our UIs, these are automatically created by Next.js.""" # noqa: E501 +For our UIs, these are automatically created by Next.js. """ # noqa: E501 + created_at: Union[Unset, datetime.datetime] = UNSET + expires: Union[Unset, datetime.datetime] = UNSET + id: Union[Unset, str] = UNSET + session_token: Union[Unset, str] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - expires: Union[Unset, datetime.datetime] = UNSET - id: Union[Unset, str] = UNSET - session_token: Union[Unset, str] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + expires: Union[Unset, str] = UNSET + if not isinstance(self.expires, Unset): + expires = self.expires.isoformat() + id = self.id + session_token = self.session_token + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id - def to_dict(self) -> Dict[str, Any]: - created_at: Union[Unset, str] = UNSET - if not isinstance(self.created_at, Unset): - created_at = self.created_at.isoformat() - expires: Union[Unset, str] = UNSET - if not isinstance(self.expires, Unset): - expires = self.expires.isoformat() - id = self.id - session_token = self.session_token - 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 created_at is not UNSET: + field_dict['created_at'] = created_at + if expires is not UNSET: + field_dict['expires'] = expires + if id is not UNSET: + field_dict['id'] = id + if session_token is not UNSET: + field_dict['session_token'] = session_token + if updated_at is not UNSET: + field_dict['updated_at'] = updated_at + if user_id is not UNSET: + field_dict['user_id'] = user_id - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if created_at is not UNSET: - field_dict["created_at"] = created_at - if expires is not UNSET: - field_dict["expires"] = expires - if id is not UNSET: - field_dict["id"] = id - if session_token is not UNSET: - field_dict["session_token"] = session_token - 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 - return field_dict + @classmethod + def from_dict(cls: Type[QA], src_dict: Dict[str, Any]) -> QA: + d = src_dict.copy() + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) - @classmethod - def from_dict(cls: Type[QA], src_dict: Dict[str, Any]) -> QA: - d = src_dict.copy() - _created_at = d.pop("created_at", UNSET) - created_at: Union[Unset, datetime.datetime] - if isinstance(_created_at, Unset): - created_at = UNSET - else: - created_at = isoparse(_created_at) + _expires = d.pop("expires", UNSET) + expires: Union[Unset, datetime.datetime] + if isinstance(_expires, Unset): + expires = UNSET + else: + expires = isoparse(_expires) - _expires = d.pop("expires", UNSET) - expires: Union[Unset, datetime.datetime] - if isinstance(_expires, Unset): - expires = UNSET - else: - expires = isoparse(_expires) + id = d.pop("id", UNSET) - id = d.pop("id", UNSET) + _session_token = d.pop("session_token", UNSET) + session_token: Union[Unset, Uuid] + if isinstance(_session_token, Unset): + session_token = UNSET + else: + session_token = _session_token # type: ignore[arg-type] - _session_token = d.pop("session_token", UNSET) - session_token: Union[Unset, Uuid] - if isinstance(_session_token, Unset): - session_token = UNSET - else: - session_token = _session_token # type: ignore[arg-type] + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) - _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) - user_id = d.pop("user_id", UNSET) - session = cls( - created_at=created_at, - expires=expires, - id=id, - session_token=session_token, - updated_at=updated_at, - user_id=user_id, - ) + session = cls( + created_at= created_at, + expires= expires, + id= id, + session_token= session_token, + updated_at= updated_at, + user_id= user_id, + ) - session.additional_properties = d - return session + session.additional_properties = d + return session - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/solid3d_get_all_edge_faces.py b/kittycad/models/solid3d_get_all_edge_faces.py index 048493f73..1b63b900f 100644 --- a/kittycad/models/solid3d_get_all_edge_faces.py +++ b/kittycad/models/solid3d_get_all_edge_faces.py @@ -6,52 +6,51 @@ from ..types import UNSET, Unset ZB = TypeVar("ZB", bound="Solid3dGetAllEdgeFaces") - @attr.s(auto_attribs=True) class Solid3dGetAllEdgeFaces: - """The response from the `Solid3dGetAllEdgeFaces` command.""" # noqa: E501 + """ The response from the `Solid3dGetAllEdgeFaces` command. """ # noqa: E501 + faces: Union[Unset, List[str]] = UNSET - faces: Union[Unset, List[str]] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + faces: Union[Unset, List[str]] = UNSET + if not isinstance(self.faces, Unset): + faces = self.faces - def to_dict(self) -> Dict[str, Any]: - faces: Union[Unset, List[str]] = UNSET - if not isinstance(self.faces, Unset): - faces = self.faces + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if faces is not UNSET: + field_dict['faces'] = faces - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if faces is not UNSET: - field_dict["faces"] = faces + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[ZB], src_dict: Dict[str, Any]) -> ZB: + d = src_dict.copy() + faces = cast(List[str], d.pop("faces", UNSET)) - @classmethod - def from_dict(cls: Type[ZB], src_dict: Dict[str, Any]) -> ZB: - d = src_dict.copy() - faces = cast(List[str], d.pop("faces", UNSET)) - solid3d_get_all_edge_faces = cls( - faces=faces, - ) + solid3d_get_all_edge_faces = cls( + faces= faces, + ) - solid3d_get_all_edge_faces.additional_properties = d - return solid3d_get_all_edge_faces + solid3d_get_all_edge_faces.additional_properties = d + return solid3d_get_all_edge_faces - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/solid3d_get_all_opposite_edges.py b/kittycad/models/solid3d_get_all_opposite_edges.py index 6ef2c282e..8dc08ddc5 100644 --- a/kittycad/models/solid3d_get_all_opposite_edges.py +++ b/kittycad/models/solid3d_get_all_opposite_edges.py @@ -6,52 +6,51 @@ from ..types import UNSET, Unset AU = TypeVar("AU", bound="Solid3dGetAllOppositeEdges") - @attr.s(auto_attribs=True) class Solid3dGetAllOppositeEdges: - """The response from the `Solid3dGetAllOppositeEdges` command.""" # noqa: E501 + """ The response from the `Solid3dGetAllOppositeEdges` command. """ # noqa: E501 + edges: Union[Unset, List[str]] = UNSET - edges: Union[Unset, List[str]] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + edges: Union[Unset, List[str]] = UNSET + if not isinstance(self.edges, Unset): + edges = self.edges - def to_dict(self) -> Dict[str, Any]: - edges: Union[Unset, List[str]] = UNSET - if not isinstance(self.edges, Unset): - edges = self.edges + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if edges is not UNSET: + field_dict['edges'] = edges - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if edges is not UNSET: - field_dict["edges"] = edges + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[AU], src_dict: Dict[str, Any]) -> AU: + d = src_dict.copy() + edges = cast(List[str], d.pop("edges", UNSET)) - @classmethod - def from_dict(cls: Type[AU], src_dict: Dict[str, Any]) -> AU: - d = src_dict.copy() - edges = cast(List[str], d.pop("edges", UNSET)) - solid3d_get_all_opposite_edges = cls( - edges=edges, - ) + solid3d_get_all_opposite_edges = cls( + edges= edges, + ) - solid3d_get_all_opposite_edges.additional_properties = d - return solid3d_get_all_opposite_edges + solid3d_get_all_opposite_edges.additional_properties = d + return solid3d_get_all_opposite_edges - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/solid3d_get_next_adjacent_edge.py b/kittycad/models/solid3d_get_next_adjacent_edge.py index d797db7a6..582076fc7 100644 --- a/kittycad/models/solid3d_get_next_adjacent_edge.py +++ b/kittycad/models/solid3d_get_next_adjacent_edge.py @@ -6,50 +6,49 @@ from ..types import UNSET, Unset FX = TypeVar("FX", bound="Solid3dGetNextAdjacentEdge") - @attr.s(auto_attribs=True) class Solid3dGetNextAdjacentEdge: - """The response from the `Solid3dGetNextAdjacentEdge` command.""" # noqa: E501 + """ The response from the `Solid3dGetNextAdjacentEdge` command. """ # noqa: E501 + edge: Union[Unset, str] = UNSET - edge: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + edge = self.edge - def to_dict(self) -> Dict[str, Any]: - edge = self.edge + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if edge is not UNSET: + field_dict['edge'] = edge - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if edge is not UNSET: - field_dict["edge"] = edge + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[FX], src_dict: Dict[str, Any]) -> FX: + d = src_dict.copy() + edge = d.pop("edge", UNSET) - @classmethod - def from_dict(cls: Type[FX], src_dict: Dict[str, Any]) -> FX: - d = src_dict.copy() - edge = d.pop("edge", UNSET) - solid3d_get_next_adjacent_edge = cls( - edge=edge, - ) + solid3d_get_next_adjacent_edge = cls( + edge= edge, + ) - solid3d_get_next_adjacent_edge.additional_properties = d - return solid3d_get_next_adjacent_edge + solid3d_get_next_adjacent_edge.additional_properties = d + return solid3d_get_next_adjacent_edge - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/solid3d_get_opposite_edge.py b/kittycad/models/solid3d_get_opposite_edge.py index 3a7f5de6e..43b66d383 100644 --- a/kittycad/models/solid3d_get_opposite_edge.py +++ b/kittycad/models/solid3d_get_opposite_edge.py @@ -6,50 +6,49 @@ from ..types import UNSET, Unset BL = TypeVar("BL", bound="Solid3dGetOppositeEdge") - @attr.s(auto_attribs=True) class Solid3dGetOppositeEdge: - """The response from the `Solid3dGetOppositeEdge` command.""" # noqa: E501 + """ The response from the `Solid3dGetOppositeEdge` command. """ # noqa: E501 + edge: Union[Unset, str] = UNSET - edge: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + edge = self.edge - def to_dict(self) -> Dict[str, Any]: - edge = self.edge + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if edge is not UNSET: + field_dict['edge'] = edge - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if edge is not UNSET: - field_dict["edge"] = edge + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[BL], src_dict: Dict[str, Any]) -> BL: + d = src_dict.copy() + edge = d.pop("edge", UNSET) - @classmethod - def from_dict(cls: Type[BL], src_dict: Dict[str, Any]) -> BL: - d = src_dict.copy() - edge = d.pop("edge", UNSET) - solid3d_get_opposite_edge = cls( - edge=edge, - ) + solid3d_get_opposite_edge = cls( + edge= edge, + ) - solid3d_get_opposite_edge.additional_properties = d - return solid3d_get_opposite_edge + solid3d_get_opposite_edge.additional_properties = d + return solid3d_get_opposite_edge - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/solid3d_get_prev_adjacent_edge.py b/kittycad/models/solid3d_get_prev_adjacent_edge.py index 1092ada1d..408df10a0 100644 --- a/kittycad/models/solid3d_get_prev_adjacent_edge.py +++ b/kittycad/models/solid3d_get_prev_adjacent_edge.py @@ -6,50 +6,49 @@ from ..types import UNSET, Unset KU = TypeVar("KU", bound="Solid3dGetPrevAdjacentEdge") - @attr.s(auto_attribs=True) class Solid3dGetPrevAdjacentEdge: - """The response from the `Solid3dGetPrevAdjacentEdge` command.""" # noqa: E501 + """ The response from the `Solid3dGetPrevAdjacentEdge` command. """ # noqa: E501 + edge: Union[Unset, str] = UNSET - edge: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + edge = self.edge - def to_dict(self) -> Dict[str, Any]: - edge = self.edge + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if edge is not UNSET: + field_dict['edge'] = edge - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if edge is not UNSET: - field_dict["edge"] = edge + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[KU], src_dict: Dict[str, Any]) -> KU: + d = src_dict.copy() + edge = d.pop("edge", UNSET) - @classmethod - def from_dict(cls: Type[KU], src_dict: Dict[str, Any]) -> KU: - d = src_dict.copy() - edge = d.pop("edge", UNSET) - solid3d_get_prev_adjacent_edge = cls( - edge=edge, - ) + solid3d_get_prev_adjacent_edge = cls( + edge= edge, + ) - solid3d_get_prev_adjacent_edge.additional_properties = d - return solid3d_get_prev_adjacent_edge + solid3d_get_prev_adjacent_edge.additional_properties = d + return solid3d_get_prev_adjacent_edge - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/stl_storage.py b/kittycad/models/stl_storage.py index 1f9fc8f62..b68f1d686 100644 --- a/kittycad/models/stl_storage.py +++ b/kittycad/models/stl_storage.py @@ -2,14 +2,13 @@ from enum import Enum class StlStorage(str, Enum): - """Export storage.""" # noqa: E501 + """ Export storage. """ # noqa: E501 + """# Plaintext encoding. """ # noqa: E501 + ASCII = 'ascii' + """# Binary STL encoding. - """# Plaintext encoding. """ # noqa: E501 - ASCII = "ascii" - """# Binary STL encoding. +This is the default setting. """ # noqa: E501 + BINARY = 'binary' -This is the default setting. """ # noqa: E501 - BINARY = "binary" - - def __str__(self) -> str: - return str(self.value) + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/success_web_socket_response.py b/kittycad/models/success_web_socket_response.py index dad9d7f92..610848a01 100644 --- a/kittycad/models/success_web_socket_response.py +++ b/kittycad/models/success_web_socket_response.py @@ -7,70 +7,69 @@ from ..types import UNSET, Unset PZ = TypeVar("PZ", bound="SuccessWebSocketResponse") - @attr.s(auto_attribs=True) class SuccessWebSocketResponse: - """Successful Websocket response.""" # noqa: E501 + """ Successful Websocket response. """ # noqa: E501 + request_id: Union[Unset, str] = UNSET + resp: Union[Unset, OkWebSocketResponseData] = UNSET + success: Union[Unset, bool] = False - request_id: Union[Unset, str] = UNSET - resp: Union[Unset, OkWebSocketResponseData] = UNSET - success: Union[Unset, bool] = False + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + request_id = self.request_id + if not isinstance(self.resp, Unset): + resp = self.resp + success = self.success - def to_dict(self) -> Dict[str, Any]: - request_id = self.request_id - if not isinstance(self.resp, Unset): - resp = self.resp - success = self.success + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if request_id is not UNSET: + field_dict['request_id'] = request_id + if resp is not UNSET: + field_dict['resp'] = resp + if success is not UNSET: + field_dict['success'] = success - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if request_id is not UNSET: - field_dict["request_id"] = request_id - if resp is not UNSET: - field_dict["resp"] = resp - if success is not UNSET: - field_dict["success"] = success + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[PZ], src_dict: Dict[str, Any]) -> PZ: + d = src_dict.copy() + request_id = d.pop("request_id", UNSET) - @classmethod - def from_dict(cls: Type[PZ], src_dict: Dict[str, Any]) -> PZ: - d = src_dict.copy() - request_id = d.pop("request_id", UNSET) + _resp = d.pop("resp", UNSET) + resp: Union[Unset, OkWebSocketResponseData] + if isinstance(_resp, Unset): + resp = UNSET + else: + resp = _resp # type: ignore[arg-type] - _resp = d.pop("resp", UNSET) - resp: Union[Unset, OkWebSocketResponseData] - if isinstance(_resp, Unset): - resp = UNSET - else: - resp = _resp # type: ignore[arg-type] + success = d.pop("success", UNSET) - success = d.pop("success", UNSET) - success_web_socket_response = cls( - request_id=request_id, - resp=resp, - success=success, - ) + success_web_socket_response = cls( + request_id= request_id, + resp= resp, + success= success, + ) - success_web_socket_response.additional_properties = d - return success_web_socket_response + success_web_socket_response.additional_properties = d + return success_web_socket_response - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/surface_area.py b/kittycad/models/surface_area.py index 38443de16..bd96185a3 100644 --- a/kittycad/models/surface_area.py +++ b/kittycad/models/surface_area.py @@ -7,63 +7,62 @@ from ..types import UNSET, Unset FA = TypeVar("FA", bound="SurfaceArea") - @attr.s(auto_attribs=True) class SurfaceArea: - """The surface area response.""" # noqa: E501 + """ The surface area response. """ # noqa: E501 + output_unit: Union[Unset, UnitArea] = UNSET + surface_area: Union[Unset, float] = UNSET - output_unit: Union[Unset, UnitArea] = UNSET - surface_area: Union[Unset, float] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + surface_area = self.surface_area - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - surface_area = self.surface_area + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if output_unit is not UNSET: + field_dict['output_unit'] = output_unit + if surface_area is not UNSET: + field_dict['surface_area'] = surface_area - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if output_unit is not UNSET: - field_dict["output_unit"] = output_unit - if surface_area is not UNSET: - field_dict["surface_area"] = surface_area + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[FA], src_dict: Dict[str, Any]) -> FA: + d = src_dict.copy() + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitArea] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[FA], src_dict: Dict[str, Any]) -> FA: - d = src_dict.copy() - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitArea] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] + surface_area = d.pop("surface_area", UNSET) - surface_area = d.pop("surface_area", UNSET) - surface_area = cls( - output_unit=output_unit, - surface_area=surface_area, - ) + surface_area = cls( + output_unit= output_unit, + surface_area= surface_area, + ) - surface_area.additional_properties = d - return surface_area + surface_area.additional_properties = d + return surface_area - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/system.py b/kittycad/models/system.py index aaeb2dc16..025cac86b 100644 --- a/kittycad/models/system.py +++ b/kittycad/models/system.py @@ -7,76 +7,74 @@ from ..types import UNSET, Unset GE = TypeVar("GE", bound="System") - @attr.s(auto_attribs=True) class System: - """Co-ordinate system definition. + """ Co-ordinate system definition. - The `up` axis must be orthogonal to the `forward` axis. +The `up` axis must be orthogonal to the `forward` axis. - See [cglearn.eu] for background reading. +See [cglearn.eu] for background reading. - [cglearn.eu](https://cglearn.eu/pub/computer-graphics/introduction-to-geometry#material-coordinate-systems-1) - """ # noqa: E501 +[cglearn.eu](https://cglearn.eu/pub/computer-graphics/introduction-to-geometry#material-coordinate-systems-1) """ # noqa: E501 + forward: Union[Unset, AxisDirectionPair] = UNSET + up: Union[Unset, AxisDirectionPair] = UNSET - forward: Union[Unset, AxisDirectionPair] = UNSET - up: Union[Unset, AxisDirectionPair] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.forward, Unset): + forward = self.forward + if not isinstance(self.up, Unset): + up = self.up - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.forward, Unset): - forward = self.forward - if not isinstance(self.up, Unset): - up = self.up + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if forward is not UNSET: + field_dict['forward'] = forward + if up is not UNSET: + field_dict['up'] = up - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if forward is not UNSET: - field_dict["forward"] = forward - if up is not UNSET: - field_dict["up"] = up + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[GE], src_dict: Dict[str, Any]) -> GE: + d = src_dict.copy() + _forward = d.pop("forward", UNSET) + forward: Union[Unset, AxisDirectionPair] + if isinstance(_forward, Unset): + forward = UNSET + else: + forward = _forward # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[GE], src_dict: Dict[str, Any]) -> GE: - d = src_dict.copy() - _forward = d.pop("forward", UNSET) - forward: Union[Unset, AxisDirectionPair] - if isinstance(_forward, Unset): - forward = UNSET - else: - forward = _forward # type: ignore[arg-type] + _up = d.pop("up", UNSET) + up: Union[Unset, AxisDirectionPair] + if isinstance(_up, Unset): + up = UNSET + else: + up = _up # type: ignore[arg-type] - _up = d.pop("up", UNSET) - up: Union[Unset, AxisDirectionPair] - if isinstance(_up, Unset): - up = UNSET - else: - up = _up # type: ignore[arg-type] - system = cls( - forward=forward, - up=up, - ) + system = cls( + forward= forward, + up= up, + ) - system.additional_properties = d - return system + system.additional_properties = d + return system - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/take_snapshot.py b/kittycad/models/take_snapshot.py index 5eefe056b..1272fbbf9 100644 --- a/kittycad/models/take_snapshot.py +++ b/kittycad/models/take_snapshot.py @@ -7,57 +7,56 @@ from ..types import UNSET, Unset JG = TypeVar("JG", bound="TakeSnapshot") - @attr.s(auto_attribs=True) class TakeSnapshot: - """The response from the `TakeSnapshot` command.""" # noqa: E501 + """ The response from the `TakeSnapshot` command. """ # noqa: E501 + contents: Union[Unset, Base64Data] = UNSET - contents: Union[Unset, Base64Data] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + contents: Union[Unset, str] = UNSET + if not isinstance(self.contents, Unset): + contents = self.contents.get_encoded() - def to_dict(self) -> Dict[str, Any]: - contents: Union[Unset, str] = UNSET - if not isinstance(self.contents, Unset): - contents = self.contents.get_encoded() + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if contents is not UNSET: + field_dict['contents'] = contents - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if contents is not UNSET: - field_dict["contents"] = contents + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[JG], src_dict: Dict[str, Any]) -> JG: + d = src_dict.copy() + _contents = d.pop("contents", UNSET) + contents: Union[Unset, Base64Data] + if isinstance(_contents, Unset): + contents = UNSET + else: + contents = Base64Data(bytes(_contents, 'utf-8')) - @classmethod - def from_dict(cls: Type[JG], src_dict: Dict[str, Any]) -> JG: - d = src_dict.copy() - _contents = d.pop("contents", UNSET) - contents: Union[Unset, Base64Data] - if isinstance(_contents, Unset): - contents = UNSET - else: - contents = Base64Data(bytes(_contents, "utf-8")) - take_snapshot = cls( - contents=contents, - ) + take_snapshot = cls( + contents= contents, + ) - take_snapshot.additional_properties = d - return take_snapshot + take_snapshot.additional_properties = d + return take_snapshot - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/unit_angle.py b/kittycad/models/unit_angle.py index e45be0db5..030f9fd23 100644 --- a/kittycad/models/unit_angle.py +++ b/kittycad/models/unit_angle.py @@ -2,12 +2,11 @@ from enum import Enum class UnitAngle(str, Enum): - """The valid types of angle formats.""" # noqa: E501 + """ The valid types of angle formats. """ # noqa: E501 + """# Degrees """ # noqa: E501 + DEGREES = 'degrees' + """# Radians """ # noqa: E501 + RADIANS = 'radians' - """# Degrees """ # noqa: E501 - DEGREES = "degrees" - """# Radians """ # noqa: E501 - RADIANS = "radians" - - def __str__(self) -> str: - return str(self.value) + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/unit_angle_conversion.py b/kittycad/models/unit_angle_conversion.py index d3b71a47f..e87e2eccc 100644 --- a/kittycad/models/unit_angle_conversion.py +++ b/kittycad/models/unit_angle_conversion.py @@ -11,178 +11,177 @@ from ..types import UNSET, Unset HH = TypeVar("HH", bound="UnitAngleConversion") - @attr.s(auto_attribs=True) class UnitAngleConversion: - """Result of converting between units.""" # noqa: E501 + """ Result of converting between units. """ # noqa: E501 + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + input: Union[Unset, float] = UNSET + input_unit: Union[Unset, UnitAngle] = UNSET + output: Union[Unset, float] = UNSET + output_unit: Union[Unset, UnitAngle] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - input: Union[Unset, float] = UNSET - input_unit: Union[Unset, UnitAngle] = UNSET - output: Union[Unset, float] = UNSET - output_unit: Union[Unset, UnitAngle] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 + id = self.id + input = self.input + if not isinstance(self.input_unit, Unset): + input_unit = self.input_unit + output = self.output + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + if not isinstance(self.status, Unset): + status = self.status + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id - 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 - id = self.id - input = self.input - if not isinstance(self.input_unit, Unset): - input_unit = self.input_unit - output = self.output - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - started_at: Union[Unset, str] = UNSET - if not isinstance(self.started_at, Unset): - started_at = self.started_at.isoformat() - if not isinstance(self.status, Unset): - status = self.status - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() - user_id = self.user_id + 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 id is not UNSET: + field_dict['id'] = id + if input is not UNSET: + field_dict['input'] = input + if input_unit is not UNSET: + field_dict['input_unit'] = input_unit + if output is not UNSET: + field_dict['output'] = output + if output_unit is not UNSET: + field_dict['output_unit'] = output_unit + if started_at is not UNSET: + field_dict['started_at'] = started_at + if status is not UNSET: + field_dict['status'] = status + if updated_at is not UNSET: + field_dict['updated_at'] = updated_at + if user_id is not UNSET: + field_dict['user_id'] = user_id - 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 id is not UNSET: - field_dict["id"] = id - if input is not UNSET: - field_dict["input"] = input - if input_unit is not UNSET: - field_dict["input_unit"] = input_unit - if output is not UNSET: - field_dict["output"] = output - if output_unit is not UNSET: - field_dict["output_unit"] = output_unit - if started_at is not UNSET: - field_dict["started_at"] = started_at - if status is not UNSET: - field_dict["status"] = status - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - if user_id is not UNSET: - field_dict["user_id"] = user_id + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[HH], src_dict: Dict[str, Any]) -> HH: + d = src_dict.copy() + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) - @classmethod - def from_dict(cls: Type[HH], src_dict: Dict[str, Any]) -> HH: - d = src_dict.copy() - _completed_at = d.pop("completed_at", UNSET) - completed_at: Union[Unset, datetime.datetime] - 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) - _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) - error = d.pop("error", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] + input = d.pop("input", UNSET) - input = d.pop("input", UNSET) + _input_unit = d.pop("input_unit", UNSET) + input_unit: Union[Unset, UnitAngle] + if isinstance(_input_unit, Unset): + input_unit = UNSET + else: + input_unit = _input_unit # type: ignore[arg-type] - _input_unit = d.pop("input_unit", UNSET) - input_unit: Union[Unset, UnitAngle] - if isinstance(_input_unit, Unset): - input_unit = UNSET - else: - input_unit = _input_unit # type: ignore[arg-type] + output = d.pop("output", UNSET) - output = d.pop("output", UNSET) + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitAngle] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitAngle] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) - _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] - _status = d.pop("status", UNSET) - status: Union[Unset, ApiCallStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = _status # type: ignore[arg-type] + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) - _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) - user_id = d.pop("user_id", UNSET) - unit_angle_conversion = cls( - completed_at=completed_at, - created_at=created_at, - error=error, - id=id, - input=input, - input_unit=input_unit, - output=output, - output_unit=output_unit, - started_at=started_at, - status=status, - updated_at=updated_at, - user_id=user_id, - ) + unit_angle_conversion = cls( + completed_at= completed_at, + created_at= created_at, + error= error, + id= id, + input= input, + input_unit= input_unit, + output= output, + output_unit= output_unit, + started_at= started_at, + status= status, + updated_at= updated_at, + user_id= user_id, + ) - unit_angle_conversion.additional_properties = d - return unit_angle_conversion + unit_angle_conversion.additional_properties = d + return unit_angle_conversion - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/unit_area.py b/kittycad/models/unit_area.py index 6a3f7dc8c..c2542add2 100644 --- a/kittycad/models/unit_area.py +++ b/kittycad/models/unit_area.py @@ -2,24 +2,23 @@ from enum import Enum class UnitArea(str, Enum): - """The valid types of area units.""" # noqa: E501 + """ The valid types of area units. """ # noqa: E501 + """# Square centimeters """ # noqa: E501 + CM2 = 'cm2' + """# Square decimeters """ # noqa: E501 + DM2 = 'dm2' + """# Square feet """ # noqa: E501 + FT2 = 'ft2' + """# Square inches """ # noqa: E501 + IN2 = 'in2' + """# Square kilometers """ # noqa: E501 + KM2 = 'km2' + """# Square meters """ # noqa: E501 + M2 = 'm2' + """# Square millimeters """ # noqa: E501 + MM2 = 'mm2' + """# Square yards """ # noqa: E501 + YD2 = 'yd2' - """# Square centimeters """ # noqa: E501 - CM2 = "cm2" - """# Square decimeters """ # noqa: E501 - DM2 = "dm2" - """# Square feet """ # noqa: E501 - FT2 = "ft2" - """# Square inches """ # noqa: E501 - IN2 = "in2" - """# Square kilometers """ # noqa: E501 - KM2 = "km2" - """# Square meters """ # noqa: E501 - M2 = "m2" - """# Square millimeters """ # noqa: E501 - MM2 = "mm2" - """# Square yards """ # noqa: E501 - YD2 = "yd2" - - def __str__(self) -> str: - return str(self.value) + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/unit_area_conversion.py b/kittycad/models/unit_area_conversion.py index b1cfd3125..c04843152 100644 --- a/kittycad/models/unit_area_conversion.py +++ b/kittycad/models/unit_area_conversion.py @@ -11,178 +11,177 @@ from ..types import UNSET, Unset RY = TypeVar("RY", bound="UnitAreaConversion") - @attr.s(auto_attribs=True) class UnitAreaConversion: - """Result of converting between units.""" # noqa: E501 + """ Result of converting between units. """ # noqa: E501 + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + input: Union[Unset, float] = UNSET + input_unit: Union[Unset, UnitArea] = UNSET + output: Union[Unset, float] = UNSET + output_unit: Union[Unset, UnitArea] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - input: Union[Unset, float] = UNSET - input_unit: Union[Unset, UnitArea] = UNSET - output: Union[Unset, float] = UNSET - output_unit: Union[Unset, UnitArea] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 + id = self.id + input = self.input + if not isinstance(self.input_unit, Unset): + input_unit = self.input_unit + output = self.output + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + if not isinstance(self.status, Unset): + status = self.status + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id - 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 - id = self.id - input = self.input - if not isinstance(self.input_unit, Unset): - input_unit = self.input_unit - output = self.output - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - started_at: Union[Unset, str] = UNSET - if not isinstance(self.started_at, Unset): - started_at = self.started_at.isoformat() - if not isinstance(self.status, Unset): - status = self.status - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() - user_id = self.user_id + 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 id is not UNSET: + field_dict['id'] = id + if input is not UNSET: + field_dict['input'] = input + if input_unit is not UNSET: + field_dict['input_unit'] = input_unit + if output is not UNSET: + field_dict['output'] = output + if output_unit is not UNSET: + field_dict['output_unit'] = output_unit + if started_at is not UNSET: + field_dict['started_at'] = started_at + if status is not UNSET: + field_dict['status'] = status + if updated_at is not UNSET: + field_dict['updated_at'] = updated_at + if user_id is not UNSET: + field_dict['user_id'] = user_id - 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 id is not UNSET: - field_dict["id"] = id - if input is not UNSET: - field_dict["input"] = input - if input_unit is not UNSET: - field_dict["input_unit"] = input_unit - if output is not UNSET: - field_dict["output"] = output - if output_unit is not UNSET: - field_dict["output_unit"] = output_unit - if started_at is not UNSET: - field_dict["started_at"] = started_at - if status is not UNSET: - field_dict["status"] = status - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - if user_id is not UNSET: - field_dict["user_id"] = user_id + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[RY], src_dict: Dict[str, Any]) -> RY: + d = src_dict.copy() + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) - @classmethod - def from_dict(cls: Type[RY], src_dict: Dict[str, Any]) -> RY: - d = src_dict.copy() - _completed_at = d.pop("completed_at", UNSET) - completed_at: Union[Unset, datetime.datetime] - 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) - _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) - error = d.pop("error", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] + input = d.pop("input", UNSET) - input = d.pop("input", UNSET) + _input_unit = d.pop("input_unit", UNSET) + input_unit: Union[Unset, UnitArea] + if isinstance(_input_unit, Unset): + input_unit = UNSET + else: + input_unit = _input_unit # type: ignore[arg-type] - _input_unit = d.pop("input_unit", UNSET) - input_unit: Union[Unset, UnitArea] - if isinstance(_input_unit, Unset): - input_unit = UNSET - else: - input_unit = _input_unit # type: ignore[arg-type] + output = d.pop("output", UNSET) - output = d.pop("output", UNSET) + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitArea] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitArea] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] + _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) - _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] - _status = d.pop("status", UNSET) - status: Union[Unset, ApiCallStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = _status # type: ignore[arg-type] + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) - _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) - user_id = d.pop("user_id", UNSET) - unit_area_conversion = cls( - completed_at=completed_at, - created_at=created_at, - error=error, - id=id, - input=input, - input_unit=input_unit, - output=output, - output_unit=output_unit, - started_at=started_at, - status=status, - updated_at=updated_at, - user_id=user_id, - ) + unit_area_conversion = cls( + completed_at= completed_at, + created_at= created_at, + error= error, + id= id, + input= input, + input_unit= input_unit, + output= output, + output_unit= output_unit, + started_at= started_at, + status= status, + updated_at= updated_at, + user_id= user_id, + ) - unit_area_conversion.additional_properties = d - return unit_area_conversion + unit_area_conversion.additional_properties = d + return unit_area_conversion - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/unit_current.py b/kittycad/models/unit_current.py index 8734c82e9..c442e72f3 100644 --- a/kittycad/models/unit_current.py +++ b/kittycad/models/unit_current.py @@ -2,16 +2,15 @@ from enum import Enum class UnitCurrent(str, Enum): - """The valid types of current units.""" # noqa: E501 + """ The valid types of current units. """ # noqa: E501 + """# Amperes """ # noqa: E501 + AMPERES = 'amperes' + """# Microamperes """ # noqa: E501 + MICROAMPERES = 'microamperes' + """# Milliamperes """ # noqa: E501 + MILLIAMPERES = 'milliamperes' + """# Nanoamperes """ # noqa: E501 + NANOAMPERES = 'nanoamperes' - """# Amperes """ # noqa: E501 - AMPERES = "amperes" - """# Microamperes """ # noqa: E501 - MICROAMPERES = "microamperes" - """# Milliamperes """ # noqa: E501 - MILLIAMPERES = "milliamperes" - """# Nanoamperes """ # noqa: E501 - NANOAMPERES = "nanoamperes" - - def __str__(self) -> str: - return str(self.value) + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/unit_current_conversion.py b/kittycad/models/unit_current_conversion.py index c4c5957ab..7bbee1cda 100644 --- a/kittycad/models/unit_current_conversion.py +++ b/kittycad/models/unit_current_conversion.py @@ -11,178 +11,177 @@ from ..types import UNSET, Unset AE = TypeVar("AE", bound="UnitCurrentConversion") - @attr.s(auto_attribs=True) class UnitCurrentConversion: - """Result of converting between units.""" # noqa: E501 + """ Result of converting between units. """ # noqa: E501 + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + input: Union[Unset, float] = UNSET + input_unit: Union[Unset, UnitCurrent] = UNSET + output: Union[Unset, float] = UNSET + output_unit: Union[Unset, UnitCurrent] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - input: Union[Unset, float] = UNSET - input_unit: Union[Unset, UnitCurrent] = UNSET - output: Union[Unset, float] = UNSET - output_unit: Union[Unset, UnitCurrent] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 + id = self.id + input = self.input + if not isinstance(self.input_unit, Unset): + input_unit = self.input_unit + output = self.output + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + if not isinstance(self.status, Unset): + status = self.status + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id - 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 - id = self.id - input = self.input - if not isinstance(self.input_unit, Unset): - input_unit = self.input_unit - output = self.output - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - started_at: Union[Unset, str] = UNSET - if not isinstance(self.started_at, Unset): - started_at = self.started_at.isoformat() - if not isinstance(self.status, Unset): - status = self.status - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() - user_id = self.user_id + 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 id is not UNSET: + field_dict['id'] = id + if input is not UNSET: + field_dict['input'] = input + if input_unit is not UNSET: + field_dict['input_unit'] = input_unit + if output is not UNSET: + field_dict['output'] = output + if output_unit is not UNSET: + field_dict['output_unit'] = output_unit + if started_at is not UNSET: + field_dict['started_at'] = started_at + if status is not UNSET: + field_dict['status'] = status + if updated_at is not UNSET: + field_dict['updated_at'] = updated_at + if user_id is not UNSET: + field_dict['user_id'] = user_id - 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 id is not UNSET: - field_dict["id"] = id - if input is not UNSET: - field_dict["input"] = input - if input_unit is not UNSET: - field_dict["input_unit"] = input_unit - if output is not UNSET: - field_dict["output"] = output - if output_unit is not UNSET: - field_dict["output_unit"] = output_unit - if started_at is not UNSET: - field_dict["started_at"] = started_at - if status is not UNSET: - field_dict["status"] = status - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - if user_id is not UNSET: - field_dict["user_id"] = user_id + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[AE], src_dict: Dict[str, Any]) -> AE: + d = src_dict.copy() + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) - @classmethod - def from_dict(cls: Type[AE], src_dict: Dict[str, Any]) -> AE: - d = src_dict.copy() - _completed_at = d.pop("completed_at", UNSET) - completed_at: Union[Unset, datetime.datetime] - 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) - _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) - error = d.pop("error", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] + input = d.pop("input", UNSET) - input = d.pop("input", UNSET) + _input_unit = d.pop("input_unit", UNSET) + input_unit: Union[Unset, UnitCurrent] + if isinstance(_input_unit, Unset): + input_unit = UNSET + else: + input_unit = _input_unit # type: ignore[arg-type] - _input_unit = d.pop("input_unit", UNSET) - input_unit: Union[Unset, UnitCurrent] - if isinstance(_input_unit, Unset): - input_unit = UNSET - else: - input_unit = _input_unit # type: ignore[arg-type] + output = d.pop("output", UNSET) - output = d.pop("output", UNSET) + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitCurrent] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitCurrent] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) - _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] - _status = d.pop("status", UNSET) - status: Union[Unset, ApiCallStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = _status # type: ignore[arg-type] + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) - _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) - user_id = d.pop("user_id", UNSET) - unit_current_conversion = cls( - completed_at=completed_at, - created_at=created_at, - error=error, - id=id, - input=input, - input_unit=input_unit, - output=output, - output_unit=output_unit, - started_at=started_at, - status=status, - updated_at=updated_at, - user_id=user_id, - ) + unit_current_conversion = cls( + completed_at= completed_at, + created_at= created_at, + error= error, + id= id, + input= input, + input_unit= input_unit, + output= output, + output_unit= output_unit, + started_at= started_at, + status= status, + updated_at= updated_at, + user_id= user_id, + ) - unit_current_conversion.additional_properties = d - return unit_current_conversion + unit_current_conversion.additional_properties = d + return unit_current_conversion - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/unit_density.py b/kittycad/models/unit_density.py index 53534b784..f13eb10e3 100644 --- a/kittycad/models/unit_density.py +++ b/kittycad/models/unit_density.py @@ -2,12 +2,11 @@ from enum import Enum class UnitDensity(str, Enum): - """The valid types for density units.""" # noqa: E501 + """ The valid types for density units. """ # noqa: E501 + """# Pounds per cubic feet. """ # noqa: E501 + LB_FT3 = 'lb:ft3' + """# Kilograms per cubic meter. """ # noqa: E501 + KG_M3 = 'kg:m3' - """# Pounds per cubic feet. """ # noqa: E501 - LB_FT3 = "lb:ft3" - """# Kilograms per cubic meter. """ # noqa: E501 - KG_M3 = "kg:m3" - - def __str__(self) -> str: - return str(self.value) + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/unit_energy.py b/kittycad/models/unit_energy.py index 20ea3892a..82fd1caf4 100644 --- a/kittycad/models/unit_energy.py +++ b/kittycad/models/unit_energy.py @@ -2,20 +2,19 @@ from enum import Enum class UnitEnergy(str, Enum): - """The valid types of energy units.""" # noqa: E501 + """ The valid types of energy units. """ # noqa: E501 + """# British Thermal Unit (BTU) """ # noqa: E501 + BTU = 'btu' + """# Electron Volts (eV) """ # noqa: E501 + ELECTRONVOLTS = 'electronvolts' + """# Joules (or watt-seconds) """ # noqa: E501 + JOULES = 'joules' + """# Kilocalories (often just called calories) """ # noqa: E501 + KILOCALORIES = 'kilocalories' + """# Kilowatt hours (kWh) """ # noqa: E501 + KILOWATT_HOURS = 'kilowatt_hours' + """# Watt hours (Wh) """ # noqa: E501 + WATT_HOURS = 'watt_hours' - """# British Thermal Unit (BTU) """ # noqa: E501 - BTU = "btu" - """# Electron Volts (eV) """ # noqa: E501 - ELECTRONVOLTS = "electronvolts" - """# Joules (or watt-seconds) """ # noqa: E501 - JOULES = "joules" - """# Kilocalories (often just called calories) """ # noqa: E501 - KILOCALORIES = "kilocalories" - """# Kilowatt hours (kWh) """ # noqa: E501 - KILOWATT_HOURS = "kilowatt_hours" - """# Watt hours (Wh) """ # noqa: E501 - WATT_HOURS = "watt_hours" - - def __str__(self) -> str: - return str(self.value) + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/unit_energy_conversion.py b/kittycad/models/unit_energy_conversion.py index 8a3fd244f..53f2869a5 100644 --- a/kittycad/models/unit_energy_conversion.py +++ b/kittycad/models/unit_energy_conversion.py @@ -11,178 +11,177 @@ from ..types import UNSET, Unset AD = TypeVar("AD", bound="UnitEnergyConversion") - @attr.s(auto_attribs=True) class UnitEnergyConversion: - """Result of converting between units.""" # noqa: E501 + """ Result of converting between units. """ # noqa: E501 + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + input: Union[Unset, float] = UNSET + input_unit: Union[Unset, UnitEnergy] = UNSET + output: Union[Unset, float] = UNSET + output_unit: Union[Unset, UnitEnergy] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - input: Union[Unset, float] = UNSET - input_unit: Union[Unset, UnitEnergy] = UNSET - output: Union[Unset, float] = UNSET - output_unit: Union[Unset, UnitEnergy] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 + id = self.id + input = self.input + if not isinstance(self.input_unit, Unset): + input_unit = self.input_unit + output = self.output + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + if not isinstance(self.status, Unset): + status = self.status + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id - 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 - id = self.id - input = self.input - if not isinstance(self.input_unit, Unset): - input_unit = self.input_unit - output = self.output - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - started_at: Union[Unset, str] = UNSET - if not isinstance(self.started_at, Unset): - started_at = self.started_at.isoformat() - if not isinstance(self.status, Unset): - status = self.status - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() - user_id = self.user_id + 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 id is not UNSET: + field_dict['id'] = id + if input is not UNSET: + field_dict['input'] = input + if input_unit is not UNSET: + field_dict['input_unit'] = input_unit + if output is not UNSET: + field_dict['output'] = output + if output_unit is not UNSET: + field_dict['output_unit'] = output_unit + if started_at is not UNSET: + field_dict['started_at'] = started_at + if status is not UNSET: + field_dict['status'] = status + if updated_at is not UNSET: + field_dict['updated_at'] = updated_at + if user_id is not UNSET: + field_dict['user_id'] = user_id - 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 id is not UNSET: - field_dict["id"] = id - if input is not UNSET: - field_dict["input"] = input - if input_unit is not UNSET: - field_dict["input_unit"] = input_unit - if output is not UNSET: - field_dict["output"] = output - if output_unit is not UNSET: - field_dict["output_unit"] = output_unit - if started_at is not UNSET: - field_dict["started_at"] = started_at - if status is not UNSET: - field_dict["status"] = status - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - if user_id is not UNSET: - field_dict["user_id"] = user_id + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[AD], src_dict: Dict[str, Any]) -> AD: + d = src_dict.copy() + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) - @classmethod - def from_dict(cls: Type[AD], src_dict: Dict[str, Any]) -> AD: - d = src_dict.copy() - _completed_at = d.pop("completed_at", UNSET) - completed_at: Union[Unset, datetime.datetime] - 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) - _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) - error = d.pop("error", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] + input = d.pop("input", UNSET) - input = d.pop("input", UNSET) + _input_unit = d.pop("input_unit", UNSET) + input_unit: Union[Unset, UnitEnergy] + if isinstance(_input_unit, Unset): + input_unit = UNSET + else: + input_unit = _input_unit # type: ignore[arg-type] - _input_unit = d.pop("input_unit", UNSET) - input_unit: Union[Unset, UnitEnergy] - if isinstance(_input_unit, Unset): - input_unit = UNSET - else: - input_unit = _input_unit # type: ignore[arg-type] + output = d.pop("output", UNSET) - output = d.pop("output", UNSET) + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitEnergy] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitEnergy] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) - _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] - _status = d.pop("status", UNSET) - status: Union[Unset, ApiCallStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = _status # type: ignore[arg-type] + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) - _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) - user_id = d.pop("user_id", UNSET) - unit_energy_conversion = cls( - completed_at=completed_at, - created_at=created_at, - error=error, - id=id, - input=input, - input_unit=input_unit, - output=output, - output_unit=output_unit, - started_at=started_at, - status=status, - updated_at=updated_at, - user_id=user_id, - ) + unit_energy_conversion = cls( + completed_at= completed_at, + created_at= created_at, + error= error, + id= id, + input= input, + input_unit= input_unit, + output= output, + output_unit= output_unit, + started_at= started_at, + status= status, + updated_at= updated_at, + user_id= user_id, + ) - unit_energy_conversion.additional_properties = d - return unit_energy_conversion + unit_energy_conversion.additional_properties = d + return unit_energy_conversion - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/unit_force.py b/kittycad/models/unit_force.py index 913b8fa8b..27e52407d 100644 --- a/kittycad/models/unit_force.py +++ b/kittycad/models/unit_force.py @@ -2,22 +2,21 @@ from enum import Enum class UnitForce(str, Enum): - """The valid types of force units.""" # noqa: E501 + """ The valid types of force units. """ # noqa: E501 + """# Dynes """ # noqa: E501 + DYNES = 'dynes' + """# Kiloponds """ # noqa: E501 + KILOPONDS = 'kiloponds' + """# Micronewtons """ # noqa: E501 + MICRONEWTONS = 'micronewtons' + """# Millinewtons """ # noqa: E501 + MILLINEWTONS = 'millinewtons' + """# Newtons """ # noqa: E501 + NEWTONS = 'newtons' + """# Poundals """ # noqa: E501 + POUNDALS = 'poundals' + """# Pounds """ # noqa: E501 + POUNDS = 'pounds' - """# Dynes """ # noqa: E501 - DYNES = "dynes" - """# Kiloponds """ # noqa: E501 - KILOPONDS = "kiloponds" - """# Micronewtons """ # noqa: E501 - MICRONEWTONS = "micronewtons" - """# Millinewtons """ # noqa: E501 - MILLINEWTONS = "millinewtons" - """# Newtons """ # noqa: E501 - NEWTONS = "newtons" - """# Poundals """ # noqa: E501 - POUNDALS = "poundals" - """# Pounds """ # noqa: E501 - POUNDS = "pounds" - - def __str__(self) -> str: - return str(self.value) + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/unit_force_conversion.py b/kittycad/models/unit_force_conversion.py index a711e3cb5..3a1f87bc3 100644 --- a/kittycad/models/unit_force_conversion.py +++ b/kittycad/models/unit_force_conversion.py @@ -11,178 +11,177 @@ from ..types import UNSET, Unset AB = TypeVar("AB", bound="UnitForceConversion") - @attr.s(auto_attribs=True) class UnitForceConversion: - """Result of converting between units.""" # noqa: E501 + """ Result of converting between units. """ # noqa: E501 + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + input: Union[Unset, float] = UNSET + input_unit: Union[Unset, UnitForce] = UNSET + output: Union[Unset, float] = UNSET + output_unit: Union[Unset, UnitForce] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - input: Union[Unset, float] = UNSET - input_unit: Union[Unset, UnitForce] = UNSET - output: Union[Unset, float] = UNSET - output_unit: Union[Unset, UnitForce] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 + id = self.id + input = self.input + if not isinstance(self.input_unit, Unset): + input_unit = self.input_unit + output = self.output + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + if not isinstance(self.status, Unset): + status = self.status + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id - 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 - id = self.id - input = self.input - if not isinstance(self.input_unit, Unset): - input_unit = self.input_unit - output = self.output - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - started_at: Union[Unset, str] = UNSET - if not isinstance(self.started_at, Unset): - started_at = self.started_at.isoformat() - if not isinstance(self.status, Unset): - status = self.status - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() - user_id = self.user_id + 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 id is not UNSET: + field_dict['id'] = id + if input is not UNSET: + field_dict['input'] = input + if input_unit is not UNSET: + field_dict['input_unit'] = input_unit + if output is not UNSET: + field_dict['output'] = output + if output_unit is not UNSET: + field_dict['output_unit'] = output_unit + if started_at is not UNSET: + field_dict['started_at'] = started_at + if status is not UNSET: + field_dict['status'] = status + if updated_at is not UNSET: + field_dict['updated_at'] = updated_at + if user_id is not UNSET: + field_dict['user_id'] = user_id - 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 id is not UNSET: - field_dict["id"] = id - if input is not UNSET: - field_dict["input"] = input - if input_unit is not UNSET: - field_dict["input_unit"] = input_unit - if output is not UNSET: - field_dict["output"] = output - if output_unit is not UNSET: - field_dict["output_unit"] = output_unit - if started_at is not UNSET: - field_dict["started_at"] = started_at - if status is not UNSET: - field_dict["status"] = status - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - if user_id is not UNSET: - field_dict["user_id"] = user_id + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[AB], src_dict: Dict[str, Any]) -> AB: + d = src_dict.copy() + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) - @classmethod - def from_dict(cls: Type[AB], src_dict: Dict[str, Any]) -> AB: - d = src_dict.copy() - _completed_at = d.pop("completed_at", UNSET) - completed_at: Union[Unset, datetime.datetime] - 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) - _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) - error = d.pop("error", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] + input = d.pop("input", UNSET) - input = d.pop("input", UNSET) + _input_unit = d.pop("input_unit", UNSET) + input_unit: Union[Unset, UnitForce] + if isinstance(_input_unit, Unset): + input_unit = UNSET + else: + input_unit = _input_unit # type: ignore[arg-type] - _input_unit = d.pop("input_unit", UNSET) - input_unit: Union[Unset, UnitForce] - if isinstance(_input_unit, Unset): - input_unit = UNSET - else: - input_unit = _input_unit # type: ignore[arg-type] + output = d.pop("output", UNSET) - output = d.pop("output", UNSET) + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitForce] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitForce] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) - _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] - _status = d.pop("status", UNSET) - status: Union[Unset, ApiCallStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = _status # type: ignore[arg-type] + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) - _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) - user_id = d.pop("user_id", UNSET) - unit_force_conversion = cls( - completed_at=completed_at, - created_at=created_at, - error=error, - id=id, - input=input, - input_unit=input_unit, - output=output, - output_unit=output_unit, - started_at=started_at, - status=status, - updated_at=updated_at, - user_id=user_id, - ) + unit_force_conversion = cls( + completed_at= completed_at, + created_at= created_at, + error= error, + id= id, + input= input, + input_unit= input_unit, + output= output, + output_unit= output_unit, + started_at= started_at, + status= status, + updated_at= updated_at, + user_id= user_id, + ) - unit_force_conversion.additional_properties = d - return unit_force_conversion + unit_force_conversion.additional_properties = d + return unit_force_conversion - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/unit_frequency.py b/kittycad/models/unit_frequency.py index 58d7525b2..06ca62536 100644 --- a/kittycad/models/unit_frequency.py +++ b/kittycad/models/unit_frequency.py @@ -2,24 +2,23 @@ from enum import Enum class UnitFrequency(str, Enum): - """The valid types of frequency units.""" # noqa: E501 + """ The valid types of frequency units. """ # noqa: E501 + """# Gigahertz """ # noqa: E501 + GIGAHERTZ = 'gigahertz' + """# Hertz """ # noqa: E501 + HERTZ = 'hertz' + """# Kilohertz """ # noqa: E501 + KILOHERTZ = 'kilohertz' + """# Megahertz """ # noqa: E501 + MEGAHERTZ = 'megahertz' + """# Microhertz """ # noqa: E501 + MICROHERTZ = 'microhertz' + """# Millihertz """ # noqa: E501 + MILLIHERTZ = 'millihertz' + """# Nanohertz """ # noqa: E501 + NANOHERTZ = 'nanohertz' + """# Terahertz """ # noqa: E501 + TERAHERTZ = 'terahertz' - """# Gigahertz """ # noqa: E501 - GIGAHERTZ = "gigahertz" - """# Hertz """ # noqa: E501 - HERTZ = "hertz" - """# Kilohertz """ # noqa: E501 - KILOHERTZ = "kilohertz" - """# Megahertz """ # noqa: E501 - MEGAHERTZ = "megahertz" - """# Microhertz """ # noqa: E501 - MICROHERTZ = "microhertz" - """# Millihertz """ # noqa: E501 - MILLIHERTZ = "millihertz" - """# Nanohertz """ # noqa: E501 - NANOHERTZ = "nanohertz" - """# Terahertz """ # noqa: E501 - TERAHERTZ = "terahertz" - - def __str__(self) -> str: - return str(self.value) + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/unit_frequency_conversion.py b/kittycad/models/unit_frequency_conversion.py index a435cf35a..aa1972b03 100644 --- a/kittycad/models/unit_frequency_conversion.py +++ b/kittycad/models/unit_frequency_conversion.py @@ -11,178 +11,177 @@ from ..types import UNSET, Unset VY = TypeVar("VY", bound="UnitFrequencyConversion") - @attr.s(auto_attribs=True) class UnitFrequencyConversion: - """Result of converting between units.""" # noqa: E501 + """ Result of converting between units. """ # noqa: E501 + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + input: Union[Unset, float] = UNSET + input_unit: Union[Unset, UnitFrequency] = UNSET + output: Union[Unset, float] = UNSET + output_unit: Union[Unset, UnitFrequency] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - input: Union[Unset, float] = UNSET - input_unit: Union[Unset, UnitFrequency] = UNSET - output: Union[Unset, float] = UNSET - output_unit: Union[Unset, UnitFrequency] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 + id = self.id + input = self.input + if not isinstance(self.input_unit, Unset): + input_unit = self.input_unit + output = self.output + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + if not isinstance(self.status, Unset): + status = self.status + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id - 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 - id = self.id - input = self.input - if not isinstance(self.input_unit, Unset): - input_unit = self.input_unit - output = self.output - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - started_at: Union[Unset, str] = UNSET - if not isinstance(self.started_at, Unset): - started_at = self.started_at.isoformat() - if not isinstance(self.status, Unset): - status = self.status - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() - user_id = self.user_id + 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 id is not UNSET: + field_dict['id'] = id + if input is not UNSET: + field_dict['input'] = input + if input_unit is not UNSET: + field_dict['input_unit'] = input_unit + if output is not UNSET: + field_dict['output'] = output + if output_unit is not UNSET: + field_dict['output_unit'] = output_unit + if started_at is not UNSET: + field_dict['started_at'] = started_at + if status is not UNSET: + field_dict['status'] = status + if updated_at is not UNSET: + field_dict['updated_at'] = updated_at + if user_id is not UNSET: + field_dict['user_id'] = user_id - 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 id is not UNSET: - field_dict["id"] = id - if input is not UNSET: - field_dict["input"] = input - if input_unit is not UNSET: - field_dict["input_unit"] = input_unit - if output is not UNSET: - field_dict["output"] = output - if output_unit is not UNSET: - field_dict["output_unit"] = output_unit - if started_at is not UNSET: - field_dict["started_at"] = started_at - if status is not UNSET: - field_dict["status"] = status - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - if user_id is not UNSET: - field_dict["user_id"] = user_id + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[VY], src_dict: Dict[str, Any]) -> VY: + d = src_dict.copy() + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) - @classmethod - def from_dict(cls: Type[VY], src_dict: Dict[str, Any]) -> VY: - d = src_dict.copy() - _completed_at = d.pop("completed_at", UNSET) - completed_at: Union[Unset, datetime.datetime] - 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) - _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) - error = d.pop("error", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] + input = d.pop("input", UNSET) - input = d.pop("input", UNSET) + _input_unit = d.pop("input_unit", UNSET) + input_unit: Union[Unset, UnitFrequency] + if isinstance(_input_unit, Unset): + input_unit = UNSET + else: + input_unit = _input_unit # type: ignore[arg-type] - _input_unit = d.pop("input_unit", UNSET) - input_unit: Union[Unset, UnitFrequency] - if isinstance(_input_unit, Unset): - input_unit = UNSET - else: - input_unit = _input_unit # type: ignore[arg-type] + output = d.pop("output", UNSET) - output = d.pop("output", UNSET) + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitFrequency] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitFrequency] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) - _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] - _status = d.pop("status", UNSET) - status: Union[Unset, ApiCallStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = _status # type: ignore[arg-type] + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) - _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) - user_id = d.pop("user_id", UNSET) - unit_frequency_conversion = cls( - completed_at=completed_at, - created_at=created_at, - error=error, - id=id, - input=input, - input_unit=input_unit, - output=output, - output_unit=output_unit, - started_at=started_at, - status=status, - updated_at=updated_at, - user_id=user_id, - ) + unit_frequency_conversion = cls( + completed_at= completed_at, + created_at= created_at, + error= error, + id= id, + input= input, + input_unit= input_unit, + output= output, + output_unit= output_unit, + started_at= started_at, + status= status, + updated_at= updated_at, + user_id= user_id, + ) - unit_frequency_conversion.additional_properties = d - return unit_frequency_conversion + unit_frequency_conversion.additional_properties = d + return unit_frequency_conversion - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/unit_length.py b/kittycad/models/unit_length.py index 801239d92..ed6f7fdde 100644 --- a/kittycad/models/unit_length.py +++ b/kittycad/models/unit_length.py @@ -2,20 +2,19 @@ from enum import Enum class UnitLength(str, Enum): - """The valid types of length units.""" # noqa: E501 + """ The valid types of length units. """ # noqa: E501 + """# Centimeters """ # noqa: E501 + CM = 'cm' + """# Feet """ # noqa: E501 + FT = 'ft' + """# Inches """ # noqa: E501 + IN = 'in' + """# Meters """ # noqa: E501 + M = 'm' + """# Millimeters """ # noqa: E501 + MM = 'mm' + """# Yards """ # noqa: E501 + YD = 'yd' - """# Centimeters """ # noqa: E501 - CM = "cm" - """# Feet """ # noqa: E501 - FT = "ft" - """# Inches """ # noqa: E501 - IN = "in" - """# Meters """ # noqa: E501 - M = "m" - """# Millimeters """ # noqa: E501 - MM = "mm" - """# Yards """ # noqa: E501 - YD = "yd" - - def __str__(self) -> str: - return str(self.value) + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/unit_length_conversion.py b/kittycad/models/unit_length_conversion.py index 5c35727dd..85a9119c0 100644 --- a/kittycad/models/unit_length_conversion.py +++ b/kittycad/models/unit_length_conversion.py @@ -11,178 +11,177 @@ from ..types import UNSET, Unset DW = TypeVar("DW", bound="UnitLengthConversion") - @attr.s(auto_attribs=True) class UnitLengthConversion: - """Result of converting between units.""" # noqa: E501 + """ Result of converting between units. """ # noqa: E501 + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + input: Union[Unset, float] = UNSET + input_unit: Union[Unset, UnitLength] = UNSET + output: Union[Unset, float] = UNSET + output_unit: Union[Unset, UnitLength] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - input: Union[Unset, float] = UNSET - input_unit: Union[Unset, UnitLength] = UNSET - output: Union[Unset, float] = UNSET - output_unit: Union[Unset, UnitLength] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 + id = self.id + input = self.input + if not isinstance(self.input_unit, Unset): + input_unit = self.input_unit + output = self.output + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + if not isinstance(self.status, Unset): + status = self.status + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id - 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 - id = self.id - input = self.input - if not isinstance(self.input_unit, Unset): - input_unit = self.input_unit - output = self.output - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - started_at: Union[Unset, str] = UNSET - if not isinstance(self.started_at, Unset): - started_at = self.started_at.isoformat() - if not isinstance(self.status, Unset): - status = self.status - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() - user_id = self.user_id + 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 id is not UNSET: + field_dict['id'] = id + if input is not UNSET: + field_dict['input'] = input + if input_unit is not UNSET: + field_dict['input_unit'] = input_unit + if output is not UNSET: + field_dict['output'] = output + if output_unit is not UNSET: + field_dict['output_unit'] = output_unit + if started_at is not UNSET: + field_dict['started_at'] = started_at + if status is not UNSET: + field_dict['status'] = status + if updated_at is not UNSET: + field_dict['updated_at'] = updated_at + if user_id is not UNSET: + field_dict['user_id'] = user_id - 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 id is not UNSET: - field_dict["id"] = id - if input is not UNSET: - field_dict["input"] = input - if input_unit is not UNSET: - field_dict["input_unit"] = input_unit - if output is not UNSET: - field_dict["output"] = output - if output_unit is not UNSET: - field_dict["output_unit"] = output_unit - if started_at is not UNSET: - field_dict["started_at"] = started_at - if status is not UNSET: - field_dict["status"] = status - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - if user_id is not UNSET: - field_dict["user_id"] = user_id + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[DW], src_dict: Dict[str, Any]) -> DW: + d = src_dict.copy() + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) - @classmethod - def from_dict(cls: Type[DW], src_dict: Dict[str, Any]) -> DW: - d = src_dict.copy() - _completed_at = d.pop("completed_at", UNSET) - completed_at: Union[Unset, datetime.datetime] - 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) - _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) - error = d.pop("error", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] + input = d.pop("input", UNSET) - input = d.pop("input", UNSET) + _input_unit = d.pop("input_unit", UNSET) + input_unit: Union[Unset, UnitLength] + if isinstance(_input_unit, Unset): + input_unit = UNSET + else: + input_unit = _input_unit # type: ignore[arg-type] - _input_unit = d.pop("input_unit", UNSET) - input_unit: Union[Unset, UnitLength] - if isinstance(_input_unit, Unset): - input_unit = UNSET - else: - input_unit = _input_unit # type: ignore[arg-type] + output = d.pop("output", UNSET) - output = d.pop("output", UNSET) + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitLength] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitLength] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] + _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) - _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] - _status = d.pop("status", UNSET) - status: Union[Unset, ApiCallStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = _status # type: ignore[arg-type] + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) - _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) - user_id = d.pop("user_id", UNSET) - unit_length_conversion = cls( - completed_at=completed_at, - created_at=created_at, - error=error, - id=id, - input=input, - input_unit=input_unit, - output=output, - output_unit=output_unit, - started_at=started_at, - status=status, - updated_at=updated_at, - user_id=user_id, - ) + unit_length_conversion = cls( + completed_at= completed_at, + created_at= created_at, + error= error, + id= id, + input= input, + input_unit= input_unit, + output= output, + output_unit= output_unit, + started_at= started_at, + status= status, + updated_at= updated_at, + user_id= user_id, + ) - unit_length_conversion.additional_properties = d - return unit_length_conversion + unit_length_conversion.additional_properties = d + return unit_length_conversion - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/unit_mass.py b/kittycad/models/unit_mass.py index 62b9804de..9d06128da 100644 --- a/kittycad/models/unit_mass.py +++ b/kittycad/models/unit_mass.py @@ -2,14 +2,13 @@ from enum import Enum class UnitMass(str, Enum): - """The valid types of mass units.""" # noqa: E501 + """ The valid types of mass units. """ # noqa: E501 + """# Grams """ # noqa: E501 + G = 'g' + """# Kilograms """ # noqa: E501 + KG = 'kg' + """# Pounds """ # noqa: E501 + LB = 'lb' - """# Grams """ # noqa: E501 - G = "g" - """# Kilograms """ # noqa: E501 - KG = "kg" - """# Pounds """ # noqa: E501 - LB = "lb" - - def __str__(self) -> str: - return str(self.value) + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/unit_mass_conversion.py b/kittycad/models/unit_mass_conversion.py index 13d2f566c..9d2bf9516 100644 --- a/kittycad/models/unit_mass_conversion.py +++ b/kittycad/models/unit_mass_conversion.py @@ -11,178 +11,177 @@ from ..types import UNSET, Unset MC = TypeVar("MC", bound="UnitMassConversion") - @attr.s(auto_attribs=True) class UnitMassConversion: - """Result of converting between units.""" # noqa: E501 + """ Result of converting between units. """ # noqa: E501 + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + input: Union[Unset, float] = UNSET + input_unit: Union[Unset, UnitMass] = UNSET + output: Union[Unset, float] = UNSET + output_unit: Union[Unset, UnitMass] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - input: Union[Unset, float] = UNSET - input_unit: Union[Unset, UnitMass] = UNSET - output: Union[Unset, float] = UNSET - output_unit: Union[Unset, UnitMass] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 + id = self.id + input = self.input + if not isinstance(self.input_unit, Unset): + input_unit = self.input_unit + output = self.output + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + if not isinstance(self.status, Unset): + status = self.status + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id - 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 - id = self.id - input = self.input - if not isinstance(self.input_unit, Unset): - input_unit = self.input_unit - output = self.output - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - started_at: Union[Unset, str] = UNSET - if not isinstance(self.started_at, Unset): - started_at = self.started_at.isoformat() - if not isinstance(self.status, Unset): - status = self.status - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() - user_id = self.user_id + 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 id is not UNSET: + field_dict['id'] = id + if input is not UNSET: + field_dict['input'] = input + if input_unit is not UNSET: + field_dict['input_unit'] = input_unit + if output is not UNSET: + field_dict['output'] = output + if output_unit is not UNSET: + field_dict['output_unit'] = output_unit + if started_at is not UNSET: + field_dict['started_at'] = started_at + if status is not UNSET: + field_dict['status'] = status + if updated_at is not UNSET: + field_dict['updated_at'] = updated_at + if user_id is not UNSET: + field_dict['user_id'] = user_id - 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 id is not UNSET: - field_dict["id"] = id - if input is not UNSET: - field_dict["input"] = input - if input_unit is not UNSET: - field_dict["input_unit"] = input_unit - if output is not UNSET: - field_dict["output"] = output - if output_unit is not UNSET: - field_dict["output_unit"] = output_unit - if started_at is not UNSET: - field_dict["started_at"] = started_at - if status is not UNSET: - field_dict["status"] = status - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - if user_id is not UNSET: - field_dict["user_id"] = user_id + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[MC], src_dict: Dict[str, Any]) -> MC: + d = src_dict.copy() + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) - @classmethod - def from_dict(cls: Type[MC], src_dict: Dict[str, Any]) -> MC: - d = src_dict.copy() - _completed_at = d.pop("completed_at", UNSET) - completed_at: Union[Unset, datetime.datetime] - 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) - _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) - error = d.pop("error", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] + input = d.pop("input", UNSET) - input = d.pop("input", UNSET) + _input_unit = d.pop("input_unit", UNSET) + input_unit: Union[Unset, UnitMass] + if isinstance(_input_unit, Unset): + input_unit = UNSET + else: + input_unit = _input_unit # type: ignore[arg-type] - _input_unit = d.pop("input_unit", UNSET) - input_unit: Union[Unset, UnitMass] - if isinstance(_input_unit, Unset): - input_unit = UNSET - else: - input_unit = _input_unit # type: ignore[arg-type] + output = d.pop("output", UNSET) - output = d.pop("output", UNSET) + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitMass] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitMass] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] + _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) - _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] - _status = d.pop("status", UNSET) - status: Union[Unset, ApiCallStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = _status # type: ignore[arg-type] + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) - _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) - user_id = d.pop("user_id", UNSET) - unit_mass_conversion = cls( - completed_at=completed_at, - created_at=created_at, - error=error, - id=id, - input=input, - input_unit=input_unit, - output=output, - output_unit=output_unit, - started_at=started_at, - status=status, - updated_at=updated_at, - user_id=user_id, - ) + unit_mass_conversion = cls( + completed_at= completed_at, + created_at= created_at, + error= error, + id= id, + input= input, + input_unit= input_unit, + output= output, + output_unit= output_unit, + started_at= started_at, + status= status, + updated_at= updated_at, + user_id= user_id, + ) - unit_mass_conversion.additional_properties = d - return unit_mass_conversion + unit_mass_conversion.additional_properties = d + return unit_mass_conversion - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/unit_power.py b/kittycad/models/unit_power.py index 95dffd8bb..fce712a2c 100644 --- a/kittycad/models/unit_power.py +++ b/kittycad/models/unit_power.py @@ -2,22 +2,21 @@ from enum import Enum class UnitPower(str, Enum): - """The valid types of power units.""" # noqa: E501 + """ The valid types of power units. """ # noqa: E501 + """# British thermal units (BTU) per minute """ # noqa: E501 + BTU_PER_MINUTE = 'btu_per_minute' + """# Horsepower (hp) """ # noqa: E501 + HORSEPOWER = 'horsepower' + """# Kilowatts """ # noqa: E501 + KILOWATTS = 'kilowatts' + """# Metric horsepower (PS) """ # noqa: E501 + METRIC_HORSEPOWER = 'metric_horsepower' + """# Microwatts """ # noqa: E501 + MICROWATTS = 'microwatts' + """# Millwatts """ # noqa: E501 + MILLIWATTS = 'milliwatts' + """# Watts """ # noqa: E501 + WATTS = 'watts' - """# British thermal units (BTU) per minute """ # noqa: E501 - BTU_PER_MINUTE = "btu_per_minute" - """# Horsepower (hp) """ # noqa: E501 - HORSEPOWER = "horsepower" - """# Kilowatts """ # noqa: E501 - KILOWATTS = "kilowatts" - """# Metric horsepower (PS) """ # noqa: E501 - METRIC_HORSEPOWER = "metric_horsepower" - """# Microwatts """ # noqa: E501 - MICROWATTS = "microwatts" - """# Millwatts """ # noqa: E501 - MILLIWATTS = "milliwatts" - """# Watts """ # noqa: E501 - WATTS = "watts" - - def __str__(self) -> str: - return str(self.value) + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/unit_power_conversion.py b/kittycad/models/unit_power_conversion.py index ea294da53..41da6ed2b 100644 --- a/kittycad/models/unit_power_conversion.py +++ b/kittycad/models/unit_power_conversion.py @@ -11,178 +11,177 @@ from ..types import UNSET, Unset AV = TypeVar("AV", bound="UnitPowerConversion") - @attr.s(auto_attribs=True) class UnitPowerConversion: - """Result of converting between units.""" # noqa: E501 + """ Result of converting between units. """ # noqa: E501 + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + input: Union[Unset, float] = UNSET + input_unit: Union[Unset, UnitPower] = UNSET + output: Union[Unset, float] = UNSET + output_unit: Union[Unset, UnitPower] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - input: Union[Unset, float] = UNSET - input_unit: Union[Unset, UnitPower] = UNSET - output: Union[Unset, float] = UNSET - output_unit: Union[Unset, UnitPower] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 + id = self.id + input = self.input + if not isinstance(self.input_unit, Unset): + input_unit = self.input_unit + output = self.output + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + if not isinstance(self.status, Unset): + status = self.status + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id - 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 - id = self.id - input = self.input - if not isinstance(self.input_unit, Unset): - input_unit = self.input_unit - output = self.output - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - started_at: Union[Unset, str] = UNSET - if not isinstance(self.started_at, Unset): - started_at = self.started_at.isoformat() - if not isinstance(self.status, Unset): - status = self.status - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() - user_id = self.user_id + 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 id is not UNSET: + field_dict['id'] = id + if input is not UNSET: + field_dict['input'] = input + if input_unit is not UNSET: + field_dict['input_unit'] = input_unit + if output is not UNSET: + field_dict['output'] = output + if output_unit is not UNSET: + field_dict['output_unit'] = output_unit + if started_at is not UNSET: + field_dict['started_at'] = started_at + if status is not UNSET: + field_dict['status'] = status + if updated_at is not UNSET: + field_dict['updated_at'] = updated_at + if user_id is not UNSET: + field_dict['user_id'] = user_id - 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 id is not UNSET: - field_dict["id"] = id - if input is not UNSET: - field_dict["input"] = input - if input_unit is not UNSET: - field_dict["input_unit"] = input_unit - if output is not UNSET: - field_dict["output"] = output - if output_unit is not UNSET: - field_dict["output_unit"] = output_unit - if started_at is not UNSET: - field_dict["started_at"] = started_at - if status is not UNSET: - field_dict["status"] = status - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - if user_id is not UNSET: - field_dict["user_id"] = user_id + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[AV], src_dict: Dict[str, Any]) -> AV: + d = src_dict.copy() + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) - @classmethod - def from_dict(cls: Type[AV], src_dict: Dict[str, Any]) -> AV: - d = src_dict.copy() - _completed_at = d.pop("completed_at", UNSET) - completed_at: Union[Unset, datetime.datetime] - 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) - _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) - error = d.pop("error", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] + input = d.pop("input", UNSET) - input = d.pop("input", UNSET) + _input_unit = d.pop("input_unit", UNSET) + input_unit: Union[Unset, UnitPower] + if isinstance(_input_unit, Unset): + input_unit = UNSET + else: + input_unit = _input_unit # type: ignore[arg-type] - _input_unit = d.pop("input_unit", UNSET) - input_unit: Union[Unset, UnitPower] - if isinstance(_input_unit, Unset): - input_unit = UNSET - else: - input_unit = _input_unit # type: ignore[arg-type] + output = d.pop("output", UNSET) - output = d.pop("output", UNSET) + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitPower] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitPower] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) - _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] - _status = d.pop("status", UNSET) - status: Union[Unset, ApiCallStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = _status # type: ignore[arg-type] + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) - _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) - user_id = d.pop("user_id", UNSET) - unit_power_conversion = cls( - completed_at=completed_at, - created_at=created_at, - error=error, - id=id, - input=input, - input_unit=input_unit, - output=output, - output_unit=output_unit, - started_at=started_at, - status=status, - updated_at=updated_at, - user_id=user_id, - ) + unit_power_conversion = cls( + completed_at= completed_at, + created_at= created_at, + error= error, + id= id, + input= input, + input_unit= input_unit, + output= output, + output_unit= output_unit, + started_at= started_at, + status= status, + updated_at= updated_at, + user_id= user_id, + ) - unit_power_conversion.additional_properties = d - return unit_power_conversion + unit_power_conversion.additional_properties = d + return unit_power_conversion - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/unit_pressure.py b/kittycad/models/unit_pressure.py index 15b6c40b3..69a45ae79 100644 --- a/kittycad/models/unit_pressure.py +++ b/kittycad/models/unit_pressure.py @@ -2,22 +2,21 @@ from enum import Enum class UnitPressure(str, Enum): - """The valid types of pressure units.""" # noqa: E501 + """ The valid types of pressure units. """ # noqa: E501 + """# Atmospheres """ # noqa: E501 + ATMOSPHERES = 'atmospheres' + """# Bars """ # noqa: E501 + BARS = 'bars' + """# Hectopascals """ # noqa: E501 + HECTOPASCALS = 'hectopascals' + """# Kilopascals """ # noqa: E501 + KILOPASCALS = 'kilopascals' + """# Millibars """ # noqa: E501 + MILLIBARS = 'millibars' + """# Pascals """ # noqa: E501 + PASCALS = 'pascals' + """# Pounds per square inch (PSI) - """ # noqa: E501 + PSI = 'psi' - """# Atmospheres """ # noqa: E501 - ATMOSPHERES = "atmospheres" - """# Bars """ # noqa: E501 - BARS = "bars" - """# Hectopascals """ # noqa: E501 - HECTOPASCALS = "hectopascals" - """# Kilopascals """ # noqa: E501 - KILOPASCALS = "kilopascals" - """# Millibars """ # noqa: E501 - MILLIBARS = "millibars" - """# Pascals """ # noqa: E501 - PASCALS = "pascals" - """# Pounds per square inch (PSI) - """ # noqa: E501 - PSI = "psi" - - def __str__(self) -> str: - return str(self.value) + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/unit_pressure_conversion.py b/kittycad/models/unit_pressure_conversion.py index 9d2c946dd..5fada3748 100644 --- a/kittycad/models/unit_pressure_conversion.py +++ b/kittycad/models/unit_pressure_conversion.py @@ -11,178 +11,177 @@ from ..types import UNSET, Unset BR = TypeVar("BR", bound="UnitPressureConversion") - @attr.s(auto_attribs=True) class UnitPressureConversion: - """Result of converting between units.""" # noqa: E501 + """ Result of converting between units. """ # noqa: E501 + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + input: Union[Unset, float] = UNSET + input_unit: Union[Unset, UnitPressure] = UNSET + output: Union[Unset, float] = UNSET + output_unit: Union[Unset, UnitPressure] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - input: Union[Unset, float] = UNSET - input_unit: Union[Unset, UnitPressure] = UNSET - output: Union[Unset, float] = UNSET - output_unit: Union[Unset, UnitPressure] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 + id = self.id + input = self.input + if not isinstance(self.input_unit, Unset): + input_unit = self.input_unit + output = self.output + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + if not isinstance(self.status, Unset): + status = self.status + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id - 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 - id = self.id - input = self.input - if not isinstance(self.input_unit, Unset): - input_unit = self.input_unit - output = self.output - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - started_at: Union[Unset, str] = UNSET - if not isinstance(self.started_at, Unset): - started_at = self.started_at.isoformat() - if not isinstance(self.status, Unset): - status = self.status - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() - user_id = self.user_id + 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 id is not UNSET: + field_dict['id'] = id + if input is not UNSET: + field_dict['input'] = input + if input_unit is not UNSET: + field_dict['input_unit'] = input_unit + if output is not UNSET: + field_dict['output'] = output + if output_unit is not UNSET: + field_dict['output_unit'] = output_unit + if started_at is not UNSET: + field_dict['started_at'] = started_at + if status is not UNSET: + field_dict['status'] = status + if updated_at is not UNSET: + field_dict['updated_at'] = updated_at + if user_id is not UNSET: + field_dict['user_id'] = user_id - 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 id is not UNSET: - field_dict["id"] = id - if input is not UNSET: - field_dict["input"] = input - if input_unit is not UNSET: - field_dict["input_unit"] = input_unit - if output is not UNSET: - field_dict["output"] = output - if output_unit is not UNSET: - field_dict["output_unit"] = output_unit - if started_at is not UNSET: - field_dict["started_at"] = started_at - if status is not UNSET: - field_dict["status"] = status - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - if user_id is not UNSET: - field_dict["user_id"] = user_id + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[BR], src_dict: Dict[str, Any]) -> BR: + d = src_dict.copy() + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) - @classmethod - def from_dict(cls: Type[BR], src_dict: Dict[str, Any]) -> BR: - d = src_dict.copy() - _completed_at = d.pop("completed_at", UNSET) - completed_at: Union[Unset, datetime.datetime] - 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) - _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) - error = d.pop("error", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] + input = d.pop("input", UNSET) - input = d.pop("input", UNSET) + _input_unit = d.pop("input_unit", UNSET) + input_unit: Union[Unset, UnitPressure] + if isinstance(_input_unit, Unset): + input_unit = UNSET + else: + input_unit = _input_unit # type: ignore[arg-type] - _input_unit = d.pop("input_unit", UNSET) - input_unit: Union[Unset, UnitPressure] - if isinstance(_input_unit, Unset): - input_unit = UNSET - else: - input_unit = _input_unit # type: ignore[arg-type] + output = d.pop("output", UNSET) - output = d.pop("output", UNSET) + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitPressure] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitPressure] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) - _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] - _status = d.pop("status", UNSET) - status: Union[Unset, ApiCallStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = _status # type: ignore[arg-type] + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) - _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) - user_id = d.pop("user_id", UNSET) - unit_pressure_conversion = cls( - completed_at=completed_at, - created_at=created_at, - error=error, - id=id, - input=input, - input_unit=input_unit, - output=output, - output_unit=output_unit, - started_at=started_at, - status=status, - updated_at=updated_at, - user_id=user_id, - ) + unit_pressure_conversion = cls( + completed_at= completed_at, + created_at= created_at, + error= error, + id= id, + input= input, + input_unit= input_unit, + output= output, + output_unit= output_unit, + started_at= started_at, + status= status, + updated_at= updated_at, + user_id= user_id, + ) - unit_pressure_conversion.additional_properties = d - return unit_pressure_conversion + unit_pressure_conversion.additional_properties = d + return unit_pressure_conversion - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/unit_temperature.py b/kittycad/models/unit_temperature.py index 72a1e9382..df857069d 100644 --- a/kittycad/models/unit_temperature.py +++ b/kittycad/models/unit_temperature.py @@ -2,16 +2,15 @@ from enum import Enum class UnitTemperature(str, Enum): - """The valid types of temperature units.""" # noqa: E501 + """ The valid types of temperature units. """ # noqa: E501 + """# Celsius """ # noqa: E501 + CELSIUS = 'celsius' + """# Fahrenheit """ # noqa: E501 + FAHRENHEIT = 'fahrenheit' + """# Kelvin """ # noqa: E501 + KELVIN = 'kelvin' + """# Rankine """ # noqa: E501 + RANKINE = 'rankine' - """# Celsius """ # noqa: E501 - CELSIUS = "celsius" - """# Fahrenheit """ # noqa: E501 - FAHRENHEIT = "fahrenheit" - """# Kelvin """ # noqa: E501 - KELVIN = "kelvin" - """# Rankine """ # noqa: E501 - RANKINE = "rankine" - - def __str__(self) -> str: - return str(self.value) + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/unit_temperature_conversion.py b/kittycad/models/unit_temperature_conversion.py index 7d21370ac..8d6893776 100644 --- a/kittycad/models/unit_temperature_conversion.py +++ b/kittycad/models/unit_temperature_conversion.py @@ -11,178 +11,177 @@ from ..types import UNSET, Unset WM = TypeVar("WM", bound="UnitTemperatureConversion") - @attr.s(auto_attribs=True) class UnitTemperatureConversion: - """Result of converting between units.""" # noqa: E501 + """ Result of converting between units. """ # noqa: E501 + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + input: Union[Unset, float] = UNSET + input_unit: Union[Unset, UnitTemperature] = UNSET + output: Union[Unset, float] = UNSET + output_unit: Union[Unset, UnitTemperature] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - input: Union[Unset, float] = UNSET - input_unit: Union[Unset, UnitTemperature] = UNSET - output: Union[Unset, float] = UNSET - output_unit: Union[Unset, UnitTemperature] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 + id = self.id + input = self.input + if not isinstance(self.input_unit, Unset): + input_unit = self.input_unit + output = self.output + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + if not isinstance(self.status, Unset): + status = self.status + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id - 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 - id = self.id - input = self.input - if not isinstance(self.input_unit, Unset): - input_unit = self.input_unit - output = self.output - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - started_at: Union[Unset, str] = UNSET - if not isinstance(self.started_at, Unset): - started_at = self.started_at.isoformat() - if not isinstance(self.status, Unset): - status = self.status - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() - user_id = self.user_id + 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 id is not UNSET: + field_dict['id'] = id + if input is not UNSET: + field_dict['input'] = input + if input_unit is not UNSET: + field_dict['input_unit'] = input_unit + if output is not UNSET: + field_dict['output'] = output + if output_unit is not UNSET: + field_dict['output_unit'] = output_unit + if started_at is not UNSET: + field_dict['started_at'] = started_at + if status is not UNSET: + field_dict['status'] = status + if updated_at is not UNSET: + field_dict['updated_at'] = updated_at + if user_id is not UNSET: + field_dict['user_id'] = user_id - 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 id is not UNSET: - field_dict["id"] = id - if input is not UNSET: - field_dict["input"] = input - if input_unit is not UNSET: - field_dict["input_unit"] = input_unit - if output is not UNSET: - field_dict["output"] = output - if output_unit is not UNSET: - field_dict["output_unit"] = output_unit - if started_at is not UNSET: - field_dict["started_at"] = started_at - if status is not UNSET: - field_dict["status"] = status - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - if user_id is not UNSET: - field_dict["user_id"] = user_id + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[WM], src_dict: Dict[str, Any]) -> WM: + d = src_dict.copy() + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) - @classmethod - def from_dict(cls: Type[WM], src_dict: Dict[str, Any]) -> WM: - d = src_dict.copy() - _completed_at = d.pop("completed_at", UNSET) - completed_at: Union[Unset, datetime.datetime] - 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) - _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) - error = d.pop("error", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] + input = d.pop("input", UNSET) - input = d.pop("input", UNSET) + _input_unit = d.pop("input_unit", UNSET) + input_unit: Union[Unset, UnitTemperature] + if isinstance(_input_unit, Unset): + input_unit = UNSET + else: + input_unit = _input_unit # type: ignore[arg-type] - _input_unit = d.pop("input_unit", UNSET) - input_unit: Union[Unset, UnitTemperature] - if isinstance(_input_unit, Unset): - input_unit = UNSET - else: - input_unit = _input_unit # type: ignore[arg-type] + output = d.pop("output", UNSET) - output = d.pop("output", UNSET) + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitTemperature] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitTemperature] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) - _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] - _status = d.pop("status", UNSET) - status: Union[Unset, ApiCallStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = _status # type: ignore[arg-type] + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) - _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) - user_id = d.pop("user_id", UNSET) - unit_temperature_conversion = cls( - completed_at=completed_at, - created_at=created_at, - error=error, - id=id, - input=input, - input_unit=input_unit, - output=output, - output_unit=output_unit, - started_at=started_at, - status=status, - updated_at=updated_at, - user_id=user_id, - ) + unit_temperature_conversion = cls( + completed_at= completed_at, + created_at= created_at, + error= error, + id= id, + input= input, + input_unit= input_unit, + output= output, + output_unit= output_unit, + started_at= started_at, + status= status, + updated_at= updated_at, + user_id= user_id, + ) - unit_temperature_conversion.additional_properties = d - return unit_temperature_conversion + unit_temperature_conversion.additional_properties = d + return unit_temperature_conversion - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/unit_torque.py b/kittycad/models/unit_torque.py index 02c71e8ea..f0afeb50a 100644 --- a/kittycad/models/unit_torque.py +++ b/kittycad/models/unit_torque.py @@ -2,12 +2,11 @@ from enum import Enum class UnitTorque(str, Enum): - """The valid types of torque units.""" # noqa: E501 + """ The valid types of torque units. """ # noqa: E501 + """# Newton metres """ # noqa: E501 + NEWTON_METRES = 'newton_metres' + """# Pound foot """ # noqa: E501 + POUND_FOOT = 'pound_foot' - """# Newton metres """ # noqa: E501 - NEWTON_METRES = "newton_metres" - """# Pound foot """ # noqa: E501 - POUND_FOOT = "pound_foot" - - def __str__(self) -> str: - return str(self.value) + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/unit_torque_conversion.py b/kittycad/models/unit_torque_conversion.py index 345f428a9..4d7f2852a 100644 --- a/kittycad/models/unit_torque_conversion.py +++ b/kittycad/models/unit_torque_conversion.py @@ -11,178 +11,177 @@ from ..types import UNSET, Unset OK = TypeVar("OK", bound="UnitTorqueConversion") - @attr.s(auto_attribs=True) class UnitTorqueConversion: - """Result of converting between units.""" # noqa: E501 + """ Result of converting between units. """ # noqa: E501 + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + input: Union[Unset, float] = UNSET + input_unit: Union[Unset, UnitTorque] = UNSET + output: Union[Unset, float] = UNSET + output_unit: Union[Unset, UnitTorque] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - input: Union[Unset, float] = UNSET - input_unit: Union[Unset, UnitTorque] = UNSET - output: Union[Unset, float] = UNSET - output_unit: Union[Unset, UnitTorque] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 + id = self.id + input = self.input + if not isinstance(self.input_unit, Unset): + input_unit = self.input_unit + output = self.output + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + if not isinstance(self.status, Unset): + status = self.status + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id - 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 - id = self.id - input = self.input - if not isinstance(self.input_unit, Unset): - input_unit = self.input_unit - output = self.output - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - started_at: Union[Unset, str] = UNSET - if not isinstance(self.started_at, Unset): - started_at = self.started_at.isoformat() - if not isinstance(self.status, Unset): - status = self.status - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() - user_id = self.user_id + 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 id is not UNSET: + field_dict['id'] = id + if input is not UNSET: + field_dict['input'] = input + if input_unit is not UNSET: + field_dict['input_unit'] = input_unit + if output is not UNSET: + field_dict['output'] = output + if output_unit is not UNSET: + field_dict['output_unit'] = output_unit + if started_at is not UNSET: + field_dict['started_at'] = started_at + if status is not UNSET: + field_dict['status'] = status + if updated_at is not UNSET: + field_dict['updated_at'] = updated_at + if user_id is not UNSET: + field_dict['user_id'] = user_id - 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 id is not UNSET: - field_dict["id"] = id - if input is not UNSET: - field_dict["input"] = input - if input_unit is not UNSET: - field_dict["input_unit"] = input_unit - if output is not UNSET: - field_dict["output"] = output - if output_unit is not UNSET: - field_dict["output_unit"] = output_unit - if started_at is not UNSET: - field_dict["started_at"] = started_at - if status is not UNSET: - field_dict["status"] = status - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - if user_id is not UNSET: - field_dict["user_id"] = user_id + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[OK], src_dict: Dict[str, Any]) -> OK: + d = src_dict.copy() + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) - @classmethod - def from_dict(cls: Type[OK], src_dict: Dict[str, Any]) -> OK: - d = src_dict.copy() - _completed_at = d.pop("completed_at", UNSET) - completed_at: Union[Unset, datetime.datetime] - 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) - _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) - error = d.pop("error", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] + input = d.pop("input", UNSET) - input = d.pop("input", UNSET) + _input_unit = d.pop("input_unit", UNSET) + input_unit: Union[Unset, UnitTorque] + if isinstance(_input_unit, Unset): + input_unit = UNSET + else: + input_unit = _input_unit # type: ignore[arg-type] - _input_unit = d.pop("input_unit", UNSET) - input_unit: Union[Unset, UnitTorque] - if isinstance(_input_unit, Unset): - input_unit = UNSET - else: - input_unit = _input_unit # type: ignore[arg-type] + output = d.pop("output", UNSET) - output = d.pop("output", UNSET) + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitTorque] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitTorque] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] + _started_at = d.pop("started_at", UNSET) + started_at: Union[Unset, datetime.datetime] + if isinstance(_started_at, Unset): + started_at = UNSET + else: + started_at = isoparse(_started_at) - _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] - _status = d.pop("status", UNSET) - status: Union[Unset, ApiCallStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = _status # type: ignore[arg-type] + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) - _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) - user_id = d.pop("user_id", UNSET) - unit_torque_conversion = cls( - completed_at=completed_at, - created_at=created_at, - error=error, - id=id, - input=input, - input_unit=input_unit, - output=output, - output_unit=output_unit, - started_at=started_at, - status=status, - updated_at=updated_at, - user_id=user_id, - ) + unit_torque_conversion = cls( + completed_at= completed_at, + created_at= created_at, + error= error, + id= id, + input= input, + input_unit= input_unit, + output= output, + output_unit= output_unit, + started_at= started_at, + status= status, + updated_at= updated_at, + user_id= user_id, + ) - unit_torque_conversion.additional_properties = d - return unit_torque_conversion + unit_torque_conversion.additional_properties = d + return unit_torque_conversion - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/unit_volume.py b/kittycad/models/unit_volume.py index edc51cda3..7142d28f0 100644 --- a/kittycad/models/unit_volume.py +++ b/kittycad/models/unit_volume.py @@ -2,26 +2,25 @@ from enum import Enum class UnitVolume(str, Enum): - """The valid types of volume units.""" # noqa: E501 + """ The valid types of volume units. """ # noqa: E501 + """# Cubic centimeters (cc or cm³) """ # noqa: E501 + CM3 = 'cm3' + """# Cubic feet (ft³) """ # noqa: E501 + FT3 = 'ft3' + """# Cubic inches (cu in or in³) """ # noqa: E501 + IN3 = 'in3' + """# Cubic meters (m³) """ # noqa: E501 + M3 = 'm3' + """# Cubic yards (yd³) """ # noqa: E501 + YD3 = 'yd3' + """# US Fluid Ounces (fl oz) """ # noqa: E501 + USFLOZ = 'usfloz' + """# US Gallons (gal US) """ # noqa: E501 + USGAL = 'usgal' + """# Liters (l) """ # noqa: E501 + L = 'l' + """# Milliliters (ml) """ # noqa: E501 + ML = 'ml' - """# Cubic centimeters (cc or cm³) """ # noqa: E501 - CM3 = "cm3" - """# Cubic feet (ft³) """ # noqa: E501 - FT3 = "ft3" - """# Cubic inches (cu in or in³) """ # noqa: E501 - IN3 = "in3" - """# Cubic meters (m³) """ # noqa: E501 - M3 = "m3" - """# Cubic yards (yd³) """ # noqa: E501 - YD3 = "yd3" - """# US Fluid Ounces (fl oz) """ # noqa: E501 - USFLOZ = "usfloz" - """# US Gallons (gal US) """ # noqa: E501 - USGAL = "usgal" - """# Liters (l) """ # noqa: E501 - L = "l" - """# Milliliters (ml) """ # noqa: E501 - ML = "ml" - - def __str__(self) -> str: - return str(self.value) + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/unit_volume_conversion.py b/kittycad/models/unit_volume_conversion.py index a4c72d17e..b84619fe2 100644 --- a/kittycad/models/unit_volume_conversion.py +++ b/kittycad/models/unit_volume_conversion.py @@ -11,178 +11,177 @@ from ..types import UNSET, Unset MU = TypeVar("MU", bound="UnitVolumeConversion") - @attr.s(auto_attribs=True) class UnitVolumeConversion: - """Result of converting between units.""" # noqa: E501 + """ Result of converting between units. """ # noqa: E501 + completed_at: Union[Unset, datetime.datetime] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + error: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + input: Union[Unset, float] = UNSET + input_unit: Union[Unset, UnitVolume] = UNSET + output: Union[Unset, float] = UNSET + output_unit: Union[Unset, UnitVolume] = UNSET + started_at: Union[Unset, datetime.datetime] = UNSET + status: Union[Unset, ApiCallStatus] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET + user_id: Union[Unset, str] = UNSET - completed_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - error: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - input: Union[Unset, float] = UNSET - input_unit: Union[Unset, UnitVolume] = UNSET - output: Union[Unset, float] = UNSET - output_unit: Union[Unset, UnitVolume] = UNSET - started_at: Union[Unset, datetime.datetime] = UNSET - status: Union[Unset, ApiCallStatus] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET - user_id: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 + id = self.id + input = self.input + if not isinstance(self.input_unit, Unset): + input_unit = self.input_unit + output = self.output + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + started_at: Union[Unset, str] = UNSET + if not isinstance(self.started_at, Unset): + started_at = self.started_at.isoformat() + if not isinstance(self.status, Unset): + status = self.status + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() + user_id = self.user_id - 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 - id = self.id - input = self.input - if not isinstance(self.input_unit, Unset): - input_unit = self.input_unit - output = self.output - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - started_at: Union[Unset, str] = UNSET - if not isinstance(self.started_at, Unset): - started_at = self.started_at.isoformat() - if not isinstance(self.status, Unset): - status = self.status - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() - user_id = self.user_id + 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 id is not UNSET: + field_dict['id'] = id + if input is not UNSET: + field_dict['input'] = input + if input_unit is not UNSET: + field_dict['input_unit'] = input_unit + if output is not UNSET: + field_dict['output'] = output + if output_unit is not UNSET: + field_dict['output_unit'] = output_unit + if started_at is not UNSET: + field_dict['started_at'] = started_at + if status is not UNSET: + field_dict['status'] = status + if updated_at is not UNSET: + field_dict['updated_at'] = updated_at + if user_id is not UNSET: + field_dict['user_id'] = user_id - 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 id is not UNSET: - field_dict["id"] = id - if input is not UNSET: - field_dict["input"] = input - if input_unit is not UNSET: - field_dict["input_unit"] = input_unit - if output is not UNSET: - field_dict["output"] = output - if output_unit is not UNSET: - field_dict["output_unit"] = output_unit - if started_at is not UNSET: - field_dict["started_at"] = started_at - if status is not UNSET: - field_dict["status"] = status - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at - if user_id is not UNSET: - field_dict["user_id"] = user_id + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[MU], src_dict: Dict[str, Any]) -> MU: + d = src_dict.copy() + _completed_at = d.pop("completed_at", UNSET) + completed_at: Union[Unset, datetime.datetime] + if isinstance(_completed_at, Unset): + completed_at = UNSET + else: + completed_at = isoparse(_completed_at) - @classmethod - def from_dict(cls: Type[MU], src_dict: Dict[str, Any]) -> MU: - d = src_dict.copy() - _completed_at = d.pop("completed_at", UNSET) - completed_at: Union[Unset, datetime.datetime] - 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) - _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) - error = d.pop("error", UNSET) + _id = d.pop("id", UNSET) + id: Union[Unset, Uuid] + if isinstance(_id, Unset): + id = UNSET + else: + id = _id # type: ignore[arg-type] - _id = d.pop("id", UNSET) - id: Union[Unset, Uuid] - if isinstance(_id, Unset): - id = UNSET - else: - id = _id # type: ignore[arg-type] + input = d.pop("input", UNSET) - input = d.pop("input", UNSET) + _input_unit = d.pop("input_unit", UNSET) + input_unit: Union[Unset, UnitVolume] + if isinstance(_input_unit, Unset): + input_unit = UNSET + else: + input_unit = _input_unit # type: ignore[arg-type] - _input_unit = d.pop("input_unit", UNSET) - input_unit: Union[Unset, UnitVolume] - if isinstance(_input_unit, Unset): - input_unit = UNSET - else: - input_unit = _input_unit # type: ignore[arg-type] + output = d.pop("output", UNSET) - output = d.pop("output", UNSET) + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitVolume] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitVolume] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] + _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) - _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] - _status = d.pop("status", UNSET) - status: Union[Unset, ApiCallStatus] - if isinstance(_status, Unset): - status = UNSET - else: - status = _status # type: ignore[arg-type] + _updated_at = d.pop("updated_at", UNSET) + updated_at: Union[Unset, datetime.datetime] + if isinstance(_updated_at, Unset): + updated_at = UNSET + else: + updated_at = isoparse(_updated_at) - _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) - user_id = d.pop("user_id", UNSET) - unit_volume_conversion = cls( - completed_at=completed_at, - created_at=created_at, - error=error, - id=id, - input=input, - input_unit=input_unit, - output=output, - output_unit=output_unit, - started_at=started_at, - status=status, - updated_at=updated_at, - user_id=user_id, - ) + unit_volume_conversion = cls( + completed_at= completed_at, + created_at= created_at, + error= error, + id= id, + input= input, + input_unit= input_unit, + output= output, + output_unit= output_unit, + started_at= started_at, + status= status, + updated_at= updated_at, + user_id= user_id, + ) - unit_volume_conversion.additional_properties = d - return unit_volume_conversion + unit_volume_conversion.additional_properties = d + return unit_volume_conversion - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/update_user.py b/kittycad/models/update_user.py index 0c77403f7..fdd4080fd 100644 --- a/kittycad/models/update_user.py +++ b/kittycad/models/update_user.py @@ -6,85 +6,84 @@ from ..types import UNSET, Unset OP = TypeVar("OP", bound="UpdateUser") - @attr.s(auto_attribs=True) class UpdateUser: - """The user-modifiable parts of a User.""" # noqa: E501 + """ The user-modifiable parts of a User. """ # noqa: E501 + company: Union[Unset, str] = UNSET + discord: Union[Unset, str] = UNSET + first_name: Union[Unset, str] = UNSET + github: Union[Unset, str] = UNSET + last_name: Union[Unset, str] = UNSET + phone: Union[Unset, str] = UNSET - company: Union[Unset, str] = UNSET - discord: Union[Unset, str] = UNSET - first_name: Union[Unset, str] = UNSET - github: Union[Unset, str] = UNSET - last_name: Union[Unset, str] = UNSET - phone: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + company = self.company + discord = self.discord + first_name = self.first_name + github = self.github + last_name = self.last_name + phone = self.phone - def to_dict(self) -> Dict[str, Any]: - company = self.company - discord = self.discord - first_name = self.first_name - github = self.github - last_name = self.last_name - phone = self.phone + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if company is not UNSET: + field_dict['company'] = company + if discord is not UNSET: + field_dict['discord'] = discord + if first_name is not UNSET: + field_dict['first_name'] = first_name + if github is not UNSET: + field_dict['github'] = github + if last_name is not UNSET: + field_dict['last_name'] = last_name + if phone is not UNSET: + field_dict['phone'] = phone - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if company is not UNSET: - field_dict["company"] = company - if discord is not UNSET: - field_dict["discord"] = discord - if first_name is not UNSET: - field_dict["first_name"] = first_name - if github is not UNSET: - field_dict["github"] = github - if last_name is not UNSET: - field_dict["last_name"] = last_name - if phone is not UNSET: - field_dict["phone"] = phone + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[OP], src_dict: Dict[str, Any]) -> OP: + d = src_dict.copy() + company = d.pop("company", UNSET) - @classmethod - def from_dict(cls: Type[OP], src_dict: Dict[str, Any]) -> OP: - d = src_dict.copy() - company = d.pop("company", UNSET) + discord = d.pop("discord", UNSET) - discord = d.pop("discord", UNSET) + first_name = d.pop("first_name", UNSET) - first_name = d.pop("first_name", UNSET) + github = d.pop("github", UNSET) - github = d.pop("github", UNSET) + last_name = d.pop("last_name", UNSET) - last_name = d.pop("last_name", UNSET) + phone = d.pop("phone", UNSET) - phone = d.pop("phone", UNSET) - update_user = cls( - company=company, - discord=discord, - first_name=first_name, - github=github, - last_name=last_name, - phone=phone, - ) + update_user = cls( + company= company, + discord= discord, + first_name= first_name, + github= github, + last_name= last_name, + phone= phone, + ) - update_user.additional_properties = d - return update_user + update_user.additional_properties = d + return update_user - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/user.py b/kittycad/models/user.py index 6234271f2..102731afb 100644 --- a/kittycad/models/user.py +++ b/kittycad/models/user.py @@ -8,155 +8,154 @@ from ..types import UNSET, Unset WW = TypeVar("WW", bound="User") - @attr.s(auto_attribs=True) class User: - """A user.""" # noqa: E501 + """ A user. """ # noqa: E501 + company: Union[Unset, str] = UNSET + created_at: Union[Unset, datetime.datetime] = UNSET + discord: Union[Unset, str] = UNSET + email: Union[Unset, str] = UNSET + email_verified: Union[Unset, datetime.datetime] = UNSET + first_name: Union[Unset, str] = UNSET + github: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + image: Union[Unset, str] = UNSET + last_name: Union[Unset, str] = UNSET + name: Union[Unset, str] = UNSET + phone: Union[Unset, str] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET - company: Union[Unset, str] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - discord: Union[Unset, str] = UNSET - email: Union[Unset, str] = UNSET - email_verified: Union[Unset, datetime.datetime] = UNSET - first_name: Union[Unset, str] = UNSET - github: Union[Unset, str] = UNSET - id: Union[Unset, str] = UNSET - image: Union[Unset, str] = UNSET - last_name: Union[Unset, str] = UNSET - name: Union[Unset, str] = UNSET - phone: Union[Unset, str] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + company = self.company + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + discord = self.discord + email = self.email + email_verified: Union[Unset, str] = UNSET + if not isinstance(self.email_verified, Unset): + email_verified = self.email_verified.isoformat() + first_name = self.first_name + github = self.github + id = self.id + image = self.image + last_name = self.last_name + name = self.name + phone = self.phone + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() - def to_dict(self) -> Dict[str, Any]: - company = self.company - created_at: Union[Unset, str] = UNSET - if not isinstance(self.created_at, Unset): - created_at = self.created_at.isoformat() - discord = self.discord - email = self.email - email_verified: Union[Unset, str] = UNSET - if not isinstance(self.email_verified, Unset): - email_verified = self.email_verified.isoformat() - first_name = self.first_name - github = self.github - id = self.id - image = self.image - last_name = self.last_name - name = self.name - phone = self.phone - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if company is not UNSET: + field_dict['company'] = company + if created_at is not UNSET: + field_dict['created_at'] = created_at + if discord is not UNSET: + field_dict['discord'] = discord + if email is not UNSET: + field_dict['email'] = email + if email_verified is not UNSET: + field_dict['email_verified'] = email_verified + if first_name is not UNSET: + field_dict['first_name'] = first_name + if github is not UNSET: + field_dict['github'] = github + if id is not UNSET: + field_dict['id'] = id + if image is not UNSET: + field_dict['image'] = image + if last_name is not UNSET: + field_dict['last_name'] = last_name + if name is not UNSET: + field_dict['name'] = name + if phone is not UNSET: + field_dict['phone'] = phone + if updated_at is not UNSET: + field_dict['updated_at'] = updated_at - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if company is not UNSET: - field_dict["company"] = company - if created_at is not UNSET: - field_dict["created_at"] = created_at - if discord is not UNSET: - field_dict["discord"] = discord - if email is not UNSET: - field_dict["email"] = email - if email_verified is not UNSET: - field_dict["email_verified"] = email_verified - if first_name is not UNSET: - field_dict["first_name"] = first_name - if github is not UNSET: - field_dict["github"] = github - if id is not UNSET: - field_dict["id"] = id - if image is not UNSET: - field_dict["image"] = image - if last_name is not UNSET: - field_dict["last_name"] = last_name - if name is not UNSET: - field_dict["name"] = name - if phone is not UNSET: - field_dict["phone"] = phone - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[WW], src_dict: Dict[str, Any]) -> WW: + d = src_dict.copy() + company = d.pop("company", UNSET) - @classmethod - def from_dict(cls: Type[WW], src_dict: Dict[str, Any]) -> WW: - d = src_dict.copy() - company = d.pop("company", UNSET) + _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) - _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) + discord = d.pop("discord", UNSET) - discord = d.pop("discord", UNSET) + email = d.pop("email", UNSET) - email = d.pop("email", UNSET) + _email_verified = d.pop("email_verified", UNSET) + email_verified: Union[Unset, datetime.datetime] + if isinstance(_email_verified, Unset): + email_verified = UNSET + else: + email_verified = isoparse(_email_verified) - _email_verified = d.pop("email_verified", UNSET) - email_verified: Union[Unset, datetime.datetime] - if isinstance(_email_verified, Unset): - email_verified = UNSET - else: - email_verified = isoparse(_email_verified) + first_name = d.pop("first_name", UNSET) - first_name = d.pop("first_name", UNSET) + github = d.pop("github", UNSET) - github = d.pop("github", UNSET) + id = d.pop("id", UNSET) - id = d.pop("id", UNSET) + image = d.pop("image", UNSET) - image = d.pop("image", UNSET) + last_name = d.pop("last_name", UNSET) - last_name = d.pop("last_name", UNSET) + name = d.pop("name", UNSET) - name = d.pop("name", UNSET) + phone = d.pop("phone", UNSET) - phone = d.pop("phone", 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) - _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 = cls( - company=company, - created_at=created_at, - discord=discord, - email=email, - email_verified=email_verified, - first_name=first_name, - github=github, - id=id, - image=image, - last_name=last_name, - name=name, - phone=phone, - updated_at=updated_at, - ) + user = cls( + company= company, + created_at= created_at, + discord= discord, + email= email, + email_verified= email_verified, + first_name= first_name, + github= github, + id= id, + image= image, + last_name= last_name, + name= name, + phone= phone, + updated_at= updated_at, + ) - user.additional_properties = d - return user + user.additional_properties = d + return user - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/user_results_page.py b/kittycad/models/user_results_page.py index 49abf86a8..ac02a2566 100644 --- a/kittycad/models/user_results_page.py +++ b/kittycad/models/user_results_page.py @@ -6,65 +6,61 @@ from ..types import UNSET, Unset LV = TypeVar("LV", bound="UserResultsPage") - @attr.s(auto_attribs=True) class UserResultsPage: - """A single page of results""" # noqa: E501 + """ A single page of results """ # noqa: E501 + from ..models.user import User + items: Union[Unset, List[User]] = UNSET + next_page: Union[Unset, str] = UNSET - from ..models.user import User + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - items: Union[Unset, List[User]] = UNSET - next_page: Union[Unset, str] = UNSET + def to_dict(self) -> Dict[str, Any]: + from ..models.user import User + items: Union[Unset, List[User]] = UNSET + if not isinstance(self.items, Unset): + items = self.items + next_page = self.next_page - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if items is not UNSET: + field_dict['items'] = items + if next_page is not UNSET: + field_dict['next_page'] = next_page - def to_dict(self) -> Dict[str, Any]: - from ..models.user import User + return field_dict - items: Union[Unset, List[User]] = UNSET - if not isinstance(self.items, Unset): - items = self.items - next_page = self.next_page + @classmethod + def from_dict(cls: Type[LV], src_dict: Dict[str, Any]) -> LV: + d = src_dict.copy() + from ..models.user import User + items = cast(List[User], d.pop("items", UNSET)) - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if items is not UNSET: - field_dict["items"] = items - if next_page is not UNSET: - field_dict["next_page"] = next_page + next_page = d.pop("next_page", UNSET) - return field_dict - @classmethod - def from_dict(cls: Type[LV], src_dict: Dict[str, Any]) -> LV: - d = src_dict.copy() - from ..models.user import User + user_results_page = cls( + items= items, + next_page= next_page, + ) - items = cast(List[User], d.pop("items", UNSET)) + user_results_page.additional_properties = d + return user_results_page - next_page = d.pop("next_page", UNSET) + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) - user_results_page = cls( - items=items, - next_page=next_page, - ) + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - user_results_page.additional_properties = d - return user_results_page + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] - 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 + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/uuid.py b/kittycad/models/uuid.py index 89c0dbd36..19b528669 100644 --- a/kittycad/models/uuid.py +++ b/kittycad/models/uuid.py @@ -1,3 +1,4 @@ class Uuid(str): - def __str__(self) -> str: - return self + + def __str__(self) -> str: + return self diff --git a/kittycad/models/verification_token.py b/kittycad/models/verification_token.py index 367c0c149..2b58fc15c 100644 --- a/kittycad/models/verification_token.py +++ b/kittycad/models/verification_token.py @@ -8,101 +8,100 @@ from ..types import UNSET, Unset II = TypeVar("II", bound="VerificationToken") - @attr.s(auto_attribs=True) class VerificationToken: - """A verification token for a user. + """ A verification token for a user. - This is typically used to verify a user's email address.""" # noqa: E501 +This is typically used to verify a user's email address. """ # noqa: E501 + created_at: Union[Unset, datetime.datetime] = UNSET + expires: Union[Unset, datetime.datetime] = UNSET + id: Union[Unset, str] = UNSET + identifier: Union[Unset, str] = UNSET + updated_at: Union[Unset, datetime.datetime] = UNSET - created_at: Union[Unset, datetime.datetime] = UNSET - expires: Union[Unset, datetime.datetime] = UNSET - id: Union[Unset, str] = UNSET - identifier: Union[Unset, str] = UNSET - updated_at: Union[Unset, datetime.datetime] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + created_at: Union[Unset, str] = UNSET + if not isinstance(self.created_at, Unset): + created_at = self.created_at.isoformat() + expires: Union[Unset, str] = UNSET + if not isinstance(self.expires, Unset): + expires = self.expires.isoformat() + id = self.id + identifier = self.identifier + updated_at: Union[Unset, str] = UNSET + if not isinstance(self.updated_at, Unset): + updated_at = self.updated_at.isoformat() - def to_dict(self) -> Dict[str, Any]: - created_at: Union[Unset, str] = UNSET - if not isinstance(self.created_at, Unset): - created_at = self.created_at.isoformat() - expires: Union[Unset, str] = UNSET - if not isinstance(self.expires, Unset): - expires = self.expires.isoformat() - id = self.id - identifier = self.identifier - updated_at: Union[Unset, str] = UNSET - if not isinstance(self.updated_at, Unset): - updated_at = self.updated_at.isoformat() + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if created_at is not UNSET: + field_dict['created_at'] = created_at + if expires is not UNSET: + field_dict['expires'] = expires + if id is not UNSET: + field_dict['id'] = id + if identifier is not UNSET: + field_dict['identifier'] = identifier + if updated_at is not UNSET: + field_dict['updated_at'] = updated_at - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if created_at is not UNSET: - field_dict["created_at"] = created_at - if expires is not UNSET: - field_dict["expires"] = expires - if id is not UNSET: - field_dict["id"] = id - if identifier is not UNSET: - field_dict["identifier"] = identifier - if updated_at is not UNSET: - field_dict["updated_at"] = updated_at + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[II], src_dict: Dict[str, Any]) -> II: + d = src_dict.copy() + _created_at = d.pop("created_at", UNSET) + created_at: Union[Unset, datetime.datetime] + if isinstance(_created_at, Unset): + created_at = UNSET + else: + created_at = isoparse(_created_at) - @classmethod - def from_dict(cls: Type[II], src_dict: Dict[str, Any]) -> II: - d = src_dict.copy() - _created_at = d.pop("created_at", UNSET) - created_at: Union[Unset, datetime.datetime] - if isinstance(_created_at, Unset): - created_at = UNSET - else: - created_at = isoparse(_created_at) + _expires = d.pop("expires", UNSET) + expires: Union[Unset, datetime.datetime] + if isinstance(_expires, Unset): + expires = UNSET + else: + expires = isoparse(_expires) - _expires = d.pop("expires", UNSET) - expires: Union[Unset, datetime.datetime] - if isinstance(_expires, Unset): - expires = UNSET - else: - expires = isoparse(_expires) + id = d.pop("id", UNSET) - id = d.pop("id", UNSET) + identifier = d.pop("identifier", UNSET) - identifier = d.pop("identifier", 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) - _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) - verification_token = cls( - created_at=created_at, - expires=expires, - id=id, - identifier=identifier, - updated_at=updated_at, - ) + verification_token = cls( + created_at= created_at, + expires= expires, + id= id, + identifier= identifier, + updated_at= updated_at, + ) - verification_token.additional_properties = d - return verification_token + verification_token.additional_properties = d + return verification_token - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/volume.py b/kittycad/models/volume.py index b1fc386a7..a07a6d51a 100644 --- a/kittycad/models/volume.py +++ b/kittycad/models/volume.py @@ -7,63 +7,62 @@ from ..types import UNSET, Unset FC = TypeVar("FC", bound="Volume") - @attr.s(auto_attribs=True) class Volume: - """The volume response.""" # noqa: E501 + """ The volume response. """ # noqa: E501 + output_unit: Union[Unset, UnitVolume] = UNSET + volume: Union[Unset, float] = UNSET - output_unit: Union[Unset, UnitVolume] = UNSET - volume: Union[Unset, float] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.output_unit, Unset): + output_unit = self.output_unit + volume = self.volume - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.output_unit, Unset): - output_unit = self.output_unit - volume = self.volume + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if output_unit is not UNSET: + field_dict['output_unit'] = output_unit + if volume is not UNSET: + field_dict['volume'] = volume - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if output_unit is not UNSET: - field_dict["output_unit"] = output_unit - if volume is not UNSET: - field_dict["volume"] = volume + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[FC], src_dict: Dict[str, Any]) -> FC: + d = src_dict.copy() + _output_unit = d.pop("output_unit", UNSET) + output_unit: Union[Unset, UnitVolume] + if isinstance(_output_unit, Unset): + output_unit = UNSET + else: + output_unit = _output_unit # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[FC], src_dict: Dict[str, Any]) -> FC: - d = src_dict.copy() - _output_unit = d.pop("output_unit", UNSET) - output_unit: Union[Unset, UnitVolume] - if isinstance(_output_unit, Unset): - output_unit = UNSET - else: - output_unit = _output_unit # type: ignore[arg-type] + volume = d.pop("volume", UNSET) - volume = d.pop("volume", UNSET) - volume = cls( - output_unit=output_unit, - volume=volume, - ) + volume = cls( + output_unit= output_unit, + volume= volume, + ) - volume.additional_properties = d - return volume + volume.additional_properties = d + return volume - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 __delitem__(self, key: str) -> None: + del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/web_socket_request.py b/kittycad/models/web_socket_request.py index eba8050f2..8dbda928f 100644 --- a/kittycad/models/web_socket_request.py +++ b/kittycad/models/web_socket_request.py @@ -11,319 +11,319 @@ from ..types import UNSET, Unset OA = TypeVar("OA", bound="trickle_ice") - @attr.s(auto_attribs=True) class trickle_ice: - """The trickle ICE candidate request.""" # noqa: E501 + """ The trickle ICE candidate request. """ # noqa: E501 + candidate: Union[Unset, RtcIceCandidateInit] = UNSET + type: str = "trickle_ice" - candidate: Union[Unset, RtcIceCandidateInit] = UNSET - type: str = "trickle_ice" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.candidate, Unset): + candidate = self.candidate + type = self.type - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.candidate, Unset): - candidate = self.candidate - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if candidate is not UNSET: + field_dict['candidate'] = candidate + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if candidate is not UNSET: - field_dict["candidate"] = candidate - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[OA], src_dict: Dict[str, Any]) -> OA: + d = src_dict.copy() + _candidate = d.pop("candidate", UNSET) + candidate: Union[Unset, RtcIceCandidateInit] + if isinstance(_candidate, Unset): + candidate = UNSET + else: + candidate = _candidate # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[OA], src_dict: Dict[str, Any]) -> OA: - d = src_dict.copy() - _candidate = d.pop("candidate", UNSET) - candidate: Union[Unset, RtcIceCandidateInit] - if isinstance(_candidate, Unset): - candidate = UNSET - else: - candidate = _candidate # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - trickle_ice = cls( - candidate=candidate, - type=type, - ) + trickle_ice = cls( + candidate= candidate, + type= type, + ) - trickle_ice.additional_properties = d - return trickle_ice + trickle_ice.additional_properties = d + return trickle_ice - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties EI = TypeVar("EI", bound="sdp_offer") - @attr.s(auto_attribs=True) class sdp_offer: - """The SDP offer request.""" # noqa: E501 + """ The SDP offer request. """ # noqa: E501 + offer: Union[Unset, RtcSessionDescription] = UNSET + type: str = "sdp_offer" - offer: Union[Unset, RtcSessionDescription] = UNSET - type: str = "sdp_offer" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.offer, Unset): + offer = self.offer + type = self.type - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.offer, Unset): - offer = self.offer - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if offer is not UNSET: + field_dict['offer'] = offer + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if offer is not UNSET: - field_dict["offer"] = offer - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[EI], src_dict: Dict[str, Any]) -> EI: + d = src_dict.copy() + _offer = d.pop("offer", UNSET) + offer: Union[Unset, RtcSessionDescription] + if isinstance(_offer, Unset): + offer = UNSET + else: + offer = _offer # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[EI], src_dict: Dict[str, Any]) -> EI: - d = src_dict.copy() - _offer = d.pop("offer", UNSET) - offer: Union[Unset, RtcSessionDescription] - if isinstance(_offer, Unset): - offer = UNSET - else: - offer = _offer # type: ignore[arg-type] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - sdp_offer = cls( - offer=offer, - type=type, - ) + sdp_offer = cls( + offer= offer, + type= type, + ) - sdp_offer.additional_properties = d - return sdp_offer + sdp_offer.additional_properties = d + return sdp_offer - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties CQ = TypeVar("CQ", bound="modeling_cmd_req") - @attr.s(auto_attribs=True) class modeling_cmd_req: - """The modeling command request.""" # noqa: E501 + """ The modeling command request. """ # noqa: E501 + cmd: Union[Unset, ModelingCmd] = UNSET + cmd_id: Union[Unset, ModelingCmdId] = UNSET + type: str = "modeling_cmd_req" - cmd: Union[Unset, ModelingCmd] = UNSET - cmd_id: Union[Unset, ModelingCmdId] = UNSET - type: str = "modeling_cmd_req" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - 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 + type = self.type - 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 - type = self.type + 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 + field_dict['type'] = type - 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 - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[CQ], src_dict: Dict[str, Any]) -> CQ: + d = src_dict.copy() + _cmd = d.pop("cmd", UNSET) + cmd: Union[Unset, ModelingCmd] + if isinstance(_cmd, Unset): + cmd = UNSET + else: + cmd = _cmd # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[CQ], src_dict: Dict[str, Any]) -> CQ: - d = src_dict.copy() - _cmd = d.pop("cmd", UNSET) - cmd: Union[Unset, ModelingCmd] - 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] - _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] + type = d.pop("type", UNSET) - type = d.pop("type", UNSET) - modeling_cmd_req = cls( - cmd=cmd, - cmd_id=cmd_id, - type=type, - ) + modeling_cmd_req = cls( + cmd= cmd, + cmd_id= cmd_id, + type= type, + ) - modeling_cmd_req.additional_properties = d - return modeling_cmd_req + modeling_cmd_req.additional_properties = d + return modeling_cmd_req - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties JE = TypeVar("JE", bound="ping") - @attr.s(auto_attribs=True) class ping: - """The client-to-server Ping to ensure the WebSocket stays alive.""" # noqa: E501 + """ The client-to-server Ping to ensure the WebSocket stays alive. """ # noqa: E501 + type: str = "ping" - type: str = "ping" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + type = self.type - def to_dict(self) -> Dict[str, Any]: - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[JE], src_dict: Dict[str, Any]) -> JE: + d = src_dict.copy() + type = d.pop("type", UNSET) - @classmethod - def from_dict(cls: Type[JE], src_dict: Dict[str, Any]) -> JE: - d = src_dict.copy() - type = d.pop("type", UNSET) - ping = cls( - type=type, - ) + ping = cls( + type= type, + ) - ping.additional_properties = d - return ping + ping.additional_properties = d + return ping - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) + @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 __getitem__(self, key: str) -> Any: + return self.additional_properties[key] - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value + 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 - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - def __contains__(self, key: str) -> bool: - return key in self.additional_properties RD = TypeVar("RD", bound="metrics_response") - @attr.s(auto_attribs=True) class metrics_response: - """The response to a metrics collection request from the server.""" # noqa: E501 + """ The response to a metrics collection request from the server. """ # noqa: E501 + metrics: Union[Unset, ClientMetrics] = UNSET + type: str = "metrics_response" - metrics: Union[Unset, ClientMetrics] = UNSET - type: str = "metrics_response" + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) - additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + def to_dict(self) -> Dict[str, Any]: + if not isinstance(self.metrics, Unset): + metrics = self.metrics + type = self.type - def to_dict(self) -> Dict[str, Any]: - if not isinstance(self.metrics, Unset): - metrics = self.metrics - type = self.type + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if metrics is not UNSET: + field_dict['metrics'] = metrics + field_dict['type'] = type - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - field_dict.update({}) - if metrics is not UNSET: - field_dict["metrics"] = metrics - field_dict["type"] = type + return field_dict - return field_dict + @classmethod + def from_dict(cls: Type[RD], src_dict: Dict[str, Any]) -> RD: + d = src_dict.copy() + _metrics = d.pop("metrics", UNSET) + metrics: Union[Unset, ClientMetrics] + if isinstance(_metrics, Unset): + metrics = UNSET + else: + metrics = _metrics # type: ignore[arg-type] - @classmethod - def from_dict(cls: Type[RD], src_dict: Dict[str, Any]) -> RD: - d = src_dict.copy() - _metrics = d.pop("metrics", UNSET) - metrics: Union[Unset, ClientMetrics] - if isinstance(_metrics, Unset): - metrics = UNSET - else: - metrics = _metrics # type: ignore[arg-type] - - type = d.pop("type", UNSET) - - metrics_response = cls( - metrics=metrics, - type=type, - ) - - metrics_response.additional_properties = d - return metrics_response - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> Any: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: Any) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties + type = d.pop("type", UNSET) -WebSocketRequest = Union[ - trickle_ice, sdp_offer, modeling_cmd_req, ping, metrics_response -] + metrics_response = cls( + metrics= metrics, + type= type, + ) + + metrics_response.additional_properties = d + return metrics_response + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties + +WebSocketRequest = Union[trickle_ice, sdp_offer, modeling_cmd_req, ping, metrics_response]