Update api spec (#124)
* YOYO NEW API SPEC! * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * tuples Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates; Signed-off-by: Jess Frazelle <github@jessfraz.com> * I have generated the latest API! --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
BIN
docs/.DS_Store
vendored
Normal file
BIN
docs/.DS_Store
vendored
Normal file
Binary file not shown.
@ -472,9 +472,19 @@ from kittycad.types import Response
|
||||
+ "\n"
|
||||
)
|
||||
example_imports = (
|
||||
example_imports + "from typing import Union, Any, Optional, List\n"
|
||||
example_imports + "from typing import Union, Any, Optional, List, Tuple\n"
|
||||
)
|
||||
example_variable = "result: " + response_type + " = "
|
||||
|
||||
if fn_name.endswith("_with_base64_helper"):
|
||||
example_variable = (
|
||||
"result: "
|
||||
+ response_type.replace(
|
||||
"FileConversion", "Tuple[FileConversion, bytes]"
|
||||
)
|
||||
+ " = "
|
||||
)
|
||||
else:
|
||||
example_variable = "result: " + response_type + " = "
|
||||
|
||||
example_imports = example_imports + "from kittycad.types import Response\n"
|
||||
example_imports = example_imports + "from kittycad.models import Error\n"
|
||||
@ -505,6 +515,12 @@ from kittycad.types import Response
|
||||
and success_type != "None"
|
||||
and success_type != ""
|
||||
):
|
||||
example_success_type = success_type
|
||||
if fn_name.endswith("_with_base64_helper"):
|
||||
example_success_type = example_success_type.replace(
|
||||
"FileConversion", "Tuple[FileConversion, bytes]"
|
||||
)
|
||||
|
||||
short_sync_example = short_sync_example + (
|
||||
"""
|
||||
if isinstance(result, Error) or result == None:
|
||||
@ -512,7 +528,7 @@ from kittycad.types import Response
|
||||
raise Exception("Error in response")
|
||||
|
||||
body: """
|
||||
+ success_type
|
||||
+ example_success_type
|
||||
+ """ = result
|
||||
print(body)
|
||||
|
||||
@ -749,7 +765,7 @@ async def test_"""
|
||||
"\t\t\t"
|
||||
+ option_name
|
||||
+ " = "
|
||||
+ ref
|
||||
+ snake_to_title(ref)
|
||||
+ ".from_dict(data)\n"
|
||||
)
|
||||
parse_response.write(
|
||||
@ -1112,8 +1128,14 @@ def generateOneOfType(path: str, name: str, schema: dict, data: dict):
|
||||
if "$ref" in one_of:
|
||||
ref = one_of["$ref"]
|
||||
ref_name = ref[ref.rfind("/") + 1 :]
|
||||
f.write("from ." + camel_to_snake(ref_name) + " import " + ref_name + "\n")
|
||||
all_options.append(ref_name)
|
||||
f.write(
|
||||
"from ."
|
||||
+ camel_to_snake(ref_name)
|
||||
+ " import "
|
||||
+ snake_to_title(ref_name)
|
||||
+ "\n"
|
||||
)
|
||||
all_options.append(snake_to_title(ref_name))
|
||||
|
||||
if isNestedObjectOneOf(schema):
|
||||
# We want to write each of the nested objects.
|
||||
@ -1173,13 +1195,19 @@ def generateOneOfType(path: str, name: str, schema: dict, data: dict):
|
||||
all_options.append(object_name)
|
||||
|
||||
# Write the sum type.
|
||||
f.write(name + " = Union[")
|
||||
for num, option in enumerate(all_options, start=0):
|
||||
if num == 0:
|
||||
f.write(option)
|
||||
else:
|
||||
f.write(", " + option + "")
|
||||
f.write("]\n")
|
||||
if name == "SnakeCaseResult":
|
||||
f.write("from typing import Any\n")
|
||||
f.write(name + " = Any")
|
||||
else:
|
||||
f.write("from typing import Union\n")
|
||||
f.write(name + " = Union[")
|
||||
|
||||
for num, option in enumerate(all_options, start=0):
|
||||
if num == 0:
|
||||
f.write(option)
|
||||
else:
|
||||
f.write(", " + option + "")
|
||||
f.write("]\n")
|
||||
|
||||
# Close the file.
|
||||
f.close()
|
||||
@ -1426,6 +1454,8 @@ def renderTypeToDict(f, property_name: str, property_schema: dict, data: dict):
|
||||
elif "type" in property_schema["items"]:
|
||||
if property_schema["items"]["type"] == "string":
|
||||
property_type = "str"
|
||||
elif property_schema["items"]["type"] == "integer":
|
||||
property_type = "int"
|
||||
elif property_schema["items"]["type"] == "number":
|
||||
property_type = "float"
|
||||
elif property_schema["items"]["type"] == "array":
|
||||
@ -1441,7 +1471,7 @@ def renderTypeToDict(f, property_name: str, property_schema: dict, data: dict):
|
||||
logging.error("property: ", property_schema)
|
||||
raise Exception("Unknown property type")
|
||||
else:
|
||||
logging.error("property: ", property_schema)
|
||||
print("property: ", property_schema)
|
||||
raise Exception("Unknown property type")
|
||||
else:
|
||||
logging.error("array: ", [property_schema])
|
||||
@ -1570,6 +1600,8 @@ def renderTypeInit(f, property_name: str, property_schema: dict, data: dict):
|
||||
property_type = "str"
|
||||
elif property_schema["items"]["type"] == "number":
|
||||
property_type = "float"
|
||||
elif property_schema["items"]["type"] == "integer":
|
||||
property_type = "int"
|
||||
elif property_schema["items"]["type"] == "array":
|
||||
if "items" in property_schema["items"]:
|
||||
if property_schema["items"]["items"]["type"] == "string":
|
||||
@ -1583,7 +1615,7 @@ def renderTypeInit(f, property_name: str, property_schema: dict, data: dict):
|
||||
logging.error("property: ", property_schema)
|
||||
raise Exception("Unknown property type")
|
||||
else:
|
||||
logging.error("property: ", property_schema)
|
||||
print("property: ", property_schema)
|
||||
raise Exception("Unknown property type")
|
||||
else:
|
||||
logging.error("array: ", [property_schema])
|
||||
@ -1600,7 +1632,7 @@ def renderTypeInit(f, property_name: str, property_schema: dict, data: dict):
|
||||
else:
|
||||
raise Exception("Unknown array type")
|
||||
else:
|
||||
logging.error("property type: ", property_type)
|
||||
logging.error("property type: ", property_schema)
|
||||
raise Exception("unknown type: ", property_type)
|
||||
elif "$ref" in property_schema:
|
||||
ref = property_schema["$ref"].replace("#/components/schemas/", "")
|
||||
@ -1715,6 +1747,8 @@ def renderTypeFromDict(f, property_name: str, property_schema: dict, data: dict)
|
||||
property_type = "str"
|
||||
elif property_schema["items"]["type"] == "number":
|
||||
property_type = "float"
|
||||
elif property_schema["items"]["type"] == "integer":
|
||||
property_type = "int"
|
||||
elif property_schema["items"]["type"] == "array":
|
||||
if "items" in property_schema["items"]:
|
||||
if property_schema["items"]["items"]["type"] == "string":
|
||||
@ -1878,13 +1912,13 @@ def getEndpointRefs(endpoint: dict, data: dict) -> List[str]:
|
||||
ref = json["$ref"].replace("#/components/schemas/", "")
|
||||
schema = data["components"]["schemas"][ref]
|
||||
if isNestedObjectOneOf(schema) or isEnumWithDocsOneOf(schema):
|
||||
if ref not in refs:
|
||||
refs.append(ref)
|
||||
if snake_to_title(ref) not in refs:
|
||||
refs.append(snake_to_title(ref))
|
||||
elif isTypedObjectOneOf(schema):
|
||||
for t in schema["oneOf"]:
|
||||
ref = getOneOfRefType(t)
|
||||
if ref not in refs:
|
||||
refs.append(ref)
|
||||
if snake_to_title(ref) not in refs:
|
||||
refs.append(snake_to_title(ref))
|
||||
else:
|
||||
if ref not in refs:
|
||||
refs.append(ref)
|
||||
@ -1925,8 +1959,8 @@ def getEndpointRefs(endpoint: dict, data: dict) -> List[str]:
|
||||
json = content[content_type]["schema"]
|
||||
if "$ref" in json:
|
||||
ref = json["$ref"].replace("#/components/schemas/", "")
|
||||
if ref not in refs:
|
||||
refs.append(ref)
|
||||
if snake_to_title(ref) not in refs:
|
||||
refs.append(snake_to_title(ref))
|
||||
|
||||
return refs
|
||||
|
||||
@ -2038,6 +2072,11 @@ def camel_to_screaming_snake(name: str):
|
||||
)
|
||||
|
||||
|
||||
# Change `file_conversion` to `FileConversion`
|
||||
def snake_to_title(name: str):
|
||||
return name.title().replace("_", "")
|
||||
|
||||
|
||||
def get_function_parameters(
|
||||
endpoint: dict, request_body_type: Optional[str]
|
||||
) -> List[str]:
|
||||
@ -2082,8 +2121,12 @@ def isNestedObjectOneOf(schema: dict) -> bool:
|
||||
|
||||
is_nested_object = False
|
||||
for one_of in schema["oneOf"]:
|
||||
# Check if each are an object with properties.
|
||||
if one_of["type"] == "object" and "properties" in one_of:
|
||||
# Check if each are an object w 1 property in it.
|
||||
if (
|
||||
one_of["type"] == "object"
|
||||
and "properties" in one_of
|
||||
and len(one_of["properties"]) == 1
|
||||
):
|
||||
for prop_name in one_of["properties"]:
|
||||
nested_object = one_of["properties"][prop_name]
|
||||
if "type" in nested_object and nested_object["type"] == "object":
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,5 +1,5 @@
|
||||
import base64
|
||||
from typing import Any, Optional, Union
|
||||
from typing import Any, Optional, Tuple, Union
|
||||
|
||||
from ...api.file.create_file_conversion import asyncio as fc_asyncio, sync as fc_sync
|
||||
from ...client import Client
|
||||
@ -12,7 +12,7 @@ def sync(
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Any, FileConversion, Error]]:
|
||||
) -> Optional[Union[Any, Tuple[FileConversion, bytes], Error]]:
|
||||
"""Convert a CAD file from one format to another. If the file being converted is larger than a certain size it will be performed asynchronously. This function automatically base64 encodes the request body and base64 decodes the request output."""
|
||||
|
||||
encoded = base64.b64encode(body)
|
||||
@ -26,9 +26,8 @@ def sync(
|
||||
|
||||
if isinstance(fc, FileConversion) and fc.output != "":
|
||||
if isinstance(fc.output, str):
|
||||
b = base64.b64decode(fc.output + "=" * (-len(fc.output) % 4))
|
||||
# decode the bytes to a string
|
||||
fc.output = b.decode("utf-8")
|
||||
b = base64.b64decode(fc.output + "===")
|
||||
return (fc, b)
|
||||
|
||||
return fc
|
||||
|
||||
@ -39,7 +38,7 @@ async def asyncio(
|
||||
body: bytes,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Any, FileConversion, Error]]:
|
||||
) -> Optional[Union[Any, Tuple[FileConversion, bytes], Error]]:
|
||||
"""Convert a CAD file from one format to another. If the file being converted is larger than a certain size it will be performed asynchronously. This function automatically base64 encodes the request body and base64 decodes the request output."""
|
||||
|
||||
encoded = base64.b64encode(body)
|
||||
@ -53,8 +52,7 @@ async def asyncio(
|
||||
|
||||
if isinstance(fc, FileConversion) and fc.output != "":
|
||||
if isinstance(fc.output, str):
|
||||
b = base64.b64decode(fc.output + "=" * (-len(fc.output) % 4))
|
||||
# decode the bytes to a string
|
||||
fc.output = b.decode("utf-8")
|
||||
b = base64.b64decode(fc.output + "===")
|
||||
return (fc, b)
|
||||
|
||||
return fc
|
||||
|
@ -1,5 +1,5 @@
|
||||
import base64
|
||||
from typing import Any, Optional, Union
|
||||
from typing import Any, Optional, Tuple, Union
|
||||
|
||||
from ...api.api_calls.get_async_operation import asyncio as fc_asyncio, sync as fc_sync
|
||||
from ...client import Client
|
||||
@ -11,7 +11,7 @@ def sync(
|
||||
id: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Any, FileConversion, Error]]:
|
||||
) -> Optional[Union[Any, Tuple[FileConversion, bytes], Error]]:
|
||||
"""Get the status of a file conversion. This function automatically base64 decodes the output response if there is one."""
|
||||
|
||||
fc = fc_sync(
|
||||
@ -21,9 +21,8 @@ def sync(
|
||||
|
||||
if isinstance(fc, FileConversion) and fc.output != "":
|
||||
if isinstance(fc.output, str):
|
||||
b = base64.b64decode(fc.output + "=" * (-len(fc.output) % 4))
|
||||
# decode the bytes to a string
|
||||
fc.output = b.decode("utf-8")
|
||||
b = base64.b64decode(fc.output + "===")
|
||||
return (fc, b)
|
||||
|
||||
return fc
|
||||
|
||||
@ -32,7 +31,7 @@ async def asyncio(
|
||||
id: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Any, FileConversion, Error]]:
|
||||
) -> Optional[Union[Any, Tuple[FileConversion, bytes], Error]]:
|
||||
"""Get the status of a file conversion. This function automatically base64 decodes the output response if there is one."""
|
||||
|
||||
fc = await fc_asyncio(
|
||||
@ -42,8 +41,7 @@ async def asyncio(
|
||||
|
||||
if isinstance(fc, FileConversion) and fc.output != "":
|
||||
if isinstance(fc.output, str):
|
||||
b = base64.b64decode(fc.output + "=" * (-len(fc.output) % 4))
|
||||
# decode the bytes to a string
|
||||
fc.output = b.decode("utf-8")
|
||||
b = base64.b64decode(fc.output + "===")
|
||||
return (fc, b)
|
||||
|
||||
return fc
|
||||
|
@ -14,7 +14,7 @@ def _get_kwargs(
|
||||
*,
|
||||
client: Client,
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/modeling/cmd_batch".format(
|
||||
url = "{}/modeling/cmd-batch".format(
|
||||
client.base_url,
|
||||
) # noqa: E501
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import os
|
||||
from typing import Union
|
||||
from typing import Tuple, Union
|
||||
|
||||
import pytest
|
||||
|
||||
@ -107,7 +107,7 @@ def test_file_convert_stl():
|
||||
|
||||
# Get the fc.
|
||||
result: Union[
|
||||
FileConversion, Error, None
|
||||
Tuple[FileConversion, bytes], Error, None
|
||||
] = create_file_conversion_with_base64_helper.sync(
|
||||
client=client,
|
||||
body=content,
|
||||
@ -115,18 +115,21 @@ def test_file_convert_stl():
|
||||
output_format=FileExportFormat.OBJ,
|
||||
)
|
||||
|
||||
assert isinstance(result, FileConversion)
|
||||
r: Tuple[FileConversion, bytes] = result # type: ignore
|
||||
|
||||
fc: FileConversion = result
|
||||
b: bytes = r[1]
|
||||
fc: FileConversion = r[0]
|
||||
|
||||
print(f"FileConversion: {fc}")
|
||||
|
||||
assert fc.id is not None
|
||||
|
||||
assert fc.status == ApiCallStatus.COMPLETED
|
||||
|
||||
print(f"FileConversion: {fc}")
|
||||
|
||||
# Make sure the bytes are not empty.
|
||||
assert len(b) > 0
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_file_convert_stl_async():
|
||||
@ -140,7 +143,7 @@ async def test_file_convert_stl_async():
|
||||
|
||||
# Get the fc.
|
||||
result: Union[
|
||||
FileConversion, Error, None
|
||||
Tuple[FileConversion, bytes], Error, None
|
||||
] = await create_file_conversion_with_base64_helper.asyncio(
|
||||
client=client,
|
||||
body=content,
|
||||
@ -148,16 +151,21 @@ async def test_file_convert_stl_async():
|
||||
output_format=FileExportFormat.OBJ,
|
||||
)
|
||||
|
||||
assert isinstance(result, FileConversion)
|
||||
r: Tuple[FileConversion, bytes] = result # type: ignore
|
||||
|
||||
fc: FileConversion = result
|
||||
b: bytes = r[1]
|
||||
fc: FileConversion = r[0]
|
||||
|
||||
print(f"FileConversion: {fc}")
|
||||
|
||||
assert fc.id is not None
|
||||
assert fc.status == ApiCallStatus.COMPLETED
|
||||
|
||||
print(f"FileConversion: {fc}")
|
||||
|
||||
# Make sure the bytes are not empty.
|
||||
assert len(b) > 0
|
||||
|
||||
|
||||
def test_file_mass():
|
||||
# Create our client.
|
||||
|
@ -1,4 +1,4 @@
|
||||
from typing import List, Optional, Union
|
||||
from typing import List, Optional, Tuple, Union
|
||||
|
||||
import pytest
|
||||
|
||||
@ -987,7 +987,7 @@ def test_create_file_conversion_with_base64_helper():
|
||||
client = ClientFromEnv()
|
||||
|
||||
result: Optional[
|
||||
Union[FileConversion, Error]
|
||||
Union[Tuple[FileConversion, bytes], Error]
|
||||
] = create_file_conversion_with_base64_helper.sync(
|
||||
client=client,
|
||||
output_format=FileExportFormat.GLTF,
|
||||
@ -999,7 +999,7 @@ def test_create_file_conversion_with_base64_helper():
|
||||
print(result)
|
||||
raise Exception("Error in response")
|
||||
|
||||
body: FileConversion = result
|
||||
body: Tuple[FileConversion, bytes] = result
|
||||
print(body)
|
||||
|
||||
# OR if you need more info (e.g. status_code)
|
||||
@ -1021,7 +1021,7 @@ async def test_create_file_conversion_with_base64_helper_async():
|
||||
client = ClientFromEnv()
|
||||
|
||||
result: Optional[
|
||||
Union[FileConversion, Error]
|
||||
Union[Tuple[FileConversion, bytes], Error]
|
||||
] = await create_file_conversion_with_base64_helper.asyncio(
|
||||
client=client,
|
||||
output_format=FileExportFormat.GLTF,
|
||||
|
@ -55,6 +55,8 @@ from .engine_metadata import EngineMetadata
|
||||
from .entity_type import EntityType
|
||||
from .environment import Environment
|
||||
from .error import Error
|
||||
from .error_code import ErrorCode
|
||||
from .error_response import ErrorResponse
|
||||
from .executor_metadata import ExecutorMetadata
|
||||
from .export_file import ExportFile
|
||||
from .extended_user import ExtendedUser
|
||||
@ -69,6 +71,7 @@ from .file_surface_area import FileSurfaceArea
|
||||
from .file_system_metadata import FileSystemMetadata
|
||||
from .file_volume import FileVolume
|
||||
from .gateway import Gateway
|
||||
from .ice_server import IceServer
|
||||
from .image_type import ImageType
|
||||
from .index_info import IndexInfo
|
||||
from .input_format import InputFormat
|
||||
@ -108,10 +111,18 @@ from .point2d import Point2d
|
||||
from .point3d import Point3d
|
||||
from .point_e_metadata import PointEMetadata
|
||||
from .pong import Pong
|
||||
from .raw_file import RawFile
|
||||
from .registry_service_config import RegistryServiceConfig
|
||||
from .rtc_ice_candidate import RtcIceCandidate
|
||||
from .rtc_ice_candidate_init import RtcIceCandidateInit
|
||||
from .rtc_ice_candidate_type import RtcIceCandidateType
|
||||
from .rtc_ice_protocol import RtcIceProtocol
|
||||
from .rtc_sdp_type import RtcSdpType
|
||||
from .rtc_session_description import RtcSessionDescription
|
||||
from .runtime import Runtime
|
||||
from .scene_selection_type import SceneSelectionType
|
||||
from .session import Session
|
||||
from .snake_case_result import SnakeCaseResult
|
||||
from .storage import Storage
|
||||
from .system import System
|
||||
from .system_info_cgroup_driver_enum import SystemInfoCgroupDriverEnum
|
||||
@ -150,3 +161,5 @@ from .user import User
|
||||
from .user_results_page import UserResultsPage
|
||||
from .uuid import Uuid
|
||||
from .verification_token import VerificationToken
|
||||
from .web_socket_messages import WebSocketMessages
|
||||
from .web_socket_responses import WebSocketResponses
|
||||
|
@ -5,15 +5,15 @@ class ApiCallStatus(str, Enum):
|
||||
"""The status of an async API call.""" # noqa: E501
|
||||
|
||||
"""# The async API call is queued. """ # noqa: E501
|
||||
QUEUED = "Queued"
|
||||
QUEUED = "queued"
|
||||
"""# The async API call was uploaded to be converted. """ # noqa: E501
|
||||
UPLOADED = "Uploaded"
|
||||
UPLOADED = "uploaded"
|
||||
"""# The async API call is in progress. """ # noqa: E501
|
||||
IN_PROGRESS = "In Progress"
|
||||
IN_PROGRESS = "in_progress"
|
||||
"""# The async API call has completed. """ # noqa: E501
|
||||
COMPLETED = "Completed"
|
||||
COMPLETED = "completed"
|
||||
"""# The async API call has failed. """ # noqa: E501
|
||||
FAILED = "Failed"
|
||||
FAILED = "failed"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
|
@ -18,11 +18,11 @@ from ..models.unit_volume import UnitVolume
|
||||
from ..models.uuid import Uuid
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
MN = TypeVar("MN", bound="FileConversion")
|
||||
MN = TypeVar("MN", bound="file_conversion")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class FileConversion:
|
||||
class file_conversion:
|
||||
"""A file conversion.""" # noqa: E501
|
||||
|
||||
completed_at: Union[Unset, datetime.datetime] = UNSET
|
||||
@ -37,7 +37,7 @@ class FileConversion:
|
||||
src_format_options: Union[Unset, InputFormat] = UNSET
|
||||
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
type: str = "FileConversion"
|
||||
type: str = "file_conversion"
|
||||
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||
user_id: Union[Unset, str] = UNSET
|
||||
|
||||
@ -228,11 +228,11 @@ class FileConversion:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
JV = TypeVar("JV", bound="FileCenterOfMass")
|
||||
JV = TypeVar("JV", bound="file_center_of_mass")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class FileCenterOfMass:
|
||||
class file_center_of_mass:
|
||||
"""File center of mass.""" # noqa: E501
|
||||
|
||||
center_of_mass: Union[Unset, Point3d] = UNSET
|
||||
@ -244,7 +244,7 @@ class FileCenterOfMass:
|
||||
src_format: Union[Unset, FileImportFormat] = UNSET
|
||||
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
type: str = "FileCenterOfMass"
|
||||
type: str = "file_center_of_mass"
|
||||
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||
user_id: Union[Unset, str] = UNSET
|
||||
|
||||
@ -412,11 +412,11 @@ class FileCenterOfMass:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
IO = TypeVar("IO", bound="FileMass")
|
||||
IO = TypeVar("IO", bound="file_mass")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class FileMass:
|
||||
class file_mass:
|
||||
"""A file mass.""" # noqa: E501
|
||||
|
||||
completed_at: Union[Unset, datetime.datetime] = UNSET
|
||||
@ -430,7 +430,7 @@ class FileMass:
|
||||
src_format: Union[Unset, FileImportFormat] = UNSET
|
||||
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
type: str = "FileMass"
|
||||
type: str = "file_mass"
|
||||
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||
user_id: Union[Unset, str] = UNSET
|
||||
|
||||
@ -610,11 +610,11 @@ class FileMass:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
FV = TypeVar("FV", bound="FileVolume")
|
||||
FV = TypeVar("FV", bound="file_volume")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class FileVolume:
|
||||
class file_volume:
|
||||
"""A file volume.""" # noqa: E501
|
||||
|
||||
completed_at: Union[Unset, datetime.datetime] = UNSET
|
||||
@ -625,7 +625,7 @@ class FileVolume:
|
||||
src_format: Union[Unset, FileImportFormat] = UNSET
|
||||
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
type: str = "FileVolume"
|
||||
type: str = "file_volume"
|
||||
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||
user_id: Union[Unset, str] = UNSET
|
||||
volume: Union[Unset, float] = UNSET
|
||||
@ -788,11 +788,11 @@ class FileVolume:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
LE = TypeVar("LE", bound="FileDensity")
|
||||
LE = TypeVar("LE", bound="file_density")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class FileDensity:
|
||||
class file_density:
|
||||
"""A file density.""" # noqa: E501
|
||||
|
||||
completed_at: Union[Unset, datetime.datetime] = UNSET
|
||||
@ -806,7 +806,7 @@ class FileDensity:
|
||||
src_format: Union[Unset, FileImportFormat] = UNSET
|
||||
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
type: str = "FileDensity"
|
||||
type: str = "file_density"
|
||||
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||
user_id: Union[Unset, str] = UNSET
|
||||
|
||||
@ -986,11 +986,11 @@ class FileDensity:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
OY = TypeVar("OY", bound="FileSurfaceArea")
|
||||
OY = TypeVar("OY", bound="file_surface_area")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class FileSurfaceArea:
|
||||
class file_surface_area:
|
||||
"""A file surface area.""" # noqa: E501
|
||||
|
||||
completed_at: Union[Unset, datetime.datetime] = UNSET
|
||||
@ -1002,7 +1002,7 @@ class FileSurfaceArea:
|
||||
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
surface_area: Union[Unset, float] = UNSET
|
||||
type: str = "FileSurfaceArea"
|
||||
type: str = "file_surface_area"
|
||||
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||
user_id: Union[Unset, str] = UNSET
|
||||
|
||||
@ -1165,5 +1165,10 @@ class FileSurfaceArea:
|
||||
|
||||
|
||||
AsyncApiCallOutput = Union[
|
||||
FileConversion, FileCenterOfMass, FileMass, FileVolume, FileDensity, FileSurfaceArea
|
||||
file_conversion,
|
||||
file_center_of_mass,
|
||||
file_mass,
|
||||
file_volume,
|
||||
file_density,
|
||||
file_surface_area,
|
||||
]
|
||||
|
@ -5,17 +5,17 @@ class AsyncApiCallType(str, Enum):
|
||||
"""The type of async API call.""" # noqa: E501
|
||||
|
||||
"""# File conversion. """ # noqa: E501
|
||||
FILE_CONVERSION = "FileConversion"
|
||||
FILE_CONVERSION = "file_conversion"
|
||||
"""# File volume. """ # noqa: E501
|
||||
FILE_VOLUME = "FileVolume"
|
||||
FILE_VOLUME = "file_volume"
|
||||
"""# File center of mass. """ # noqa: E501
|
||||
FILE_CENTER_OF_MASS = "FileCenterOfMass"
|
||||
FILE_CENTER_OF_MASS = "file_center_of_mass"
|
||||
"""# File mass. """ # noqa: E501
|
||||
FILE_MASS = "FileMass"
|
||||
FILE_MASS = "file_mass"
|
||||
"""# File density. """ # noqa: E501
|
||||
FILE_DENSITY = "FileDensity"
|
||||
FILE_DENSITY = "file_density"
|
||||
"""# File surface area. """ # noqa: E501
|
||||
FILE_SURFACE_AREA = "FileSurfaceArea"
|
||||
FILE_SURFACE_AREA = "file_surface_area"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
|
@ -6,10 +6,10 @@ class CreatedAtSortMode(str, Enum):
|
||||
|
||||
Currently, we only support scanning in ascending order.""" # noqa: E501
|
||||
|
||||
"""# sort in increasing order of "created_at" """ # noqa: E501
|
||||
CREATED_AT_ASCENDING = "created-at-ascending"
|
||||
"""# sort in decreasing order of "created_at" """ # noqa: E501
|
||||
CREATED_AT_DESCENDING = "created-at-descending"
|
||||
"""# Sort in increasing order of "created_at". """ # noqa: E501
|
||||
CREATED_AT_ASCENDING = "created_at_ascending"
|
||||
"""# Sort in decreasing order of "created_at". """ # noqa: E501
|
||||
CREATED_AT_DESCENDING = "created_at_descending"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
|
@ -2,6 +2,7 @@ from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..models.error_code import ErrorCode
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
MS = TypeVar("MS", bound="Error")
|
||||
@ -9,44 +10,43 @@ MS = TypeVar("MS", bound="Error")
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class Error:
|
||||
"""Error information from a response.""" # noqa: E501
|
||||
"""An error.""" # noqa: E501
|
||||
|
||||
error_code: Union[Unset, str] = UNSET
|
||||
code: Union[Unset, ErrorCode] = UNSET
|
||||
message: Union[Unset, str] = UNSET
|
||||
request_id: Union[Unset, str] = UNSET
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
error_code = self.error_code
|
||||
if not isinstance(self.code, Unset):
|
||||
code = self.code
|
||||
message = self.message
|
||||
request_id = self.request_id
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if error_code is not UNSET:
|
||||
field_dict["error_code"] = error_code
|
||||
if code is not UNSET:
|
||||
field_dict["code"] = code
|
||||
if message is not UNSET:
|
||||
field_dict["message"] = message
|
||||
if request_id is not UNSET:
|
||||
field_dict["request_id"] = request_id
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[MS], src_dict: Dict[str, Any]) -> MS:
|
||||
d = src_dict.copy()
|
||||
error_code = d.pop("error_code", UNSET)
|
||||
_code = d.pop("code", UNSET)
|
||||
code: Union[Unset, ErrorCode]
|
||||
if isinstance(_code, Unset):
|
||||
code = UNSET
|
||||
else:
|
||||
code = _code # type: ignore[arg-type]
|
||||
|
||||
message = d.pop("message", UNSET)
|
||||
|
||||
request_id = d.pop("request_id", UNSET)
|
||||
|
||||
error = cls(
|
||||
error_code=error_code,
|
||||
code=code,
|
||||
message=message,
|
||||
request_id=request_id,
|
||||
)
|
||||
|
||||
error.additional_properties = d
|
||||
|
13
kittycad/models/error_code.py
Normal file
13
kittycad/models/error_code.py
Normal file
@ -0,0 +1,13 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class ErrorCode(str, Enum):
|
||||
"""The type of errorcode.""" # noqa: E501
|
||||
|
||||
"""# User requested something impossible or invalid """ # noqa: E501
|
||||
BAD_REQUEST = "bad_request"
|
||||
"""# Engine failed to complete request, consider retrying """ # noqa: E501
|
||||
INTERNAL_ENGINE = "internal_engine"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
63
kittycad/models/error_response.py
Normal file
63
kittycad/models/error_response.py
Normal file
@ -0,0 +1,63 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
|
||||
import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
LT = TypeVar("LT", bound="ErrorResponse")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class ErrorResponse:
|
||||
"""The error response.""" # noqa: E501
|
||||
|
||||
from ..models.error import Error
|
||||
|
||||
errors: Union[Unset, List[Error]] = UNSET
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
from ..models.error import Error
|
||||
|
||||
errors: Union[Unset, List[Error]] = UNSET
|
||||
if not isinstance(self.errors, Unset):
|
||||
errors = self.errors
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if errors is not UNSET:
|
||||
field_dict["errors"] = errors
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[LT], src_dict: Dict[str, Any]) -> LT:
|
||||
d = src_dict.copy()
|
||||
from ..models.error import Error
|
||||
|
||||
errors = cast(List[Error], d.pop("errors", UNSET))
|
||||
|
||||
error_response = cls(
|
||||
errors=errors,
|
||||
)
|
||||
|
||||
error_response.additional_properties = d
|
||||
return error_response
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
@ -6,7 +6,7 @@ from ..models.docker_system_info import DockerSystemInfo
|
||||
from ..models.environment import Environment
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
LT = TypeVar("LT", bound="ExecutorMetadata")
|
||||
ED = TypeVar("ED", bound="ExecutorMetadata")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -41,7 +41,7 @@ class ExecutorMetadata:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[LT], src_dict: Dict[str, Any]) -> LT:
|
||||
def from_dict(cls: Type[ED], src_dict: Dict[str, Any]) -> ED:
|
||||
d = src_dict.copy()
|
||||
_docker_info = d.pop("docker_info", UNSET)
|
||||
docker_info: Union[Unset, DockerSystemInfo]
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
ED = TypeVar("ED", bound="ExportFile")
|
||||
YY = TypeVar("YY", bound="ExportFile")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -31,7 +31,7 @@ class ExportFile:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[ED], src_dict: Dict[str, Any]) -> ED:
|
||||
def from_dict(cls: Type[YY], src_dict: Dict[str, Any]) -> YY:
|
||||
d = src_dict.copy()
|
||||
contents = d.pop("contents", UNSET)
|
||||
|
||||
|
@ -6,7 +6,7 @@ from dateutil.parser import isoparse
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
YY = TypeVar("YY", bound="ExtendedUser")
|
||||
DO = TypeVar("DO", bound="ExtendedUser")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -98,7 +98,7 @@ class ExtendedUser:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[YY], src_dict: Dict[str, Any]) -> YY:
|
||||
def from_dict(cls: Type[DO], src_dict: Dict[str, Any]) -> DO:
|
||||
d = src_dict.copy()
|
||||
company = d.pop("company", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
DO = TypeVar("DO", bound="ExtendedUserResultsPage")
|
||||
FZ = TypeVar("FZ", bound="ExtendedUserResultsPage")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -37,7 +37,7 @@ class ExtendedUserResultsPage:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[DO], src_dict: Dict[str, Any]) -> DO:
|
||||
def from_dict(cls: Type[FZ], src_dict: Dict[str, Any]) -> FZ:
|
||||
d = src_dict.copy()
|
||||
from ..models.extended_user import ExtendedUser
|
||||
|
||||
|
@ -11,7 +11,7 @@ from ..models.unit_length import UnitLength
|
||||
from ..models.uuid import Uuid
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
FZ = TypeVar("FZ", bound="FileCenterOfMass")
|
||||
GL = TypeVar("GL", bound="FileCenterOfMass")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -86,7 +86,7 @@ class FileCenterOfMass:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[FZ], src_dict: Dict[str, Any]) -> FZ:
|
||||
def from_dict(cls: Type[GL], src_dict: Dict[str, Any]) -> GL:
|
||||
d = src_dict.copy()
|
||||
_center_of_mass = d.pop("center_of_mass", UNSET)
|
||||
center_of_mass: Union[Unset, Point3d]
|
||||
|
@ -12,7 +12,7 @@ from ..models.output_format import OutputFormat
|
||||
from ..models.uuid import Uuid
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
GL = TypeVar("GL", bound="FileConversion")
|
||||
NN = TypeVar("NN", bound="FileConversion")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -100,7 +100,7 @@ class FileConversion:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[GL], src_dict: Dict[str, Any]) -> GL:
|
||||
def from_dict(cls: Type[NN], src_dict: Dict[str, Any]) -> NN:
|
||||
d = src_dict.copy()
|
||||
_completed_at = d.pop("completed_at", UNSET)
|
||||
completed_at: Union[Unset, datetime.datetime]
|
||||
|
@ -11,7 +11,7 @@ from ..models.unit_mass import UnitMass
|
||||
from ..models.uuid import Uuid
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
NN = TypeVar("NN", bound="FileDensity")
|
||||
OH = TypeVar("OH", bound="FileDensity")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -94,7 +94,7 @@ class FileDensity:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[NN], src_dict: Dict[str, Any]) -> NN:
|
||||
def from_dict(cls: Type[OH], src_dict: Dict[str, Any]) -> OH:
|
||||
d = src_dict.copy()
|
||||
_completed_at = d.pop("completed_at", UNSET)
|
||||
completed_at: Union[Unset, datetime.datetime]
|
||||
|
@ -11,7 +11,7 @@ from ..models.unit_mass import UnitMass
|
||||
from ..models.uuid import Uuid
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
OH = TypeVar("OH", bound="FileMass")
|
||||
VI = TypeVar("VI", bound="FileMass")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -94,7 +94,7 @@ class FileMass:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[OH], src_dict: Dict[str, Any]) -> OH:
|
||||
def from_dict(cls: Type[VI], src_dict: Dict[str, Any]) -> VI:
|
||||
d = src_dict.copy()
|
||||
_completed_at = d.pop("completed_at", UNSET)
|
||||
completed_at: Union[Unset, datetime.datetime]
|
||||
|
@ -10,7 +10,7 @@ from ..models.unit_area import UnitArea
|
||||
from ..models.uuid import Uuid
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
VI = TypeVar("VI", bound="FileSurfaceArea")
|
||||
ET = TypeVar("ET", bound="FileSurfaceArea")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -84,7 +84,7 @@ class FileSurfaceArea:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[VI], src_dict: Dict[str, Any]) -> VI:
|
||||
def from_dict(cls: Type[ET], src_dict: Dict[str, Any]) -> ET:
|
||||
d = src_dict.copy()
|
||||
_completed_at = d.pop("completed_at", UNSET)
|
||||
completed_at: Union[Unset, datetime.datetime]
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
ET = TypeVar("ET", bound="FileSystemMetadata")
|
||||
QF = TypeVar("QF", bound="FileSystemMetadata")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -29,7 +29,7 @@ class FileSystemMetadata:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[ET], src_dict: Dict[str, Any]) -> ET:
|
||||
def from_dict(cls: Type[QF], src_dict: Dict[str, Any]) -> QF:
|
||||
d = src_dict.copy()
|
||||
ok = d.pop("ok", UNSET)
|
||||
|
||||
|
@ -10,7 +10,7 @@ from ..models.unit_volume import UnitVolume
|
||||
from ..models.uuid import Uuid
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
QF = TypeVar("QF", bound="FileVolume")
|
||||
DI = TypeVar("DI", bound="FileVolume")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -84,7 +84,7 @@ class FileVolume:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[QF], src_dict: Dict[str, Any]) -> QF:
|
||||
def from_dict(cls: Type[DI], src_dict: Dict[str, Any]) -> DI:
|
||||
d = src_dict.copy()
|
||||
_completed_at = d.pop("completed_at", UNSET)
|
||||
completed_at: Union[Unset, datetime.datetime]
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
DI = TypeVar("DI", bound="Gateway")
|
||||
OJ = TypeVar("OJ", bound="Gateway")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -43,7 +43,7 @@ class Gateway:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[DI], src_dict: Dict[str, Any]) -> DI:
|
||||
def from_dict(cls: Type[OJ], src_dict: Dict[str, Any]) -> OJ:
|
||||
d = src_dict.copy()
|
||||
auth_timeout = d.pop("auth_timeout", UNSET)
|
||||
|
||||
|
71
kittycad/models/ice_server.py
Normal file
71
kittycad/models/ice_server.py
Normal file
@ -0,0 +1,71 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
|
||||
import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
UF = TypeVar("UF", bound="IceServer")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class IceServer:
|
||||
"""Representation of an ICE server used for STUN/TURN Used to initiate WebRTC connections based on <https://developer.mozilla.org/en-US/docs/Web/API/RTCIceServer>""" # noqa: E501
|
||||
|
||||
credential: Union[Unset, str] = UNSET
|
||||
urls: Union[Unset, List[str]] = UNSET
|
||||
username: Union[Unset, str] = UNSET
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
credential = self.credential
|
||||
urls: Union[Unset, List[str]] = UNSET
|
||||
if not isinstance(self.urls, Unset):
|
||||
urls = self.urls
|
||||
username = self.username
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if credential is not UNSET:
|
||||
field_dict["credential"] = credential
|
||||
if urls is not UNSET:
|
||||
field_dict["urls"] = urls
|
||||
if username is not UNSET:
|
||||
field_dict["username"] = username
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[UF], src_dict: Dict[str, Any]) -> UF:
|
||||
d = src_dict.copy()
|
||||
credential = d.pop("credential", UNSET)
|
||||
|
||||
urls = cast(List[str], d.pop("urls", UNSET))
|
||||
|
||||
username = d.pop("username", UNSET)
|
||||
|
||||
ice_server = cls(
|
||||
credential=credential,
|
||||
urls=urls,
|
||||
username=username,
|
||||
)
|
||||
|
||||
ice_server.additional_properties = d
|
||||
return ice_server
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
OJ = TypeVar("OJ", bound="IndexInfo")
|
||||
YF = TypeVar("YF", bound="IndexInfo")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -41,7 +41,7 @@ class IndexInfo:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[OJ], src_dict: Dict[str, Any]) -> OJ:
|
||||
def from_dict(cls: Type[YF], src_dict: Dict[str, Any]) -> YF:
|
||||
d = src_dict.copy()
|
||||
mirrors = cast(List[str], d.pop("mirrors", UNSET))
|
||||
|
||||
|
@ -6,7 +6,7 @@ from ..models.system import System
|
||||
from ..models.unit_length import UnitLength
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
UF = TypeVar("UF", bound="gltf")
|
||||
PY = TypeVar("PY", bound="gltf")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -28,7 +28,7 @@ class gltf:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[UF], src_dict: Dict[str, Any]) -> UF:
|
||||
def from_dict(cls: Type[PY], src_dict: Dict[str, Any]) -> PY:
|
||||
d = src_dict.copy()
|
||||
type = d.pop("type", UNSET)
|
||||
|
||||
@ -56,7 +56,7 @@ class gltf:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
YF = TypeVar("YF", bound="step")
|
||||
LK = TypeVar("LK", bound="step")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -78,7 +78,7 @@ class step:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[YF], src_dict: Dict[str, Any]) -> YF:
|
||||
def from_dict(cls: Type[LK], src_dict: Dict[str, Any]) -> LK:
|
||||
d = src_dict.copy()
|
||||
type = d.pop("type", UNSET)
|
||||
|
||||
@ -106,7 +106,7 @@ class step:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
PY = TypeVar("PY", bound="obj")
|
||||
AR = TypeVar("AR", bound="obj")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -138,7 +138,7 @@ class obj:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[PY], src_dict: Dict[str, Any]) -> PY:
|
||||
def from_dict(cls: Type[AR], src_dict: Dict[str, Any]) -> AR:
|
||||
d = src_dict.copy()
|
||||
_coords = d.pop("coords", UNSET)
|
||||
coords: Union[Unset, System]
|
||||
@ -182,7 +182,7 @@ class obj:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
LK = TypeVar("LK", bound="ply")
|
||||
WB = TypeVar("WB", bound="ply")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -214,7 +214,7 @@ class ply:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[LK], src_dict: Dict[str, Any]) -> LK:
|
||||
def from_dict(cls: Type[WB], src_dict: Dict[str, Any]) -> WB:
|
||||
d = src_dict.copy()
|
||||
_coords = d.pop("coords", UNSET)
|
||||
coords: Union[Unset, System]
|
||||
@ -258,7 +258,7 @@ class ply:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
AR = TypeVar("AR", bound="stl")
|
||||
KK = TypeVar("KK", bound="stl")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -290,7 +290,7 @@ class stl:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[AR], src_dict: Dict[str, Any]) -> AR:
|
||||
def from_dict(cls: Type[KK], src_dict: Dict[str, Any]) -> KK:
|
||||
d = src_dict.copy()
|
||||
_coords = d.pop("coords", UNSET)
|
||||
coords: Union[Unset, System]
|
||||
|
@ -8,7 +8,7 @@ from ..models.currency import Currency
|
||||
from ..models.invoice_status import InvoiceStatus
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
WB = TypeVar("WB", bound="Invoice")
|
||||
HC = TypeVar("HC", bound="Invoice")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -143,7 +143,7 @@ class Invoice:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[WB], src_dict: Dict[str, Any]) -> WB:
|
||||
def from_dict(cls: Type[HC], src_dict: Dict[str, Any]) -> HC:
|
||||
d = src_dict.copy()
|
||||
amount_due = d.pop("amount_due", UNSET)
|
||||
|
||||
|
@ -5,7 +5,7 @@ import attr
|
||||
from ..models.currency import Currency
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
KK = TypeVar("KK", bound="InvoiceLineItem")
|
||||
FM = TypeVar("FM", bound="InvoiceLineItem")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -49,7 +49,7 @@ class InvoiceLineItem:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[KK], src_dict: Dict[str, Any]) -> KK:
|
||||
def from_dict(cls: Type[FM], src_dict: Dict[str, Any]) -> FM:
|
||||
d = src_dict.copy()
|
||||
amount = d.pop("amount", UNSET)
|
||||
|
||||
|
@ -7,7 +7,7 @@ from ..models.jetstream_stats import JetstreamStats
|
||||
from ..models.meta_cluster_info import MetaClusterInfo
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
HC = TypeVar("HC", bound="Jetstream")
|
||||
PV = TypeVar("PV", bound="Jetstream")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -41,7 +41,7 @@ class Jetstream:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[HC], src_dict: Dict[str, Any]) -> HC:
|
||||
def from_dict(cls: Type[PV], src_dict: Dict[str, Any]) -> PV:
|
||||
d = src_dict.copy()
|
||||
_config = d.pop("config", UNSET)
|
||||
config: Union[Unset, JetstreamConfig]
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
FM = TypeVar("FM", bound="JetstreamApiStats")
|
||||
QI = TypeVar("QI", bound="JetstreamApiStats")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -35,7 +35,7 @@ class JetstreamApiStats:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[FM], src_dict: Dict[str, Any]) -> FM:
|
||||
def from_dict(cls: Type[QI], src_dict: Dict[str, Any]) -> QI:
|
||||
d = src_dict.copy()
|
||||
errors = d.pop("errors", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
PV = TypeVar("PV", bound="JetstreamConfig")
|
||||
TP = TypeVar("TP", bound="JetstreamConfig")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -39,7 +39,7 @@ class JetstreamConfig:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[PV], src_dict: Dict[str, Any]) -> PV:
|
||||
def from_dict(cls: Type[TP], src_dict: Dict[str, Any]) -> TP:
|
||||
d = src_dict.copy()
|
||||
domain = d.pop("domain", UNSET)
|
||||
|
||||
|
@ -5,7 +5,7 @@ import attr
|
||||
from ..models.jetstream_api_stats import JetstreamApiStats
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
QI = TypeVar("QI", bound="JetstreamStats")
|
||||
CF = TypeVar("CF", bound="JetstreamStats")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -53,7 +53,7 @@ class JetstreamStats:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[QI], src_dict: Dict[str, Any]) -> QI:
|
||||
def from_dict(cls: Type[CF], src_dict: Dict[str, Any]) -> CF:
|
||||
d = src_dict.copy()
|
||||
accounts = d.pop("accounts", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
TP = TypeVar("TP", bound="LeafNode")
|
||||
OM = TypeVar("OM", bound="LeafNode")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -39,7 +39,7 @@ class LeafNode:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[TP], src_dict: Dict[str, Any]) -> TP:
|
||||
def from_dict(cls: Type[OM], src_dict: Dict[str, Any]) -> OM:
|
||||
d = src_dict.copy()
|
||||
auth_timeout = d.pop("auth_timeout", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
CF = TypeVar("CF", bound="Mesh")
|
||||
EN = TypeVar("EN", bound="Mesh")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -25,7 +25,7 @@ class Mesh:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[CF], src_dict: Dict[str, Any]) -> CF:
|
||||
def from_dict(cls: Type[EN], src_dict: Dict[str, Any]) -> EN:
|
||||
d = src_dict.copy()
|
||||
mesh = d.pop("mesh", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
OM = TypeVar("OM", bound="MetaClusterInfo")
|
||||
RS = TypeVar("RS", bound="MetaClusterInfo")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -35,7 +35,7 @@ class MetaClusterInfo:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[OM], src_dict: Dict[str, Any]) -> OM:
|
||||
def from_dict(cls: Type[RS], src_dict: Dict[str, Any]) -> RS:
|
||||
d = src_dict.copy()
|
||||
cluster_size = d.pop("cluster_size", UNSET)
|
||||
|
||||
|
@ -11,7 +11,7 @@ from ..models.file_system_metadata import FileSystemMetadata
|
||||
from ..models.point_e_metadata import PointEMetadata
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
EN = TypeVar("EN", bound="Metadata")
|
||||
LR = TypeVar("LR", bound="Metadata")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -71,7 +71,7 @@ class Metadata:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[EN], src_dict: Dict[str, Any]) -> EN:
|
||||
def from_dict(cls: Type[LR], src_dict: Dict[str, Any]) -> LR:
|
||||
d = src_dict.copy()
|
||||
_cache = d.pop("cache", UNSET)
|
||||
cache: Union[Unset, CacheMetadata]
|
||||
|
@ -13,7 +13,7 @@ from ..models.point3d import Point3d
|
||||
from ..models.scene_selection_type import SceneSelectionType
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
RS = TypeVar("RS", bound="start_path")
|
||||
MP = TypeVar("MP", bound="start_path")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -35,7 +35,7 @@ class start_path:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[RS], src_dict: Dict[str, Any]) -> RS:
|
||||
def from_dict(cls: Type[MP], src_dict: Dict[str, Any]) -> MP:
|
||||
d = src_dict.copy()
|
||||
type = d.pop("type", UNSET)
|
||||
|
||||
@ -63,7 +63,7 @@ class start_path:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
LR = TypeVar("LR", bound="move_path_pen")
|
||||
WF = TypeVar("WF", bound="move_path_pen")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -95,7 +95,7 @@ class move_path_pen:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[LR], src_dict: Dict[str, Any]) -> LR:
|
||||
def from_dict(cls: Type[WF], src_dict: Dict[str, Any]) -> WF:
|
||||
d = src_dict.copy()
|
||||
_path = d.pop("path", UNSET)
|
||||
path: Union[Unset, ModelingCmdId]
|
||||
@ -139,7 +139,7 @@ class move_path_pen:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
MP = TypeVar("MP", bound="extend_path")
|
||||
RO = TypeVar("RO", bound="extend_path")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -171,7 +171,7 @@ class extend_path:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[MP], src_dict: Dict[str, Any]) -> MP:
|
||||
def from_dict(cls: Type[RO], src_dict: Dict[str, Any]) -> RO:
|
||||
d = src_dict.copy()
|
||||
_path = d.pop("path", UNSET)
|
||||
path: Union[Unset, ModelingCmdId]
|
||||
@ -215,7 +215,7 @@ class extend_path:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
WF = TypeVar("WF", bound="extrude")
|
||||
DN = TypeVar("DN", bound="extrude")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -250,7 +250,7 @@ class extrude:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[WF], src_dict: Dict[str, Any]) -> WF:
|
||||
def from_dict(cls: Type[DN], src_dict: Dict[str, Any]) -> DN:
|
||||
d = src_dict.copy()
|
||||
cap = d.pop("cap", UNSET)
|
||||
|
||||
@ -292,7 +292,7 @@ class extrude:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
RO = TypeVar("RO", bound="close_path")
|
||||
BA = TypeVar("BA", bound="close_path")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -318,7 +318,7 @@ class close_path:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[RO], src_dict: Dict[str, Any]) -> RO:
|
||||
def from_dict(cls: Type[BA], src_dict: Dict[str, Any]) -> BA:
|
||||
d = src_dict.copy()
|
||||
path_id = d.pop("path_id", UNSET)
|
||||
|
||||
@ -349,7 +349,7 @@ class close_path:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
DN = TypeVar("DN", bound="camera_drag_start")
|
||||
OR = TypeVar("OR", bound="camera_drag_start")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -381,7 +381,7 @@ class camera_drag_start:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[DN], src_dict: Dict[str, Any]) -> DN:
|
||||
def from_dict(cls: Type[OR], src_dict: Dict[str, Any]) -> OR:
|
||||
d = src_dict.copy()
|
||||
_interaction = d.pop("interaction", UNSET)
|
||||
interaction: Union[Unset, CameraDragInteractionType]
|
||||
@ -425,7 +425,7 @@ class camera_drag_start:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
BA = TypeVar("BA", bound="camera_drag_move")
|
||||
CB = TypeVar("CB", bound="camera_drag_move")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -461,7 +461,7 @@ class camera_drag_move:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[BA], src_dict: Dict[str, Any]) -> BA:
|
||||
def from_dict(cls: Type[CB], src_dict: Dict[str, Any]) -> CB:
|
||||
d = src_dict.copy()
|
||||
_interaction = d.pop("interaction", UNSET)
|
||||
interaction: Union[Unset, CameraDragInteractionType]
|
||||
@ -508,7 +508,7 @@ class camera_drag_move:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
OR = TypeVar("OR", bound="camera_drag_end")
|
||||
LC = TypeVar("LC", bound="camera_drag_end")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -540,7 +540,7 @@ class camera_drag_end:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[OR], src_dict: Dict[str, Any]) -> OR:
|
||||
def from_dict(cls: Type[LC], src_dict: Dict[str, Any]) -> LC:
|
||||
d = src_dict.copy()
|
||||
_interaction = d.pop("interaction", UNSET)
|
||||
interaction: Union[Unset, CameraDragInteractionType]
|
||||
@ -584,7 +584,7 @@ class camera_drag_end:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
CB = TypeVar("CB", bound="default_camera_look_at")
|
||||
TO = TypeVar("TO", bound="default_camera_look_at")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -621,7 +621,7 @@ class default_camera_look_at:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[CB], src_dict: Dict[str, Any]) -> CB:
|
||||
def from_dict(cls: Type[TO], src_dict: Dict[str, Any]) -> TO:
|
||||
d = src_dict.copy()
|
||||
_center = d.pop("center", UNSET)
|
||||
center: Union[Unset, Point3d]
|
||||
@ -673,7 +673,7 @@ class default_camera_look_at:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
LC = TypeVar("LC", bound="default_camera_enable_sketch_mode")
|
||||
ZP = TypeVar("ZP", bound="default_camera_enable_sketch_mode")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -722,7 +722,7 @@ class default_camera_enable_sketch_mode:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[LC], src_dict: Dict[str, Any]) -> LC:
|
||||
def from_dict(cls: Type[ZP], src_dict: Dict[str, Any]) -> ZP:
|
||||
d = src_dict.copy()
|
||||
animated = d.pop("animated", UNSET)
|
||||
|
||||
@ -783,7 +783,7 @@ class default_camera_enable_sketch_mode:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
TO = TypeVar("TO", bound="default_camera_disable_sketch_mode")
|
||||
EO = TypeVar("EO", bound="default_camera_disable_sketch_mode")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -805,7 +805,7 @@ class default_camera_disable_sketch_mode:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[TO], src_dict: Dict[str, Any]) -> TO:
|
||||
def from_dict(cls: Type[EO], src_dict: Dict[str, Any]) -> EO:
|
||||
d = src_dict.copy()
|
||||
type = d.pop("type", UNSET)
|
||||
|
||||
@ -833,7 +833,7 @@ class default_camera_disable_sketch_mode:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
ZP = TypeVar("ZP", bound="export")
|
||||
NY = TypeVar("NY", bound="export")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -866,7 +866,7 @@ class export:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[ZP], src_dict: Dict[str, Any]) -> ZP:
|
||||
def from_dict(cls: Type[NY], src_dict: Dict[str, Any]) -> NY:
|
||||
d = src_dict.copy()
|
||||
entity_ids = cast(List[str], d.pop("entity_ids", UNSET))
|
||||
|
||||
@ -905,7 +905,7 @@ class export:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
EO = TypeVar("EO", bound="entity_get_parent_id")
|
||||
QO = TypeVar("QO", bound="entity_get_parent_id")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -931,7 +931,7 @@ class entity_get_parent_id:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[EO], src_dict: Dict[str, Any]) -> EO:
|
||||
def from_dict(cls: Type[QO], src_dict: Dict[str, Any]) -> QO:
|
||||
d = src_dict.copy()
|
||||
entity_id = d.pop("entity_id", UNSET)
|
||||
|
||||
@ -962,7 +962,7 @@ class entity_get_parent_id:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
NY = TypeVar("NY", bound="entity_get_num_children")
|
||||
KX = TypeVar("KX", bound="entity_get_num_children")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -988,7 +988,7 @@ class entity_get_num_children:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[NY], src_dict: Dict[str, Any]) -> NY:
|
||||
def from_dict(cls: Type[KX], src_dict: Dict[str, Any]) -> KX:
|
||||
d = src_dict.copy()
|
||||
entity_id = d.pop("entity_id", UNSET)
|
||||
|
||||
@ -1019,7 +1019,7 @@ class entity_get_num_children:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
QO = TypeVar("QO", bound="entity_get_child_uuid")
|
||||
IZ = TypeVar("IZ", bound="entity_get_child_uuid")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -1049,7 +1049,7 @@ class entity_get_child_uuid:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[QO], src_dict: Dict[str, Any]) -> QO:
|
||||
def from_dict(cls: Type[IZ], src_dict: Dict[str, Any]) -> IZ:
|
||||
d = src_dict.copy()
|
||||
child_index = d.pop("child_index", UNSET)
|
||||
|
||||
@ -1083,7 +1083,7 @@ class entity_get_child_uuid:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
KX = TypeVar("KX", bound="entity_get_all_child_uuids")
|
||||
WO = TypeVar("WO", bound="entity_get_all_child_uuids")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -1109,7 +1109,7 @@ class entity_get_all_child_uuids:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[KX], src_dict: Dict[str, Any]) -> KX:
|
||||
def from_dict(cls: Type[WO], src_dict: Dict[str, Any]) -> WO:
|
||||
d = src_dict.copy()
|
||||
entity_id = d.pop("entity_id", UNSET)
|
||||
|
||||
@ -1140,7 +1140,7 @@ class entity_get_all_child_uuids:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
IZ = TypeVar("IZ", bound="edit_mode_enter")
|
||||
NK = TypeVar("NK", bound="edit_mode_enter")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -1166,7 +1166,7 @@ class edit_mode_enter:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[IZ], src_dict: Dict[str, Any]) -> IZ:
|
||||
def from_dict(cls: Type[NK], src_dict: Dict[str, Any]) -> NK:
|
||||
d = src_dict.copy()
|
||||
target = d.pop("target", UNSET)
|
||||
|
||||
@ -1197,7 +1197,7 @@ class edit_mode_enter:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
WO = TypeVar("WO", bound="edit_mode_exit")
|
||||
UQ = TypeVar("UQ", bound="edit_mode_exit")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -1219,7 +1219,7 @@ class edit_mode_exit:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[WO], src_dict: Dict[str, Any]) -> WO:
|
||||
def from_dict(cls: Type[UQ], src_dict: Dict[str, Any]) -> UQ:
|
||||
d = src_dict.copy()
|
||||
type = d.pop("type", UNSET)
|
||||
|
||||
@ -1247,7 +1247,7 @@ class edit_mode_exit:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
NK = TypeVar("NK", bound="select_with_point")
|
||||
QE = TypeVar("QE", bound="select_with_point")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -1279,7 +1279,7 @@ class select_with_point:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[NK], src_dict: Dict[str, Any]) -> NK:
|
||||
def from_dict(cls: Type[QE], src_dict: Dict[str, Any]) -> QE:
|
||||
d = src_dict.copy()
|
||||
_selected_at_window = d.pop("selected_at_window", UNSET)
|
||||
selected_at_window: Union[Unset, Point2d]
|
||||
@ -1323,7 +1323,7 @@ class select_with_point:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
UQ = TypeVar("UQ", bound="select_clear")
|
||||
XH = TypeVar("XH", bound="select_clear")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -1345,7 +1345,7 @@ class select_clear:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[UQ], src_dict: Dict[str, Any]) -> UQ:
|
||||
def from_dict(cls: Type[XH], src_dict: Dict[str, Any]) -> XH:
|
||||
d = src_dict.copy()
|
||||
type = d.pop("type", UNSET)
|
||||
|
||||
@ -1373,7 +1373,7 @@ class select_clear:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
QE = TypeVar("QE", bound="select_add")
|
||||
KT = TypeVar("KT", bound="select_add")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -1401,7 +1401,7 @@ class select_add:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[QE], src_dict: Dict[str, Any]) -> QE:
|
||||
def from_dict(cls: Type[KT], src_dict: Dict[str, Any]) -> KT:
|
||||
d = src_dict.copy()
|
||||
entities = cast(List[str], d.pop("entities", UNSET))
|
||||
|
||||
@ -1432,7 +1432,7 @@ class select_add:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
XH = TypeVar("XH", bound="select_remove")
|
||||
BV = TypeVar("BV", bound="select_remove")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -1460,7 +1460,7 @@ class select_remove:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[XH], src_dict: Dict[str, Any]) -> XH:
|
||||
def from_dict(cls: Type[BV], src_dict: Dict[str, Any]) -> BV:
|
||||
d = src_dict.copy()
|
||||
entities = cast(List[str], d.pop("entities", UNSET))
|
||||
|
||||
@ -1491,7 +1491,7 @@ class select_remove:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
KT = TypeVar("KT", bound="select_replace")
|
||||
GU = TypeVar("GU", bound="select_replace")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -1519,7 +1519,7 @@ class select_replace:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[KT], src_dict: Dict[str, Any]) -> KT:
|
||||
def from_dict(cls: Type[GU], src_dict: Dict[str, Any]) -> GU:
|
||||
d = src_dict.copy()
|
||||
entities = cast(List[str], d.pop("entities", UNSET))
|
||||
|
||||
@ -1550,7 +1550,7 @@ class select_replace:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
BV = TypeVar("BV", bound="select_get")
|
||||
SS = TypeVar("SS", bound="select_get")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -1572,7 +1572,7 @@ class select_get:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[BV], src_dict: Dict[str, Any]) -> BV:
|
||||
def from_dict(cls: Type[SS], src_dict: Dict[str, Any]) -> SS:
|
||||
d = src_dict.copy()
|
||||
type = d.pop("type", UNSET)
|
||||
|
||||
@ -1600,7 +1600,7 @@ class select_get:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
GU = TypeVar("GU", bound="highlight_set_entity")
|
||||
UP = TypeVar("UP", bound="highlight_set_entity")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -1631,7 +1631,7 @@ class highlight_set_entity:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[GU], src_dict: Dict[str, Any]) -> GU:
|
||||
def from_dict(cls: Type[UP], src_dict: Dict[str, Any]) -> UP:
|
||||
d = src_dict.copy()
|
||||
_selected_at_window = d.pop("selected_at_window", UNSET)
|
||||
selected_at_window: Union[Unset, Point2d]
|
||||
@ -1670,7 +1670,7 @@ class highlight_set_entity:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
SS = TypeVar("SS", bound="highlight_set_entities")
|
||||
AZ = TypeVar("AZ", bound="highlight_set_entities")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -1698,7 +1698,7 @@ class highlight_set_entities:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[SS], src_dict: Dict[str, Any]) -> SS:
|
||||
def from_dict(cls: Type[AZ], src_dict: Dict[str, Any]) -> AZ:
|
||||
d = src_dict.copy()
|
||||
entities = cast(List[str], d.pop("entities", UNSET))
|
||||
|
||||
@ -1729,7 +1729,7 @@ class highlight_set_entities:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
UP = TypeVar("UP", bound="new_annotation")
|
||||
DJ = TypeVar("DJ", bound="new_annotation")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -1765,7 +1765,7 @@ class new_annotation:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[UP], src_dict: Dict[str, Any]) -> UP:
|
||||
def from_dict(cls: Type[DJ], src_dict: Dict[str, Any]) -> DJ:
|
||||
d = src_dict.copy()
|
||||
_annotation_type = d.pop("annotation_type", UNSET)
|
||||
annotation_type: Union[Unset, AnnotationType]
|
||||
@ -1812,7 +1812,7 @@ class new_annotation:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
AZ = TypeVar("AZ", bound="update_annotation")
|
||||
WJ = TypeVar("WJ", bound="update_annotation")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -1843,7 +1843,7 @@ class update_annotation:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[AZ], src_dict: Dict[str, Any]) -> AZ:
|
||||
def from_dict(cls: Type[WJ], src_dict: Dict[str, Any]) -> WJ:
|
||||
d = src_dict.copy()
|
||||
annotation_id = d.pop("annotation_id", UNSET)
|
||||
|
||||
@ -1882,7 +1882,7 @@ class update_annotation:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
DJ = TypeVar("DJ", bound="object_visible")
|
||||
TR = TypeVar("TR", bound="object_visible")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -1912,7 +1912,7 @@ class object_visible:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[DJ], src_dict: Dict[str, Any]) -> DJ:
|
||||
def from_dict(cls: Type[TR], src_dict: Dict[str, Any]) -> TR:
|
||||
d = src_dict.copy()
|
||||
hidden = d.pop("hidden", UNSET)
|
||||
|
||||
@ -1946,7 +1946,7 @@ class object_visible:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
WJ = TypeVar("WJ", bound="get_entity_type")
|
||||
YD = TypeVar("YD", bound="get_entity_type")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -1972,7 +1972,7 @@ class get_entity_type:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[WJ], src_dict: Dict[str, Any]) -> WJ:
|
||||
def from_dict(cls: Type[YD], src_dict: Dict[str, Any]) -> YD:
|
||||
d = src_dict.copy()
|
||||
entity_id = d.pop("entity_id", UNSET)
|
||||
|
||||
@ -2003,7 +2003,7 @@ class get_entity_type:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
TR = TypeVar("TR", bound="solid3d_get_all_edge_faces")
|
||||
JF = TypeVar("JF", bound="solid3d_get_all_edge_faces")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -2033,7 +2033,7 @@ class solid3d_get_all_edge_faces:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[TR], src_dict: Dict[str, Any]) -> TR:
|
||||
def from_dict(cls: Type[JF], src_dict: Dict[str, Any]) -> JF:
|
||||
d = src_dict.copy()
|
||||
edge_id = d.pop("edge_id", UNSET)
|
||||
|
||||
@ -2067,7 +2067,7 @@ class solid3d_get_all_edge_faces:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
YD = TypeVar("YD", bound="solid3d_get_all_opposite_edges")
|
||||
VP = TypeVar("VP", bound="solid3d_get_all_opposite_edges")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -2102,7 +2102,7 @@ class solid3d_get_all_opposite_edges:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[YD], src_dict: Dict[str, Any]) -> YD:
|
||||
def from_dict(cls: Type[VP], src_dict: Dict[str, Any]) -> VP:
|
||||
d = src_dict.copy()
|
||||
_along_vector = d.pop("along_vector", UNSET)
|
||||
along_vector: Union[Unset, Point3d]
|
||||
@ -2144,7 +2144,7 @@ class solid3d_get_all_opposite_edges:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
JF = TypeVar("JF", bound="solid3d_get_opposite_edge")
|
||||
EL = TypeVar("EL", bound="solid3d_get_opposite_edge")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -2152,7 +2152,7 @@ class solid3d_get_opposite_edge:
|
||||
"""Gets the edge opposite the given edge, along the given face.""" # noqa: E501
|
||||
|
||||
edge_id: Union[Unset, str] = UNSET
|
||||
face_uuid: Union[Unset, str] = UNSET
|
||||
face_id: Union[Unset, str] = UNSET
|
||||
object_id: Union[Unset, str] = UNSET
|
||||
type: str = "solid3d_get_opposite_edge"
|
||||
|
||||
@ -2160,7 +2160,7 @@ class solid3d_get_opposite_edge:
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
edge_id = self.edge_id
|
||||
face_uuid = self.face_uuid
|
||||
face_id = self.face_id
|
||||
object_id = self.object_id
|
||||
type = self.type
|
||||
|
||||
@ -2169,8 +2169,8 @@ class solid3d_get_opposite_edge:
|
||||
field_dict.update({})
|
||||
if edge_id is not UNSET:
|
||||
field_dict["edge_id"] = edge_id
|
||||
if face_uuid is not UNSET:
|
||||
field_dict["face_uuid"] = face_uuid
|
||||
if face_id is not UNSET:
|
||||
field_dict["face_id"] = face_id
|
||||
if object_id is not UNSET:
|
||||
field_dict["object_id"] = object_id
|
||||
field_dict["type"] = type
|
||||
@ -2178,11 +2178,11 @@ class solid3d_get_opposite_edge:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[JF], src_dict: Dict[str, Any]) -> JF:
|
||||
def from_dict(cls: Type[EL], src_dict: Dict[str, Any]) -> EL:
|
||||
d = src_dict.copy()
|
||||
edge_id = d.pop("edge_id", UNSET)
|
||||
|
||||
face_uuid = d.pop("face_uuid", UNSET)
|
||||
face_id = d.pop("face_id", UNSET)
|
||||
|
||||
object_id = d.pop("object_id", UNSET)
|
||||
|
||||
@ -2190,7 +2190,7 @@ class solid3d_get_opposite_edge:
|
||||
|
||||
solid3d_get_opposite_edge = cls(
|
||||
edge_id=edge_id,
|
||||
face_uuid=face_uuid,
|
||||
face_id=face_id,
|
||||
object_id=object_id,
|
||||
type=type,
|
||||
)
|
||||
@ -2215,7 +2215,7 @@ class solid3d_get_opposite_edge:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
VP = TypeVar("VP", bound="solid3d_get_next_adjacent_edge")
|
||||
ZG = TypeVar("ZG", bound="solid3d_get_next_adjacent_edge")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -2223,7 +2223,7 @@ class solid3d_get_next_adjacent_edge:
|
||||
"""Gets the next adjacent edge for the given edge, along the given face.""" # noqa: E501
|
||||
|
||||
edge_id: Union[Unset, str] = UNSET
|
||||
face_uuid: Union[Unset, str] = UNSET
|
||||
face_id: Union[Unset, str] = UNSET
|
||||
object_id: Union[Unset, str] = UNSET
|
||||
type: str = "solid3d_get_next_adjacent_edge"
|
||||
|
||||
@ -2231,7 +2231,7 @@ class solid3d_get_next_adjacent_edge:
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
edge_id = self.edge_id
|
||||
face_uuid = self.face_uuid
|
||||
face_id = self.face_id
|
||||
object_id = self.object_id
|
||||
type = self.type
|
||||
|
||||
@ -2240,8 +2240,8 @@ class solid3d_get_next_adjacent_edge:
|
||||
field_dict.update({})
|
||||
if edge_id is not UNSET:
|
||||
field_dict["edge_id"] = edge_id
|
||||
if face_uuid is not UNSET:
|
||||
field_dict["face_uuid"] = face_uuid
|
||||
if face_id is not UNSET:
|
||||
field_dict["face_id"] = face_id
|
||||
if object_id is not UNSET:
|
||||
field_dict["object_id"] = object_id
|
||||
field_dict["type"] = type
|
||||
@ -2249,11 +2249,11 @@ class solid3d_get_next_adjacent_edge:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[VP], src_dict: Dict[str, Any]) -> VP:
|
||||
def from_dict(cls: Type[ZG], src_dict: Dict[str, Any]) -> ZG:
|
||||
d = src_dict.copy()
|
||||
edge_id = d.pop("edge_id", UNSET)
|
||||
|
||||
face_uuid = d.pop("face_uuid", UNSET)
|
||||
face_id = d.pop("face_id", UNSET)
|
||||
|
||||
object_id = d.pop("object_id", UNSET)
|
||||
|
||||
@ -2261,7 +2261,7 @@ class solid3d_get_next_adjacent_edge:
|
||||
|
||||
solid3d_get_next_adjacent_edge = cls(
|
||||
edge_id=edge_id,
|
||||
face_uuid=face_uuid,
|
||||
face_id=face_id,
|
||||
object_id=object_id,
|
||||
type=type,
|
||||
)
|
||||
@ -2286,7 +2286,7 @@ class solid3d_get_next_adjacent_edge:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
EL = TypeVar("EL", bound="solid3d_get_prev_adjacent_edge")
|
||||
LF = TypeVar("LF", bound="solid3d_get_prev_adjacent_edge")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -2294,7 +2294,7 @@ class solid3d_get_prev_adjacent_edge:
|
||||
"""Gets the previous adjacent edge for the given edge, along the given face.""" # noqa: E501
|
||||
|
||||
edge_id: Union[Unset, str] = UNSET
|
||||
face_uuid: Union[Unset, str] = UNSET
|
||||
face_id: Union[Unset, str] = UNSET
|
||||
object_id: Union[Unset, str] = UNSET
|
||||
type: str = "solid3d_get_prev_adjacent_edge"
|
||||
|
||||
@ -2302,7 +2302,7 @@ class solid3d_get_prev_adjacent_edge:
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
edge_id = self.edge_id
|
||||
face_uuid = self.face_uuid
|
||||
face_id = self.face_id
|
||||
object_id = self.object_id
|
||||
type = self.type
|
||||
|
||||
@ -2311,8 +2311,8 @@ class solid3d_get_prev_adjacent_edge:
|
||||
field_dict.update({})
|
||||
if edge_id is not UNSET:
|
||||
field_dict["edge_id"] = edge_id
|
||||
if face_uuid is not UNSET:
|
||||
field_dict["face_uuid"] = face_uuid
|
||||
if face_id is not UNSET:
|
||||
field_dict["face_id"] = face_id
|
||||
if object_id is not UNSET:
|
||||
field_dict["object_id"] = object_id
|
||||
field_dict["type"] = type
|
||||
@ -2320,11 +2320,11 @@ class solid3d_get_prev_adjacent_edge:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[EL], src_dict: Dict[str, Any]) -> EL:
|
||||
def from_dict(cls: Type[LF], src_dict: Dict[str, Any]) -> LF:
|
||||
d = src_dict.copy()
|
||||
edge_id = d.pop("edge_id", UNSET)
|
||||
|
||||
face_uuid = d.pop("face_uuid", UNSET)
|
||||
face_id = d.pop("face_id", UNSET)
|
||||
|
||||
object_id = d.pop("object_id", UNSET)
|
||||
|
||||
@ -2332,7 +2332,7 @@ class solid3d_get_prev_adjacent_edge:
|
||||
|
||||
solid3d_get_prev_adjacent_edge = cls(
|
||||
edge_id=edge_id,
|
||||
face_uuid=face_uuid,
|
||||
face_id=face_id,
|
||||
object_id=object_id,
|
||||
type=type,
|
||||
)
|
||||
|
@ -6,7 +6,7 @@ from ..models.modeling_cmd import ModelingCmd
|
||||
from ..models.modeling_cmd_id import ModelingCmdId
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
ZG = TypeVar("ZG", bound="ModelingCmdReq")
|
||||
CS = TypeVar("CS", bound="ModelingCmdReq")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -35,7 +35,7 @@ class ModelingCmdReq:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[ZG], src_dict: Dict[str, Any]) -> ZG:
|
||||
def from_dict(cls: Type[CS], src_dict: Dict[str, Any]) -> CS:
|
||||
d = src_dict.copy()
|
||||
_cmd = d.pop("cmd", UNSET)
|
||||
cmd: Union[Unset, ModelingCmd]
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
LF = TypeVar("LF", bound="ModelingCmdReqBatch")
|
||||
GN = TypeVar("GN", bound="ModelingCmdReqBatch")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -27,7 +27,7 @@ class ModelingCmdReqBatch:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[LF], src_dict: Dict[str, Any]) -> LF:
|
||||
def from_dict(cls: Type[GN], src_dict: Dict[str, Any]) -> GN:
|
||||
d = src_dict.copy()
|
||||
cmds = d.pop("cmds", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
CS = TypeVar("CS", bound="ModelingError")
|
||||
GD = TypeVar("GD", bound="ModelingError")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -39,7 +39,7 @@ class ModelingError:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[CS], src_dict: Dict[str, Any]) -> CS:
|
||||
def from_dict(cls: Type[GD], src_dict: Dict[str, Any]) -> GD:
|
||||
d = src_dict.copy()
|
||||
error_code = d.pop("error_code", UNSET)
|
||||
|
||||
|
@ -13,7 +13,7 @@ success = OkModelingCmdResponse
|
||||
error = ModelingError
|
||||
|
||||
|
||||
GN = TypeVar("GN", bound="cancelled")
|
||||
VJ = TypeVar("VJ", bound="cancelled")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -35,7 +35,7 @@ class cancelled:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[GN], src_dict: Dict[str, Any]) -> GN:
|
||||
def from_dict(cls: Type[VJ], src_dict: Dict[str, Any]) -> VJ:
|
||||
d = src_dict.copy()
|
||||
_what_failed = d.pop("what_failed", UNSET)
|
||||
what_failed: Union[Unset, ModelingCmdId]
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
GD = TypeVar("GD", bound="ModelingOutcomes")
|
||||
OX = TypeVar("OX", bound="ModelingOutcomes")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -27,7 +27,7 @@ class ModelingOutcomes:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[GD], src_dict: Dict[str, Any]) -> GD:
|
||||
def from_dict(cls: Type[OX], src_dict: Dict[str, Any]) -> OX:
|
||||
d = src_dict.copy()
|
||||
outcomes = d.pop("outcomes", UNSET)
|
||||
|
||||
|
@ -5,7 +5,7 @@ import attr
|
||||
from ..models.country_code import CountryCode
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
VJ = TypeVar("VJ", bound="NewAddress")
|
||||
YW = TypeVar("YW", bound="NewAddress")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -53,7 +53,7 @@ class NewAddress:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[VJ], src_dict: Dict[str, Any]) -> VJ:
|
||||
def from_dict(cls: Type[YW], src_dict: Dict[str, Any]) -> YW:
|
||||
d = src_dict.copy()
|
||||
city = d.pop("city", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
OX = TypeVar("OX", bound="OAuth2ClientInfo")
|
||||
QX = TypeVar("QX", bound="OAuth2ClientInfo")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -35,7 +35,7 @@ class OAuth2ClientInfo:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[OX], src_dict: Dict[str, Any]) -> OX:
|
||||
def from_dict(cls: Type[QX], src_dict: Dict[str, Any]) -> QX:
|
||||
d = src_dict.copy()
|
||||
csrf_token = d.pop("csrf_token", UNSET)
|
||||
|
||||
|
@ -5,7 +5,7 @@ import attr
|
||||
from ..models.entity_type import EntityType
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
YW = TypeVar("YW", bound="empty")
|
||||
NO = TypeVar("NO", bound="empty")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -27,7 +27,7 @@ class empty:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[YW], src_dict: Dict[str, Any]) -> YW:
|
||||
def from_dict(cls: Type[NO], src_dict: Dict[str, Any]) -> NO:
|
||||
d = src_dict.copy()
|
||||
type = d.pop("type", UNSET)
|
||||
|
||||
@ -55,7 +55,7 @@ class empty:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
QX = TypeVar("QX", bound="export")
|
||||
VX = TypeVar("VX", bound="export")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -87,7 +87,7 @@ class export:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[QX], src_dict: Dict[str, Any]) -> QX:
|
||||
def from_dict(cls: Type[VX], src_dict: Dict[str, Any]) -> VX:
|
||||
d = src_dict.copy()
|
||||
from ..models.export_file import ExportFile
|
||||
|
||||
@ -120,7 +120,7 @@ class export:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
NO = TypeVar("NO", bound="select_with_point")
|
||||
RG = TypeVar("RG", bound="select_with_point")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -146,7 +146,7 @@ class select_with_point:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[NO], src_dict: Dict[str, Any]) -> NO:
|
||||
def from_dict(cls: Type[RG], src_dict: Dict[str, Any]) -> RG:
|
||||
d = src_dict.copy()
|
||||
entity_id = d.pop("entity_id", UNSET)
|
||||
|
||||
@ -177,7 +177,7 @@ class select_with_point:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
VX = TypeVar("VX", bound="highlight_set_entity")
|
||||
IT = TypeVar("IT", bound="highlight_set_entity")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -207,7 +207,7 @@ class highlight_set_entity:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[VX], src_dict: Dict[str, Any]) -> VX:
|
||||
def from_dict(cls: Type[IT], src_dict: Dict[str, Any]) -> IT:
|
||||
d = src_dict.copy()
|
||||
entity_id = d.pop("entity_id", UNSET)
|
||||
|
||||
@ -241,7 +241,7 @@ class highlight_set_entity:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
RG = TypeVar("RG", bound="entity_get_child_uuid")
|
||||
LD = TypeVar("LD", bound="entity_get_child_uuid")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -267,7 +267,7 @@ class entity_get_child_uuid:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[RG], src_dict: Dict[str, Any]) -> RG:
|
||||
def from_dict(cls: Type[LD], src_dict: Dict[str, Any]) -> LD:
|
||||
d = src_dict.copy()
|
||||
entity_id = d.pop("entity_id", UNSET)
|
||||
|
||||
@ -298,7 +298,7 @@ class entity_get_child_uuid:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
IT = TypeVar("IT", bound="entity_get_num_children")
|
||||
UA = TypeVar("UA", bound="entity_get_num_children")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -324,7 +324,7 @@ class entity_get_num_children:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[IT], src_dict: Dict[str, Any]) -> IT:
|
||||
def from_dict(cls: Type[UA], src_dict: Dict[str, Any]) -> UA:
|
||||
d = src_dict.copy()
|
||||
num = d.pop("num", UNSET)
|
||||
|
||||
@ -355,7 +355,7 @@ class entity_get_num_children:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
LD = TypeVar("LD", bound="entity_get_parent_id")
|
||||
TN = TypeVar("TN", bound="entity_get_parent_id")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -381,7 +381,7 @@ class entity_get_parent_id:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[LD], src_dict: Dict[str, Any]) -> LD:
|
||||
def from_dict(cls: Type[TN], src_dict: Dict[str, Any]) -> TN:
|
||||
d = src_dict.copy()
|
||||
entity_id = d.pop("entity_id", UNSET)
|
||||
|
||||
@ -412,7 +412,7 @@ class entity_get_parent_id:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
UA = TypeVar("UA", bound="entity_get_all_child_uuids")
|
||||
MZ = TypeVar("MZ", bound="entity_get_all_child_uuids")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -440,7 +440,7 @@ class entity_get_all_child_uuids:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[UA], src_dict: Dict[str, Any]) -> UA:
|
||||
def from_dict(cls: Type[MZ], src_dict: Dict[str, Any]) -> MZ:
|
||||
d = src_dict.copy()
|
||||
entity_ids = cast(List[str], d.pop("entity_ids", UNSET))
|
||||
|
||||
@ -471,7 +471,7 @@ class entity_get_all_child_uuids:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
TN = TypeVar("TN", bound="select_get")
|
||||
UG = TypeVar("UG", bound="select_get")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -499,7 +499,7 @@ class select_get:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[TN], src_dict: Dict[str, Any]) -> TN:
|
||||
def from_dict(cls: Type[UG], src_dict: Dict[str, Any]) -> UG:
|
||||
d = src_dict.copy()
|
||||
entity_ids = cast(List[str], d.pop("entity_ids", UNSET))
|
||||
|
||||
@ -530,7 +530,7 @@ class select_get:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
MZ = TypeVar("MZ", bound="get_entity_type")
|
||||
CY = TypeVar("CY", bound="get_entity_type")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -557,7 +557,7 @@ class get_entity_type:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[MZ], src_dict: Dict[str, Any]) -> MZ:
|
||||
def from_dict(cls: Type[CY], src_dict: Dict[str, Any]) -> CY:
|
||||
d = src_dict.copy()
|
||||
_entity_type = d.pop("entity_type", UNSET)
|
||||
entity_type: Union[Unset, EntityType]
|
||||
@ -593,7 +593,7 @@ class get_entity_type:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
UG = TypeVar("UG", bound="solid3d_get_all_edge_faces")
|
||||
NZ = TypeVar("NZ", bound="solid3d_get_all_edge_faces")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -621,7 +621,7 @@ class solid3d_get_all_edge_faces:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[UG], src_dict: Dict[str, Any]) -> UG:
|
||||
def from_dict(cls: Type[NZ], src_dict: Dict[str, Any]) -> NZ:
|
||||
d = src_dict.copy()
|
||||
faces = cast(List[str], d.pop("faces", UNSET))
|
||||
|
||||
@ -652,7 +652,7 @@ class solid3d_get_all_edge_faces:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
CY = TypeVar("CY", bound="solid3d_get_all_opposite_edges")
|
||||
LI = TypeVar("LI", bound="solid3d_get_all_opposite_edges")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -680,7 +680,7 @@ class solid3d_get_all_opposite_edges:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[CY], src_dict: Dict[str, Any]) -> CY:
|
||||
def from_dict(cls: Type[LI], src_dict: Dict[str, Any]) -> LI:
|
||||
d = src_dict.copy()
|
||||
edges = cast(List[str], d.pop("edges", UNSET))
|
||||
|
||||
@ -711,7 +711,7 @@ class solid3d_get_all_opposite_edges:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
NZ = TypeVar("NZ", bound="solid3d_get_opposite_edge")
|
||||
LO = TypeVar("LO", bound="solid3d_get_opposite_edge")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -737,7 +737,7 @@ class solid3d_get_opposite_edge:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[NZ], src_dict: Dict[str, Any]) -> NZ:
|
||||
def from_dict(cls: Type[LO], src_dict: Dict[str, Any]) -> LO:
|
||||
d = src_dict.copy()
|
||||
edge = d.pop("edge", UNSET)
|
||||
|
||||
@ -768,7 +768,7 @@ class solid3d_get_opposite_edge:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
LI = TypeVar("LI", bound="solid3d_get_prev_adjacent_edge")
|
||||
XJ = TypeVar("XJ", bound="solid3d_get_prev_adjacent_edge")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -794,7 +794,7 @@ class solid3d_get_prev_adjacent_edge:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[LI], src_dict: Dict[str, Any]) -> LI:
|
||||
def from_dict(cls: Type[XJ], src_dict: Dict[str, Any]) -> XJ:
|
||||
d = src_dict.copy()
|
||||
edge = d.pop("edge", UNSET)
|
||||
|
||||
@ -825,7 +825,7 @@ class solid3d_get_prev_adjacent_edge:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
LO = TypeVar("LO", bound="solid3d_get_next_adjacent_edge")
|
||||
OW = TypeVar("OW", bound="solid3d_get_next_adjacent_edge")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -851,7 +851,7 @@ class solid3d_get_next_adjacent_edge:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[LO], src_dict: Dict[str, Any]) -> LO:
|
||||
def from_dict(cls: Type[OW], src_dict: Dict[str, Any]) -> OW:
|
||||
d = src_dict.copy()
|
||||
edge = d.pop("edge", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
XJ = TypeVar("XJ", bound="Onboarding")
|
||||
JQ = TypeVar("JQ", bound="Onboarding")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -37,7 +37,7 @@ class Onboarding:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[XJ], src_dict: Dict[str, Any]) -> XJ:
|
||||
def from_dict(cls: Type[JQ], src_dict: Dict[str, Any]) -> JQ:
|
||||
d = src_dict.copy()
|
||||
first_call_from__their_machine_date = d.pop(
|
||||
"first_call_from_their_machine_date", UNSET
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
OW = TypeVar("OW", bound="OutputFile")
|
||||
PQ = TypeVar("PQ", bound="OutputFile")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -31,7 +31,7 @@ class OutputFile:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[OW], src_dict: Dict[str, Any]) -> OW:
|
||||
def from_dict(cls: Type[PQ], src_dict: Dict[str, Any]) -> PQ:
|
||||
d = src_dict.copy()
|
||||
contents = d.pop("contents", UNSET)
|
||||
|
||||
|
@ -6,7 +6,7 @@ from ..models.storage import Storage
|
||||
from ..models.system import System
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
JQ = TypeVar("JQ", bound="gltf")
|
||||
IM = TypeVar("IM", bound="gltf")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -33,7 +33,7 @@ class gltf:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[JQ], src_dict: Dict[str, Any]) -> JQ:
|
||||
def from_dict(cls: Type[IM], src_dict: Dict[str, Any]) -> IM:
|
||||
d = src_dict.copy()
|
||||
_storage = d.pop("storage", UNSET)
|
||||
storage: Union[Unset, Storage]
|
||||
@ -69,7 +69,7 @@ class gltf:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
PQ = TypeVar("PQ", bound="obj")
|
||||
OU = TypeVar("OU", bound="obj")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -96,7 +96,7 @@ class obj:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[PQ], src_dict: Dict[str, Any]) -> PQ:
|
||||
def from_dict(cls: Type[OU], src_dict: Dict[str, Any]) -> OU:
|
||||
d = src_dict.copy()
|
||||
_coords = d.pop("coords", UNSET)
|
||||
coords: Union[Unset, System]
|
||||
@ -132,7 +132,7 @@ class obj:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
IM = TypeVar("IM", bound="ply")
|
||||
KL = TypeVar("KL", bound="ply")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -164,7 +164,7 @@ class ply:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[IM], src_dict: Dict[str, Any]) -> IM:
|
||||
def from_dict(cls: Type[KL], src_dict: Dict[str, Any]) -> KL:
|
||||
d = src_dict.copy()
|
||||
_coords = d.pop("coords", UNSET)
|
||||
coords: Union[Unset, System]
|
||||
@ -208,7 +208,7 @@ class ply:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
OU = TypeVar("OU", bound="step")
|
||||
XI = TypeVar("XI", bound="step")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -235,7 +235,7 @@ class step:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[OU], src_dict: Dict[str, Any]) -> OU:
|
||||
def from_dict(cls: Type[XI], src_dict: Dict[str, Any]) -> XI:
|
||||
d = src_dict.copy()
|
||||
_coords = d.pop("coords", UNSET)
|
||||
coords: Union[Unset, System]
|
||||
@ -271,7 +271,7 @@ class step:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
KL = TypeVar("KL", bound="stl")
|
||||
PO = TypeVar("PO", bound="stl")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -303,7 +303,7 @@ class stl:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[KL], src_dict: Dict[str, Any]) -> KL:
|
||||
def from_dict(cls: Type[PO], src_dict: Dict[str, Any]) -> PO:
|
||||
d = src_dict.copy()
|
||||
_coords = d.pop("coords", UNSET)
|
||||
coords: Union[Unset, System]
|
||||
|
@ -6,7 +6,7 @@ from ..models.point2d import Point2d
|
||||
from ..models.point3d import Point3d
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
XI = TypeVar("XI", bound="line")
|
||||
PS = TypeVar("PS", bound="line")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -33,7 +33,7 @@ class line:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[XI], src_dict: Dict[str, Any]) -> XI:
|
||||
def from_dict(cls: Type[PS], src_dict: Dict[str, Any]) -> PS:
|
||||
d = src_dict.copy()
|
||||
_end = d.pop("end", UNSET)
|
||||
end: Union[Unset, Point3d]
|
||||
@ -69,7 +69,7 @@ class line:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
PO = TypeVar("PO", bound="arc")
|
||||
WR = TypeVar("WR", bound="arc")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -108,7 +108,7 @@ class arc:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[PO], src_dict: Dict[str, Any]) -> PO:
|
||||
def from_dict(cls: Type[WR], src_dict: Dict[str, Any]) -> WR:
|
||||
d = src_dict.copy()
|
||||
angle_end = d.pop("angle_end", UNSET)
|
||||
|
||||
@ -153,7 +153,7 @@ class arc:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
PS = TypeVar("PS", bound="bezier")
|
||||
XL = TypeVar("XL", bound="bezier")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -190,7 +190,7 @@ class bezier:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[PS], src_dict: Dict[str, Any]) -> PS:
|
||||
def from_dict(cls: Type[XL], src_dict: Dict[str, Any]) -> XL:
|
||||
d = src_dict.copy()
|
||||
_control1 = d.pop("control1", UNSET)
|
||||
control1: Union[Unset, Point3d]
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
WR = TypeVar("WR", bound="PaymentIntent")
|
||||
ZX = TypeVar("ZX", bound="PaymentIntent")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -27,7 +27,7 @@ class PaymentIntent:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[WR], src_dict: Dict[str, Any]) -> WR:
|
||||
def from_dict(cls: Type[ZX], src_dict: Dict[str, Any]) -> ZX:
|
||||
d = src_dict.copy()
|
||||
client_secret = d.pop("client_secret", UNSET)
|
||||
|
||||
|
@ -9,7 +9,7 @@ from ..models.card_details import CardDetails
|
||||
from ..models.payment_method_type import PaymentMethodType
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
XL = TypeVar("XL", bound="PaymentMethod")
|
||||
FT = TypeVar("FT", bound="PaymentMethod")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -57,7 +57,7 @@ class PaymentMethod:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[XL], src_dict: Dict[str, Any]) -> XL:
|
||||
def from_dict(cls: Type[FT], src_dict: Dict[str, Any]) -> FT:
|
||||
d = src_dict.copy()
|
||||
_billing_info = d.pop("billing_info", UNSET)
|
||||
billing_info: Union[Unset, BillingInfo]
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
ZX = TypeVar("ZX", bound="PaymentMethodCardChecks")
|
||||
NX = TypeVar("NX", bound="PaymentMethodCardChecks")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -35,7 +35,7 @@ class PaymentMethodCardChecks:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[ZX], src_dict: Dict[str, Any]) -> ZX:
|
||||
def from_dict(cls: Type[NX], src_dict: Dict[str, Any]) -> NX:
|
||||
d = src_dict.copy()
|
||||
address_line1_check = d.pop("address_line1_check", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
FT = TypeVar("FT", bound="PluginsInfo")
|
||||
SC = TypeVar("SC", bound="PluginsInfo")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -50,7 +50,7 @@ class PluginsInfo:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[FT], src_dict: Dict[str, Any]) -> FT:
|
||||
def from_dict(cls: Type[SC], src_dict: Dict[str, Any]) -> SC:
|
||||
d = src_dict.copy()
|
||||
authorization = cast(List[str], d.pop("authorization", UNSET))
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
NX = TypeVar("NX", bound="Point2d")
|
||||
TX = TypeVar("TX", bound="Point2d")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -31,7 +31,7 @@ class Point2d:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[NX], src_dict: Dict[str, Any]) -> NX:
|
||||
def from_dict(cls: Type[TX], src_dict: Dict[str, Any]) -> TX:
|
||||
d = src_dict.copy()
|
||||
x = d.pop("x", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
SC = TypeVar("SC", bound="Point3d")
|
||||
JA = TypeVar("JA", bound="Point3d")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -35,7 +35,7 @@ class Point3d:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[SC], src_dict: Dict[str, Any]) -> SC:
|
||||
def from_dict(cls: Type[JA], src_dict: Dict[str, Any]) -> JA:
|
||||
d = src_dict.copy()
|
||||
x = d.pop("x", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
TX = TypeVar("TX", bound="PointEMetadata")
|
||||
SK = TypeVar("SK", bound="PointEMetadata")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -29,7 +29,7 @@ class PointEMetadata:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[TX], src_dict: Dict[str, Any]) -> TX:
|
||||
def from_dict(cls: Type[SK], src_dict: Dict[str, Any]) -> SK:
|
||||
d = src_dict.copy()
|
||||
ok = d.pop("ok", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
JA = TypeVar("JA", bound="Pong")
|
||||
UK = TypeVar("UK", bound="Pong")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -27,7 +27,7 @@ class Pong:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[JA], src_dict: Dict[str, Any]) -> JA:
|
||||
def from_dict(cls: Type[UK], src_dict: Dict[str, Any]) -> UK:
|
||||
d = src_dict.copy()
|
||||
message = d.pop("message", UNSET)
|
||||
|
||||
|
64
kittycad/models/raw_file.py
Normal file
64
kittycad/models/raw_file.py
Normal file
@ -0,0 +1,64 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
|
||||
import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
CX = TypeVar("CX", bound="RawFile")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class RawFile:
|
||||
"""A raw file with unencoded contents to be passed over binary websockets.""" # noqa: E501
|
||||
|
||||
contents: Union[Unset, List[int]] = UNSET
|
||||
name: Union[Unset, str] = UNSET
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
contents: Union[Unset, List[int]] = UNSET
|
||||
if not isinstance(self.contents, Unset):
|
||||
contents = self.contents
|
||||
name = self.name
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if contents is not UNSET:
|
||||
field_dict["contents"] = contents
|
||||
if name is not UNSET:
|
||||
field_dict["name"] = name
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[CX], src_dict: Dict[str, Any]) -> CX:
|
||||
d = src_dict.copy()
|
||||
contents = cast(List[int], d.pop("contents", UNSET))
|
||||
|
||||
name = d.pop("name", UNSET)
|
||||
|
||||
raw_file = cls(
|
||||
contents=contents,
|
||||
name=name,
|
||||
)
|
||||
|
||||
raw_file.additional_properties = d
|
||||
return raw_file
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
SK = TypeVar("SK", bound="RegistryServiceConfig")
|
||||
MT = TypeVar("MT", bound="RegistryServiceConfig")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -59,7 +59,7 @@ class RegistryServiceConfig:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[SK], src_dict: Dict[str, Any]) -> SK:
|
||||
def from_dict(cls: Type[MT], src_dict: Dict[str, Any]) -> MT:
|
||||
d = src_dict.copy()
|
||||
allow_nondistributable_artifacts_cid_rs = cast(
|
||||
List[str], d.pop("allow_nondistributable_artifacts_cid_rs", UNSET)
|
||||
|
139
kittycad/models/rtc_ice_candidate.py
Normal file
139
kittycad/models/rtc_ice_candidate.py
Normal file
@ -0,0 +1,139 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..models.rtc_ice_candidate_type import RtcIceCandidateType
|
||||
from ..models.rtc_ice_protocol import RtcIceProtocol
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
LJ = TypeVar("LJ", bound="RtcIceCandidate")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class RtcIceCandidate:
|
||||
"""ICECandidate represents a ice candidate""" # noqa: E501
|
||||
|
||||
address: Union[Unset, str] = UNSET
|
||||
component: Union[Unset, int] = UNSET
|
||||
foundation: Union[Unset, str] = UNSET
|
||||
port: Union[Unset, int] = UNSET
|
||||
priority: Union[Unset, int] = UNSET
|
||||
protocol: Union[Unset, RtcIceProtocol] = UNSET
|
||||
related_address: Union[Unset, str] = UNSET
|
||||
related_port: Union[Unset, int] = UNSET
|
||||
stats_id: Union[Unset, str] = UNSET
|
||||
tcp_type: Union[Unset, str] = UNSET
|
||||
typ: Union[Unset, RtcIceCandidateType] = UNSET
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
address = self.address
|
||||
component = self.component
|
||||
foundation = self.foundation
|
||||
port = self.port
|
||||
priority = self.priority
|
||||
if not isinstance(self.protocol, Unset):
|
||||
protocol = self.protocol
|
||||
related_address = self.related_address
|
||||
related_port = self.related_port
|
||||
stats_id = self.stats_id
|
||||
tcp_type = self.tcp_type
|
||||
if not isinstance(self.typ, Unset):
|
||||
typ = self.typ
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if address is not UNSET:
|
||||
field_dict["address"] = address
|
||||
if component is not UNSET:
|
||||
field_dict["component"] = component
|
||||
if foundation is not UNSET:
|
||||
field_dict["foundation"] = foundation
|
||||
if port is not UNSET:
|
||||
field_dict["port"] = port
|
||||
if priority is not UNSET:
|
||||
field_dict["priority"] = priority
|
||||
if protocol is not UNSET:
|
||||
field_dict["protocol"] = protocol
|
||||
if related_address is not UNSET:
|
||||
field_dict["related_address"] = related_address
|
||||
if related_port is not UNSET:
|
||||
field_dict["related_port"] = related_port
|
||||
if stats_id is not UNSET:
|
||||
field_dict["stats_id"] = stats_id
|
||||
if tcp_type is not UNSET:
|
||||
field_dict["tcp_type"] = tcp_type
|
||||
if typ is not UNSET:
|
||||
field_dict["typ"] = typ
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[LJ], src_dict: Dict[str, Any]) -> LJ:
|
||||
d = src_dict.copy()
|
||||
address = d.pop("address", UNSET)
|
||||
|
||||
component = d.pop("component", UNSET)
|
||||
|
||||
foundation = d.pop("foundation", UNSET)
|
||||
|
||||
port = d.pop("port", UNSET)
|
||||
|
||||
priority = d.pop("priority", UNSET)
|
||||
|
||||
_protocol = d.pop("protocol", UNSET)
|
||||
protocol: Union[Unset, RtcIceProtocol]
|
||||
if isinstance(_protocol, Unset):
|
||||
protocol = UNSET
|
||||
else:
|
||||
protocol = _protocol # type: ignore[arg-type]
|
||||
|
||||
related_address = d.pop("related_address", UNSET)
|
||||
|
||||
related_port = d.pop("related_port", UNSET)
|
||||
|
||||
stats_id = d.pop("stats_id", UNSET)
|
||||
|
||||
tcp_type = d.pop("tcp_type", UNSET)
|
||||
|
||||
_typ = d.pop("typ", UNSET)
|
||||
typ: Union[Unset, RtcIceCandidateType]
|
||||
if isinstance(_typ, Unset):
|
||||
typ = UNSET
|
||||
else:
|
||||
typ = _typ # type: ignore[arg-type]
|
||||
|
||||
rtc_ice_candidate = cls(
|
||||
address=address,
|
||||
component=component,
|
||||
foundation=foundation,
|
||||
port=port,
|
||||
priority=priority,
|
||||
protocol=protocol,
|
||||
related_address=related_address,
|
||||
related_port=related_port,
|
||||
stats_id=stats_id,
|
||||
tcp_type=tcp_type,
|
||||
typ=typ,
|
||||
)
|
||||
|
||||
rtc_ice_candidate.additional_properties = d
|
||||
return rtc_ice_candidate
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
76
kittycad/models/rtc_ice_candidate_init.py
Normal file
76
kittycad/models/rtc_ice_candidate_init.py
Normal file
@ -0,0 +1,76 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
TF = TypeVar("TF", bound="RtcIceCandidateInit")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class RtcIceCandidateInit:
|
||||
"""ICECandidateInit is used to serialize ice candidates""" # noqa: E501
|
||||
|
||||
candidate: Union[Unset, str] = UNSET
|
||||
sdp_m_line_index: Union[Unset, int] = UNSET
|
||||
sdp_mid: Union[Unset, str] = UNSET
|
||||
username_fragment: Union[Unset, str] = UNSET
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
candidate = self.candidate
|
||||
sdp_m_line_index = self.sdp_m_line_index
|
||||
sdp_mid = self.sdp_mid
|
||||
username_fragment = self.username_fragment
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if candidate is not UNSET:
|
||||
field_dict["candidate"] = candidate
|
||||
if sdp_m_line_index is not UNSET:
|
||||
field_dict["sdpMLineIndex"] = sdp_m_line_index
|
||||
if sdp_mid is not UNSET:
|
||||
field_dict["sdpMid"] = sdp_mid
|
||||
if username_fragment is not UNSET:
|
||||
field_dict["usernameFragment"] = username_fragment
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[TF], src_dict: Dict[str, Any]) -> TF:
|
||||
d = src_dict.copy()
|
||||
candidate = d.pop("candidate", UNSET)
|
||||
|
||||
sdp_m_line_index = d.pop("sdpMLineIndex", UNSET)
|
||||
|
||||
sdp_mid = d.pop("sdpMid", UNSET)
|
||||
|
||||
username_fragment = d.pop("usernameFragment", UNSET)
|
||||
|
||||
rtc_ice_candidate_init = cls(
|
||||
candidate=candidate,
|
||||
sdp_m_line_index=sdp_m_line_index,
|
||||
sdp_mid=sdp_mid,
|
||||
username_fragment=username_fragment,
|
||||
)
|
||||
|
||||
rtc_ice_candidate_init.additional_properties = d
|
||||
return rtc_ice_candidate_init
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
19
kittycad/models/rtc_ice_candidate_type.py
Normal file
19
kittycad/models/rtc_ice_candidate_type.py
Normal file
@ -0,0 +1,19 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class RtcIceCandidateType(str, Enum):
|
||||
"""ICECandidateType represents the type of the ICE candidate used.""" # noqa: E501
|
||||
|
||||
"""# Unspecified indicates that the candidate type is unspecified. """ # noqa: E501
|
||||
UNSPECIFIED = "unspecified"
|
||||
"""# ICECandidateTypeHost indicates that the candidate is of Host type as described in <https://tools.ietf.org/html/rfc8445#section-5.1.1.1>. A candidate obtained by binding to a specific port from an IP address on the host. This includes IP addresses on physical interfaces and logical ones, such as ones obtained through VPNs. """ # noqa: E501
|
||||
HOST = "host"
|
||||
"""# ICECandidateTypeSrflx indicates the the candidate is of Server Reflexive type as described <https://tools.ietf.org/html/rfc8445#section-5.1.1.2>. A candidate type whose IP address and port are a binding allocated by a NAT for an ICE agent after it sends a packet through the NAT to a server, such as a STUN server. """ # noqa: E501
|
||||
SRFLX = "srflx"
|
||||
"""# ICECandidateTypePrflx indicates that the candidate is of Peer Reflexive type. A candidate type whose IP address and port are a binding allocated by a NAT for an ICE agent after it sends a packet through the NAT to its peer. """ # noqa: E501
|
||||
PRFLX = "prflx"
|
||||
"""# ICECandidateTypeRelay indicates the the candidate is of Relay type as described in <https://tools.ietf.org/html/rfc8445#section-5.1.1.2>. A candidate type obtained from a relay server, such as a TURN server. """ # noqa: E501
|
||||
RELAY = "relay"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
15
kittycad/models/rtc_ice_protocol.py
Normal file
15
kittycad/models/rtc_ice_protocol.py
Normal file
@ -0,0 +1,15 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class RtcIceProtocol(str, Enum):
|
||||
"""ICEProtocol indicates the transport protocol type that is used in the ice.URL structure.""" # noqa: E501
|
||||
|
||||
"""# Unspecified indicates that the protocol is unspecified. """ # noqa: E501
|
||||
UNSPECIFIED = "unspecified"
|
||||
"""# UDP indicates the URL uses a UDP transport. """ # noqa: E501
|
||||
UDP = "udp"
|
||||
"""# TCP indicates the URL uses a TCP transport. """ # noqa: E501
|
||||
TCP = "tcp"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
19
kittycad/models/rtc_sdp_type.py
Normal file
19
kittycad/models/rtc_sdp_type.py
Normal file
@ -0,0 +1,19 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class RtcSdpType(str, Enum):
|
||||
"""SDPType describes the type of an SessionDescription.""" # noqa: E501
|
||||
|
||||
"""# Unspecified indicates that the type is unspecified. """ # noqa: E501
|
||||
UNSPECIFIED = "unspecified"
|
||||
"""# indicates that a description MUST be treated as an SDP offer. """ # noqa: E501
|
||||
OFFER = "offer"
|
||||
"""# indicates that a description MUST be treated as an SDP answer, but not a final answer. A description used as an SDP pranswer may be applied as a response to an SDP offer, or an update to a previously sent SDP pranswer. """ # noqa: E501
|
||||
PRANSWER = "pranswer"
|
||||
"""# indicates that a description MUST be treated as an SDP final answer, and the offer-answer exchange MUST be considered complete. A description used as an SDP answer may be applied as a response to an SDP offer or as an update to a previously sent SDP pranswer. """ # noqa: E501
|
||||
ANSWER = "answer"
|
||||
"""# indicates that a description MUST be treated as canceling the current SDP negotiation and moving the SDP offer and answer back to what it was in the previous stable state. Note the local or remote SDP descriptions in the previous stable state could be null if there has not yet been a successful offer-answer negotiation. """ # noqa: E501
|
||||
ROLLBACK = "rollback"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
69
kittycad/models/rtc_session_description.py
Normal file
69
kittycad/models/rtc_session_description.py
Normal file
@ -0,0 +1,69 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..models.rtc_sdp_type import RtcSdpType
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
HF = TypeVar("HF", bound="RtcSessionDescription")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class RtcSessionDescription:
|
||||
"""SessionDescription is used to expose local and remote session descriptions.""" # noqa: E501
|
||||
|
||||
sdp: Union[Unset, str] = UNSET
|
||||
type: Union[Unset, RtcSdpType] = UNSET
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
sdp = self.sdp
|
||||
if not isinstance(self.type, Unset):
|
||||
type = self.type
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if sdp is not UNSET:
|
||||
field_dict["sdp"] = sdp
|
||||
if type is not UNSET:
|
||||
field_dict["type"] = type
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[HF], src_dict: Dict[str, Any]) -> HF:
|
||||
d = src_dict.copy()
|
||||
sdp = d.pop("sdp", UNSET)
|
||||
|
||||
_type = d.pop("type", UNSET)
|
||||
type: Union[Unset, RtcSdpType]
|
||||
if isinstance(_type, Unset):
|
||||
type = UNSET
|
||||
else:
|
||||
type = _type # type: ignore[arg-type]
|
||||
|
||||
rtc_session_description = cls(
|
||||
sdp=sdp,
|
||||
type=type,
|
||||
)
|
||||
|
||||
rtc_session_description.additional_properties = d
|
||||
return rtc_session_description
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
UK = TypeVar("UK", bound="Runtime")
|
||||
JD = TypeVar("JD", bound="Runtime")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -33,7 +33,7 @@ class Runtime:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[UK], src_dict: Dict[str, Any]) -> UK:
|
||||
def from_dict(cls: Type[JD], src_dict: Dict[str, Any]) -> JD:
|
||||
d = src_dict.copy()
|
||||
path = d.pop("path", UNSET)
|
||||
|
||||
|
@ -7,7 +7,7 @@ from dateutil.parser import isoparse
|
||||
from ..models.uuid import Uuid
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
CX = TypeVar("CX", bound="Session")
|
||||
RZ = TypeVar("RZ", bound="Session")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -58,7 +58,7 @@ class Session:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[CX], src_dict: Dict[str, Any]) -> CX:
|
||||
def from_dict(cls: Type[RZ], src_dict: Dict[str, Any]) -> RZ:
|
||||
d = src_dict.copy()
|
||||
_created_at = d.pop("created_at", UNSET)
|
||||
created_at: Union[Unset, datetime.datetime]
|
||||
|
3
kittycad/models/snake_case_result.py
Normal file
3
kittycad/models/snake_case_result.py
Normal file
@ -0,0 +1,3 @@
|
||||
from typing import Any
|
||||
|
||||
SnakeCaseResult = Any
|
@ -5,7 +5,7 @@ import attr
|
||||
from ..models.axis_direction_pair import AxisDirectionPair
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
MT = TypeVar("MT", bound="System")
|
||||
BH = TypeVar("BH", bound="System")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -41,7 +41,7 @@ class System:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[MT], src_dict: Dict[str, Any]) -> MT:
|
||||
def from_dict(cls: Type[BH], src_dict: Dict[str, Any]) -> BH:
|
||||
d = src_dict.copy()
|
||||
_forward = d.pop("forward", UNSET)
|
||||
forward: Union[Unset, AxisDirectionPair]
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
LJ = TypeVar("LJ", bound="SystemInfoDefaultAddressPools")
|
||||
SX = TypeVar("SX", bound="SystemInfoDefaultAddressPools")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -29,7 +29,7 @@ class SystemInfoDefaultAddressPools:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[LJ], src_dict: Dict[str, Any]) -> LJ:
|
||||
def from_dict(cls: Type[SX], src_dict: Dict[str, Any]) -> SX:
|
||||
d = src_dict.copy()
|
||||
base = d.pop("base", UNSET)
|
||||
|
||||
|
@ -9,7 +9,7 @@ from ..models.unit_angle import UnitAngle
|
||||
from ..models.uuid import Uuid
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
TF = TypeVar("TF", bound="UnitAngleConversion")
|
||||
CN = TypeVar("CN", bound="UnitAngleConversion")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -87,7 +87,7 @@ class UnitAngleConversion:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[TF], src_dict: Dict[str, Any]) -> TF:
|
||||
def from_dict(cls: Type[CN], src_dict: Dict[str, Any]) -> CN:
|
||||
d = src_dict.copy()
|
||||
_completed_at = d.pop("completed_at", UNSET)
|
||||
completed_at: Union[Unset, datetime.datetime]
|
||||
|
@ -9,7 +9,7 @@ from ..models.unit_area import UnitArea
|
||||
from ..models.uuid import Uuid
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
HF = TypeVar("HF", bound="UnitAreaConversion")
|
||||
GS = TypeVar("GS", bound="UnitAreaConversion")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -87,7 +87,7 @@ class UnitAreaConversion:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[HF], src_dict: Dict[str, Any]) -> HF:
|
||||
def from_dict(cls: Type[GS], src_dict: Dict[str, Any]) -> GS:
|
||||
d = src_dict.copy()
|
||||
_completed_at = d.pop("completed_at", UNSET)
|
||||
completed_at: Union[Unset, datetime.datetime]
|
||||
|
@ -9,7 +9,7 @@ from ..models.unit_current import UnitCurrent
|
||||
from ..models.uuid import Uuid
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
JD = TypeVar("JD", bound="UnitCurrentConversion")
|
||||
SO = TypeVar("SO", bound="UnitCurrentConversion")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -87,7 +87,7 @@ class UnitCurrentConversion:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[JD], src_dict: Dict[str, Any]) -> JD:
|
||||
def from_dict(cls: Type[SO], src_dict: Dict[str, Any]) -> SO:
|
||||
d = src_dict.copy()
|
||||
_completed_at = d.pop("completed_at", UNSET)
|
||||
completed_at: Union[Unset, datetime.datetime]
|
||||
|
@ -9,7 +9,7 @@ from ..models.unit_energy import UnitEnergy
|
||||
from ..models.uuid import Uuid
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
RZ = TypeVar("RZ", bound="UnitEnergyConversion")
|
||||
ZS = TypeVar("ZS", bound="UnitEnergyConversion")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -87,7 +87,7 @@ class UnitEnergyConversion:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[RZ], src_dict: Dict[str, Any]) -> RZ:
|
||||
def from_dict(cls: Type[ZS], src_dict: Dict[str, Any]) -> ZS:
|
||||
d = src_dict.copy()
|
||||
_completed_at = d.pop("completed_at", UNSET)
|
||||
completed_at: Union[Unset, datetime.datetime]
|
||||
|
@ -9,7 +9,7 @@ from ..models.unit_force import UnitForce
|
||||
from ..models.uuid import Uuid
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
BH = TypeVar("BH", bound="UnitForceConversion")
|
||||
AM = TypeVar("AM", bound="UnitForceConversion")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -87,7 +87,7 @@ class UnitForceConversion:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[BH], src_dict: Dict[str, Any]) -> BH:
|
||||
def from_dict(cls: Type[AM], src_dict: Dict[str, Any]) -> AM:
|
||||
d = src_dict.copy()
|
||||
_completed_at = d.pop("completed_at", UNSET)
|
||||
completed_at: Union[Unset, datetime.datetime]
|
||||
|
@ -9,7 +9,7 @@ from ..models.unit_frequency import UnitFrequency
|
||||
from ..models.uuid import Uuid
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
SX = TypeVar("SX", bound="UnitFrequencyConversion")
|
||||
GK = TypeVar("GK", bound="UnitFrequencyConversion")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -87,7 +87,7 @@ class UnitFrequencyConversion:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[SX], src_dict: Dict[str, Any]) -> SX:
|
||||
def from_dict(cls: Type[GK], src_dict: Dict[str, Any]) -> GK:
|
||||
d = src_dict.copy()
|
||||
_completed_at = d.pop("completed_at", UNSET)
|
||||
completed_at: Union[Unset, datetime.datetime]
|
||||
|
@ -9,7 +9,7 @@ from ..models.unit_length import UnitLength
|
||||
from ..models.uuid import Uuid
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
CN = TypeVar("CN", bound="UnitLengthConversion")
|
||||
SG = TypeVar("SG", bound="UnitLengthConversion")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -87,7 +87,7 @@ class UnitLengthConversion:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[CN], src_dict: Dict[str, Any]) -> CN:
|
||||
def from_dict(cls: Type[SG], src_dict: Dict[str, Any]) -> SG:
|
||||
d = src_dict.copy()
|
||||
_completed_at = d.pop("completed_at", UNSET)
|
||||
completed_at: Union[Unset, datetime.datetime]
|
||||
|
@ -9,7 +9,7 @@ from ..models.unit_mass import UnitMass
|
||||
from ..models.uuid import Uuid
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
GS = TypeVar("GS", bound="UnitMassConversion")
|
||||
QZ = TypeVar("QZ", bound="UnitMassConversion")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -87,7 +87,7 @@ class UnitMassConversion:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[GS], src_dict: Dict[str, Any]) -> GS:
|
||||
def from_dict(cls: Type[QZ], src_dict: Dict[str, Any]) -> QZ:
|
||||
d = src_dict.copy()
|
||||
_completed_at = d.pop("completed_at", UNSET)
|
||||
completed_at: Union[Unset, datetime.datetime]
|
||||
|
@ -9,7 +9,7 @@ from ..models.unit_power import UnitPower
|
||||
from ..models.uuid import Uuid
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
SO = TypeVar("SO", bound="UnitPowerConversion")
|
||||
SY = TypeVar("SY", bound="UnitPowerConversion")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -87,7 +87,7 @@ class UnitPowerConversion:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[SO], src_dict: Dict[str, Any]) -> SO:
|
||||
def from_dict(cls: Type[SY], src_dict: Dict[str, Any]) -> SY:
|
||||
d = src_dict.copy()
|
||||
_completed_at = d.pop("completed_at", UNSET)
|
||||
completed_at: Union[Unset, datetime.datetime]
|
||||
|
@ -9,7 +9,7 @@ from ..models.unit_pressure import UnitPressure
|
||||
from ..models.uuid import Uuid
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
ZS = TypeVar("ZS", bound="UnitPressureConversion")
|
||||
YK = TypeVar("YK", bound="UnitPressureConversion")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -87,7 +87,7 @@ class UnitPressureConversion:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[ZS], src_dict: Dict[str, Any]) -> ZS:
|
||||
def from_dict(cls: Type[YK], src_dict: Dict[str, Any]) -> YK:
|
||||
d = src_dict.copy()
|
||||
_completed_at = d.pop("completed_at", UNSET)
|
||||
completed_at: Union[Unset, datetime.datetime]
|
||||
|
@ -9,7 +9,7 @@ from ..models.unit_temperature import UnitTemperature
|
||||
from ..models.uuid import Uuid
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
AM = TypeVar("AM", bound="UnitTemperatureConversion")
|
||||
WS = TypeVar("WS", bound="UnitTemperatureConversion")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -87,7 +87,7 @@ class UnitTemperatureConversion:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[AM], src_dict: Dict[str, Any]) -> AM:
|
||||
def from_dict(cls: Type[WS], src_dict: Dict[str, Any]) -> WS:
|
||||
d = src_dict.copy()
|
||||
_completed_at = d.pop("completed_at", UNSET)
|
||||
completed_at: Union[Unset, datetime.datetime]
|
||||
|
@ -9,7 +9,7 @@ from ..models.unit_torque import UnitTorque
|
||||
from ..models.uuid import Uuid
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
GK = TypeVar("GK", bound="UnitTorqueConversion")
|
||||
SL = TypeVar("SL", bound="UnitTorqueConversion")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -87,7 +87,7 @@ class UnitTorqueConversion:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[GK], src_dict: Dict[str, Any]) -> GK:
|
||||
def from_dict(cls: Type[SL], src_dict: Dict[str, Any]) -> SL:
|
||||
d = src_dict.copy()
|
||||
_completed_at = d.pop("completed_at", UNSET)
|
||||
completed_at: Union[Unset, datetime.datetime]
|
||||
|
@ -9,7 +9,7 @@ from ..models.unit_volume import UnitVolume
|
||||
from ..models.uuid import Uuid
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
SG = TypeVar("SG", bound="UnitVolumeConversion")
|
||||
MK = TypeVar("MK", bound="UnitVolumeConversion")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -87,7 +87,7 @@ class UnitVolumeConversion:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[SG], src_dict: Dict[str, Any]) -> SG:
|
||||
def from_dict(cls: Type[MK], src_dict: Dict[str, Any]) -> MK:
|
||||
d = src_dict.copy()
|
||||
_completed_at = d.pop("completed_at", UNSET)
|
||||
completed_at: Union[Unset, datetime.datetime]
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
QZ = TypeVar("QZ", bound="UpdateUser")
|
||||
TU = TypeVar("TU", bound="UpdateUser")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -47,7 +47,7 @@ class UpdateUser:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[QZ], src_dict: Dict[str, Any]) -> QZ:
|
||||
def from_dict(cls: Type[TU], src_dict: Dict[str, Any]) -> TU:
|
||||
d = src_dict.copy()
|
||||
company = d.pop("company", UNSET)
|
||||
|
||||
|
@ -6,7 +6,7 @@ from dateutil.parser import isoparse
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
SY = TypeVar("SY", bound="User")
|
||||
FY = TypeVar("FY", bound="User")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -83,7 +83,7 @@ class User:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[SY], src_dict: Dict[str, Any]) -> SY:
|
||||
def from_dict(cls: Type[FY], src_dict: Dict[str, Any]) -> FY:
|
||||
d = src_dict.copy()
|
||||
company = d.pop("company", UNSET)
|
||||
|
||||
|
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
YK = TypeVar("YK", bound="UserResultsPage")
|
||||
FD = TypeVar("FD", bound="UserResultsPage")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -37,7 +37,7 @@ class UserResultsPage:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[YK], src_dict: Dict[str, Any]) -> YK:
|
||||
def from_dict(cls: Type[FD], src_dict: Dict[str, Any]) -> FD:
|
||||
d = src_dict.copy()
|
||||
from ..models.user import User
|
||||
|
||||
|
@ -6,7 +6,7 @@ from dateutil.parser import isoparse
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
WS = TypeVar("WS", bound="VerificationToken")
|
||||
TZ = TypeVar("TZ", bound="VerificationToken")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -53,7 +53,7 @@ class VerificationToken:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[WS], src_dict: Dict[str, Any]) -> WS:
|
||||
def from_dict(cls: Type[TZ], src_dict: Dict[str, Any]) -> TZ:
|
||||
d = src_dict.copy()
|
||||
_created_at = d.pop("created_at", UNSET)
|
||||
created_at: Union[Unset, datetime.datetime]
|
||||
|
213
kittycad/models/web_socket_messages.py
Normal file
213
kittycad/models/web_socket_messages.py
Normal file
@ -0,0 +1,213 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..models.modeling_cmd import ModelingCmd
|
||||
from ..models.modeling_cmd_id import ModelingCmdId
|
||||
from ..models.rtc_ice_candidate_init import RtcIceCandidateInit
|
||||
from ..models.rtc_session_description import RtcSessionDescription
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
AX = TypeVar("AX", bound="trickle_ice")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class trickle_ice:
|
||||
"""The trickle ICE candidate request.""" # noqa: E501
|
||||
|
||||
candidate: Union[Unset, RtcIceCandidateInit] = UNSET
|
||||
type: str = "trickle_ice"
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
if not isinstance(self.candidate, Unset):
|
||||
candidate = self.candidate
|
||||
type = self.type
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if candidate is not UNSET:
|
||||
field_dict["candidate"] = candidate
|
||||
field_dict["type"] = type
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[AX], src_dict: Dict[str, Any]) -> AX:
|
||||
d = src_dict.copy()
|
||||
_candidate = d.pop("candidate", UNSET)
|
||||
candidate: Union[Unset, RtcIceCandidateInit]
|
||||
if isinstance(_candidate, Unset):
|
||||
candidate = UNSET
|
||||
else:
|
||||
candidate = _candidate # type: ignore[arg-type]
|
||||
|
||||
type = d.pop("type", UNSET)
|
||||
|
||||
trickle_ice = cls(
|
||||
candidate=candidate,
|
||||
type=type,
|
||||
)
|
||||
|
||||
trickle_ice.additional_properties = d
|
||||
return trickle_ice
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
RQ = TypeVar("RQ", bound="sdp_offer")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class sdp_offer:
|
||||
"""The SDP offer request.""" # noqa: E501
|
||||
|
||||
offer: Union[Unset, RtcSessionDescription] = UNSET
|
||||
type: str = "sdp_offer"
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
if not isinstance(self.offer, Unset):
|
||||
offer = self.offer
|
||||
type = self.type
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if offer is not UNSET:
|
||||
field_dict["offer"] = offer
|
||||
field_dict["type"] = type
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[RQ], src_dict: Dict[str, Any]) -> RQ:
|
||||
d = src_dict.copy()
|
||||
_offer = d.pop("offer", UNSET)
|
||||
offer: Union[Unset, RtcSessionDescription]
|
||||
if isinstance(_offer, Unset):
|
||||
offer = UNSET
|
||||
else:
|
||||
offer = _offer # type: ignore[arg-type]
|
||||
|
||||
type = d.pop("type", UNSET)
|
||||
|
||||
sdp_offer = cls(
|
||||
offer=offer,
|
||||
type=type,
|
||||
)
|
||||
|
||||
sdp_offer.additional_properties = d
|
||||
return sdp_offer
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
ZL = TypeVar("ZL", bound="modeling_cmd_req")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class modeling_cmd_req:
|
||||
"""The modeling command request.""" # noqa: E501
|
||||
|
||||
cmd: Union[Unset, ModelingCmd] = UNSET
|
||||
cmd_id: Union[Unset, ModelingCmdId] = UNSET
|
||||
type: str = "modeling_cmd_req"
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
if not isinstance(self.cmd, Unset):
|
||||
cmd = self.cmd
|
||||
if not isinstance(self.cmd_id, Unset):
|
||||
cmd_id = self.cmd_id
|
||||
type = self.type
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if cmd is not UNSET:
|
||||
field_dict["cmd"] = cmd
|
||||
if cmd_id is not UNSET:
|
||||
field_dict["cmd_id"] = cmd_id
|
||||
field_dict["type"] = type
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[ZL], src_dict: Dict[str, Any]) -> ZL:
|
||||
d = src_dict.copy()
|
||||
_cmd = d.pop("cmd", UNSET)
|
||||
cmd: Union[Unset, ModelingCmd]
|
||||
if isinstance(_cmd, Unset):
|
||||
cmd = UNSET
|
||||
else:
|
||||
cmd = _cmd # type: ignore[arg-type]
|
||||
|
||||
_cmd_id = d.pop("cmd_id", UNSET)
|
||||
cmd_id: Union[Unset, ModelingCmdId]
|
||||
if isinstance(_cmd_id, Unset):
|
||||
cmd_id = UNSET
|
||||
else:
|
||||
cmd_id = _cmd_id # type: ignore[arg-type]
|
||||
|
||||
type = d.pop("type", UNSET)
|
||||
|
||||
modeling_cmd_req = cls(
|
||||
cmd=cmd,
|
||||
cmd_id=cmd_id,
|
||||
type=type,
|
||||
)
|
||||
|
||||
modeling_cmd_req.additional_properties = d
|
||||
return modeling_cmd_req
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
WebSocketMessages = Union[trickle_ice, sdp_offer, modeling_cmd_req]
|
343
kittycad/models/web_socket_responses.py
Normal file
343
kittycad/models/web_socket_responses.py
Normal file
@ -0,0 +1,343 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
|
||||
import attr
|
||||
|
||||
from ..models.modeling_cmd_id import ModelingCmdId
|
||||
from ..models.rtc_ice_candidate import RtcIceCandidate
|
||||
from ..models.rtc_session_description import RtcSessionDescription
|
||||
from ..models.snake_case_result import SnakeCaseResult
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
CM = TypeVar("CM", bound="trickle_ice")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class trickle_ice:
|
||||
"""The trickle ICE candidate response.""" # noqa: E501
|
||||
|
||||
candidate: Union[Unset, RtcIceCandidate] = UNSET
|
||||
type: str = "trickle_ice"
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
if not isinstance(self.candidate, Unset):
|
||||
candidate = self.candidate
|
||||
type = self.type
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if candidate is not UNSET:
|
||||
field_dict["candidate"] = candidate
|
||||
field_dict["type"] = type
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[CM], src_dict: Dict[str, Any]) -> CM:
|
||||
d = src_dict.copy()
|
||||
_candidate = d.pop("candidate", UNSET)
|
||||
candidate: Union[Unset, RtcIceCandidate]
|
||||
if isinstance(_candidate, Unset):
|
||||
candidate = UNSET
|
||||
else:
|
||||
candidate = _candidate # type: ignore[arg-type]
|
||||
|
||||
type = d.pop("type", UNSET)
|
||||
|
||||
trickle_ice = cls(
|
||||
candidate=candidate,
|
||||
type=type,
|
||||
)
|
||||
|
||||
trickle_ice.additional_properties = d
|
||||
return trickle_ice
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
OS = TypeVar("OS", bound="sdp_answer")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class sdp_answer:
|
||||
"""The SDP answer response.""" # noqa: E501
|
||||
|
||||
answer: Union[Unset, RtcSessionDescription] = UNSET
|
||||
type: str = "sdp_answer"
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
if not isinstance(self.answer, Unset):
|
||||
answer = self.answer
|
||||
type = self.type
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if answer is not UNSET:
|
||||
field_dict["answer"] = answer
|
||||
field_dict["type"] = type
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[OS], src_dict: Dict[str, Any]) -> OS:
|
||||
d = src_dict.copy()
|
||||
_answer = d.pop("answer", UNSET)
|
||||
answer: Union[Unset, RtcSessionDescription]
|
||||
if isinstance(_answer, Unset):
|
||||
answer = UNSET
|
||||
else:
|
||||
answer = _answer # type: ignore[arg-type]
|
||||
|
||||
type = d.pop("type", UNSET)
|
||||
|
||||
sdp_answer = cls(
|
||||
answer=answer,
|
||||
type=type,
|
||||
)
|
||||
|
||||
sdp_answer.additional_properties = d
|
||||
return sdp_answer
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
WP = TypeVar("WP", bound="ice_server_info")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class ice_server_info:
|
||||
"""The ICE server info response.""" # noqa: E501
|
||||
|
||||
from ..models.ice_server import IceServer
|
||||
|
||||
ice_servers: Union[Unset, List[IceServer]] = UNSET
|
||||
type: str = "ice_server_info"
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
from ..models.ice_server import IceServer
|
||||
|
||||
ice_servers: Union[Unset, List[IceServer]] = UNSET
|
||||
if not isinstance(self.ice_servers, Unset):
|
||||
ice_servers = self.ice_servers
|
||||
type = self.type
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if ice_servers is not UNSET:
|
||||
field_dict["ice_servers"] = ice_servers
|
||||
field_dict["type"] = type
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[WP], src_dict: Dict[str, Any]) -> WP:
|
||||
d = src_dict.copy()
|
||||
from ..models.ice_server import IceServer
|
||||
|
||||
ice_servers = cast(List[IceServer], d.pop("ice_servers", UNSET))
|
||||
|
||||
type = d.pop("type", UNSET)
|
||||
|
||||
ice_server_info = cls(
|
||||
ice_servers=ice_servers,
|
||||
type=type,
|
||||
)
|
||||
|
||||
ice_server_info.additional_properties = d
|
||||
return ice_server_info
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
XO = TypeVar("XO", bound="modeling")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class modeling:
|
||||
"""The modeling command response.""" # noqa: E501
|
||||
|
||||
cmd_id: Union[Unset, ModelingCmdId] = UNSET
|
||||
result: Union[Unset, SnakeCaseResult] = UNSET
|
||||
type: str = "modeling"
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
if not isinstance(self.cmd_id, Unset):
|
||||
cmd_id = self.cmd_id
|
||||
if not isinstance(self.result, Unset):
|
||||
result = self.result
|
||||
type = self.type
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if cmd_id is not UNSET:
|
||||
field_dict["cmd_id"] = cmd_id
|
||||
if result is not UNSET:
|
||||
field_dict["result"] = result
|
||||
field_dict["type"] = type
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[XO], src_dict: Dict[str, Any]) -> XO:
|
||||
d = src_dict.copy()
|
||||
_cmd_id = d.pop("cmd_id", UNSET)
|
||||
cmd_id: Union[Unset, ModelingCmdId]
|
||||
if isinstance(_cmd_id, Unset):
|
||||
cmd_id = UNSET
|
||||
else:
|
||||
cmd_id = _cmd_id # type: ignore[arg-type]
|
||||
|
||||
_result = d.pop("result", UNSET)
|
||||
result: Union[Unset, SnakeCaseResult]
|
||||
if isinstance(_result, Unset):
|
||||
result = UNSET
|
||||
else:
|
||||
result = _result # type: ignore[arg-type]
|
||||
|
||||
type = d.pop("type", UNSET)
|
||||
|
||||
modeling = cls(
|
||||
cmd_id=cmd_id,
|
||||
result=result,
|
||||
type=type,
|
||||
)
|
||||
|
||||
modeling.additional_properties = d
|
||||
return modeling
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
LN = TypeVar("LN", bound="export")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class export:
|
||||
"""The export command response, this is sent as binary.""" # noqa: E501
|
||||
|
||||
from ..models.raw_file import RawFile
|
||||
|
||||
files: Union[Unset, List[RawFile]] = UNSET
|
||||
type: str = "export"
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
from ..models.raw_file import RawFile
|
||||
|
||||
files: Union[Unset, List[RawFile]] = UNSET
|
||||
if not isinstance(self.files, Unset):
|
||||
files = self.files
|
||||
type = self.type
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if files is not UNSET:
|
||||
field_dict["files"] = files
|
||||
field_dict["type"] = type
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[LN], src_dict: Dict[str, Any]) -> LN:
|
||||
d = src_dict.copy()
|
||||
from ..models.raw_file import RawFile
|
||||
|
||||
files = cast(List[RawFile], d.pop("files", UNSET))
|
||||
|
||||
type = d.pop("type", UNSET)
|
||||
|
||||
export = cls(
|
||||
files=files,
|
||||
type=type,
|
||||
)
|
||||
|
||||
export.additional_properties = d
|
||||
return export
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
WebSocketResponses = Union[trickle_ice, sdp_answer, ice_server_info, modeling, export]
|
@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "kittycad"
|
||||
version = "0.4.6"
|
||||
version = "0.4.7"
|
||||
description = "A client library for accessing KittyCAD"
|
||||
|
||||
authors = []
|
||||
|
716
spec.json
716
spec.json
@ -438,35 +438,35 @@
|
||||
{
|
||||
"description": "The async API call is queued.",
|
||||
"enum": [
|
||||
"Queued"
|
||||
"queued"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"description": "The async API call was uploaded to be converted.",
|
||||
"enum": [
|
||||
"Uploaded"
|
||||
"uploaded"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"description": "The async API call is in progress.",
|
||||
"enum": [
|
||||
"In Progress"
|
||||
"in_progress"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"description": "The async API call has completed.",
|
||||
"enum": [
|
||||
"Completed"
|
||||
"completed"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"description": "The async API call has failed.",
|
||||
"enum": [
|
||||
"Failed"
|
||||
"failed"
|
||||
],
|
||||
"type": "string"
|
||||
}
|
||||
@ -894,7 +894,7 @@
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"FileConversion"
|
||||
"file_conversion"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
@ -991,7 +991,7 @@
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"FileCenterOfMass"
|
||||
"file_center_of_mass"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
@ -1099,7 +1099,7 @@
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"FileMass"
|
||||
"file_mass"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
@ -1188,7 +1188,7 @@
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"FileVolume"
|
||||
"file_volume"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
@ -1302,7 +1302,7 @@
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"FileDensity"
|
||||
"file_density"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
@ -1397,7 +1397,7 @@
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"FileSurfaceArea"
|
||||
"file_surface_area"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
@ -1452,42 +1452,42 @@
|
||||
{
|
||||
"description": "File conversion.",
|
||||
"enum": [
|
||||
"FileConversion"
|
||||
"file_conversion"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"description": "File volume.",
|
||||
"enum": [
|
||||
"FileVolume"
|
||||
"file_volume"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"description": "File center of mass.",
|
||||
"enum": [
|
||||
"FileCenterOfMass"
|
||||
"file_center_of_mass"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"description": "File mass.",
|
||||
"enum": [
|
||||
"FileMass"
|
||||
"file_mass"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"description": "File density.",
|
||||
"enum": [
|
||||
"FileDensity"
|
||||
"file_density"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"description": "File surface area.",
|
||||
"enum": [
|
||||
"FileSurfaceArea"
|
||||
"file_surface_area"
|
||||
],
|
||||
"type": "string"
|
||||
}
|
||||
@ -3897,16 +3897,16 @@
|
||||
"description": "Supported set of sort modes for scanning by created_at only.\n\nCurrently, we only support scanning in ascending order.",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "sort in increasing order of \"created_at\"",
|
||||
"description": "Sort in increasing order of \"created_at\".",
|
||||
"enum": [
|
||||
"created-at-ascending"
|
||||
"created_at_ascending"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"description": "sort in decreasing order of \"created_at\"",
|
||||
"description": "Sort in decreasing order of \"created_at\".",
|
||||
"enum": [
|
||||
"created-at-descending"
|
||||
"created_at_descending"
|
||||
],
|
||||
"type": "string"
|
||||
}
|
||||
@ -5588,21 +5588,59 @@
|
||||
]
|
||||
},
|
||||
"Error": {
|
||||
"description": "Error information from a response.",
|
||||
"description": "An error.",
|
||||
"properties": {
|
||||
"error_code": {
|
||||
"type": "string"
|
||||
"code": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/ErrorCode"
|
||||
}
|
||||
],
|
||||
"description": "The error code."
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"request_id": {
|
||||
"description": "The error message.",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"message",
|
||||
"request_id"
|
||||
"code",
|
||||
"message"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"ErrorCode": {
|
||||
"description": "The type of errorcode.",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "User requested something impossible or invalid",
|
||||
"enum": [
|
||||
"bad_request"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"description": "Engine failed to complete request, consider retrying",
|
||||
"enum": [
|
||||
"internal_engine"
|
||||
],
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"ErrorResponse": {
|
||||
"description": "The error response.",
|
||||
"properties": {
|
||||
"errors": {
|
||||
"description": "A list of errors.",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/Error"
|
||||
},
|
||||
"type": "array"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"errors"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
@ -6480,6 +6518,32 @@
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"IceServer": {
|
||||
"description": "Representation of an ICE server used for STUN/TURN Used to initiate WebRTC connections based on <https://developer.mozilla.org/en-US/docs/Web/API/RTCIceServer>",
|
||||
"properties": {
|
||||
"credential": {
|
||||
"description": "Credentials for a given TURN server.",
|
||||
"nullable": true,
|
||||
"type": "string"
|
||||
},
|
||||
"urls": {
|
||||
"description": "URLs for a given STUN/TURN server. IceServer urls can either be a string or an array of strings But, we choose to always convert to an array of strings for consistency",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"username": {
|
||||
"description": "Username for a given TURN server.",
|
||||
"nullable": true,
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"urls"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"ImageType": {
|
||||
"description": "An enumeration.",
|
||||
"enum": [
|
||||
@ -8168,7 +8232,7 @@
|
||||
"format": "uuid",
|
||||
"type": "string"
|
||||
},
|
||||
"face_uuid": {
|
||||
"face_id": {
|
||||
"description": "Which face is used to figure out the opposite edge?",
|
||||
"format": "uuid",
|
||||
"type": "string"
|
||||
@ -8187,7 +8251,7 @@
|
||||
},
|
||||
"required": [
|
||||
"edge_id",
|
||||
"face_uuid",
|
||||
"face_id",
|
||||
"object_id",
|
||||
"type"
|
||||
],
|
||||
@ -8201,7 +8265,7 @@
|
||||
"format": "uuid",
|
||||
"type": "string"
|
||||
},
|
||||
"face_uuid": {
|
||||
"face_id": {
|
||||
"description": "Which face is used to figure out the opposite edge?",
|
||||
"format": "uuid",
|
||||
"type": "string"
|
||||
@ -8220,7 +8284,7 @@
|
||||
},
|
||||
"required": [
|
||||
"edge_id",
|
||||
"face_uuid",
|
||||
"face_id",
|
||||
"object_id",
|
||||
"type"
|
||||
],
|
||||
@ -8234,7 +8298,7 @@
|
||||
"format": "uuid",
|
||||
"type": "string"
|
||||
},
|
||||
"face_uuid": {
|
||||
"face_id": {
|
||||
"description": "Which face is used to figure out the opposite edge?",
|
||||
"format": "uuid",
|
||||
"type": "string"
|
||||
@ -8253,7 +8317,7 @@
|
||||
},
|
||||
"required": [
|
||||
"edge_id",
|
||||
"face_uuid",
|
||||
"face_id",
|
||||
"object_id",
|
||||
"type"
|
||||
],
|
||||
@ -9309,6 +9373,29 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"RawFile": {
|
||||
"description": "A raw file with unencoded contents to be passed over binary websockets.",
|
||||
"properties": {
|
||||
"contents": {
|
||||
"description": "The contents of the file.",
|
||||
"items": {
|
||||
"format": "uint8",
|
||||
"minimum": 0,
|
||||
"type": "integer"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"name": {
|
||||
"description": "The name of the file.",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"contents",
|
||||
"name"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"RegistryServiceConfig": {
|
||||
"description": "RegistryServiceConfig stores daemon registry services configuration.",
|
||||
"properties": {
|
||||
@ -9349,6 +9436,243 @@
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"RtcIceCandidate": {
|
||||
"description": "ICECandidate represents a ice candidate",
|
||||
"properties": {
|
||||
"address": {
|
||||
"description": "The address of the candidate.",
|
||||
"type": "string"
|
||||
},
|
||||
"component": {
|
||||
"description": "The component of the candidate.",
|
||||
"format": "uint16",
|
||||
"minimum": 0,
|
||||
"type": "integer"
|
||||
},
|
||||
"foundation": {
|
||||
"description": "The foundation for the address.",
|
||||
"type": "string"
|
||||
},
|
||||
"port": {
|
||||
"description": "The port used for the candidate.",
|
||||
"format": "uint16",
|
||||
"minimum": 0,
|
||||
"type": "integer"
|
||||
},
|
||||
"priority": {
|
||||
"description": "The priority of the candidate.",
|
||||
"format": "uint32",
|
||||
"minimum": 0,
|
||||
"type": "integer"
|
||||
},
|
||||
"protocol": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/RtcIceProtocol"
|
||||
}
|
||||
],
|
||||
"description": "The protocol used for the candidate."
|
||||
},
|
||||
"related_address": {
|
||||
"description": "The related address of the candidate.",
|
||||
"type": "string"
|
||||
},
|
||||
"related_port": {
|
||||
"description": "The related port of the candidate.",
|
||||
"format": "uint16",
|
||||
"minimum": 0,
|
||||
"type": "integer"
|
||||
},
|
||||
"stats_id": {
|
||||
"description": "The stats ID.",
|
||||
"type": "string"
|
||||
},
|
||||
"tcp_type": {
|
||||
"description": "The TCP type of the candidate.",
|
||||
"type": "string"
|
||||
},
|
||||
"typ": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/RtcIceCandidateType"
|
||||
}
|
||||
],
|
||||
"description": "The type of the candidate."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"address",
|
||||
"component",
|
||||
"foundation",
|
||||
"port",
|
||||
"priority",
|
||||
"protocol",
|
||||
"related_address",
|
||||
"related_port",
|
||||
"stats_id",
|
||||
"tcp_type",
|
||||
"typ"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"RtcIceCandidateInit": {
|
||||
"description": "ICECandidateInit is used to serialize ice candidates",
|
||||
"properties": {
|
||||
"candidate": {
|
||||
"description": "The candidate string associated with the object.",
|
||||
"type": "string"
|
||||
},
|
||||
"sdpMLineIndex": {
|
||||
"description": "The index (starting at zero) of the m-line in the SDP this candidate is associated with.",
|
||||
"format": "uint16",
|
||||
"minimum": 0,
|
||||
"nullable": true,
|
||||
"type": "integer"
|
||||
},
|
||||
"sdpMid": {
|
||||
"description": "The identifier of the \"media stream identification\" as defined in [RFC 8841](https://tools.ietf.org/html/rfc8841).",
|
||||
"nullable": true,
|
||||
"type": "string"
|
||||
},
|
||||
"usernameFragment": {
|
||||
"description": "The username fragment (as defined in [RFC 8445](https://tools.ietf.org/html/rfc8445#section-5.2.1)) associated with the object.",
|
||||
"nullable": true,
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"candidate"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"RtcIceCandidateType": {
|
||||
"description": "ICECandidateType represents the type of the ICE candidate used.",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "Unspecified indicates that the candidate type is unspecified.",
|
||||
"enum": [
|
||||
"unspecified"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"description": "ICECandidateTypeHost indicates that the candidate is of Host type as described in <https://tools.ietf.org/html/rfc8445#section-5.1.1.1>. A candidate obtained by binding to a specific port from an IP address on the host. This includes IP addresses on physical interfaces and logical ones, such as ones obtained through VPNs.",
|
||||
"enum": [
|
||||
"host"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"description": "ICECandidateTypeSrflx indicates the the candidate is of Server Reflexive type as described <https://tools.ietf.org/html/rfc8445#section-5.1.1.2>. A candidate type whose IP address and port are a binding allocated by a NAT for an ICE agent after it sends a packet through the NAT to a server, such as a STUN server.",
|
||||
"enum": [
|
||||
"srflx"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"description": "ICECandidateTypePrflx indicates that the candidate is of Peer Reflexive type. A candidate type whose IP address and port are a binding allocated by a NAT for an ICE agent after it sends a packet through the NAT to its peer.",
|
||||
"enum": [
|
||||
"prflx"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"description": "ICECandidateTypeRelay indicates the the candidate is of Relay type as described in <https://tools.ietf.org/html/rfc8445#section-5.1.1.2>. A candidate type obtained from a relay server, such as a TURN server.",
|
||||
"enum": [
|
||||
"relay"
|
||||
],
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"RtcIceProtocol": {
|
||||
"description": "ICEProtocol indicates the transport protocol type that is used in the ice.URL structure.",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "Unspecified indicates that the protocol is unspecified.",
|
||||
"enum": [
|
||||
"unspecified"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"description": "UDP indicates the URL uses a UDP transport.",
|
||||
"enum": [
|
||||
"udp"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"description": "TCP indicates the URL uses a TCP transport.",
|
||||
"enum": [
|
||||
"tcp"
|
||||
],
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"RtcSdpType": {
|
||||
"description": "SDPType describes the type of an SessionDescription.",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "Unspecified indicates that the type is unspecified.",
|
||||
"enum": [
|
||||
"unspecified"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"description": "indicates that a description MUST be treated as an SDP offer.",
|
||||
"enum": [
|
||||
"offer"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"description": "indicates that a description MUST be treated as an SDP answer, but not a final answer. A description used as an SDP pranswer may be applied as a response to an SDP offer, or an update to a previously sent SDP pranswer.",
|
||||
"enum": [
|
||||
"pranswer"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"description": "indicates that a description MUST be treated as an SDP final answer, and the offer-answer exchange MUST be considered complete. A description used as an SDP answer may be applied as a response to an SDP offer or as an update to a previously sent SDP pranswer.",
|
||||
"enum": [
|
||||
"answer"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"description": "indicates that a description MUST be treated as canceling the current SDP negotiation and moving the SDP offer and answer back to what it was in the previous stable state. Note the local or remote SDP descriptions in the previous stable state could be null if there has not yet been a successful offer-answer negotiation.",
|
||||
"enum": [
|
||||
"rollback"
|
||||
],
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"RtcSessionDescription": {
|
||||
"description": "SessionDescription is used to expose local and remote session descriptions.",
|
||||
"properties": {
|
||||
"sdp": {
|
||||
"description": "SDP string.",
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/RtcSdpType"
|
||||
}
|
||||
],
|
||||
"description": "SDP type."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"sdp",
|
||||
"type"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"Runtime": {
|
||||
"description": "Runtime describes an [OCI compliant](https://github.com/opencontainers/runtime-spec) runtime. The runtime is invoked by the daemon via the `containerd` daemon. OCI runtimes act as an interface to the Linux kernel namespaces, cgroups, and SELinux.",
|
||||
"properties": {
|
||||
@ -9439,6 +9763,37 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"SnakeCaseResult": {
|
||||
"description": "Serde serializes Result into JSON as \"Ok\" and \"Err\", but we want \"ok\" and \"err\". So, create a new enum that serializes as lowercase.",
|
||||
"oneOf": [
|
||||
{
|
||||
"additionalProperties": false,
|
||||
"description": "The result is Ok.",
|
||||
"properties": {
|
||||
"ok": {
|
||||
"$ref": "#/components/schemas/OkModelingCmdResponse"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"ok"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"additionalProperties": false,
|
||||
"description": "The result is Err.",
|
||||
"properties": {
|
||||
"err": {
|
||||
"$ref": "#/components/schemas/ErrorResponse"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"err"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Storage": {
|
||||
"description": "Describes the storage format of a glTF 2.0 scene.",
|
||||
"oneOf": [
|
||||
@ -11508,6 +11863,224 @@
|
||||
"updated_at"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"WebSocketMessages": {
|
||||
"description": "The websocket messages the server receives.",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "The trickle ICE candidate request.",
|
||||
"properties": {
|
||||
"candidate": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/RtcIceCandidateInit"
|
||||
}
|
||||
],
|
||||
"description": "Information about the ICE candidate."
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"trickle_ice"
|
||||
],
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"candidate",
|
||||
"type"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"description": "The SDP offer request.",
|
||||
"properties": {
|
||||
"offer": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/RtcSessionDescription"
|
||||
}
|
||||
],
|
||||
"description": "The session description."
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"sdp_offer"
|
||||
],
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"offer",
|
||||
"type"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"description": "The modeling command request.",
|
||||
"properties": {
|
||||
"cmd": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/ModelingCmd"
|
||||
}
|
||||
],
|
||||
"description": "Which command to submit to the Kittycad engine."
|
||||
},
|
||||
"cmd_id": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/ModelingCmdId"
|
||||
}
|
||||
],
|
||||
"description": "ID of command being submitted."
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"modeling_cmd_req"
|
||||
],
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"cmd",
|
||||
"cmd_id",
|
||||
"type"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
]
|
||||
},
|
||||
"WebSocketResponses": {
|
||||
"description": "The websocket messages this server sends.",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "The trickle ICE candidate response.",
|
||||
"properties": {
|
||||
"candidate": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/RtcIceCandidate"
|
||||
}
|
||||
],
|
||||
"description": "Information about the ICE candidate."
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"trickle_ice"
|
||||
],
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"candidate",
|
||||
"type"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"description": "The SDP answer response.",
|
||||
"properties": {
|
||||
"answer": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/RtcSessionDescription"
|
||||
}
|
||||
],
|
||||
"description": "The session description."
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"sdp_answer"
|
||||
],
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"answer",
|
||||
"type"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"description": "The ICE server info response.",
|
||||
"properties": {
|
||||
"ice_servers": {
|
||||
"description": "Information about the ICE servers.",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/IceServer"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"ice_server_info"
|
||||
],
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"ice_servers",
|
||||
"type"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"description": "The modeling command response.",
|
||||
"properties": {
|
||||
"cmd_id": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/ModelingCmdId"
|
||||
}
|
||||
],
|
||||
"description": "The ID of the command."
|
||||
},
|
||||
"result": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/SnakeCaseResult"
|
||||
}
|
||||
],
|
||||
"description": "The result of the command."
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"modeling"
|
||||
],
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"cmd_id",
|
||||
"result",
|
||||
"type"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"description": "The export command response, this is sent as binary.",
|
||||
"properties": {
|
||||
"files": {
|
||||
"description": "The exported files.",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/RawFile"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"type": {
|
||||
"enum": [
|
||||
"export"
|
||||
],
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"files",
|
||||
"type"
|
||||
],
|
||||
"type": "object"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -14001,6 +14574,77 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/hidden/ws/modeling": {
|
||||
"options": {
|
||||
"operationId": "hidden_ws_modeling_types",
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/WebSocketMessages"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/WebSocketResponses"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "successful operation",
|
||||
"headers": {
|
||||
"Access-Control-Allow-Credentials": {
|
||||
"description": "Access-Control-Allow-Credentials header.",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"style": "simple"
|
||||
},
|
||||
"Access-Control-Allow-Headers": {
|
||||
"description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"style": "simple"
|
||||
},
|
||||
"Access-Control-Allow-Methods": {
|
||||
"description": "Access-Control-Allow-Methods header.",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"style": "simple"
|
||||
},
|
||||
"Access-Control-Allow-Origin": {
|
||||
"description": "Access-Control-Allow-Origin header.",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"style": "simple"
|
||||
}
|
||||
}
|
||||
},
|
||||
"4XX": {
|
||||
"$ref": "#/components/responses/Error"
|
||||
},
|
||||
"5XX": {
|
||||
"$ref": "#/components/responses/Error"
|
||||
}
|
||||
},
|
||||
"summary": "Hidden endpoint for defining the modeling websocket types.",
|
||||
"tags": [
|
||||
"hidden"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/logout": {
|
||||
"options": {
|
||||
"description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.",
|
||||
@ -14241,7 +14885,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/modeling/cmd_batch": {
|
||||
"/modeling/cmd-batch": {
|
||||
"options": {
|
||||
"description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.",
|
||||
"operationId": "options_cmd_batch",
|
||||
|
Reference in New Issue
Block a user