from typing import ( TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast, ) import attr from ..types import UNSET, Unset T = TypeVar("T", bound="MetaCampaignEngagementAudience") @attr.s(auto_attribs=True) class MetaCampaignEngagementAudience: """ Attributes: id (str): lower_bound (int): upper_bound (int): event_ids (List[str]): """ id: str lower_bound: int upper_bound: int event_ids: List[str] additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: id = self.id lower_bound = self.lower_bound upper_bound = self.upper_bound event_ids = self.event_ids field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "id": id, "lowerBound": lower_bound, "upperBound": upper_bound, "eventIds": event_ids, } ) return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() id = d.pop("id") lower_bound = d.pop("lowerBound") upper_bound = d.pop("upperBound") event_ids = cast(List[str], d.pop("eventIds")) meta_campaign_engagement_audience = cls( id=id, lower_bound=lower_bound, upper_bound=upper_bound, event_ids=event_ids, ) meta_campaign_engagement_audience.additional_properties = d return meta_campaign_engagement_audience @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