Update api spec (#98)
* YOYO NEW API SPEC! * fixups 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:
@ -142,12 +142,11 @@ from kittycad.models.email_authentication_form import EmailAuthenticationForm
|
||||
from kittycad.models.file_export_format import FileExportFormat
|
||||
from kittycad.models.file_import_format import FileImportFormat
|
||||
from kittycad.models.image_type import ImageType
|
||||
from kittycad.models.line3d import Line3d
|
||||
from kittycad.models.modeling_cmd import ModelingCmd
|
||||
from kittycad.models.modeling_cmd_id import ModelingCmdId
|
||||
from kittycad.models.modeling_cmd_req import ModelingCmdReq
|
||||
from kittycad.models.modeling_cmd_req_batch import ModelingCmdReqBatch
|
||||
from kittycad.models.physics_constant_name import PhysicsConstantName
|
||||
from kittycad.models.point3d import Point3d
|
||||
from kittycad.models.unit_angle import UnitAngle
|
||||
from kittycad.models.unit_area import UnitArea
|
||||
from kittycad.models.unit_current import UnitCurrent
|
||||
@ -1403,18 +1402,7 @@ def test_cmd():
|
||||
cmd.sync(
|
||||
client=client,
|
||||
body=ModelingCmdReq(
|
||||
cmd=Line3d(
|
||||
from_=Point3d(
|
||||
x=3.14,
|
||||
y=3.14,
|
||||
z=3.14,
|
||||
),
|
||||
to=Point3d(
|
||||
x=3.14,
|
||||
y=3.14,
|
||||
z=3.14,
|
||||
),
|
||||
),
|
||||
cmd=ModelingCmd.START_PATH,
|
||||
cmd_id=ModelingCmdId("<uuid>"),
|
||||
file_id="<string>",
|
||||
),
|
||||
@ -1424,18 +1412,7 @@ def test_cmd():
|
||||
cmd.sync_detailed(
|
||||
client=client,
|
||||
body=ModelingCmdReq(
|
||||
cmd=Line3d(
|
||||
from_=Point3d(
|
||||
x=3.14,
|
||||
y=3.14,
|
||||
z=3.14,
|
||||
),
|
||||
to=Point3d(
|
||||
x=3.14,
|
||||
y=3.14,
|
||||
z=3.14,
|
||||
),
|
||||
),
|
||||
cmd=ModelingCmd.START_PATH,
|
||||
cmd_id=ModelingCmdId("<uuid>"),
|
||||
file_id="<string>",
|
||||
),
|
||||
@ -1452,18 +1429,7 @@ async def test_cmd_async():
|
||||
await cmd.asyncio(
|
||||
client=client,
|
||||
body=ModelingCmdReq(
|
||||
cmd=Line3d(
|
||||
from_=Point3d(
|
||||
x=3.14,
|
||||
y=3.14,
|
||||
z=3.14,
|
||||
),
|
||||
to=Point3d(
|
||||
x=3.14,
|
||||
y=3.14,
|
||||
z=3.14,
|
||||
),
|
||||
),
|
||||
cmd=ModelingCmd.START_PATH,
|
||||
cmd_id=ModelingCmdId("<uuid>"),
|
||||
file_id="<string>",
|
||||
),
|
||||
@ -1473,18 +1439,7 @@ async def test_cmd_async():
|
||||
await cmd.asyncio_detailed(
|
||||
client=client,
|
||||
body=ModelingCmdReq(
|
||||
cmd=Line3d(
|
||||
from_=Point3d(
|
||||
x=3.14,
|
||||
y=3.14,
|
||||
z=3.14,
|
||||
),
|
||||
to=Point3d(
|
||||
x=3.14,
|
||||
y=3.14,
|
||||
z=3.14,
|
||||
),
|
||||
),
|
||||
cmd=ModelingCmd.START_PATH,
|
||||
cmd_id=ModelingCmdId("<uuid>"),
|
||||
file_id="<string>",
|
||||
),
|
||||
@ -1501,18 +1456,7 @@ def test_cmd_batch():
|
||||
body=ModelingCmdReqBatch(
|
||||
cmds={
|
||||
"<string>": ModelingCmdReq(
|
||||
cmd=Line3d(
|
||||
from_=Point3d(
|
||||
x=3.14,
|
||||
y=3.14,
|
||||
z=3.14,
|
||||
),
|
||||
to=Point3d(
|
||||
x=3.14,
|
||||
y=3.14,
|
||||
z=3.14,
|
||||
),
|
||||
),
|
||||
cmd=ModelingCmd.START_PATH,
|
||||
cmd_id=ModelingCmdId("<uuid>"),
|
||||
file_id="<string>",
|
||||
)
|
||||
@ -1536,18 +1480,7 @@ def test_cmd_batch():
|
||||
body=ModelingCmdReqBatch(
|
||||
cmds={
|
||||
"<string>": ModelingCmdReq(
|
||||
cmd=Line3d(
|
||||
from_=Point3d(
|
||||
x=3.14,
|
||||
y=3.14,
|
||||
z=3.14,
|
||||
),
|
||||
to=Point3d(
|
||||
x=3.14,
|
||||
y=3.14,
|
||||
z=3.14,
|
||||
),
|
||||
),
|
||||
cmd=ModelingCmd.START_PATH,
|
||||
cmd_id=ModelingCmdId("<uuid>"),
|
||||
file_id="<string>",
|
||||
)
|
||||
@ -1569,18 +1502,7 @@ async def test_cmd_batch_async():
|
||||
body=ModelingCmdReqBatch(
|
||||
cmds={
|
||||
"<string>": ModelingCmdReq(
|
||||
cmd=Line3d(
|
||||
from_=Point3d(
|
||||
x=3.14,
|
||||
y=3.14,
|
||||
z=3.14,
|
||||
),
|
||||
to=Point3d(
|
||||
x=3.14,
|
||||
y=3.14,
|
||||
z=3.14,
|
||||
),
|
||||
),
|
||||
cmd=ModelingCmd.START_PATH,
|
||||
cmd_id=ModelingCmdId("<uuid>"),
|
||||
file_id="<string>",
|
||||
)
|
||||
@ -1597,18 +1519,7 @@ async def test_cmd_batch_async():
|
||||
body=ModelingCmdReqBatch(
|
||||
cmds={
|
||||
"<string>": ModelingCmdReq(
|
||||
cmd=Line3d(
|
||||
from_=Point3d(
|
||||
x=3.14,
|
||||
y=3.14,
|
||||
z=3.14,
|
||||
),
|
||||
to=Point3d(
|
||||
x=3.14,
|
||||
y=3.14,
|
||||
z=3.14,
|
||||
),
|
||||
),
|
||||
cmd=ModelingCmd.START_PATH,
|
||||
cmd_id=ModelingCmdId("<uuid>"),
|
||||
file_id="<string>",
|
||||
)
|
||||
|
||||
@ -21,6 +21,7 @@ from .async_api_call_results_page import AsyncApiCallResultsPage
|
||||
from .async_api_call_type import AsyncApiCallType
|
||||
from .billing_info import BillingInfo
|
||||
from .cache_metadata import CacheMetadata
|
||||
from .camera_drag_interaction_type import CameraDragInteractionType
|
||||
from .card_details import CardDetails
|
||||
from .cluster import Cluster
|
||||
from .code_language import CodeLanguage
|
||||
@ -28,6 +29,7 @@ from .code_output import CodeOutput
|
||||
from .commit import Commit
|
||||
from .connection import Connection
|
||||
from .country_code import CountryCode
|
||||
from .coupon import Coupon
|
||||
from .created_at_sort_mode import CreatedAtSortMode
|
||||
from .currency import Currency
|
||||
from .customer import Customer
|
||||
@ -35,6 +37,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 .discount import Discount
|
||||
from .docker_system_info import DockerSystemInfo
|
||||
from .email_authentication_form import EmailAuthenticationForm
|
||||
from .engine_metadata import EngineMetadata
|
||||
@ -64,7 +67,6 @@ from .jetstream_api_stats import JetstreamApiStats
|
||||
from .jetstream_config import JetstreamConfig
|
||||
from .jetstream_stats import JetstreamStats
|
||||
from .leaf_node import LeafNode
|
||||
from .line3d import Line3d
|
||||
from .mesh import Mesh
|
||||
from .meta_cluster_info import MetaClusterInfo
|
||||
from .metadata import Metadata
|
||||
@ -81,6 +83,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 .path_segment import PathSegment
|
||||
from .payment_intent import PaymentIntent
|
||||
from .payment_method import PaymentMethod
|
||||
from .payment_method_card_checks import PaymentMethodCardChecks
|
||||
|
||||
@ -46,7 +46,7 @@ class AiPluginApi:
|
||||
if isinstance(_type, Unset):
|
||||
type = UNSET
|
||||
else:
|
||||
type = AiPluginApiType(_type)
|
||||
type = _type # type: ignore[arg-type]
|
||||
|
||||
url = d.pop("url", UNSET)
|
||||
|
||||
|
||||
@ -42,14 +42,14 @@ class AiPluginAuth:
|
||||
if isinstance(_authorization_type, Unset):
|
||||
authorization_type = UNSET
|
||||
else:
|
||||
authorization_type = AiPluginHttpAuthType(_authorization_type)
|
||||
authorization_type = _authorization_type # type: ignore[arg-type]
|
||||
|
||||
_type = d.pop("type", UNSET)
|
||||
type: Union[Unset, AiPluginAuthType]
|
||||
if isinstance(_type, Unset):
|
||||
type = UNSET
|
||||
else:
|
||||
type = AiPluginAuthType(_type)
|
||||
type = _type # type: ignore[arg-type]
|
||||
|
||||
ai_plugin_auth = cls(
|
||||
authorization_type=authorization_type,
|
||||
|
||||
@ -164,7 +164,7 @@ class ApiCallWithPrice:
|
||||
if isinstance(_method, Unset):
|
||||
method = UNSET
|
||||
else:
|
||||
method = Method(_method)
|
||||
method = _method # type: ignore[arg-type]
|
||||
|
||||
minutes = d.pop("minutes", UNSET)
|
||||
|
||||
|
||||
@ -125,14 +125,14 @@ class AsyncApiCall:
|
||||
if isinstance(_status, Unset):
|
||||
status = UNSET
|
||||
else:
|
||||
status = ApiCallStatus(_status)
|
||||
status = _status # type: ignore[arg-type]
|
||||
|
||||
_type = d.pop("type", UNSET)
|
||||
type: Union[Unset, AsyncApiCallType]
|
||||
if isinstance(_type, Unset):
|
||||
type = UNSET
|
||||
else:
|
||||
type = AsyncApiCallType(_type)
|
||||
type = _type # type: ignore[arg-type]
|
||||
|
||||
_updated_at = d.pop("updated_at", UNSET)
|
||||
updated_at: Union[Unset, datetime.datetime]
|
||||
|
||||
@ -120,14 +120,14 @@ class FileConversion:
|
||||
if isinstance(_output_format, Unset):
|
||||
output_format = UNSET
|
||||
else:
|
||||
output_format = FileExportFormat(_output_format)
|
||||
output_format = _output_format # type: ignore[arg-type]
|
||||
|
||||
_src_format = d.pop("src_format", UNSET)
|
||||
src_format: Union[Unset, FileImportFormat]
|
||||
if isinstance(_src_format, Unset):
|
||||
src_format = UNSET
|
||||
else:
|
||||
src_format = FileImportFormat(_src_format)
|
||||
src_format = _src_format # type: ignore[arg-type]
|
||||
|
||||
_started_at = d.pop("started_at", UNSET)
|
||||
started_at: Union[Unset, datetime.datetime]
|
||||
@ -141,7 +141,7 @@ class FileConversion:
|
||||
if isinstance(_status, Unset):
|
||||
status = UNSET
|
||||
else:
|
||||
status = ApiCallStatus(_status)
|
||||
status = _status # type: ignore[arg-type]
|
||||
|
||||
type = d.pop("type", UNSET)
|
||||
|
||||
@ -296,7 +296,7 @@ class FileCenterOfMass:
|
||||
if isinstance(_src_format, Unset):
|
||||
src_format = UNSET
|
||||
else:
|
||||
src_format = FileImportFormat(_src_format)
|
||||
src_format = _src_format # type: ignore[arg-type]
|
||||
|
||||
_started_at = d.pop("started_at", UNSET)
|
||||
started_at: Union[Unset, datetime.datetime]
|
||||
@ -310,7 +310,7 @@ class FileCenterOfMass:
|
||||
if isinstance(_status, Unset):
|
||||
status = UNSET
|
||||
else:
|
||||
status = ApiCallStatus(_status)
|
||||
status = _status # type: ignore[arg-type]
|
||||
|
||||
type = d.pop("type", UNSET)
|
||||
|
||||
@ -468,7 +468,7 @@ class FileMass:
|
||||
if isinstance(_src_format, Unset):
|
||||
src_format = UNSET
|
||||
else:
|
||||
src_format = FileImportFormat(_src_format)
|
||||
src_format = _src_format # type: ignore[arg-type]
|
||||
|
||||
_started_at = d.pop("started_at", UNSET)
|
||||
started_at: Union[Unset, datetime.datetime]
|
||||
@ -482,7 +482,7 @@ class FileMass:
|
||||
if isinstance(_status, Unset):
|
||||
status = UNSET
|
||||
else:
|
||||
status = ApiCallStatus(_status)
|
||||
status = _status # type: ignore[arg-type]
|
||||
|
||||
type = d.pop("type", UNSET)
|
||||
|
||||
@ -633,7 +633,7 @@ class FileVolume:
|
||||
if isinstance(_src_format, Unset):
|
||||
src_format = UNSET
|
||||
else:
|
||||
src_format = FileImportFormat(_src_format)
|
||||
src_format = _src_format # type: ignore[arg-type]
|
||||
|
||||
_started_at = d.pop("started_at", UNSET)
|
||||
started_at: Union[Unset, datetime.datetime]
|
||||
@ -647,7 +647,7 @@ class FileVolume:
|
||||
if isinstance(_status, Unset):
|
||||
status = UNSET
|
||||
else:
|
||||
status = ApiCallStatus(_status)
|
||||
status = _status # type: ignore[arg-type]
|
||||
|
||||
type = d.pop("type", UNSET)
|
||||
|
||||
@ -807,7 +807,7 @@ class FileDensity:
|
||||
if isinstance(_src_format, Unset):
|
||||
src_format = UNSET
|
||||
else:
|
||||
src_format = FileImportFormat(_src_format)
|
||||
src_format = _src_format # type: ignore[arg-type]
|
||||
|
||||
_started_at = d.pop("started_at", UNSET)
|
||||
started_at: Union[Unset, datetime.datetime]
|
||||
@ -821,7 +821,7 @@ class FileDensity:
|
||||
if isinstance(_status, Unset):
|
||||
status = UNSET
|
||||
else:
|
||||
status = ApiCallStatus(_status)
|
||||
status = _status # type: ignore[arg-type]
|
||||
|
||||
type = d.pop("type", UNSET)
|
||||
|
||||
@ -972,7 +972,7 @@ class FileSurfaceArea:
|
||||
if isinstance(_src_format, Unset):
|
||||
src_format = UNSET
|
||||
else:
|
||||
src_format = FileImportFormat(_src_format)
|
||||
src_format = _src_format # type: ignore[arg-type]
|
||||
|
||||
_started_at = d.pop("started_at", UNSET)
|
||||
started_at: Union[Unset, datetime.datetime]
|
||||
@ -986,7 +986,7 @@ class FileSurfaceArea:
|
||||
if isinstance(_status, Unset):
|
||||
status = UNSET
|
||||
else:
|
||||
status = ApiCallStatus(_status)
|
||||
status = _status # type: ignore[arg-type]
|
||||
|
||||
surface_area = d.pop("surface_area", UNSET)
|
||||
|
||||
|
||||
15
kittycad/models/camera_drag_interaction_type.py
Normal file
15
kittycad/models/camera_drag_interaction_type.py
Normal file
@ -0,0 +1,15 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class CameraDragInteractionType(str, Enum):
|
||||
"""The type of camera drag interaction.""" # noqa: E501
|
||||
|
||||
"""# Camera pan """ # noqa: E501
|
||||
PAN = "pan"
|
||||
"""# Camera rotate (revolve/orbit) """ # noqa: E501
|
||||
ROTATE = "rotate"
|
||||
"""# Camera zoom (increase or decrease distance to reference point center) """ # noqa: E501
|
||||
ZOOM = "zoom"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
@ -4,8 +4,11 @@ from enum import Enum
|
||||
class CodeLanguage(str, Enum):
|
||||
"""The language code is written in.""" # noqa: E501
|
||||
|
||||
"""# The `go` programming language. """ # noqa: E501
|
||||
GO = "go"
|
||||
"""# The `python` programming language. """ # noqa: E501
|
||||
PYTHON = "python"
|
||||
"""# The `node` programming language. """ # noqa: E501
|
||||
NODE = "node"
|
||||
|
||||
def __str__(self) -> str:
|
||||
|
||||
76
kittycad/models/coupon.py
Normal file
76
kittycad/models/coupon.py
Normal file
@ -0,0 +1,76 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
M = TypeVar("M", bound="Coupon")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class Coupon:
|
||||
"""The resource representing a Coupon.""" # noqa: E501
|
||||
|
||||
amount_off: Union[Unset, float] = UNSET
|
||||
deleted: Union[Unset, bool] = False
|
||||
id: Union[Unset, str] = UNSET
|
||||
percent_off: Union[Unset, float] = UNSET
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
amount_off = self.amount_off
|
||||
deleted = self.deleted
|
||||
id = self.id
|
||||
percent_off = self.percent_off
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if amount_off is not UNSET:
|
||||
field_dict["amount_off"] = amount_off
|
||||
if deleted is not UNSET:
|
||||
field_dict["deleted"] = deleted
|
||||
if id is not UNSET:
|
||||
field_dict["id"] = id
|
||||
if percent_off is not UNSET:
|
||||
field_dict["percent_off"] = percent_off
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[M], src_dict: Dict[str, Any]) -> M:
|
||||
d = src_dict.copy()
|
||||
amount_off = d.pop("amount_off", UNSET)
|
||||
|
||||
deleted = d.pop("deleted", UNSET)
|
||||
|
||||
id = d.pop("id", UNSET)
|
||||
|
||||
percent_off = d.pop("percent_off", UNSET)
|
||||
|
||||
coupon = cls(
|
||||
amount_off=amount_off,
|
||||
deleted=deleted,
|
||||
id=id,
|
||||
percent_off=percent_off,
|
||||
)
|
||||
|
||||
coupon.additional_properties = d
|
||||
return coupon
|
||||
|
||||
@property
|
||||
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
|
||||
@ -8,7 +8,7 @@ from ..models.currency import Currency
|
||||
from ..models.new_address import NewAddress
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
M = TypeVar("M", bound="Customer")
|
||||
N = TypeVar("N", bound="Customer")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -71,7 +71,7 @@ class Customer:
|
||||
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()
|
||||
_address = d.pop("address", UNSET)
|
||||
address: Union[Unset, NewAddress]
|
||||
@ -94,7 +94,7 @@ class Customer:
|
||||
if isinstance(_currency, Unset):
|
||||
currency = UNSET
|
||||
else:
|
||||
currency = Currency(_currency)
|
||||
currency = _currency # type: ignore[arg-type]
|
||||
|
||||
delinquent = d.pop("delinquent", UNSET)
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ from dateutil.parser import isoparse
|
||||
from ..models.uuid import Uuid
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
N = TypeVar("N", bound="CustomerBalance")
|
||||
J = TypeVar("J", bound="CustomerBalance")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -64,7 +64,7 @@ class CustomerBalance:
|
||||
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()
|
||||
_created_at = d.pop("created_at", UNSET)
|
||||
created_at: Union[Unset, datetime.datetime]
|
||||
|
||||
@ -5,7 +5,7 @@ import attr
|
||||
from ..models.o_auth2_grant_type import OAuth2GrantType
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
J = TypeVar("J", bound="DeviceAccessTokenRequestForm")
|
||||
V = TypeVar("V", bound="DeviceAccessTokenRequestForm")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -37,7 +37,7 @@ class DeviceAccessTokenRequestForm:
|
||||
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()
|
||||
client_id = d.pop("client_id", UNSET)
|
||||
|
||||
@ -48,7 +48,7 @@ class DeviceAccessTokenRequestForm:
|
||||
if isinstance(_grant_type, Unset):
|
||||
grant_type = UNSET
|
||||
else:
|
||||
grant_type = OAuth2GrantType(_grant_type)
|
||||
grant_type = _grant_type # type: ignore[arg-type]
|
||||
|
||||
device_access_token_request_form = cls(
|
||||
client_id=client_id,
|
||||
|
||||
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
V = TypeVar("V", bound="DeviceAuthRequestForm")
|
||||
F = TypeVar("F", bound="DeviceAuthRequestForm")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -27,7 +27,7 @@ class DeviceAuthRequestForm:
|
||||
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)
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
F = TypeVar("F", bound="DeviceAuthVerifyParams")
|
||||
V = TypeVar("V", bound="DeviceAuthVerifyParams")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -27,7 +27,7 @@ class DeviceAuthVerifyParams:
|
||||
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()
|
||||
user_code = d.pop("user_code", UNSET)
|
||||
|
||||
|
||||
62
kittycad/models/discount.py
Normal file
62
kittycad/models/discount.py
Normal file
@ -0,0 +1,62 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..models.coupon import Coupon
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
J = TypeVar("J", bound="Discount")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class Discount:
|
||||
"""The resource representing a Discount.""" # noqa: E501
|
||||
|
||||
coupon: Union[Unset, Coupon] = UNSET
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
if not isinstance(self.coupon, Unset):
|
||||
coupon = self.coupon
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if coupon is not UNSET:
|
||||
field_dict["coupon"] = coupon
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[J], src_dict: Dict[str, Any]) -> J:
|
||||
d = src_dict.copy()
|
||||
_coupon = d.pop("coupon", UNSET)
|
||||
coupon: Union[Unset, Coupon]
|
||||
if isinstance(_coupon, Unset):
|
||||
coupon = UNSET
|
||||
else:
|
||||
coupon = Coupon(_coupon)
|
||||
|
||||
discount = cls(
|
||||
coupon=coupon,
|
||||
)
|
||||
|
||||
discount.additional_properties = d
|
||||
return discount
|
||||
|
||||
@property
|
||||
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
|
||||
|
||||
J = TypeVar("J", bound="EmailAuthenticationForm")
|
||||
L = TypeVar("L", bound="EmailAuthenticationForm")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -31,7 +31,7 @@ class EmailAuthenticationForm:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[J], src_dict: Dict[str, Any]) -> J:
|
||||
def from_dict(cls: Type[L], src_dict: Dict[str, Any]) -> L:
|
||||
d = src_dict.copy()
|
||||
callback_url = d.pop("callback_url", UNSET)
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ from ..models.environment import Environment
|
||||
from ..models.file_system_metadata import FileSystemMetadata
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
V = TypeVar("V", bound="EngineMetadata")
|
||||
E = TypeVar("E", bound="EngineMetadata")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -57,7 +57,7 @@ class EngineMetadata:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[V], src_dict: Dict[str, Any]) -> V:
|
||||
def from_dict(cls: Type[E], src_dict: Dict[str, Any]) -> E:
|
||||
d = src_dict.copy()
|
||||
async_jobs_running = d.pop("async_jobs_running", UNSET)
|
||||
|
||||
@ -73,7 +73,7 @@ class EngineMetadata:
|
||||
if isinstance(_environment, Unset):
|
||||
environment = UNSET
|
||||
else:
|
||||
environment = Environment(_environment)
|
||||
environment = _environment # type: ignore[arg-type]
|
||||
|
||||
_fs = d.pop("fs", UNSET)
|
||||
fs: Union[Unset, FileSystemMetadata]
|
||||
|
||||
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
L = TypeVar("L", bound="Error")
|
||||
Y = TypeVar("Y", bound="Error")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -35,7 +35,7 @@ class Error:
|
||||
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()
|
||||
error_code = d.pop("error_code", UNSET)
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ from ..models.docker_system_info import DockerSystemInfo
|
||||
from ..models.environment import Environment
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
E = TypeVar("E", bound="ExecutorMetadata")
|
||||
H = TypeVar("H", bound="ExecutorMetadata")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -41,7 +41,7 @@ class ExecutorMetadata:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[E], src_dict: Dict[str, Any]) -> E:
|
||||
def from_dict(cls: Type[H], src_dict: Dict[str, Any]) -> H:
|
||||
d = src_dict.copy()
|
||||
_docker_info = d.pop("docker_info", UNSET)
|
||||
docker_info: Union[Unset, DockerSystemInfo]
|
||||
@ -55,7 +55,7 @@ class ExecutorMetadata:
|
||||
if isinstance(_environment, Unset):
|
||||
environment = UNSET
|
||||
else:
|
||||
environment = Environment(_environment)
|
||||
environment = _environment # type: ignore[arg-type]
|
||||
|
||||
git_hash = d.pop("git_hash", UNSET)
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ from dateutil.parser import isoparse
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
Y = TypeVar("Y", bound="ExtendedUser")
|
||||
T = TypeVar("T", bound="ExtendedUser")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -97,7 +97,7 @@ class ExtendedUser:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[Y], src_dict: Dict[str, Any]) -> Y:
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
company = d.pop("company", UNSET)
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
H = TypeVar("H", bound="ExtendedUserResultsPage")
|
||||
M = TypeVar("M", bound="ExtendedUserResultsPage")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -37,7 +37,7 @@ class ExtendedUserResultsPage:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[H], src_dict: Dict[str, Any]) -> H:
|
||||
def from_dict(cls: Type[M], src_dict: Dict[str, Any]) -> M:
|
||||
d = src_dict.copy()
|
||||
from ..models.extended_user import ExtendedUser
|
||||
|
||||
|
||||
@ -5,19 +5,21 @@ import attr
|
||||
from ..models.modeling_cmd_id import ModelingCmdId
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="Extrude")
|
||||
B = TypeVar("B", bound="Extrude")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class Extrude:
|
||||
"""Command for extruding a solid.""" # noqa: E501
|
||||
|
||||
cap: Union[Unset, bool] = False
|
||||
distance: Union[Unset, float] = UNSET
|
||||
target: Union[Unset, ModelingCmdId] = UNSET
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
cap = self.cap
|
||||
distance = self.distance
|
||||
if not isinstance(self.target, Unset):
|
||||
target = self.target
|
||||
@ -25,6 +27,8 @@ class Extrude:
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if cap is not UNSET:
|
||||
field_dict["cap"] = cap
|
||||
if distance is not UNSET:
|
||||
field_dict["distance"] = distance
|
||||
if target is not UNSET:
|
||||
@ -33,8 +37,10 @@ class Extrude:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
def from_dict(cls: Type[B], src_dict: Dict[str, Any]) -> B:
|
||||
d = src_dict.copy()
|
||||
cap = d.pop("cap", UNSET)
|
||||
|
||||
distance = d.pop("distance", UNSET)
|
||||
|
||||
_target = d.pop("target", UNSET)
|
||||
@ -45,6 +51,7 @@ class Extrude:
|
||||
target = ModelingCmdId(_target)
|
||||
|
||||
extrude = cls(
|
||||
cap=cap,
|
||||
distance=distance,
|
||||
target=target,
|
||||
)
|
||||
|
||||
@ -9,7 +9,7 @@ from ..models.file_import_format import FileImportFormat
|
||||
from ..models.uuid import Uuid
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
M = TypeVar("M", bound="FileCenterOfMass")
|
||||
S = TypeVar("S", bound="FileCenterOfMass")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -80,7 +80,7 @@ class FileCenterOfMass:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[M], src_dict: Dict[str, Any]) -> M:
|
||||
def from_dict(cls: Type[S], src_dict: Dict[str, Any]) -> S:
|
||||
d = src_dict.copy()
|
||||
center_of_mass = cast(List[float], d.pop("center_of_mass", UNSET))
|
||||
|
||||
@ -112,7 +112,7 @@ class FileCenterOfMass:
|
||||
if isinstance(_src_format, Unset):
|
||||
src_format = UNSET
|
||||
else:
|
||||
src_format = FileImportFormat(_src_format)
|
||||
src_format = _src_format # type: ignore[arg-type]
|
||||
|
||||
_started_at = d.pop("started_at", UNSET)
|
||||
started_at: Union[Unset, datetime.datetime]
|
||||
@ -126,7 +126,7 @@ class FileCenterOfMass:
|
||||
if isinstance(_status, Unset):
|
||||
status = UNSET
|
||||
else:
|
||||
status = ApiCallStatus(_status)
|
||||
status = _status # type: ignore[arg-type]
|
||||
|
||||
_updated_at = d.pop("updated_at", UNSET)
|
||||
updated_at: Union[Unset, datetime.datetime]
|
||||
|
||||
@ -10,7 +10,7 @@ from ..models.file_import_format import FileImportFormat
|
||||
from ..models.uuid import Uuid
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
B = TypeVar("B", bound="FileConversion")
|
||||
A = TypeVar("A", bound="FileConversion")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -84,7 +84,7 @@ class FileConversion:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[B], src_dict: Dict[str, Any]) -> B:
|
||||
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]
|
||||
@ -116,14 +116,14 @@ class FileConversion:
|
||||
if isinstance(_output_format, Unset):
|
||||
output_format = UNSET
|
||||
else:
|
||||
output_format = FileExportFormat(_output_format)
|
||||
output_format = _output_format # type: ignore[arg-type]
|
||||
|
||||
_src_format = d.pop("src_format", UNSET)
|
||||
src_format: Union[Unset, FileImportFormat]
|
||||
if isinstance(_src_format, Unset):
|
||||
src_format = UNSET
|
||||
else:
|
||||
src_format = FileImportFormat(_src_format)
|
||||
src_format = _src_format # type: ignore[arg-type]
|
||||
|
||||
_started_at = d.pop("started_at", UNSET)
|
||||
started_at: Union[Unset, datetime.datetime]
|
||||
@ -137,7 +137,7 @@ class FileConversion:
|
||||
if isinstance(_status, Unset):
|
||||
status = UNSET
|
||||
else:
|
||||
status = ApiCallStatus(_status)
|
||||
status = _status # type: ignore[arg-type]
|
||||
|
||||
_updated_at = d.pop("updated_at", UNSET)
|
||||
updated_at: Union[Unset, datetime.datetime]
|
||||
|
||||
@ -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="FileDensity")
|
||||
H = TypeVar("H", bound="FileDensity")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -82,7 +82,7 @@ class FileDensity:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[S], src_dict: Dict[str, Any]) -> S:
|
||||
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]
|
||||
@ -116,7 +116,7 @@ class FileDensity:
|
||||
if isinstance(_src_format, Unset):
|
||||
src_format = UNSET
|
||||
else:
|
||||
src_format = FileImportFormat(_src_format)
|
||||
src_format = _src_format # type: ignore[arg-type]
|
||||
|
||||
_started_at = d.pop("started_at", UNSET)
|
||||
started_at: Union[Unset, datetime.datetime]
|
||||
@ -130,7 +130,7 @@ class FileDensity:
|
||||
if isinstance(_status, Unset):
|
||||
status = UNSET
|
||||
else:
|
||||
status = ApiCallStatus(_status)
|
||||
status = _status # type: ignore[arg-type]
|
||||
|
||||
_updated_at = d.pop("updated_at", UNSET)
|
||||
updated_at: Union[Unset, datetime.datetime]
|
||||
|
||||
@ -9,7 +9,7 @@ from ..models.file_import_format import FileImportFormat
|
||||
from ..models.uuid import Uuid
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
A = TypeVar("A", bound="FileMass")
|
||||
E = TypeVar("E", bound="FileMass")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -82,7 +82,7 @@ class FileMass:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[A], src_dict: Dict[str, Any]) -> A:
|
||||
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]
|
||||
@ -116,7 +116,7 @@ class FileMass:
|
||||
if isinstance(_src_format, Unset):
|
||||
src_format = UNSET
|
||||
else:
|
||||
src_format = FileImportFormat(_src_format)
|
||||
src_format = _src_format # type: ignore[arg-type]
|
||||
|
||||
_started_at = d.pop("started_at", UNSET)
|
||||
started_at: Union[Unset, datetime.datetime]
|
||||
@ -130,7 +130,7 @@ class FileMass:
|
||||
if isinstance(_status, Unset):
|
||||
status = UNSET
|
||||
else:
|
||||
status = ApiCallStatus(_status)
|
||||
status = _status # type: ignore[arg-type]
|
||||
|
||||
_updated_at = d.pop("updated_at", UNSET)
|
||||
updated_at: Union[Unset, datetime.datetime]
|
||||
|
||||
@ -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="FileSurfaceArea")
|
||||
G = TypeVar("G", bound="FileSurfaceArea")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -78,7 +78,7 @@ class FileSurfaceArea:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[H], src_dict: Dict[str, Any]) -> H:
|
||||
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]
|
||||
@ -108,7 +108,7 @@ class FileSurfaceArea:
|
||||
if isinstance(_src_format, Unset):
|
||||
src_format = UNSET
|
||||
else:
|
||||
src_format = FileImportFormat(_src_format)
|
||||
src_format = _src_format # type: ignore[arg-type]
|
||||
|
||||
_started_at = d.pop("started_at", UNSET)
|
||||
started_at: Union[Unset, datetime.datetime]
|
||||
@ -122,7 +122,7 @@ class FileSurfaceArea:
|
||||
if isinstance(_status, Unset):
|
||||
status = UNSET
|
||||
else:
|
||||
status = ApiCallStatus(_status)
|
||||
status = _status # type: ignore[arg-type]
|
||||
|
||||
surface_area = d.pop("surface_area", UNSET)
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
E = TypeVar("E", bound="FileSystemMetadata")
|
||||
J = TypeVar("J", bound="FileSystemMetadata")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -29,7 +29,7 @@ class FileSystemMetadata:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[E], src_dict: Dict[str, Any]) -> E:
|
||||
def from_dict(cls: Type[J], src_dict: Dict[str, Any]) -> J:
|
||||
d = src_dict.copy()
|
||||
ok = d.pop("ok", UNSET)
|
||||
|
||||
|
||||
@ -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="FileVolume")
|
||||
R = TypeVar("R", bound="FileVolume")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -78,7 +78,7 @@ class FileVolume:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[G], src_dict: Dict[str, Any]) -> G:
|
||||
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]
|
||||
@ -108,7 +108,7 @@ class FileVolume:
|
||||
if isinstance(_src_format, Unset):
|
||||
src_format = UNSET
|
||||
else:
|
||||
src_format = FileImportFormat(_src_format)
|
||||
src_format = _src_format # type: ignore[arg-type]
|
||||
|
||||
_started_at = d.pop("started_at", UNSET)
|
||||
started_at: Union[Unset, datetime.datetime]
|
||||
@ -122,7 +122,7 @@ class FileVolume:
|
||||
if isinstance(_status, Unset):
|
||||
status = UNSET
|
||||
else:
|
||||
status = ApiCallStatus(_status)
|
||||
status = _status # type: ignore[arg-type]
|
||||
|
||||
_updated_at = d.pop("updated_at", UNSET)
|
||||
updated_at: Union[Unset, datetime.datetime]
|
||||
|
||||
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
J = TypeVar("J", bound="Gateway")
|
||||
L = TypeVar("L", bound="Gateway")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -43,7 +43,7 @@ class Gateway:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[J], src_dict: Dict[str, Any]) -> J:
|
||||
def from_dict(cls: Type[L], src_dict: Dict[str, Any]) -> L:
|
||||
d = src_dict.copy()
|
||||
auth_timeout = d.pop("auth_timeout", UNSET)
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
R = TypeVar("R", bound="IndexInfo")
|
||||
Y = TypeVar("Y", bound="IndexInfo")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -41,7 +41,7 @@ class IndexInfo:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[R], src_dict: Dict[str, Any]) -> R:
|
||||
def from_dict(cls: Type[Y], src_dict: Dict[str, Any]) -> Y:
|
||||
d = src_dict.copy()
|
||||
mirrors = cast(List[str], d.pop("mirrors", UNSET))
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ from ..models.currency import Currency
|
||||
from ..models.invoice_status import InvoiceStatus
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
L = TypeVar("L", bound="Invoice")
|
||||
H = TypeVar("H", bound="Invoice")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -26,6 +26,9 @@ class Invoice:
|
||||
customer_id: Union[Unset, str] = UNSET
|
||||
default_payment_method: Union[Unset, str] = UNSET
|
||||
description: Union[Unset, str] = UNSET
|
||||
from ..models.discount import Discount
|
||||
|
||||
discounts: Union[Unset, List[Discount]] = UNSET
|
||||
id: Union[Unset, str] = UNSET
|
||||
from ..models.invoice_line_item import InvoiceLineItem
|
||||
|
||||
@ -59,6 +62,11 @@ class Invoice:
|
||||
customer_id = self.customer_id
|
||||
default_payment_method = self.default_payment_method
|
||||
description = self.description
|
||||
from ..models.discount import Discount
|
||||
|
||||
discounts: Union[Unset, List[Discount]] = UNSET
|
||||
if not isinstance(self.discounts, Unset):
|
||||
discounts = self.discounts
|
||||
id = self.id
|
||||
from ..models.invoice_line_item import InvoiceLineItem
|
||||
|
||||
@ -103,6 +111,8 @@ class Invoice:
|
||||
field_dict["default_payment_method"] = default_payment_method
|
||||
if description is not UNSET:
|
||||
field_dict["description"] = description
|
||||
if discounts is not UNSET:
|
||||
field_dict["discounts"] = discounts
|
||||
if id is not UNSET:
|
||||
field_dict["id"] = id
|
||||
if lines is not UNSET:
|
||||
@ -133,7 +143,7 @@ class Invoice:
|
||||
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()
|
||||
amount_due = d.pop("amount_due", UNSET)
|
||||
|
||||
@ -157,7 +167,7 @@ class Invoice:
|
||||
if isinstance(_currency, Unset):
|
||||
currency = UNSET
|
||||
else:
|
||||
currency = Currency(_currency)
|
||||
currency = _currency # type: ignore[arg-type]
|
||||
|
||||
customer_email = d.pop("customer_email", UNSET)
|
||||
|
||||
@ -167,6 +177,10 @@ class Invoice:
|
||||
|
||||
description = d.pop("description", UNSET)
|
||||
|
||||
from ..models.discount import Discount
|
||||
|
||||
discounts = cast(List[Discount], d.pop("discounts", UNSET))
|
||||
|
||||
id = d.pop("id", UNSET)
|
||||
|
||||
from ..models.invoice_line_item import InvoiceLineItem
|
||||
@ -189,7 +203,7 @@ class Invoice:
|
||||
if isinstance(_status, Unset):
|
||||
status = UNSET
|
||||
else:
|
||||
status = InvoiceStatus(_status)
|
||||
status = _status # type: ignore[arg-type]
|
||||
|
||||
subtotal = d.pop("subtotal", UNSET)
|
||||
|
||||
@ -211,6 +225,7 @@ class Invoice:
|
||||
customer_id=customer_id,
|
||||
default_payment_method=default_payment_method,
|
||||
description=description,
|
||||
discounts=discounts,
|
||||
id=id,
|
||||
lines=lines,
|
||||
metadata=metadata,
|
||||
|
||||
@ -5,7 +5,7 @@ import attr
|
||||
from ..models.currency import Currency
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
Y = TypeVar("Y", bound="InvoiceLineItem")
|
||||
K = TypeVar("K", bound="InvoiceLineItem")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -49,7 +49,7 @@ class InvoiceLineItem:
|
||||
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()
|
||||
amount = d.pop("amount", UNSET)
|
||||
|
||||
@ -58,7 +58,7 @@ class InvoiceLineItem:
|
||||
if isinstance(_currency, Unset):
|
||||
currency = UNSET
|
||||
else:
|
||||
currency = Currency(_currency)
|
||||
currency = _currency # type: ignore[arg-type]
|
||||
|
||||
description = d.pop("description", UNSET)
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ from ..models.jetstream_stats import JetstreamStats
|
||||
from ..models.meta_cluster_info import MetaClusterInfo
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
H = TypeVar("H", bound="Jetstream")
|
||||
V = TypeVar("V", bound="Jetstream")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -41,7 +41,7 @@ class Jetstream:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[H], src_dict: Dict[str, Any]) -> H:
|
||||
def from_dict(cls: Type[V], src_dict: Dict[str, Any]) -> V:
|
||||
d = src_dict.copy()
|
||||
_config = d.pop("config", UNSET)
|
||||
config: Union[Unset, JetstreamConfig]
|
||||
|
||||
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
K = TypeVar("K", bound="JetstreamApiStats")
|
||||
R = TypeVar("R", bound="JetstreamApiStats")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -35,7 +35,7 @@ class JetstreamApiStats:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[K], src_dict: Dict[str, Any]) -> K:
|
||||
def from_dict(cls: Type[R], src_dict: Dict[str, Any]) -> R:
|
||||
d = src_dict.copy()
|
||||
errors = d.pop("errors", UNSET)
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
V = TypeVar("V", bound="JetstreamConfig")
|
||||
N = TypeVar("N", bound="JetstreamConfig")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -39,7 +39,7 @@ class JetstreamConfig:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[V], src_dict: Dict[str, Any]) -> V:
|
||||
def from_dict(cls: Type[N], src_dict: Dict[str, Any]) -> N:
|
||||
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
|
||||
|
||||
R = TypeVar("R", bound="JetstreamStats")
|
||||
P = TypeVar("P", bound="JetstreamStats")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -53,7 +53,7 @@ class JetstreamStats:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[R], src_dict: Dict[str, Any]) -> R:
|
||||
def from_dict(cls: Type[P], src_dict: Dict[str, Any]) -> P:
|
||||
d = src_dict.copy()
|
||||
accounts = d.pop("accounts", UNSET)
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
N = TypeVar("N", bound="LeafNode")
|
||||
C = TypeVar("C", bound="LeafNode")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -39,7 +39,7 @@ class LeafNode:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[N], src_dict: Dict[str, Any]) -> N:
|
||||
def from_dict(cls: Type[C], src_dict: Dict[str, Any]) -> C:
|
||||
d = src_dict.copy()
|
||||
auth_timeout = d.pop("auth_timeout", UNSET)
|
||||
|
||||
|
||||
@ -1,75 +0,0 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..models.point3d import Point3d
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
P = TypeVar("P", bound="Line3d")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class Line3d:
|
||||
"""Command for adding a line.""" # noqa: E501
|
||||
|
||||
from_: Union[Unset, Point3d] = UNSET
|
||||
to: Union[Unset, Point3d] = UNSET
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
if not isinstance(self.from_, Unset):
|
||||
from_ = self.from_
|
||||
if not isinstance(self.to, Unset):
|
||||
to = self.to
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if from_ is not UNSET:
|
||||
field_dict["from"] = from_
|
||||
if to is not UNSET:
|
||||
field_dict["to"] = to
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[P], src_dict: Dict[str, Any]) -> P:
|
||||
d = src_dict.copy()
|
||||
_from_ = d.pop("from", UNSET)
|
||||
from_: Union[Unset, Point3d]
|
||||
if isinstance(_from_, Unset):
|
||||
from_ = UNSET
|
||||
else:
|
||||
from_ = Point3d(_from_)
|
||||
|
||||
_to = d.pop("to", UNSET)
|
||||
to: Union[Unset, Point3d]
|
||||
if isinstance(_to, Unset):
|
||||
to = UNSET
|
||||
else:
|
||||
to = Point3d(_to)
|
||||
|
||||
line3d = cls(
|
||||
from_=from_,
|
||||
to=to,
|
||||
)
|
||||
|
||||
line3d.additional_properties = d
|
||||
return line3d
|
||||
|
||||
@property
|
||||
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
|
||||
|
||||
C = TypeVar("C", bound="Mesh")
|
||||
U = TypeVar("U", bound="Mesh")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -25,7 +25,7 @@ class Mesh:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[C], src_dict: Dict[str, Any]) -> C:
|
||||
def from_dict(cls: Type[U], src_dict: Dict[str, Any]) -> U:
|
||||
d = src_dict.copy()
|
||||
mesh = d.pop("mesh", UNSET)
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
U = TypeVar("U", bound="MetaClusterInfo")
|
||||
S = TypeVar("S", bound="MetaClusterInfo")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -35,7 +35,7 @@ class MetaClusterInfo:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[U], src_dict: Dict[str, Any]) -> U:
|
||||
def from_dict(cls: Type[S], src_dict: Dict[str, Any]) -> S:
|
||||
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
|
||||
|
||||
S = TypeVar("S", bound="Metadata")
|
||||
K = TypeVar("K", bound="Metadata")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -71,7 +71,7 @@ class Metadata:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[S], src_dict: Dict[str, Any]) -> S:
|
||||
def from_dict(cls: Type[K], src_dict: Dict[str, Any]) -> K:
|
||||
d = src_dict.copy()
|
||||
_cache = d.pop("cache", UNSET)
|
||||
cache: Union[Unset, CacheMetadata]
|
||||
@ -92,7 +92,7 @@ class Metadata:
|
||||
if isinstance(_environment, Unset):
|
||||
environment = UNSET
|
||||
else:
|
||||
environment = Environment(_environment)
|
||||
environment = _environment # type: ignore[arg-type]
|
||||
|
||||
_executor = d.pop("executor", UNSET)
|
||||
executor: Union[Unset, ExecutorMetadata]
|
||||
|
||||
@ -1,52 +1,76 @@
|
||||
from enum import Enum
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..models.camera_drag_interaction_type import CameraDragInteractionType
|
||||
from ..models.modeling_cmd_id import ModelingCmdId
|
||||
from ..models.path_segment import PathSegment
|
||||
from ..models.point2d import Point2d
|
||||
from ..models.point3d import Point3d
|
||||
from ..types import UNSET, Unset
|
||||
from .extrude import Extrude
|
||||
from .line3d import Line3d
|
||||
|
||||
AddLine = Line3d
|
||||
|
||||
|
||||
K = TypeVar("K", bound="SelectionClick")
|
||||
class StartPath(str, Enum):
|
||||
"""Start a path.""" # noqa: E501
|
||||
|
||||
START_PATH = "StartPath"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
||||
|
||||
|
||||
Q = TypeVar("Q", bound="MovePathPen")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class SelectionClick:
|
||||
at: Union[Unset, Point2d] = UNSET
|
||||
class MovePathPen:
|
||||
path: Union[Unset, ModelingCmdId] = UNSET
|
||||
to: Union[Unset, Point3d] = UNSET
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
if not isinstance(self.at, Unset):
|
||||
at = self.at
|
||||
if not isinstance(self.path, Unset):
|
||||
path = self.path
|
||||
if not isinstance(self.to, Unset):
|
||||
to = self.to
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if at is not UNSET:
|
||||
field_dict["at"] = at
|
||||
if path is not UNSET:
|
||||
field_dict["path"] = path
|
||||
if to is not UNSET:
|
||||
field_dict["to"] = to
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[K], src_dict: Dict[str, Any]) -> K:
|
||||
def from_dict(cls: Type[Q], src_dict: Dict[str, Any]) -> Q:
|
||||
d = src_dict.copy()
|
||||
_at = d.pop("at", UNSET)
|
||||
at: Union[Unset, Point2d]
|
||||
if isinstance(_at, Unset):
|
||||
at = UNSET
|
||||
_path = d.pop("path", UNSET)
|
||||
path: Union[Unset, ModelingCmdId]
|
||||
if isinstance(_path, Unset):
|
||||
path = UNSET
|
||||
else:
|
||||
at = Point2d(_at)
|
||||
path = ModelingCmdId(_path)
|
||||
|
||||
selection_click = cls(
|
||||
at=at,
|
||||
_to = d.pop("to", UNSET)
|
||||
to: Union[Unset, Point3d]
|
||||
if isinstance(_to, Unset):
|
||||
to = UNSET
|
||||
else:
|
||||
to = Point3d(_to)
|
||||
|
||||
move_path_pen = cls(
|
||||
path=path,
|
||||
to=to,
|
||||
)
|
||||
|
||||
selection_click.additional_properties = d
|
||||
return selection_click
|
||||
move_path_pen.additional_properties = d
|
||||
return move_path_pen
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
@ -65,4 +89,341 @@ class SelectionClick:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
ModelingCmd = Union[AddLine, Extrude, SelectionClick]
|
||||
F = TypeVar("F", bound="ExtendPath")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class ExtendPath:
|
||||
path: Union[Unset, ModelingCmdId] = UNSET
|
||||
segment: Union[Unset, PathSegment] = UNSET
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
if not isinstance(self.path, Unset):
|
||||
path = self.path
|
||||
if not isinstance(self.segment, Unset):
|
||||
segment = self.segment
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if path is not UNSET:
|
||||
field_dict["path"] = path
|
||||
if segment is not UNSET:
|
||||
field_dict["segment"] = segment
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[F], src_dict: Dict[str, Any]) -> F:
|
||||
d = src_dict.copy()
|
||||
_path = d.pop("path", UNSET)
|
||||
path: Union[Unset, ModelingCmdId]
|
||||
if isinstance(_path, Unset):
|
||||
path = UNSET
|
||||
else:
|
||||
path = ModelingCmdId(_path)
|
||||
|
||||
_segment = d.pop("segment", UNSET)
|
||||
segment: Union[Unset, PathSegment]
|
||||
if isinstance(_segment, Unset):
|
||||
segment = UNSET
|
||||
else:
|
||||
segment = _segment # type: ignore[arg-type]
|
||||
|
||||
extend_path = cls(
|
||||
path=path,
|
||||
segment=segment,
|
||||
)
|
||||
|
||||
extend_path.additional_properties = d
|
||||
return extend_path
|
||||
|
||||
@property
|
||||
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
|
||||
|
||||
|
||||
H = TypeVar("H", bound="ClosePath")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class ClosePath:
|
||||
path_id: Union[Unset, str] = UNSET
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
path_id = self.path_id
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if path_id is not UNSET:
|
||||
field_dict["path_id"] = path_id
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[H], src_dict: Dict[str, Any]) -> H:
|
||||
d = src_dict.copy()
|
||||
path_id = d.pop("path_id", UNSET)
|
||||
|
||||
close_path = cls(
|
||||
path_id=path_id,
|
||||
)
|
||||
|
||||
close_path.additional_properties = d
|
||||
return close_path
|
||||
|
||||
@property
|
||||
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="CameraDragStart")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CameraDragStart:
|
||||
interaction: Union[Unset, CameraDragInteractionType] = UNSET
|
||||
window: Union[Unset, Point2d] = UNSET
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
if not isinstance(self.interaction, Unset):
|
||||
interaction = self.interaction
|
||||
if not isinstance(self.window, Unset):
|
||||
window = self.window
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if interaction is not UNSET:
|
||||
field_dict["interaction"] = interaction
|
||||
if window is not UNSET:
|
||||
field_dict["window"] = window
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[N], src_dict: Dict[str, Any]) -> N:
|
||||
d = src_dict.copy()
|
||||
_interaction = d.pop("interaction", UNSET)
|
||||
interaction: Union[Unset, CameraDragInteractionType]
|
||||
if isinstance(_interaction, Unset):
|
||||
interaction = UNSET
|
||||
else:
|
||||
interaction = _interaction # type: ignore[arg-type]
|
||||
|
||||
_window = d.pop("window", UNSET)
|
||||
window: Union[Unset, Point2d]
|
||||
if isinstance(_window, Unset):
|
||||
window = UNSET
|
||||
else:
|
||||
window = Point2d(_window)
|
||||
|
||||
camera_drag_start = cls(
|
||||
interaction=interaction,
|
||||
window=window,
|
||||
)
|
||||
|
||||
camera_drag_start.additional_properties = d
|
||||
return camera_drag_start
|
||||
|
||||
@property
|
||||
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
|
||||
|
||||
|
||||
H = TypeVar("H", bound="CameraDragMove")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CameraDragMove:
|
||||
interaction: Union[Unset, CameraDragInteractionType] = UNSET
|
||||
sequence: Union[Unset, int] = UNSET
|
||||
window: Union[Unset, Point2d] = UNSET
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
if not isinstance(self.interaction, Unset):
|
||||
interaction = self.interaction
|
||||
sequence = self.sequence
|
||||
if not isinstance(self.window, Unset):
|
||||
window = self.window
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if interaction is not UNSET:
|
||||
field_dict["interaction"] = interaction
|
||||
if sequence is not UNSET:
|
||||
field_dict["sequence"] = sequence
|
||||
if window is not UNSET:
|
||||
field_dict["window"] = window
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[H], src_dict: Dict[str, Any]) -> H:
|
||||
d = src_dict.copy()
|
||||
_interaction = d.pop("interaction", UNSET)
|
||||
interaction: Union[Unset, CameraDragInteractionType]
|
||||
if isinstance(_interaction, Unset):
|
||||
interaction = UNSET
|
||||
else:
|
||||
interaction = _interaction # type: ignore[arg-type]
|
||||
|
||||
sequence = d.pop("sequence", UNSET)
|
||||
|
||||
_window = d.pop("window", UNSET)
|
||||
window: Union[Unset, Point2d]
|
||||
if isinstance(_window, Unset):
|
||||
window = UNSET
|
||||
else:
|
||||
window = Point2d(_window)
|
||||
|
||||
camera_drag_move = cls(
|
||||
interaction=interaction,
|
||||
sequence=sequence,
|
||||
window=window,
|
||||
)
|
||||
|
||||
camera_drag_move.additional_properties = d
|
||||
return camera_drag_move
|
||||
|
||||
@property
|
||||
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
|
||||
|
||||
|
||||
B = TypeVar("B", bound="CameraDragEnd")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class CameraDragEnd:
|
||||
interaction: Union[Unset, CameraDragInteractionType] = UNSET
|
||||
window: Union[Unset, Point2d] = UNSET
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
if not isinstance(self.interaction, Unset):
|
||||
interaction = self.interaction
|
||||
if not isinstance(self.window, Unset):
|
||||
window = self.window
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if interaction is not UNSET:
|
||||
field_dict["interaction"] = interaction
|
||||
if window is not UNSET:
|
||||
field_dict["window"] = window
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[B], src_dict: Dict[str, Any]) -> B:
|
||||
d = src_dict.copy()
|
||||
_interaction = d.pop("interaction", UNSET)
|
||||
interaction: Union[Unset, CameraDragInteractionType]
|
||||
if isinstance(_interaction, Unset):
|
||||
interaction = UNSET
|
||||
else:
|
||||
interaction = _interaction # type: ignore[arg-type]
|
||||
|
||||
_window = d.pop("window", UNSET)
|
||||
window: Union[Unset, Point2d]
|
||||
if isinstance(_window, Unset):
|
||||
window = UNSET
|
||||
else:
|
||||
window = Point2d(_window)
|
||||
|
||||
camera_drag_end = cls(
|
||||
interaction=interaction,
|
||||
window=window,
|
||||
)
|
||||
|
||||
camera_drag_end.additional_properties = d
|
||||
return camera_drag_end
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
||||
return list(self.additional_properties.keys())
|
||||
|
||||
def __getitem__(self, key: str) -> Any:
|
||||
return self.additional_properties[key]
|
||||
|
||||
def __setitem__(self, key: str, value: Any) -> None:
|
||||
self.additional_properties[key] = value
|
||||
|
||||
def __delitem__(self, key: str) -> None:
|
||||
del self.additional_properties[key]
|
||||
|
||||
def __contains__(self, key: str) -> bool:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
ModelingCmd = Union[
|
||||
StartPath,
|
||||
MovePathPen,
|
||||
ExtendPath,
|
||||
Extrude,
|
||||
ClosePath,
|
||||
CameraDragStart,
|
||||
CameraDragMove,
|
||||
CameraDragEnd,
|
||||
]
|
||||
|
||||
@ -6,7 +6,7 @@ from ..models.modeling_cmd import ModelingCmd
|
||||
from ..models.modeling_cmd_id import ModelingCmdId
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
Q = TypeVar("Q", bound="ModelingCmdReq")
|
||||
B = TypeVar("B", bound="ModelingCmdReq")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -39,7 +39,7 @@ class ModelingCmdReq:
|
||||
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()
|
||||
_cmd = d.pop("cmd", UNSET)
|
||||
cmd: Union[Unset, ModelingCmd]
|
||||
|
||||
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
F = TypeVar("F", bound="ModelingCmdReqBatch")
|
||||
P = TypeVar("P", bound="ModelingCmdReqBatch")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -31,7 +31,7 @@ class ModelingCmdReqBatch:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[F], src_dict: Dict[str, Any]) -> F:
|
||||
def from_dict(cls: Type[P], src_dict: Dict[str, Any]) -> P:
|
||||
d = src_dict.copy()
|
||||
cmds = d.pop("cmds", UNSET)
|
||||
file_id = d.pop("file_id", UNSET)
|
||||
|
||||
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
H = TypeVar("H", bound="ModelingError")
|
||||
J = TypeVar("J", bound="ModelingError")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -39,7 +39,7 @@ class ModelingError:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[H], src_dict: Dict[str, Any]) -> H:
|
||||
def from_dict(cls: Type[J], src_dict: Dict[str, Any]) -> J:
|
||||
d = src_dict.copy()
|
||||
error_code = d.pop("error_code", UNSET)
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ Success = Any
|
||||
Error = ModelingError
|
||||
|
||||
|
||||
N = TypeVar("N", bound="Cancelled")
|
||||
T = TypeVar("T", bound="Cancelled")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -34,7 +34,7 @@ class Cancelled:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[N], src_dict: Dict[str, Any]) -> N:
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
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
|
||||
|
||||
H = TypeVar("H", bound="ModelingOutcomes")
|
||||
V = TypeVar("V", bound="ModelingOutcomes")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -27,7 +27,7 @@ class ModelingOutcomes:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[H], src_dict: Dict[str, Any]) -> H:
|
||||
def from_dict(cls: Type[V], src_dict: Dict[str, Any]) -> V:
|
||||
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
|
||||
|
||||
B = TypeVar("B", bound="NewAddress")
|
||||
C = TypeVar("C", bound="NewAddress")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -53,7 +53,7 @@ class NewAddress:
|
||||
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()
|
||||
city = d.pop("city", UNSET)
|
||||
|
||||
@ -62,7 +62,7 @@ class NewAddress:
|
||||
if isinstance(_country, Unset):
|
||||
country = UNSET
|
||||
else:
|
||||
country = CountryCode(_country)
|
||||
country = _country # type: ignore[arg-type]
|
||||
|
||||
state = d.pop("state", UNSET)
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
B = TypeVar("B", bound="OAuth2ClientInfo")
|
||||
R = TypeVar("R", bound="OAuth2ClientInfo")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -35,7 +35,7 @@ class OAuth2ClientInfo:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[B], src_dict: Dict[str, Any]) -> B:
|
||||
def from_dict(cls: Type[R], src_dict: Dict[str, Any]) -> R:
|
||||
d = src_dict.copy()
|
||||
csrf_token = d.pop("csrf_token", UNSET)
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
P = TypeVar("P", bound="Onboarding")
|
||||
C = TypeVar("C", bound="Onboarding")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -37,7 +37,7 @@ class Onboarding:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[P], src_dict: Dict[str, Any]) -> P:
|
||||
def from_dict(cls: Type[C], src_dict: Dict[str, Any]) -> C:
|
||||
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
|
||||
|
||||
J = TypeVar("J", bound="OutputFile")
|
||||
E = TypeVar("E", bound="OutputFile")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -31,7 +31,7 @@ class OutputFile:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[J], src_dict: Dict[str, Any]) -> J:
|
||||
def from_dict(cls: Type[E], src_dict: Dict[str, Any]) -> E:
|
||||
d = src_dict.copy()
|
||||
contents = d.pop("contents", UNSET)
|
||||
|
||||
|
||||
221
kittycad/models/path_segment.py
Normal file
221
kittycad/models/path_segment.py
Normal file
@ -0,0 +1,221 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
|
||||
from ..models.point2d import Point2d
|
||||
from ..models.point3d import Point3d
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
M = TypeVar("M", bound="Line")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class Line:
|
||||
end: Union[Unset, Point3d] = UNSET
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
if not isinstance(self.end, Unset):
|
||||
end = self.end
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if end is not UNSET:
|
||||
field_dict["end"] = end
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[M], src_dict: Dict[str, Any]) -> M:
|
||||
d = src_dict.copy()
|
||||
_end = d.pop("end", UNSET)
|
||||
end: Union[Unset, Point3d]
|
||||
if isinstance(_end, Unset):
|
||||
end = UNSET
|
||||
else:
|
||||
end = Point3d(_end)
|
||||
|
||||
line = cls(
|
||||
end=end,
|
||||
)
|
||||
|
||||
line.additional_properties = d
|
||||
return line
|
||||
|
||||
@property
|
||||
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
|
||||
|
||||
|
||||
S = TypeVar("S", bound="Arc")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class Arc:
|
||||
angle_end: Union[Unset, float] = UNSET
|
||||
angle_start: Union[Unset, float] = UNSET
|
||||
center: Union[Unset, Point2d] = UNSET
|
||||
radius: Union[Unset, float] = UNSET
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
angle_end = self.angle_end
|
||||
angle_start = self.angle_start
|
||||
if not isinstance(self.center, Unset):
|
||||
center = self.center
|
||||
radius = self.radius
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if angle_end is not UNSET:
|
||||
field_dict["angle_end"] = angle_end
|
||||
if angle_start is not UNSET:
|
||||
field_dict["angle_start"] = angle_start
|
||||
if center is not UNSET:
|
||||
field_dict["center"] = center
|
||||
if radius is not UNSET:
|
||||
field_dict["radius"] = radius
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[S], src_dict: Dict[str, Any]) -> S:
|
||||
d = src_dict.copy()
|
||||
angle_end = d.pop("angle_end", UNSET)
|
||||
|
||||
angle_start = d.pop("angle_start", UNSET)
|
||||
|
||||
_center = d.pop("center", UNSET)
|
||||
center: Union[Unset, Point2d]
|
||||
if isinstance(_center, Unset):
|
||||
center = UNSET
|
||||
else:
|
||||
center = Point2d(_center)
|
||||
|
||||
radius = d.pop("radius", UNSET)
|
||||
|
||||
arc = cls(
|
||||
angle_end=angle_end,
|
||||
angle_start=angle_start,
|
||||
center=center,
|
||||
radius=radius,
|
||||
)
|
||||
|
||||
arc.additional_properties = d
|
||||
return arc
|
||||
|
||||
@property
|
||||
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
|
||||
|
||||
|
||||
L = TypeVar("L", bound="Bezier")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class Bezier:
|
||||
control1: Union[Unset, Point3d] = UNSET
|
||||
control2: Union[Unset, Point3d] = UNSET
|
||||
end: Union[Unset, Point3d] = UNSET
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
if not isinstance(self.control1, Unset):
|
||||
control1 = self.control1
|
||||
if not isinstance(self.control2, Unset):
|
||||
control2 = self.control2
|
||||
if not isinstance(self.end, Unset):
|
||||
end = self.end
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if control1 is not UNSET:
|
||||
field_dict["control1"] = control1
|
||||
if control2 is not UNSET:
|
||||
field_dict["control2"] = control2
|
||||
if end is not UNSET:
|
||||
field_dict["end"] = end
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[L], src_dict: Dict[str, Any]) -> L:
|
||||
d = src_dict.copy()
|
||||
_control1 = d.pop("control1", UNSET)
|
||||
control1: Union[Unset, Point3d]
|
||||
if isinstance(_control1, Unset):
|
||||
control1 = UNSET
|
||||
else:
|
||||
control1 = Point3d(_control1)
|
||||
|
||||
_control2 = d.pop("control2", UNSET)
|
||||
control2: Union[Unset, Point3d]
|
||||
if isinstance(_control2, Unset):
|
||||
control2 = UNSET
|
||||
else:
|
||||
control2 = Point3d(_control2)
|
||||
|
||||
_end = d.pop("end", UNSET)
|
||||
end: Union[Unset, Point3d]
|
||||
if isinstance(_end, Unset):
|
||||
end = UNSET
|
||||
else:
|
||||
end = Point3d(_end)
|
||||
|
||||
bezier = cls(
|
||||
control1=control1,
|
||||
control2=control2,
|
||||
end=end,
|
||||
)
|
||||
|
||||
bezier.additional_properties = d
|
||||
return bezier
|
||||
|
||||
@property
|
||||
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
|
||||
|
||||
|
||||
PathSegment = Union[Line, Arc, Bezier]
|
||||
@ -9,7 +9,7 @@ from ..models.card_details import CardDetails
|
||||
from ..models.payment_method_type import PaymentMethodType
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
V = TypeVar("V", bound="PaymentMethod")
|
||||
E = TypeVar("E", bound="PaymentMethod")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -57,7 +57,7 @@ class PaymentMethod:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[V], src_dict: Dict[str, Any]) -> V:
|
||||
def from_dict(cls: Type[E], src_dict: Dict[str, Any]) -> E:
|
||||
d = src_dict.copy()
|
||||
_billing_info = d.pop("billing_info", UNSET)
|
||||
billing_info: Union[Unset, BillingInfo]
|
||||
@ -88,7 +88,7 @@ class PaymentMethod:
|
||||
if isinstance(_type, Unset):
|
||||
type = UNSET
|
||||
else:
|
||||
type = PaymentMethodType(_type)
|
||||
type = _type # type: ignore[arg-type]
|
||||
|
||||
payment_method = cls(
|
||||
billing_info=billing_info,
|
||||
|
||||
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
C = TypeVar("C", bound="PaymentMethodCardChecks")
|
||||
D = TypeVar("D", bound="PaymentMethodCardChecks")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -35,7 +35,7 @@ class PaymentMethodCardChecks:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[C], src_dict: Dict[str, Any]) -> C:
|
||||
def from_dict(cls: Type[D], src_dict: Dict[str, Any]) -> D:
|
||||
d = src_dict.copy()
|
||||
address_line1_check = d.pop("address_line1_check", UNSET)
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@ from ..models.physics_constant_name import PhysicsConstantName
|
||||
from ..models.uuid import Uuid
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
R = TypeVar("R", bound="PhysicsConstant")
|
||||
Y = TypeVar("Y", bound="PhysicsConstant")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -78,7 +78,7 @@ class PhysicsConstant:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[R], src_dict: Dict[str, Any]) -> R:
|
||||
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]
|
||||
@ -92,7 +92,7 @@ class PhysicsConstant:
|
||||
if isinstance(_constant, Unset):
|
||||
constant = UNSET
|
||||
else:
|
||||
constant = PhysicsConstantName(_constant)
|
||||
constant = _constant # type: ignore[arg-type]
|
||||
|
||||
_created_at = d.pop("created_at", UNSET)
|
||||
created_at: Union[Unset, datetime.datetime]
|
||||
@ -122,7 +122,7 @@ class PhysicsConstant:
|
||||
if isinstance(_status, Unset):
|
||||
status = UNSET
|
||||
else:
|
||||
status = ApiCallStatus(_status)
|
||||
status = _status # type: ignore[arg-type]
|
||||
|
||||
_updated_at = d.pop("updated_at", UNSET)
|
||||
updated_at: Union[Unset, datetime.datetime]
|
||||
|
||||
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
C = TypeVar("C", bound="PluginsInfo")
|
||||
Y = TypeVar("Y", bound="PluginsInfo")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -49,7 +49,7 @@ class PluginsInfo:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[C], src_dict: Dict[str, Any]) -> C:
|
||||
def from_dict(cls: Type[Y], src_dict: Dict[str, Any]) -> Y:
|
||||
d = src_dict.copy()
|
||||
authorization = cast(List[str], d.pop("authorization", UNSET))
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
E = TypeVar("E", bound="Point2d")
|
||||
D = TypeVar("D", bound="Point2d")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -31,7 +31,7 @@ class Point2d:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[E], src_dict: Dict[str, Any]) -> E:
|
||||
def from_dict(cls: Type[D], src_dict: Dict[str, Any]) -> D:
|
||||
d = src_dict.copy()
|
||||
x = d.pop("x", UNSET)
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
M = TypeVar("M", bound="Point3d")
|
||||
F = TypeVar("F", bound="Point3d")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -35,7 +35,7 @@ class Point3d:
|
||||
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()
|
||||
x = d.pop("x", UNSET)
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
S = TypeVar("S", bound="PointEMetadata")
|
||||
Z = TypeVar("Z", bound="PointEMetadata")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -29,7 +29,7 @@ class PointEMetadata:
|
||||
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()
|
||||
ok = d.pop("ok", UNSET)
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
L = TypeVar("L", bound="Pong")
|
||||
G = TypeVar("G", bound="Pong")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -27,7 +27,7 @@ class Pong:
|
||||
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()
|
||||
message = d.pop("message", UNSET)
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="RegistryServiceConfig")
|
||||
L = TypeVar("L", bound="RegistryServiceConfig")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -59,7 +59,7 @@ class RegistryServiceConfig:
|
||||
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()
|
||||
allow_nondistributable_artifacts_cid_rs = cast(
|
||||
List[str], d.pop("allow_nondistributable_artifacts_cid_rs", UNSET)
|
||||
|
||||
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
E = TypeVar("E", bound="Runtime")
|
||||
N = TypeVar("N", bound="Runtime")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -33,7 +33,7 @@ class Runtime:
|
||||
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()
|
||||
path = d.pop("path", UNSET)
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ from dateutil.parser import isoparse
|
||||
from ..models.uuid import Uuid
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
D = TypeVar("D", bound="Session")
|
||||
N = TypeVar("N", bound="Session")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -58,7 +58,7 @@ class Session:
|
||||
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()
|
||||
_created_at = d.pop("created_at", UNSET)
|
||||
created_at: Union[Unset, datetime.datetime]
|
||||
|
||||
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
Y = TypeVar("Y", bound="SystemInfoDefaultAddressPools")
|
||||
H = TypeVar("H", bound="SystemInfoDefaultAddressPools")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -29,7 +29,7 @@ class SystemInfoDefaultAddressPools:
|
||||
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()
|
||||
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
|
||||
|
||||
Y = TypeVar("Y", bound="UnitAngleConversion")
|
||||
V = TypeVar("V", bound="UnitAngleConversion")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -87,7 +87,7 @@ class UnitAngleConversion:
|
||||
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()
|
||||
_completed_at = d.pop("completed_at", UNSET)
|
||||
completed_at: Union[Unset, datetime.datetime]
|
||||
@ -119,7 +119,7 @@ class UnitAngleConversion:
|
||||
if isinstance(_input_unit, Unset):
|
||||
input_unit = UNSET
|
||||
else:
|
||||
input_unit = UnitAngle(_input_unit)
|
||||
input_unit = _input_unit # type: ignore[arg-type]
|
||||
|
||||
output = d.pop("output", UNSET)
|
||||
|
||||
@ -128,7 +128,7 @@ class UnitAngleConversion:
|
||||
if isinstance(_output_unit, Unset):
|
||||
output_unit = UNSET
|
||||
else:
|
||||
output_unit = UnitAngle(_output_unit)
|
||||
output_unit = _output_unit # type: ignore[arg-type]
|
||||
|
||||
_started_at = d.pop("started_at", UNSET)
|
||||
started_at: Union[Unset, datetime.datetime]
|
||||
@ -142,7 +142,7 @@ class UnitAngleConversion:
|
||||
if isinstance(_status, Unset):
|
||||
status = UNSET
|
||||
else:
|
||||
status = ApiCallStatus(_status)
|
||||
status = _status # type: ignore[arg-type]
|
||||
|
||||
_updated_at = d.pop("updated_at", UNSET)
|
||||
updated_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
|
||||
|
||||
D = TypeVar("D", bound="UnitAreaConversion")
|
||||
E = TypeVar("E", bound="UnitAreaConversion")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -87,7 +87,7 @@ class UnitAreaConversion:
|
||||
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()
|
||||
_completed_at = d.pop("completed_at", UNSET)
|
||||
completed_at: Union[Unset, datetime.datetime]
|
||||
@ -119,7 +119,7 @@ class UnitAreaConversion:
|
||||
if isinstance(_input_unit, Unset):
|
||||
input_unit = UNSET
|
||||
else:
|
||||
input_unit = UnitArea(_input_unit)
|
||||
input_unit = _input_unit # type: ignore[arg-type]
|
||||
|
||||
output = d.pop("output", UNSET)
|
||||
|
||||
@ -128,7 +128,7 @@ class UnitAreaConversion:
|
||||
if isinstance(_output_unit, Unset):
|
||||
output_unit = UNSET
|
||||
else:
|
||||
output_unit = UnitArea(_output_unit)
|
||||
output_unit = _output_unit # type: ignore[arg-type]
|
||||
|
||||
_started_at = d.pop("started_at", UNSET)
|
||||
started_at: Union[Unset, datetime.datetime]
|
||||
@ -142,7 +142,7 @@ class UnitAreaConversion:
|
||||
if isinstance(_status, Unset):
|
||||
status = UNSET
|
||||
else:
|
||||
status = ApiCallStatus(_status)
|
||||
status = _status # type: ignore[arg-type]
|
||||
|
||||
_updated_at = d.pop("updated_at", UNSET)
|
||||
updated_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
|
||||
|
||||
F = TypeVar("F", bound="UnitCurrentConversion")
|
||||
T = TypeVar("T", bound="UnitCurrentConversion")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -87,7 +87,7 @@ class UnitCurrentConversion:
|
||||
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()
|
||||
_completed_at = d.pop("completed_at", UNSET)
|
||||
completed_at: Union[Unset, datetime.datetime]
|
||||
@ -119,7 +119,7 @@ class UnitCurrentConversion:
|
||||
if isinstance(_input_unit, Unset):
|
||||
input_unit = UNSET
|
||||
else:
|
||||
input_unit = UnitCurrent(_input_unit)
|
||||
input_unit = _input_unit # type: ignore[arg-type]
|
||||
|
||||
output = d.pop("output", UNSET)
|
||||
|
||||
@ -128,7 +128,7 @@ class UnitCurrentConversion:
|
||||
if isinstance(_output_unit, Unset):
|
||||
output_unit = UNSET
|
||||
else:
|
||||
output_unit = UnitCurrent(_output_unit)
|
||||
output_unit = _output_unit # type: ignore[arg-type]
|
||||
|
||||
_started_at = d.pop("started_at", UNSET)
|
||||
started_at: Union[Unset, datetime.datetime]
|
||||
@ -142,7 +142,7 @@ class UnitCurrentConversion:
|
||||
if isinstance(_status, Unset):
|
||||
status = UNSET
|
||||
else:
|
||||
status = ApiCallStatus(_status)
|
||||
status = _status # type: ignore[arg-type]
|
||||
|
||||
_updated_at = d.pop("updated_at", UNSET)
|
||||
updated_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
|
||||
|
||||
Z = TypeVar("Z", bound="UnitEnergyConversion")
|
||||
Q = TypeVar("Q", bound="UnitEnergyConversion")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -87,7 +87,7 @@ class UnitEnergyConversion:
|
||||
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()
|
||||
_completed_at = d.pop("completed_at", UNSET)
|
||||
completed_at: Union[Unset, datetime.datetime]
|
||||
@ -119,7 +119,7 @@ class UnitEnergyConversion:
|
||||
if isinstance(_input_unit, Unset):
|
||||
input_unit = UNSET
|
||||
else:
|
||||
input_unit = UnitEnergy(_input_unit)
|
||||
input_unit = _input_unit # type: ignore[arg-type]
|
||||
|
||||
output = d.pop("output", UNSET)
|
||||
|
||||
@ -128,7 +128,7 @@ class UnitEnergyConversion:
|
||||
if isinstance(_output_unit, Unset):
|
||||
output_unit = UNSET
|
||||
else:
|
||||
output_unit = UnitEnergy(_output_unit)
|
||||
output_unit = _output_unit # type: ignore[arg-type]
|
||||
|
||||
_started_at = d.pop("started_at", UNSET)
|
||||
started_at: Union[Unset, datetime.datetime]
|
||||
@ -142,7 +142,7 @@ class UnitEnergyConversion:
|
||||
if isinstance(_status, Unset):
|
||||
status = UNSET
|
||||
else:
|
||||
status = ApiCallStatus(_status)
|
||||
status = _status # type: ignore[arg-type]
|
||||
|
||||
_updated_at = d.pop("updated_at", UNSET)
|
||||
updated_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
|
||||
|
||||
G = TypeVar("G", bound="UnitForceConversion")
|
||||
F = TypeVar("F", bound="UnitForceConversion")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -87,7 +87,7 @@ class UnitForceConversion:
|
||||
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()
|
||||
_completed_at = d.pop("completed_at", UNSET)
|
||||
completed_at: Union[Unset, datetime.datetime]
|
||||
@ -119,7 +119,7 @@ class UnitForceConversion:
|
||||
if isinstance(_input_unit, Unset):
|
||||
input_unit = UNSET
|
||||
else:
|
||||
input_unit = UnitForce(_input_unit)
|
||||
input_unit = _input_unit # type: ignore[arg-type]
|
||||
|
||||
output = d.pop("output", UNSET)
|
||||
|
||||
@ -128,7 +128,7 @@ class UnitForceConversion:
|
||||
if isinstance(_output_unit, Unset):
|
||||
output_unit = UNSET
|
||||
else:
|
||||
output_unit = UnitForce(_output_unit)
|
||||
output_unit = _output_unit # type: ignore[arg-type]
|
||||
|
||||
_started_at = d.pop("started_at", UNSET)
|
||||
started_at: Union[Unset, datetime.datetime]
|
||||
@ -142,7 +142,7 @@ class UnitForceConversion:
|
||||
if isinstance(_status, Unset):
|
||||
status = UNSET
|
||||
else:
|
||||
status = ApiCallStatus(_status)
|
||||
status = _status # type: ignore[arg-type]
|
||||
|
||||
_updated_at = d.pop("updated_at", UNSET)
|
||||
updated_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
|
||||
|
||||
L = TypeVar("L", bound="UnitFrequencyConversion")
|
||||
D = TypeVar("D", bound="UnitFrequencyConversion")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -87,7 +87,7 @@ class UnitFrequencyConversion:
|
||||
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()
|
||||
_completed_at = d.pop("completed_at", UNSET)
|
||||
completed_at: Union[Unset, datetime.datetime]
|
||||
@ -119,7 +119,7 @@ class UnitFrequencyConversion:
|
||||
if isinstance(_input_unit, Unset):
|
||||
input_unit = UNSET
|
||||
else:
|
||||
input_unit = UnitFrequency(_input_unit)
|
||||
input_unit = _input_unit # type: ignore[arg-type]
|
||||
|
||||
output = d.pop("output", UNSET)
|
||||
|
||||
@ -128,7 +128,7 @@ class UnitFrequencyConversion:
|
||||
if isinstance(_output_unit, Unset):
|
||||
output_unit = UNSET
|
||||
else:
|
||||
output_unit = UnitFrequency(_output_unit)
|
||||
output_unit = _output_unit # type: ignore[arg-type]
|
||||
|
||||
_started_at = d.pop("started_at", UNSET)
|
||||
started_at: Union[Unset, datetime.datetime]
|
||||
@ -142,7 +142,7 @@ class UnitFrequencyConversion:
|
||||
if isinstance(_status, Unset):
|
||||
status = UNSET
|
||||
else:
|
||||
status = ApiCallStatus(_status)
|
||||
status = _status # type: ignore[arg-type]
|
||||
|
||||
_updated_at = d.pop("updated_at", UNSET)
|
||||
updated_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
|
||||
|
||||
N = TypeVar("N", bound="UnitLengthConversion")
|
||||
J = TypeVar("J", bound="UnitLengthConversion")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -87,7 +87,7 @@ class UnitLengthConversion:
|
||||
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()
|
||||
_completed_at = d.pop("completed_at", UNSET)
|
||||
completed_at: Union[Unset, datetime.datetime]
|
||||
@ -119,7 +119,7 @@ class UnitLengthConversion:
|
||||
if isinstance(_input_unit, Unset):
|
||||
input_unit = UNSET
|
||||
else:
|
||||
input_unit = UnitLength(_input_unit)
|
||||
input_unit = _input_unit # type: ignore[arg-type]
|
||||
|
||||
output = d.pop("output", UNSET)
|
||||
|
||||
@ -128,7 +128,7 @@ class UnitLengthConversion:
|
||||
if isinstance(_output_unit, Unset):
|
||||
output_unit = UNSET
|
||||
else:
|
||||
output_unit = UnitLength(_output_unit)
|
||||
output_unit = _output_unit # type: ignore[arg-type]
|
||||
|
||||
_started_at = d.pop("started_at", UNSET)
|
||||
started_at: Union[Unset, datetime.datetime]
|
||||
@ -142,7 +142,7 @@ class UnitLengthConversion:
|
||||
if isinstance(_status, Unset):
|
||||
status = UNSET
|
||||
else:
|
||||
status = ApiCallStatus(_status)
|
||||
status = _status # type: ignore[arg-type]
|
||||
|
||||
_updated_at = d.pop("updated_at", UNSET)
|
||||
updated_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
|
||||
|
||||
N = TypeVar("N", bound="UnitMassConversion")
|
||||
F = TypeVar("F", bound="UnitMassConversion")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -87,7 +87,7 @@ class UnitMassConversion:
|
||||
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()
|
||||
_completed_at = d.pop("completed_at", UNSET)
|
||||
completed_at: Union[Unset, datetime.datetime]
|
||||
@ -119,7 +119,7 @@ class UnitMassConversion:
|
||||
if isinstance(_input_unit, Unset):
|
||||
input_unit = UNSET
|
||||
else:
|
||||
input_unit = UnitMass(_input_unit)
|
||||
input_unit = _input_unit # type: ignore[arg-type]
|
||||
|
||||
output = d.pop("output", UNSET)
|
||||
|
||||
@ -128,7 +128,7 @@ class UnitMassConversion:
|
||||
if isinstance(_output_unit, Unset):
|
||||
output_unit = UNSET
|
||||
else:
|
||||
output_unit = UnitMass(_output_unit)
|
||||
output_unit = _output_unit # type: ignore[arg-type]
|
||||
|
||||
_started_at = d.pop("started_at", UNSET)
|
||||
started_at: Union[Unset, datetime.datetime]
|
||||
@ -142,7 +142,7 @@ class UnitMassConversion:
|
||||
if isinstance(_status, Unset):
|
||||
status = UNSET
|
||||
else:
|
||||
status = ApiCallStatus(_status)
|
||||
status = _status # type: ignore[arg-type]
|
||||
|
||||
_updated_at = d.pop("updated_at", UNSET)
|
||||
updated_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
|
||||
|
||||
H = TypeVar("H", bound="UnitPowerConversion")
|
||||
V = TypeVar("V", bound="UnitPowerConversion")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -87,7 +87,7 @@ class UnitPowerConversion:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[H], src_dict: Dict[str, Any]) -> H:
|
||||
def from_dict(cls: Type[V], src_dict: Dict[str, Any]) -> V:
|
||||
d = src_dict.copy()
|
||||
_completed_at = d.pop("completed_at", UNSET)
|
||||
completed_at: Union[Unset, datetime.datetime]
|
||||
@ -119,7 +119,7 @@ class UnitPowerConversion:
|
||||
if isinstance(_input_unit, Unset):
|
||||
input_unit = UNSET
|
||||
else:
|
||||
input_unit = UnitPower(_input_unit)
|
||||
input_unit = _input_unit # type: ignore[arg-type]
|
||||
|
||||
output = d.pop("output", UNSET)
|
||||
|
||||
@ -128,7 +128,7 @@ class UnitPowerConversion:
|
||||
if isinstance(_output_unit, Unset):
|
||||
output_unit = UNSET
|
||||
else:
|
||||
output_unit = UnitPower(_output_unit)
|
||||
output_unit = _output_unit # type: ignore[arg-type]
|
||||
|
||||
_started_at = d.pop("started_at", UNSET)
|
||||
started_at: Union[Unset, datetime.datetime]
|
||||
@ -142,7 +142,7 @@ class UnitPowerConversion:
|
||||
if isinstance(_status, Unset):
|
||||
status = UNSET
|
||||
else:
|
||||
status = ApiCallStatus(_status)
|
||||
status = _status # type: ignore[arg-type]
|
||||
|
||||
_updated_at = d.pop("updated_at", UNSET)
|
||||
updated_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
|
||||
|
||||
V = TypeVar("V", bound="UnitPressureConversion")
|
||||
U = TypeVar("U", bound="UnitPressureConversion")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -87,7 +87,7 @@ class UnitPressureConversion:
|
||||
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()
|
||||
_completed_at = d.pop("completed_at", UNSET)
|
||||
completed_at: Union[Unset, datetime.datetime]
|
||||
@ -119,7 +119,7 @@ class UnitPressureConversion:
|
||||
if isinstance(_input_unit, Unset):
|
||||
input_unit = UNSET
|
||||
else:
|
||||
input_unit = UnitPressure(_input_unit)
|
||||
input_unit = _input_unit # type: ignore[arg-type]
|
||||
|
||||
output = d.pop("output", UNSET)
|
||||
|
||||
@ -128,7 +128,7 @@ class UnitPressureConversion:
|
||||
if isinstance(_output_unit, Unset):
|
||||
output_unit = UNSET
|
||||
else:
|
||||
output_unit = UnitPressure(_output_unit)
|
||||
output_unit = _output_unit # type: ignore[arg-type]
|
||||
|
||||
_started_at = d.pop("started_at", UNSET)
|
||||
started_at: Union[Unset, datetime.datetime]
|
||||
@ -142,7 +142,7 @@ class UnitPressureConversion:
|
||||
if isinstance(_status, Unset):
|
||||
status = UNSET
|
||||
else:
|
||||
status = ApiCallStatus(_status)
|
||||
status = _status # type: ignore[arg-type]
|
||||
|
||||
_updated_at = d.pop("updated_at", UNSET)
|
||||
updated_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
|
||||
|
||||
E = TypeVar("E", bound="UnitTemperatureConversion")
|
||||
F = TypeVar("F", bound="UnitTemperatureConversion")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -87,7 +87,7 @@ class UnitTemperatureConversion:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[E], src_dict: Dict[str, Any]) -> E:
|
||||
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]
|
||||
@ -119,7 +119,7 @@ class UnitTemperatureConversion:
|
||||
if isinstance(_input_unit, Unset):
|
||||
input_unit = UNSET
|
||||
else:
|
||||
input_unit = UnitTemperature(_input_unit)
|
||||
input_unit = _input_unit # type: ignore[arg-type]
|
||||
|
||||
output = d.pop("output", UNSET)
|
||||
|
||||
@ -128,7 +128,7 @@ class UnitTemperatureConversion:
|
||||
if isinstance(_output_unit, Unset):
|
||||
output_unit = UNSET
|
||||
else:
|
||||
output_unit = UnitTemperature(_output_unit)
|
||||
output_unit = _output_unit # type: ignore[arg-type]
|
||||
|
||||
_started_at = d.pop("started_at", UNSET)
|
||||
started_at: Union[Unset, datetime.datetime]
|
||||
@ -142,7 +142,7 @@ class UnitTemperatureConversion:
|
||||
if isinstance(_status, Unset):
|
||||
status = UNSET
|
||||
else:
|
||||
status = ApiCallStatus(_status)
|
||||
status = _status # type: ignore[arg-type]
|
||||
|
||||
_updated_at = d.pop("updated_at", UNSET)
|
||||
updated_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
|
||||
|
||||
T = TypeVar("T", bound="UnitTorqueConversion")
|
||||
Y = TypeVar("Y", bound="UnitTorqueConversion")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -87,7 +87,7 @@ class UnitTorqueConversion:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
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]
|
||||
@ -119,7 +119,7 @@ class UnitTorqueConversion:
|
||||
if isinstance(_input_unit, Unset):
|
||||
input_unit = UNSET
|
||||
else:
|
||||
input_unit = UnitTorque(_input_unit)
|
||||
input_unit = _input_unit # type: ignore[arg-type]
|
||||
|
||||
output = d.pop("output", UNSET)
|
||||
|
||||
@ -128,7 +128,7 @@ class UnitTorqueConversion:
|
||||
if isinstance(_output_unit, Unset):
|
||||
output_unit = UNSET
|
||||
else:
|
||||
output_unit = UnitTorque(_output_unit)
|
||||
output_unit = _output_unit # type: ignore[arg-type]
|
||||
|
||||
_started_at = d.pop("started_at", UNSET)
|
||||
started_at: Union[Unset, datetime.datetime]
|
||||
@ -142,7 +142,7 @@ class UnitTorqueConversion:
|
||||
if isinstance(_status, Unset):
|
||||
status = UNSET
|
||||
else:
|
||||
status = ApiCallStatus(_status)
|
||||
status = _status # type: ignore[arg-type]
|
||||
|
||||
_updated_at = d.pop("updated_at", UNSET)
|
||||
updated_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
|
||||
|
||||
Q = TypeVar("Q", bound="UnitVolumeConversion")
|
||||
F = TypeVar("F", bound="UnitVolumeConversion")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -87,7 +87,7 @@ class UnitVolumeConversion:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[Q], src_dict: Dict[str, Any]) -> Q:
|
||||
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]
|
||||
@ -119,7 +119,7 @@ class UnitVolumeConversion:
|
||||
if isinstance(_input_unit, Unset):
|
||||
input_unit = UNSET
|
||||
else:
|
||||
input_unit = UnitVolume(_input_unit)
|
||||
input_unit = _input_unit # type: ignore[arg-type]
|
||||
|
||||
output = d.pop("output", UNSET)
|
||||
|
||||
@ -128,7 +128,7 @@ class UnitVolumeConversion:
|
||||
if isinstance(_output_unit, Unset):
|
||||
output_unit = UNSET
|
||||
else:
|
||||
output_unit = UnitVolume(_output_unit)
|
||||
output_unit = _output_unit # type: ignore[arg-type]
|
||||
|
||||
_started_at = d.pop("started_at", UNSET)
|
||||
started_at: Union[Unset, datetime.datetime]
|
||||
@ -142,7 +142,7 @@ class UnitVolumeConversion:
|
||||
if isinstance(_status, Unset):
|
||||
status = UNSET
|
||||
else:
|
||||
status = ApiCallStatus(_status)
|
||||
status = _status # type: ignore[arg-type]
|
||||
|
||||
_updated_at = d.pop("updated_at", UNSET)
|
||||
updated_at: Union[Unset, datetime.datetime]
|
||||
|
||||
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
F = TypeVar("F", bound="UpdateUser")
|
||||
P = TypeVar("P", bound="UpdateUser")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -47,7 +47,7 @@ class UpdateUser:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[F], src_dict: Dict[str, Any]) -> F:
|
||||
def from_dict(cls: Type[P], src_dict: Dict[str, Any]) -> P:
|
||||
d = src_dict.copy()
|
||||
company = d.pop("company", UNSET)
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ from dateutil.parser import isoparse
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
D = TypeVar("D", bound="User")
|
||||
Y = TypeVar("Y", bound="User")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -83,7 +83,7 @@ class User:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[D], src_dict: Dict[str, Any]) -> D:
|
||||
def from_dict(cls: Type[Y], src_dict: Dict[str, Any]) -> Y:
|
||||
d = src_dict.copy()
|
||||
company = d.pop("company", UNSET)
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
J = TypeVar("J", bound="UserResultsPage")
|
||||
L = TypeVar("L", bound="UserResultsPage")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -37,7 +37,7 @@ class UserResultsPage:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[J], src_dict: Dict[str, Any]) -> J:
|
||||
def from_dict(cls: Type[L], src_dict: Dict[str, Any]) -> L:
|
||||
d = src_dict.copy()
|
||||
from ..models.user import User
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ from dateutil.parser import isoparse
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
F = TypeVar("F", bound="VerificationToken")
|
||||
K = TypeVar("K", bound="VerificationToken")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -53,7 +53,7 @@ class VerificationToken:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[F], src_dict: Dict[str, Any]) -> F:
|
||||
def from_dict(cls: Type[K], src_dict: Dict[str, Any]) -> K:
|
||||
d = src_dict.copy()
|
||||
_created_at = d.pop("created_at", UNSET)
|
||||
created_at: Union[Unset, datetime.datetime]
|
||||
|
||||
Reference in New Issue
Block a user