Example
{'incident_id': '01FCNDV6P870EA6S7TK1DSYD5H', 'user_id': '01FCQSP07Z74QMMYPDDGQB9FTG'}
Attributes:
Name |
Type |
Description |
incident_id |
str
|
Revoke memberships to incident Example: 01FCNDV6P870EA6S7TK1DSYD5H.
|
user_id |
str
|
Example: 01FCQSP07Z74QMMYPDDGQB9FTG.
|
Source code in incident_io_client/models/incident_memberships_v1_revoke_request_body.py
| @_attrs_define
class IncidentMembershipsV1RevokeRequestBody:
"""
Example:
{'incident_id': '01FCNDV6P870EA6S7TK1DSYD5H', 'user_id': '01FCQSP07Z74QMMYPDDGQB9FTG'}
Attributes:
incident_id (str): Revoke memberships to incident Example: 01FCNDV6P870EA6S7TK1DSYD5H.
user_id (str): Example: 01FCQSP07Z74QMMYPDDGQB9FTG.
"""
incident_id: str
user_id: str
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
incident_id = self.incident_id
user_id = self.user_id
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"incident_id": incident_id,
"user_id": user_id,
}
)
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
d = src_dict.copy()
incident_id = d.pop("incident_id")
user_id = d.pop("user_id")
incident_memberships_v1_revoke_request_body = cls(
incident_id=incident_id,
user_id=user_id,
)
incident_memberships_v1_revoke_request_body.additional_properties = d
return incident_memberships_v1_revoke_request_body
@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
|