Example
{'event_type': 'private_incident.action_updated_v1', 'private_incident.action_updated_v1': {'id': 'abc123'}}
Attributes:
Name |
Type |
Description |
event_type |
WebhooksPrivateIncidentActionUpdatedV1ResponseBodyEventType
|
What type of event is this webhook
for? Example: private_incident.action_updated_v1.
|
private_incident_action_updated_v1 |
WebhookPrivateResourceV2
|
Example: {'id': 'abc123'}.
|
Source code in incident_io_client/models/webhooks_private_incident_action_updated_v1_response_body.py
| @_attrs_define
class WebhooksPrivateIncidentActionUpdatedV1ResponseBody:
"""
Example:
{'event_type': 'private_incident.action_updated_v1', 'private_incident.action_updated_v1': {'id': 'abc123'}}
Attributes:
event_type (WebhooksPrivateIncidentActionUpdatedV1ResponseBodyEventType): What type of event is this webhook
for? Example: private_incident.action_updated_v1.
private_incident_action_updated_v1 (WebhookPrivateResourceV2): Example: {'id': 'abc123'}.
"""
event_type: WebhooksPrivateIncidentActionUpdatedV1ResponseBodyEventType
private_incident_action_updated_v1: "WebhookPrivateResourceV2"
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
def to_dict(self) -> Dict[str, Any]:
event_type = self.event_type.value
private_incident_action_updated_v1 = self.private_incident_action_updated_v1.to_dict()
field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update(
{
"event_type": event_type,
"private_incident.action_updated_v1": private_incident_action_updated_v1,
}
)
return field_dict
@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
from ..models.webhook_private_resource_v2 import WebhookPrivateResourceV2
d = src_dict.copy()
event_type = WebhooksPrivateIncidentActionUpdatedV1ResponseBodyEventType(
d.pop("event_type")
)
private_incident_action_updated_v1 = WebhookPrivateResourceV2.from_dict(
d.pop("private_incident.action_updated_v1")
)
webhooks_private_incident_action_updated_v1_response_body = cls(
event_type=event_type,
private_incident_action_updated_v1=private_incident_action_updated_v1,
)
webhooks_private_incident_action_updated_v1_response_body.additional_properties = d
return webhooks_private_incident_action_updated_v1_response_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
|