Files
kittycad.py/kittycad/models/import_files.py
Jess Frazelle 036965255a Update api spec (#157)
* YOYO NEW API SPEC!

* I have generated the latest API!

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-10-12 11:02:59 -05:00

55 lines
1.3 KiB
Python

from typing import Any, Dict, List, Type, TypeVar, Union
import attr
from ..types import UNSET, Unset
EN = TypeVar("EN", bound="ImportFiles")
@attr.s(auto_attribs=True)
class ImportFiles:
""" Data from importing the files """ # noqa: E501
object_id: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
object_id = self.object_id
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if object_id is not UNSET:
field_dict['object_id'] = object_id
return field_dict
@classmethod
def from_dict(cls: Type[EN], src_dict: Dict[str, Any]) -> EN:
d = src_dict.copy()
object_id = d.pop("object_id", UNSET)
import_files = cls(
object_id= object_id,
)
import_files.additional_properties = d
return import_files
@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