Update api spec (#107)

* YOYO NEW API SPEC!

* I have generated the latest API!

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Jess Frazelle
2023-07-07 19:22:51 -07:00
committed by GitHub
parent fd52b906c4
commit f5da088b67
95 changed files with 1386 additions and 189 deletions

File diff suppressed because one or more lines are too long

View File

@ -88,7 +88,8 @@ def sync(
*,
client: Client,
) -> Optional[Union[FileConversion, Error]]:
"""Convert a CAD file from one format to another. If the file being converted is larger than 25MB, it will be performed asynchronously.
"""If you wish to specify the conversion options, use the `/file/conversion` endpoint instead.
Convert a CAD file from one format to another. If the file being converted is larger than 25MB, it will be performed asynchronously.
If the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string.
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501
@ -127,7 +128,8 @@ async def asyncio(
*,
client: Client,
) -> Optional[Union[FileConversion, Error]]:
"""Convert a CAD file from one format to another. If the file being converted is larger than 25MB, it will be performed asynchronously.
"""If you wish to specify the conversion options, use the `/file/conversion` endpoint instead.
Convert a CAD file from one format to another. If the file being converted is larger than 25MB, it will be performed asynchronously.
If the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string.
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.""" # noqa: E501

View File

@ -19,6 +19,8 @@ from .async_api_call import AsyncApiCall
from .async_api_call_output import AsyncApiCallOutput
from .async_api_call_results_page import AsyncApiCallResultsPage
from .async_api_call_type import AsyncApiCallType
from .axis import Axis
from .axis_direction_pair import AxisDirectionPair
from .billing_info import BillingInfo
from .cache_metadata import CacheMetadata
from .camera_drag_interaction_type import CameraDragInteractionType
@ -37,6 +39,7 @@ from .customer_balance import CustomerBalance
from .device_access_token_request_form import DeviceAccessTokenRequestForm
from .device_auth_request_form import DeviceAuthRequestForm
from .device_auth_verify_params import DeviceAuthVerifyParams
from .direction import Direction
from .discount import Discount
from .docker_system_info import DockerSystemInfo
from .email_authentication_form import EmailAuthenticationForm
@ -59,6 +62,7 @@ from .file_volume import FileVolume
from .gateway import Gateway
from .image_type import ImageType
from .index_info import IndexInfo
from .input_format import InputFormat
from .invoice import Invoice
from .invoice_line_item import InvoiceLineItem
from .invoice_status import InvoiceStatus
@ -83,6 +87,7 @@ from .o_auth2_client_info import OAuth2ClientInfo
from .o_auth2_grant_type import OAuth2GrantType
from .onboarding import Onboarding
from .output_file import OutputFile
from .output_format import OutputFormat
from .path_segment import PathSegment
from .payment_intent import PaymentIntent
from .payment_method import PaymentMethod
@ -98,6 +103,8 @@ from .pong import Pong
from .registry_service_config import RegistryServiceConfig
from .runtime import Runtime
from .session import Session
from .storage import Storage
from .system import System
from .system_info_cgroup_driver_enum import SystemInfoCgroupDriverEnum
from .system_info_cgroup_version_enum import SystemInfoCgroupVersionEnum
from .system_info_default_address_pools import SystemInfoDefaultAddressPools

View File

@ -7,6 +7,8 @@ from dateutil.parser import isoparse
from ..models.api_call_status import ApiCallStatus
from ..models.file_export_format import FileExportFormat
from ..models.file_import_format import FileImportFormat
from ..models.input_format import InputFormat
from ..models.output_format import OutputFormat
from ..models.uuid import Uuid
from ..types import UNSET, Unset
@ -23,7 +25,10 @@ class FileConversion:
id: Union[Unset, str] = UNSET
output: Union[Unset, str] = UNSET
output_format: Union[Unset, FileExportFormat] = UNSET
output_format_options: Union[Unset, OutputFormat] = UNSET
outputs: Union[Unset, Any] = UNSET
src_format: Union[Unset, FileImportFormat] = UNSET
src_format_options: Union[Unset, InputFormat] = UNSET
started_at: Union[Unset, datetime.datetime] = UNSET
status: Union[Unset, ApiCallStatus] = UNSET
type: Union[Unset, str] = UNSET
@ -44,8 +49,13 @@ class FileConversion:
output = self.output
if not isinstance(self.output_format, Unset):
output_format = self.output_format
if not isinstance(self.output_format_options, Unset):
output_format_options = self.output_format_options
outputs = self.outputs
if not isinstance(self.src_format, Unset):
src_format = self.src_format
if not isinstance(self.src_format_options, Unset):
src_format_options = self.src_format_options
started_at: Union[Unset, str] = UNSET
if not isinstance(self.started_at, Unset):
started_at = self.started_at.isoformat()
@ -72,8 +82,14 @@ class FileConversion:
field_dict["output"] = output
if output_format is not UNSET:
field_dict["output_format"] = output_format
if output_format_options is not UNSET:
field_dict["output_format_options"] = output_format_options
if outputs is not UNSET:
field_dict["outputs"] = outputs
if src_format is not UNSET:
field_dict["src_format"] = src_format
if src_format_options is not UNSET:
field_dict["src_format_options"] = src_format_options
if started_at is not UNSET:
field_dict["started_at"] = started_at
if status is not UNSET:
@ -122,6 +138,14 @@ class FileConversion:
else:
output_format = _output_format # type: ignore[arg-type]
_output_format_options = d.pop("output_format_options", UNSET)
output_format_options: Union[Unset, OutputFormat]
if isinstance(_output_format_options, Unset):
output_format_options = UNSET
else:
output_format_options = OutputFormat(_output_format_options)
outputs = d.pop("outputs", UNSET)
_src_format = d.pop("src_format", UNSET)
src_format: Union[Unset, FileImportFormat]
if isinstance(_src_format, Unset):
@ -129,6 +153,13 @@ class FileConversion:
else:
src_format = _src_format # type: ignore[arg-type]
_src_format_options = d.pop("src_format_options", UNSET)
src_format_options: Union[Unset, InputFormat]
if isinstance(_src_format_options, Unset):
src_format_options = UNSET
else:
src_format_options = InputFormat(_src_format_options)
_started_at = d.pop("started_at", UNSET)
started_at: Union[Unset, datetime.datetime]
if isinstance(_started_at, Unset):
@ -161,7 +192,10 @@ class FileConversion:
id=id,
output=output,
output_format=output_format,
output_format_options=output_format_options,
outputs=outputs,
src_format=src_format,
src_format_options=src_format_options,
started_at=started_at,
status=status,
type=type,

17
kittycad/models/axis.py Normal file
View File

@ -0,0 +1,17 @@
from enum import Enum
class Axis(str, Enum):
"""Co-ordinate axis specifier.
See [cglearn.eu] for background reading.
[cglearn.eu]: https://cglearn.eu/pub/computer-graphics/introduction-to-geometry#material-coordinate-systems-1""" # noqa: E501
"""# 'Y' axis. """ # noqa: E501
Y = "y"
"""# 'Z' axis. """ # noqa: E501
Z = "z"
def __str__(self) -> str:
return str(self.value)

View File

@ -0,0 +1,76 @@
from typing import Any, Dict, List, Type, TypeVar, Union
import attr
from ..models.axis import Axis
from ..models.direction import Direction
from ..types import UNSET, Unset
X = TypeVar("X", bound="AxisDirectionPair")
@attr.s(auto_attribs=True)
class AxisDirectionPair:
"""An [`Axis`] paired with a [`Direction`].""" # noqa: E501
axis: Union[Unset, Axis] = UNSET
direction: Union[Unset, Direction] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
if not isinstance(self.axis, Unset):
axis = self.axis
if not isinstance(self.direction, Unset):
direction = self.direction
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if axis is not UNSET:
field_dict["axis"] = axis
if direction is not UNSET:
field_dict["direction"] = direction
return field_dict
@classmethod
def from_dict(cls: Type[X], src_dict: Dict[str, Any]) -> X:
d = src_dict.copy()
_axis = d.pop("axis", UNSET)
axis: Union[Unset, Axis]
if isinstance(_axis, Unset):
axis = UNSET
else:
axis = _axis # type: ignore[arg-type]
_direction = d.pop("direction", UNSET)
direction: Union[Unset, Direction]
if isinstance(_direction, Unset):
direction = UNSET
else:
direction = _direction # type: ignore[arg-type]
axis_direction_pair = cls(
axis=axis,
direction=direction,
)
axis_direction_pair.additional_properties = d
return axis_direction_pair
@property
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

View File

@ -5,7 +5,7 @@ import attr
from ..models.new_address import NewAddress
from ..types import UNSET, Unset
X = TypeVar("X", bound="BillingInfo")
L = TypeVar("L", bound="BillingInfo")
@attr.s(auto_attribs=True)
@ -37,7 +37,7 @@ class BillingInfo:
return field_dict
@classmethod
def from_dict(cls: Type[X], src_dict: Dict[str, Any]) -> X:
def from_dict(cls: Type[L], src_dict: Dict[str, Any]) -> L:
d = src_dict.copy()
_address = d.pop("address", UNSET)
address: Union[Unset, NewAddress]

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
L = TypeVar("L", bound="CacheMetadata")
B = TypeVar("B", bound="CacheMetadata")
@attr.s(auto_attribs=True)
@ -29,7 +29,7 @@ class CacheMetadata:
return field_dict
@classmethod
def from_dict(cls: Type[L], src_dict: Dict[str, Any]) -> L:
def from_dict(cls: Type[B], src_dict: Dict[str, Any]) -> B:
d = src_dict.copy()
ok = d.pop("ok", UNSET)

View File

@ -5,7 +5,7 @@ import attr
from ..models.payment_method_card_checks import PaymentMethodCardChecks
from ..types import UNSET, Unset
B = TypeVar("B", bound="CardDetails")
N = TypeVar("N", bound="CardDetails")
@attr.s(auto_attribs=True)
@ -57,7 +57,7 @@ class CardDetails:
return field_dict
@classmethod
def from_dict(cls: Type[B], src_dict: Dict[str, Any]) -> B:
def from_dict(cls: Type[N], src_dict: Dict[str, Any]) -> N:
d = src_dict.copy()
brand = d.pop("brand", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
N = TypeVar("N", bound="Cluster")
E = TypeVar("E", bound="Cluster")
@attr.s(auto_attribs=True)
@ -49,7 +49,7 @@ class Cluster:
return field_dict
@classmethod
def from_dict(cls: Type[N], src_dict: Dict[str, Any]) -> N:
def from_dict(cls: Type[E], src_dict: Dict[str, Any]) -> E:
d = src_dict.copy()
addr = d.pop("addr", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
E = TypeVar("E", bound="CodeOutput")
T = TypeVar("T", bound="CodeOutput")
@attr.s(auto_attribs=True)
@ -41,7 +41,7 @@ class CodeOutput:
return field_dict
@classmethod
def from_dict(cls: Type[E], src_dict: Dict[str, Any]) -> E:
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
d = src_dict.copy()
from ..models.output_file import OutputFile

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
T = TypeVar("T", bound="Commit")
L = TypeVar("L", bound="Commit")
@attr.s(auto_attribs=True)
@ -31,7 +31,7 @@ class Commit:
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
def from_dict(cls: Type[L], src_dict: Dict[str, Any]) -> L:
d = src_dict.copy()
expected = d.pop("expected", UNSET)

View File

@ -10,7 +10,7 @@ from ..models.jetstream import Jetstream
from ..models.leaf_node import LeafNode
from ..types import UNSET, Unset
L = TypeVar("L", bound="Connection")
M = TypeVar("M", bound="Connection")
@attr.s(auto_attribs=True)
@ -225,7 +225,7 @@ class Connection:
return field_dict
@classmethod
def from_dict(cls: Type[L], src_dict: Dict[str, Any]) -> L:
def from_dict(cls: Type[M], src_dict: Dict[str, Any]) -> M:
d = src_dict.copy()
auth_timeout = d.pop("auth_timeout", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
M = TypeVar("M", bound="Coupon")
N = TypeVar("N", bound="Coupon")
@attr.s(auto_attribs=True)
@ -39,7 +39,7 @@ class Coupon:
return field_dict
@classmethod
def from_dict(cls: Type[M], src_dict: Dict[str, Any]) -> M:
def from_dict(cls: Type[N], src_dict: Dict[str, Any]) -> N:
d = src_dict.copy()
amount_off = d.pop("amount_off", UNSET)

View File

@ -8,7 +8,7 @@ from ..models.currency import Currency
from ..models.new_address import NewAddress
from ..types import UNSET, Unset
N = TypeVar("N", bound="Customer")
J = TypeVar("J", bound="Customer")
@attr.s(auto_attribs=True)
@ -71,7 +71,7 @@ class Customer:
return field_dict
@classmethod
def from_dict(cls: Type[N], src_dict: Dict[str, Any]) -> N:
def from_dict(cls: Type[J], src_dict: Dict[str, Any]) -> J:
d = src_dict.copy()
_address = d.pop("address", UNSET)
address: Union[Unset, NewAddress]

View File

@ -7,7 +7,7 @@ from dateutil.parser import isoparse
from ..models.uuid import Uuid
from ..types import UNSET, Unset
J = TypeVar("J", bound="CustomerBalance")
V = TypeVar("V", bound="CustomerBalance")
@attr.s(auto_attribs=True)
@ -64,7 +64,7 @@ class CustomerBalance:
return field_dict
@classmethod
def from_dict(cls: Type[J], src_dict: Dict[str, Any]) -> J:
def from_dict(cls: Type[V], src_dict: Dict[str, Any]) -> V:
d = src_dict.copy()
_created_at = d.pop("created_at", UNSET)
created_at: Union[Unset, datetime.datetime]

View File

@ -5,7 +5,7 @@ import attr
from ..models.o_auth2_grant_type import OAuth2GrantType
from ..types import UNSET, Unset
V = TypeVar("V", bound="DeviceAccessTokenRequestForm")
F = TypeVar("F", bound="DeviceAccessTokenRequestForm")
@attr.s(auto_attribs=True)
@ -37,7 +37,7 @@ class DeviceAccessTokenRequestForm:
return field_dict
@classmethod
def from_dict(cls: Type[V], src_dict: Dict[str, Any]) -> V:
def from_dict(cls: Type[F], src_dict: Dict[str, Any]) -> F:
d = src_dict.copy()
client_id = d.pop("client_id", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
F = TypeVar("F", bound="DeviceAuthRequestForm")
V = TypeVar("V", bound="DeviceAuthRequestForm")
@attr.s(auto_attribs=True)
@ -27,7 +27,7 @@ class DeviceAuthRequestForm:
return field_dict
@classmethod
def from_dict(cls: Type[F], src_dict: Dict[str, Any]) -> F:
def from_dict(cls: Type[V], src_dict: Dict[str, Any]) -> V:
d = src_dict.copy()
client_id = d.pop("client_id", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
V = TypeVar("V", bound="DeviceAuthVerifyParams")
J = TypeVar("J", bound="DeviceAuthVerifyParams")
@attr.s(auto_attribs=True)
@ -27,7 +27,7 @@ class DeviceAuthVerifyParams:
return field_dict
@classmethod
def from_dict(cls: Type[V], src_dict: Dict[str, Any]) -> V:
def from_dict(cls: Type[J], src_dict: Dict[str, Any]) -> J:
d = src_dict.copy()
user_code = d.pop("user_code", UNSET)

View File

@ -0,0 +1,13 @@
from enum import Enum
class Direction(str, Enum):
"""Specifies the sign of a co-ordinate axis.""" # noqa: E501
"""# Increasing numbers. """ # noqa: E501
POSITIVE = "positive"
"""# Decreasing numbers. """ # noqa: E501
NEGATIVE = "negative"
def __str__(self) -> str:
return str(self.value)

View File

@ -5,7 +5,7 @@ import attr
from ..models.coupon import Coupon
from ..types import UNSET, Unset
J = TypeVar("J", bound="Discount")
V = TypeVar("V", bound="Discount")
@attr.s(auto_attribs=True)
@ -29,7 +29,7 @@ class Discount:
return field_dict
@classmethod
def from_dict(cls: Type[J], src_dict: Dict[str, Any]) -> J:
def from_dict(cls: Type[V], src_dict: Dict[str, Any]) -> V:
d = src_dict.copy()
_coupon = d.pop("coupon", UNSET)
coupon: Union[Unset, Coupon]

View File

@ -10,7 +10,7 @@ from ..models.system_info_cgroup_version_enum import SystemInfoCgroupVersionEnum
from ..models.system_info_isolation_enum import SystemInfoIsolationEnum
from ..types import UNSET, Unset
V = TypeVar("V", bound="DockerSystemInfo")
L = TypeVar("L", bound="DockerSystemInfo")
@attr.s(auto_attribs=True)
@ -293,7 +293,7 @@ class DockerSystemInfo:
return field_dict
@classmethod
def from_dict(cls: Type[V], src_dict: Dict[str, Any]) -> V:
def from_dict(cls: Type[L], src_dict: Dict[str, Any]) -> L:
d = src_dict.copy()
architecture = d.pop("architecture", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
L = TypeVar("L", bound="EmailAuthenticationForm")
E = TypeVar("E", bound="EmailAuthenticationForm")
@attr.s(auto_attribs=True)
@ -31,7 +31,7 @@ class EmailAuthenticationForm:
return field_dict
@classmethod
def from_dict(cls: Type[L], src_dict: Dict[str, Any]) -> L:
def from_dict(cls: Type[E], src_dict: Dict[str, Any]) -> E:
d = src_dict.copy()
callback_url = d.pop("callback_url", UNSET)

View File

@ -8,7 +8,7 @@ from ..models.environment import Environment
from ..models.file_system_metadata import FileSystemMetadata
from ..types import UNSET, Unset
E = TypeVar("E", bound="EngineMetadata")
Y = TypeVar("Y", bound="EngineMetadata")
@attr.s(auto_attribs=True)
@ -57,7 +57,7 @@ class EngineMetadata:
return field_dict
@classmethod
def from_dict(cls: Type[E], src_dict: Dict[str, Any]) -> E:
def from_dict(cls: Type[Y], src_dict: Dict[str, Any]) -> Y:
d = src_dict.copy()
async_jobs_running = d.pop("async_jobs_running", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
Y = TypeVar("Y", bound="Error")
H = TypeVar("H", bound="Error")
@attr.s(auto_attribs=True)
@ -35,7 +35,7 @@ class Error:
return field_dict
@classmethod
def from_dict(cls: Type[Y], src_dict: Dict[str, Any]) -> Y:
def from_dict(cls: Type[H], src_dict: Dict[str, Any]) -> H:
d = src_dict.copy()
error_code = d.pop("error_code", UNSET)

View File

@ -6,7 +6,7 @@ from ..models.docker_system_info import DockerSystemInfo
from ..models.environment import Environment
from ..types import UNSET, Unset
H = TypeVar("H", bound="ExecutorMetadata")
T = TypeVar("T", bound="ExecutorMetadata")
@attr.s(auto_attribs=True)
@ -41,7 +41,7 @@ class ExecutorMetadata:
return field_dict
@classmethod
def from_dict(cls: Type[H], src_dict: Dict[str, Any]) -> H:
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
d = src_dict.copy()
_docker_info = d.pop("docker_info", UNSET)
docker_info: Union[Unset, DockerSystemInfo]

View File

@ -6,7 +6,7 @@ from dateutil.parser import isoparse
from ..types import UNSET, Unset
T = TypeVar("T", bound="ExtendedUser")
M = TypeVar("M", bound="ExtendedUser")
@attr.s(auto_attribs=True)
@ -97,7 +97,7 @@ class ExtendedUser:
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
def from_dict(cls: Type[M], src_dict: Dict[str, Any]) -> M:
d = src_dict.copy()
company = d.pop("company", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
M = TypeVar("M", bound="ExtendedUserResultsPage")
B = TypeVar("B", bound="ExtendedUserResultsPage")
@attr.s(auto_attribs=True)
@ -37,7 +37,7 @@ class ExtendedUserResultsPage:
return field_dict
@classmethod
def from_dict(cls: Type[M], src_dict: Dict[str, Any]) -> M:
def from_dict(cls: Type[B], src_dict: Dict[str, Any]) -> B:
d = src_dict.copy()
from ..models.extended_user import ExtendedUser

View File

@ -5,7 +5,7 @@ import attr
from ..models.modeling_cmd_id import ModelingCmdId
from ..types import UNSET, Unset
B = TypeVar("B", bound="Extrude")
S = TypeVar("S", bound="Extrude")
@attr.s(auto_attribs=True)
@ -37,7 +37,7 @@ class Extrude:
return field_dict
@classmethod
def from_dict(cls: Type[B], src_dict: Dict[str, Any]) -> B:
def from_dict(cls: Type[S], src_dict: Dict[str, Any]) -> S:
d = src_dict.copy()
cap = d.pop("cap", UNSET)

View File

@ -9,7 +9,7 @@ from ..models.file_import_format import FileImportFormat
from ..models.uuid import Uuid
from ..types import UNSET, Unset
S = TypeVar("S", bound="FileCenterOfMass")
A = TypeVar("A", bound="FileCenterOfMass")
@attr.s(auto_attribs=True)
@ -80,7 +80,7 @@ class FileCenterOfMass:
return field_dict
@classmethod
def from_dict(cls: Type[S], src_dict: Dict[str, Any]) -> S:
def from_dict(cls: Type[A], src_dict: Dict[str, Any]) -> A:
d = src_dict.copy()
center_of_mass = cast(List[float], d.pop("center_of_mass", UNSET))

View File

@ -7,10 +7,12 @@ from dateutil.parser import isoparse
from ..models.api_call_status import ApiCallStatus
from ..models.file_export_format import FileExportFormat
from ..models.file_import_format import FileImportFormat
from ..models.input_format import InputFormat
from ..models.output_format import OutputFormat
from ..models.uuid import Uuid
from ..types import UNSET, Unset
A = TypeVar("A", bound="FileConversion")
H = TypeVar("H", bound="FileConversion")
@attr.s(auto_attribs=True)
@ -23,7 +25,10 @@ class FileConversion:
id: Union[Unset, str] = UNSET
output: Union[Unset, str] = UNSET
output_format: Union[Unset, FileExportFormat] = UNSET
output_format_options: Union[Unset, OutputFormat] = UNSET
outputs: Union[Unset, Any] = UNSET
src_format: Union[Unset, FileImportFormat] = UNSET
src_format_options: Union[Unset, InputFormat] = UNSET
started_at: Union[Unset, datetime.datetime] = UNSET
status: Union[Unset, ApiCallStatus] = UNSET
updated_at: Union[Unset, datetime.datetime] = UNSET
@ -43,8 +48,13 @@ class FileConversion:
output = self.output
if not isinstance(self.output_format, Unset):
output_format = self.output_format
if not isinstance(self.output_format_options, Unset):
output_format_options = self.output_format_options
outputs = self.outputs
if not isinstance(self.src_format, Unset):
src_format = self.src_format
if not isinstance(self.src_format_options, Unset):
src_format_options = self.src_format_options
started_at: Union[Unset, str] = UNSET
if not isinstance(self.started_at, Unset):
started_at = self.started_at.isoformat()
@ -70,8 +80,14 @@ class FileConversion:
field_dict["output"] = output
if output_format is not UNSET:
field_dict["output_format"] = output_format
if output_format_options is not UNSET:
field_dict["output_format_options"] = output_format_options
if outputs is not UNSET:
field_dict["outputs"] = outputs
if src_format is not UNSET:
field_dict["src_format"] = src_format
if src_format_options is not UNSET:
field_dict["src_format_options"] = src_format_options
if started_at is not UNSET:
field_dict["started_at"] = started_at
if status is not UNSET:
@ -84,7 +100,7 @@ class FileConversion:
return field_dict
@classmethod
def from_dict(cls: Type[A], src_dict: Dict[str, Any]) -> A:
def from_dict(cls: Type[H], src_dict: Dict[str, Any]) -> H:
d = src_dict.copy()
_completed_at = d.pop("completed_at", UNSET)
completed_at: Union[Unset, datetime.datetime]
@ -118,6 +134,14 @@ class FileConversion:
else:
output_format = _output_format # type: ignore[arg-type]
_output_format_options = d.pop("output_format_options", UNSET)
output_format_options: Union[Unset, OutputFormat]
if isinstance(_output_format_options, Unset):
output_format_options = UNSET
else:
output_format_options = OutputFormat(_output_format_options)
outputs = d.pop("outputs", UNSET)
_src_format = d.pop("src_format", UNSET)
src_format: Union[Unset, FileImportFormat]
if isinstance(_src_format, Unset):
@ -125,6 +149,13 @@ class FileConversion:
else:
src_format = _src_format # type: ignore[arg-type]
_src_format_options = d.pop("src_format_options", UNSET)
src_format_options: Union[Unset, InputFormat]
if isinstance(_src_format_options, Unset):
src_format_options = UNSET
else:
src_format_options = InputFormat(_src_format_options)
_started_at = d.pop("started_at", UNSET)
started_at: Union[Unset, datetime.datetime]
if isinstance(_started_at, Unset):
@ -155,7 +186,10 @@ class FileConversion:
id=id,
output=output,
output_format=output_format,
output_format_options=output_format_options,
outputs=outputs,
src_format=src_format,
src_format_options=src_format_options,
started_at=started_at,
status=status,
updated_at=updated_at,

View File

@ -9,7 +9,7 @@ from ..models.file_import_format import FileImportFormat
from ..models.uuid import Uuid
from ..types import UNSET, Unset
H = TypeVar("H", bound="FileDensity")
E = TypeVar("E", bound="FileDensity")
@attr.s(auto_attribs=True)
@ -82,7 +82,7 @@ class FileDensity:
return field_dict
@classmethod
def from_dict(cls: Type[H], src_dict: Dict[str, Any]) -> H:
def from_dict(cls: Type[E], src_dict: Dict[str, Any]) -> E:
d = src_dict.copy()
_completed_at = d.pop("completed_at", UNSET)
completed_at: Union[Unset, datetime.datetime]

View File

@ -12,7 +12,9 @@ class FileExportFormat(str, Enum):
FBX = "fbx"
"""# The FBX file format (in binary). <https://en.wikipedia.org/wiki/FBX> """ # noqa: E501
FBXB = "fbxb"
"""# The OBJ file format. A zip file containing both the obj file itself and its associated mtl file for full processing. <https://en.wikipedia.org/wiki/Wavefront_.obj_file>> The OBJ file format. <https://en.wikipedia.org/wiki/Wavefront_.obj_file> It may or may not have an an attached material (mtl // mtllib) within the file, but we interact with it as if it does not. """ # noqa: E501
"""# glTF 2.0. We refer to this as glTF since that is how our customers refer to it, although by default it will be in binary format and thus technically (glb). """ # noqa: E501
GLTF = "gltf"
"""# The OBJ file format. <https://en.wikipedia.org/wiki/Wavefront_.obj_file> It may or may not have an an attached material (mtl // mtllib) within the file, but we interact with it as if it does not. """ # noqa: E501
OBJ = "obj"
"""# The PLY file format. <https://en.wikipedia.org/wiki/PLY_(file_format)> """ # noqa: E501
PLY = "ply"

View File

@ -10,8 +10,8 @@ class FileImportFormat(str, Enum):
DXF = "dxf"
"""# The FBX file format. <https://en.wikipedia.org/wiki/FBX> """ # noqa: E501
FBX = "fbx"
"""# The OBJ file format. A zip file containing both the obj file itself and its associated mtl file for full processing. <https://en.wikipedia.org/wiki/Wavefront_.obj_file>> """ # noqa: E501
OBJ_ZIP = "obj_zip"
"""# glTF 2.0. """ # noqa: E501
GLTF = "gltf"
"""# The OBJ file format. <https://en.wikipedia.org/wiki/Wavefront_.obj_file> It may or may not have an an attached material (mtl // mtllib) within the file, but we interact with it as if it does not. """ # noqa: E501
OBJ = "obj"
"""# The PLY file format. <https://en.wikipedia.org/wiki/PLY_(file_format)> """ # noqa: E501

View File

@ -9,7 +9,7 @@ from ..models.file_import_format import FileImportFormat
from ..models.uuid import Uuid
from ..types import UNSET, Unset
E = TypeVar("E", bound="FileMass")
G = TypeVar("G", bound="FileMass")
@attr.s(auto_attribs=True)
@ -82,7 +82,7 @@ class FileMass:
return field_dict
@classmethod
def from_dict(cls: Type[E], src_dict: Dict[str, Any]) -> E:
def from_dict(cls: Type[G], src_dict: Dict[str, Any]) -> G:
d = src_dict.copy()
_completed_at = d.pop("completed_at", UNSET)
completed_at: Union[Unset, datetime.datetime]

View File

@ -9,7 +9,7 @@ from ..models.file_import_format import FileImportFormat
from ..models.uuid import Uuid
from ..types import UNSET, Unset
G = TypeVar("G", bound="FileSurfaceArea")
J = TypeVar("J", bound="FileSurfaceArea")
@attr.s(auto_attribs=True)
@ -78,7 +78,7 @@ class FileSurfaceArea:
return field_dict
@classmethod
def from_dict(cls: Type[G], src_dict: Dict[str, Any]) -> G:
def from_dict(cls: Type[J], src_dict: Dict[str, Any]) -> J:
d = src_dict.copy()
_completed_at = d.pop("completed_at", UNSET)
completed_at: Union[Unset, datetime.datetime]

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
J = TypeVar("J", bound="FileSystemMetadata")
R = TypeVar("R", bound="FileSystemMetadata")
@attr.s(auto_attribs=True)
@ -29,7 +29,7 @@ class FileSystemMetadata:
return field_dict
@classmethod
def from_dict(cls: Type[J], src_dict: Dict[str, Any]) -> J:
def from_dict(cls: Type[R], src_dict: Dict[str, Any]) -> R:
d = src_dict.copy()
ok = d.pop("ok", UNSET)

View File

@ -9,7 +9,7 @@ from ..models.file_import_format import FileImportFormat
from ..models.uuid import Uuid
from ..types import UNSET, Unset
R = TypeVar("R", bound="FileVolume")
L = TypeVar("L", bound="FileVolume")
@attr.s(auto_attribs=True)
@ -78,7 +78,7 @@ class FileVolume:
return field_dict
@classmethod
def from_dict(cls: Type[R], src_dict: Dict[str, Any]) -> R:
def from_dict(cls: Type[L], src_dict: Dict[str, Any]) -> L:
d = src_dict.copy()
_completed_at = d.pop("completed_at", UNSET)
completed_at: Union[Unset, datetime.datetime]

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
L = TypeVar("L", bound="Gateway")
Y = TypeVar("Y", bound="Gateway")
@attr.s(auto_attribs=True)
@ -43,7 +43,7 @@ class Gateway:
return field_dict
@classmethod
def from_dict(cls: Type[L], src_dict: Dict[str, Any]) -> L:
def from_dict(cls: Type[Y], src_dict: Dict[str, Any]) -> Y:
d = src_dict.copy()
auth_timeout = d.pop("auth_timeout", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
Y = TypeVar("Y", bound="IndexInfo")
H = TypeVar("H", bound="IndexInfo")
@attr.s(auto_attribs=True)
@ -41,7 +41,7 @@ class IndexInfo:
return field_dict
@classmethod
def from_dict(cls: Type[Y], src_dict: Dict[str, Any]) -> Y:
def from_dict(cls: Type[H], src_dict: Dict[str, Any]) -> H:
d = src_dict.copy()
mirrors = cast(List[str], d.pop("mirrors", UNSET))

View File

@ -0,0 +1,251 @@
from typing import Any, Dict, List, Type, TypeVar, Union
import attr
from ..models.system import System
from ..types import UNSET, Unset
K = TypeVar("K", bound="Gltf")
@attr.s(auto_attribs=True)
class Gltf:
"""Binary glTF 2.0. We refer to this as glTF since that is how our customers refer to it, but this can also import binary glTF (glb).""" # noqa: E501
type: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
type = self.type
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if type is not UNSET:
field_dict["type"] = type
return field_dict
@classmethod
def from_dict(cls: Type[K], src_dict: Dict[str, Any]) -> K:
d = src_dict.copy()
type = d.pop("type", UNSET)
gltf = cls(
type=type,
)
gltf.additional_properties = d
return gltf
@property
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
V = TypeVar("V", bound="Step")
@attr.s(auto_attribs=True)
class Step:
"""ISO 10303-21 (STEP) format.""" # noqa: E501
coords: Union[Unset, System] = UNSET
type: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
if not isinstance(self.coords, Unset):
coords = self.coords
type = self.type
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if coords is not UNSET:
field_dict["coords"] = coords
if type is not UNSET:
field_dict["type"] = type
return field_dict
@classmethod
def from_dict(cls: Type[V], src_dict: Dict[str, Any]) -> V:
d = src_dict.copy()
_coords = d.pop("coords", UNSET)
coords: Union[Unset, System]
if isinstance(_coords, Unset):
coords = UNSET
else:
coords = System(_coords)
type = d.pop("type", UNSET)
step = cls(
coords=coords,
type=type,
)
step.additional_properties = d
return step
@property
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
R = TypeVar("R", bound="Obj")
@attr.s(auto_attribs=True)
class Obj:
"""Wavefront OBJ format.""" # noqa: E501
coords: Union[Unset, System] = UNSET
type: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
if not isinstance(self.coords, Unset):
coords = self.coords
type = self.type
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if coords is not UNSET:
field_dict["coords"] = coords
if type is not UNSET:
field_dict["type"] = type
return field_dict
@classmethod
def from_dict(cls: Type[R], src_dict: Dict[str, Any]) -> R:
d = src_dict.copy()
_coords = d.pop("coords", UNSET)
coords: Union[Unset, System]
if isinstance(_coords, Unset):
coords = UNSET
else:
coords = System(_coords)
type = d.pop("type", UNSET)
obj = cls(
coords=coords,
type=type,
)
obj.additional_properties = d
return obj
@property
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
N = TypeVar("N", bound="Stl")
@attr.s(auto_attribs=True)
class Stl:
"""*ST**ereo**L**ithography format.""" # noqa: E501
coords: Union[Unset, System] = UNSET
type: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
if not isinstance(self.coords, Unset):
coords = self.coords
type = self.type
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if coords is not UNSET:
field_dict["coords"] = coords
if type is not UNSET:
field_dict["type"] = type
return field_dict
@classmethod
def from_dict(cls: Type[N], src_dict: Dict[str, Any]) -> N:
d = src_dict.copy()
_coords = d.pop("coords", UNSET)
coords: Union[Unset, System]
if isinstance(_coords, Unset):
coords = UNSET
else:
coords = System(_coords)
type = d.pop("type", UNSET)
stl = cls(
coords=coords,
type=type,
)
stl.additional_properties = d
return stl
@property
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
InputFormat = Union[Gltf, Step, Obj, Stl]

View File

@ -8,7 +8,7 @@ from ..models.currency import Currency
from ..models.invoice_status import InvoiceStatus
from ..types import UNSET, Unset
H = TypeVar("H", bound="Invoice")
P = TypeVar("P", bound="Invoice")
@attr.s(auto_attribs=True)
@ -143,7 +143,7 @@ class Invoice:
return field_dict
@classmethod
def from_dict(cls: Type[H], src_dict: Dict[str, Any]) -> H:
def from_dict(cls: Type[P], src_dict: Dict[str, Any]) -> P:
d = src_dict.copy()
amount_due = d.pop("amount_due", UNSET)

View File

@ -5,7 +5,7 @@ import attr
from ..models.currency import Currency
from ..types import UNSET, Unset
K = TypeVar("K", bound="InvoiceLineItem")
C = TypeVar("C", bound="InvoiceLineItem")
@attr.s(auto_attribs=True)
@ -49,7 +49,7 @@ class InvoiceLineItem:
return field_dict
@classmethod
def from_dict(cls: Type[K], src_dict: Dict[str, Any]) -> K:
def from_dict(cls: Type[C], src_dict: Dict[str, Any]) -> C:
d = src_dict.copy()
amount = d.pop("amount", UNSET)

View File

@ -7,7 +7,7 @@ from ..models.jetstream_stats import JetstreamStats
from ..models.meta_cluster_info import MetaClusterInfo
from ..types import UNSET, Unset
V = TypeVar("V", bound="Jetstream")
U = TypeVar("U", bound="Jetstream")
@attr.s(auto_attribs=True)
@ -41,7 +41,7 @@ class Jetstream:
return field_dict
@classmethod
def from_dict(cls: Type[V], src_dict: Dict[str, Any]) -> V:
def from_dict(cls: Type[U], src_dict: Dict[str, Any]) -> U:
d = src_dict.copy()
_config = d.pop("config", UNSET)
config: Union[Unset, JetstreamConfig]

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
R = TypeVar("R", bound="JetstreamApiStats")
S = TypeVar("S", bound="JetstreamApiStats")
@attr.s(auto_attribs=True)
@ -35,7 +35,7 @@ class JetstreamApiStats:
return field_dict
@classmethod
def from_dict(cls: Type[R], src_dict: Dict[str, Any]) -> R:
def from_dict(cls: Type[S], src_dict: Dict[str, Any]) -> S:
d = src_dict.copy()
errors = d.pop("errors", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
N = TypeVar("N", bound="JetstreamConfig")
K = TypeVar("K", bound="JetstreamConfig")
@attr.s(auto_attribs=True)
@ -39,7 +39,7 @@ class JetstreamConfig:
return field_dict
@classmethod
def from_dict(cls: Type[N], src_dict: Dict[str, Any]) -> N:
def from_dict(cls: Type[K], src_dict: Dict[str, Any]) -> K:
d = src_dict.copy()
domain = d.pop("domain", UNSET)

View File

@ -5,7 +5,7 @@ import attr
from ..models.jetstream_api_stats import JetstreamApiStats
from ..types import UNSET, Unset
P = TypeVar("P", bound="JetstreamStats")
Q = TypeVar("Q", bound="JetstreamStats")
@attr.s(auto_attribs=True)
@ -53,7 +53,7 @@ class JetstreamStats:
return field_dict
@classmethod
def from_dict(cls: Type[P], src_dict: Dict[str, Any]) -> P:
def from_dict(cls: Type[Q], src_dict: Dict[str, Any]) -> Q:
d = src_dict.copy()
accounts = d.pop("accounts", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
C = TypeVar("C", bound="LeafNode")
F = TypeVar("F", bound="LeafNode")
@attr.s(auto_attribs=True)
@ -39,7 +39,7 @@ class LeafNode:
return field_dict
@classmethod
def from_dict(cls: Type[C], src_dict: Dict[str, Any]) -> C:
def from_dict(cls: Type[F], src_dict: Dict[str, Any]) -> F:
d = src_dict.copy()
auth_timeout = d.pop("auth_timeout", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
U = TypeVar("U", bound="Mesh")
H = TypeVar("H", bound="Mesh")
@attr.s(auto_attribs=True)
@ -25,7 +25,7 @@ class Mesh:
return field_dict
@classmethod
def from_dict(cls: Type[U], src_dict: Dict[str, Any]) -> U:
def from_dict(cls: Type[H], src_dict: Dict[str, Any]) -> H:
d = src_dict.copy()
mesh = d.pop("mesh", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
S = TypeVar("S", bound="MetaClusterInfo")
N = TypeVar("N", bound="MetaClusterInfo")
@attr.s(auto_attribs=True)
@ -35,7 +35,7 @@ class MetaClusterInfo:
return field_dict
@classmethod
def from_dict(cls: Type[S], src_dict: Dict[str, Any]) -> S:
def from_dict(cls: Type[N], src_dict: Dict[str, Any]) -> N:
d = src_dict.copy()
cluster_size = d.pop("cluster_size", UNSET)

View File

@ -11,7 +11,7 @@ from ..models.file_system_metadata import FileSystemMetadata
from ..models.point_e_metadata import PointEMetadata
from ..types import UNSET, Unset
K = TypeVar("K", bound="Metadata")
H = TypeVar("H", bound="Metadata")
@attr.s(auto_attribs=True)
@ -71,7 +71,7 @@ class Metadata:
return field_dict
@classmethod
def from_dict(cls: Type[K], src_dict: Dict[str, Any]) -> K:
def from_dict(cls: Type[H], src_dict: Dict[str, Any]) -> H:
d = src_dict.copy()
_cache = d.pop("cache", UNSET)
cache: Union[Unset, CacheMetadata]

View File

@ -21,7 +21,7 @@ class StartPath(str, Enum):
return str(self.value)
Q = TypeVar("Q", bound="MovePathPen")
B = TypeVar("B", bound="MovePathPen")
@attr.s(auto_attribs=True)
@ -48,7 +48,7 @@ class MovePathPen:
return field_dict
@classmethod
def from_dict(cls: Type[Q], src_dict: Dict[str, Any]) -> Q:
def from_dict(cls: Type[B], src_dict: Dict[str, Any]) -> B:
d = src_dict.copy()
_path = d.pop("path", UNSET)
path: Union[Unset, ModelingCmdId]
@ -89,7 +89,7 @@ class MovePathPen:
return key in self.additional_properties
F = TypeVar("F", bound="ExtendPath")
B = TypeVar("B", bound="ExtendPath")
@attr.s(auto_attribs=True)
@ -116,7 +116,7 @@ class ExtendPath:
return field_dict
@classmethod
def from_dict(cls: Type[F], src_dict: Dict[str, Any]) -> F:
def from_dict(cls: Type[B], src_dict: Dict[str, Any]) -> B:
d = src_dict.copy()
_path = d.pop("path", UNSET)
path: Union[Unset, ModelingCmdId]
@ -157,7 +157,7 @@ class ExtendPath:
return key in self.additional_properties
H = TypeVar("H", bound="ClosePath")
P = TypeVar("P", bound="ClosePath")
@attr.s(auto_attribs=True)
@ -178,7 +178,7 @@ class ClosePath:
return field_dict
@classmethod
def from_dict(cls: Type[H], src_dict: Dict[str, Any]) -> H:
def from_dict(cls: Type[P], src_dict: Dict[str, Any]) -> P:
d = src_dict.copy()
path_id = d.pop("path_id", UNSET)
@ -206,7 +206,7 @@ class ClosePath:
return key in self.additional_properties
N = TypeVar("N", bound="CameraDragStart")
J = TypeVar("J", bound="CameraDragStart")
@attr.s(auto_attribs=True)
@ -233,7 +233,7 @@ class CameraDragStart:
return field_dict
@classmethod
def from_dict(cls: Type[N], src_dict: Dict[str, Any]) -> N:
def from_dict(cls: Type[J], src_dict: Dict[str, Any]) -> J:
d = src_dict.copy()
_interaction = d.pop("interaction", UNSET)
interaction: Union[Unset, CameraDragInteractionType]
@ -274,7 +274,7 @@ class CameraDragStart:
return key in self.additional_properties
H = TypeVar("H", bound="CameraDragMove")
T = TypeVar("T", bound="CameraDragMove")
@attr.s(auto_attribs=True)
@ -305,7 +305,7 @@ class CameraDragMove:
return field_dict
@classmethod
def from_dict(cls: Type[H], src_dict: Dict[str, Any]) -> H:
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
d = src_dict.copy()
_interaction = d.pop("interaction", UNSET)
interaction: Union[Unset, CameraDragInteractionType]
@ -349,7 +349,7 @@ class CameraDragMove:
return key in self.additional_properties
B = TypeVar("B", bound="CameraDragEnd")
V = TypeVar("V", bound="CameraDragEnd")
@attr.s(auto_attribs=True)
@ -376,7 +376,7 @@ class CameraDragEnd:
return field_dict
@classmethod
def from_dict(cls: Type[B], src_dict: Dict[str, Any]) -> B:
def from_dict(cls: Type[V], src_dict: Dict[str, Any]) -> V:
d = src_dict.copy()
_interaction = d.pop("interaction", UNSET)
interaction: Union[Unset, CameraDragInteractionType]

View File

@ -6,7 +6,7 @@ from ..models.modeling_cmd import ModelingCmd
from ..models.modeling_cmd_id import ModelingCmdId
from ..types import UNSET, Unset
B = TypeVar("B", bound="ModelingCmdReq")
C = TypeVar("C", bound="ModelingCmdReq")
@attr.s(auto_attribs=True)
@ -39,7 +39,7 @@ class ModelingCmdReq:
return field_dict
@classmethod
def from_dict(cls: Type[B], src_dict: Dict[str, Any]) -> B:
def from_dict(cls: Type[C], src_dict: Dict[str, Any]) -> C:
d = src_dict.copy()
_cmd = d.pop("cmd", UNSET)
cmd: Union[Unset, ModelingCmd]

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
P = TypeVar("P", bound="ModelingCmdReqBatch")
R = TypeVar("R", bound="ModelingCmdReqBatch")
@attr.s(auto_attribs=True)
@ -31,7 +31,7 @@ class ModelingCmdReqBatch:
return field_dict
@classmethod
def from_dict(cls: Type[P], src_dict: Dict[str, Any]) -> P:
def from_dict(cls: Type[R], src_dict: Dict[str, Any]) -> R:
d = src_dict.copy()
cmds = d.pop("cmds", UNSET)
file_id = d.pop("file_id", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
J = TypeVar("J", bound="ModelingError")
C = TypeVar("C", bound="ModelingError")
@attr.s(auto_attribs=True)
@ -39,7 +39,7 @@ class ModelingError:
return field_dict
@classmethod
def from_dict(cls: Type[J], src_dict: Dict[str, Any]) -> J:
def from_dict(cls: Type[C], src_dict: Dict[str, Any]) -> C:
d = src_dict.copy()
error_code = d.pop("error_code", UNSET)

View File

@ -12,7 +12,7 @@ Success = Any
Error = ModelingError
T = TypeVar("T", bound="Cancelled")
E = TypeVar("E", bound="Cancelled")
@attr.s(auto_attribs=True)
@ -34,7 +34,7 @@ class Cancelled:
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
def from_dict(cls: Type[E], src_dict: Dict[str, Any]) -> E:
d = src_dict.copy()
_what_failed = d.pop("what_failed", UNSET)
what_failed: Union[Unset, ModelingCmdId]

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
V = TypeVar("V", bound="ModelingOutcomes")
M = TypeVar("M", bound="ModelingOutcomes")
@attr.s(auto_attribs=True)
@ -27,7 +27,7 @@ class ModelingOutcomes:
return field_dict
@classmethod
def from_dict(cls: Type[V], src_dict: Dict[str, Any]) -> V:
def from_dict(cls: Type[M], src_dict: Dict[str, Any]) -> M:
d = src_dict.copy()
outcomes = d.pop("outcomes", UNSET)

View File

@ -5,7 +5,7 @@ import attr
from ..models.country_code import CountryCode
from ..types import UNSET, Unset
C = TypeVar("C", bound="NewAddress")
S = TypeVar("S", bound="NewAddress")
@attr.s(auto_attribs=True)
@ -53,7 +53,7 @@ class NewAddress:
return field_dict
@classmethod
def from_dict(cls: Type[C], src_dict: Dict[str, Any]) -> C:
def from_dict(cls: Type[S], src_dict: Dict[str, Any]) -> S:
d = src_dict.copy()
city = d.pop("city", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
R = TypeVar("R", bound="OAuth2ClientInfo")
L = TypeVar("L", bound="OAuth2ClientInfo")
@attr.s(auto_attribs=True)
@ -35,7 +35,7 @@ class OAuth2ClientInfo:
return field_dict
@classmethod
def from_dict(cls: Type[R], src_dict: Dict[str, Any]) -> R:
def from_dict(cls: Type[L], src_dict: Dict[str, Any]) -> L:
d = src_dict.copy()
csrf_token = d.pop("csrf_token", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
C = TypeVar("C", bound="Onboarding")
T = TypeVar("T", bound="Onboarding")
@attr.s(auto_attribs=True)
@ -37,7 +37,7 @@ class Onboarding:
return field_dict
@classmethod
def from_dict(cls: Type[C], src_dict: Dict[str, Any]) -> C:
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
d = src_dict.copy()
first_call_from__their_machine_date = d.pop(
"first_call_from_their_machine_date", UNSET

View File

@ -0,0 +1,278 @@
from typing import Any, Dict, List, Type, TypeVar, Union
import attr
from ..models.storage import Storage
from ..models.system import System
from ..types import UNSET, Unset
D = TypeVar("D", bound="Gltf")
@attr.s(auto_attribs=True)
class Gltf:
"""glTF 2.0. We refer to this as glTF since that is how our customers refer to it, although by default it will be in binary format and thus technically (glb). If you prefer ascii output, you can set that option for the export.""" # noqa: E501
storage: Union[Unset, Storage] = UNSET
type: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
if not isinstance(self.storage, Unset):
storage = self.storage
type = self.type
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if storage is not UNSET:
field_dict["storage"] = storage
if type is not UNSET:
field_dict["type"] = type
return field_dict
@classmethod
def from_dict(cls: Type[D], src_dict: Dict[str, Any]) -> D:
d = src_dict.copy()
_storage = d.pop("storage", UNSET)
storage: Union[Unset, Storage]
if isinstance(_storage, Unset):
storage = UNSET
else:
storage = _storage # type: ignore[arg-type]
type = d.pop("type", UNSET)
gltf = cls(
storage=storage,
type=type,
)
gltf.additional_properties = d
return gltf
@property
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
Y = TypeVar("Y", bound="Obj")
@attr.s(auto_attribs=True)
class Obj:
"""Wavefront OBJ format.""" # noqa: E501
coords: Union[Unset, System] = UNSET
type: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
if not isinstance(self.coords, Unset):
coords = self.coords
type = self.type
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if coords is not UNSET:
field_dict["coords"] = coords
if type is not UNSET:
field_dict["type"] = type
return field_dict
@classmethod
def from_dict(cls: Type[Y], src_dict: Dict[str, Any]) -> Y:
d = src_dict.copy()
_coords = d.pop("coords", UNSET)
coords: Union[Unset, System]
if isinstance(_coords, Unset):
coords = UNSET
else:
coords = System(_coords)
type = d.pop("type", UNSET)
obj = cls(
coords=coords,
type=type,
)
obj.additional_properties = d
return obj
@property
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
Y = TypeVar("Y", bound="Step")
@attr.s(auto_attribs=True)
class Step:
"""ISO 10303-21 (STEP) format.""" # noqa: E501
coords: Union[Unset, System] = UNSET
type: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
if not isinstance(self.coords, Unset):
coords = self.coords
type = self.type
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if coords is not UNSET:
field_dict["coords"] = coords
if type is not UNSET:
field_dict["type"] = type
return field_dict
@classmethod
def from_dict(cls: Type[Y], src_dict: Dict[str, Any]) -> Y:
d = src_dict.copy()
_coords = d.pop("coords", UNSET)
coords: Union[Unset, System]
if isinstance(_coords, Unset):
coords = UNSET
else:
coords = System(_coords)
type = d.pop("type", UNSET)
step = cls(
coords=coords,
type=type,
)
step.additional_properties = d
return step
@property
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
D = TypeVar("D", bound="Stl")
@attr.s(auto_attribs=True)
class Stl:
"""*ST**ereo**L**ithography format.""" # noqa: E501
coords: Union[Unset, System] = UNSET
storage: Union[Unset, Storage] = UNSET
type: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
if not isinstance(self.coords, Unset):
coords = self.coords
if not isinstance(self.storage, Unset):
storage = self.storage
type = self.type
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if coords is not UNSET:
field_dict["coords"] = coords
if storage is not UNSET:
field_dict["storage"] = storage
if type is not UNSET:
field_dict["type"] = type
return field_dict
@classmethod
def from_dict(cls: Type[D], src_dict: Dict[str, Any]) -> D:
d = src_dict.copy()
_coords = d.pop("coords", UNSET)
coords: Union[Unset, System]
if isinstance(_coords, Unset):
coords = UNSET
else:
coords = System(_coords)
_storage = d.pop("storage", UNSET)
storage: Union[Unset, Storage]
if isinstance(_storage, Unset):
storage = UNSET
else:
storage = _storage # type: ignore[arg-type]
type = d.pop("type", UNSET)
stl = cls(
coords=coords,
storage=storage,
type=type,
)
stl.additional_properties = d
return stl
@property
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
OutputFormat = Union[Gltf, Obj, Step, Stl]

View File

@ -6,7 +6,7 @@ from ..models.point2d import Point2d
from ..models.point3d import Point3d
from ..types import UNSET, Unset
M = TypeVar("M", bound="Line")
F = TypeVar("F", bound="Line")
@attr.s(auto_attribs=True)
@ -28,7 +28,7 @@ class Line:
return field_dict
@classmethod
def from_dict(cls: Type[M], src_dict: Dict[str, Any]) -> M:
def from_dict(cls: Type[F], src_dict: Dict[str, Any]) -> F:
d = src_dict.copy()
_end = d.pop("end", UNSET)
end: Union[Unset, Point3d]
@ -61,7 +61,7 @@ class Line:
return key in self.additional_properties
S = TypeVar("S", bound="Arc")
Z = TypeVar("Z", bound="Arc")
@attr.s(auto_attribs=True)
@ -95,7 +95,7 @@ class Arc:
return field_dict
@classmethod
def from_dict(cls: Type[S], src_dict: Dict[str, Any]) -> S:
def from_dict(cls: Type[Z], src_dict: Dict[str, Any]) -> Z:
d = src_dict.copy()
angle_end = d.pop("angle_end", UNSET)
@ -137,7 +137,7 @@ class Arc:
return key in self.additional_properties
L = TypeVar("L", bound="Bezier")
G = TypeVar("G", bound="Bezier")
@attr.s(auto_attribs=True)
@ -169,7 +169,7 @@ class Bezier:
return field_dict
@classmethod
def from_dict(cls: Type[L], src_dict: Dict[str, Any]) -> L:
def from_dict(cls: Type[G], src_dict: Dict[str, Any]) -> G:
d = src_dict.copy()
_control1 = d.pop("control1", UNSET)
control1: Union[Unset, Point3d]

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
T = TypeVar("T", bound="PaymentIntent")
L = TypeVar("L", bound="PaymentIntent")
@attr.s(auto_attribs=True)
@ -27,7 +27,7 @@ class PaymentIntent:
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
def from_dict(cls: Type[L], src_dict: Dict[str, Any]) -> L:
d = src_dict.copy()
client_secret = d.pop("client_secret", UNSET)

View File

@ -9,7 +9,7 @@ from ..models.card_details import CardDetails
from ..models.payment_method_type import PaymentMethodType
from ..types import UNSET, Unset
E = TypeVar("E", bound="PaymentMethod")
N = TypeVar("N", bound="PaymentMethod")
@attr.s(auto_attribs=True)
@ -57,7 +57,7 @@ class PaymentMethod:
return field_dict
@classmethod
def from_dict(cls: Type[E], src_dict: Dict[str, Any]) -> E:
def from_dict(cls: Type[N], src_dict: Dict[str, Any]) -> N:
d = src_dict.copy()
_billing_info = d.pop("billing_info", UNSET)
billing_info: Union[Unset, BillingInfo]

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
D = TypeVar("D", bound="PaymentMethodCardChecks")
N = TypeVar("N", bound="PaymentMethodCardChecks")
@attr.s(auto_attribs=True)
@ -35,7 +35,7 @@ class PaymentMethodCardChecks:
return field_dict
@classmethod
def from_dict(cls: Type[D], src_dict: Dict[str, Any]) -> D:
def from_dict(cls: Type[N], src_dict: Dict[str, Any]) -> N:
d = src_dict.copy()
address_line1_check = d.pop("address_line1_check", UNSET)

View File

@ -9,7 +9,7 @@ from ..models.physics_constant_name import PhysicsConstantName
from ..models.uuid import Uuid
from ..types import UNSET, Unset
Y = TypeVar("Y", bound="PhysicsConstant")
H = TypeVar("H", bound="PhysicsConstant")
@attr.s(auto_attribs=True)
@ -78,7 +78,7 @@ class PhysicsConstant:
return field_dict
@classmethod
def from_dict(cls: Type[Y], src_dict: Dict[str, Any]) -> Y:
def from_dict(cls: Type[H], src_dict: Dict[str, Any]) -> H:
d = src_dict.copy()
_completed_at = d.pop("completed_at", UNSET)
completed_at: Union[Unset, datetime.datetime]

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
Y = TypeVar("Y", bound="PluginsInfo")
V = TypeVar("V", bound="PluginsInfo")
@attr.s(auto_attribs=True)
@ -49,7 +49,7 @@ class PluginsInfo:
return field_dict
@classmethod
def from_dict(cls: Type[Y], src_dict: Dict[str, Any]) -> Y:
def from_dict(cls: Type[V], src_dict: Dict[str, Any]) -> V:
d = src_dict.copy()
authorization = cast(List[str], d.pop("authorization", UNSET))

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
D = TypeVar("D", bound="Point2d")
E = TypeVar("E", bound="Point2d")
@attr.s(auto_attribs=True)
@ -31,7 +31,7 @@ class Point2d:
return field_dict
@classmethod
def from_dict(cls: Type[D], src_dict: Dict[str, Any]) -> D:
def from_dict(cls: Type[E], src_dict: Dict[str, Any]) -> E:
d = src_dict.copy()
x = d.pop("x", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
F = TypeVar("F", bound="Point3d")
T = TypeVar("T", bound="Point3d")
@attr.s(auto_attribs=True)
@ -35,7 +35,7 @@ class Point3d:
return field_dict
@classmethod
def from_dict(cls: Type[F], src_dict: Dict[str, Any]) -> F:
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
d = src_dict.copy()
x = d.pop("x", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
Z = TypeVar("Z", bound="PointEMetadata")
Q = TypeVar("Q", bound="PointEMetadata")
@attr.s(auto_attribs=True)
@ -29,7 +29,7 @@ class PointEMetadata:
return field_dict
@classmethod
def from_dict(cls: Type[Z], src_dict: Dict[str, Any]) -> Z:
def from_dict(cls: Type[Q], src_dict: Dict[str, Any]) -> Q:
d = src_dict.copy()
ok = d.pop("ok", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
G = TypeVar("G", bound="Pong")
F = TypeVar("F", bound="Pong")
@attr.s(auto_attribs=True)
@ -27,7 +27,7 @@ class Pong:
return field_dict
@classmethod
def from_dict(cls: Type[G], src_dict: Dict[str, Any]) -> G:
def from_dict(cls: Type[F], src_dict: Dict[str, Any]) -> F:
d = src_dict.copy()
message = d.pop("message", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
L = TypeVar("L", bound="RegistryServiceConfig")
D = TypeVar("D", bound="RegistryServiceConfig")
@attr.s(auto_attribs=True)
@ -59,7 +59,7 @@ class RegistryServiceConfig:
return field_dict
@classmethod
def from_dict(cls: Type[L], src_dict: Dict[str, Any]) -> L:
def from_dict(cls: Type[D], src_dict: Dict[str, Any]) -> D:
d = src_dict.copy()
allow_nondistributable_artifacts_cid_rs = cast(
List[str], d.pop("allow_nondistributable_artifacts_cid_rs", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
N = TypeVar("N", bound="Runtime")
J = TypeVar("J", bound="Runtime")
@attr.s(auto_attribs=True)
@ -33,7 +33,7 @@ class Runtime:
return field_dict
@classmethod
def from_dict(cls: Type[N], src_dict: Dict[str, Any]) -> N:
def from_dict(cls: Type[J], src_dict: Dict[str, Any]) -> J:
d = src_dict.copy()
path = d.pop("path", UNSET)

View File

@ -7,7 +7,7 @@ from dateutil.parser import isoparse
from ..models.uuid import Uuid
from ..types import UNSET, Unset
N = TypeVar("N", bound="Session")
F = TypeVar("F", bound="Session")
@attr.s(auto_attribs=True)
@ -58,7 +58,7 @@ class Session:
return field_dict
@classmethod
def from_dict(cls: Type[N], src_dict: Dict[str, Any]) -> N:
def from_dict(cls: Type[F], src_dict: Dict[str, Any]) -> F:
d = src_dict.copy()
_created_at = d.pop("created_at", UNSET)
created_at: Union[Unset, datetime.datetime]

View File

@ -0,0 +1,23 @@
from enum import Enum
class Storage(str, Enum):
"""Describes the storage format of a glTF 2.0 scene.""" # noqa: E501
"""# Binary glTF 2.0.
This is a single binary with .glb extension.
This is the default setting. """ # noqa: E501
BINARY = "binary"
"""# Standard glTF 2.0.
This is a JSON file with .gltf extension paired with a separate binary blob file with .bin extension. """ # noqa: E501
STANDARD = "standard"
"""# Embedded glTF 2.0.
Single JSON file with .gltf extension binary data encoded as base64 data URIs. """ # noqa: E501
EMBEDDED = "embedded"
def __str__(self) -> str:
return str(self.value)

81
kittycad/models/system.py Normal file
View File

@ -0,0 +1,81 @@
from typing import Any, Dict, List, Type, TypeVar, Union
import attr
from ..models.axis_direction_pair import AxisDirectionPair
from ..types import UNSET, Unset
V = TypeVar("V", bound="System")
@attr.s(auto_attribs=True)
class System:
"""Co-ordinate system definition.
The `up` axis must be orthogonal to the `forward` axis.
See [cglearn.eu] for background reading.
[cglearn.eu](https://cglearn.eu/pub/computer-graphics/introduction-to-geometry#material-coordinate-systems-1)""" # noqa: E501
forward: Union[Unset, AxisDirectionPair] = UNSET
up: Union[Unset, AxisDirectionPair] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
if not isinstance(self.forward, Unset):
forward = self.forward
if not isinstance(self.up, Unset):
up = self.up
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if forward is not UNSET:
field_dict["forward"] = forward
if up is not UNSET:
field_dict["up"] = up
return field_dict
@classmethod
def from_dict(cls: Type[V], src_dict: Dict[str, Any]) -> V:
d = src_dict.copy()
_forward = d.pop("forward", UNSET)
forward: Union[Unset, AxisDirectionPair]
if isinstance(_forward, Unset):
forward = UNSET
else:
forward = AxisDirectionPair(_forward)
_up = d.pop("up", UNSET)
up: Union[Unset, AxisDirectionPair]
if isinstance(_up, Unset):
up = UNSET
else:
up = AxisDirectionPair(_up)
system = cls(
forward=forward,
up=up,
)
system.additional_properties = d
return system
@property
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

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
H = TypeVar("H", bound="SystemInfoDefaultAddressPools")
U = TypeVar("U", bound="SystemInfoDefaultAddressPools")
@attr.s(auto_attribs=True)
@ -29,7 +29,7 @@ class SystemInfoDefaultAddressPools:
return field_dict
@classmethod
def from_dict(cls: Type[H], src_dict: Dict[str, Any]) -> H:
def from_dict(cls: Type[U], src_dict: Dict[str, Any]) -> U:
d = src_dict.copy()
base = d.pop("base", UNSET)

View File

@ -9,7 +9,7 @@ from ..models.unit_angle import UnitAngle
from ..models.uuid import Uuid
from ..types import UNSET, Unset
V = TypeVar("V", bound="UnitAngleConversion")
F = TypeVar("F", bound="UnitAngleConversion")
@attr.s(auto_attribs=True)
@ -87,7 +87,7 @@ class UnitAngleConversion:
return field_dict
@classmethod
def from_dict(cls: Type[V], src_dict: Dict[str, Any]) -> V:
def from_dict(cls: Type[F], src_dict: Dict[str, Any]) -> F:
d = src_dict.copy()
_completed_at = d.pop("completed_at", UNSET)
completed_at: Union[Unset, datetime.datetime]

View File

@ -9,7 +9,7 @@ from ..models.unit_area import UnitArea
from ..models.uuid import Uuid
from ..types import UNSET, Unset
E = TypeVar("E", bound="UnitAreaConversion")
Y = TypeVar("Y", bound="UnitAreaConversion")
@attr.s(auto_attribs=True)
@ -87,7 +87,7 @@ class UnitAreaConversion:
return field_dict
@classmethod
def from_dict(cls: Type[E], src_dict: Dict[str, Any]) -> E:
def from_dict(cls: Type[Y], src_dict: Dict[str, Any]) -> Y:
d = src_dict.copy()
_completed_at = d.pop("completed_at", UNSET)
completed_at: Union[Unset, datetime.datetime]

View File

@ -9,7 +9,7 @@ from ..models.unit_current import UnitCurrent
from ..models.uuid import Uuid
from ..types import UNSET, Unset
T = TypeVar("T", bound="UnitCurrentConversion")
F = TypeVar("F", bound="UnitCurrentConversion")
@attr.s(auto_attribs=True)
@ -87,7 +87,7 @@ class UnitCurrentConversion:
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
def from_dict(cls: Type[F], src_dict: Dict[str, Any]) -> F:
d = src_dict.copy()
_completed_at = d.pop("completed_at", UNSET)
completed_at: Union[Unset, datetime.datetime]

View File

@ -9,7 +9,7 @@ from ..models.unit_energy import UnitEnergy
from ..models.uuid import Uuid
from ..types import UNSET, Unset
Q = TypeVar("Q", bound="UnitEnergyConversion")
P = TypeVar("P", bound="UnitEnergyConversion")
@attr.s(auto_attribs=True)
@ -87,7 +87,7 @@ class UnitEnergyConversion:
return field_dict
@classmethod
def from_dict(cls: Type[Q], src_dict: Dict[str, Any]) -> Q:
def from_dict(cls: Type[P], src_dict: Dict[str, Any]) -> P:
d = src_dict.copy()
_completed_at = d.pop("completed_at", UNSET)
completed_at: Union[Unset, datetime.datetime]

View File

@ -9,7 +9,7 @@ from ..models.unit_force import UnitForce
from ..models.uuid import Uuid
from ..types import UNSET, Unset
F = TypeVar("F", bound="UnitForceConversion")
Y = TypeVar("Y", bound="UnitForceConversion")
@attr.s(auto_attribs=True)
@ -87,7 +87,7 @@ class UnitForceConversion:
return field_dict
@classmethod
def from_dict(cls: Type[F], src_dict: Dict[str, Any]) -> F:
def from_dict(cls: Type[Y], src_dict: Dict[str, Any]) -> Y:
d = src_dict.copy()
_completed_at = d.pop("completed_at", UNSET)
completed_at: Union[Unset, datetime.datetime]

View File

@ -9,7 +9,7 @@ from ..models.unit_frequency import UnitFrequency
from ..models.uuid import Uuid
from ..types import UNSET, Unset
D = TypeVar("D", bound="UnitFrequencyConversion")
L = TypeVar("L", bound="UnitFrequencyConversion")
@attr.s(auto_attribs=True)
@ -87,7 +87,7 @@ class UnitFrequencyConversion:
return field_dict
@classmethod
def from_dict(cls: Type[D], src_dict: Dict[str, Any]) -> D:
def from_dict(cls: Type[L], src_dict: Dict[str, Any]) -> L:
d = src_dict.copy()
_completed_at = d.pop("completed_at", UNSET)
completed_at: Union[Unset, datetime.datetime]

View File

@ -9,7 +9,7 @@ from ..models.unit_length import UnitLength
from ..models.uuid import Uuid
from ..types import UNSET, Unset
J = TypeVar("J", bound="UnitLengthConversion")
K = TypeVar("K", bound="UnitLengthConversion")
@attr.s(auto_attribs=True)
@ -87,7 +87,7 @@ class UnitLengthConversion:
return field_dict
@classmethod
def from_dict(cls: Type[J], src_dict: Dict[str, Any]) -> J:
def from_dict(cls: Type[K], src_dict: Dict[str, Any]) -> K:
d = src_dict.copy()
_completed_at = d.pop("completed_at", UNSET)
completed_at: Union[Unset, datetime.datetime]

View File

@ -9,7 +9,7 @@ from ..models.unit_mass import UnitMass
from ..models.uuid import Uuid
from ..types import UNSET, Unset
F = TypeVar("F", bound="UnitMassConversion")
N = TypeVar("N", bound="UnitMassConversion")
@attr.s(auto_attribs=True)
@ -87,7 +87,7 @@ class UnitMassConversion:
return field_dict
@classmethod
def from_dict(cls: Type[F], src_dict: Dict[str, Any]) -> F:
def from_dict(cls: Type[N], src_dict: Dict[str, Any]) -> N:
d = src_dict.copy()
_completed_at = d.pop("completed_at", UNSET)
completed_at: Union[Unset, datetime.datetime]

View File

@ -9,7 +9,7 @@ from ..models.unit_power import UnitPower
from ..models.uuid import Uuid
from ..types import UNSET, Unset
V = TypeVar("V", bound="UnitPowerConversion")
H = TypeVar("H", bound="UnitPowerConversion")
@attr.s(auto_attribs=True)
@ -87,7 +87,7 @@ class UnitPowerConversion:
return field_dict
@classmethod
def from_dict(cls: Type[V], src_dict: Dict[str, Any]) -> V:
def from_dict(cls: Type[H], src_dict: Dict[str, Any]) -> H:
d = src_dict.copy()
_completed_at = d.pop("completed_at", UNSET)
completed_at: Union[Unset, datetime.datetime]

View File

@ -9,7 +9,7 @@ from ..models.unit_pressure import UnitPressure
from ..models.uuid import Uuid
from ..types import UNSET, Unset
U = TypeVar("U", bound="UnitPressureConversion")
A = TypeVar("A", bound="UnitPressureConversion")
@attr.s(auto_attribs=True)
@ -87,7 +87,7 @@ class UnitPressureConversion:
return field_dict
@classmethod
def from_dict(cls: Type[U], src_dict: Dict[str, Any]) -> U:
def from_dict(cls: Type[A], src_dict: Dict[str, Any]) -> A:
d = src_dict.copy()
_completed_at = d.pop("completed_at", UNSET)
completed_at: Union[Unset, datetime.datetime]

View File

@ -9,7 +9,7 @@ from ..models.unit_temperature import UnitTemperature
from ..models.uuid import Uuid
from ..types import UNSET, Unset
F = TypeVar("F", bound="UnitTemperatureConversion")
R = TypeVar("R", bound="UnitTemperatureConversion")
@attr.s(auto_attribs=True)
@ -87,7 +87,7 @@ class UnitTemperatureConversion:
return field_dict
@classmethod
def from_dict(cls: Type[F], src_dict: Dict[str, Any]) -> F:
def from_dict(cls: Type[R], src_dict: Dict[str, Any]) -> R:
d = src_dict.copy()
_completed_at = d.pop("completed_at", UNSET)
completed_at: Union[Unset, datetime.datetime]

View File

@ -9,7 +9,7 @@ from ..models.unit_torque import UnitTorque
from ..models.uuid import Uuid
from ..types import UNSET, Unset
Y = TypeVar("Y", bound="UnitTorqueConversion")
W = TypeVar("W", bound="UnitTorqueConversion")
@attr.s(auto_attribs=True)
@ -87,7 +87,7 @@ class UnitTorqueConversion:
return field_dict
@classmethod
def from_dict(cls: Type[Y], src_dict: Dict[str, Any]) -> Y:
def from_dict(cls: Type[W], src_dict: Dict[str, Any]) -> W:
d = src_dict.copy()
_completed_at = d.pop("completed_at", UNSET)
completed_at: Union[Unset, datetime.datetime]

View File

@ -9,7 +9,7 @@ from ..models.unit_volume import UnitVolume
from ..models.uuid import Uuid
from ..types import UNSET, Unset
F = TypeVar("F", bound="UnitVolumeConversion")
B = TypeVar("B", bound="UnitVolumeConversion")
@attr.s(auto_attribs=True)
@ -87,7 +87,7 @@ class UnitVolumeConversion:
return field_dict
@classmethod
def from_dict(cls: Type[F], src_dict: Dict[str, Any]) -> F:
def from_dict(cls: Type[B], src_dict: Dict[str, Any]) -> B:
d = src_dict.copy()
_completed_at = d.pop("completed_at", UNSET)
completed_at: Union[Unset, datetime.datetime]

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
P = TypeVar("P", bound="UpdateUser")
K = TypeVar("K", bound="UpdateUser")
@attr.s(auto_attribs=True)
@ -47,7 +47,7 @@ class UpdateUser:
return field_dict
@classmethod
def from_dict(cls: Type[P], src_dict: Dict[str, Any]) -> P:
def from_dict(cls: Type[K], src_dict: Dict[str, Any]) -> K:
d = src_dict.copy()
company = d.pop("company", UNSET)

View File

@ -6,7 +6,7 @@ from dateutil.parser import isoparse
from ..types import UNSET, Unset
Y = TypeVar("Y", bound="User")
K = TypeVar("K", bound="User")
@attr.s(auto_attribs=True)
@ -83,7 +83,7 @@ class User:
return field_dict
@classmethod
def from_dict(cls: Type[Y], src_dict: Dict[str, Any]) -> Y:
def from_dict(cls: Type[K], src_dict: Dict[str, Any]) -> K:
d = src_dict.copy()
company = d.pop("company", UNSET)

View File

@ -4,7 +4,7 @@ import attr
from ..types import UNSET, Unset
L = TypeVar("L", bound="UserResultsPage")
H = TypeVar("H", bound="UserResultsPage")
@attr.s(auto_attribs=True)
@ -37,7 +37,7 @@ class UserResultsPage:
return field_dict
@classmethod
def from_dict(cls: Type[L], src_dict: Dict[str, Any]) -> L:
def from_dict(cls: Type[H], src_dict: Dict[str, Any]) -> H:
d = src_dict.copy()
from ..models.user import User

View File

@ -6,7 +6,7 @@ from dateutil.parser import isoparse
from ..types import UNSET, Unset
K = TypeVar("K", bound="VerificationToken")
C = TypeVar("C", bound="VerificationToken")
@attr.s(auto_attribs=True)
@ -53,7 +53,7 @@ class VerificationToken:
return field_dict
@classmethod
def from_dict(cls: Type[K], src_dict: Dict[str, Any]) -> K:
def from_dict(cls: Type[C], src_dict: Dict[str, Any]) -> C:
d = src_dict.copy()
_created_at = d.pop("created_at", UNSET)
created_at: Union[Unset, datetime.datetime]

393
spec.json
View File

@ -670,7 +670,7 @@
"description": "The unique identifier of the API call.\n\nThis is the same as the API call ID."
},
"output": {
"description": "The converted file, if completed, base64 encoded.",
"description": "The converted file (if single file conversion), if completed, base64 encoded. This field is deprecated, and will be removed in a future release. Use `outputs` instead.",
"format": "byte",
"nullable": true,
"title": "String",
@ -684,6 +684,24 @@
],
"description": "The output format of the file conversion."
},
"output_format_options": {
"allOf": [
{
"$ref": "#/components/schemas/OutputFormat"
}
],
"description": "The output format options of the file conversion.",
"nullable": true
},
"outputs": {
"additionalProperties": {
"format": "byte",
"title": "String",
"type": "string"
},
"description": "The converted files (if multiple file conversion), if completed, base64 encoded. The key of the map is the path of the output file.",
"type": "object"
},
"src_format": {
"allOf": [
{
@ -692,6 +710,15 @@
],
"description": "The source format of the file conversion."
},
"src_format_options": {
"allOf": [
{
"$ref": "#/components/schemas/InputFormat"
}
],
"description": "The source format options of the file conversion.",
"nullable": true
},
"started_at": {
"description": "The time and date the API call was started.",
"format": "date-time",
@ -1245,6 +1272,51 @@
}
]
},
"Axis": {
"description": "Co-ordinate axis specifier.\n\nSee [cglearn.eu] for background reading.\n\n[cglearn.eu]: https://cglearn.eu/pub/computer-graphics/introduction-to-geometry#material-coordinate-systems-1",
"oneOf": [
{
"description": "'Y' axis.",
"enum": [
"y"
],
"type": "string"
},
{
"description": "'Z' axis.",
"enum": [
"z"
],
"type": "string"
}
]
},
"AxisDirectionPair": {
"description": "An [`Axis`] paired with a [`Direction`].",
"properties": {
"axis": {
"allOf": [
{
"$ref": "#/components/schemas/Axis"
}
],
"description": "Axis specifier."
},
"direction": {
"allOf": [
{
"$ref": "#/components/schemas/Direction"
}
],
"description": "Specifies which direction the axis is pointing."
}
},
"required": [
"axis",
"direction"
],
"type": "object"
},
"BillingInfo": {
"description": "The billing information for payments.",
"properties": {
@ -4756,6 +4828,25 @@
],
"type": "object"
},
"Direction": {
"description": "Specifies the sign of a co-ordinate axis.",
"oneOf": [
{
"description": "Increasing numbers.",
"enum": [
"positive"
],
"type": "string"
},
{
"description": "Decreasing numbers.",
"enum": [
"negative"
],
"type": "string"
}
]
},
"Discount": {
"description": "The resource representing a Discount.",
"properties": {
@ -5530,7 +5621,7 @@
"description": "The unique identifier of the API call.\n\nThis is the same as the API call ID."
},
"output": {
"description": "The converted file, if completed, base64 encoded.",
"description": "The converted file (if single file conversion), if completed, base64 encoded. This field is deprecated, and will be removed in a future release. Use `outputs` instead.",
"format": "byte",
"nullable": true,
"title": "String",
@ -5544,6 +5635,24 @@
],
"description": "The output format of the file conversion."
},
"output_format_options": {
"allOf": [
{
"$ref": "#/components/schemas/OutputFormat"
}
],
"description": "The output format options of the file conversion.",
"nullable": true
},
"outputs": {
"additionalProperties": {
"format": "byte",
"title": "String",
"type": "string"
},
"description": "The converted files (if multiple file conversion), if completed, base64 encoded. The key of the map is the path of the output file.",
"type": "object"
},
"src_format": {
"allOf": [
{
@ -5552,6 +5661,15 @@
],
"description": "The source format of the file conversion."
},
"src_format_options": {
"allOf": [
{
"$ref": "#/components/schemas/InputFormat"
}
],
"description": "The source format options of the file conversion.",
"nullable": true
},
"started_at": {
"description": "The time and date the API call was started.",
"format": "date-time",
@ -5704,7 +5822,14 @@
"type": "string"
},
{
"description": "The OBJ file format. A zip file containing both the obj file itself and its associated mtl file for full processing. <https://en.wikipedia.org/wiki/Wavefront_.obj_file>> The OBJ file format. <https://en.wikipedia.org/wiki/Wavefront_.obj_file> It may or may not have an an attached material (mtl // mtllib) within the file, but we interact with it as if it does not.",
"description": "glTF 2.0. We refer to this as glTF since that is how our customers refer to it, although by default it will be in binary format and thus technically (glb).",
"enum": [
"gltf"
],
"type": "string"
},
{
"description": "The OBJ file format. <https://en.wikipedia.org/wiki/Wavefront_.obj_file> It may or may not have an an attached material (mtl // mtllib) within the file, but we interact with it as if it does not.",
"enum": [
"obj"
],
@ -5758,9 +5883,9 @@
"type": "string"
},
{
"description": "The OBJ file format. A zip file containing both the obj file itself and its associated mtl file for full processing. <https://en.wikipedia.org/wiki/Wavefront_.obj_file>>",
"description": "glTF 2.0.",
"enum": [
"obj_zip"
"gltf"
],
"type": "string"
},
@ -6117,6 +6242,98 @@
},
"type": "object"
},
"InputFormat": {
"description": "Input format specifier.",
"oneOf": [
{
"description": "Binary glTF 2.0. We refer to this as glTF since that is how our customers refer to it, but this can also import binary glTF (glb).",
"properties": {
"type": {
"enum": [
"Gltf"
],
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
},
{
"description": "ISO 10303-21 (STEP) format.",
"properties": {
"coords": {
"allOf": [
{
"$ref": "#/components/schemas/System"
}
],
"description": "Co-ordinate system of input data.\n\nDefaults to the [KittyCAD co-ordinate system].\n\n[KittyCAD co-ordinate system]: ../coord/constant.KITTYCAD.html"
},
"type": {
"enum": [
"Step"
],
"type": "string"
}
},
"required": [
"coords",
"type"
],
"type": "object"
},
{
"description": "Wavefront OBJ format.",
"properties": {
"coords": {
"allOf": [
{
"$ref": "#/components/schemas/System"
}
],
"description": "Co-ordinate system of input data.\n\nDefaults to the [KittyCAD co-ordinate system].\n\n[KittyCAD co-ordinate system]: ../coord/constant.KITTYCAD.html"
},
"type": {
"enum": [
"Obj"
],
"type": "string"
}
},
"required": [
"coords",
"type"
],
"type": "object"
},
{
"description": "*ST**ereo**L**ithography format.",
"properties": {
"coords": {
"allOf": [
{
"$ref": "#/components/schemas/System"
}
],
"description": "Co-ordinate system of input data.\n\nDefaults to the [KittyCAD co-ordinate system].\n\n[KittyCAD co-ordinate system]: ../coord/constant.KITTYCAD.html"
},
"type": {
"enum": [
"Stl"
],
"type": "string"
}
},
"required": [
"coords",
"type"
],
"type": "object"
}
]
},
"Invoice": {
"description": "An invoice.",
"properties": {
@ -7232,6 +7449,116 @@
},
"type": "object"
},
"OutputFormat": {
"description": "Output format specifier.",
"oneOf": [
{
"description": "glTF 2.0. We refer to this as glTF since that is how our customers refer to it, although by default it will be in binary format and thus technically (glb). If you prefer ascii output, you can set that option for the export.",
"properties": {
"storage": {
"allOf": [
{
"$ref": "#/components/schemas/Storage"
}
],
"description": "Specifies which kind of glTF 2.0 will be exported."
},
"type": {
"enum": [
"Gltf"
],
"type": "string"
}
},
"required": [
"storage",
"type"
],
"type": "object"
},
{
"description": "Wavefront OBJ format.",
"properties": {
"coords": {
"allOf": [
{
"$ref": "#/components/schemas/System"
}
],
"description": "Co-ordinate system of output data.\n\nDefaults to the [KittyCAD co-ordinate system].\n\n[KittyCAD co-ordinate system]: ../coord/constant.KITTYCAD.html"
},
"type": {
"enum": [
"Obj"
],
"type": "string"
}
},
"required": [
"coords",
"type"
],
"type": "object"
},
{
"description": "ISO 10303-21 (STEP) format.",
"properties": {
"coords": {
"allOf": [
{
"$ref": "#/components/schemas/System"
}
],
"description": "Co-ordinate system of output data.\n\nDefaults to the [KittyCAD co-ordinate system].\n\n[KittyCAD co-ordinate system]: ../coord/constant.KITTYCAD.html"
},
"type": {
"enum": [
"Step"
],
"type": "string"
}
},
"required": [
"coords",
"type"
],
"type": "object"
},
{
"description": "*ST**ereo**L**ithography format.",
"properties": {
"coords": {
"allOf": [
{
"$ref": "#/components/schemas/System"
}
],
"description": "Co-ordinate system of output data.\n\nDefaults to the [KittyCAD co-ordinate system].\n\n[KittyCAD co-ordinate system]: ../coord/constant.KITTYCAD.html"
},
"storage": {
"allOf": [
{
"$ref": "#/components/schemas/Storage"
}
],
"description": "Export storage."
},
"type": {
"enum": [
"Stl"
],
"type": "string"
}
},
"required": [
"coords",
"storage",
"type"
],
"type": "object"
}
]
},
"PathSegment": {
"description": "A segment of a path. Paths are composed of many segments.",
"oneOf": [
@ -7966,6 +8293,58 @@
],
"type": "object"
},
"Storage": {
"description": "Describes the storage format of a glTF 2.0 scene.",
"oneOf": [
{
"description": "Binary glTF 2.0.\n\nThis is a single binary with .glb extension.\n\nThis is the default setting.",
"enum": [
"binary"
],
"type": "string"
},
{
"description": "Standard glTF 2.0.\n\nThis is a JSON file with .gltf extension paired with a separate binary blob file with .bin extension.",
"enum": [
"standard"
],
"type": "string"
},
{
"description": "Embedded glTF 2.0.\n\nSingle JSON file with .gltf extension binary data encoded as base64 data URIs.",
"enum": [
"embedded"
],
"type": "string"
}
]
},
"System": {
"description": "Co-ordinate system definition.\n\nThe `up` axis must be orthogonal to the `forward` axis.\n\nSee [cglearn.eu] for background reading.\n\n[cglearn.eu](https://cglearn.eu/pub/computer-graphics/introduction-to-geometry#material-coordinate-systems-1)",
"properties": {
"forward": {
"allOf": [
{
"$ref": "#/components/schemas/AxisDirectionPair"
}
],
"description": "Axis the front face of a model looks along."
},
"up": {
"allOf": [
{
"$ref": "#/components/schemas/AxisDirectionPair"
}
],
"description": "Axis pointing up and away from a model."
}
},
"required": [
"forward",
"up"
],
"type": "object"
},
"SystemInfoCgroupDriverEnum": {
"enum": [
"",
@ -11897,7 +12276,7 @@
]
},
"post": {
"description": "Convert a CAD file from one format to another. If the file being converted is larger than 25MB, it will be performed asynchronously.\nIf the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.",
"description": "If you wish to specify the conversion options, use the `/file/conversion` endpoint instead.\nConvert a CAD file from one format to another. If the file being converted is larger than 25MB, it will be performed asynchronously.\nIf the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.",
"operationId": "create_file_conversion",
"parameters": [
{
@ -11982,7 +12361,7 @@
"$ref": "#/components/responses/Error"
}
},
"summary": "Convert CAD file.",
"summary": "Convert CAD file with defaults.",
"tags": [
"file"
]