Fixes (#115)
* regenerate Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes and cleanup 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:
@ -1,5 +1,5 @@
|
||||
import datetime
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
||||
|
||||
import attr
|
||||
from dateutil.parser import isoparse
|
||||
@ -9,10 +9,16 @@ from ..models.file_export_format import FileExportFormat
|
||||
from ..models.file_import_format import FileImportFormat
|
||||
from ..models.input_format import InputFormat
|
||||
from ..models.output_format import OutputFormat
|
||||
from ..models.point3d import Point3d
|
||||
from ..models.unit_area import UnitArea
|
||||
from ..models.unit_density import UnitDensity
|
||||
from ..models.unit_length import UnitLength
|
||||
from ..models.unit_mass import UnitMass
|
||||
from ..models.unit_volume import UnitVolume
|
||||
from ..models.uuid import Uuid
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
F = TypeVar("F", bound="FileConversion")
|
||||
LB = TypeVar("LB", bound="FileConversion")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -104,7 +110,7 @@ class FileConversion:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[F], src_dict: Dict[str, Any]) -> F:
|
||||
def from_dict(cls: Type[LB], src_dict: Dict[str, Any]) -> LB:
|
||||
d = src_dict.copy()
|
||||
_completed_at = d.pop("completed_at", UNSET)
|
||||
completed_at: Union[Unset, datetime.datetime]
|
||||
@ -127,7 +133,7 @@ class FileConversion:
|
||||
if isinstance(_id, Unset):
|
||||
id = UNSET
|
||||
else:
|
||||
id = Uuid(_id)
|
||||
id = _id # type: ignore[arg-type]
|
||||
|
||||
output = d.pop("output", UNSET)
|
||||
|
||||
@ -143,7 +149,7 @@ class FileConversion:
|
||||
if isinstance(_output_format_options, Unset):
|
||||
output_format_options = UNSET
|
||||
else:
|
||||
output_format_options = OutputFormat(_output_format_options)
|
||||
output_format_options = _output_format_options # type: ignore[arg-type]
|
||||
|
||||
outputs = d.pop("outputs", UNSET)
|
||||
_src_format = d.pop("src_format", UNSET)
|
||||
@ -158,7 +164,7 @@ class FileConversion:
|
||||
if isinstance(_src_format_options, Unset):
|
||||
src_format_options = UNSET
|
||||
else:
|
||||
src_format_options = InputFormat(_src_format_options)
|
||||
src_format_options = _src_format_options # type: ignore[arg-type]
|
||||
|
||||
_started_at = d.pop("started_at", UNSET)
|
||||
started_at: Union[Unset, datetime.datetime]
|
||||
@ -223,18 +229,20 @@ class FileConversion:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
B = TypeVar("B", bound="FileCenterOfMass")
|
||||
NE = TypeVar("NE", bound="FileCenterOfMass")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class FileCenterOfMass:
|
||||
"""File center of mass.""" # noqa: E501
|
||||
|
||||
center_of_mass: Union[Unset, List[float]] = UNSET
|
||||
center_of_mass: Union[Unset, Point3d] = UNSET
|
||||
centers_of_mass: Union[Unset, Any] = UNSET
|
||||
completed_at: Union[Unset, datetime.datetime] = UNSET
|
||||
created_at: Union[Unset, datetime.datetime] = UNSET
|
||||
error: Union[Unset, str] = UNSET
|
||||
id: Union[Unset, str] = UNSET
|
||||
output_unit: Union[Unset, UnitLength] = UNSET
|
||||
src_format: Union[Unset, FileImportFormat] = UNSET
|
||||
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
@ -245,9 +253,9 @@ class FileCenterOfMass:
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
center_of_mass: Union[Unset, List[float]] = UNSET
|
||||
if not isinstance(self.center_of_mass, Unset):
|
||||
center_of_mass = self.center_of_mass
|
||||
centers_of_mass = self.centers_of_mass
|
||||
completed_at: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.completed_at, Unset):
|
||||
completed_at = self.completed_at.isoformat()
|
||||
@ -256,6 +264,8 @@ class FileCenterOfMass:
|
||||
created_at = self.created_at.isoformat()
|
||||
error = self.error
|
||||
id = self.id
|
||||
if not isinstance(self.output_unit, Unset):
|
||||
output_unit = self.output_unit
|
||||
if not isinstance(self.src_format, Unset):
|
||||
src_format = self.src_format
|
||||
started_at: Union[Unset, str] = UNSET
|
||||
@ -274,6 +284,8 @@ class FileCenterOfMass:
|
||||
field_dict.update({})
|
||||
if center_of_mass is not UNSET:
|
||||
field_dict["center_of_mass"] = center_of_mass
|
||||
if centers_of_mass is not UNSET:
|
||||
field_dict["centers_of_mass"] = centers_of_mass
|
||||
if completed_at is not UNSET:
|
||||
field_dict["completed_at"] = completed_at
|
||||
if created_at is not UNSET:
|
||||
@ -282,6 +294,8 @@ class FileCenterOfMass:
|
||||
field_dict["error"] = error
|
||||
if id is not UNSET:
|
||||
field_dict["id"] = id
|
||||
if output_unit is not UNSET:
|
||||
field_dict["output_unit"] = output_unit
|
||||
if src_format is not UNSET:
|
||||
field_dict["src_format"] = src_format
|
||||
if started_at is not UNSET:
|
||||
@ -298,10 +312,16 @@ class FileCenterOfMass:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[B], src_dict: Dict[str, Any]) -> B:
|
||||
def from_dict(cls: Type[NE], src_dict: Dict[str, Any]) -> NE:
|
||||
d = src_dict.copy()
|
||||
center_of_mass = cast(List[float], d.pop("center_of_mass", UNSET))
|
||||
_center_of_mass = d.pop("center_of_mass", UNSET)
|
||||
center_of_mass: Union[Unset, Point3d]
|
||||
if isinstance(_center_of_mass, Unset):
|
||||
center_of_mass = UNSET
|
||||
else:
|
||||
center_of_mass = _center_of_mass # type: ignore[arg-type]
|
||||
|
||||
centers_of_mass = d.pop("centers_of_mass", UNSET)
|
||||
_completed_at = d.pop("completed_at", UNSET)
|
||||
completed_at: Union[Unset, datetime.datetime]
|
||||
if isinstance(_completed_at, Unset):
|
||||
@ -323,7 +343,14 @@ class FileCenterOfMass:
|
||||
if isinstance(_id, Unset):
|
||||
id = UNSET
|
||||
else:
|
||||
id = Uuid(_id)
|
||||
id = _id # type: ignore[arg-type]
|
||||
|
||||
_output_unit = d.pop("output_unit", UNSET)
|
||||
output_unit: Union[Unset, UnitLength]
|
||||
if isinstance(_output_unit, Unset):
|
||||
output_unit = UNSET
|
||||
else:
|
||||
output_unit = _output_unit # type: ignore[arg-type]
|
||||
|
||||
_src_format = d.pop("src_format", UNSET)
|
||||
src_format: Union[Unset, FileImportFormat]
|
||||
@ -359,10 +386,12 @@ class FileCenterOfMass:
|
||||
|
||||
file_center_of_mass = cls(
|
||||
center_of_mass=center_of_mass,
|
||||
centers_of_mass=centers_of_mass,
|
||||
completed_at=completed_at,
|
||||
created_at=created_at,
|
||||
error=error,
|
||||
id=id,
|
||||
output_unit=output_unit,
|
||||
src_format=src_format,
|
||||
started_at=started_at,
|
||||
status=status,
|
||||
@ -391,7 +420,7 @@ class FileCenterOfMass:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
Q = TypeVar("Q", bound="FileMass")
|
||||
TL = TypeVar("TL", bound="FileMass")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -403,7 +432,10 @@ class FileMass:
|
||||
error: Union[Unset, str] = UNSET
|
||||
id: Union[Unset, str] = UNSET
|
||||
mass: Union[Unset, float] = UNSET
|
||||
masses: Union[Unset, Any] = UNSET
|
||||
material_density: Union[Unset, float] = UNSET
|
||||
material_density_unit: Union[Unset, UnitDensity] = UNSET
|
||||
output_unit: Union[Unset, UnitMass] = UNSET
|
||||
src_format: Union[Unset, FileImportFormat] = UNSET
|
||||
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
@ -423,7 +455,12 @@ class FileMass:
|
||||
error = self.error
|
||||
id = self.id
|
||||
mass = self.mass
|
||||
masses = self.masses
|
||||
material_density = self.material_density
|
||||
if not isinstance(self.material_density_unit, Unset):
|
||||
material_density_unit = self.material_density_unit
|
||||
if not isinstance(self.output_unit, Unset):
|
||||
output_unit = self.output_unit
|
||||
if not isinstance(self.src_format, Unset):
|
||||
src_format = self.src_format
|
||||
started_at: Union[Unset, str] = UNSET
|
||||
@ -450,8 +487,14 @@ class FileMass:
|
||||
field_dict["id"] = id
|
||||
if mass is not UNSET:
|
||||
field_dict["mass"] = mass
|
||||
if masses is not UNSET:
|
||||
field_dict["masses"] = masses
|
||||
if material_density is not UNSET:
|
||||
field_dict["material_density"] = material_density
|
||||
if material_density_unit is not UNSET:
|
||||
field_dict["material_density_unit"] = material_density_unit
|
||||
if output_unit is not UNSET:
|
||||
field_dict["output_unit"] = output_unit
|
||||
if src_format is not UNSET:
|
||||
field_dict["src_format"] = src_format
|
||||
if started_at is not UNSET:
|
||||
@ -468,7 +511,7 @@ class FileMass:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[Q], src_dict: Dict[str, Any]) -> Q:
|
||||
def from_dict(cls: Type[TL], src_dict: Dict[str, Any]) -> TL:
|
||||
d = src_dict.copy()
|
||||
_completed_at = d.pop("completed_at", UNSET)
|
||||
completed_at: Union[Unset, datetime.datetime]
|
||||
@ -491,12 +534,27 @@ class FileMass:
|
||||
if isinstance(_id, Unset):
|
||||
id = UNSET
|
||||
else:
|
||||
id = Uuid(_id)
|
||||
id = _id # type: ignore[arg-type]
|
||||
|
||||
mass = d.pop("mass", UNSET)
|
||||
|
||||
masses = d.pop("masses", UNSET)
|
||||
material_density = d.pop("material_density", UNSET)
|
||||
|
||||
_material_density_unit = d.pop("material_density_unit", UNSET)
|
||||
material_density_unit: Union[Unset, UnitDensity]
|
||||
if isinstance(_material_density_unit, Unset):
|
||||
material_density_unit = UNSET
|
||||
else:
|
||||
material_density_unit = _material_density_unit # type: ignore[arg-type]
|
||||
|
||||
_output_unit = d.pop("output_unit", UNSET)
|
||||
output_unit: Union[Unset, UnitMass]
|
||||
if isinstance(_output_unit, Unset):
|
||||
output_unit = UNSET
|
||||
else:
|
||||
output_unit = _output_unit # type: ignore[arg-type]
|
||||
|
||||
_src_format = d.pop("src_format", UNSET)
|
||||
src_format: Union[Unset, FileImportFormat]
|
||||
if isinstance(_src_format, Unset):
|
||||
@ -535,7 +593,10 @@ class FileMass:
|
||||
error=error,
|
||||
id=id,
|
||||
mass=mass,
|
||||
masses=masses,
|
||||
material_density=material_density,
|
||||
material_density_unit=material_density_unit,
|
||||
output_unit=output_unit,
|
||||
src_format=src_format,
|
||||
started_at=started_at,
|
||||
status=status,
|
||||
@ -564,7 +625,7 @@ class FileMass:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
P = TypeVar("P", bound="FileVolume")
|
||||
MN = TypeVar("MN", bound="FileVolume")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -575,6 +636,7 @@ class FileVolume:
|
||||
created_at: Union[Unset, datetime.datetime] = UNSET
|
||||
error: Union[Unset, str] = UNSET
|
||||
id: Union[Unset, str] = UNSET
|
||||
output_unit: Union[Unset, UnitVolume] = UNSET
|
||||
src_format: Union[Unset, FileImportFormat] = UNSET
|
||||
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
@ -582,6 +644,7 @@ class FileVolume:
|
||||
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||
user_id: Union[Unset, str] = UNSET
|
||||
volume: Union[Unset, float] = UNSET
|
||||
volumes: Union[Unset, Any] = UNSET
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
@ -594,6 +657,8 @@ class FileVolume:
|
||||
created_at = self.created_at.isoformat()
|
||||
error = self.error
|
||||
id = self.id
|
||||
if not isinstance(self.output_unit, Unset):
|
||||
output_unit = self.output_unit
|
||||
if not isinstance(self.src_format, Unset):
|
||||
src_format = self.src_format
|
||||
started_at: Union[Unset, str] = UNSET
|
||||
@ -607,6 +672,7 @@ class FileVolume:
|
||||
updated_at = self.updated_at.isoformat()
|
||||
user_id = self.user_id
|
||||
volume = self.volume
|
||||
volumes = self.volumes
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
@ -619,6 +685,8 @@ class FileVolume:
|
||||
field_dict["error"] = error
|
||||
if id is not UNSET:
|
||||
field_dict["id"] = id
|
||||
if output_unit is not UNSET:
|
||||
field_dict["output_unit"] = output_unit
|
||||
if src_format is not UNSET:
|
||||
field_dict["src_format"] = src_format
|
||||
if started_at is not UNSET:
|
||||
@ -633,11 +701,13 @@ class FileVolume:
|
||||
field_dict["user_id"] = user_id
|
||||
if volume is not UNSET:
|
||||
field_dict["volume"] = volume
|
||||
if volumes is not UNSET:
|
||||
field_dict["volumes"] = volumes
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[P], src_dict: Dict[str, Any]) -> P:
|
||||
def from_dict(cls: Type[MN], src_dict: Dict[str, Any]) -> MN:
|
||||
d = src_dict.copy()
|
||||
_completed_at = d.pop("completed_at", UNSET)
|
||||
completed_at: Union[Unset, datetime.datetime]
|
||||
@ -660,7 +730,14 @@ class FileVolume:
|
||||
if isinstance(_id, Unset):
|
||||
id = UNSET
|
||||
else:
|
||||
id = Uuid(_id)
|
||||
id = _id # type: ignore[arg-type]
|
||||
|
||||
_output_unit = d.pop("output_unit", UNSET)
|
||||
output_unit: Union[Unset, UnitVolume]
|
||||
if isinstance(_output_unit, Unset):
|
||||
output_unit = UNSET
|
||||
else:
|
||||
output_unit = _output_unit # type: ignore[arg-type]
|
||||
|
||||
_src_format = d.pop("src_format", UNSET)
|
||||
src_format: Union[Unset, FileImportFormat]
|
||||
@ -696,11 +773,14 @@ class FileVolume:
|
||||
|
||||
volume = d.pop("volume", UNSET)
|
||||
|
||||
volumes = d.pop("volumes", UNSET)
|
||||
|
||||
file_volume = cls(
|
||||
completed_at=completed_at,
|
||||
created_at=created_at,
|
||||
error=error,
|
||||
id=id,
|
||||
output_unit=output_unit,
|
||||
src_format=src_format,
|
||||
started_at=started_at,
|
||||
status=status,
|
||||
@ -708,6 +788,7 @@ class FileVolume:
|
||||
updated_at=updated_at,
|
||||
user_id=user_id,
|
||||
volume=volume,
|
||||
volumes=volumes,
|
||||
)
|
||||
|
||||
file_volume.additional_properties = d
|
||||
@ -730,7 +811,7 @@ class FileVolume:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
K = TypeVar("K", bound="FileDensity")
|
||||
JV = TypeVar("JV", bound="FileDensity")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -739,10 +820,13 @@ class FileDensity:
|
||||
|
||||
completed_at: Union[Unset, datetime.datetime] = UNSET
|
||||
created_at: Union[Unset, datetime.datetime] = UNSET
|
||||
densities: Union[Unset, Any] = UNSET
|
||||
density: Union[Unset, float] = UNSET
|
||||
error: Union[Unset, str] = UNSET
|
||||
id: Union[Unset, str] = UNSET
|
||||
material_mass: Union[Unset, float] = UNSET
|
||||
material_mass_unit: Union[Unset, UnitMass] = UNSET
|
||||
output_unit: Union[Unset, UnitDensity] = UNSET
|
||||
src_format: Union[Unset, FileImportFormat] = UNSET
|
||||
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
@ -759,10 +843,15 @@ class FileDensity:
|
||||
created_at: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.created_at, Unset):
|
||||
created_at = self.created_at.isoformat()
|
||||
densities = self.densities
|
||||
density = self.density
|
||||
error = self.error
|
||||
id = self.id
|
||||
material_mass = self.material_mass
|
||||
if not isinstance(self.material_mass_unit, Unset):
|
||||
material_mass_unit = self.material_mass_unit
|
||||
if not isinstance(self.output_unit, Unset):
|
||||
output_unit = self.output_unit
|
||||
if not isinstance(self.src_format, Unset):
|
||||
src_format = self.src_format
|
||||
started_at: Union[Unset, str] = UNSET
|
||||
@ -783,6 +872,8 @@ class FileDensity:
|
||||
field_dict["completed_at"] = completed_at
|
||||
if created_at is not UNSET:
|
||||
field_dict["created_at"] = created_at
|
||||
if densities is not UNSET:
|
||||
field_dict["densities"] = densities
|
||||
if density is not UNSET:
|
||||
field_dict["density"] = density
|
||||
if error is not UNSET:
|
||||
@ -791,6 +882,10 @@ class FileDensity:
|
||||
field_dict["id"] = id
|
||||
if material_mass is not UNSET:
|
||||
field_dict["material_mass"] = material_mass
|
||||
if material_mass_unit is not UNSET:
|
||||
field_dict["material_mass_unit"] = material_mass_unit
|
||||
if output_unit is not UNSET:
|
||||
field_dict["output_unit"] = output_unit
|
||||
if src_format is not UNSET:
|
||||
field_dict["src_format"] = src_format
|
||||
if started_at is not UNSET:
|
||||
@ -807,7 +902,7 @@ class FileDensity:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[K], src_dict: Dict[str, Any]) -> K:
|
||||
def from_dict(cls: Type[JV], src_dict: Dict[str, Any]) -> JV:
|
||||
d = src_dict.copy()
|
||||
_completed_at = d.pop("completed_at", UNSET)
|
||||
completed_at: Union[Unset, datetime.datetime]
|
||||
@ -823,6 +918,7 @@ class FileDensity:
|
||||
else:
|
||||
created_at = isoparse(_created_at)
|
||||
|
||||
densities = d.pop("densities", UNSET)
|
||||
density = d.pop("density", UNSET)
|
||||
|
||||
error = d.pop("error", UNSET)
|
||||
@ -832,10 +928,24 @@ class FileDensity:
|
||||
if isinstance(_id, Unset):
|
||||
id = UNSET
|
||||
else:
|
||||
id = Uuid(_id)
|
||||
id = _id # type: ignore[arg-type]
|
||||
|
||||
material_mass = d.pop("material_mass", UNSET)
|
||||
|
||||
_material_mass_unit = d.pop("material_mass_unit", UNSET)
|
||||
material_mass_unit: Union[Unset, UnitMass]
|
||||
if isinstance(_material_mass_unit, Unset):
|
||||
material_mass_unit = UNSET
|
||||
else:
|
||||
material_mass_unit = _material_mass_unit # type: ignore[arg-type]
|
||||
|
||||
_output_unit = d.pop("output_unit", UNSET)
|
||||
output_unit: Union[Unset, UnitDensity]
|
||||
if isinstance(_output_unit, Unset):
|
||||
output_unit = UNSET
|
||||
else:
|
||||
output_unit = _output_unit # type: ignore[arg-type]
|
||||
|
||||
_src_format = d.pop("src_format", UNSET)
|
||||
src_format: Union[Unset, FileImportFormat]
|
||||
if isinstance(_src_format, Unset):
|
||||
@ -871,10 +981,13 @@ class FileDensity:
|
||||
file_density = cls(
|
||||
completed_at=completed_at,
|
||||
created_at=created_at,
|
||||
densities=densities,
|
||||
density=density,
|
||||
error=error,
|
||||
id=id,
|
||||
material_mass=material_mass,
|
||||
material_mass_unit=material_mass_unit,
|
||||
output_unit=output_unit,
|
||||
src_format=src_format,
|
||||
started_at=started_at,
|
||||
status=status,
|
||||
@ -903,7 +1016,7 @@ class FileDensity:
|
||||
return key in self.additional_properties
|
||||
|
||||
|
||||
C = TypeVar("C", bound="FileSurfaceArea")
|
||||
IO = TypeVar("IO", bound="FileSurfaceArea")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
@ -914,10 +1027,12 @@ class FileSurfaceArea:
|
||||
created_at: Union[Unset, datetime.datetime] = UNSET
|
||||
error: Union[Unset, str] = UNSET
|
||||
id: Union[Unset, str] = UNSET
|
||||
output_unit: Union[Unset, UnitArea] = UNSET
|
||||
src_format: Union[Unset, FileImportFormat] = UNSET
|
||||
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
surface_area: Union[Unset, float] = UNSET
|
||||
surface_areas: Union[Unset, Any] = UNSET
|
||||
type: Union[Unset, str] = UNSET
|
||||
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||
user_id: Union[Unset, str] = UNSET
|
||||
@ -933,6 +1048,8 @@ class FileSurfaceArea:
|
||||
created_at = self.created_at.isoformat()
|
||||
error = self.error
|
||||
id = self.id
|
||||
if not isinstance(self.output_unit, Unset):
|
||||
output_unit = self.output_unit
|
||||
if not isinstance(self.src_format, Unset):
|
||||
src_format = self.src_format
|
||||
started_at: Union[Unset, str] = UNSET
|
||||
@ -941,6 +1058,7 @@ class FileSurfaceArea:
|
||||
if not isinstance(self.status, Unset):
|
||||
status = self.status
|
||||
surface_area = self.surface_area
|
||||
surface_areas = self.surface_areas
|
||||
type = self.type
|
||||
updated_at: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.updated_at, Unset):
|
||||
@ -958,6 +1076,8 @@ class FileSurfaceArea:
|
||||
field_dict["error"] = error
|
||||
if id is not UNSET:
|
||||
field_dict["id"] = id
|
||||
if output_unit is not UNSET:
|
||||
field_dict["output_unit"] = output_unit
|
||||
if src_format is not UNSET:
|
||||
field_dict["src_format"] = src_format
|
||||
if started_at is not UNSET:
|
||||
@ -966,6 +1086,8 @@ class FileSurfaceArea:
|
||||
field_dict["status"] = status
|
||||
if surface_area is not UNSET:
|
||||
field_dict["surface_area"] = surface_area
|
||||
if surface_areas is not UNSET:
|
||||
field_dict["surface_areas"] = surface_areas
|
||||
if type is not UNSET:
|
||||
field_dict["type"] = type
|
||||
if updated_at is not UNSET:
|
||||
@ -976,7 +1098,7 @@ class FileSurfaceArea:
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[C], src_dict: Dict[str, Any]) -> C:
|
||||
def from_dict(cls: Type[IO], src_dict: Dict[str, Any]) -> IO:
|
||||
d = src_dict.copy()
|
||||
_completed_at = d.pop("completed_at", UNSET)
|
||||
completed_at: Union[Unset, datetime.datetime]
|
||||
@ -999,7 +1121,14 @@ class FileSurfaceArea:
|
||||
if isinstance(_id, Unset):
|
||||
id = UNSET
|
||||
else:
|
||||
id = Uuid(_id)
|
||||
id = _id # type: ignore[arg-type]
|
||||
|
||||
_output_unit = d.pop("output_unit", UNSET)
|
||||
output_unit: Union[Unset, UnitArea]
|
||||
if isinstance(_output_unit, Unset):
|
||||
output_unit = UNSET
|
||||
else:
|
||||
output_unit = _output_unit # type: ignore[arg-type]
|
||||
|
||||
_src_format = d.pop("src_format", UNSET)
|
||||
src_format: Union[Unset, FileImportFormat]
|
||||
@ -1024,6 +1153,7 @@ class FileSurfaceArea:
|
||||
|
||||
surface_area = d.pop("surface_area", UNSET)
|
||||
|
||||
surface_areas = d.pop("surface_areas", UNSET)
|
||||
type = d.pop("type", UNSET)
|
||||
|
||||
_updated_at = d.pop("updated_at", UNSET)
|
||||
@ -1040,10 +1170,12 @@ class FileSurfaceArea:
|
||||
created_at=created_at,
|
||||
error=error,
|
||||
id=id,
|
||||
output_unit=output_unit,
|
||||
src_format=src_format,
|
||||
started_at=started_at,
|
||||
status=status,
|
||||
surface_area=surface_area,
|
||||
surface_areas=surface_areas,
|
||||
type=type,
|
||||
updated_at=updated_at,
|
||||
user_id=user_id,
|
||||
|
Reference in New Issue
Block a user