@ -179,7 +179,7 @@ class WebSocket:
|
||||
|
||||
"""
|
||||
for message in self.ws:
|
||||
return {{response_type}}.from_dict(json.loads(message))
|
||||
yield {{response_type}}.from_dict(json.loads(message))
|
||||
|
||||
def send(self, data:{% for arg in args %}{%if arg.name == "body" %}{{arg.type}}{% endif %}{% endfor %}):
|
||||
"""Send data to the websocket."""
|
||||
|
@ -1518,9 +1518,8 @@ def generateObjectTypeCode(
|
||||
)
|
||||
# We only want .to_dict on nested objects.
|
||||
if "$ref" in property_schema:
|
||||
actual_schema = data["components"]["schemas"][
|
||||
property_schema["$ref"].replace("#/components/schemas/", "")
|
||||
]
|
||||
ref = property_schema["$ref"].replace("#/components/schemas/", "")
|
||||
actual_schema = data["components"]["schemas"][ref]
|
||||
is_enum = isEnumWithDocsOneOf(actual_schema)
|
||||
if (
|
||||
"properties" in actual_schema
|
||||
@ -1528,11 +1527,22 @@ def generateObjectTypeCode(
|
||||
or "anyOf" in actual_schema
|
||||
or "allOf" in actual_schema
|
||||
) and not is_enum:
|
||||
f.write(
|
||||
"\t\t\t_"
|
||||
+ property_name
|
||||
+ ": "
|
||||
+ ref
|
||||
+ " = cast("
|
||||
+ ref
|
||||
+ ", "
|
||||
+ clean_parameter_name(property_name)
|
||||
+ ")\n"
|
||||
)
|
||||
f.write(
|
||||
"\t\t\tfield_dict['"
|
||||
+ property_name
|
||||
+ "'] = "
|
||||
+ clean_parameter_name(property_name)
|
||||
+ "'] = _"
|
||||
+ property_name
|
||||
+ ".to_dict()\n"
|
||||
)
|
||||
else:
|
||||
@ -1849,6 +1859,7 @@ def renderTypeToDict(f, property_name: str, property_schema: dict, data: dict):
|
||||
)
|
||||
elif "$ref" in property_schema:
|
||||
ref = property_schema["$ref"].replace("#/components/schemas/", "")
|
||||
f.write("\t\t" + property_name + ": Union[Unset, " + ref + "] = UNSET\n")
|
||||
f.write(
|
||||
"\t\tif not isinstance(self."
|
||||
+ clean_parameter_name(property_name)
|
||||
@ -1869,6 +1880,7 @@ def renderTypeToDict(f, property_name: str, property_schema: dict, data: dict):
|
||||
return renderTypeToDict(
|
||||
f, property_name, data["components"]["schemas"][ref], data
|
||||
)
|
||||
f.write("\t\t" + property_name + ": Union[Unset, " + ref + "] = UNSET\n")
|
||||
f.write(
|
||||
"\t\tif not isinstance(self."
|
||||
+ clean_parameter_name(property_name)
|
||||
|
@ -1,10 +1,138 @@
|
||||
[
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1ws~1modeling~1commands/get/x-python",
|
||||
"path": "/info/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, WebSocketRequest, WebSocketResponse\nfrom kittycad.models.rtc_sdp_type import RtcSdpType\nfrom kittycad.models.rtc_session_description import RtcSessionDescription\nfrom kittycad.models.web_socket_request import sdp_offer\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.WebSocket(\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 WebSocketRequest(\n sdp_offer(\n offer=RtcSessionDescription(\n sdp=\"<string>\",\n type=RtcSdpType.UNSPECIFIED,\n ),\n )\n )\n )\n\n # Get a message.\n message = websocket.recv()\n print(message)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.modeling.modeling_commands_ws.html"
|
||||
"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/~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/~1file~1volume/post/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_volume\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileVolume\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_volume import UnitVolume\nfrom kittycad.types import Response\n\n\ndef example_create_file_volume():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileVolume, Error]] = create_file_volume.sync(\n client=client,\n output_unit=UnitVolume.CM3,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileVolume = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_volume.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~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/~1_meta~1info/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.meta import get_metadata\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Metadata\nfrom kittycad.types import Response\n\n\ndef example_get_metadata():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Metadata, Error]] = get_metadata.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Metadata = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_metadata.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1user~1payment~1intent/post/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import create_payment_intent_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, PaymentIntent\nfrom kittycad.types import Response\n\n\ndef example_create_payment_intent_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[PaymentIntent, Error]\n ] = create_payment_intent_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: PaymentIntent = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.create_payment_intent_for_user.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1user~1text-to-cad~1{id}/post/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import create_text_to_cad_model_feedback\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.models.ai_feedback import AiFeedback\nfrom kittycad.types import Response\n\n\ndef example_create_text_to_cad_model_feedback():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = create_text_to_cad_model_feedback.sync(\n client=client,\n id=\"<uuid>\",\n feedback=AiFeedback.THUMBS_UP,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.create_text_to_cad_model_feedback.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1user~1text-to-cad~1{id}/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import get_text_to_cad_model_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, TextToCad\nfrom kittycad.types import Response\n\n\ndef example_get_text_to_cad_model_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[TextToCad, Error]\n ] = get_text_to_cad_model_for_user.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: TextToCad = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.get_text_to_cad_model_for_user.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~1torque~1{input_unit}~1{output_unit}/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_torque_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitTorqueConversion\nfrom kittycad.models.unit_torque import UnitTorque\nfrom kittycad.types import Response\n\n\ndef example_get_torque_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitTorqueConversion, Error]\n ] = get_torque_unit_conversion.sync(\n client=client,\n input_unit=UnitTorque.NEWTON_METRES,\n output_unit=UnitTorque.NEWTON_METRES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitTorqueConversion = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_torque_unit_conversion.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~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/~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/~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/~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~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/~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"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -17,26 +145,18 @@
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1api-calls~1{id}/get/x-python",
|
||||
"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\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"
|
||||
"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/~1async~1operations/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.api_calls import list_async_operations\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AsyncApiCallResultsPage, Error\nfrom kittycad.models.api_call_status import ApiCallStatus\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_async_operations():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[AsyncApiCallResultsPage, Error]\n ] = list_async_operations.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n status=ApiCallStatus.QUEUED,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AsyncApiCallResultsPage = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_async_operations.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1apps~1github~1webhook/post/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.apps import apps_github_webhook\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_apps_github_webhook():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = apps_github_webhook.sync(\n client=client,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.apps.apps_github_webhook.html"
|
||||
"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, WebSocketRequest, WebSocketResponse\nfrom kittycad.models.rtc_sdp_type import RtcSdpType\nfrom kittycad.models.rtc_session_description import RtcSessionDescription\nfrom kittycad.models.web_socket_request import sdp_offer\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.WebSocket(\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 WebSocketRequest(\n sdp_offer(\n offer=RtcSessionDescription(\n sdp=\"<string>\",\n type=RtcSdpType.UNSPECIFIED,\n ),\n )\n )\n )\n\n # Get a message.\n message = websocket.recv()\n print(message)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.modeling.modeling_commands_ws.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -49,10 +169,66 @@
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1unit~1conversion~1current~1{input_unit}~1{output_unit}/get/x-python",
|
||||
"path": "/paths/~1logout/post/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_current_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitCurrentConversion\nfrom kittycad.models.unit_current import UnitCurrent\nfrom kittycad.types import Response\n\n\ndef example_get_current_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitCurrentConversion, Error]\n ] = get_current_unit_conversion.sync(\n client=client,\n input_unit=UnitCurrent.AMPERES,\n output_unit=UnitCurrent.AMPERES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitCurrentConversion = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_current_unit_conversion.html"
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.hidden import logout\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_logout():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = logout.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.hidden.logout.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1unit~1conversion~1temperature~1{input_unit}~1{output_unit}/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_temperature_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitTemperatureConversion\nfrom kittycad.models.unit_temperature import UnitTemperature\nfrom kittycad.types import Response\n\n\ndef example_get_temperature_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitTemperatureConversion, Error]\n ] = get_temperature_unit_conversion.sync(\n client=client,\n input_unit=UnitTemperature.CELSIUS,\n output_unit=UnitTemperature.CELSIUS,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitTemperatureConversion = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_temperature_unit_conversion.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1user~1api-calls~1{id}/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_api_call_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPrice, Error\nfrom kittycad.types import Response\n\n\ndef example_get_api_call_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiCallWithPrice, Error]] = get_api_call_for_user.sync(\n client=client,\n id=\"<string>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPrice = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call_for_user.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1unit~1conversion~1pressure~1{input_unit}~1{output_unit}/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_pressure_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitPressureConversion\nfrom kittycad.models.unit_pressure import UnitPressure\nfrom kittycad.types import Response\n\n\ndef example_get_pressure_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitPressureConversion, Error]\n ] = get_pressure_unit_conversion.sync(\n client=client,\n input_unit=UnitPressure.ATMOSPHERES,\n output_unit=UnitPressure.ATMOSPHERES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitPressureConversion = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_pressure_unit_conversion.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1async~1operations/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import list_async_operations\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import AsyncApiCallResultsPage, Error\nfrom kittycad.models.api_call_status import ApiCallStatus\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_async_operations():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[AsyncApiCallResultsPage, Error]\n ] = list_async_operations.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n status=ApiCallStatus.QUEUED,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: AsyncApiCallResultsPage = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_async_operations.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1openai~1openapi.json/get/x-python",
|
||||
"value": {
|
||||
"example": "from kittycad.api.meta import get_openai_schema\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_get_openai_schema():\n # Create our client.\n client = ClientFromEnv()\n\n get_openai_schema.sync(\n client=client,\n )\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_openai_schema.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1user~1session~1{token}/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_session_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Session\nfrom kittycad.types import Response\n\n\ndef example_get_session_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Session, Error]] = get_session_for_user.sync(\n client=client,\n token=\"<uuid>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Session = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_session_for_user.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1user~1payment/put/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import update_payment_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Customer, Error\nfrom kittycad.models.billing_info import BillingInfo\nfrom kittycad.types import Response\n\n\ndef example_update_payment_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[Customer, Error]\n ] = update_payment_information_for_user.sync(\n client=client,\n body=BillingInfo(\n name=\"<string>\",\n phone=\"<string>\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Customer = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.update_payment_information_for_user.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -71,14 +247,6 @@
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.get_payment_information_for_user.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1user~1payment/put/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import update_payment_information_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Customer, Error\nfrom kittycad.models.billing_info import BillingInfo\nfrom kittycad.types import Response\n\n\ndef example_update_payment_information_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[Customer, Error]\n ] = update_payment_information_for_user.sync(\n client=client,\n body=BillingInfo(\n name=\"<string>\",\n phone=\"<string>\",\n ),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Customer = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.update_payment_information_for_user.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1user~1payment/post/x-python",
|
||||
@ -89,202 +257,34 @@
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1file~1center-of-mass/post/x-python",
|
||||
"path": "/paths/~1users-extended/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_center_of_mass\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileCenterOfMass\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_length import UnitLength\nfrom kittycad.types import Response\n\n\ndef example_create_file_center_of_mass():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[FileCenterOfMass, Error]\n ] = create_file_center_of_mass.sync(\n client=client,\n output_unit=UnitLength.CM,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileCenterOfMass = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_center_of_mass.html"
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import list_users_extended\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, ExtendedUserResultsPage\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_users_extended():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ExtendedUserResultsPage, Error]\n ] = list_users_extended.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ExtendedUserResultsPage = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.list_users_extended.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1user/get/x-python",
|
||||
"path": "/paths/~1apps~1github~1webhook/post/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_user_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, User\nfrom kittycad.types import Response\n\n\ndef example_get_user_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[User, Error]] = get_user_self.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: User = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_user_self.html"
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.apps import apps_github_webhook\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_apps_github_webhook():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = apps_github_webhook.sync(\n client=client,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.apps.apps_github_webhook.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1user/delete/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.users import delete_user_self\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_user_self():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_user_self.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.delete_user_self.html"
|
||||
"example": "from 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/put/x-python",
|
||||
"path": "/paths/~1unit~1conversion~1current~1{input_unit}~1{output_unit}/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.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~1api-calls~1{id}/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import get_api_call_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPrice, Error\nfrom kittycad.types import Response\n\n\ndef example_get_api_call_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[ApiCallWithPrice, Error]] = get_api_call_for_user.sync(\n client=client,\n id=\"<string>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPrice = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.get_api_call_for_user.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1file~1mass/post/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_mass\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileMass\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_density import UnitDensity\nfrom kittycad.models.unit_mass import UnitMass\nfrom kittycad.types import Response\n\n\ndef example_create_file_mass():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileMass, Error]] = create_file_mass.sync(\n client=client,\n material_density=3.14,\n material_density_unit=UnitDensity.LB_FT3,\n output_unit=UnitMass.G,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileMass = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_mass.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1file~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/~1_meta~1info/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.meta import get_metadata\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Metadata\nfrom kittycad.types import Response\n\n\ndef example_get_metadata():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Metadata, Error]] = get_metadata.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Metadata = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_metadata.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~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~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~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~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/~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/~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~1surface-area/post/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_surface_area\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileSurfaceArea\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_area import UnitArea\nfrom kittycad.types import Response\n\n\ndef example_create_file_surface_area():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[FileSurfaceArea, Error]\n ] = create_file_surface_area.sync(\n client=client,\n output_unit=UnitArea.CM2,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileSurfaceArea = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_surface_area.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1unit~1conversion~1volume~1{input_unit}~1{output_unit}/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_volume_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitVolumeConversion\nfrom kittycad.models.unit_volume import UnitVolume\nfrom kittycad.types import Response\n\n\ndef example_get_volume_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitVolumeConversion, Error]\n ] = get_volume_unit_conversion.sync(\n client=client,\n input_unit=UnitVolume.CM3,\n output_unit=UnitVolume.CM3,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitVolumeConversion = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_volume_unit_conversion.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1unit~1conversion~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/~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/~1file~1volume/post/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_volume\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileVolume\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_volume import UnitVolume\nfrom kittycad.types import Response\n\n\ndef example_create_file_volume():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileVolume, Error]] = create_file_volume.sync(\n client=client,\n output_unit=UnitVolume.CM3,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileVolume = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_volume.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1/get/x-python",
|
||||
"value": {
|
||||
"example": "from kittycad.api.meta import get_schema\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_get_schema():\n # Create our client.\n client = ClientFromEnv()\n\n get_schema.sync(\n client=client,\n )\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_schema.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1user~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/~1user~1payment~1balance/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import get_payment_balance_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import CustomerBalance, Error\nfrom kittycad.types import Response\n\n\ndef example_get_payment_balance_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[CustomerBalance, Error]\n ] = get_payment_balance_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: CustomerBalance = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.get_payment_balance_for_user.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1user~1payment~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/~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"
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_current_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitCurrentConversion\nfrom kittycad.models.unit_current import UnitCurrent\nfrom kittycad.types import Response\n\n\ndef example_get_current_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitCurrentConversion, Error]\n ] = get_current_unit_conversion.sync(\n client=client,\n input_unit=UnitCurrent.AMPERES,\n output_unit=UnitCurrent.AMPERES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitCurrentConversion = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_current_unit_conversion.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -297,18 +297,66 @@
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1ws~1executor~1term/get/x-python",
|
||||
"path": "/paths/~1apps~1github~1consent/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"
|
||||
"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/~1file~1density/post/x-python",
|
||||
"path": "/paths/~1unit~1conversion~1force~1{input_unit}~1{output_unit}/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_density\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileDensity\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_density import UnitDensity\nfrom kittycad.models.unit_mass import UnitMass\nfrom kittycad.types import Response\n\n\ndef example_create_file_density():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileDensity, Error]] = create_file_density.sync(\n client=client,\n material_mass=3.14,\n material_mass_unit=UnitMass.G,\n output_unit=UnitDensity.LB_FT3,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileDensity = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_density.html"
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.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/~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~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~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/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/~1file~1conversion~1{src_format}~1{output_format}/post/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileConversion\nfrom kittycad.models.file_export_format import FileExportFormat\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.types import Response\n\n\ndef example_create_file_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileConversion, Error]] = create_file_conversion.sync(\n client=client,\n output_format=FileExportFormat.FBX,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileConversion = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_conversion.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1user~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"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -329,66 +377,42 @@
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1logout/post/x-python",
|
||||
"path": "/paths/~1user~1payment~1methods/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.payments import list_payment_methods_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, PaymentMethod\nfrom kittycad.types import Response\n\n\ndef example_list_payment_methods_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[List[PaymentMethod], Error]\n ] = list_payment_methods_for_user.sync(\n client=client,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: List[PaymentMethod] = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.list_payment_methods_for_user.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1ai-prompts/get/x-python",
|
||||
"path": "/paths/~1user/put/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"
|
||||
"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~1power~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_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"
|
||||
"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/~1async~1operations~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.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 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/~1unit~1conversion~1temperature~1{input_unit}~1{output_unit}/get/x-python",
|
||||
"path": "/paths/~1apps~1github~1callback/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_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/~1openai~1openapi.json/get/x-python",
|
||||
"value": {
|
||||
"example": "from kittycad.api.meta import get_openai_schema\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_get_openai_schema():\n # Create our client.\n client = ClientFromEnv()\n\n get_openai_schema.sync(\n client=client,\n )\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_openai_schema.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1unit~1conversion~1torque~1{input_unit}~1{output_unit}/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_torque_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitTorqueConversion\nfrom kittycad.models.unit_torque import UnitTorque\nfrom kittycad.types import Response\n\n\ndef example_get_torque_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitTorqueConversion, Error]\n ] = get_torque_unit_conversion.sync(\n client=client,\n input_unit=UnitTorque.NEWTON_METRES,\n output_unit=UnitTorque.NEWTON_METRES,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitTorqueConversion = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_torque_unit_conversion.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~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"
|
||||
"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"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -401,122 +425,26 @@
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1users-extended/get/x-python",
|
||||
"path": "/paths/~1file~1mass/post/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.file import create_file_mass\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileMass\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_density import UnitDensity\nfrom kittycad.models.unit_mass import UnitMass\nfrom kittycad.types import Response\n\n\ndef example_create_file_mass():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[FileMass, Error]] = create_file_mass.sync(\n client=client,\n material_density=3.14,\n material_density_unit=UnitDensity.LB_FT3,\n output_unit=UnitMass.G,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileMass = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_mass.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1user~1payment~1invoices/get/x-python",
|
||||
"path": "/paths/~1/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 kittycad.api.meta import get_schema\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.types import Response\n\n\ndef example_get_schema():\n # Create our client.\n client = ClientFromEnv()\n\n get_schema.sync(\n client=client,\n )\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.meta.get_schema.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1unit~1conversion~1mass~1{input_unit}~1{output_unit}/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.unit import get_mass_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitMassConversion\nfrom kittycad.models.unit_mass import UnitMass\nfrom kittycad.types import Response\n\n\ndef example_get_mass_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitMassConversion, Error]\n ] = get_mass_unit_conversion.sync(\n client=client,\n input_unit=UnitMass.G,\n output_unit=UnitMass.G,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitMassConversion = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_mass_unit_conversion.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1user~1text-to-cad~1{id}/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import get_text_to_cad_model_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, TextToCad\nfrom kittycad.types import Response\n\n\ndef example_get_text_to_cad_model_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[TextToCad, Error]\n ] = get_text_to_cad_model_for_user.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: TextToCad = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.get_text_to_cad_model_for_user.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1user~1text-to-cad~1{id}/post/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.ai import create_text_to_cad_model_feedback\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.models.ai_feedback import AiFeedback\nfrom kittycad.types import Response\n\n\ndef example_create_text_to_cad_model_feedback():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = create_text_to_cad_model_feedback.sync(\n client=client,\n id=\"<uuid>\",\n feedback=AiFeedback.THUMBS_UP,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.ai.create_text_to_cad_model_feedback.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1auth~1email~1callback/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.hidden import auth_email_callback\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_auth_email_callback():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = auth_email_callback.sync(\n client=client,\n email=\"<string>\",\n token=\"<string>\",\n callback_url=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.hidden.auth_email_callback.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~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/~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/~1api-calls/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import list_api_calls\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPriceResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_api_calls():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiCallWithPriceResultsPage, Error]\n ] = list_api_calls.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPriceResultsPage = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_api_calls.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1users~1{id}~1api-calls/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_calls import list_api_calls_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import ApiCallWithPriceResultsPage, Error\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_api_calls_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[ApiCallWithPriceResultsPage, Error]\n ] = list_api_calls_for_user.sync(\n client=client,\n id=\"<string>\",\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: ApiCallWithPriceResultsPage = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.api_calls.list_api_calls_for_user.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1user~1api-calls/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~1area~1{input_unit}~1{output_unit}/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_area_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitAreaConversion\nfrom kittycad.models.unit_area import UnitArea\nfrom kittycad.types import Response\n\n\ndef example_get_area_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitAreaConversion, Error]\n ] = get_area_unit_conversion.sync(\n client=client,\n input_unit=UnitArea.CM2,\n output_unit=UnitArea.CM2,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitAreaConversion = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_area_unit_conversion.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1users/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import list_users\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UserResultsPage\nfrom kittycad.models.created_at_sort_mode import CreatedAtSortMode\nfrom kittycad.types import Response\n\n\ndef example_list_users():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[UserResultsPage, Error]] = list_users.sync(\n client=client,\n sort_by=CreatedAtSortMode.CREATED_AT_ASCENDING,\n limit=None, # Optional[int]\n page_token=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UserResultsPage = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.list_users.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~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~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"
|
||||
"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"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -529,34 +457,58 @@
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1api-call-metrics/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.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_volume_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitVolumeConversion\nfrom kittycad.models.unit_volume import UnitVolume\nfrom kittycad.types import Response\n\n\ndef example_get_volume_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitVolumeConversion, Error]\n ] = get_volume_unit_conversion.sync(\n client=client,\n input_unit=UnitVolume.CM3,\n output_unit=UnitVolume.CM3,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitVolumeConversion = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_volume_unit_conversion.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1user~1payment~1methods/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 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"
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.payments import delete_payment_method_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_delete_payment_method_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = delete_payment_method_for_user.sync(\n client=client,\n id=\"<string>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.payments.delete_payment_method_for_user.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1user~1payment~1intent/post/x-python",
|
||||
"path": "/paths/~1file~1center-of-mass/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"
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.file import create_file_center_of_mass\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, FileCenterOfMass\nfrom kittycad.models.file_import_format import FileImportFormat\nfrom kittycad.models.unit_length import UnitLength\nfrom kittycad.types import Response\n\n\ndef example_create_file_center_of_mass():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[FileCenterOfMass, Error]\n ] = create_file_center_of_mass.sync(\n client=client,\n output_unit=UnitLength.CM,\n src_format=FileImportFormat.FBX,\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: FileCenterOfMass = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.file.create_file_center_of_mass.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1user~1api-tokens/get/x-python",
|
||||
"path": "/paths/~1file~1execute~1{lang}/post/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.api_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.executor import create_file_execution\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import CodeOutput, Error\nfrom kittycad.models.code_language import CodeLanguage\nfrom kittycad.types import Response\n\n\ndef example_create_file_execution():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[CodeOutput, Error]] = create_file_execution.sync(\n client=client,\n lang=CodeLanguage.GO,\n output=None, # Optional[str]\n body=bytes(\"some bytes\", \"utf-8\"),\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: CodeOutput = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.executor.create_file_execution.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1file~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/~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"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -569,26 +521,74 @@
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1ai-prompts~1{id}/get/x-python",
|
||||
"path": "/paths/~1user~1api-tokens/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"
|
||||
"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~1session~1{token}/get/x-python",
|
||||
"path": "/paths/~1user~1extended/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.users import get_session_for_user\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, Session\nfrom kittycad.types import Response\n\n\ndef example_get_session_for_user():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Union[Session, Error]] = get_session_for_user.sync(\n client=client,\n token=\"<uuid>\",\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Session = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.users.get_session_for_user.html"
|
||||
"example": "from 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",
|
||||
"path": "/paths/~1async~1operations~1{id}/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"
|
||||
"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/~1unit~1conversion~1frequency~1{input_unit}~1{output_unit}/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.unit import get_frequency_unit_conversion\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error, UnitFrequencyConversion\nfrom kittycad.models.unit_frequency import UnitFrequency\nfrom kittycad.types import Response\n\n\ndef example_get_frequency_unit_conversion():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[\n Union[UnitFrequencyConversion, Error]\n ] = get_frequency_unit_conversion.sync(\n client=client,\n input_unit=UnitFrequency.GIGAHERTZ,\n output_unit=UnitFrequency.GIGAHERTZ,\n value=3.14,\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: UnitFrequencyConversion = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.unit.get_frequency_unit_conversion.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~1user~1payment~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/~1auth~1email~1callback/get/x-python",
|
||||
"value": {
|
||||
"example": "from typing import Any, List, Optional, Tuple, Union\n\nfrom kittycad.api.hidden import auth_email_callback\nfrom kittycad.client import ClientFromEnv\nfrom kittycad.models import Error\nfrom kittycad.types import Response\n\n\ndef example_auth_email_callback():\n # Create our client.\n client = ClientFromEnv()\n\n result: Optional[Error] = auth_email_callback.sync(\n client=client,\n email=\"<string>\",\n token=\"<string>\",\n callback_url=None, # Optional[str]\n )\n\n if isinstance(result, Error) or result == None:\n print(result)\n raise Exception(\"Error in response\")\n\n body: Error = result\n print(body)\n",
|
||||
"libDocsLink": "https://python.api.docs.kittycad.io/_autosummary/kittycad.api.hidden.auth_email_callback.html"
|
||||
}
|
||||
},
|
||||
{
|
||||
"op": "add",
|
||||
"path": "/paths/~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"
|
||||
}
|
||||
}
|
||||
]
|
@ -153,7 +153,7 @@ class WebSocket:
|
||||
|
||||
"""
|
||||
for message in self.ws:
|
||||
return WebSocketResponse.from_dict(json.loads(message))
|
||||
yield WebSocketResponse.from_dict(json.loads(message))
|
||||
|
||||
def send(self, data: WebSocketRequest):
|
||||
"""Send data to the websocket."""
|
||||
|
@ -316,5 +316,6 @@ def test_ws():
|
||||
|
||||
# Get the messages.
|
||||
while True:
|
||||
websocket.recv()
|
||||
message = websocket.recv()
|
||||
print(json.dumps(message.to_dict()))
|
||||
break
|
||||
|
@ -20,6 +20,7 @@ class AiPluginApi:
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
is_user_authenticated = self.is_user_authenticated
|
||||
type: Union[Unset, AiPluginApiType] = UNSET
|
||||
if not isinstance(self.type, Unset):
|
||||
type = self.type
|
||||
url = self.url
|
||||
|
@ -19,8 +19,10 @@ class AiPluginAuth:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
authorization_type: Union[Unset, AiPluginHttpAuthType] = UNSET
|
||||
if not isinstance(self.authorization_type, Unset):
|
||||
authorization_type = self.authorization_type
|
||||
type: Union[Unset, AiPluginAuthType] = UNSET
|
||||
if not isinstance(self.type, Unset):
|
||||
type = self.type
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
|
||||
import attr
|
||||
|
||||
@ -30,8 +30,10 @@ class AiPluginManifest:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
api: Union[Unset, AiPluginApi] = UNSET
|
||||
if not isinstance(self.api, Unset):
|
||||
api = self.api
|
||||
auth: Union[Unset, AiPluginAuth] = UNSET
|
||||
if not isinstance(self.auth, Unset):
|
||||
auth = self.auth
|
||||
contact_email = self.contact_email
|
||||
@ -47,9 +49,11 @@ class AiPluginManifest:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if api is not UNSET:
|
||||
field_dict["api"] = api.to_dict()
|
||||
_api: AiPluginApi = cast(AiPluginApi, api)
|
||||
field_dict["api"] = _api.to_dict()
|
||||
if auth is not UNSET:
|
||||
field_dict["auth"] = auth.to_dict()
|
||||
_auth: AiPluginAuth = cast(AiPluginAuth, auth)
|
||||
field_dict["auth"] = _auth.to_dict()
|
||||
if contact_email is not UNSET:
|
||||
field_dict["contact_email"] = contact_email
|
||||
if description_for_human is not UNSET:
|
||||
|
@ -43,8 +43,10 @@ class AiPrompt:
|
||||
if not isinstance(self.created_at, Unset):
|
||||
created_at = self.created_at.isoformat()
|
||||
error = self.error
|
||||
feedback: Union[Unset, AiFeedback] = UNSET
|
||||
if not isinstance(self.feedback, Unset):
|
||||
feedback = self.feedback
|
||||
id: Union[Unset, UuidBinary] = UNSET
|
||||
if not isinstance(self.id, Unset):
|
||||
id = self.id
|
||||
metadata = self.metadata
|
||||
@ -54,8 +56,10 @@ class AiPrompt:
|
||||
started_at: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.started_at, Unset):
|
||||
started_at = self.started_at.isoformat()
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
if not isinstance(self.status, Unset):
|
||||
status = self.status
|
||||
type: Union[Unset, AiPromptType] = UNSET
|
||||
if not isinstance(self.type, Unset):
|
||||
type = self.type
|
||||
updated_at: Union[Unset, str] = UNSET
|
||||
|
@ -18,6 +18,7 @@ class Angle:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
unit: Union[Unset, UnitAngle] = UNSET
|
||||
if not isinstance(self.unit, Unset):
|
||||
unit = self.unit
|
||||
value = self.value
|
||||
|
@ -18,8 +18,10 @@ class AnnotationLineEndOptions:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
end: Union[Unset, AnnotationLineEnd] = UNSET
|
||||
if not isinstance(self.end, Unset):
|
||||
end = self.end
|
||||
start: Union[Unset, AnnotationLineEnd] = UNSET
|
||||
if not isinstance(self.start, Unset):
|
||||
start = self.start
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
|
||||
import attr
|
||||
|
||||
@ -24,13 +24,17 @@ class AnnotationOptions:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
color: Union[Unset, Color] = UNSET
|
||||
if not isinstance(self.color, Unset):
|
||||
color = self.color
|
||||
line_ends: Union[Unset, AnnotationLineEndOptions] = UNSET
|
||||
if not isinstance(self.line_ends, Unset):
|
||||
line_ends = self.line_ends
|
||||
line_width = self.line_width
|
||||
position: Union[Unset, Point3d] = UNSET
|
||||
if not isinstance(self.position, Unset):
|
||||
position = self.position
|
||||
text: Union[Unset, AnnotationTextOptions] = UNSET
|
||||
if not isinstance(self.text, Unset):
|
||||
text = self.text
|
||||
|
||||
@ -38,15 +42,21 @@ class AnnotationOptions:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if color is not UNSET:
|
||||
field_dict["color"] = color.to_dict()
|
||||
_color: Color = cast(Color, color)
|
||||
field_dict["color"] = _color.to_dict()
|
||||
if line_ends is not UNSET:
|
||||
field_dict["line_ends"] = line_ends.to_dict()
|
||||
_line_ends: AnnotationLineEndOptions = cast(
|
||||
AnnotationLineEndOptions, line_ends
|
||||
)
|
||||
field_dict["line_ends"] = _line_ends.to_dict()
|
||||
if line_width is not UNSET:
|
||||
field_dict["line_width"] = line_width
|
||||
if position is not UNSET:
|
||||
field_dict["position"] = position.to_dict()
|
||||
_position: Point3d = cast(Point3d, position)
|
||||
field_dict["position"] = _position.to_dict()
|
||||
if text is not UNSET:
|
||||
field_dict["text"] = text.to_dict()
|
||||
_text: AnnotationTextOptions = cast(AnnotationTextOptions, text)
|
||||
field_dict["text"] = _text.to_dict()
|
||||
|
||||
return field_dict
|
||||
|
||||
|
@ -23,8 +23,10 @@ class AnnotationTextOptions:
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
point_size = self.point_size
|
||||
text = self.text
|
||||
x: Union[Unset, AnnotationTextAlignmentX] = UNSET
|
||||
if not isinstance(self.x, Unset):
|
||||
x = self.x
|
||||
y: Union[Unset, AnnotationTextAlignmentY] = UNSET
|
||||
if not isinstance(self.y, Unset):
|
||||
y = self.y
|
||||
|
||||
|
@ -55,6 +55,7 @@ class ApiCallWithPrice:
|
||||
id = self.id
|
||||
ip_address = self.ip_address
|
||||
litterbox = self.litterbox
|
||||
method: Union[Unset, Method] = UNSET
|
||||
if not isinstance(self.method, Unset):
|
||||
method = self.method
|
||||
minutes = self.minutes
|
||||
|
@ -18,6 +18,7 @@ class ApiError:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
error_code: Union[Unset, ErrorCode] = UNSET
|
||||
if not isinstance(self.error_code, Unset):
|
||||
error_code = self.error_code
|
||||
message = self.message
|
||||
|
@ -45,8 +45,10 @@ class AsyncApiCall:
|
||||
started_at: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.started_at, Unset):
|
||||
started_at = self.started_at.isoformat()
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
if not isinstance(self.status, Unset):
|
||||
status = self.status
|
||||
type: Union[Unset, AsyncApiCallType] = UNSET
|
||||
if not isinstance(self.type, Unset):
|
||||
type = self.type
|
||||
updated_at: Union[Unset, str] = UNSET
|
||||
|
@ -1,5 +1,5 @@
|
||||
import datetime
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
|
||||
import attr
|
||||
from dateutil.parser import isoparse
|
||||
@ -53,8 +53,10 @@ class file_conversion:
|
||||
created_at = self.created_at.isoformat()
|
||||
error = self.error
|
||||
id = self.id
|
||||
output_format: Union[Unset, FileExportFormat] = UNSET
|
||||
if not isinstance(self.output_format, Unset):
|
||||
output_format = self.output_format
|
||||
output_format_options: Union[Unset, OutputFormat] = UNSET
|
||||
if not isinstance(self.output_format_options, Unset):
|
||||
output_format_options = self.output_format_options
|
||||
outputs: Union[Unset, Dict[str, str]] = UNSET
|
||||
@ -63,13 +65,16 @@ class file_conversion:
|
||||
for key, value in self.outputs.items():
|
||||
new_dict[key] = value.get_encoded()
|
||||
outputs = new_dict
|
||||
src_format: Union[Unset, FileImportFormat] = UNSET
|
||||
if not isinstance(self.src_format, Unset):
|
||||
src_format = self.src_format
|
||||
src_format_options: Union[Unset, InputFormat] = UNSET
|
||||
if not isinstance(self.src_format_options, Unset):
|
||||
src_format_options = self.src_format_options
|
||||
started_at: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.started_at, Unset):
|
||||
started_at = self.started_at.isoformat()
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
if not isinstance(self.status, Unset):
|
||||
status = self.status
|
||||
type = self.type
|
||||
@ -92,13 +97,17 @@ class file_conversion:
|
||||
if output_format is not UNSET:
|
||||
field_dict["output_format"] = output_format
|
||||
if output_format_options is not UNSET:
|
||||
field_dict["output_format_options"] = output_format_options.to_dict()
|
||||
_output_format_options: OutputFormat = cast(
|
||||
OutputFormat, output_format_options
|
||||
)
|
||||
field_dict["output_format_options"] = _output_format_options.to_dict()
|
||||
if outputs is not UNSET:
|
||||
field_dict["outputs"] = outputs
|
||||
if src_format is not UNSET:
|
||||
field_dict["src_format"] = src_format
|
||||
if src_format_options is not UNSET:
|
||||
field_dict["src_format_options"] = src_format_options.to_dict()
|
||||
_src_format_options: InputFormat = cast(InputFormat, src_format_options)
|
||||
field_dict["src_format_options"] = _src_format_options.to_dict()
|
||||
if started_at is not UNSET:
|
||||
field_dict["started_at"] = started_at
|
||||
if status is not UNSET:
|
||||
@ -278,6 +287,7 @@ class file_center_of_mass:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
center_of_mass: Union[Unset, Point3d] = UNSET
|
||||
if not isinstance(self.center_of_mass, Unset):
|
||||
center_of_mass = self.center_of_mass
|
||||
completed_at: Union[Unset, str] = UNSET
|
||||
@ -288,13 +298,16 @@ class file_center_of_mass:
|
||||
created_at = self.created_at.isoformat()
|
||||
error = self.error
|
||||
id = self.id
|
||||
output_unit: Union[Unset, UnitLength] = UNSET
|
||||
if not isinstance(self.output_unit, Unset):
|
||||
output_unit = self.output_unit
|
||||
src_format: Union[Unset, FileImportFormat] = UNSET
|
||||
if not isinstance(self.src_format, Unset):
|
||||
src_format = self.src_format
|
||||
started_at: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.started_at, Unset):
|
||||
started_at = self.started_at.isoformat()
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
if not isinstance(self.status, Unset):
|
||||
status = self.status
|
||||
type = self.type
|
||||
@ -307,7 +320,8 @@ class file_center_of_mass:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if center_of_mass is not UNSET:
|
||||
field_dict["center_of_mass"] = center_of_mass.to_dict()
|
||||
_center_of_mass: Point3d = cast(Point3d, center_of_mass)
|
||||
field_dict["center_of_mass"] = _center_of_mass.to_dict()
|
||||
if completed_at is not UNSET:
|
||||
field_dict["completed_at"] = completed_at
|
||||
if created_at is not UNSET:
|
||||
@ -491,15 +505,19 @@ class file_mass:
|
||||
id = self.id
|
||||
mass = self.mass
|
||||
material_density = self.material_density
|
||||
material_density_unit: Union[Unset, UnitDensity] = UNSET
|
||||
if not isinstance(self.material_density_unit, Unset):
|
||||
material_density_unit = self.material_density_unit
|
||||
output_unit: Union[Unset, UnitMass] = UNSET
|
||||
if not isinstance(self.output_unit, Unset):
|
||||
output_unit = self.output_unit
|
||||
src_format: Union[Unset, FileImportFormat] = UNSET
|
||||
if not isinstance(self.src_format, Unset):
|
||||
src_format = self.src_format
|
||||
started_at: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.started_at, Unset):
|
||||
started_at = self.started_at.isoformat()
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
if not isinstance(self.status, Unset):
|
||||
status = self.status
|
||||
type = self.type
|
||||
@ -702,13 +720,16 @@ class file_volume:
|
||||
created_at = self.created_at.isoformat()
|
||||
error = self.error
|
||||
id = self.id
|
||||
output_unit: Union[Unset, UnitVolume] = UNSET
|
||||
if not isinstance(self.output_unit, Unset):
|
||||
output_unit = self.output_unit
|
||||
src_format: Union[Unset, FileImportFormat] = UNSET
|
||||
if not isinstance(self.src_format, Unset):
|
||||
src_format = self.src_format
|
||||
started_at: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.started_at, Unset):
|
||||
started_at = self.started_at.isoformat()
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
if not isinstance(self.status, Unset):
|
||||
status = self.status
|
||||
type = self.type
|
||||
@ -899,15 +920,19 @@ class file_density:
|
||||
error = self.error
|
||||
id = self.id
|
||||
material_mass = self.material_mass
|
||||
material_mass_unit: Union[Unset, UnitMass] = UNSET
|
||||
if not isinstance(self.material_mass_unit, Unset):
|
||||
material_mass_unit = self.material_mass_unit
|
||||
output_unit: Union[Unset, UnitDensity] = UNSET
|
||||
if not isinstance(self.output_unit, Unset):
|
||||
output_unit = self.output_unit
|
||||
src_format: Union[Unset, FileImportFormat] = UNSET
|
||||
if not isinstance(self.src_format, Unset):
|
||||
src_format = self.src_format
|
||||
started_at: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.started_at, Unset):
|
||||
started_at = self.started_at.isoformat()
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
if not isinstance(self.status, Unset):
|
||||
status = self.status
|
||||
type = self.type
|
||||
@ -1110,13 +1135,16 @@ class file_surface_area:
|
||||
created_at = self.created_at.isoformat()
|
||||
error = self.error
|
||||
id = self.id
|
||||
output_unit: Union[Unset, UnitArea] = UNSET
|
||||
if not isinstance(self.output_unit, Unset):
|
||||
output_unit = self.output_unit
|
||||
src_format: Union[Unset, FileImportFormat] = UNSET
|
||||
if not isinstance(self.src_format, Unset):
|
||||
src_format = self.src_format
|
||||
started_at: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.started_at, Unset):
|
||||
started_at = self.started_at.isoformat()
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
if not isinstance(self.status, Unset):
|
||||
status = self.status
|
||||
surface_area = self.surface_area
|
||||
@ -1304,10 +1332,12 @@ class text_to_cad:
|
||||
if not isinstance(self.created_at, Unset):
|
||||
created_at = self.created_at.isoformat()
|
||||
error = self.error
|
||||
feedback: Union[Unset, AiFeedback] = UNSET
|
||||
if not isinstance(self.feedback, Unset):
|
||||
feedback = self.feedback
|
||||
id = self.id
|
||||
model_version = self.model_version
|
||||
output_format: Union[Unset, FileExportFormat] = UNSET
|
||||
if not isinstance(self.output_format, Unset):
|
||||
output_format = self.output_format
|
||||
outputs: Union[Unset, Dict[str, str]] = UNSET
|
||||
@ -1320,6 +1350,7 @@ class text_to_cad:
|
||||
started_at: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.started_at, Unset):
|
||||
started_at = self.started_at.isoformat()
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
if not isinstance(self.status, Unset):
|
||||
status = self.status
|
||||
type = self.type
|
||||
|
@ -19,8 +19,10 @@ class AxisDirectionPair:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
axis: Union[Unset, Axis] = UNSET
|
||||
if not isinstance(self.axis, Unset):
|
||||
axis = self.axis
|
||||
direction: Union[Unset, Direction] = UNSET
|
||||
if not isinstance(self.direction, Unset):
|
||||
direction = self.direction
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
|
||||
import attr
|
||||
|
||||
@ -19,6 +19,7 @@ class BillingInfo:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
address: Union[Unset, NewAddress] = UNSET
|
||||
if not isinstance(self.address, Unset):
|
||||
address = self.address
|
||||
name = self.name
|
||||
@ -28,7 +29,8 @@ class BillingInfo:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if address is not UNSET:
|
||||
field_dict["address"] = address.to_dict()
|
||||
_address: NewAddress = cast(NewAddress, address)
|
||||
field_dict["address"] = _address.to_dict()
|
||||
if name is not UNSET:
|
||||
field_dict["name"] = name
|
||||
if phone is not UNSET:
|
||||
|
@ -1,4 +1,4 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
|
||||
import attr
|
||||
|
||||
@ -25,6 +25,7 @@ class CardDetails:
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
brand = self.brand
|
||||
checks: Union[Unset, PaymentMethodCardChecks] = UNSET
|
||||
if not isinstance(self.checks, Unset):
|
||||
checks = self.checks
|
||||
country = self.country
|
||||
@ -40,7 +41,8 @@ class CardDetails:
|
||||
if brand is not UNSET:
|
||||
field_dict["brand"] = brand
|
||||
if checks is not UNSET:
|
||||
field_dict["checks"] = checks.to_dict()
|
||||
_checks: PaymentMethodCardChecks = cast(PaymentMethodCardChecks, checks)
|
||||
field_dict["checks"] = _checks.to_dict()
|
||||
if country is not UNSET:
|
||||
field_dict["country"] = country
|
||||
if exp_month is not UNSET:
|
||||
|
@ -1,4 +1,4 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
|
||||
import attr
|
||||
|
||||
@ -19,8 +19,10 @@ class CenterOfMass:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
center_of_mass: Union[Unset, Point3d] = UNSET
|
||||
if not isinstance(self.center_of_mass, Unset):
|
||||
center_of_mass = self.center_of_mass
|
||||
output_unit: Union[Unset, UnitLength] = UNSET
|
||||
if not isinstance(self.output_unit, Unset):
|
||||
output_unit = self.output_unit
|
||||
|
||||
@ -28,7 +30,8 @@ class CenterOfMass:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if center_of_mass is not UNSET:
|
||||
field_dict["center_of_mass"] = center_of_mass.to_dict()
|
||||
_center_of_mass: Point3d = cast(Point3d, center_of_mass)
|
||||
field_dict["center_of_mass"] = _center_of_mass.to_dict()
|
||||
if output_unit is not UNSET:
|
||||
field_dict["output_unit"] = output_unit
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import datetime
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
|
||||
import attr
|
||||
from dateutil.parser import isoparse
|
||||
@ -70,6 +70,7 @@ class Connection:
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
auth_timeout = self.auth_timeout
|
||||
cluster: Union[Unset, Cluster] = UNSET
|
||||
if not isinstance(self.cluster, Unset):
|
||||
cluster = self.cluster
|
||||
config_load_time: Union[Unset, str] = UNSET
|
||||
@ -78,6 +79,7 @@ class Connection:
|
||||
connections = self.connections
|
||||
cores = self.cores
|
||||
cpu = self.cpu
|
||||
gateway: Union[Unset, Gateway] = UNSET
|
||||
if not isinstance(self.gateway, Unset):
|
||||
gateway = self.gateway
|
||||
git_commit = self.git_commit
|
||||
@ -92,8 +94,10 @@ class Connection:
|
||||
https_port = self.https_port
|
||||
in_bytes = self.in_bytes
|
||||
in_msgs = self.in_msgs
|
||||
jetstream: Union[Unset, Jetstream] = UNSET
|
||||
if not isinstance(self.jetstream, Unset):
|
||||
jetstream = self.jetstream
|
||||
leaf: Union[Unset, LeafNode] = UNSET
|
||||
if not isinstance(self.leaf, Unset):
|
||||
leaf = self.leaf
|
||||
leafnodes = self.leafnodes
|
||||
@ -133,7 +137,8 @@ class Connection:
|
||||
if auth_timeout is not UNSET:
|
||||
field_dict["auth_timeout"] = auth_timeout
|
||||
if cluster is not UNSET:
|
||||
field_dict["cluster"] = cluster.to_dict()
|
||||
_cluster: Cluster = cast(Cluster, cluster)
|
||||
field_dict["cluster"] = _cluster.to_dict()
|
||||
if config_load_time is not UNSET:
|
||||
field_dict["config_load_time"] = config_load_time
|
||||
if connections is not UNSET:
|
||||
@ -143,7 +148,8 @@ class Connection:
|
||||
if cpu is not UNSET:
|
||||
field_dict["cpu"] = cpu
|
||||
if gateway is not UNSET:
|
||||
field_dict["gateway"] = gateway.to_dict()
|
||||
_gateway: Gateway = cast(Gateway, gateway)
|
||||
field_dict["gateway"] = _gateway.to_dict()
|
||||
if git_commit is not UNSET:
|
||||
field_dict["git_commit"] = git_commit
|
||||
if go is not UNSET:
|
||||
@ -167,9 +173,11 @@ class Connection:
|
||||
if in_msgs is not UNSET:
|
||||
field_dict["in_msgs"] = in_msgs
|
||||
if jetstream is not UNSET:
|
||||
field_dict["jetstream"] = jetstream.to_dict()
|
||||
_jetstream: Jetstream = cast(Jetstream, jetstream)
|
||||
field_dict["jetstream"] = _jetstream.to_dict()
|
||||
if leaf is not UNSET:
|
||||
field_dict["leaf"] = leaf.to_dict()
|
||||
_leaf: LeafNode = cast(LeafNode, leaf)
|
||||
field_dict["leaf"] = _leaf.to_dict()
|
||||
if leafnodes is not UNSET:
|
||||
field_dict["leafnodes"] = leafnodes
|
||||
if max_connections is not UNSET:
|
||||
|
@ -1,4 +1,4 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
|
||||
import attr
|
||||
|
||||
@ -18,8 +18,10 @@ class CurveGetEndPoints:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
end: Union[Unset, Point3d] = UNSET
|
||||
if not isinstance(self.end, Unset):
|
||||
end = self.end
|
||||
start: Union[Unset, Point3d] = UNSET
|
||||
if not isinstance(self.start, Unset):
|
||||
start = self.start
|
||||
|
||||
@ -27,9 +29,11 @@ class CurveGetEndPoints:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if end is not UNSET:
|
||||
field_dict["end"] = end.to_dict()
|
||||
_end: Point3d = cast(Point3d, end)
|
||||
field_dict["end"] = _end.to_dict()
|
||||
if start is not UNSET:
|
||||
field_dict["start"] = start.to_dict()
|
||||
_start: Point3d = cast(Point3d, start)
|
||||
field_dict["start"] = _start.to_dict()
|
||||
|
||||
return field_dict
|
||||
|
||||
|
@ -17,6 +17,7 @@ class CurveGetType:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
curve_type: Union[Unset, CurveType] = UNSET
|
||||
if not isinstance(self.curve_type, Unset):
|
||||
curve_type = self.curve_type
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import datetime
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
|
||||
import attr
|
||||
from dateutil.parser import isoparse
|
||||
@ -29,12 +29,14 @@ class Customer:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
address: Union[Unset, NewAddress] = UNSET
|
||||
if not isinstance(self.address, Unset):
|
||||
address = self.address
|
||||
balance = self.balance
|
||||
created_at: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.created_at, Unset):
|
||||
created_at = self.created_at.isoformat()
|
||||
currency: Union[Unset, Currency] = UNSET
|
||||
if not isinstance(self.currency, Unset):
|
||||
currency = self.currency
|
||||
delinquent = self.delinquent
|
||||
@ -49,7 +51,8 @@ class Customer:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if address is not UNSET:
|
||||
field_dict["address"] = address.to_dict()
|
||||
_address: NewAddress = cast(NewAddress, address)
|
||||
field_dict["address"] = _address.to_dict()
|
||||
if balance is not UNSET:
|
||||
field_dict["balance"] = balance
|
||||
if created_at is not UNSET:
|
||||
|
@ -19,6 +19,7 @@ class Density:
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
density = self.density
|
||||
output_unit: Union[Unset, UnitDensity] = UNSET
|
||||
if not isinstance(self.output_unit, Unset):
|
||||
output_unit = self.output_unit
|
||||
|
||||
|
@ -21,6 +21,7 @@ class DeviceAccessTokenRequestForm:
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
client_id = self.client_id
|
||||
device_code = self.device_code
|
||||
grant_type: Union[Unset, OAuth2GrantType] = UNSET
|
||||
if not isinstance(self.grant_type, Unset):
|
||||
grant_type = self.grant_type
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
|
||||
import attr
|
||||
|
||||
@ -17,6 +17,7 @@ class Discount:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
coupon: Union[Unset, Coupon] = UNSET
|
||||
if not isinstance(self.coupon, Unset):
|
||||
coupon = self.coupon
|
||||
|
||||
@ -24,7 +25,8 @@ class Discount:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if coupon is not UNSET:
|
||||
field_dict["coupon"] = coupon.to_dict()
|
||||
_coupon: Coupon = cast(Coupon, coupon)
|
||||
field_dict["coupon"] = _coupon.to_dict()
|
||||
|
||||
return field_dict
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import datetime
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
|
||||
import attr
|
||||
from dateutil.parser import isoparse
|
||||
@ -33,6 +33,7 @@ class FileCenterOfMass:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
center_of_mass: Union[Unset, Point3d] = UNSET
|
||||
if not isinstance(self.center_of_mass, Unset):
|
||||
center_of_mass = self.center_of_mass
|
||||
completed_at: Union[Unset, str] = UNSET
|
||||
@ -43,13 +44,16 @@ class FileCenterOfMass:
|
||||
created_at = self.created_at.isoformat()
|
||||
error = self.error
|
||||
id = self.id
|
||||
output_unit: Union[Unset, UnitLength] = UNSET
|
||||
if not isinstance(self.output_unit, Unset):
|
||||
output_unit = self.output_unit
|
||||
src_format: Union[Unset, FileImportFormat] = UNSET
|
||||
if not isinstance(self.src_format, Unset):
|
||||
src_format = self.src_format
|
||||
started_at: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.started_at, Unset):
|
||||
started_at = self.started_at.isoformat()
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
if not isinstance(self.status, Unset):
|
||||
status = self.status
|
||||
updated_at: Union[Unset, str] = UNSET
|
||||
@ -61,7 +65,8 @@ class FileCenterOfMass:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if center_of_mass is not UNSET:
|
||||
field_dict["center_of_mass"] = center_of_mass.to_dict()
|
||||
_center_of_mass: Point3d = cast(Point3d, center_of_mass)
|
||||
field_dict["center_of_mass"] = _center_of_mass.to_dict()
|
||||
if completed_at is not UNSET:
|
||||
field_dict["completed_at"] = completed_at
|
||||
if created_at is not UNSET:
|
||||
|
@ -1,5 +1,5 @@
|
||||
import datetime
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
|
||||
import attr
|
||||
from dateutil.parser import isoparse
|
||||
@ -45,8 +45,10 @@ class FileConversion:
|
||||
created_at = self.created_at.isoformat()
|
||||
error = self.error
|
||||
id = self.id
|
||||
output_format: Union[Unset, FileExportFormat] = UNSET
|
||||
if not isinstance(self.output_format, Unset):
|
||||
output_format = self.output_format
|
||||
output_format_options: Union[Unset, OutputFormat] = UNSET
|
||||
if not isinstance(self.output_format_options, Unset):
|
||||
output_format_options = self.output_format_options
|
||||
outputs: Union[Unset, Dict[str, str]] = UNSET
|
||||
@ -55,13 +57,16 @@ class FileConversion:
|
||||
for key, value in self.outputs.items():
|
||||
new_dict[key] = value.get_encoded()
|
||||
outputs = new_dict
|
||||
src_format: Union[Unset, FileImportFormat] = UNSET
|
||||
if not isinstance(self.src_format, Unset):
|
||||
src_format = self.src_format
|
||||
src_format_options: Union[Unset, InputFormat] = UNSET
|
||||
if not isinstance(self.src_format_options, Unset):
|
||||
src_format_options = self.src_format_options
|
||||
started_at: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.started_at, Unset):
|
||||
started_at = self.started_at.isoformat()
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
if not isinstance(self.status, Unset):
|
||||
status = self.status
|
||||
updated_at: Union[Unset, str] = UNSET
|
||||
@ -83,13 +88,17 @@ class FileConversion:
|
||||
if output_format is not UNSET:
|
||||
field_dict["output_format"] = output_format
|
||||
if output_format_options is not UNSET:
|
||||
field_dict["output_format_options"] = output_format_options.to_dict()
|
||||
_output_format_options: OutputFormat = cast(
|
||||
OutputFormat, output_format_options
|
||||
)
|
||||
field_dict["output_format_options"] = _output_format_options.to_dict()
|
||||
if outputs is not UNSET:
|
||||
field_dict["outputs"] = outputs
|
||||
if src_format is not UNSET:
|
||||
field_dict["src_format"] = src_format
|
||||
if src_format_options is not UNSET:
|
||||
field_dict["src_format_options"] = src_format_options.to_dict()
|
||||
_src_format_options: InputFormat = cast(InputFormat, src_format_options)
|
||||
field_dict["src_format_options"] = _src_format_options.to_dict()
|
||||
if started_at is not UNSET:
|
||||
field_dict["started_at"] = started_at
|
||||
if status is not UNSET:
|
||||
|
@ -45,15 +45,19 @@ class FileDensity:
|
||||
error = self.error
|
||||
id = self.id
|
||||
material_mass = self.material_mass
|
||||
material_mass_unit: Union[Unset, UnitMass] = UNSET
|
||||
if not isinstance(self.material_mass_unit, Unset):
|
||||
material_mass_unit = self.material_mass_unit
|
||||
output_unit: Union[Unset, UnitDensity] = UNSET
|
||||
if not isinstance(self.output_unit, Unset):
|
||||
output_unit = self.output_unit
|
||||
src_format: Union[Unset, FileImportFormat] = UNSET
|
||||
if not isinstance(self.src_format, Unset):
|
||||
src_format = self.src_format
|
||||
started_at: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.started_at, Unset):
|
||||
started_at = self.started_at.isoformat()
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
if not isinstance(self.status, Unset):
|
||||
status = self.status
|
||||
updated_at: Union[Unset, str] = UNSET
|
||||
|
@ -45,15 +45,19 @@ class FileMass:
|
||||
id = self.id
|
||||
mass = self.mass
|
||||
material_density = self.material_density
|
||||
material_density_unit: Union[Unset, UnitDensity] = UNSET
|
||||
if not isinstance(self.material_density_unit, Unset):
|
||||
material_density_unit = self.material_density_unit
|
||||
output_unit: Union[Unset, UnitMass] = UNSET
|
||||
if not isinstance(self.output_unit, Unset):
|
||||
output_unit = self.output_unit
|
||||
src_format: Union[Unset, FileImportFormat] = UNSET
|
||||
if not isinstance(self.src_format, Unset):
|
||||
src_format = self.src_format
|
||||
started_at: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.started_at, Unset):
|
||||
started_at = self.started_at.isoformat()
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
if not isinstance(self.status, Unset):
|
||||
status = self.status
|
||||
updated_at: Union[Unset, str] = UNSET
|
||||
|
@ -40,13 +40,16 @@ class FileSurfaceArea:
|
||||
created_at = self.created_at.isoformat()
|
||||
error = self.error
|
||||
id = self.id
|
||||
output_unit: Union[Unset, UnitArea] = UNSET
|
||||
if not isinstance(self.output_unit, Unset):
|
||||
output_unit = self.output_unit
|
||||
src_format: Union[Unset, FileImportFormat] = UNSET
|
||||
if not isinstance(self.src_format, Unset):
|
||||
src_format = self.src_format
|
||||
started_at: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.started_at, Unset):
|
||||
started_at = self.started_at.isoformat()
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
if not isinstance(self.status, Unset):
|
||||
status = self.status
|
||||
surface_area = self.surface_area
|
||||
|
@ -40,13 +40,16 @@ class FileVolume:
|
||||
created_at = self.created_at.isoformat()
|
||||
error = self.error
|
||||
id = self.id
|
||||
output_unit: Union[Unset, UnitVolume] = UNSET
|
||||
if not isinstance(self.output_unit, Unset):
|
||||
output_unit = self.output_unit
|
||||
src_format: Union[Unset, FileImportFormat] = UNSET
|
||||
if not isinstance(self.src_format, Unset):
|
||||
src_format = self.src_format
|
||||
started_at: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.started_at, Unset):
|
||||
started_at = self.started_at.isoformat()
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
if not isinstance(self.status, Unset):
|
||||
status = self.status
|
||||
updated_at: Union[Unset, str] = UNSET
|
||||
|
@ -17,6 +17,7 @@ class GetEntityType:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
entity_type: Union[Unset, EntityType] = UNSET
|
||||
if not isinstance(self.entity_type, Unset):
|
||||
entity_type = self.entity_type
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
|
||||
import attr
|
||||
|
||||
@ -19,10 +19,13 @@ class GetSketchModePlane:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
x_axis: Union[Unset, Point3d] = UNSET
|
||||
if not isinstance(self.x_axis, Unset):
|
||||
x_axis = self.x_axis
|
||||
y_axis: Union[Unset, Point3d] = UNSET
|
||||
if not isinstance(self.y_axis, Unset):
|
||||
y_axis = self.y_axis
|
||||
z_axis: Union[Unset, Point3d] = UNSET
|
||||
if not isinstance(self.z_axis, Unset):
|
||||
z_axis = self.z_axis
|
||||
|
||||
@ -30,11 +33,14 @@ class GetSketchModePlane:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if x_axis is not UNSET:
|
||||
field_dict["x_axis"] = x_axis.to_dict()
|
||||
_x_axis: Point3d = cast(Point3d, x_axis)
|
||||
field_dict["x_axis"] = _x_axis.to_dict()
|
||||
if y_axis is not UNSET:
|
||||
field_dict["y_axis"] = y_axis.to_dict()
|
||||
_y_axis: Point3d = cast(Point3d, y_axis)
|
||||
field_dict["y_axis"] = _y_axis.to_dict()
|
||||
if z_axis is not UNSET:
|
||||
field_dict["z_axis"] = z_axis.to_dict()
|
||||
_z_axis: Point3d = cast(Point3d, z_axis)
|
||||
field_dict["z_axis"] = _z_axis.to_dict()
|
||||
|
||||
return field_dict
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
|
||||
import attr
|
||||
|
||||
@ -120,9 +120,11 @@ class obj:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
coords: Union[Unset, System] = UNSET
|
||||
if not isinstance(self.coords, Unset):
|
||||
coords = self.coords
|
||||
type = self.type
|
||||
units: Union[Unset, UnitLength] = UNSET
|
||||
if not isinstance(self.units, Unset):
|
||||
units = self.units
|
||||
|
||||
@ -130,7 +132,8 @@ class obj:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if coords is not UNSET:
|
||||
field_dict["coords"] = coords.to_dict()
|
||||
_coords: System = cast(System, coords)
|
||||
field_dict["coords"] = _coords.to_dict()
|
||||
field_dict["type"] = type
|
||||
if units is not UNSET:
|
||||
field_dict["units"] = units
|
||||
@ -200,9 +203,11 @@ class ply:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
coords: Union[Unset, System] = UNSET
|
||||
if not isinstance(self.coords, Unset):
|
||||
coords = self.coords
|
||||
type = self.type
|
||||
units: Union[Unset, UnitLength] = UNSET
|
||||
if not isinstance(self.units, Unset):
|
||||
units = self.units
|
||||
|
||||
@ -210,7 +215,8 @@ class ply:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if coords is not UNSET:
|
||||
field_dict["coords"] = coords.to_dict()
|
||||
_coords: System = cast(System, coords)
|
||||
field_dict["coords"] = _coords.to_dict()
|
||||
field_dict["type"] = type
|
||||
if units is not UNSET:
|
||||
field_dict["units"] = units
|
||||
@ -380,9 +386,11 @@ class stl:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
coords: Union[Unset, System] = UNSET
|
||||
if not isinstance(self.coords, Unset):
|
||||
coords = self.coords
|
||||
type = self.type
|
||||
units: Union[Unset, UnitLength] = UNSET
|
||||
if not isinstance(self.units, Unset):
|
||||
units = self.units
|
||||
|
||||
@ -390,7 +398,8 @@ class stl:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if coords is not UNSET:
|
||||
field_dict["coords"] = coords.to_dict()
|
||||
_coords: System = cast(System, coords)
|
||||
field_dict["coords"] = _coords.to_dict()
|
||||
field_dict["type"] = type
|
||||
if units is not UNSET:
|
||||
field_dict["units"] = units
|
||||
|
@ -56,6 +56,7 @@ class Invoice:
|
||||
created_at: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.created_at, Unset):
|
||||
created_at = self.created_at.isoformat()
|
||||
currency: Union[Unset, Currency] = UNSET
|
||||
if not isinstance(self.currency, Unset):
|
||||
currency = self.currency
|
||||
customer_email = self.customer_email
|
||||
@ -80,6 +81,7 @@ class Invoice:
|
||||
pdf = self.pdf
|
||||
receipt_number = self.receipt_number
|
||||
statement_descriptor = self.statement_descriptor
|
||||
status: Union[Unset, InvoiceStatus] = UNSET
|
||||
if not isinstance(self.status, Unset):
|
||||
status = self.status
|
||||
subtotal = self.subtotal
|
||||
|
@ -23,6 +23,7 @@ class InvoiceLineItem:
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
amount = self.amount
|
||||
currency: Union[Unset, Currency] = UNSET
|
||||
if not isinstance(self.currency, Unset):
|
||||
currency = self.currency
|
||||
description = self.description
|
||||
|
@ -1,4 +1,4 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
|
||||
import attr
|
||||
|
||||
@ -21,10 +21,13 @@ class Jetstream:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
config: Union[Unset, JetstreamConfig] = UNSET
|
||||
if not isinstance(self.config, Unset):
|
||||
config = self.config
|
||||
meta: Union[Unset, MetaClusterInfo] = UNSET
|
||||
if not isinstance(self.meta, Unset):
|
||||
meta = self.meta
|
||||
stats: Union[Unset, JetstreamStats] = UNSET
|
||||
if not isinstance(self.stats, Unset):
|
||||
stats = self.stats
|
||||
|
||||
@ -32,11 +35,14 @@ class Jetstream:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if config is not UNSET:
|
||||
field_dict["config"] = config.to_dict()
|
||||
_config: JetstreamConfig = cast(JetstreamConfig, config)
|
||||
field_dict["config"] = _config.to_dict()
|
||||
if meta is not UNSET:
|
||||
field_dict["meta"] = meta.to_dict()
|
||||
_meta: MetaClusterInfo = cast(MetaClusterInfo, meta)
|
||||
field_dict["meta"] = _meta.to_dict()
|
||||
if stats is not UNSET:
|
||||
field_dict["stats"] = stats.to_dict()
|
||||
_stats: JetstreamStats = cast(JetstreamStats, stats)
|
||||
field_dict["stats"] = _stats.to_dict()
|
||||
|
||||
return field_dict
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
|
||||
import attr
|
||||
|
||||
@ -24,6 +24,7 @@ class JetstreamStats:
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
accounts = self.accounts
|
||||
api: Union[Unset, JetstreamApiStats] = UNSET
|
||||
if not isinstance(self.api, Unset):
|
||||
api = self.api
|
||||
ha_assets = self.ha_assets
|
||||
@ -38,7 +39,8 @@ class JetstreamStats:
|
||||
if accounts is not UNSET:
|
||||
field_dict["accounts"] = accounts
|
||||
if api is not UNSET:
|
||||
field_dict["api"] = api.to_dict()
|
||||
_api: JetstreamApiStats = cast(JetstreamApiStats, api)
|
||||
field_dict["api"] = _api.to_dict()
|
||||
if ha_assets is not UNSET:
|
||||
field_dict["ha_assets"] = ha_assets
|
||||
if memory is not UNSET:
|
||||
|
@ -19,6 +19,7 @@ class Mass:
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
mass = self.mass
|
||||
output_unit: Union[Unset, UnitMass] = UNSET
|
||||
if not isinstance(self.output_unit, Unset):
|
||||
output_unit = self.output_unit
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
|
||||
import attr
|
||||
|
||||
@ -26,13 +26,17 @@ class Metadata:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
cache: Union[Unset, CacheMetadata] = UNSET
|
||||
if not isinstance(self.cache, Unset):
|
||||
cache = self.cache
|
||||
environment: Union[Unset, Environment] = UNSET
|
||||
if not isinstance(self.environment, Unset):
|
||||
environment = self.environment
|
||||
fs: Union[Unset, FileSystemMetadata] = UNSET
|
||||
if not isinstance(self.fs, Unset):
|
||||
fs = self.fs
|
||||
git_hash = self.git_hash
|
||||
pubsub: Union[Unset, Connection] = UNSET
|
||||
if not isinstance(self.pubsub, Unset):
|
||||
pubsub = self.pubsub
|
||||
|
||||
@ -40,15 +44,18 @@ class Metadata:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if cache is not UNSET:
|
||||
field_dict["cache"] = cache.to_dict()
|
||||
_cache: CacheMetadata = cast(CacheMetadata, cache)
|
||||
field_dict["cache"] = _cache.to_dict()
|
||||
if environment is not UNSET:
|
||||
field_dict["environment"] = environment
|
||||
if fs is not UNSET:
|
||||
field_dict["fs"] = fs.to_dict()
|
||||
_fs: FileSystemMetadata = cast(FileSystemMetadata, fs)
|
||||
field_dict["fs"] = _fs.to_dict()
|
||||
if git_hash is not UNSET:
|
||||
field_dict["git_hash"] = git_hash
|
||||
if pubsub is not UNSET:
|
||||
field_dict["pubsub"] = pubsub.to_dict()
|
||||
_pubsub: Connection = cast(Connection, pubsub)
|
||||
field_dict["pubsub"] = _pubsub.to_dict()
|
||||
|
||||
return field_dict
|
||||
|
||||
|
@ -88,8 +88,10 @@ class move_path_pen:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
path: Union[Unset, ModelingCmdId] = UNSET
|
||||
if not isinstance(self.path, Unset):
|
||||
path = self.path
|
||||
to: Union[Unset, Point3d] = UNSET
|
||||
if not isinstance(self.to, Unset):
|
||||
to = self.to
|
||||
type = self.type
|
||||
@ -100,7 +102,8 @@ class move_path_pen:
|
||||
if path is not UNSET:
|
||||
field_dict["path"] = path
|
||||
if to is not UNSET:
|
||||
field_dict["to"] = to.to_dict()
|
||||
_to: Point3d = cast(Point3d, to)
|
||||
field_dict["to"] = _to.to_dict()
|
||||
field_dict["type"] = type
|
||||
|
||||
return field_dict
|
||||
@ -168,8 +171,10 @@ class extend_path:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
path: Union[Unset, ModelingCmdId] = UNSET
|
||||
if not isinstance(self.path, Unset):
|
||||
path = self.path
|
||||
segment: Union[Unset, PathSegment] = UNSET
|
||||
if not isinstance(self.segment, Unset):
|
||||
segment = self.segment
|
||||
type = self.type
|
||||
@ -180,7 +185,8 @@ class extend_path:
|
||||
if path is not UNSET:
|
||||
field_dict["path"] = path
|
||||
if segment is not UNSET:
|
||||
field_dict["segment"] = segment.to_dict()
|
||||
_segment: PathSegment = cast(PathSegment, segment)
|
||||
field_dict["segment"] = _segment.to_dict()
|
||||
field_dict["type"] = type
|
||||
|
||||
return field_dict
|
||||
@ -251,6 +257,7 @@ class extrude:
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
cap = self.cap
|
||||
distance = self.distance
|
||||
target: Union[Unset, ModelingCmdId] = UNSET
|
||||
if not isinstance(self.target, Unset):
|
||||
target = self.target
|
||||
type = self.type
|
||||
@ -384,9 +391,11 @@ class camera_drag_start:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
interaction: Union[Unset, CameraDragInteractionType] = UNSET
|
||||
if not isinstance(self.interaction, Unset):
|
||||
interaction = self.interaction
|
||||
type = self.type
|
||||
window: Union[Unset, Point2d] = UNSET
|
||||
if not isinstance(self.window, Unset):
|
||||
window = self.window
|
||||
|
||||
@ -397,7 +406,8 @@ class camera_drag_start:
|
||||
field_dict["interaction"] = interaction
|
||||
field_dict["type"] = type
|
||||
if window is not UNSET:
|
||||
field_dict["window"] = window.to_dict()
|
||||
_window: Point2d = cast(Point2d, window)
|
||||
field_dict["window"] = _window.to_dict()
|
||||
|
||||
return field_dict
|
||||
|
||||
@ -465,10 +475,12 @@ class camera_drag_move:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
interaction: Union[Unset, CameraDragInteractionType] = UNSET
|
||||
if not isinstance(self.interaction, Unset):
|
||||
interaction = self.interaction
|
||||
sequence = self.sequence
|
||||
type = self.type
|
||||
window: Union[Unset, Point2d] = UNSET
|
||||
if not isinstance(self.window, Unset):
|
||||
window = self.window
|
||||
|
||||
@ -481,7 +493,8 @@ class camera_drag_move:
|
||||
field_dict["sequence"] = sequence
|
||||
field_dict["type"] = type
|
||||
if window is not UNSET:
|
||||
field_dict["window"] = window.to_dict()
|
||||
_window: Point2d = cast(Point2d, window)
|
||||
field_dict["window"] = _window.to_dict()
|
||||
|
||||
return field_dict
|
||||
|
||||
@ -551,9 +564,11 @@ class camera_drag_end:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
interaction: Union[Unset, CameraDragInteractionType] = UNSET
|
||||
if not isinstance(self.interaction, Unset):
|
||||
interaction = self.interaction
|
||||
type = self.type
|
||||
window: Union[Unset, Point2d] = UNSET
|
||||
if not isinstance(self.window, Unset):
|
||||
window = self.window
|
||||
|
||||
@ -564,7 +579,8 @@ class camera_drag_end:
|
||||
field_dict["interaction"] = interaction
|
||||
field_dict["type"] = type
|
||||
if window is not UNSET:
|
||||
field_dict["window"] = window.to_dict()
|
||||
_window: Point2d = cast(Point2d, window)
|
||||
field_dict["window"] = _window.to_dict()
|
||||
|
||||
return field_dict
|
||||
|
||||
@ -632,11 +648,14 @@ class default_camera_look_at:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
center: Union[Unset, Point3d] = UNSET
|
||||
if not isinstance(self.center, Unset):
|
||||
center = self.center
|
||||
type = self.type
|
||||
up: Union[Unset, Point3d] = UNSET
|
||||
if not isinstance(self.up, Unset):
|
||||
up = self.up
|
||||
vantage: Union[Unset, Point3d] = UNSET
|
||||
if not isinstance(self.vantage, Unset):
|
||||
vantage = self.vantage
|
||||
|
||||
@ -644,12 +663,15 @@ class default_camera_look_at:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if center is not UNSET:
|
||||
field_dict["center"] = center.to_dict()
|
||||
_center: Point3d = cast(Point3d, center)
|
||||
field_dict["center"] = _center.to_dict()
|
||||
field_dict["type"] = type
|
||||
if up is not UNSET:
|
||||
field_dict["up"] = up.to_dict()
|
||||
_up: Point3d = cast(Point3d, up)
|
||||
field_dict["up"] = _up.to_dict()
|
||||
if vantage is not UNSET:
|
||||
field_dict["vantage"] = vantage.to_dict()
|
||||
_vantage: Point3d = cast(Point3d, vantage)
|
||||
field_dict["vantage"] = _vantage.to_dict()
|
||||
|
||||
return field_dict
|
||||
|
||||
@ -789,12 +811,15 @@ class default_camera_enable_sketch_mode:
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
animated = self.animated
|
||||
distance_to_plane = self.distance_to_plane
|
||||
origin: Union[Unset, Point3d] = UNSET
|
||||
if not isinstance(self.origin, Unset):
|
||||
origin = self.origin
|
||||
ortho = self.ortho
|
||||
type = self.type
|
||||
x_axis: Union[Unset, Point3d] = UNSET
|
||||
if not isinstance(self.x_axis, Unset):
|
||||
x_axis = self.x_axis
|
||||
y_axis: Union[Unset, Point3d] = UNSET
|
||||
if not isinstance(self.y_axis, Unset):
|
||||
y_axis = self.y_axis
|
||||
|
||||
@ -806,14 +831,17 @@ class default_camera_enable_sketch_mode:
|
||||
if distance_to_plane is not UNSET:
|
||||
field_dict["distance_to_plane"] = distance_to_plane
|
||||
if origin is not UNSET:
|
||||
field_dict["origin"] = origin.to_dict()
|
||||
_origin: Point3d = cast(Point3d, origin)
|
||||
field_dict["origin"] = _origin.to_dict()
|
||||
if ortho is not UNSET:
|
||||
field_dict["ortho"] = ortho
|
||||
field_dict["type"] = type
|
||||
if x_axis is not UNSET:
|
||||
field_dict["x_axis"] = x_axis.to_dict()
|
||||
_x_axis: Point3d = cast(Point3d, x_axis)
|
||||
field_dict["x_axis"] = _x_axis.to_dict()
|
||||
if y_axis is not UNSET:
|
||||
field_dict["y_axis"] = y_axis.to_dict()
|
||||
_y_axis: Point3d = cast(Point3d, y_axis)
|
||||
field_dict["y_axis"] = _y_axis.to_dict()
|
||||
|
||||
return field_dict
|
||||
|
||||
@ -1010,8 +1038,10 @@ class export:
|
||||
entity_ids: Union[Unset, List[str]] = UNSET
|
||||
if not isinstance(self.entity_ids, Unset):
|
||||
entity_ids = self.entity_ids
|
||||
format: Union[Unset, OutputFormat] = UNSET
|
||||
if not isinstance(self.format, Unset):
|
||||
format = self.format
|
||||
source_unit: Union[Unset, UnitLength] = UNSET
|
||||
if not isinstance(self.source_unit, Unset):
|
||||
source_unit = self.source_unit
|
||||
type = self.type
|
||||
@ -1022,7 +1052,8 @@ class export:
|
||||
if entity_ids is not UNSET:
|
||||
field_dict["entity_ids"] = entity_ids
|
||||
if format is not UNSET:
|
||||
field_dict["format"] = format.to_dict()
|
||||
_format: OutputFormat = cast(OutputFormat, format)
|
||||
field_dict["format"] = _format.to_dict()
|
||||
if source_unit is not UNSET:
|
||||
field_dict["source_unit"] = source_unit
|
||||
field_dict["type"] = type
|
||||
@ -1437,8 +1468,10 @@ class select_with_point:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
selected_at_window: Union[Unset, Point2d] = UNSET
|
||||
if not isinstance(self.selected_at_window, Unset):
|
||||
selected_at_window = self.selected_at_window
|
||||
selection_type: Union[Unset, SceneSelectionType] = UNSET
|
||||
if not isinstance(self.selection_type, Unset):
|
||||
selection_type = self.selection_type
|
||||
type = self.type
|
||||
@ -1447,7 +1480,8 @@ class select_with_point:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if selected_at_window is not UNSET:
|
||||
field_dict["selected_at_window"] = selected_at_window.to_dict()
|
||||
_selected_at_window: Point2d = cast(Point2d, selected_at_window)
|
||||
field_dict["selected_at_window"] = _selected_at_window.to_dict()
|
||||
if selection_type is not UNSET:
|
||||
field_dict["selection_type"] = selection_type
|
||||
field_dict["type"] = type
|
||||
@ -1794,6 +1828,7 @@ class highlight_set_entity:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
selected_at_window: Union[Unset, Point2d] = UNSET
|
||||
if not isinstance(self.selected_at_window, Unset):
|
||||
selected_at_window = self.selected_at_window
|
||||
sequence = self.sequence
|
||||
@ -1803,7 +1838,8 @@ class highlight_set_entity:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if selected_at_window is not UNSET:
|
||||
field_dict["selected_at_window"] = selected_at_window.to_dict()
|
||||
_selected_at_window: Point2d = cast(Point2d, selected_at_window)
|
||||
field_dict["selected_at_window"] = _selected_at_window.to_dict()
|
||||
if sequence is not UNSET:
|
||||
field_dict["sequence"] = sequence
|
||||
field_dict["type"] = type
|
||||
@ -1926,9 +1962,11 @@ class new_annotation:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
annotation_type: Union[Unset, AnnotationType] = UNSET
|
||||
if not isinstance(self.annotation_type, Unset):
|
||||
annotation_type = self.annotation_type
|
||||
clobber = self.clobber
|
||||
options: Union[Unset, AnnotationOptions] = UNSET
|
||||
if not isinstance(self.options, Unset):
|
||||
options = self.options
|
||||
type = self.type
|
||||
@ -1941,7 +1979,8 @@ class new_annotation:
|
||||
if clobber is not UNSET:
|
||||
field_dict["clobber"] = clobber
|
||||
if options is not UNSET:
|
||||
field_dict["options"] = options.to_dict()
|
||||
_options: AnnotationOptions = cast(AnnotationOptions, options)
|
||||
field_dict["options"] = _options.to_dict()
|
||||
field_dict["type"] = type
|
||||
|
||||
return field_dict
|
||||
@ -2013,6 +2052,7 @@ class update_annotation:
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
annotation_id = self.annotation_id
|
||||
options: Union[Unset, AnnotationOptions] = UNSET
|
||||
if not isinstance(self.options, Unset):
|
||||
options = self.options
|
||||
type = self.type
|
||||
@ -2023,7 +2063,8 @@ class update_annotation:
|
||||
if annotation_id is not UNSET:
|
||||
field_dict["annotation_id"] = annotation_id
|
||||
if options is not UNSET:
|
||||
field_dict["options"] = options.to_dict()
|
||||
_options: AnnotationOptions = cast(AnnotationOptions, options)
|
||||
field_dict["options"] = _options.to_dict()
|
||||
field_dict["type"] = type
|
||||
|
||||
return field_dict
|
||||
@ -2391,6 +2432,7 @@ class solid3d_get_all_opposite_edges:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
along_vector: Union[Unset, Point3d] = UNSET
|
||||
if not isinstance(self.along_vector, Unset):
|
||||
along_vector = self.along_vector
|
||||
edge_id = self.edge_id
|
||||
@ -2401,7 +2443,8 @@ class solid3d_get_all_opposite_edges:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if along_vector is not UNSET:
|
||||
field_dict["along_vector"] = along_vector.to_dict()
|
||||
_along_vector: Point3d = cast(Point3d, along_vector)
|
||||
field_dict["along_vector"] = _along_vector.to_dict()
|
||||
if edge_id is not UNSET:
|
||||
field_dict["edge_id"] = edge_id
|
||||
if object_id is not UNSET:
|
||||
@ -2887,12 +2930,15 @@ class make_plane:
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
clobber = self.clobber
|
||||
hide = self.hide
|
||||
origin: Union[Unset, Point3d] = UNSET
|
||||
if not isinstance(self.origin, Unset):
|
||||
origin = self.origin
|
||||
size = self.size
|
||||
type = self.type
|
||||
x_axis: Union[Unset, Point3d] = UNSET
|
||||
if not isinstance(self.x_axis, Unset):
|
||||
x_axis = self.x_axis
|
||||
y_axis: Union[Unset, Point3d] = UNSET
|
||||
if not isinstance(self.y_axis, Unset):
|
||||
y_axis = self.y_axis
|
||||
|
||||
@ -2904,14 +2950,17 @@ class make_plane:
|
||||
if hide is not UNSET:
|
||||
field_dict["hide"] = hide
|
||||
if origin is not UNSET:
|
||||
field_dict["origin"] = origin.to_dict()
|
||||
_origin: Point3d = cast(Point3d, origin)
|
||||
field_dict["origin"] = _origin.to_dict()
|
||||
if size is not UNSET:
|
||||
field_dict["size"] = size
|
||||
field_dict["type"] = type
|
||||
if x_axis is not UNSET:
|
||||
field_dict["x_axis"] = x_axis.to_dict()
|
||||
_x_axis: Point3d = cast(Point3d, x_axis)
|
||||
field_dict["x_axis"] = _x_axis.to_dict()
|
||||
if y_axis is not UNSET:
|
||||
field_dict["y_axis"] = y_axis.to_dict()
|
||||
_y_axis: Point3d = cast(Point3d, y_axis)
|
||||
field_dict["y_axis"] = _y_axis.to_dict()
|
||||
|
||||
return field_dict
|
||||
|
||||
@ -2997,6 +3046,7 @@ class plane_set_color:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
color: Union[Unset, Color] = UNSET
|
||||
if not isinstance(self.color, Unset):
|
||||
color = self.color
|
||||
plane_id = self.plane_id
|
||||
@ -3006,7 +3056,8 @@ class plane_set_color:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if color is not UNSET:
|
||||
field_dict["color"] = color.to_dict()
|
||||
_color: Color = cast(Color, color)
|
||||
field_dict["color"] = _color.to_dict()
|
||||
if plane_id is not UNSET:
|
||||
field_dict["plane_id"] = plane_id
|
||||
field_dict["type"] = type
|
||||
@ -3068,6 +3119,7 @@ class set_tool:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
tool: Union[Unset, SceneToolType] = UNSET
|
||||
if not isinstance(self.tool, Unset):
|
||||
tool = self.tool
|
||||
type = self.type
|
||||
@ -3136,6 +3188,7 @@ class mouse_move:
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
sequence = self.sequence
|
||||
type = self.type
|
||||
window: Union[Unset, Point2d] = UNSET
|
||||
if not isinstance(self.window, Unset):
|
||||
window = self.window
|
||||
|
||||
@ -3146,7 +3199,8 @@ class mouse_move:
|
||||
field_dict["sequence"] = sequence
|
||||
field_dict["type"] = type
|
||||
if window is not UNSET:
|
||||
field_dict["window"] = window.to_dict()
|
||||
_window: Point2d = cast(Point2d, window)
|
||||
field_dict["window"] = _window.to_dict()
|
||||
|
||||
return field_dict
|
||||
|
||||
@ -3206,6 +3260,7 @@ class mouse_click:
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
type = self.type
|
||||
window: Union[Unset, Point2d] = UNSET
|
||||
if not isinstance(self.window, Unset):
|
||||
window = self.window
|
||||
|
||||
@ -3214,7 +3269,8 @@ class mouse_click:
|
||||
field_dict.update({})
|
||||
field_dict["type"] = type
|
||||
if window is not UNSET:
|
||||
field_dict["window"] = window.to_dict()
|
||||
_window: Point2d = cast(Point2d, window)
|
||||
field_dict["window"] = _window.to_dict()
|
||||
|
||||
return field_dict
|
||||
|
||||
@ -3274,6 +3330,7 @@ class sketch_mode_enable:
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
animated = self.animated
|
||||
disable_camera_with_plane: Union[Unset, Point3d] = UNSET
|
||||
if not isinstance(self.disable_camera_with_plane, Unset):
|
||||
disable_camera_with_plane = self.disable_camera_with_plane
|
||||
ortho = self.ortho
|
||||
@ -3286,9 +3343,12 @@ class sketch_mode_enable:
|
||||
if animated is not UNSET:
|
||||
field_dict["animated"] = animated
|
||||
if disable_camera_with_plane is not UNSET:
|
||||
_disable_camera_with_plane: Point3d = cast(
|
||||
Point3d, disable_camera_with_plane
|
||||
)
|
||||
field_dict[
|
||||
"disable_camera_with_plane"
|
||||
] = disable_camera_with_plane.to_dict()
|
||||
] = _disable_camera_with_plane.to_dict()
|
||||
if ortho is not UNSET:
|
||||
field_dict["ortho"] = ortho
|
||||
if plane_id is not UNSET:
|
||||
@ -3522,6 +3582,7 @@ class take_snapshot:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
format: Union[Unset, ImageFormat] = UNSET
|
||||
if not isinstance(self.format, Unset):
|
||||
format = self.format
|
||||
type = self.type
|
||||
@ -3832,6 +3893,7 @@ class handle_mouse_drag_start:
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
type = self.type
|
||||
window: Union[Unset, Point2d] = UNSET
|
||||
if not isinstance(self.window, Unset):
|
||||
window = self.window
|
||||
|
||||
@ -3840,7 +3902,8 @@ class handle_mouse_drag_start:
|
||||
field_dict.update({})
|
||||
field_dict["type"] = type
|
||||
if window is not UNSET:
|
||||
field_dict["window"] = window.to_dict()
|
||||
_window: Point2d = cast(Point2d, window)
|
||||
field_dict["window"] = _window.to_dict()
|
||||
|
||||
return field_dict
|
||||
|
||||
@ -3899,6 +3962,7 @@ class handle_mouse_drag_move:
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
sequence = self.sequence
|
||||
type = self.type
|
||||
window: Union[Unset, Point2d] = UNSET
|
||||
if not isinstance(self.window, Unset):
|
||||
window = self.window
|
||||
|
||||
@ -3909,7 +3973,8 @@ class handle_mouse_drag_move:
|
||||
field_dict["sequence"] = sequence
|
||||
field_dict["type"] = type
|
||||
if window is not UNSET:
|
||||
field_dict["window"] = window.to_dict()
|
||||
_window: Point2d = cast(Point2d, window)
|
||||
field_dict["window"] = _window.to_dict()
|
||||
|
||||
return field_dict
|
||||
|
||||
@ -3969,6 +4034,7 @@ class handle_mouse_drag_end:
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
type = self.type
|
||||
window: Union[Unset, Point2d] = UNSET
|
||||
if not isinstance(self.window, Unset):
|
||||
window = self.window
|
||||
|
||||
@ -3977,7 +4043,8 @@ class handle_mouse_drag_end:
|
||||
field_dict.update({})
|
||||
field_dict["type"] = type
|
||||
if window is not UNSET:
|
||||
field_dict["window"] = window.to_dict()
|
||||
_window: Point2d = cast(Point2d, window)
|
||||
field_dict["window"] = _window.to_dict()
|
||||
|
||||
return field_dict
|
||||
|
||||
@ -4095,6 +4162,7 @@ class plane_intersect_and_project:
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
plane_id = self.plane_id
|
||||
type = self.type
|
||||
window: Union[Unset, Point2d] = UNSET
|
||||
if not isinstance(self.window, Unset):
|
||||
window = self.window
|
||||
|
||||
@ -4105,7 +4173,8 @@ class plane_intersect_and_project:
|
||||
field_dict["plane_id"] = plane_id
|
||||
field_dict["type"] = type
|
||||
if window is not UNSET:
|
||||
field_dict["window"] = window.to_dict()
|
||||
_window: Point2d = cast(Point2d, window)
|
||||
field_dict["window"] = _window.to_dict()
|
||||
|
||||
return field_dict
|
||||
|
||||
@ -4300,6 +4369,7 @@ class import_files:
|
||||
files: Union[Unset, List[ImportFile]] = UNSET
|
||||
if not isinstance(self.files, Unset):
|
||||
files = self.files
|
||||
format: Union[Unset, InputFormat] = UNSET
|
||||
if not isinstance(self.format, Unset):
|
||||
format = self.format
|
||||
type = self.type
|
||||
@ -4310,7 +4380,8 @@ class import_files:
|
||||
if files is not UNSET:
|
||||
field_dict["files"] = files
|
||||
if format is not UNSET:
|
||||
field_dict["format"] = format.to_dict()
|
||||
_format: InputFormat = cast(InputFormat, format)
|
||||
field_dict["format"] = _format.to_dict()
|
||||
field_dict["type"] = type
|
||||
|
||||
return field_dict
|
||||
@ -4380,10 +4451,13 @@ class mass:
|
||||
if not isinstance(self.entity_ids, Unset):
|
||||
entity_ids = self.entity_ids
|
||||
material_density = self.material_density
|
||||
material_density_unit: Union[Unset, UnitDensity] = UNSET
|
||||
if not isinstance(self.material_density_unit, Unset):
|
||||
material_density_unit = self.material_density_unit
|
||||
output_unit: Union[Unset, UnitMass] = UNSET
|
||||
if not isinstance(self.output_unit, Unset):
|
||||
output_unit = self.output_unit
|
||||
source_unit: Union[Unset, UnitLength] = UNSET
|
||||
if not isinstance(self.source_unit, Unset):
|
||||
source_unit = self.source_unit
|
||||
type = self.type
|
||||
@ -4491,10 +4565,13 @@ class density:
|
||||
if not isinstance(self.entity_ids, Unset):
|
||||
entity_ids = self.entity_ids
|
||||
material_mass = self.material_mass
|
||||
material_mass_unit: Union[Unset, UnitMass] = UNSET
|
||||
if not isinstance(self.material_mass_unit, Unset):
|
||||
material_mass_unit = self.material_mass_unit
|
||||
output_unit: Union[Unset, UnitDensity] = UNSET
|
||||
if not isinstance(self.output_unit, Unset):
|
||||
output_unit = self.output_unit
|
||||
source_unit: Union[Unset, UnitLength] = UNSET
|
||||
if not isinstance(self.source_unit, Unset):
|
||||
source_unit = self.source_unit
|
||||
type = self.type
|
||||
@ -4599,8 +4676,10 @@ class volume:
|
||||
entity_ids: Union[Unset, List[str]] = UNSET
|
||||
if not isinstance(self.entity_ids, Unset):
|
||||
entity_ids = self.entity_ids
|
||||
output_unit: Union[Unset, UnitVolume] = UNSET
|
||||
if not isinstance(self.output_unit, Unset):
|
||||
output_unit = self.output_unit
|
||||
source_unit: Union[Unset, UnitLength] = UNSET
|
||||
if not isinstance(self.source_unit, Unset):
|
||||
source_unit = self.source_unit
|
||||
type = self.type
|
||||
@ -4688,8 +4767,10 @@ class center_of_mass:
|
||||
entity_ids: Union[Unset, List[str]] = UNSET
|
||||
if not isinstance(self.entity_ids, Unset):
|
||||
entity_ids = self.entity_ids
|
||||
output_unit: Union[Unset, UnitLength] = UNSET
|
||||
if not isinstance(self.output_unit, Unset):
|
||||
output_unit = self.output_unit
|
||||
source_unit: Union[Unset, UnitLength] = UNSET
|
||||
if not isinstance(self.source_unit, Unset):
|
||||
source_unit = self.source_unit
|
||||
type = self.type
|
||||
@ -4777,8 +4858,10 @@ class surface_area:
|
||||
entity_ids: Union[Unset, List[str]] = UNSET
|
||||
if not isinstance(self.entity_ids, Unset):
|
||||
entity_ids = self.entity_ids
|
||||
output_unit: Union[Unset, UnitArea] = UNSET
|
||||
if not isinstance(self.output_unit, Unset):
|
||||
output_unit = self.output_unit
|
||||
source_unit: Union[Unset, UnitLength] = UNSET
|
||||
if not isinstance(self.source_unit, Unset):
|
||||
source_unit = self.source_unit
|
||||
type = self.type
|
||||
@ -4913,8 +4996,10 @@ class curve_set_constraint:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
constraint_bound: Union[Unset, PathComponentConstraintBound] = UNSET
|
||||
if not isinstance(self.constraint_bound, Unset):
|
||||
constraint_bound = self.constraint_bound
|
||||
constraint_type: Union[Unset, PathComponentConstraintType] = UNSET
|
||||
if not isinstance(self.constraint_type, Unset):
|
||||
constraint_type = self.constraint_type
|
||||
object_id = self.object_id
|
||||
|
@ -1,4 +1,4 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
|
||||
import attr
|
||||
|
||||
@ -19,8 +19,10 @@ class ModelingCmdReq:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
cmd: Union[Unset, ModelingCmd] = UNSET
|
||||
if not isinstance(self.cmd, Unset):
|
||||
cmd = self.cmd
|
||||
cmd_id: Union[Unset, ModelingCmdId] = UNSET
|
||||
if not isinstance(self.cmd_id, Unset):
|
||||
cmd_id = self.cmd_id
|
||||
|
||||
@ -28,7 +30,8 @@ class ModelingCmdReq:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if cmd is not UNSET:
|
||||
field_dict["cmd"] = cmd.to_dict()
|
||||
_cmd: ModelingCmd = cast(ModelingCmd, cmd)
|
||||
field_dict["cmd"] = _cmd.to_dict()
|
||||
if cmd_id is not UNSET:
|
||||
field_dict["cmd_id"] = cmd_id
|
||||
|
||||
|
@ -25,6 +25,7 @@ class NewAddress:
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
city = self.city
|
||||
country: Union[Unset, CountryCode] = UNSET
|
||||
if not isinstance(self.country, Unset):
|
||||
country = self.country
|
||||
state = self.state
|
||||
|
@ -1,4 +1,4 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
|
||||
import attr
|
||||
|
||||
@ -97,6 +97,7 @@ class export:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
data: Union[Unset, Export] = UNSET
|
||||
if not isinstance(self.data, Unset):
|
||||
data = self.data
|
||||
type = self.type
|
||||
@ -105,7 +106,8 @@ class export:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if data is not UNSET:
|
||||
field_dict["data"] = data.to_dict()
|
||||
_data: Export = cast(Export, data)
|
||||
field_dict["data"] = _data.to_dict()
|
||||
field_dict["type"] = type
|
||||
|
||||
return field_dict
|
||||
@ -162,6 +164,7 @@ class select_with_point:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
data: Union[Unset, SelectWithPoint] = UNSET
|
||||
if not isinstance(self.data, Unset):
|
||||
data = self.data
|
||||
type = self.type
|
||||
@ -170,7 +173,8 @@ class select_with_point:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if data is not UNSET:
|
||||
field_dict["data"] = data.to_dict()
|
||||
_data: SelectWithPoint = cast(SelectWithPoint, data)
|
||||
field_dict["data"] = _data.to_dict()
|
||||
field_dict["type"] = type
|
||||
|
||||
return field_dict
|
||||
@ -227,6 +231,7 @@ class highlight_set_entity:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
data: Union[Unset, HighlightSetEntity] = UNSET
|
||||
if not isinstance(self.data, Unset):
|
||||
data = self.data
|
||||
type = self.type
|
||||
@ -235,7 +240,8 @@ class highlight_set_entity:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if data is not UNSET:
|
||||
field_dict["data"] = data.to_dict()
|
||||
_data: HighlightSetEntity = cast(HighlightSetEntity, data)
|
||||
field_dict["data"] = _data.to_dict()
|
||||
field_dict["type"] = type
|
||||
|
||||
return field_dict
|
||||
@ -292,6 +298,7 @@ class entity_get_child_uuid:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
data: Union[Unset, EntityGetChildUuid] = UNSET
|
||||
if not isinstance(self.data, Unset):
|
||||
data = self.data
|
||||
type = self.type
|
||||
@ -300,7 +307,8 @@ class entity_get_child_uuid:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if data is not UNSET:
|
||||
field_dict["data"] = data.to_dict()
|
||||
_data: EntityGetChildUuid = cast(EntityGetChildUuid, data)
|
||||
field_dict["data"] = _data.to_dict()
|
||||
field_dict["type"] = type
|
||||
|
||||
return field_dict
|
||||
@ -357,6 +365,7 @@ class entity_get_num_children:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
data: Union[Unset, EntityGetNumChildren] = UNSET
|
||||
if not isinstance(self.data, Unset):
|
||||
data = self.data
|
||||
type = self.type
|
||||
@ -365,7 +374,8 @@ class entity_get_num_children:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if data is not UNSET:
|
||||
field_dict["data"] = data.to_dict()
|
||||
_data: EntityGetNumChildren = cast(EntityGetNumChildren, data)
|
||||
field_dict["data"] = _data.to_dict()
|
||||
field_dict["type"] = type
|
||||
|
||||
return field_dict
|
||||
@ -422,6 +432,7 @@ class entity_get_parent_id:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
data: Union[Unset, EntityGetParentId] = UNSET
|
||||
if not isinstance(self.data, Unset):
|
||||
data = self.data
|
||||
type = self.type
|
||||
@ -430,7 +441,8 @@ class entity_get_parent_id:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if data is not UNSET:
|
||||
field_dict["data"] = data.to_dict()
|
||||
_data: EntityGetParentId = cast(EntityGetParentId, data)
|
||||
field_dict["data"] = _data.to_dict()
|
||||
field_dict["type"] = type
|
||||
|
||||
return field_dict
|
||||
@ -487,6 +499,7 @@ class entity_get_all_child_uuids:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
data: Union[Unset, EntityGetAllChildUuids] = UNSET
|
||||
if not isinstance(self.data, Unset):
|
||||
data = self.data
|
||||
type = self.type
|
||||
@ -495,7 +508,8 @@ class entity_get_all_child_uuids:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if data is not UNSET:
|
||||
field_dict["data"] = data.to_dict()
|
||||
_data: EntityGetAllChildUuids = cast(EntityGetAllChildUuids, data)
|
||||
field_dict["data"] = _data.to_dict()
|
||||
field_dict["type"] = type
|
||||
|
||||
return field_dict
|
||||
@ -552,6 +566,7 @@ class select_get:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
data: Union[Unset, SelectGet] = UNSET
|
||||
if not isinstance(self.data, Unset):
|
||||
data = self.data
|
||||
type = self.type
|
||||
@ -560,7 +575,8 @@ class select_get:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if data is not UNSET:
|
||||
field_dict["data"] = data.to_dict()
|
||||
_data: SelectGet = cast(SelectGet, data)
|
||||
field_dict["data"] = _data.to_dict()
|
||||
field_dict["type"] = type
|
||||
|
||||
return field_dict
|
||||
@ -617,6 +633,7 @@ class get_entity_type:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
data: Union[Unset, GetEntityType] = UNSET
|
||||
if not isinstance(self.data, Unset):
|
||||
data = self.data
|
||||
type = self.type
|
||||
@ -625,7 +642,8 @@ class get_entity_type:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if data is not UNSET:
|
||||
field_dict["data"] = data.to_dict()
|
||||
_data: GetEntityType = cast(GetEntityType, data)
|
||||
field_dict["data"] = _data.to_dict()
|
||||
field_dict["type"] = type
|
||||
|
||||
return field_dict
|
||||
@ -682,6 +700,7 @@ class solid3d_get_all_edge_faces:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
data: Union[Unset, Solid3dGetAllEdgeFaces] = UNSET
|
||||
if not isinstance(self.data, Unset):
|
||||
data = self.data
|
||||
type = self.type
|
||||
@ -690,7 +709,8 @@ class solid3d_get_all_edge_faces:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if data is not UNSET:
|
||||
field_dict["data"] = data.to_dict()
|
||||
_data: Solid3dGetAllEdgeFaces = cast(Solid3dGetAllEdgeFaces, data)
|
||||
field_dict["data"] = _data.to_dict()
|
||||
field_dict["type"] = type
|
||||
|
||||
return field_dict
|
||||
@ -747,6 +767,7 @@ class solid3d_get_all_opposite_edges:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
data: Union[Unset, Solid3dGetAllOppositeEdges] = UNSET
|
||||
if not isinstance(self.data, Unset):
|
||||
data = self.data
|
||||
type = self.type
|
||||
@ -755,7 +776,8 @@ class solid3d_get_all_opposite_edges:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if data is not UNSET:
|
||||
field_dict["data"] = data.to_dict()
|
||||
_data: Solid3dGetAllOppositeEdges = cast(Solid3dGetAllOppositeEdges, data)
|
||||
field_dict["data"] = _data.to_dict()
|
||||
field_dict["type"] = type
|
||||
|
||||
return field_dict
|
||||
@ -812,6 +834,7 @@ class solid3d_get_opposite_edge:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
data: Union[Unset, Solid3dGetOppositeEdge] = UNSET
|
||||
if not isinstance(self.data, Unset):
|
||||
data = self.data
|
||||
type = self.type
|
||||
@ -820,7 +843,8 @@ class solid3d_get_opposite_edge:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if data is not UNSET:
|
||||
field_dict["data"] = data.to_dict()
|
||||
_data: Solid3dGetOppositeEdge = cast(Solid3dGetOppositeEdge, data)
|
||||
field_dict["data"] = _data.to_dict()
|
||||
field_dict["type"] = type
|
||||
|
||||
return field_dict
|
||||
@ -877,6 +901,7 @@ class solid3d_get_prev_adjacent_edge:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
data: Union[Unset, Solid3dGetPrevAdjacentEdge] = UNSET
|
||||
if not isinstance(self.data, Unset):
|
||||
data = self.data
|
||||
type = self.type
|
||||
@ -885,7 +910,8 @@ class solid3d_get_prev_adjacent_edge:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if data is not UNSET:
|
||||
field_dict["data"] = data.to_dict()
|
||||
_data: Solid3dGetPrevAdjacentEdge = cast(Solid3dGetPrevAdjacentEdge, data)
|
||||
field_dict["data"] = _data.to_dict()
|
||||
field_dict["type"] = type
|
||||
|
||||
return field_dict
|
||||
@ -942,6 +968,7 @@ class solid3d_get_next_adjacent_edge:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
data: Union[Unset, Solid3dGetNextAdjacentEdge] = UNSET
|
||||
if not isinstance(self.data, Unset):
|
||||
data = self.data
|
||||
type = self.type
|
||||
@ -950,7 +977,8 @@ class solid3d_get_next_adjacent_edge:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if data is not UNSET:
|
||||
field_dict["data"] = data.to_dict()
|
||||
_data: Solid3dGetNextAdjacentEdge = cast(Solid3dGetNextAdjacentEdge, data)
|
||||
field_dict["data"] = _data.to_dict()
|
||||
field_dict["type"] = type
|
||||
|
||||
return field_dict
|
||||
@ -1007,6 +1035,7 @@ class mouse_click:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
data: Union[Unset, MouseClick] = UNSET
|
||||
if not isinstance(self.data, Unset):
|
||||
data = self.data
|
||||
type = self.type
|
||||
@ -1015,7 +1044,8 @@ class mouse_click:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if data is not UNSET:
|
||||
field_dict["data"] = data.to_dict()
|
||||
_data: MouseClick = cast(MouseClick, data)
|
||||
field_dict["data"] = _data.to_dict()
|
||||
field_dict["type"] = type
|
||||
|
||||
return field_dict
|
||||
@ -1072,6 +1102,7 @@ class curve_get_type:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
data: Union[Unset, CurveGetType] = UNSET
|
||||
if not isinstance(self.data, Unset):
|
||||
data = self.data
|
||||
type = self.type
|
||||
@ -1080,7 +1111,8 @@ class curve_get_type:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if data is not UNSET:
|
||||
field_dict["data"] = data.to_dict()
|
||||
_data: CurveGetType = cast(CurveGetType, data)
|
||||
field_dict["data"] = _data.to_dict()
|
||||
field_dict["type"] = type
|
||||
|
||||
return field_dict
|
||||
@ -1137,6 +1169,7 @@ class curve_get_control_points:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
data: Union[Unset, CurveGetControlPoints] = UNSET
|
||||
if not isinstance(self.data, Unset):
|
||||
data = self.data
|
||||
type = self.type
|
||||
@ -1145,7 +1178,8 @@ class curve_get_control_points:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if data is not UNSET:
|
||||
field_dict["data"] = data.to_dict()
|
||||
_data: CurveGetControlPoints = cast(CurveGetControlPoints, data)
|
||||
field_dict["data"] = _data.to_dict()
|
||||
field_dict["type"] = type
|
||||
|
||||
return field_dict
|
||||
@ -1202,6 +1236,7 @@ class take_snapshot:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
data: Union[Unset, TakeSnapshot] = UNSET
|
||||
if not isinstance(self.data, Unset):
|
||||
data = self.data
|
||||
type = self.type
|
||||
@ -1210,7 +1245,8 @@ class take_snapshot:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if data is not UNSET:
|
||||
field_dict["data"] = data.to_dict()
|
||||
_data: TakeSnapshot = cast(TakeSnapshot, data)
|
||||
field_dict["data"] = _data.to_dict()
|
||||
field_dict["type"] = type
|
||||
|
||||
return field_dict
|
||||
@ -1267,6 +1303,7 @@ class path_get_info:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
data: Union[Unset, PathGetInfo] = UNSET
|
||||
if not isinstance(self.data, Unset):
|
||||
data = self.data
|
||||
type = self.type
|
||||
@ -1275,7 +1312,8 @@ class path_get_info:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if data is not UNSET:
|
||||
field_dict["data"] = data.to_dict()
|
||||
_data: PathGetInfo = cast(PathGetInfo, data)
|
||||
field_dict["data"] = _data.to_dict()
|
||||
field_dict["type"] = type
|
||||
|
||||
return field_dict
|
||||
@ -1332,6 +1370,7 @@ class path_get_curve_uuids_for_vertices:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
data: Union[Unset, PathGetCurveUuidsForVertices] = UNSET
|
||||
if not isinstance(self.data, Unset):
|
||||
data = self.data
|
||||
type = self.type
|
||||
@ -1340,7 +1379,10 @@ class path_get_curve_uuids_for_vertices:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if data is not UNSET:
|
||||
field_dict["data"] = data.to_dict()
|
||||
_data: PathGetCurveUuidsForVertices = cast(
|
||||
PathGetCurveUuidsForVertices, data
|
||||
)
|
||||
field_dict["data"] = _data.to_dict()
|
||||
field_dict["type"] = type
|
||||
|
||||
return field_dict
|
||||
@ -1397,6 +1439,7 @@ class path_get_vertex_uuids:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
data: Union[Unset, PathGetVertexUuids] = UNSET
|
||||
if not isinstance(self.data, Unset):
|
||||
data = self.data
|
||||
type = self.type
|
||||
@ -1405,7 +1448,8 @@ class path_get_vertex_uuids:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if data is not UNSET:
|
||||
field_dict["data"] = data.to_dict()
|
||||
_data: PathGetVertexUuids = cast(PathGetVertexUuids, data)
|
||||
field_dict["data"] = _data.to_dict()
|
||||
field_dict["type"] = type
|
||||
|
||||
return field_dict
|
||||
@ -1462,6 +1506,7 @@ class plane_intersect_and_project:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
data: Union[Unset, PlaneIntersectAndProject] = UNSET
|
||||
if not isinstance(self.data, Unset):
|
||||
data = self.data
|
||||
type = self.type
|
||||
@ -1470,7 +1515,8 @@ class plane_intersect_and_project:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if data is not UNSET:
|
||||
field_dict["data"] = data.to_dict()
|
||||
_data: PlaneIntersectAndProject = cast(PlaneIntersectAndProject, data)
|
||||
field_dict["data"] = _data.to_dict()
|
||||
field_dict["type"] = type
|
||||
|
||||
return field_dict
|
||||
@ -1527,6 +1573,7 @@ class curve_get_end_points:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
data: Union[Unset, CurveGetEndPoints] = UNSET
|
||||
if not isinstance(self.data, Unset):
|
||||
data = self.data
|
||||
type = self.type
|
||||
@ -1535,7 +1582,8 @@ class curve_get_end_points:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if data is not UNSET:
|
||||
field_dict["data"] = data.to_dict()
|
||||
_data: CurveGetEndPoints = cast(CurveGetEndPoints, data)
|
||||
field_dict["data"] = _data.to_dict()
|
||||
field_dict["type"] = type
|
||||
|
||||
return field_dict
|
||||
@ -1592,6 +1640,7 @@ class import_files:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
data: Union[Unset, ImportFiles] = UNSET
|
||||
if not isinstance(self.data, Unset):
|
||||
data = self.data
|
||||
type = self.type
|
||||
@ -1600,7 +1649,8 @@ class import_files:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if data is not UNSET:
|
||||
field_dict["data"] = data.to_dict()
|
||||
_data: ImportFiles = cast(ImportFiles, data)
|
||||
field_dict["data"] = _data.to_dict()
|
||||
field_dict["type"] = type
|
||||
|
||||
return field_dict
|
||||
@ -1657,6 +1707,7 @@ class mass:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
data: Union[Unset, Mass] = UNSET
|
||||
if not isinstance(self.data, Unset):
|
||||
data = self.data
|
||||
type = self.type
|
||||
@ -1665,7 +1716,8 @@ class mass:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if data is not UNSET:
|
||||
field_dict["data"] = data.to_dict()
|
||||
_data: Mass = cast(Mass, data)
|
||||
field_dict["data"] = _data.to_dict()
|
||||
field_dict["type"] = type
|
||||
|
||||
return field_dict
|
||||
@ -1722,6 +1774,7 @@ class volume:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
data: Union[Unset, Volume] = UNSET
|
||||
if not isinstance(self.data, Unset):
|
||||
data = self.data
|
||||
type = self.type
|
||||
@ -1730,7 +1783,8 @@ class volume:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if data is not UNSET:
|
||||
field_dict["data"] = data.to_dict()
|
||||
_data: Volume = cast(Volume, data)
|
||||
field_dict["data"] = _data.to_dict()
|
||||
field_dict["type"] = type
|
||||
|
||||
return field_dict
|
||||
@ -1787,6 +1841,7 @@ class density:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
data: Union[Unset, Density] = UNSET
|
||||
if not isinstance(self.data, Unset):
|
||||
data = self.data
|
||||
type = self.type
|
||||
@ -1795,7 +1850,8 @@ class density:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if data is not UNSET:
|
||||
field_dict["data"] = data.to_dict()
|
||||
_data: Density = cast(Density, data)
|
||||
field_dict["data"] = _data.to_dict()
|
||||
field_dict["type"] = type
|
||||
|
||||
return field_dict
|
||||
@ -1852,6 +1908,7 @@ class surface_area:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
data: Union[Unset, SurfaceArea] = UNSET
|
||||
if not isinstance(self.data, Unset):
|
||||
data = self.data
|
||||
type = self.type
|
||||
@ -1860,7 +1917,8 @@ class surface_area:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if data is not UNSET:
|
||||
field_dict["data"] = data.to_dict()
|
||||
_data: SurfaceArea = cast(SurfaceArea, data)
|
||||
field_dict["data"] = _data.to_dict()
|
||||
field_dict["type"] = type
|
||||
|
||||
return field_dict
|
||||
@ -1917,6 +1975,7 @@ class center_of_mass:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
data: Union[Unset, CenterOfMass] = UNSET
|
||||
if not isinstance(self.data, Unset):
|
||||
data = self.data
|
||||
type = self.type
|
||||
@ -1925,7 +1984,8 @@ class center_of_mass:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if data is not UNSET:
|
||||
field_dict["data"] = data.to_dict()
|
||||
_data: CenterOfMass = cast(CenterOfMass, data)
|
||||
field_dict["data"] = _data.to_dict()
|
||||
field_dict["type"] = type
|
||||
|
||||
return field_dict
|
||||
@ -1982,6 +2042,7 @@ class get_sketch_mode_plane:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
data: Union[Unset, GetSketchModePlane] = UNSET
|
||||
if not isinstance(self.data, Unset):
|
||||
data = self.data
|
||||
type = self.type
|
||||
@ -1990,7 +2051,8 @@ class get_sketch_mode_plane:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if data is not UNSET:
|
||||
field_dict["data"] = data.to_dict()
|
||||
_data: GetSketchModePlane = cast(GetSketchModePlane, data)
|
||||
field_dict["data"] = _data.to_dict()
|
||||
field_dict["type"] = type
|
||||
|
||||
return field_dict
|
||||
|
@ -1,4 +1,4 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
|
||||
import attr
|
||||
|
||||
@ -25,6 +25,7 @@ class fbx:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
storage: Union[Unset, FbxStorage] = UNSET
|
||||
if not isinstance(self.storage, Unset):
|
||||
storage = self.storage
|
||||
type = self.type
|
||||
@ -91,8 +92,10 @@ class gltf:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
presentation: Union[Unset, GltfPresentation] = UNSET
|
||||
if not isinstance(self.presentation, Unset):
|
||||
presentation = self.presentation
|
||||
storage: Union[Unset, GltfStorage] = UNSET
|
||||
if not isinstance(self.storage, Unset):
|
||||
storage = self.storage
|
||||
type = self.type
|
||||
@ -171,9 +174,11 @@ class obj:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
coords: Union[Unset, System] = UNSET
|
||||
if not isinstance(self.coords, Unset):
|
||||
coords = self.coords
|
||||
type = self.type
|
||||
units: Union[Unset, UnitLength] = UNSET
|
||||
if not isinstance(self.units, Unset):
|
||||
units = self.units
|
||||
|
||||
@ -181,7 +186,8 @@ class obj:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if coords is not UNSET:
|
||||
field_dict["coords"] = coords.to_dict()
|
||||
_coords: System = cast(System, coords)
|
||||
field_dict["coords"] = _coords.to_dict()
|
||||
field_dict["type"] = type
|
||||
if units is not UNSET:
|
||||
field_dict["units"] = units
|
||||
@ -253,13 +259,17 @@ class ply:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
coords: Union[Unset, System] = UNSET
|
||||
if not isinstance(self.coords, Unset):
|
||||
coords = self.coords
|
||||
selection: Union[Unset, Selection] = UNSET
|
||||
if not isinstance(self.selection, Unset):
|
||||
selection = self.selection
|
||||
storage: Union[Unset, PlyStorage] = UNSET
|
||||
if not isinstance(self.storage, Unset):
|
||||
storage = self.storage
|
||||
type = self.type
|
||||
units: Union[Unset, UnitLength] = UNSET
|
||||
if not isinstance(self.units, Unset):
|
||||
units = self.units
|
||||
|
||||
@ -267,9 +277,11 @@ class ply:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if coords is not UNSET:
|
||||
field_dict["coords"] = coords.to_dict()
|
||||
_coords: System = cast(System, coords)
|
||||
field_dict["coords"] = _coords.to_dict()
|
||||
if selection is not UNSET:
|
||||
field_dict["selection"] = selection.to_dict()
|
||||
_selection: Selection = cast(Selection, selection)
|
||||
field_dict["selection"] = _selection.to_dict()
|
||||
if storage is not UNSET:
|
||||
field_dict["storage"] = storage
|
||||
field_dict["type"] = type
|
||||
@ -360,6 +372,7 @@ class step:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
coords: Union[Unset, System] = UNSET
|
||||
if not isinstance(self.coords, Unset):
|
||||
coords = self.coords
|
||||
type = self.type
|
||||
@ -368,7 +381,8 @@ class step:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if coords is not UNSET:
|
||||
field_dict["coords"] = coords.to_dict()
|
||||
_coords: System = cast(System, coords)
|
||||
field_dict["coords"] = _coords.to_dict()
|
||||
field_dict["type"] = type
|
||||
|
||||
return field_dict
|
||||
@ -428,13 +442,17 @@ class stl:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
coords: Union[Unset, System] = UNSET
|
||||
if not isinstance(self.coords, Unset):
|
||||
coords = self.coords
|
||||
selection: Union[Unset, Selection] = UNSET
|
||||
if not isinstance(self.selection, Unset):
|
||||
selection = self.selection
|
||||
storage: Union[Unset, StlStorage] = UNSET
|
||||
if not isinstance(self.storage, Unset):
|
||||
storage = self.storage
|
||||
type = self.type
|
||||
units: Union[Unset, UnitLength] = UNSET
|
||||
if not isinstance(self.units, Unset):
|
||||
units = self.units
|
||||
|
||||
@ -442,9 +460,11 @@ class stl:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if coords is not UNSET:
|
||||
field_dict["coords"] = coords.to_dict()
|
||||
_coords: System = cast(System, coords)
|
||||
field_dict["coords"] = _coords.to_dict()
|
||||
if selection is not UNSET:
|
||||
field_dict["selection"] = selection.to_dict()
|
||||
_selection: Selection = cast(Selection, selection)
|
||||
field_dict["selection"] = _selection.to_dict()
|
||||
if storage is not UNSET:
|
||||
field_dict["storage"] = storage
|
||||
field_dict["type"] = type
|
||||
|
@ -1,4 +1,4 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
|
||||
import attr
|
||||
|
||||
@ -21,6 +21,7 @@ class line:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
end: Union[Unset, Point3d] = UNSET
|
||||
if not isinstance(self.end, Unset):
|
||||
end = self.end
|
||||
relative = self.relative
|
||||
@ -30,7 +31,8 @@ class line:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if end is not UNSET:
|
||||
field_dict["end"] = end.to_dict()
|
||||
_end: Point3d = cast(Point3d, end)
|
||||
field_dict["end"] = _end.to_dict()
|
||||
if relative is not UNSET:
|
||||
field_dict["relative"] = relative
|
||||
field_dict["type"] = type
|
||||
@ -100,12 +102,15 @@ class arc:
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
angle_end = self.angle_end
|
||||
angle_start = self.angle_start
|
||||
center: Union[Unset, Point2d] = UNSET
|
||||
if not isinstance(self.center, Unset):
|
||||
center = self.center
|
||||
end: Union[Unset, Angle] = UNSET
|
||||
if not isinstance(self.end, Unset):
|
||||
end = self.end
|
||||
radius = self.radius
|
||||
relative = self.relative
|
||||
start: Union[Unset, Angle] = UNSET
|
||||
if not isinstance(self.start, Unset):
|
||||
start = self.start
|
||||
type = self.type
|
||||
@ -118,15 +123,18 @@ class arc:
|
||||
if angle_start is not UNSET:
|
||||
field_dict["angle_start"] = angle_start
|
||||
if center is not UNSET:
|
||||
field_dict["center"] = center.to_dict()
|
||||
_center: Point2d = cast(Point2d, center)
|
||||
field_dict["center"] = _center.to_dict()
|
||||
if end is not UNSET:
|
||||
field_dict["end"] = end.to_dict()
|
||||
_end: Angle = cast(Angle, end)
|
||||
field_dict["end"] = _end.to_dict()
|
||||
if radius is not UNSET:
|
||||
field_dict["radius"] = radius
|
||||
if relative is not UNSET:
|
||||
field_dict["relative"] = relative
|
||||
if start is not UNSET:
|
||||
field_dict["start"] = start.to_dict()
|
||||
_start: Angle = cast(Angle, start)
|
||||
field_dict["start"] = _start.to_dict()
|
||||
field_dict["type"] = type
|
||||
|
||||
return field_dict
|
||||
@ -218,10 +226,13 @@ class bezier:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
control1: Union[Unset, Point3d] = UNSET
|
||||
if not isinstance(self.control1, Unset):
|
||||
control1 = self.control1
|
||||
control2: Union[Unset, Point3d] = UNSET
|
||||
if not isinstance(self.control2, Unset):
|
||||
control2 = self.control2
|
||||
end: Union[Unset, Point3d] = UNSET
|
||||
if not isinstance(self.end, Unset):
|
||||
end = self.end
|
||||
relative = self.relative
|
||||
@ -231,11 +242,14 @@ class bezier:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if control1 is not UNSET:
|
||||
field_dict["control1"] = control1.to_dict()
|
||||
_control1: Point3d = cast(Point3d, control1)
|
||||
field_dict["control1"] = _control1.to_dict()
|
||||
if control2 is not UNSET:
|
||||
field_dict["control2"] = control2.to_dict()
|
||||
_control2: Point3d = cast(Point3d, control2)
|
||||
field_dict["control2"] = _control2.to_dict()
|
||||
if end is not UNSET:
|
||||
field_dict["end"] = end.to_dict()
|
||||
_end: Point3d = cast(Point3d, end)
|
||||
field_dict["end"] = _end.to_dict()
|
||||
if relative is not UNSET:
|
||||
field_dict["relative"] = relative
|
||||
field_dict["type"] = type
|
||||
@ -318,6 +332,7 @@ class tangential_arc:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
offset: Union[Unset, Angle] = UNSET
|
||||
if not isinstance(self.offset, Unset):
|
||||
offset = self.offset
|
||||
radius = self.radius
|
||||
@ -327,7 +342,8 @@ class tangential_arc:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if offset is not UNSET:
|
||||
field_dict["offset"] = offset.to_dict()
|
||||
_offset: Angle = cast(Angle, offset)
|
||||
field_dict["offset"] = _offset.to_dict()
|
||||
if radius is not UNSET:
|
||||
field_dict["radius"] = radius
|
||||
field_dict["type"] = type
|
||||
@ -390,8 +406,10 @@ class tangential_arc_to:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
angle_snap_increment: Union[Unset, Angle] = UNSET
|
||||
if not isinstance(self.angle_snap_increment, Unset):
|
||||
angle_snap_increment = self.angle_snap_increment
|
||||
to: Union[Unset, Point3d] = UNSET
|
||||
if not isinstance(self.to, Unset):
|
||||
to = self.to
|
||||
type = self.type
|
||||
@ -400,9 +418,11 @@ class tangential_arc_to:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if angle_snap_increment is not UNSET:
|
||||
field_dict["angle_snap_increment"] = angle_snap_increment.to_dict()
|
||||
_angle_snap_increment: Angle = cast(Angle, angle_snap_increment)
|
||||
field_dict["angle_snap_increment"] = _angle_snap_increment.to_dict()
|
||||
if to is not UNSET:
|
||||
field_dict["to"] = to.to_dict()
|
||||
_to: Point3d = cast(Point3d, to)
|
||||
field_dict["to"] = _to.to_dict()
|
||||
field_dict["type"] = type
|
||||
|
||||
return field_dict
|
||||
|
@ -20,8 +20,10 @@ class PathSegmentInfo:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
command: Union[Unset, PathCommand] = UNSET
|
||||
if not isinstance(self.command, Unset):
|
||||
command = self.command
|
||||
command_id: Union[Unset, ModelingCmdId] = UNSET
|
||||
if not isinstance(self.command_id, Unset):
|
||||
command_id = self.command_id
|
||||
relative = self.relative
|
||||
|
@ -1,5 +1,5 @@
|
||||
import datetime
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
|
||||
import attr
|
||||
from dateutil.parser import isoparse
|
||||
@ -26,8 +26,10 @@ class PaymentMethod:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
billing_info: Union[Unset, BillingInfo] = UNSET
|
||||
if not isinstance(self.billing_info, Unset):
|
||||
billing_info = self.billing_info
|
||||
card: Union[Unset, CardDetails] = UNSET
|
||||
if not isinstance(self.card, Unset):
|
||||
card = self.card
|
||||
created_at: Union[Unset, str] = UNSET
|
||||
@ -36,6 +38,7 @@ class PaymentMethod:
|
||||
id = self.id
|
||||
metadata = self.metadata
|
||||
|
||||
type: Union[Unset, PaymentMethodType] = UNSET
|
||||
if not isinstance(self.type, Unset):
|
||||
type = self.type
|
||||
|
||||
@ -43,9 +46,11 @@ class PaymentMethod:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if billing_info is not UNSET:
|
||||
field_dict["billing_info"] = billing_info.to_dict()
|
||||
_billing_info: BillingInfo = cast(BillingInfo, billing_info)
|
||||
field_dict["billing_info"] = _billing_info.to_dict()
|
||||
if card is not UNSET:
|
||||
field_dict["card"] = card.to_dict()
|
||||
_card: CardDetails = cast(CardDetails, card)
|
||||
field_dict["card"] = _card.to_dict()
|
||||
if created_at is not UNSET:
|
||||
field_dict["created_at"] = created_at
|
||||
if id is not UNSET:
|
||||
|
@ -1,4 +1,4 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
|
||||
import attr
|
||||
|
||||
@ -17,6 +17,7 @@ class PlaneIntersectAndProject:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
plane_coordinates: Union[Unset, Point2d] = UNSET
|
||||
if not isinstance(self.plane_coordinates, Unset):
|
||||
plane_coordinates = self.plane_coordinates
|
||||
|
||||
@ -24,7 +25,8 @@ class PlaneIntersectAndProject:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if plane_coordinates is not UNSET:
|
||||
field_dict["plane_coordinates"] = plane_coordinates.to_dict()
|
||||
_plane_coordinates: Point2d = cast(Point2d, plane_coordinates)
|
||||
field_dict["plane_coordinates"] = _plane_coordinates.to_dict()
|
||||
|
||||
return field_dict
|
||||
|
||||
|
@ -19,6 +19,7 @@ class RtcSessionDescription:
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
sdp = self.sdp
|
||||
type: Union[Unset, RtcSdpType] = UNSET
|
||||
if not isinstance(self.type, Unset):
|
||||
type = self.type
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
|
||||
import attr
|
||||
|
||||
@ -20,6 +20,7 @@ class SuccessWebSocketResponse:
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
request_id = self.request_id
|
||||
resp: Union[Unset, OkWebSocketResponseData] = UNSET
|
||||
if not isinstance(self.resp, Unset):
|
||||
resp = self.resp
|
||||
success = self.success
|
||||
@ -30,7 +31,8 @@ class SuccessWebSocketResponse:
|
||||
if request_id is not UNSET:
|
||||
field_dict["request_id"] = request_id
|
||||
if resp is not UNSET:
|
||||
field_dict["resp"] = resp.to_dict()
|
||||
_resp: OkWebSocketResponseData = cast(OkWebSocketResponseData, resp)
|
||||
field_dict["resp"] = _resp.to_dict()
|
||||
if success is not UNSET:
|
||||
field_dict["success"] = success
|
||||
|
||||
|
@ -18,6 +18,7 @@ class SurfaceArea:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
output_unit: Union[Unset, UnitArea] = UNSET
|
||||
if not isinstance(self.output_unit, Unset):
|
||||
output_unit = self.output_unit
|
||||
surface_area = self.surface_area
|
||||
|
@ -1,4 +1,4 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
|
||||
import attr
|
||||
|
||||
@ -25,8 +25,10 @@ class System:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
forward: Union[Unset, AxisDirectionPair] = UNSET
|
||||
if not isinstance(self.forward, Unset):
|
||||
forward = self.forward
|
||||
up: Union[Unset, AxisDirectionPair] = UNSET
|
||||
if not isinstance(self.up, Unset):
|
||||
up = self.up
|
||||
|
||||
@ -34,9 +36,11 @@ class System:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if forward is not UNSET:
|
||||
field_dict["forward"] = forward.to_dict()
|
||||
_forward: AxisDirectionPair = cast(AxisDirectionPair, forward)
|
||||
field_dict["forward"] = _forward.to_dict()
|
||||
if up is not UNSET:
|
||||
field_dict["up"] = up.to_dict()
|
||||
_up: AxisDirectionPair = cast(AxisDirectionPair, up)
|
||||
field_dict["up"] = _up.to_dict()
|
||||
|
||||
return field_dict
|
||||
|
||||
|
@ -42,10 +42,12 @@ class TextToCad:
|
||||
if not isinstance(self.created_at, Unset):
|
||||
created_at = self.created_at.isoformat()
|
||||
error = self.error
|
||||
feedback: Union[Unset, AiFeedback] = UNSET
|
||||
if not isinstance(self.feedback, Unset):
|
||||
feedback = self.feedback
|
||||
id = self.id
|
||||
model_version = self.model_version
|
||||
output_format: Union[Unset, FileExportFormat] = UNSET
|
||||
if not isinstance(self.output_format, Unset):
|
||||
output_format = self.output_format
|
||||
outputs: Union[Unset, Dict[str, str]] = UNSET
|
||||
@ -58,6 +60,7 @@ class TextToCad:
|
||||
started_at: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.started_at, Unset):
|
||||
started_at = self.started_at.isoformat()
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
if not isinstance(self.status, Unset):
|
||||
status = self.status
|
||||
updated_at: Union[Unset, str] = UNSET
|
||||
|
@ -41,14 +41,17 @@ class UnitAngleConversion:
|
||||
error = self.error
|
||||
id = self.id
|
||||
input = self.input
|
||||
input_unit: Union[Unset, UnitAngle] = UNSET
|
||||
if not isinstance(self.input_unit, Unset):
|
||||
input_unit = self.input_unit
|
||||
output = self.output
|
||||
output_unit: Union[Unset, UnitAngle] = UNSET
|
||||
if not isinstance(self.output_unit, Unset):
|
||||
output_unit = self.output_unit
|
||||
started_at: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.started_at, Unset):
|
||||
started_at = self.started_at.isoformat()
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
if not isinstance(self.status, Unset):
|
||||
status = self.status
|
||||
updated_at: Union[Unset, str] = UNSET
|
||||
|
@ -41,14 +41,17 @@ class UnitAreaConversion:
|
||||
error = self.error
|
||||
id = self.id
|
||||
input = self.input
|
||||
input_unit: Union[Unset, UnitArea] = UNSET
|
||||
if not isinstance(self.input_unit, Unset):
|
||||
input_unit = self.input_unit
|
||||
output = self.output
|
||||
output_unit: Union[Unset, UnitArea] = UNSET
|
||||
if not isinstance(self.output_unit, Unset):
|
||||
output_unit = self.output_unit
|
||||
started_at: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.started_at, Unset):
|
||||
started_at = self.started_at.isoformat()
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
if not isinstance(self.status, Unset):
|
||||
status = self.status
|
||||
updated_at: Union[Unset, str] = UNSET
|
||||
|
@ -41,14 +41,17 @@ class UnitCurrentConversion:
|
||||
error = self.error
|
||||
id = self.id
|
||||
input = self.input
|
||||
input_unit: Union[Unset, UnitCurrent] = UNSET
|
||||
if not isinstance(self.input_unit, Unset):
|
||||
input_unit = self.input_unit
|
||||
output = self.output
|
||||
output_unit: Union[Unset, UnitCurrent] = UNSET
|
||||
if not isinstance(self.output_unit, Unset):
|
||||
output_unit = self.output_unit
|
||||
started_at: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.started_at, Unset):
|
||||
started_at = self.started_at.isoformat()
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
if not isinstance(self.status, Unset):
|
||||
status = self.status
|
||||
updated_at: Union[Unset, str] = UNSET
|
||||
|
@ -41,14 +41,17 @@ class UnitEnergyConversion:
|
||||
error = self.error
|
||||
id = self.id
|
||||
input = self.input
|
||||
input_unit: Union[Unset, UnitEnergy] = UNSET
|
||||
if not isinstance(self.input_unit, Unset):
|
||||
input_unit = self.input_unit
|
||||
output = self.output
|
||||
output_unit: Union[Unset, UnitEnergy] = UNSET
|
||||
if not isinstance(self.output_unit, Unset):
|
||||
output_unit = self.output_unit
|
||||
started_at: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.started_at, Unset):
|
||||
started_at = self.started_at.isoformat()
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
if not isinstance(self.status, Unset):
|
||||
status = self.status
|
||||
updated_at: Union[Unset, str] = UNSET
|
||||
|
@ -41,14 +41,17 @@ class UnitForceConversion:
|
||||
error = self.error
|
||||
id = self.id
|
||||
input = self.input
|
||||
input_unit: Union[Unset, UnitForce] = UNSET
|
||||
if not isinstance(self.input_unit, Unset):
|
||||
input_unit = self.input_unit
|
||||
output = self.output
|
||||
output_unit: Union[Unset, UnitForce] = UNSET
|
||||
if not isinstance(self.output_unit, Unset):
|
||||
output_unit = self.output_unit
|
||||
started_at: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.started_at, Unset):
|
||||
started_at = self.started_at.isoformat()
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
if not isinstance(self.status, Unset):
|
||||
status = self.status
|
||||
updated_at: Union[Unset, str] = UNSET
|
||||
|
@ -41,14 +41,17 @@ class UnitFrequencyConversion:
|
||||
error = self.error
|
||||
id = self.id
|
||||
input = self.input
|
||||
input_unit: Union[Unset, UnitFrequency] = UNSET
|
||||
if not isinstance(self.input_unit, Unset):
|
||||
input_unit = self.input_unit
|
||||
output = self.output
|
||||
output_unit: Union[Unset, UnitFrequency] = UNSET
|
||||
if not isinstance(self.output_unit, Unset):
|
||||
output_unit = self.output_unit
|
||||
started_at: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.started_at, Unset):
|
||||
started_at = self.started_at.isoformat()
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
if not isinstance(self.status, Unset):
|
||||
status = self.status
|
||||
updated_at: Union[Unset, str] = UNSET
|
||||
|
@ -41,14 +41,17 @@ class UnitLengthConversion:
|
||||
error = self.error
|
||||
id = self.id
|
||||
input = self.input
|
||||
input_unit: Union[Unset, UnitLength] = UNSET
|
||||
if not isinstance(self.input_unit, Unset):
|
||||
input_unit = self.input_unit
|
||||
output = self.output
|
||||
output_unit: Union[Unset, UnitLength] = UNSET
|
||||
if not isinstance(self.output_unit, Unset):
|
||||
output_unit = self.output_unit
|
||||
started_at: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.started_at, Unset):
|
||||
started_at = self.started_at.isoformat()
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
if not isinstance(self.status, Unset):
|
||||
status = self.status
|
||||
updated_at: Union[Unset, str] = UNSET
|
||||
|
@ -41,14 +41,17 @@ class UnitMassConversion:
|
||||
error = self.error
|
||||
id = self.id
|
||||
input = self.input
|
||||
input_unit: Union[Unset, UnitMass] = UNSET
|
||||
if not isinstance(self.input_unit, Unset):
|
||||
input_unit = self.input_unit
|
||||
output = self.output
|
||||
output_unit: Union[Unset, UnitMass] = UNSET
|
||||
if not isinstance(self.output_unit, Unset):
|
||||
output_unit = self.output_unit
|
||||
started_at: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.started_at, Unset):
|
||||
started_at = self.started_at.isoformat()
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
if not isinstance(self.status, Unset):
|
||||
status = self.status
|
||||
updated_at: Union[Unset, str] = UNSET
|
||||
|
@ -41,14 +41,17 @@ class UnitPowerConversion:
|
||||
error = self.error
|
||||
id = self.id
|
||||
input = self.input
|
||||
input_unit: Union[Unset, UnitPower] = UNSET
|
||||
if not isinstance(self.input_unit, Unset):
|
||||
input_unit = self.input_unit
|
||||
output = self.output
|
||||
output_unit: Union[Unset, UnitPower] = UNSET
|
||||
if not isinstance(self.output_unit, Unset):
|
||||
output_unit = self.output_unit
|
||||
started_at: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.started_at, Unset):
|
||||
started_at = self.started_at.isoformat()
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
if not isinstance(self.status, Unset):
|
||||
status = self.status
|
||||
updated_at: Union[Unset, str] = UNSET
|
||||
|
@ -41,14 +41,17 @@ class UnitPressureConversion:
|
||||
error = self.error
|
||||
id = self.id
|
||||
input = self.input
|
||||
input_unit: Union[Unset, UnitPressure] = UNSET
|
||||
if not isinstance(self.input_unit, Unset):
|
||||
input_unit = self.input_unit
|
||||
output = self.output
|
||||
output_unit: Union[Unset, UnitPressure] = UNSET
|
||||
if not isinstance(self.output_unit, Unset):
|
||||
output_unit = self.output_unit
|
||||
started_at: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.started_at, Unset):
|
||||
started_at = self.started_at.isoformat()
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
if not isinstance(self.status, Unset):
|
||||
status = self.status
|
||||
updated_at: Union[Unset, str] = UNSET
|
||||
|
@ -41,14 +41,17 @@ class UnitTemperatureConversion:
|
||||
error = self.error
|
||||
id = self.id
|
||||
input = self.input
|
||||
input_unit: Union[Unset, UnitTemperature] = UNSET
|
||||
if not isinstance(self.input_unit, Unset):
|
||||
input_unit = self.input_unit
|
||||
output = self.output
|
||||
output_unit: Union[Unset, UnitTemperature] = UNSET
|
||||
if not isinstance(self.output_unit, Unset):
|
||||
output_unit = self.output_unit
|
||||
started_at: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.started_at, Unset):
|
||||
started_at = self.started_at.isoformat()
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
if not isinstance(self.status, Unset):
|
||||
status = self.status
|
||||
updated_at: Union[Unset, str] = UNSET
|
||||
|
@ -41,14 +41,17 @@ class UnitTorqueConversion:
|
||||
error = self.error
|
||||
id = self.id
|
||||
input = self.input
|
||||
input_unit: Union[Unset, UnitTorque] = UNSET
|
||||
if not isinstance(self.input_unit, Unset):
|
||||
input_unit = self.input_unit
|
||||
output = self.output
|
||||
output_unit: Union[Unset, UnitTorque] = UNSET
|
||||
if not isinstance(self.output_unit, Unset):
|
||||
output_unit = self.output_unit
|
||||
started_at: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.started_at, Unset):
|
||||
started_at = self.started_at.isoformat()
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
if not isinstance(self.status, Unset):
|
||||
status = self.status
|
||||
updated_at: Union[Unset, str] = UNSET
|
||||
|
@ -41,14 +41,17 @@ class UnitVolumeConversion:
|
||||
error = self.error
|
||||
id = self.id
|
||||
input = self.input
|
||||
input_unit: Union[Unset, UnitVolume] = UNSET
|
||||
if not isinstance(self.input_unit, Unset):
|
||||
input_unit = self.input_unit
|
||||
output = self.output
|
||||
output_unit: Union[Unset, UnitVolume] = UNSET
|
||||
if not isinstance(self.output_unit, Unset):
|
||||
output_unit = self.output_unit
|
||||
started_at: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.started_at, Unset):
|
||||
started_at = self.started_at.isoformat()
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
if not isinstance(self.status, Unset):
|
||||
status = self.status
|
||||
updated_at: Union[Unset, str] = UNSET
|
||||
|
@ -18,6 +18,7 @@ class Volume:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
output_unit: Union[Unset, UnitVolume] = UNSET
|
||||
if not isinstance(self.output_unit, Unset):
|
||||
output_unit = self.output_unit
|
||||
volume = self.volume
|
||||
|
@ -22,6 +22,7 @@ class trickle_ice:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
candidate: Union[Unset, RtcIceCandidateInit] = UNSET
|
||||
if not isinstance(self.candidate, Unset):
|
||||
candidate = self.candidate
|
||||
type = self.type
|
||||
@ -30,7 +31,8 @@ class trickle_ice:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if candidate is not UNSET:
|
||||
field_dict["candidate"] = candidate.to_dict()
|
||||
_candidate: RtcIceCandidateInit = cast(RtcIceCandidateInit, candidate)
|
||||
field_dict["candidate"] = _candidate.to_dict()
|
||||
field_dict["type"] = type
|
||||
|
||||
return field_dict
|
||||
@ -87,6 +89,7 @@ class sdp_offer:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
offer: Union[Unset, RtcSessionDescription] = UNSET
|
||||
if not isinstance(self.offer, Unset):
|
||||
offer = self.offer
|
||||
type = self.type
|
||||
@ -95,7 +98,8 @@ class sdp_offer:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if offer is not UNSET:
|
||||
field_dict["offer"] = offer.to_dict()
|
||||
_offer: RtcSessionDescription = cast(RtcSessionDescription, offer)
|
||||
field_dict["offer"] = _offer.to_dict()
|
||||
field_dict["type"] = type
|
||||
|
||||
return field_dict
|
||||
@ -153,8 +157,10 @@ class modeling_cmd_req:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
cmd: Union[Unset, ModelingCmd] = UNSET
|
||||
if not isinstance(self.cmd, Unset):
|
||||
cmd = self.cmd
|
||||
cmd_id: Union[Unset, ModelingCmdId] = UNSET
|
||||
if not isinstance(self.cmd_id, Unset):
|
||||
cmd_id = self.cmd_id
|
||||
type = self.type
|
||||
@ -163,7 +169,8 @@ class modeling_cmd_req:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if cmd is not UNSET:
|
||||
field_dict["cmd"] = cmd.to_dict()
|
||||
_cmd: ModelingCmd = cast(ModelingCmd, cmd)
|
||||
field_dict["cmd"] = _cmd.to_dict()
|
||||
if cmd_id is not UNSET:
|
||||
field_dict["cmd_id"] = cmd_id
|
||||
field_dict["type"] = type
|
||||
@ -347,6 +354,7 @@ class metrics_response:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
metrics: Union[Unset, ClientMetrics] = UNSET
|
||||
if not isinstance(self.metrics, Unset):
|
||||
metrics = self.metrics
|
||||
type = self.type
|
||||
@ -355,7 +363,8 @@ class metrics_response:
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if metrics is not UNSET:
|
||||
field_dict["metrics"] = metrics.to_dict()
|
||||
_metrics: ClientMetrics = cast(ClientMetrics, metrics)
|
||||
field_dict["metrics"] = _metrics.to_dict()
|
||||
field_dict["type"] = type
|
||||
|
||||
return field_dict
|
||||
|
Reference in New Issue
Block a user