@ -1220,6 +1220,8 @@ def generateUnionType(types: List[str], name: str, description: str) -> str:
|
||||
"ArgType",
|
||||
{
|
||||
"name": str,
|
||||
"var0": str,
|
||||
"var1": str,
|
||||
},
|
||||
)
|
||||
TemplateType = TypedDict(
|
||||
@ -1236,7 +1238,9 @@ def generateUnionType(types: List[str], name: str, description: str) -> str:
|
||||
"name": name,
|
||||
}
|
||||
for type in types:
|
||||
template_info["types"].append({"name": type})
|
||||
template_info["types"].append(
|
||||
{"name": type, "var0": randletter(), "var1": randletter()}
|
||||
)
|
||||
|
||||
environment = jinja2.Environment(loader=jinja2.FileSystemLoader("generate/"))
|
||||
template_file = "union-type.py.jinja2"
|
||||
|
@ -1,6 +1,10 @@
|
||||
from typing import Dict, Any, Union
|
||||
from typing import Dict, Any, Union, Type, TypeVar
|
||||
from typing_extensions import Self
|
||||
import attr
|
||||
|
||||
GY = TypeVar("GY", bound="{{name}}")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class {{name}}:
|
||||
{% if description %}
|
||||
"""{{description}}"""
|
||||
@ -9,12 +13,12 @@ class {{name}}:
|
||||
{% for type in types %}
|
||||
{{type.name}},
|
||||
{% endfor %}
|
||||
] = None
|
||||
]
|
||||
|
||||
def __init__(self,
|
||||
type: Union[
|
||||
{% for type in types %}
|
||||
type({{type.name}}),
|
||||
{{type.name}},
|
||||
{% endfor %}
|
||||
]):
|
||||
self.type = type
|
||||
@ -22,25 +26,24 @@ class {{name}}:
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
{% for type in types %}{% if loop.first %}
|
||||
if isinstance(self.type, {{type.name}}):
|
||||
n : {{type.name}} = self.type
|
||||
return n.to_dict()
|
||||
{{type.var0}} : {{type.name}} = self.type
|
||||
return {{type.var0}}.to_dict()
|
||||
{% else %}elif isinstance(self.type, {{type.name}}):
|
||||
n : {{type.name}} = self.type
|
||||
return n.to_dict()
|
||||
{{type.var0}} : {{type.name}} = self.type
|
||||
return {{type.var0}}.to_dict()
|
||||
{% endif %}{% endfor %}
|
||||
raise Exception("Unknown type")
|
||||
|
||||
def from_dict(self, d) -> Self:
|
||||
@classmethod
|
||||
def from_dict(cls: Type[GY], d: Dict[str, Any]) -> GY:
|
||||
{% for type in types %}{% if loop.first %}
|
||||
if d.get("type") == "{{type.name}}":
|
||||
n : {{type.name}} = {{type.name}}()
|
||||
n.from_dict(d)
|
||||
self.type = n
|
||||
return Self
|
||||
{{type.var1}} : {{type.name}} = {{type.name}}()
|
||||
{{type.var1}}.from_dict(d)
|
||||
return cls(type={{type.var1}})
|
||||
{% else %}elif d.get("type") == "{{type.name}}":
|
||||
n : {{type.name}} = {{type.name}}()
|
||||
n.from_dict(d)
|
||||
self.type = n
|
||||
return self
|
||||
{{type.var1}} : {{type.name}} = {{type.name}}()
|
||||
{{type.var1}}.from_dict(d)
|
||||
return cls(type={{type.var1}})
|
||||
{% endif %}{% endfor %}
|
||||
raise Exception("Unknown type")
|
||||
|
@ -1,226 +1,10 @@
|
||||
[
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/info/x-python",
|
||||
"path": "/paths/~1user~1session~1{token}/get/x-python",
|
||||
"value": {
|
||||
"client": "# Create a client with your token.\nfrom kittycad.client import Client\n\nclient = Client(token=\"$TOKEN\")\n\n# - OR -\n\n# Create a new client with your token parsed from the environment variable:\n# `KITTYCAD_API_TOKEN`.\nfrom kittycad.client import ClientFromEnv\n\nclient = ClientFromEnv()\n\n# NOTE: The python library additionally implements asyncio, however all the code samples we\n# show below use the sync functions for ease of use and understanding.\n# Check out the library docs at:\n# https://python.api.docs.kittycad.io/_autosummary/kittycad.api.html#module-kittycad.api\n# for more details.",
|
||||
"install": "pip install kittycad"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~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/~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/~1internal~1discord~1api-token~1{discord_id}/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.meta import internal_get_api_token_for_discord_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiToken, Error\nfrom kittycad.types import Response\n\n\ndef example_internal_get_api_token_for_discord_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiToken, Error]\n ] = internal_get_api_token_for_discord_user.sync(\n client=client,\n discord_id=\"<string>\",\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.meta.internal_get_api_token_for_discord_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/~1api-calls~1{id}/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_api_call\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPrice, Error\nfrom kittycad.types import Response\n\n\ndef example_get_api_call():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiCallWithPrice, Error]] = get_api_call.sync(\n client=client,\n id=\"<string>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPrice = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1ws~1executor~1term/get/x-python",
|
||||
"value": {
|
||||
"example": "from kittycad.api.executor import create_executor_term\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_create_executor_term():\n # Create our client.\n client = ClientFromEnv()\n\n # Connect to the websocket.\n websocket = create_executor_term.sync(\n client=client,\n )\n\n # Send a message.\n websocket.send(\"{}\")\n\n # Get the messages.\n for message in websocket:\n print(message)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.executor.create_executor_term.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1user~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/~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.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/~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/~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/~1users~1{id}~1api-calls/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import list_api_calls_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPriceResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_api_calls_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiCallWithPriceResultsPage, Error]\n ] = list_api_calls_for_user.sync(\n client=client,\n id=\"<string>\",\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPriceResultsPage = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_api_calls_for_user.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1apps~1github~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/~1ai~1text-to-cad~1{output_format}/post/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import create_text_to_cad\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, TextToCad\nfrom kittycad.models.file_export_format import FileExportFormat\nfrom kittycad.models.text_to_cad_create_body import TextToCadCreateBody\nfrom kittycad.types import Response\n\n\ndef example_create_text_to_cad():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[TextToCad, Error]] = create_text_to_cad.sync(\n client=client,\n output_format=FileExportFormat.FBX,\n body=TextToCadCreateBody(\n prompt=\"<string>\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: TextToCad = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.create_text_to_cad.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~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/~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~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~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/put/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import update_user_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, User\nfrom kittycad.models.update_user import UpdateUser\nfrom kittycad.types import Response\n\n\ndef example_update_user_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[User, Error]] = update_user_self.sync(\n client=client,\n body=UpdateUser(\n company=\"<string>\",\n discord=\"<string>\",\n first_name=\"<string>\",\n github=\"<string>\",\n last_name=\"<string>\",\n phone=\"<string>\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: User = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.update_user_self.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1user/delete/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import delete_user_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_user_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_user_self.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.delete_user_self.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1user/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, User\nfrom kittycad.types import Response\n\n\ndef example_get_user_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[User, Error]] = get_user_self.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: User = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_self.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"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/~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/~1ai-prompts/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import list_ai_prompts\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AiPromptResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_ai_prompts():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[AiPromptResultsPage, Error]] = list_ai_prompts.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: AiPromptResultsPage = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.list_ai_prompts.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/~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/~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"
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_session_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Session\nfrom kittycad.types import Response\n\n\ndef example_get_session_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Session, Error]] = get_session_for_user.sync(\n client=client,\n token=\"<uuid>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Session = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_session_for_user.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -231,6 +15,30 @@
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_center_of_mass.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/~1unit~1conversion~1frequency~1{input_unit}~1{output_unit}/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_frequency_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitFrequencyConversion\nfrom kittycad.models.unit_frequency import UnitFrequency\nfrom kittycad.types import Response\n\n\ndef example_get_frequency_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitFrequencyConversion, Error]\n ] = get_frequency_unit_conversion.sync(\n client=client,\n input_unit=UnitFrequency.GIGAHERTZ,\n output_unit=UnitFrequency.GIGAHERTZ,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitFrequencyConversion = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_frequency_unit_conversion.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1unit~1conversion~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/~1/get/x-python",
|
||||
@ -241,18 +49,74 @@
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1openai~1openapi.json/get/x-python",
|
||||
"path": "/paths/~1unit~1conversion~1temperature~1{input_unit}~1{output_unit}/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"
|
||||
"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/~1users-extended/get/x-python",
|
||||
"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.users import list_users_extended\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ExtendedUserResultsPage\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_users_extended():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ExtendedUserResultsPage, Error]\n ] = list_users_extended.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ExtendedUserResultsPage = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.list_users_extended.html"
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_volume_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitVolumeConversion\nfrom kittycad.models.unit_volume import UnitVolume\nfrom kittycad.types import Response\n\n\ndef example_get_volume_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitVolumeConversion, Error]\n ] = get_volume_unit_conversion.sync(\n client=client,\n input_unit=UnitVolume.CM3,\n output_unit=UnitVolume.CM3,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitVolumeConversion = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_volume_unit_conversion.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1user~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/~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/~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-extended~1{id}/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user_extended\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ExtendedUser\nfrom kittycad.types import Response\n\n\ndef example_get_user_extended():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ExtendedUser, Error]] = get_user_extended.sync(\n client=client,\n id=\"<string>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ExtendedUser = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_extended.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1ai-prompts~1{id}/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import get_ai_prompt\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AiPrompt, Error\nfrom kittycad.types import Response\n\n\ndef example_get_ai_prompt():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[AiPrompt, Error]] = get_ai_prompt.sync(\n client=client,\n id=\"<uuid>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AiPrompt = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.get_ai_prompt.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/~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"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -265,10 +129,226 @@
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1unit~1conversion~1mass~1{input_unit}~1{output_unit}/get/x-python",
|
||||
"path": "/paths/~1file~1density/post/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"
|
||||
"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/post/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.hidden import auth_email\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, VerificationToken\nfrom kittycad.models.email_authentication_form import EmailAuthenticationForm\nfrom kittycad.types import Response\n\n\ndef example_auth_email():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[VerificationToken, Error]] = auth_email.sync(\n client=client,\n body=EmailAuthenticationForm(\n email=\"<string>\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: VerificationToken = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.hidden.auth_email.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1async~1operations~1{id}/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_async_operation\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import (\n Error,\n FileCenterOfMass,\n FileConversion,\n FileDensity,\n FileMass,\n FileSurfaceArea,\n FileVolume,\n TextToCad,\n)\nfrom kittycad.types import Response\n\n\ndef example_get_async_operation():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[\n FileConversion,\n FileCenterOfMass,\n FileMass,\n FileVolume,\n FileDensity,\n FileSurfaceArea,\n TextToCad,\n Error,\n ]\n ] = get_async_operation.sync(\n client=client,\n id=\"<string>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Union[\n FileConversion,\n FileCenterOfMass,\n FileMass,\n FileVolume,\n FileDensity,\n FileSurfaceArea,\n TextToCad,\n ] = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_async_operation.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1users~1{id}~1api-calls/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import list_api_calls_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPriceResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_api_calls_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiCallWithPriceResultsPage, Error]\n ] = list_api_calls_for_user.sync(\n client=client,\n id=\"<string>\",\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPriceResultsPage = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_api_calls_for_user.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1user~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~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/~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/~1ping/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.meta import ping\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Pong\nfrom kittycad.types import Response\n\n\ndef example_ping():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Pong, Error]] = ping.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Pong = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.ping.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~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~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/~1file~1surface-area/post/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_surface_area\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileSurfaceArea\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_area import UnitArea\nfrom kittycad.types import Response\n\n\ndef example_create_file_surface_area():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[FileSurfaceArea, Error]\n ] = create_file_surface_area.sync(\n client=client,\n output_unit=UnitArea.CM2,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileSurfaceArea = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_surface_area.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1ai-prompts/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import list_ai_prompts\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AiPromptResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_ai_prompts():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[AiPromptResultsPage, Error]] = list_ai_prompts.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: AiPromptResultsPage = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.list_ai_prompts.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~1text-to-cad/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import list_text_to_cad_models_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, TextToCadResultsPage\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_text_to_cad_models_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[TextToCadResultsPage, Error]\n ] = list_text_to_cad_models_for_user.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: TextToCadResultsPage = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.list_text_to_cad_models_for_user.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~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-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-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/~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=\"<uuid>\",\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=\"<uuid>\",\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/~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~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/~1users~1{id}/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, User\nfrom kittycad.types import Response\n\n\ndef example_get_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[User, Error]] = get_user.sync(\n client=client,\n id=\"<string>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: User = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~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/~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/~1internal~1discord~1api-token~1{discord_id}/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.meta import internal_get_api_token_for_discord_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiToken, Error\nfrom kittycad.types import Response\n\n\ndef example_internal_get_api_token_for_discord_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiToken, Error]\n ] = internal_get_api_token_for_discord_user.sync(\n client=client,\n discord_id=\"<string>\",\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.meta.internal_get_api_token_for_discord_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/~1user~1payment/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import get_payment_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Customer, Error\nfrom kittycad.types import Response\n\n\ndef example_get_payment_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[Customer, Error]\n ] = get_payment_information_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Customer = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.get_payment_information_for_user.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -297,18 +377,10 @@
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1user~1payment/get/x-python",
|
||||
"path": "/paths/~1user~1payment~1methods~1{id}/delete/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import get_payment_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Customer, Error\nfrom kittycad.types import Response\n\n\ndef example_get_payment_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[Customer, Error]\n ] = get_payment_information_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Customer = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.get_payment_information_for_user.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1auth~1email/post/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.hidden import auth_email\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, VerificationToken\nfrom kittycad.models.email_authentication_form import EmailAuthenticationForm\nfrom kittycad.types import Response\n\n\ndef example_auth_email():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[VerificationToken, Error]] = auth_email.sync(\n client=client,\n body=EmailAuthenticationForm(\n email=\"<string>\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: VerificationToken = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.hidden.auth_email.html"
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import delete_payment_method_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_payment_method_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_payment_method_for_user.sync(\n client=client,\n id=\"<string>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.delete_payment_method_for_user.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -319,46 +391,6 @@
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_async_operations.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/~1unit~1conversion~1pressure~1{input_unit}~1{output_unit}/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_pressure_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitPressureConversion\nfrom kittycad.models.unit_pressure import UnitPressure\nfrom kittycad.types import Response\n\n\ndef example_get_pressure_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitPressureConversion, Error]\n ] = get_pressure_unit_conversion.sync(\n client=client,\n input_unit=UnitPressure.ATMOSPHERES,\n output_unit=UnitPressure.ATMOSPHERES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitPressureConversion = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_pressure_unit_conversion.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~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=\"<uuid>\",\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=\"<uuid>\",\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/~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/~1file~1volume/post/x-python",
|
||||
@ -367,70 +399,6 @@
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_volume.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1ai-prompts~1{id}/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import get_ai_prompt\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AiPrompt, Error\nfrom kittycad.types import Response\n\n\ndef example_get_ai_prompt():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[AiPrompt, Error]] = get_ai_prompt.sync(\n client=client,\n id=\"<uuid>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AiPrompt = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.get_ai_prompt.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1users~1{id}/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, User\nfrom kittycad.types import Response\n\n\ndef example_get_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[User, Error]] = get_user.sync(\n client=client,\n id=\"<string>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: User = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1ws~1modeling~1commands/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.modeling import modeling_commands_ws\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, WebSocketResponse\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/~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/~1user~1session~1{token}/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_session_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Session\nfrom kittycad.types import Response\n\n\ndef example_get_session_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Session, Error]] = get_session_for_user.sync(\n client=client,\n token=\"<uuid>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Session = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_session_for_user.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~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~1payment~1methods~1{id}/delete/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import delete_payment_method_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_payment_method_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_payment_method_for_user.sync(\n client=client,\n id=\"<string>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.delete_payment_method_for_user.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~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/~1unit~1conversion~1current~1{input_unit}~1{output_unit}/get/x-python",
|
||||
@ -441,58 +409,66 @@
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1unit~1conversion~1torque~1{input_unit}~1{output_unit}/get/x-python",
|
||||
"path": "/paths/~1users-extended/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_torque_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitTorqueConversion\nfrom kittycad.models.unit_torque import UnitTorque\nfrom kittycad.types import Response\n\n\ndef example_get_torque_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitTorqueConversion, Error]\n ] = get_torque_unit_conversion.sync(\n client=client,\n input_unit=UnitTorque.NEWTON_METRES,\n output_unit=UnitTorque.NEWTON_METRES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitTorqueConversion = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_torque_unit_conversion.html"
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import list_users_extended\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ExtendedUserResultsPage\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_users_extended():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ExtendedUserResultsPage, Error]\n ] = list_users_extended.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ExtendedUserResultsPage = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.list_users_extended.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1_meta~1info/get/x-python",
|
||||
"path": "/paths/~1ai~1text-to-cad~1{output_format}/post/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.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"
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import create_text_to_cad\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, TextToCad\nfrom kittycad.models.file_export_format import FileExportFormat\nfrom kittycad.models.text_to_cad_create_body import TextToCadCreateBody\nfrom kittycad.types import Response\n\n\ndef example_create_text_to_cad():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[TextToCad, Error]] = create_text_to_cad.sync(\n client=client,\n output_format=FileExportFormat.FBX,\n body=TextToCadCreateBody(\n prompt=\"<string>\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: TextToCad = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.create_text_to_cad.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1user~1api-calls~1{id}/get/x-python",
|
||||
"path": "/paths/~1user~1payment~1balance/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_api_call_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPrice, Error\nfrom kittycad.types import Response\n\n\ndef example_get_api_call_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiCallWithPrice, Error]] = get_api_call_for_user.sync(\n client=client,\n id=\"<string>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPrice = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call_for_user.html"
|
||||
"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/~1users-extended~1{id}/get/x-python",
|
||||
"path": "/paths/~1user/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user_extended\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ExtendedUser\nfrom kittycad.types import Response\n\n\ndef example_get_user_extended():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ExtendedUser, Error]] = get_user_extended.sync(\n client=client,\n id=\"<string>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ExtendedUser = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_extended.html"
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.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/~1async~1operations~1{id}/get/x-python",
|
||||
"path": "/paths/~1user/put/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_async_operation\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import (\n Error,\n FileCenterOfMass,\n FileConversion,\n FileDensity,\n FileMass,\n FileSurfaceArea,\n FileVolume,\n TextToCad,\n)\nfrom kittycad.types import Response\n\n\ndef example_get_async_operation():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[\n FileConversion,\n FileCenterOfMass,\n FileMass,\n FileVolume,\n FileDensity,\n FileSurfaceArea,\n TextToCad,\n Error,\n ]\n ] = get_async_operation.sync(\n client=client,\n id=\"<string>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Union[\n FileConversion,\n FileCenterOfMass,\n FileMass,\n FileVolume,\n FileDensity,\n FileSurfaceArea,\n TextToCad,\n ] = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_async_operation.html"
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import update_user_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, User\nfrom kittycad.models.update_user import UpdateUser\nfrom kittycad.types import Response\n\n\ndef example_update_user_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[User, Error]] = update_user_self.sync(\n client=client,\n body=UpdateUser(\n company=\"<string>\",\n discord=\"<string>\",\n first_name=\"<string>\",\n github=\"<string>\",\n last_name=\"<string>\",\n phone=\"<string>\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: User = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.update_user_self.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1unit~1conversion~1frequency~1{input_unit}~1{output_unit}/get/x-python",
|
||||
"path": "/paths/~1user/delete/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"
|
||||
"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/~1unit~1conversion~1angle~1{input_unit}~1{output_unit}/get/x-python",
|
||||
"path": "/paths/~1api-calls/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"
|
||||
"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/~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"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -505,10 +481,26 @@
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1api-call-metrics/get/x-python",
|
||||
"path": "/paths/~1unit~1conversion~1pressure~1{input_unit}~1{output_unit}/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.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"
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_pressure_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitPressureConversion\nfrom kittycad.models.unit_pressure import UnitPressure\nfrom kittycad.types import Response\n\n\ndef example_get_pressure_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitPressureConversion, Error]\n ] = get_pressure_unit_conversion.sync(\n client=client,\n input_unit=UnitPressure.ATMOSPHERES,\n output_unit=UnitPressure.ATMOSPHERES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitPressureConversion = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_pressure_unit_conversion.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~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~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"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -529,66 +521,74 @@
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1ping/get/x-python",
|
||||
"path": "/paths/~1api-calls~1{id}/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.meta import ping\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Pong\nfrom kittycad.types import Response\n\n\ndef example_ping():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Pong, Error]] = ping.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Pong = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.ping.html"
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_api_call\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPrice, Error\nfrom kittycad.types import Response\n\n\ndef example_get_api_call():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiCallWithPrice, Error]] = get_api_call.sync(\n client=client,\n id=\"<string>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPrice = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1user~1payment~1tax/get/x-python",
|
||||
"path": "/paths/~1ws~1executor~1term/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"
|
||||
"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/~1unit~1conversion~1length~1{input_unit}~1{output_unit}/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.unit import get_length_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitLengthConversion\nfrom kittycad.models.unit_length import UnitLength\nfrom kittycad.types import Response\n\n\ndef example_get_length_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitLengthConversion, Error]\n ] = get_length_unit_conversion.sync(\n client=client,\n input_unit=UnitLength.CM,\n output_unit=UnitLength.CM,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitLengthConversion = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_length_unit_conversion.html"
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_api_call_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPrice, Error\nfrom kittycad.types import Response\n\n\ndef example_get_api_call_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiCallWithPrice, Error]] = get_api_call_for_user.sync(\n client=client,\n id=\"<string>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPrice = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call_for_user.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1user~1api-tokens/get/x-python",
|
||||
"path": "/paths/~1unit~1conversion~1torque~1{input_unit}~1{output_unit}/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.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"
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_torque_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitTorqueConversion\nfrom kittycad.models.unit_torque import UnitTorque\nfrom kittycad.types import Response\n\n\ndef example_get_torque_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitTorqueConversion, Error]\n ] = get_torque_unit_conversion.sync(\n client=client,\n input_unit=UnitTorque.NEWTON_METRES,\n output_unit=UnitTorque.NEWTON_METRES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitTorqueConversion = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_torque_unit_conversion.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1user~1api-tokens/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.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"
|
||||
"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/~1user~1text-to-cad/get/x-python",
|
||||
"path": "/paths/~1ws~1modeling~1commands/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import list_text_to_cad_models_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, TextToCadResultsPage\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_text_to_cad_models_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[TextToCadResultsPage, Error]\n ] = list_text_to_cad_models_for_user.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: TextToCadResultsPage = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.list_text_to_cad_models_for_user.html"
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.modeling import modeling_commands_ws\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, WebSocketResponse\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/~1logout/post/x-python",
|
||||
"path": "/paths/~1apps~1github~1consent/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.hidden import logout\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_logout():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = logout.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.hidden.logout.html"
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.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~1volume~1{input_unit}~1{output_unit}/get/x-python",
|
||||
"path": "/paths/~1user~1extended/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"
|
||||
"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": "/info/x-python",
|
||||
"value": {
|
||||
"client": "# Create a client with your token.\nfrom kittycad.client import Client\n\nclient = Client(token=\"$TOKEN\")\n\n# - OR -\n\n# Create a new client with your token parsed from the environment variable:\n# `KITTYCAD_API_TOKEN`.\nfrom kittycad.client import ClientFromEnv\n\nclient = ClientFromEnv()\n\n# NOTE: The python library additionally implements asyncio, however all the code samples we\n# show below use the sync functions for ease of use and understanding.\n# Check out the library docs at:\n# https://python.api.docs.kittycad.io/_autosummary/kittycad.api.html#module-kittycad.api\n# for more details.",
|
||||
"install": "pip install kittycad"
|
||||
}
|
||||
}
|
||||
]
|
@ -3,7 +3,6 @@ from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
from dateutil.parser import isoparse
|
||||
from typing_extensions import Self
|
||||
|
||||
from ..models.ai_feedback import AiFeedback
|
||||
from ..models.api_call_status import ApiCallStatus
|
||||
@ -1412,6 +1411,10 @@ class text_to_cad:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
GY = TypeVar("GY", bound="AsyncApiCallOutput")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class AsyncApiCallOutput:
|
||||
|
||||
"""The output from the async API call."""
|
||||
@ -1424,82 +1427,76 @@ class AsyncApiCallOutput:
|
||||
file_density,
|
||||
file_surface_area,
|
||||
text_to_cad,
|
||||
] = None
|
||||
]
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
type: Union[
|
||||
type(file_conversion),
|
||||
type(file_center_of_mass),
|
||||
type(file_mass),
|
||||
type(file_volume),
|
||||
type(file_density),
|
||||
type(file_surface_area),
|
||||
type(text_to_cad),
|
||||
file_conversion,
|
||||
file_center_of_mass,
|
||||
file_mass,
|
||||
file_volume,
|
||||
file_density,
|
||||
file_surface_area,
|
||||
text_to_cad,
|
||||
],
|
||||
):
|
||||
self.type = type
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
if isinstance(self.type, file_conversion):
|
||||
n: file_conversion = self.type
|
||||
return n.to_dict()
|
||||
JR: file_conversion = self.type
|
||||
return JR.to_dict()
|
||||
elif isinstance(self.type, file_center_of_mass):
|
||||
n: file_center_of_mass = self.type
|
||||
return n.to_dict()
|
||||
HK: file_center_of_mass = self.type
|
||||
return HK.to_dict()
|
||||
elif isinstance(self.type, file_mass):
|
||||
n: file_mass = self.type
|
||||
return n.to_dict()
|
||||
ON: file_mass = self.type
|
||||
return ON.to_dict()
|
||||
elif isinstance(self.type, file_volume):
|
||||
n: file_volume = self.type
|
||||
return n.to_dict()
|
||||
US: file_volume = self.type
|
||||
return US.to_dict()
|
||||
elif isinstance(self.type, file_density):
|
||||
n: file_density = self.type
|
||||
return n.to_dict()
|
||||
FH: file_density = self.type
|
||||
return FH.to_dict()
|
||||
elif isinstance(self.type, file_surface_area):
|
||||
n: file_surface_area = self.type
|
||||
return n.to_dict()
|
||||
BB: file_surface_area = self.type
|
||||
return BB.to_dict()
|
||||
elif isinstance(self.type, text_to_cad):
|
||||
n: text_to_cad = self.type
|
||||
return n.to_dict()
|
||||
TV: text_to_cad = self.type
|
||||
return TV.to_dict()
|
||||
|
||||
raise Exception("Unknown type")
|
||||
|
||||
def from_dict(self, d) -> Self:
|
||||
@classmethod
|
||||
def from_dict(cls: Type[GY], d: Dict[str, Any]) -> GY:
|
||||
if d.get("type") == "file_conversion":
|
||||
n: file_conversion = file_conversion()
|
||||
n.from_dict(d)
|
||||
self.type = n
|
||||
return Self
|
||||
LY: file_conversion = file_conversion()
|
||||
LY.from_dict(d)
|
||||
return cls(type=LY)
|
||||
elif d.get("type") == "file_center_of_mass":
|
||||
n: file_center_of_mass = file_center_of_mass()
|
||||
n.from_dict(d)
|
||||
self.type = n
|
||||
return self
|
||||
VR: file_center_of_mass = file_center_of_mass()
|
||||
VR.from_dict(d)
|
||||
return cls(type=VR)
|
||||
elif d.get("type") == "file_mass":
|
||||
n: file_mass = file_mass()
|
||||
n.from_dict(d)
|
||||
self.type = n
|
||||
return self
|
||||
PC: file_mass = file_mass()
|
||||
PC.from_dict(d)
|
||||
return cls(type=PC)
|
||||
elif d.get("type") == "file_volume":
|
||||
n: file_volume = file_volume()
|
||||
n.from_dict(d)
|
||||
self.type = n
|
||||
return self
|
||||
KQ: file_volume = file_volume()
|
||||
KQ.from_dict(d)
|
||||
return cls(type=KQ)
|
||||
elif d.get("type") == "file_density":
|
||||
n: file_density = file_density()
|
||||
n.from_dict(d)
|
||||
self.type = n
|
||||
return self
|
||||
NH: file_density = file_density()
|
||||
NH.from_dict(d)
|
||||
return cls(type=NH)
|
||||
elif d.get("type") == "file_surface_area":
|
||||
n: file_surface_area = file_surface_area()
|
||||
n.from_dict(d)
|
||||
self.type = n
|
||||
return self
|
||||
PJ: file_surface_area = file_surface_area()
|
||||
PJ.from_dict(d)
|
||||
return cls(type=PJ)
|
||||
elif d.get("type") == "text_to_cad":
|
||||
n: text_to_cad = text_to_cad()
|
||||
n.from_dict(d)
|
||||
self.type = n
|
||||
return self
|
||||
CR: text_to_cad = text_to_cad()
|
||||
CR.from_dict(d)
|
||||
return cls(type=CR)
|
||||
|
||||
raise Exception("Unknown type")
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
JR = TypeVar("JR", bound="AsyncApiCallResultsPage")
|
||||
CE = TypeVar("CE", bound="AsyncApiCallResultsPage")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -37,7 +37,7 @@ class AsyncApiCallResultsPage:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[JR], src_dict: Dict[str, Any]) -> JR:
|
||||
def from_dict(cls: Type[CE], src_dict: Dict[str, Any]) -> CE:
|
||||
d = src_dict.copy()
|
||||
from ..models.async_api_call import AsyncApiCall
|
||||
|
||||
|
@ -6,7 +6,7 @@ from ..models.axis import Axis
|
||||
from ..models.direction import Direction
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
LY = TypeVar("LY", bound="AxisDirectionPair")
|
||||
MS = TypeVar("MS", bound="AxisDirectionPair")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -35,7 +35,7 @@ class AxisDirectionPair:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[LY], src_dict: Dict[str, Any]) -> LY:
|
||||
def from_dict(cls: Type[MS], src_dict: Dict[str, Any]) -> MS:
|
||||
d = src_dict.copy()
|
||||
_axis = d.pop("axis", UNSET)
|
||||
axis: Union[Unset, Axis]
|
||||
|
@ -5,7 +5,7 @@ import attr
|
||||
from ..models.new_address import NewAddress
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
HK = TypeVar("HK", bound="BillingInfo")
|
||||
LT = TypeVar("LT", bound="BillingInfo")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -37,7 +37,7 @@ class BillingInfo:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[HK], src_dict: Dict[str, Any]) -> HK:
|
||||
def from_dict(cls: Type[LT], src_dict: Dict[str, Any]) -> LT:
|
||||
d = src_dict.copy()
|
||||
_address = d.pop("address", UNSET)
|
||||
address: Union[Unset, NewAddress]
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
VR = TypeVar("VR", bound="CacheMetadata")
|
||||
ED = TypeVar("ED", bound="CacheMetadata")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -29,7 +29,7 @@ class CacheMetadata:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[VR], src_dict: Dict[str, Any]) -> VR:
|
||||
def from_dict(cls: Type[ED], src_dict: Dict[str, Any]) -> ED:
|
||||
d = src_dict.copy()
|
||||
ok = d.pop("ok", UNSET)
|
||||
|
||||
|
@ -5,7 +5,7 @@ import attr
|
||||
from ..models.payment_method_card_checks import PaymentMethodCardChecks
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
ON = TypeVar("ON", bound="CardDetails")
|
||||
YY = TypeVar("YY", bound="CardDetails")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -57,7 +57,7 @@ class CardDetails:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[ON], src_dict: Dict[str, Any]) -> ON:
|
||||
def from_dict(cls: Type[YY], src_dict: Dict[str, Any]) -> YY:
|
||||
d = src_dict.copy()
|
||||
brand = d.pop("brand", UNSET)
|
||||
|
||||
|
@ -6,7 +6,7 @@ from ..models.point3d import Point3d
|
||||
from ..models.unit_length import UnitLength
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
PC = TypeVar("PC", bound="CenterOfMass")
|
||||
DO = TypeVar("DO", bound="CenterOfMass")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -35,7 +35,7 @@ class CenterOfMass:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[PC], src_dict: Dict[str, Any]) -> PC:
|
||||
def from_dict(cls: Type[DO], src_dict: Dict[str, Any]) -> DO:
|
||||
d = src_dict.copy()
|
||||
_center_of_mass = d.pop("center_of_mass", UNSET)
|
||||
center_of_mass: Union[Unset, Point3d]
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
US = TypeVar("US", bound="ClientMetrics")
|
||||
FZ = TypeVar("FZ", bound="ClientMetrics")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -57,7 +57,7 @@ class ClientMetrics:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[US], src_dict: Dict[str, Any]) -> US:
|
||||
def from_dict(cls: Type[FZ], src_dict: Dict[str, Any]) -> FZ:
|
||||
d = src_dict.copy()
|
||||
rtc_frames_decoded = d.pop("rtc_frames_decoded", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
KQ = TypeVar("KQ", bound="Cluster")
|
||||
GL = TypeVar("GL", bound="Cluster")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -49,7 +49,7 @@ class Cluster:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[KQ], src_dict: Dict[str, Any]) -> KQ:
|
||||
def from_dict(cls: Type[GL], src_dict: Dict[str, Any]) -> GL:
|
||||
d = src_dict.copy()
|
||||
addr = d.pop("addr", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
FH = TypeVar("FH", bound="CodeOutput")
|
||||
NN = TypeVar("NN", bound="CodeOutput")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -41,7 +41,7 @@ class CodeOutput:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[FH], src_dict: Dict[str, Any]) -> FH:
|
||||
def from_dict(cls: Type[NN], src_dict: Dict[str, Any]) -> NN:
|
||||
d = src_dict.copy()
|
||||
from ..models.output_file import OutputFile
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
NH = TypeVar("NH", bound="Color")
|
||||
OH = TypeVar("OH", bound="Color")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -39,7 +39,7 @@ class Color:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[NH], src_dict: Dict[str, Any]) -> NH:
|
||||
def from_dict(cls: Type[OH], src_dict: Dict[str, Any]) -> OH:
|
||||
d = src_dict.copy()
|
||||
a = d.pop("a", UNSET)
|
||||
|
||||
|
@ -10,7 +10,7 @@ from ..models.jetstream import Jetstream
|
||||
from ..models.leaf_node import LeafNode
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
BB = TypeVar("BB", bound="Connection")
|
||||
VI = TypeVar("VI", bound="Connection")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -226,7 +226,7 @@ class Connection:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[BB], src_dict: Dict[str, Any]) -> BB:
|
||||
def from_dict(cls: Type[VI], src_dict: Dict[str, Any]) -> VI:
|
||||
d = src_dict.copy()
|
||||
auth_timeout = d.pop("auth_timeout", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
PJ = TypeVar("PJ", bound="Coupon")
|
||||
ET = TypeVar("ET", bound="Coupon")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -39,7 +39,7 @@ class Coupon:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[PJ], src_dict: Dict[str, Any]) -> PJ:
|
||||
def from_dict(cls: Type[ET], src_dict: Dict[str, Any]) -> ET:
|
||||
d = src_dict.copy()
|
||||
amount_off = d.pop("amount_off", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
TV = TypeVar("TV", bound="CurveGetControlPoints")
|
||||
QF = TypeVar("QF", bound="CurveGetControlPoints")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -33,7 +33,7 @@ class CurveGetControlPoints:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[TV], src_dict: Dict[str, Any]) -> TV:
|
||||
def from_dict(cls: Type[QF], src_dict: Dict[str, Any]) -> QF:
|
||||
d = src_dict.copy()
|
||||
from ..models.point3d import Point3d
|
||||
|
||||
|
@ -5,7 +5,7 @@ import attr
|
||||
from ..models.point3d import Point3d
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
CR = TypeVar("CR", bound="CurveGetEndPoints")
|
||||
DI = TypeVar("DI", bound="CurveGetEndPoints")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -34,7 +34,7 @@ class CurveGetEndPoints:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[CR], src_dict: Dict[str, Any]) -> CR:
|
||||
def from_dict(cls: Type[DI], src_dict: Dict[str, Any]) -> DI:
|
||||
d = src_dict.copy()
|
||||
_end = d.pop("end", UNSET)
|
||||
end: Union[Unset, Point3d]
|
||||
|
@ -5,7 +5,7 @@ import attr
|
||||
from ..models.curve_type import CurveType
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
CE = TypeVar("CE", bound="CurveGetType")
|
||||
OJ = TypeVar("OJ", bound="CurveGetType")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -29,7 +29,7 @@ class CurveGetType:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[CE], src_dict: Dict[str, Any]) -> CE:
|
||||
def from_dict(cls: Type[OJ], src_dict: Dict[str, Any]) -> OJ:
|
||||
d = src_dict.copy()
|
||||
_curve_type = d.pop("curve_type", UNSET)
|
||||
curve_type: Union[Unset, CurveType]
|
||||
|
@ -8,7 +8,7 @@ from ..models.currency import Currency
|
||||
from ..models.new_address import NewAddress
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
MS = TypeVar("MS", bound="Customer")
|
||||
UF = TypeVar("UF", bound="Customer")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -72,7 +72,7 @@ class Customer:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[MS], src_dict: Dict[str, Any]) -> MS:
|
||||
def from_dict(cls: Type[UF], src_dict: Dict[str, Any]) -> UF:
|
||||
d = src_dict.copy()
|
||||
_address = d.pop("address", UNSET)
|
||||
address: Union[Unset, NewAddress]
|
||||
|
@ -7,7 +7,7 @@ from dateutil.parser import isoparse
|
||||
from ..models.uuid import Uuid
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
LT = TypeVar("LT", bound="CustomerBalance")
|
||||
YF = TypeVar("YF", bound="CustomerBalance")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -64,7 +64,7 @@ class CustomerBalance:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[LT], src_dict: Dict[str, Any]) -> LT:
|
||||
def from_dict(cls: Type[YF], src_dict: Dict[str, Any]) -> YF:
|
||||
d = src_dict.copy()
|
||||
_created_at = d.pop("created_at", UNSET)
|
||||
created_at: Union[Unset, datetime.datetime]
|
||||
|
@ -5,7 +5,7 @@ import attr
|
||||
from ..models.unit_density import UnitDensity
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
ED = TypeVar("ED", bound="Density")
|
||||
PY = TypeVar("PY", bound="Density")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -33,7 +33,7 @@ class Density:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[ED], src_dict: Dict[str, Any]) -> ED:
|
||||
def from_dict(cls: Type[PY], src_dict: Dict[str, Any]) -> PY:
|
||||
d = src_dict.copy()
|
||||
density = d.pop("density", UNSET)
|
||||
|
||||
|
@ -5,7 +5,7 @@ import attr
|
||||
from ..models.o_auth2_grant_type import OAuth2GrantType
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
YY = TypeVar("YY", bound="DeviceAccessTokenRequestForm")
|
||||
LK = TypeVar("LK", bound="DeviceAccessTokenRequestForm")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -37,7 +37,7 @@ class DeviceAccessTokenRequestForm:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[YY], src_dict: Dict[str, Any]) -> YY:
|
||||
def from_dict(cls: Type[LK], src_dict: Dict[str, Any]) -> LK:
|
||||
d = src_dict.copy()
|
||||
client_id = d.pop("client_id", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
DO = TypeVar("DO", bound="DeviceAuthRequestForm")
|
||||
AR = TypeVar("AR", bound="DeviceAuthRequestForm")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -27,7 +27,7 @@ class DeviceAuthRequestForm:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[DO], src_dict: Dict[str, Any]) -> DO:
|
||||
def from_dict(cls: Type[AR], src_dict: Dict[str, Any]) -> AR:
|
||||
d = src_dict.copy()
|
||||
client_id = d.pop("client_id", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
FZ = TypeVar("FZ", bound="DeviceAuthVerifyParams")
|
||||
WB = TypeVar("WB", bound="DeviceAuthVerifyParams")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -27,7 +27,7 @@ class DeviceAuthVerifyParams:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[FZ], src_dict: Dict[str, Any]) -> FZ:
|
||||
def from_dict(cls: Type[WB], src_dict: Dict[str, Any]) -> WB:
|
||||
d = src_dict.copy()
|
||||
user_code = d.pop("user_code", UNSET)
|
||||
|
||||
|
@ -5,7 +5,7 @@ import attr
|
||||
from ..models.coupon import Coupon
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
GL = TypeVar("GL", bound="Discount")
|
||||
KK = TypeVar("KK", bound="Discount")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -29,7 +29,7 @@ class Discount:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[GL], src_dict: Dict[str, Any]) -> GL:
|
||||
def from_dict(cls: Type[KK], src_dict: Dict[str, Any]) -> KK:
|
||||
d = src_dict.copy()
|
||||
_coupon = d.pop("coupon", UNSET)
|
||||
coupon: Union[Unset, Coupon]
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
NN = TypeVar("NN", bound="EmailAuthenticationForm")
|
||||
HC = TypeVar("HC", bound="EmailAuthenticationForm")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -31,7 +31,7 @@ class EmailAuthenticationForm:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[NN], src_dict: Dict[str, Any]) -> NN:
|
||||
def from_dict(cls: Type[HC], src_dict: Dict[str, Any]) -> HC:
|
||||
d = src_dict.copy()
|
||||
callback_url = d.pop("callback_url", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
OH = TypeVar("OH", bound="EntityGetAllChildUuids")
|
||||
FM = TypeVar("FM", bound="EntityGetAllChildUuids")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -29,7 +29,7 @@ class EntityGetAllChildUuids:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[OH], src_dict: Dict[str, Any]) -> OH:
|
||||
def from_dict(cls: Type[FM], src_dict: Dict[str, Any]) -> FM:
|
||||
d = src_dict.copy()
|
||||
entity_ids = cast(List[str], d.pop("entity_ids", UNSET))
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
VI = TypeVar("VI", bound="EntityGetChildUuid")
|
||||
PV = TypeVar("PV", bound="EntityGetChildUuid")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -27,7 +27,7 @@ class EntityGetChildUuid:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[VI], src_dict: Dict[str, Any]) -> VI:
|
||||
def from_dict(cls: Type[PV], src_dict: Dict[str, Any]) -> PV:
|
||||
d = src_dict.copy()
|
||||
entity_id = d.pop("entity_id", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
ET = TypeVar("ET", bound="EntityGetNumChildren")
|
||||
QI = TypeVar("QI", bound="EntityGetNumChildren")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -27,7 +27,7 @@ class EntityGetNumChildren:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[ET], src_dict: Dict[str, Any]) -> ET:
|
||||
def from_dict(cls: Type[QI], src_dict: Dict[str, Any]) -> QI:
|
||||
d = src_dict.copy()
|
||||
num = d.pop("num", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
QF = TypeVar("QF", bound="EntityGetParentId")
|
||||
TP = TypeVar("TP", bound="EntityGetParentId")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -27,7 +27,7 @@ class EntityGetParentId:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[QF], src_dict: Dict[str, Any]) -> QF:
|
||||
def from_dict(cls: Type[TP], src_dict: Dict[str, Any]) -> TP:
|
||||
d = src_dict.copy()
|
||||
entity_id = d.pop("entity_id", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
DI = TypeVar("DI", bound="Error")
|
||||
CF = TypeVar("CF", bound="Error")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -35,7 +35,7 @@ class Error:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[DI], src_dict: Dict[str, Any]) -> DI:
|
||||
def from_dict(cls: Type[CF], src_dict: Dict[str, Any]) -> CF:
|
||||
d = src_dict.copy()
|
||||
error_code = d.pop("error_code", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
OJ = TypeVar("OJ", bound="Export")
|
||||
OM = TypeVar("OM", bound="Export")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -33,7 +33,7 @@ class Export:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[OJ], src_dict: Dict[str, Any]) -> OJ:
|
||||
def from_dict(cls: Type[OM], src_dict: Dict[str, Any]) -> OM:
|
||||
d = src_dict.copy()
|
||||
from ..models.export_file import ExportFile
|
||||
|
||||
|
@ -5,7 +5,7 @@ import attr
|
||||
from ..models.base64data import Base64Data
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
UF = TypeVar("UF", bound="ExportFile")
|
||||
EN = TypeVar("EN", bound="ExportFile")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -34,7 +34,7 @@ class ExportFile:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[UF], src_dict: Dict[str, Any]) -> UF:
|
||||
def from_dict(cls: Type[EN], src_dict: Dict[str, Any]) -> EN:
|
||||
d = src_dict.copy()
|
||||
_contents = d.pop("contents", UNSET)
|
||||
contents: Union[Unset, Base64Data]
|
||||
|
@ -7,7 +7,7 @@ from dateutil.parser import isoparse
|
||||
from ..models.uuid import Uuid
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
YF = TypeVar("YF", bound="ExtendedUser")
|
||||
RS = TypeVar("RS", bound="ExtendedUser")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -99,7 +99,7 @@ class ExtendedUser:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[YF], src_dict: Dict[str, Any]) -> YF:
|
||||
def from_dict(cls: Type[RS], src_dict: Dict[str, Any]) -> RS:
|
||||
d = src_dict.copy()
|
||||
company = d.pop("company", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
PY = TypeVar("PY", bound="ExtendedUserResultsPage")
|
||||
LR = TypeVar("LR", bound="ExtendedUserResultsPage")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -37,7 +37,7 @@ class ExtendedUserResultsPage:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[PY], src_dict: Dict[str, Any]) -> PY:
|
||||
def from_dict(cls: Type[LR], src_dict: Dict[str, Any]) -> LR:
|
||||
d = src_dict.copy()
|
||||
from ..models.extended_user import ExtendedUser
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
LK = TypeVar("LK", bound="FailureWebSocketResponse")
|
||||
MP = TypeVar("MP", bound="FailureWebSocketResponse")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -41,7 +41,7 @@ class FailureWebSocketResponse:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[LK], src_dict: Dict[str, Any]) -> LK:
|
||||
def from_dict(cls: Type[MP], src_dict: Dict[str, Any]) -> MP:
|
||||
d = src_dict.copy()
|
||||
from ..models.api_error import ApiError
|
||||
|
||||
|
@ -11,7 +11,7 @@ from ..models.unit_length import UnitLength
|
||||
from ..models.uuid import Uuid
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
AR = TypeVar("AR", bound="FileCenterOfMass")
|
||||
WF = TypeVar("WF", bound="FileCenterOfMass")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -86,7 +86,7 @@ class FileCenterOfMass:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[AR], src_dict: Dict[str, Any]) -> AR:
|
||||
def from_dict(cls: Type[WF], src_dict: Dict[str, Any]) -> WF:
|
||||
d = src_dict.copy()
|
||||
_center_of_mass = d.pop("center_of_mass", UNSET)
|
||||
center_of_mass: Union[Unset, Point3d]
|
||||
|
@ -13,7 +13,7 @@ from ..models.output_format import OutputFormat
|
||||
from ..models.uuid import Uuid
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
WB = TypeVar("WB", bound="FileConversion")
|
||||
RO = TypeVar("RO", bound="FileConversion")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -102,7 +102,7 @@ class FileConversion:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[WB], src_dict: Dict[str, Any]) -> WB:
|
||||
def from_dict(cls: Type[RO], src_dict: Dict[str, Any]) -> RO:
|
||||
d = src_dict.copy()
|
||||
_completed_at = d.pop("completed_at", UNSET)
|
||||
completed_at: Union[Unset, datetime.datetime]
|
||||
|
@ -11,7 +11,7 @@ from ..models.unit_mass import UnitMass
|
||||
from ..models.uuid import Uuid
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
KK = TypeVar("KK", bound="FileDensity")
|
||||
DN = TypeVar("DN", bound="FileDensity")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -94,7 +94,7 @@ class FileDensity:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[KK], src_dict: Dict[str, Any]) -> KK:
|
||||
def from_dict(cls: Type[DN], src_dict: Dict[str, Any]) -> DN:
|
||||
d = src_dict.copy()
|
||||
_completed_at = d.pop("completed_at", UNSET)
|
||||
completed_at: Union[Unset, datetime.datetime]
|
||||
|
@ -11,7 +11,7 @@ from ..models.unit_mass import UnitMass
|
||||
from ..models.uuid import Uuid
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
HC = TypeVar("HC", bound="FileMass")
|
||||
BA = TypeVar("BA", bound="FileMass")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -94,7 +94,7 @@ class FileMass:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[HC], src_dict: Dict[str, Any]) -> HC:
|
||||
def from_dict(cls: Type[BA], src_dict: Dict[str, Any]) -> BA:
|
||||
d = src_dict.copy()
|
||||
_completed_at = d.pop("completed_at", UNSET)
|
||||
completed_at: Union[Unset, datetime.datetime]
|
||||
|
@ -10,7 +10,7 @@ from ..models.unit_area import UnitArea
|
||||
from ..models.uuid import Uuid
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
FM = TypeVar("FM", bound="FileSurfaceArea")
|
||||
OR = TypeVar("OR", bound="FileSurfaceArea")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -84,7 +84,7 @@ class FileSurfaceArea:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[FM], src_dict: Dict[str, Any]) -> FM:
|
||||
def from_dict(cls: Type[OR], src_dict: Dict[str, Any]) -> OR:
|
||||
d = src_dict.copy()
|
||||
_completed_at = d.pop("completed_at", UNSET)
|
||||
completed_at: Union[Unset, datetime.datetime]
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
PV = TypeVar("PV", bound="FileSystemMetadata")
|
||||
CB = TypeVar("CB", bound="FileSystemMetadata")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -29,7 +29,7 @@ class FileSystemMetadata:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[PV], src_dict: Dict[str, Any]) -> PV:
|
||||
def from_dict(cls: Type[CB], src_dict: Dict[str, Any]) -> CB:
|
||||
d = src_dict.copy()
|
||||
ok = d.pop("ok", UNSET)
|
||||
|
||||
|
@ -10,7 +10,7 @@ from ..models.unit_volume import UnitVolume
|
||||
from ..models.uuid import Uuid
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
QI = TypeVar("QI", bound="FileVolume")
|
||||
LC = TypeVar("LC", bound="FileVolume")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -84,7 +84,7 @@ class FileVolume:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[QI], src_dict: Dict[str, Any]) -> QI:
|
||||
def from_dict(cls: Type[LC], src_dict: Dict[str, Any]) -> LC:
|
||||
d = src_dict.copy()
|
||||
_completed_at = d.pop("completed_at", UNSET)
|
||||
completed_at: Union[Unset, datetime.datetime]
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
TP = TypeVar("TP", bound="Gateway")
|
||||
TO = TypeVar("TO", bound="Gateway")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -43,7 +43,7 @@ class Gateway:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[TP], src_dict: Dict[str, Any]) -> TP:
|
||||
def from_dict(cls: Type[TO], src_dict: Dict[str, Any]) -> TO:
|
||||
d = src_dict.copy()
|
||||
auth_timeout = d.pop("auth_timeout", UNSET)
|
||||
|
||||
|
@ -5,7 +5,7 @@ import attr
|
||||
from ..models.entity_type import EntityType
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
CF = TypeVar("CF", bound="GetEntityType")
|
||||
ZP = TypeVar("ZP", bound="GetEntityType")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -29,7 +29,7 @@ class GetEntityType:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[CF], src_dict: Dict[str, Any]) -> CF:
|
||||
def from_dict(cls: Type[ZP], src_dict: Dict[str, Any]) -> ZP:
|
||||
d = src_dict.copy()
|
||||
_entity_type = d.pop("entity_type", UNSET)
|
||||
entity_type: Union[Unset, EntityType]
|
||||
|
@ -5,7 +5,7 @@ import attr
|
||||
from ..models.point3d import Point3d
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
OM = TypeVar("OM", bound="GetSketchModePlane")
|
||||
EO = TypeVar("EO", bound="GetSketchModePlane")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -39,7 +39,7 @@ class GetSketchModePlane:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[OM], src_dict: Dict[str, Any]) -> OM:
|
||||
def from_dict(cls: Type[EO], src_dict: Dict[str, Any]) -> EO:
|
||||
d = src_dict.copy()
|
||||
_x_axis = d.pop("x_axis", UNSET)
|
||||
x_axis: Union[Unset, Point3d]
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
EN = TypeVar("EN", bound="HighlightSetEntity")
|
||||
NY = TypeVar("NY", bound="HighlightSetEntity")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -31,7 +31,7 @@ class HighlightSetEntity:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[EN], src_dict: Dict[str, Any]) -> EN:
|
||||
def from_dict(cls: Type[NY], src_dict: Dict[str, Any]) -> NY:
|
||||
d = src_dict.copy()
|
||||
entity_id = d.pop("entity_id", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
RS = TypeVar("RS", bound="IceServer")
|
||||
QO = TypeVar("QO", bound="IceServer")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -37,7 +37,7 @@ class IceServer:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[RS], src_dict: Dict[str, Any]) -> RS:
|
||||
def from_dict(cls: Type[QO], src_dict: Dict[str, Any]) -> QO:
|
||||
d = src_dict.copy()
|
||||
credential = d.pop("credential", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
LR = TypeVar("LR", bound="ImportFile")
|
||||
KX = TypeVar("KX", bound="ImportFile")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -33,7 +33,7 @@ class ImportFile:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[LR], src_dict: Dict[str, Any]) -> LR:
|
||||
def from_dict(cls: Type[KX], src_dict: Dict[str, Any]) -> KX:
|
||||
d = src_dict.copy()
|
||||
data = cast(List[int], d.pop("data", UNSET))
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
MP = TypeVar("MP", bound="ImportFiles")
|
||||
IZ = TypeVar("IZ", bound="ImportFiles")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -27,7 +27,7 @@ class ImportFiles:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[MP], src_dict: Dict[str, Any]) -> MP:
|
||||
def from_dict(cls: Type[IZ], src_dict: Dict[str, Any]) -> IZ:
|
||||
d = src_dict.copy()
|
||||
object_id = d.pop("object_id", UNSET)
|
||||
|
||||
|
@ -1,13 +1,12 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
from typing_extensions import Self
|
||||
|
||||
from ..models.system import System
|
||||
from ..models.unit_length import UnitLength
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
WF = TypeVar("WF", bound="fbx")
|
||||
WO = TypeVar("WO", bound="fbx")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -29,7 +28,7 @@ class fbx:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[WF], src_dict: Dict[str, Any]) -> WF:
|
||||
def from_dict(cls: Type[WO], src_dict: Dict[str, Any]) -> WO:
|
||||
d = src_dict.copy()
|
||||
type = d.pop("type", UNSET)
|
||||
|
||||
@ -57,7 +56,7 @@ class fbx:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
RO = TypeVar("RO", bound="gltf")
|
||||
NK = TypeVar("NK", bound="gltf")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -79,7 +78,7 @@ class gltf:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[RO], src_dict: Dict[str, Any]) -> RO:
|
||||
def from_dict(cls: Type[NK], src_dict: Dict[str, Any]) -> NK:
|
||||
d = src_dict.copy()
|
||||
type = d.pop("type", UNSET)
|
||||
|
||||
@ -107,7 +106,7 @@ class gltf:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
DN = TypeVar("DN", bound="obj")
|
||||
UQ = TypeVar("UQ", bound="obj")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -139,7 +138,7 @@ class obj:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[DN], src_dict: Dict[str, Any]) -> DN:
|
||||
def from_dict(cls: Type[UQ], src_dict: Dict[str, Any]) -> UQ:
|
||||
d = src_dict.copy()
|
||||
_coords = d.pop("coords", UNSET)
|
||||
coords: Union[Unset, System]
|
||||
@ -183,7 +182,7 @@ class obj:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
BA = TypeVar("BA", bound="ply")
|
||||
QE = TypeVar("QE", bound="ply")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -215,7 +214,7 @@ class ply:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[BA], src_dict: Dict[str, Any]) -> BA:
|
||||
def from_dict(cls: Type[QE], src_dict: Dict[str, Any]) -> QE:
|
||||
d = src_dict.copy()
|
||||
_coords = d.pop("coords", UNSET)
|
||||
coords: Union[Unset, System]
|
||||
@ -259,7 +258,7 @@ class ply:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
OR = TypeVar("OR", bound="sldprt")
|
||||
XH = TypeVar("XH", bound="sldprt")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -281,7 +280,7 @@ class sldprt:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[OR], src_dict: Dict[str, Any]) -> OR:
|
||||
def from_dict(cls: Type[XH], src_dict: Dict[str, Any]) -> XH:
|
||||
d = src_dict.copy()
|
||||
type = d.pop("type", UNSET)
|
||||
|
||||
@ -309,7 +308,7 @@ class sldprt:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
CB = TypeVar("CB", bound="step")
|
||||
KT = TypeVar("KT", bound="step")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -331,7 +330,7 @@ class step:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[CB], src_dict: Dict[str, Any]) -> CB:
|
||||
def from_dict(cls: Type[KT], src_dict: Dict[str, Any]) -> KT:
|
||||
d = src_dict.copy()
|
||||
type = d.pop("type", UNSET)
|
||||
|
||||
@ -359,7 +358,7 @@ class step:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
LC = TypeVar("LC", bound="stl")
|
||||
BV = TypeVar("BV", bound="stl")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -391,7 +390,7 @@ class stl:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[LC], src_dict: Dict[str, Any]) -> LC:
|
||||
def from_dict(cls: Type[BV], src_dict: Dict[str, Any]) -> BV:
|
||||
d = src_dict.copy()
|
||||
_coords = d.pop("coords", UNSET)
|
||||
coords: Union[Unset, System]
|
||||
@ -435,6 +434,10 @@ class stl:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
GY = TypeVar("GY", bound="InputFormat")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class InputFormat:
|
||||
|
||||
"""Input format specifier."""
|
||||
@ -447,82 +450,76 @@ class InputFormat:
|
||||
sldprt,
|
||||
step,
|
||||
stl,
|
||||
] = None
|
||||
]
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
type: Union[
|
||||
type(fbx),
|
||||
type(gltf),
|
||||
type(obj),
|
||||
type(ply),
|
||||
type(sldprt),
|
||||
type(step),
|
||||
type(stl),
|
||||
fbx,
|
||||
gltf,
|
||||
obj,
|
||||
ply,
|
||||
sldprt,
|
||||
step,
|
||||
stl,
|
||||
],
|
||||
):
|
||||
self.type = type
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
if isinstance(self.type, fbx):
|
||||
n: fbx = self.type
|
||||
return n.to_dict()
|
||||
GU: fbx = self.type
|
||||
return GU.to_dict()
|
||||
elif isinstance(self.type, gltf):
|
||||
n: gltf = self.type
|
||||
return n.to_dict()
|
||||
UP: gltf = self.type
|
||||
return UP.to_dict()
|
||||
elif isinstance(self.type, obj):
|
||||
n: obj = self.type
|
||||
return n.to_dict()
|
||||
DJ: obj = self.type
|
||||
return DJ.to_dict()
|
||||
elif isinstance(self.type, ply):
|
||||
n: ply = self.type
|
||||
return n.to_dict()
|
||||
TR: ply = self.type
|
||||
return TR.to_dict()
|
||||
elif isinstance(self.type, sldprt):
|
||||
n: sldprt = self.type
|
||||
return n.to_dict()
|
||||
JF: sldprt = self.type
|
||||
return JF.to_dict()
|
||||
elif isinstance(self.type, step):
|
||||
n: step = self.type
|
||||
return n.to_dict()
|
||||
EL: step = self.type
|
||||
return EL.to_dict()
|
||||
elif isinstance(self.type, stl):
|
||||
n: stl = self.type
|
||||
return n.to_dict()
|
||||
LF: stl = self.type
|
||||
return LF.to_dict()
|
||||
|
||||
raise Exception("Unknown type")
|
||||
|
||||
def from_dict(self, d) -> Self:
|
||||
@classmethod
|
||||
def from_dict(cls: Type[GY], d: Dict[str, Any]) -> GY:
|
||||
if d.get("type") == "fbx":
|
||||
n: fbx = fbx()
|
||||
n.from_dict(d)
|
||||
self.type = n
|
||||
return Self
|
||||
SS: fbx = fbx()
|
||||
SS.from_dict(d)
|
||||
return cls(type=SS)
|
||||
elif d.get("type") == "gltf":
|
||||
n: gltf = gltf()
|
||||
n.from_dict(d)
|
||||
self.type = n
|
||||
return self
|
||||
AZ: gltf = gltf()
|
||||
AZ.from_dict(d)
|
||||
return cls(type=AZ)
|
||||
elif d.get("type") == "obj":
|
||||
n: obj = obj()
|
||||
n.from_dict(d)
|
||||
self.type = n
|
||||
return self
|
||||
WJ: obj = obj()
|
||||
WJ.from_dict(d)
|
||||
return cls(type=WJ)
|
||||
elif d.get("type") == "ply":
|
||||
n: ply = ply()
|
||||
n.from_dict(d)
|
||||
self.type = n
|
||||
return self
|
||||
YD: ply = ply()
|
||||
YD.from_dict(d)
|
||||
return cls(type=YD)
|
||||
elif d.get("type") == "sldprt":
|
||||
n: sldprt = sldprt()
|
||||
n.from_dict(d)
|
||||
self.type = n
|
||||
return self
|
||||
VP: sldprt = sldprt()
|
||||
VP.from_dict(d)
|
||||
return cls(type=VP)
|
||||
elif d.get("type") == "step":
|
||||
n: step = step()
|
||||
n.from_dict(d)
|
||||
self.type = n
|
||||
return self
|
||||
ZG: step = step()
|
||||
ZG.from_dict(d)
|
||||
return cls(type=ZG)
|
||||
elif d.get("type") == "stl":
|
||||
n: stl = stl()
|
||||
n.from_dict(d)
|
||||
self.type = n
|
||||
return self
|
||||
CS: stl = stl()
|
||||
CS.from_dict(d)
|
||||
return cls(type=CS)
|
||||
|
||||
raise Exception("Unknown type")
|
||||
|
@ -8,7 +8,7 @@ from ..models.currency import Currency
|
||||
from ..models.invoice_status import InvoiceStatus
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
TO = TypeVar("TO", bound="Invoice")
|
||||
GN = TypeVar("GN", bound="Invoice")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -144,7 +144,7 @@ class Invoice:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[TO], src_dict: Dict[str, Any]) -> TO:
|
||||
def from_dict(cls: Type[GN], src_dict: Dict[str, Any]) -> GN:
|
||||
d = src_dict.copy()
|
||||
amount_due = d.pop("amount_due", UNSET)
|
||||
|
||||
|
@ -5,7 +5,7 @@ import attr
|
||||
from ..models.currency import Currency
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
ZP = TypeVar("ZP", bound="InvoiceLineItem")
|
||||
GD = TypeVar("GD", bound="InvoiceLineItem")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -49,7 +49,7 @@ class InvoiceLineItem:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[ZP], src_dict: Dict[str, Any]) -> ZP:
|
||||
def from_dict(cls: Type[GD], src_dict: Dict[str, Any]) -> GD:
|
||||
d = src_dict.copy()
|
||||
amount = d.pop("amount", UNSET)
|
||||
|
||||
|
@ -7,7 +7,7 @@ from ..models.jetstream_stats import JetstreamStats
|
||||
from ..models.meta_cluster_info import MetaClusterInfo
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
EO = TypeVar("EO", bound="Jetstream")
|
||||
VJ = TypeVar("VJ", bound="Jetstream")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -41,7 +41,7 @@ class Jetstream:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[EO], src_dict: Dict[str, Any]) -> EO:
|
||||
def from_dict(cls: Type[VJ], src_dict: Dict[str, Any]) -> VJ:
|
||||
d = src_dict.copy()
|
||||
_config = d.pop("config", UNSET)
|
||||
config: Union[Unset, JetstreamConfig]
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
NY = TypeVar("NY", bound="JetstreamApiStats")
|
||||
OX = TypeVar("OX", bound="JetstreamApiStats")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -35,7 +35,7 @@ class JetstreamApiStats:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[NY], src_dict: Dict[str, Any]) -> NY:
|
||||
def from_dict(cls: Type[OX], src_dict: Dict[str, Any]) -> OX:
|
||||
d = src_dict.copy()
|
||||
errors = d.pop("errors", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
QO = TypeVar("QO", bound="JetstreamConfig")
|
||||
YW = TypeVar("YW", bound="JetstreamConfig")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -39,7 +39,7 @@ class JetstreamConfig:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[QO], src_dict: Dict[str, Any]) -> QO:
|
||||
def from_dict(cls: Type[YW], src_dict: Dict[str, Any]) -> YW:
|
||||
d = src_dict.copy()
|
||||
domain = d.pop("domain", UNSET)
|
||||
|
||||
|
@ -5,7 +5,7 @@ import attr
|
||||
from ..models.jetstream_api_stats import JetstreamApiStats
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
KX = TypeVar("KX", bound="JetstreamStats")
|
||||
QX = TypeVar("QX", bound="JetstreamStats")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -53,7 +53,7 @@ class JetstreamStats:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[KX], src_dict: Dict[str, Any]) -> KX:
|
||||
def from_dict(cls: Type[QX], src_dict: Dict[str, Any]) -> QX:
|
||||
d = src_dict.copy()
|
||||
accounts = d.pop("accounts", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
IZ = TypeVar("IZ", bound="LeafNode")
|
||||
NO = TypeVar("NO", bound="LeafNode")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -39,7 +39,7 @@ class LeafNode:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[IZ], src_dict: Dict[str, Any]) -> IZ:
|
||||
def from_dict(cls: Type[NO], src_dict: Dict[str, Any]) -> NO:
|
||||
d = src_dict.copy()
|
||||
auth_timeout = d.pop("auth_timeout", UNSET)
|
||||
|
||||
|
@ -5,7 +5,7 @@ import attr
|
||||
from ..models.unit_mass import UnitMass
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
WO = TypeVar("WO", bound="Mass")
|
||||
VX = TypeVar("VX", bound="Mass")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -33,7 +33,7 @@ class Mass:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[WO], src_dict: Dict[str, Any]) -> WO:
|
||||
def from_dict(cls: Type[VX], src_dict: Dict[str, Any]) -> VX:
|
||||
d = src_dict.copy()
|
||||
mass = d.pop("mass", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
NK = TypeVar("NK", bound="MetaClusterInfo")
|
||||
RG = TypeVar("RG", bound="MetaClusterInfo")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -35,7 +35,7 @@ class MetaClusterInfo:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[NK], src_dict: Dict[str, Any]) -> NK:
|
||||
def from_dict(cls: Type[RG], src_dict: Dict[str, Any]) -> RG:
|
||||
d = src_dict.copy()
|
||||
cluster_size = d.pop("cluster_size", UNSET)
|
||||
|
||||
|
@ -8,7 +8,7 @@ from ..models.environment import Environment
|
||||
from ..models.file_system_metadata import FileSystemMetadata
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
UQ = TypeVar("UQ", bound="Metadata")
|
||||
IT = TypeVar("IT", bound="Metadata")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -53,7 +53,7 @@ class Metadata:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[UQ], src_dict: Dict[str, Any]) -> UQ:
|
||||
def from_dict(cls: Type[IT], src_dict: Dict[str, Any]) -> IT:
|
||||
d = src_dict.copy()
|
||||
_cache = d.pop("cache", UNSET)
|
||||
cache: Union[Unset, CacheMetadata]
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -6,7 +6,7 @@ from ..models.modeling_cmd import ModelingCmd
|
||||
from ..models.modeling_cmd_id import ModelingCmdId
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
GK = TypeVar("GK", bound="ModelingCmdReq")
|
||||
SZ = TypeVar("SZ", bound="ModelingCmdReq")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -35,7 +35,7 @@ class ModelingCmdReq:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[GK], src_dict: Dict[str, Any]) -> GK:
|
||||
def from_dict(cls: Type[SZ], src_dict: Dict[str, Any]) -> SZ:
|
||||
d = src_dict.copy()
|
||||
_cmd = d.pop("cmd", UNSET)
|
||||
cmd: Union[Unset, ModelingCmd]
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
SG = TypeVar("SG", bound="MouseClick")
|
||||
FN = TypeVar("FN", bound="MouseClick")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -35,7 +35,7 @@ class MouseClick:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[SG], src_dict: Dict[str, Any]) -> SG:
|
||||
def from_dict(cls: Type[FN], src_dict: Dict[str, Any]) -> FN:
|
||||
d = src_dict.copy()
|
||||
entities_modified = cast(List[str], d.pop("entities_modified", UNSET))
|
||||
|
||||
|
@ -6,7 +6,7 @@ from ..models.country_code import CountryCode
|
||||
from ..models.uuid import Uuid
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
QZ = TypeVar("QZ", bound="NewAddress")
|
||||
YJ = TypeVar("YJ", bound="NewAddress")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -54,7 +54,7 @@ class NewAddress:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[QZ], src_dict: Dict[str, Any]) -> QZ:
|
||||
def from_dict(cls: Type[YJ], src_dict: Dict[str, Any]) -> YJ:
|
||||
d = src_dict.copy()
|
||||
city = d.pop("city", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
SY = TypeVar("SY", bound="OAuth2ClientInfo")
|
||||
GA = TypeVar("GA", bound="OAuth2ClientInfo")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -35,7 +35,7 @@ class OAuth2ClientInfo:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[SY], src_dict: Dict[str, Any]) -> SY:
|
||||
def from_dict(cls: Type[GA], src_dict: Dict[str, Any]) -> GA:
|
||||
d = src_dict.copy()
|
||||
csrf_token = d.pop("csrf_token", UNSET)
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,11 +1,10 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
from typing_extensions import Self
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
FF = TypeVar("FF", bound="ice_server_info")
|
||||
DE = TypeVar("DE", bound="ice_server_info")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -31,7 +30,7 @@ class ice_server_info:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[FF], src_dict: Dict[str, Any]) -> FF:
|
||||
def from_dict(cls: Type[DE], src_dict: Dict[str, Any]) -> DE:
|
||||
d = src_dict.copy()
|
||||
data = d.pop("data", UNSET)
|
||||
type = d.pop("type", UNSET)
|
||||
@ -61,7 +60,7 @@ class ice_server_info:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
YO = TypeVar("YO", bound="trickle_ice")
|
||||
PU = TypeVar("PU", bound="trickle_ice")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -87,7 +86,7 @@ class trickle_ice:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[YO], src_dict: Dict[str, Any]) -> YO:
|
||||
def from_dict(cls: Type[PU], src_dict: Dict[str, Any]) -> PU:
|
||||
d = src_dict.copy()
|
||||
data = d.pop("data", UNSET)
|
||||
type = d.pop("type", UNSET)
|
||||
@ -117,7 +116,7 @@ class trickle_ice:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
FS = TypeVar("FS", bound="sdp_answer")
|
||||
AP = TypeVar("AP", bound="sdp_answer")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -143,7 +142,7 @@ class sdp_answer:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[FS], src_dict: Dict[str, Any]) -> FS:
|
||||
def from_dict(cls: Type[AP], src_dict: Dict[str, Any]) -> AP:
|
||||
d = src_dict.copy()
|
||||
data = d.pop("data", UNSET)
|
||||
type = d.pop("type", UNSET)
|
||||
@ -173,7 +172,7 @@ class sdp_answer:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
WN = TypeVar("WN", bound="modeling")
|
||||
AA = TypeVar("AA", bound="modeling")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -199,7 +198,7 @@ class modeling:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[WN], src_dict: Dict[str, Any]) -> WN:
|
||||
def from_dict(cls: Type[AA], src_dict: Dict[str, Any]) -> AA:
|
||||
d = src_dict.copy()
|
||||
data = d.pop("data", UNSET)
|
||||
type = d.pop("type", UNSET)
|
||||
@ -229,7 +228,7 @@ class modeling:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
EQ = TypeVar("EQ", bound="export")
|
||||
MH = TypeVar("MH", bound="export")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -255,7 +254,7 @@ class export:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[EQ], src_dict: Dict[str, Any]) -> EQ:
|
||||
def from_dict(cls: Type[MH], src_dict: Dict[str, Any]) -> MH:
|
||||
d = src_dict.copy()
|
||||
data = d.pop("data", UNSET)
|
||||
type = d.pop("type", UNSET)
|
||||
@ -285,7 +284,7 @@ class export:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
UW = TypeVar("UW", bound="metrics_request")
|
||||
OL = TypeVar("OL", bound="metrics_request")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -311,7 +310,7 @@ class metrics_request:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[UW], src_dict: Dict[str, Any]) -> UW:
|
||||
def from_dict(cls: Type[OL], src_dict: Dict[str, Any]) -> OL:
|
||||
d = src_dict.copy()
|
||||
data = d.pop("data", UNSET)
|
||||
type = d.pop("type", UNSET)
|
||||
@ -341,6 +340,10 @@ class metrics_request:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
GY = TypeVar("GY", bound="OkWebSocketResponseData")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class OkWebSocketResponseData:
|
||||
|
||||
"""The websocket messages this server sends."""
|
||||
@ -352,73 +355,68 @@ class OkWebSocketResponseData:
|
||||
modeling,
|
||||
export,
|
||||
metrics_request,
|
||||
] = None
|
||||
]
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
type: Union[
|
||||
type(ice_server_info),
|
||||
type(trickle_ice),
|
||||
type(sdp_answer),
|
||||
type(modeling),
|
||||
type(export),
|
||||
type(metrics_request),
|
||||
ice_server_info,
|
||||
trickle_ice,
|
||||
sdp_answer,
|
||||
modeling,
|
||||
export,
|
||||
metrics_request,
|
||||
],
|
||||
):
|
||||
self.type = type
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
if isinstance(self.type, ice_server_info):
|
||||
n: ice_server_info = self.type
|
||||
return n.to_dict()
|
||||
WA: ice_server_info = self.type
|
||||
return WA.to_dict()
|
||||
elif isinstance(self.type, trickle_ice):
|
||||
n: trickle_ice = self.type
|
||||
return n.to_dict()
|
||||
EP: trickle_ice = self.type
|
||||
return EP.to_dict()
|
||||
elif isinstance(self.type, sdp_answer):
|
||||
n: sdp_answer = self.type
|
||||
return n.to_dict()
|
||||
JY: sdp_answer = self.type
|
||||
return JY.to_dict()
|
||||
elif isinstance(self.type, modeling):
|
||||
n: modeling = self.type
|
||||
return n.to_dict()
|
||||
BZ: modeling = self.type
|
||||
return BZ.to_dict()
|
||||
elif isinstance(self.type, export):
|
||||
n: export = self.type
|
||||
return n.to_dict()
|
||||
NL: export = self.type
|
||||
return NL.to_dict()
|
||||
elif isinstance(self.type, metrics_request):
|
||||
n: metrics_request = self.type
|
||||
return n.to_dict()
|
||||
MI: metrics_request = self.type
|
||||
return MI.to_dict()
|
||||
|
||||
raise Exception("Unknown type")
|
||||
|
||||
def from_dict(self, d) -> Self:
|
||||
@classmethod
|
||||
def from_dict(cls: Type[GY], d: Dict[str, Any]) -> GY:
|
||||
if d.get("type") == "ice_server_info":
|
||||
n: ice_server_info = ice_server_info()
|
||||
n.from_dict(d)
|
||||
self.type = n
|
||||
return Self
|
||||
LA: ice_server_info = ice_server_info()
|
||||
LA.from_dict(d)
|
||||
return cls(type=LA)
|
||||
elif d.get("type") == "trickle_ice":
|
||||
n: trickle_ice = trickle_ice()
|
||||
n.from_dict(d)
|
||||
self.type = n
|
||||
return self
|
||||
CJ: trickle_ice = trickle_ice()
|
||||
CJ.from_dict(d)
|
||||
return cls(type=CJ)
|
||||
elif d.get("type") == "sdp_answer":
|
||||
n: sdp_answer = sdp_answer()
|
||||
n.from_dict(d)
|
||||
self.type = n
|
||||
return self
|
||||
FE: sdp_answer = sdp_answer()
|
||||
FE.from_dict(d)
|
||||
return cls(type=FE)
|
||||
elif d.get("type") == "modeling":
|
||||
n: modeling = modeling()
|
||||
n.from_dict(d)
|
||||
self.type = n
|
||||
return self
|
||||
NB: modeling = modeling()
|
||||
NB.from_dict(d)
|
||||
return cls(type=NB)
|
||||
elif d.get("type") == "export":
|
||||
n: export = export()
|
||||
n.from_dict(d)
|
||||
self.type = n
|
||||
return self
|
||||
TJ: export = export()
|
||||
TJ.from_dict(d)
|
||||
return cls(type=TJ)
|
||||
elif d.get("type") == "metrics_request":
|
||||
n: metrics_request = metrics_request()
|
||||
n.from_dict(d)
|
||||
self.type = n
|
||||
return self
|
||||
KS: metrics_request = metrics_request()
|
||||
KS.from_dict(d)
|
||||
return cls(type=KS)
|
||||
|
||||
raise Exception("Unknown type")
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
MD = TypeVar("MD", bound="Onboarding")
|
||||
VO = TypeVar("VO", bound="Onboarding")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -37,7 +37,7 @@ class Onboarding:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[MD], src_dict: Dict[str, Any]) -> MD:
|
||||
def from_dict(cls: Type[VO], src_dict: Dict[str, Any]) -> VO:
|
||||
d = src_dict.copy()
|
||||
first_call_from__their_machine_date = d.pop(
|
||||
"first_call_from_their_machine_date", UNSET
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
HD = TypeVar("HD", bound="OutputFile")
|
||||
JK = TypeVar("JK", bound="OutputFile")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -31,7 +31,7 @@ class OutputFile:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[HD], src_dict: Dict[str, Any]) -> HD:
|
||||
def from_dict(cls: Type[JK], src_dict: Dict[str, Any]) -> JK:
|
||||
d = src_dict.copy()
|
||||
contents = d.pop("contents", UNSET)
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
from typing_extensions import Self
|
||||
|
||||
from ..models.fbx_storage import FbxStorage
|
||||
from ..models.gltf_presentation import GltfPresentation
|
||||
@ -13,7 +12,7 @@ from ..models.system import System
|
||||
from ..models.unit_length import UnitLength
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
UJ = TypeVar("UJ", bound="fbx")
|
||||
DX = TypeVar("DX", bound="fbx")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -40,7 +39,7 @@ class fbx:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[UJ], src_dict: Dict[str, Any]) -> UJ:
|
||||
def from_dict(cls: Type[DX], src_dict: Dict[str, Any]) -> DX:
|
||||
d = src_dict.copy()
|
||||
_storage = d.pop("storage", UNSET)
|
||||
storage: Union[Unset, FbxStorage]
|
||||
@ -76,7 +75,7 @@ class fbx:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
RU = TypeVar("RU", bound="gltf")
|
||||
LH = TypeVar("LH", bound="gltf")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -108,7 +107,7 @@ class gltf:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[RU], src_dict: Dict[str, Any]) -> RU:
|
||||
def from_dict(cls: Type[LH], src_dict: Dict[str, Any]) -> LH:
|
||||
d = src_dict.copy()
|
||||
_presentation = d.pop("presentation", UNSET)
|
||||
presentation: Union[Unset, GltfPresentation]
|
||||
@ -152,7 +151,7 @@ class gltf:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
DL = TypeVar("DL", bound="obj")
|
||||
XA = TypeVar("XA", bound="obj")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -184,7 +183,7 @@ class obj:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[DL], src_dict: Dict[str, Any]) -> DL:
|
||||
def from_dict(cls: Type[XA], src_dict: Dict[str, Any]) -> XA:
|
||||
d = src_dict.copy()
|
||||
_coords = d.pop("coords", UNSET)
|
||||
coords: Union[Unset, System]
|
||||
@ -228,7 +227,7 @@ class obj:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
QT = TypeVar("QT", bound="ply")
|
||||
QJ = TypeVar("QJ", bound="ply")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -270,7 +269,7 @@ class ply:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[QT], src_dict: Dict[str, Any]) -> QT:
|
||||
def from_dict(cls: Type[QJ], src_dict: Dict[str, Any]) -> QJ:
|
||||
d = src_dict.copy()
|
||||
_coords = d.pop("coords", UNSET)
|
||||
coords: Union[Unset, System]
|
||||
@ -330,7 +329,7 @@ class ply:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
PT = TypeVar("PT", bound="step")
|
||||
ES = TypeVar("ES", bound="step")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -357,7 +356,7 @@ class step:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[PT], src_dict: Dict[str, Any]) -> PT:
|
||||
def from_dict(cls: Type[ES], src_dict: Dict[str, Any]) -> ES:
|
||||
d = src_dict.copy()
|
||||
_coords = d.pop("coords", UNSET)
|
||||
coords: Union[Unset, System]
|
||||
@ -393,7 +392,7 @@ class step:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
HR = TypeVar("HR", bound="stl")
|
||||
AI = TypeVar("AI", bound="stl")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -435,7 +434,7 @@ class stl:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[HR], src_dict: Dict[str, Any]) -> HR:
|
||||
def from_dict(cls: Type[AI], src_dict: Dict[str, Any]) -> AI:
|
||||
d = src_dict.copy()
|
||||
_coords = d.pop("coords", UNSET)
|
||||
coords: Union[Unset, System]
|
||||
@ -495,6 +494,10 @@ class stl:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
GY = TypeVar("GY", bound="OutputFormat")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class OutputFormat:
|
||||
|
||||
"""Output format specifier."""
|
||||
@ -506,73 +509,68 @@ class OutputFormat:
|
||||
ply,
|
||||
step,
|
||||
stl,
|
||||
] = None
|
||||
]
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
type: Union[
|
||||
type(fbx),
|
||||
type(gltf),
|
||||
type(obj),
|
||||
type(ply),
|
||||
type(step),
|
||||
type(stl),
|
||||
fbx,
|
||||
gltf,
|
||||
obj,
|
||||
ply,
|
||||
step,
|
||||
stl,
|
||||
],
|
||||
):
|
||||
self.type = type
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
if isinstance(self.type, fbx):
|
||||
n: fbx = self.type
|
||||
return n.to_dict()
|
||||
MV: fbx = self.type
|
||||
return MV.to_dict()
|
||||
elif isinstance(self.type, gltf):
|
||||
n: gltf = self.type
|
||||
return n.to_dict()
|
||||
NW: gltf = self.type
|
||||
return NW.to_dict()
|
||||
elif isinstance(self.type, obj):
|
||||
n: obj = self.type
|
||||
return n.to_dict()
|
||||
MR: obj = self.type
|
||||
return MR.to_dict()
|
||||
elif isinstance(self.type, ply):
|
||||
n: ply = self.type
|
||||
return n.to_dict()
|
||||
WG: ply = self.type
|
||||
return WG.to_dict()
|
||||
elif isinstance(self.type, step):
|
||||
n: step = self.type
|
||||
return n.to_dict()
|
||||
DZ: step = self.type
|
||||
return DZ.to_dict()
|
||||
elif isinstance(self.type, stl):
|
||||
n: stl = self.type
|
||||
return n.to_dict()
|
||||
UC: stl = self.type
|
||||
return UC.to_dict()
|
||||
|
||||
raise Exception("Unknown type")
|
||||
|
||||
def from_dict(self, d) -> Self:
|
||||
@classmethod
|
||||
def from_dict(cls: Type[GY], d: Dict[str, Any]) -> GY:
|
||||
if d.get("type") == "fbx":
|
||||
n: fbx = fbx()
|
||||
n.from_dict(d)
|
||||
self.type = n
|
||||
return Self
|
||||
LU: fbx = fbx()
|
||||
LU.from_dict(d)
|
||||
return cls(type=LU)
|
||||
elif d.get("type") == "gltf":
|
||||
n: gltf = gltf()
|
||||
n.from_dict(d)
|
||||
self.type = n
|
||||
return self
|
||||
EH: gltf = gltf()
|
||||
EH.from_dict(d)
|
||||
return cls(type=EH)
|
||||
elif d.get("type") == "obj":
|
||||
n: obj = obj()
|
||||
n.from_dict(d)
|
||||
self.type = n
|
||||
return self
|
||||
MY: obj = obj()
|
||||
MY.from_dict(d)
|
||||
return cls(type=MY)
|
||||
elif d.get("type") == "ply":
|
||||
n: ply = ply()
|
||||
n.from_dict(d)
|
||||
self.type = n
|
||||
return self
|
||||
WC: ply = ply()
|
||||
WC.from_dict(d)
|
||||
return cls(type=WC)
|
||||
elif d.get("type") == "step":
|
||||
n: step = step()
|
||||
n.from_dict(d)
|
||||
self.type = n
|
||||
return self
|
||||
ZT: step = step()
|
||||
ZT.from_dict(d)
|
||||
return cls(type=ZT)
|
||||
elif d.get("type") == "stl":
|
||||
n: stl = stl()
|
||||
n.from_dict(d)
|
||||
self.type = n
|
||||
return self
|
||||
VZ: stl = stl()
|
||||
VZ.from_dict(d)
|
||||
return cls(type=VZ)
|
||||
|
||||
raise Exception("Unknown type")
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
VF = TypeVar("VF", bound="PathGetCurveUuidsForVertices")
|
||||
KY = TypeVar("KY", bound="PathGetCurveUuidsForVertices")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -29,7 +29,7 @@ class PathGetCurveUuidsForVertices:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[VF], src_dict: Dict[str, Any]) -> VF:
|
||||
def from_dict(cls: Type[KY], src_dict: Dict[str, Any]) -> KY:
|
||||
d = src_dict.copy()
|
||||
curve_ids = cast(List[str], d.pop("curve_ids", UNSET))
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
VM = TypeVar("VM", bound="PathGetInfo")
|
||||
ZJ = TypeVar("ZJ", bound="PathGetInfo")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -33,7 +33,7 @@ class PathGetInfo:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[VM], src_dict: Dict[str, Any]) -> VM:
|
||||
def from_dict(cls: Type[ZJ], src_dict: Dict[str, Any]) -> ZJ:
|
||||
d = src_dict.copy()
|
||||
from ..models.path_segment_info import PathSegmentInfo
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
WH = TypeVar("WH", bound="PathGetVertexUuids")
|
||||
VS = TypeVar("VS", bound="PathGetVertexUuids")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -29,7 +29,7 @@ class PathGetVertexUuids:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[WH], src_dict: Dict[str, Any]) -> WH:
|
||||
def from_dict(cls: Type[VS], src_dict: Dict[str, Any]) -> VS:
|
||||
d = src_dict.copy()
|
||||
vertex_ids = cast(List[str], d.pop("vertex_ids", UNSET))
|
||||
|
||||
|
@ -1,14 +1,13 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
from typing_extensions import Self
|
||||
|
||||
from ..models.angle import Angle
|
||||
from ..models.point2d import Point2d
|
||||
from ..models.point3d import Point3d
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
DQ = TypeVar("DQ", bound="line")
|
||||
PM = TypeVar("PM", bound="line")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -39,7 +38,7 @@ class line:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[DQ], src_dict: Dict[str, Any]) -> DQ:
|
||||
def from_dict(cls: Type[PM], src_dict: Dict[str, Any]) -> PM:
|
||||
d = src_dict.copy()
|
||||
_end = d.pop("end", UNSET)
|
||||
end: Union[Unset, Point3d]
|
||||
@ -78,7 +77,7 @@ class line:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
UY = TypeVar("UY", bound="arc")
|
||||
HI = TypeVar("HI", bound="arc")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -131,7 +130,7 @@ class arc:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[UY], src_dict: Dict[str, Any]) -> UY:
|
||||
def from_dict(cls: Type[HI], src_dict: Dict[str, Any]) -> HI:
|
||||
d = src_dict.copy()
|
||||
angle_end = d.pop("angle_end", UNSET)
|
||||
|
||||
@ -195,7 +194,7 @@ class arc:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
PD = TypeVar("PD", bound="bezier")
|
||||
XD = TypeVar("XD", bound="bezier")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -236,7 +235,7 @@ class bezier:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[PD], src_dict: Dict[str, Any]) -> PD:
|
||||
def from_dict(cls: Type[XD], src_dict: Dict[str, Any]) -> XD:
|
||||
d = src_dict.copy()
|
||||
_control1 = d.pop("control1", UNSET)
|
||||
control1: Union[Unset, Point3d]
|
||||
@ -291,7 +290,7 @@ class bezier:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
SM = TypeVar("SM", bound="tangential_arc")
|
||||
HN = TypeVar("HN", bound="tangential_arc")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -322,7 +321,7 @@ class tangential_arc:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[SM], src_dict: Dict[str, Any]) -> SM:
|
||||
def from_dict(cls: Type[HN], src_dict: Dict[str, Any]) -> HN:
|
||||
d = src_dict.copy()
|
||||
_offset = d.pop("offset", UNSET)
|
||||
offset: Union[Unset, Angle]
|
||||
@ -361,7 +360,7 @@ class tangential_arc:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
JL = TypeVar("JL", bound="tangential_arc_to")
|
||||
OT = TypeVar("OT", bound="tangential_arc_to")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -393,7 +392,7 @@ class tangential_arc_to:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[JL], src_dict: Dict[str, Any]) -> JL:
|
||||
def from_dict(cls: Type[OT], src_dict: Dict[str, Any]) -> OT:
|
||||
d = src_dict.copy()
|
||||
_angle_snap_increment = d.pop("angle_snap_increment", UNSET)
|
||||
angle_snap_increment: Union[Unset, Angle]
|
||||
@ -437,6 +436,10 @@ class tangential_arc_to:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
GY = TypeVar("GY", bound="PathSegment")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class PathSegment:
|
||||
|
||||
"""A segment of a path. Paths are composed of many segments."""
|
||||
@ -447,64 +450,60 @@ class PathSegment:
|
||||
bezier,
|
||||
tangential_arc,
|
||||
tangential_arc_to,
|
||||
] = None
|
||||
]
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
type: Union[
|
||||
type(line),
|
||||
type(arc),
|
||||
type(bezier),
|
||||
type(tangential_arc),
|
||||
type(tangential_arc_to),
|
||||
line,
|
||||
arc,
|
||||
bezier,
|
||||
tangential_arc,
|
||||
tangential_arc_to,
|
||||
],
|
||||
):
|
||||
self.type = type
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
if isinstance(self.type, line):
|
||||
n: line = self.type
|
||||
return n.to_dict()
|
||||
AT: line = self.type
|
||||
return AT.to_dict()
|
||||
elif isinstance(self.type, arc):
|
||||
n: arc = self.type
|
||||
return n.to_dict()
|
||||
KI: arc = self.type
|
||||
return KI.to_dict()
|
||||
elif isinstance(self.type, bezier):
|
||||
n: bezier = self.type
|
||||
return n.to_dict()
|
||||
HW: bezier = self.type
|
||||
return HW.to_dict()
|
||||
elif isinstance(self.type, tangential_arc):
|
||||
n: tangential_arc = self.type
|
||||
return n.to_dict()
|
||||
FR: tangential_arc = self.type
|
||||
return FR.to_dict()
|
||||
elif isinstance(self.type, tangential_arc_to):
|
||||
n: tangential_arc_to = self.type
|
||||
return n.to_dict()
|
||||
WZ: tangential_arc_to = self.type
|
||||
return WZ.to_dict()
|
||||
|
||||
raise Exception("Unknown type")
|
||||
|
||||
def from_dict(self, d) -> Self:
|
||||
@classmethod
|
||||
def from_dict(cls: Type[GY], d: Dict[str, Any]) -> GY:
|
||||
if d.get("type") == "line":
|
||||
n: line = line()
|
||||
n.from_dict(d)
|
||||
self.type = n
|
||||
return Self
|
||||
GF: line = line()
|
||||
GF.from_dict(d)
|
||||
return cls(type=GF)
|
||||
elif d.get("type") == "arc":
|
||||
n: arc = arc()
|
||||
n.from_dict(d)
|
||||
self.type = n
|
||||
return self
|
||||
RM: arc = arc()
|
||||
RM.from_dict(d)
|
||||
return cls(type=RM)
|
||||
elif d.get("type") == "bezier":
|
||||
n: bezier = bezier()
|
||||
n.from_dict(d)
|
||||
self.type = n
|
||||
return self
|
||||
UD: bezier = bezier()
|
||||
UD.from_dict(d)
|
||||
return cls(type=UD)
|
||||
elif d.get("type") == "tangential_arc":
|
||||
n: tangential_arc = tangential_arc()
|
||||
n.from_dict(d)
|
||||
self.type = n
|
||||
return self
|
||||
GT: tangential_arc = tangential_arc()
|
||||
GT.from_dict(d)
|
||||
return cls(type=GT)
|
||||
elif d.get("type") == "tangential_arc_to":
|
||||
n: tangential_arc_to = tangential_arc_to()
|
||||
n.from_dict(d)
|
||||
self.type = n
|
||||
return self
|
||||
BQ: tangential_arc_to = tangential_arc_to()
|
||||
BQ.from_dict(d)
|
||||
return cls(type=BQ)
|
||||
|
||||
raise Exception("Unknown type")
|
||||
|
@ -6,7 +6,7 @@ from ..models.modeling_cmd_id import ModelingCmdId
|
||||
from ..models.path_command import PathCommand
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
CG = TypeVar("CG", bound="PathSegmentInfo")
|
||||
UH = TypeVar("UH", bound="PathSegmentInfo")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -39,7 +39,7 @@ class PathSegmentInfo:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[CG], src_dict: Dict[str, Any]) -> CG:
|
||||
def from_dict(cls: Type[UH], src_dict: Dict[str, Any]) -> UH:
|
||||
d = src_dict.copy()
|
||||
_command = d.pop("command", UNSET)
|
||||
command: Union[Unset, PathCommand]
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
QA = TypeVar("QA", bound="PaymentIntent")
|
||||
DC = TypeVar("DC", bound="PaymentIntent")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -27,7 +27,7 @@ class PaymentIntent:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[QA], src_dict: Dict[str, Any]) -> QA:
|
||||
def from_dict(cls: Type[DC], src_dict: Dict[str, Any]) -> DC:
|
||||
d = src_dict.copy()
|
||||
client_secret = d.pop("client_secret", UNSET)
|
||||
|
||||
|
@ -9,7 +9,7 @@ from ..models.card_details import CardDetails
|
||||
from ..models.payment_method_type import PaymentMethodType
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
ZB = TypeVar("ZB", bound="PaymentMethod")
|
||||
CT = TypeVar("CT", bound="PaymentMethod")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -58,7 +58,7 @@ class PaymentMethod:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[ZB], src_dict: Dict[str, Any]) -> ZB:
|
||||
def from_dict(cls: Type[CT], src_dict: Dict[str, Any]) -> CT:
|
||||
d = src_dict.copy()
|
||||
_billing_info = d.pop("billing_info", UNSET)
|
||||
billing_info: Union[Unset, BillingInfo]
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
AU = TypeVar("AU", bound="PaymentMethodCardChecks")
|
||||
GX = TypeVar("GX", bound="PaymentMethodCardChecks")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -35,7 +35,7 @@ class PaymentMethodCardChecks:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[AU], src_dict: Dict[str, Any]) -> AU:
|
||||
def from_dict(cls: Type[GX], src_dict: Dict[str, Any]) -> GX:
|
||||
d = src_dict.copy()
|
||||
address_line1_check = d.pop("address_line1_check", UNSET)
|
||||
|
||||
|
@ -5,7 +5,7 @@ import attr
|
||||
from ..models.point2d import Point2d
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
FX = TypeVar("FX", bound="PlaneIntersectAndProject")
|
||||
DG = TypeVar("DG", bound="PlaneIntersectAndProject")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -29,7 +29,7 @@ class PlaneIntersectAndProject:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[FX], src_dict: Dict[str, Any]) -> FX:
|
||||
def from_dict(cls: Type[DG], src_dict: Dict[str, Any]) -> DG:
|
||||
d = src_dict.copy()
|
||||
_plane_coordinates = d.pop("plane_coordinates", UNSET)
|
||||
plane_coordinates: Union[Unset, Point2d]
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
BL = TypeVar("BL", bound="Point2d")
|
||||
SW = TypeVar("SW", bound="Point2d")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -31,7 +31,7 @@ class Point2d:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[BL], src_dict: Dict[str, Any]) -> BL:
|
||||
def from_dict(cls: Type[SW], src_dict: Dict[str, Any]) -> SW:
|
||||
d = src_dict.copy()
|
||||
x = d.pop("x", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
KU = TypeVar("KU", bound="Point3d")
|
||||
FQ = TypeVar("FQ", bound="Point3d")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -35,7 +35,7 @@ class Point3d:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[KU], src_dict: Dict[str, Any]) -> KU:
|
||||
def from_dict(cls: Type[FQ], src_dict: Dict[str, Any]) -> FQ:
|
||||
d = src_dict.copy()
|
||||
x = d.pop("x", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
PZ = TypeVar("PZ", bound="Pong")
|
||||
IK = TypeVar("IK", bound="Pong")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -27,7 +27,7 @@ class Pong:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[PZ], src_dict: Dict[str, Any]) -> PZ:
|
||||
def from_dict(cls: Type[IK], src_dict: Dict[str, Any]) -> IK:
|
||||
d = src_dict.copy()
|
||||
message = d.pop("message", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
FA = TypeVar("FA", bound="RawFile")
|
||||
NG = TypeVar("NG", bound="RawFile")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -33,7 +33,7 @@ class RawFile:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[FA], src_dict: Dict[str, Any]) -> FA:
|
||||
def from_dict(cls: Type[NG], src_dict: Dict[str, Any]) -> NG:
|
||||
d = src_dict.copy()
|
||||
contents = cast(List[int], d.pop("contents", UNSET))
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
GE = TypeVar("GE", bound="RtcIceCandidateInit")
|
||||
DT = TypeVar("DT", bound="RtcIceCandidateInit")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -39,7 +39,7 @@ class RtcIceCandidateInit:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[GE], src_dict: Dict[str, Any]) -> GE:
|
||||
def from_dict(cls: Type[DT], src_dict: Dict[str, Any]) -> DT:
|
||||
d = src_dict.copy()
|
||||
candidate = d.pop("candidate", UNSET)
|
||||
|
||||
|
@ -5,7 +5,7 @@ import attr
|
||||
from ..models.rtc_sdp_type import RtcSdpType
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
JG = TypeVar("JG", bound="RtcSessionDescription")
|
||||
IF = TypeVar("IF", bound="RtcSessionDescription")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -33,7 +33,7 @@ class RtcSessionDescription:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[JG], src_dict: Dict[str, Any]) -> JG:
|
||||
def from_dict(cls: Type[IF], src_dict: Dict[str, Any]) -> IF:
|
||||
d = src_dict.copy()
|
||||
sdp = d.pop("sdp", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
HH = TypeVar("HH", bound="SelectGet")
|
||||
MQ = TypeVar("MQ", bound="SelectGet")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -29,7 +29,7 @@ class SelectGet:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[HH], src_dict: Dict[str, Any]) -> HH:
|
||||
def from_dict(cls: Type[MQ], src_dict: Dict[str, Any]) -> MQ:
|
||||
d = src_dict.copy()
|
||||
entity_ids = cast(List[str], d.pop("entity_ids", UNSET))
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
RY = TypeVar("RY", bound="SelectWithPoint")
|
||||
XZ = TypeVar("XZ", bound="SelectWithPoint")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -27,7 +27,7 @@ class SelectWithPoint:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[RY], src_dict: Dict[str, Any]) -> RY:
|
||||
def from_dict(cls: Type[XZ], src_dict: Dict[str, Any]) -> XZ:
|
||||
d = src_dict.copy()
|
||||
entity_id = d.pop("entity_id", UNSET)
|
||||
|
||||
|
@ -1,11 +1,10 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
from typing_extensions import Self
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
AE = TypeVar("AE", bound="default_scene")
|
||||
KW = TypeVar("KW", bound="default_scene")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -27,7 +26,7 @@ class default_scene:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[AE], src_dict: Dict[str, Any]) -> AE:
|
||||
def from_dict(cls: Type[KW], src_dict: Dict[str, Any]) -> KW:
|
||||
d = src_dict.copy()
|
||||
type = d.pop("type", UNSET)
|
||||
|
||||
@ -55,7 +54,7 @@ class default_scene:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
AD = TypeVar("AD", bound="scene_by_index")
|
||||
HJ = TypeVar("HJ", bound="scene_by_index")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -81,7 +80,7 @@ class scene_by_index:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[AD], src_dict: Dict[str, Any]) -> AD:
|
||||
def from_dict(cls: Type[HJ], src_dict: Dict[str, Any]) -> HJ:
|
||||
d = src_dict.copy()
|
||||
index = d.pop("index", UNSET)
|
||||
|
||||
@ -112,7 +111,7 @@ class scene_by_index:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
AB = TypeVar("AB", bound="scene_by_name")
|
||||
HA = TypeVar("HA", bound="scene_by_name")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -138,7 +137,7 @@ class scene_by_name:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[AB], src_dict: Dict[str, Any]) -> AB:
|
||||
def from_dict(cls: Type[HA], src_dict: Dict[str, Any]) -> HA:
|
||||
d = src_dict.copy()
|
||||
name = d.pop("name", UNSET)
|
||||
|
||||
@ -169,7 +168,7 @@ class scene_by_name:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
VY = TypeVar("VY", bound="mesh_by_index")
|
||||
ZM = TypeVar("ZM", bound="mesh_by_index")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -195,7 +194,7 @@ class mesh_by_index:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[VY], src_dict: Dict[str, Any]) -> VY:
|
||||
def from_dict(cls: Type[ZM], src_dict: Dict[str, Any]) -> ZM:
|
||||
d = src_dict.copy()
|
||||
index = d.pop("index", UNSET)
|
||||
|
||||
@ -226,7 +225,7 @@ class mesh_by_index:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
DW = TypeVar("DW", bound="mesh_by_name")
|
||||
BX = TypeVar("BX", bound="mesh_by_name")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -252,7 +251,7 @@ class mesh_by_name:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[DW], src_dict: Dict[str, Any]) -> DW:
|
||||
def from_dict(cls: Type[BX], src_dict: Dict[str, Any]) -> BX:
|
||||
d = src_dict.copy()
|
||||
name = d.pop("name", UNSET)
|
||||
|
||||
@ -283,6 +282,10 @@ class mesh_by_name:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
GY = TypeVar("GY", bound="Selection")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class Selection:
|
||||
|
||||
"""Data item selection."""
|
||||
@ -293,64 +296,60 @@ class Selection:
|
||||
scene_by_name,
|
||||
mesh_by_index,
|
||||
mesh_by_name,
|
||||
] = None
|
||||
]
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
type: Union[
|
||||
type(default_scene),
|
||||
type(scene_by_index),
|
||||
type(scene_by_name),
|
||||
type(mesh_by_index),
|
||||
type(mesh_by_name),
|
||||
default_scene,
|
||||
scene_by_index,
|
||||
scene_by_name,
|
||||
mesh_by_index,
|
||||
mesh_by_name,
|
||||
],
|
||||
):
|
||||
self.type = type
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
if isinstance(self.type, default_scene):
|
||||
n: default_scene = self.type
|
||||
return n.to_dict()
|
||||
TD: default_scene = self.type
|
||||
return TD.to_dict()
|
||||
elif isinstance(self.type, scene_by_index):
|
||||
n: scene_by_index = self.type
|
||||
return n.to_dict()
|
||||
SQ: scene_by_index = self.type
|
||||
return SQ.to_dict()
|
||||
elif isinstance(self.type, scene_by_name):
|
||||
n: scene_by_name = self.type
|
||||
return n.to_dict()
|
||||
IL: scene_by_name = self.type
|
||||
return IL.to_dict()
|
||||
elif isinstance(self.type, mesh_by_index):
|
||||
n: mesh_by_index = self.type
|
||||
return n.to_dict()
|
||||
YG: mesh_by_index = self.type
|
||||
return YG.to_dict()
|
||||
elif isinstance(self.type, mesh_by_name):
|
||||
n: mesh_by_name = self.type
|
||||
return n.to_dict()
|
||||
ZE: mesh_by_name = self.type
|
||||
return ZE.to_dict()
|
||||
|
||||
raise Exception("Unknown type")
|
||||
|
||||
def from_dict(self, d) -> Self:
|
||||
@classmethod
|
||||
def from_dict(cls: Type[GY], d: Dict[str, Any]) -> GY:
|
||||
if d.get("type") == "default_scene":
|
||||
n: default_scene = default_scene()
|
||||
n.from_dict(d)
|
||||
self.type = n
|
||||
return Self
|
||||
NR: default_scene = default_scene()
|
||||
NR.from_dict(d)
|
||||
return cls(type=NR)
|
||||
elif d.get("type") == "scene_by_index":
|
||||
n: scene_by_index = scene_by_index()
|
||||
n.from_dict(d)
|
||||
self.type = n
|
||||
return self
|
||||
WV: scene_by_index = scene_by_index()
|
||||
WV.from_dict(d)
|
||||
return cls(type=WV)
|
||||
elif d.get("type") == "scene_by_name":
|
||||
n: scene_by_name = scene_by_name()
|
||||
n.from_dict(d)
|
||||
self.type = n
|
||||
return self
|
||||
JT: scene_by_name = scene_by_name()
|
||||
JT.from_dict(d)
|
||||
return cls(type=JT)
|
||||
elif d.get("type") == "mesh_by_index":
|
||||
n: mesh_by_index = mesh_by_index()
|
||||
n.from_dict(d)
|
||||
self.type = n
|
||||
return self
|
||||
DD: mesh_by_index = mesh_by_index()
|
||||
DD.from_dict(d)
|
||||
return cls(type=DD)
|
||||
elif d.get("type") == "mesh_by_name":
|
||||
n: mesh_by_name = mesh_by_name()
|
||||
n.from_dict(d)
|
||||
self.type = n
|
||||
return self
|
||||
UI: mesh_by_name = mesh_by_name()
|
||||
UI.from_dict(d)
|
||||
return cls(type=UI)
|
||||
|
||||
raise Exception("Unknown type")
|
||||
|
@ -7,7 +7,7 @@ from dateutil.parser import isoparse
|
||||
from ..models.uuid import Uuid
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
MC = TypeVar("MC", bound="Session")
|
||||
IE = TypeVar("IE", bound="Session")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -58,7 +58,7 @@ class Session:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[MC], src_dict: Dict[str, Any]) -> MC:
|
||||
def from_dict(cls: Type[IE], src_dict: Dict[str, Any]) -> IE:
|
||||
d = src_dict.copy()
|
||||
_created_at = d.pop("created_at", UNSET)
|
||||
created_at: Union[Unset, datetime.datetime]
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
AV = TypeVar("AV", bound="Solid3dGetAllEdgeFaces")
|
||||
JZ = TypeVar("JZ", bound="Solid3dGetAllEdgeFaces")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -29,7 +29,7 @@ class Solid3dGetAllEdgeFaces:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[AV], src_dict: Dict[str, Any]) -> AV:
|
||||
def from_dict(cls: Type[JZ], src_dict: Dict[str, Any]) -> JZ:
|
||||
d = src_dict.copy()
|
||||
faces = cast(List[str], d.pop("faces", UNSET))
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
BR = TypeVar("BR", bound="Solid3dGetAllOppositeEdges")
|
||||
LS = TypeVar("LS", bound="Solid3dGetAllOppositeEdges")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -29,7 +29,7 @@ class Solid3dGetAllOppositeEdges:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[BR], src_dict: Dict[str, Any]) -> BR:
|
||||
def from_dict(cls: Type[LS], src_dict: Dict[str, Any]) -> LS:
|
||||
d = src_dict.copy()
|
||||
edges = cast(List[str], d.pop("edges", UNSET))
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
WM = TypeVar("WM", bound="Solid3dGetNextAdjacentEdge")
|
||||
WL = TypeVar("WL", bound="Solid3dGetNextAdjacentEdge")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -27,7 +27,7 @@ class Solid3dGetNextAdjacentEdge:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[WM], src_dict: Dict[str, Any]) -> WM:
|
||||
def from_dict(cls: Type[WL], src_dict: Dict[str, Any]) -> WL:
|
||||
d = src_dict.copy()
|
||||
edge = d.pop("edge", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
OK = TypeVar("OK", bound="Solid3dGetOppositeEdge")
|
||||
PA = TypeVar("PA", bound="Solid3dGetOppositeEdge")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -27,7 +27,7 @@ class Solid3dGetOppositeEdge:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[OK], src_dict: Dict[str, Any]) -> OK:
|
||||
def from_dict(cls: Type[PA], src_dict: Dict[str, Any]) -> PA:
|
||||
d = src_dict.copy()
|
||||
edge = d.pop("edge", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
MU = TypeVar("MU", bound="Solid3dGetPrevAdjacentEdge")
|
||||
SJ = TypeVar("SJ", bound="Solid3dGetPrevAdjacentEdge")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -27,7 +27,7 @@ class Solid3dGetPrevAdjacentEdge:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[MU], src_dict: Dict[str, Any]) -> MU:
|
||||
def from_dict(cls: Type[SJ], src_dict: Dict[str, Any]) -> SJ:
|
||||
d = src_dict.copy()
|
||||
edge = d.pop("edge", UNSET)
|
||||
|
||||
|
@ -5,7 +5,7 @@ import attr
|
||||
from ..models.ok_web_socket_response_data import OkWebSocketResponseData
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
OP = TypeVar("OP", bound="SuccessWebSocketResponse")
|
||||
ZV = TypeVar("ZV", bound="SuccessWebSocketResponse")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -37,7 +37,7 @@ class SuccessWebSocketResponse:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[OP], src_dict: Dict[str, Any]) -> OP:
|
||||
def from_dict(cls: Type[ZV], src_dict: Dict[str, Any]) -> ZV:
|
||||
d = src_dict.copy()
|
||||
request_id = d.pop("request_id", UNSET)
|
||||
|
||||
|
@ -5,7 +5,7 @@ import attr
|
||||
from ..models.unit_area import UnitArea
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
WW = TypeVar("WW", bound="SurfaceArea")
|
||||
TG = TypeVar("TG", bound="SurfaceArea")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -33,7 +33,7 @@ class SurfaceArea:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[WW], src_dict: Dict[str, Any]) -> WW:
|
||||
def from_dict(cls: Type[TG], src_dict: Dict[str, Any]) -> TG:
|
||||
d = src_dict.copy()
|
||||
_output_unit = d.pop("output_unit", UNSET)
|
||||
output_unit: Union[Unset, UnitArea]
|
||||
|
@ -5,7 +5,7 @@ import attr
|
||||
from ..models.axis_direction_pair import AxisDirectionPair
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
LV = TypeVar("LV", bound="System")
|
||||
FW = TypeVar("FW", bound="System")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -41,7 +41,7 @@ class System:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[LV], src_dict: Dict[str, Any]) -> LV:
|
||||
def from_dict(cls: Type[FW], src_dict: Dict[str, Any]) -> FW:
|
||||
d = src_dict.copy()
|
||||
_forward = d.pop("forward", UNSET)
|
||||
forward: Union[Unset, AxisDirectionPair]
|
||||
|
@ -5,7 +5,7 @@ import attr
|
||||
from ..models.base64data import Base64Data
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
II = TypeVar("II", bound="TakeSnapshot")
|
||||
DV = TypeVar("DV", bound="TakeSnapshot")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -30,7 +30,7 @@ class TakeSnapshot:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[II], src_dict: Dict[str, Any]) -> II:
|
||||
def from_dict(cls: Type[DV], src_dict: Dict[str, Any]) -> DV:
|
||||
d = src_dict.copy()
|
||||
_contents = d.pop("contents", UNSET)
|
||||
contents: Union[Unset, Base64Data]
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user