2023-05-04 00:58:06 -07:00
|
|
|
from typing import Any, Dict, List, Type, TypeVar, Union
|
2022-09-29 21:52:21 +00:00
|
|
|
|
|
|
|
import attr
|
|
|
|
|
|
|
|
from ..types import UNSET, Unset
|
|
|
|
|
2023-11-28 14:29:16 -08:00
|
|
|
VO = TypeVar("VO", bound="Onboarding")
|
2023-11-27 16:01:20 -08:00
|
|
|
|
2022-09-29 21:52:21 +00:00
|
|
|
|
|
|
|
@attr.s(auto_attribs=True)
|
|
|
|
class Onboarding:
|
2023-11-27 16:01:20 -08:00
|
|
|
"""Onboarding details""" # noqa: E501
|
2023-05-04 00:58:06 -07:00
|
|
|
|
2023-11-27 16:01:20 -08:00
|
|
|
first_call_from__their_machine_date: Union[Unset, str] = UNSET
|
|
|
|
first_litterbox_execute_date: Union[Unset, str] = UNSET
|
|
|
|
first_token_date: Union[Unset, str] = UNSET
|
2022-09-29 21:52:21 +00:00
|
|
|
|
2023-11-27 16:01:20 -08:00
|
|
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
2022-09-29 21:52:21 +00:00
|
|
|
|
2023-11-27 16:01:20 -08:00
|
|
|
def to_dict(self) -> Dict[str, Any]:
|
|
|
|
first_call_from__their_machine_date = self.first_call_from__their_machine_date
|
|
|
|
first_litterbox_execute_date = self.first_litterbox_execute_date
|
|
|
|
first_token_date = self.first_token_date
|
2022-09-29 21:52:21 +00:00
|
|
|
|
2023-11-27 16:01:20 -08:00
|
|
|
field_dict: Dict[str, Any] = {}
|
|
|
|
field_dict.update(self.additional_properties)
|
|
|
|
field_dict.update({})
|
|
|
|
if first_call_from__their_machine_date is not UNSET:
|
|
|
|
field_dict[
|
|
|
|
"first_call_from_their_machine_date"
|
|
|
|
] = first_call_from__their_machine_date
|
|
|
|
if first_litterbox_execute_date is not UNSET:
|
|
|
|
field_dict["first_litterbox_execute_date"] = first_litterbox_execute_date
|
|
|
|
if first_token_date is not UNSET:
|
|
|
|
field_dict["first_token_date"] = first_token_date
|
2022-09-29 21:52:21 +00:00
|
|
|
|
2023-11-27 16:01:20 -08:00
|
|
|
return field_dict
|
2022-09-29 21:52:21 +00:00
|
|
|
|
2023-11-27 16:01:20 -08:00
|
|
|
@classmethod
|
2023-11-28 14:29:16 -08:00
|
|
|
def from_dict(cls: Type[VO], src_dict: Dict[str, Any]) -> VO:
|
2023-11-27 16:01:20 -08:00
|
|
|
d = src_dict.copy()
|
|
|
|
first_call_from__their_machine_date = d.pop(
|
|
|
|
"first_call_from_their_machine_date", UNSET
|
|
|
|
)
|
2022-09-29 21:52:21 +00:00
|
|
|
|
2023-11-27 16:01:20 -08:00
|
|
|
first_litterbox_execute_date = d.pop("first_litterbox_execute_date", UNSET)
|
2022-09-29 21:52:21 +00:00
|
|
|
|
2023-11-27 16:01:20 -08:00
|
|
|
first_token_date = d.pop("first_token_date", UNSET)
|
2022-09-29 21:52:21 +00:00
|
|
|
|
2023-11-27 16:01:20 -08:00
|
|
|
onboarding = cls(
|
|
|
|
first_call_from__their_machine_date=first_call_from__their_machine_date,
|
|
|
|
first_litterbox_execute_date=first_litterbox_execute_date,
|
|
|
|
first_token_date=first_token_date,
|
|
|
|
)
|
2022-09-29 21:52:21 +00:00
|
|
|
|
2023-11-27 16:01:20 -08:00
|
|
|
onboarding.additional_properties = d
|
|
|
|
return onboarding
|
2022-09-29 21:52:21 +00:00
|
|
|
|
2023-11-27 16:01:20 -08:00
|
|
|
@property
|
|
|
|
def additional_keys(self) -> List[str]:
|
|
|
|
return list(self.additional_properties.keys())
|
2022-09-29 21:52:21 +00:00
|
|
|
|
2023-11-27 16:01:20 -08:00
|
|
|
def __getitem__(self, key: str) -> Any:
|
|
|
|
return self.additional_properties[key]
|
2022-09-29 21:52:21 +00:00
|
|
|
|
2023-11-27 16:01:20 -08:00
|
|
|
def __setitem__(self, key: str, value: Any) -> None:
|
|
|
|
self.additional_properties[key] = value
|
2022-09-29 21:52:21 +00:00
|
|
|
|
2023-11-27 16:01:20 -08:00
|
|
|
def __delitem__(self, key: str) -> None:
|
|
|
|
del self.additional_properties[key]
|
2022-09-29 21:52:21 +00:00
|
|
|
|
2023-11-27 16:01:20 -08:00
|
|
|
def __contains__(self, key: str) -> bool:
|
|
|
|
return key in self.additional_properties
|