Source code for modelz.openapi.sdk.models.user_profile

from typing import Any, Dict, List, Type, TypeVar, Union

from attrs import define as _attrs_define
from attrs import field as _attrs_field

from ..types import UNSET, Unset

T = TypeVar("T", bound="UserProfile")


[docs]@_attrs_define class UserProfile: """ Attributes: avatar_url (Union[Unset, str]): email (Union[Unset, str]): full_name (Union[Unset, str]): id (Union[Unset, str]): """ avatar_url: Union[Unset, str] = UNSET email: Union[Unset, str] = UNSET full_name: Union[Unset, str] = UNSET id: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: avatar_url = self.avatar_url email = self.email full_name = self.full_name id = self.id field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if avatar_url is not UNSET: field_dict["avatar_url"] = avatar_url if email is not UNSET: field_dict["email"] = email if full_name is not UNSET: field_dict["full_name"] = full_name if id is not UNSET: field_dict["id"] = id return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() avatar_url = d.pop("avatar_url", UNSET) email = d.pop("email", UNSET) full_name = d.pop("full_name", UNSET) id = d.pop("id", UNSET) user_profile = cls( avatar_url=avatar_url, email=email, full_name=full_name, id=id, ) user_profile.additional_properties = d return user_profile @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