Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50211,9 +50211,19 @@ components:
properties:
attributes:
$ref: "#/components/schemas/EventAttributes"
host:
description: The host associated with the event.
example: "example-host"
type: string
message:
description: The message of the event.
type: string
service:
description: The service associated with the event.
example: "example-service"
type: string
status:
$ref: "#/components/schemas/EventStatusType"
tags:
description: An array of tags associated with the event.
example: ["team:A"]
Expand Down Expand Up @@ -187677,7 +187687,10 @@ paths:
value:
data:
- attributes:
host: "example-host"
message: "Test event"
service: "example-service"
status: "info"
tags:
- "env:prod"
timestamp: "2019-01-02T09:42:36.320Z"
Expand Down Expand Up @@ -187894,7 +187907,10 @@ paths:
value:
data:
- attributes:
host: "example-host"
message: "Test event"
service: "example-service"
status: "info"
tags:
- "env:prod"
timestamp: "2019-01-02T09:42:36.320Z"
Expand Down
28 changes: 28 additions & 0 deletions src/datadog_api_client/v2/model/event_response_attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,42 @@

if TYPE_CHECKING:
from datadog_api_client.v2.model.event_attributes import EventAttributes
from datadog_api_client.v2.model.event_status_type import EventStatusType


class EventResponseAttributes(ModelNormal):
@cached_property
def openapi_types(_):
from datadog_api_client.v2.model.event_attributes import EventAttributes
from datadog_api_client.v2.model.event_status_type import EventStatusType

return {
"attributes": (EventAttributes,),
"host": (str,),
"message": (str,),
"service": (str,),
"status": (EventStatusType,),
"tags": ([str],),
"timestamp": (datetime,),
}

attribute_map = {
"attributes": "attributes",
"host": "host",
"message": "message",
"service": "service",
"status": "status",
"tags": "tags",
"timestamp": "timestamp",
}

def __init__(
self_,
attributes: Union[EventAttributes, UnsetType] = unset,
host: Union[str, UnsetType] = unset,
message: Union[str, UnsetType] = unset,
service: Union[str, UnsetType] = unset,
status: Union[EventStatusType, UnsetType] = unset,
tags: Union[List[str], UnsetType] = unset,
timestamp: Union[datetime, UnsetType] = unset,
**kwargs,
Expand All @@ -51,9 +62,20 @@ def __init__(
:param attributes: Object description of attributes from your event.
:type attributes: EventAttributes, optional

:param host: The host associated with the event.
:type host: str, optional

:param message: The message of the event.
:type message: str, optional

:param service: The service associated with the event.
:type service: str, optional

:param status: The event status. Legacy events can use ``failure`` , ``error`` , ``warning`` ,
``info`` , ``success`` , ``user_update`` , ``recommendation`` , or ``snapshot``.
Alert events can use ``error`` , ``warn`` , or ``ok``.
:type status: EventStatusType, optional

:param tags: An array of tags associated with the event.
:type tags: [str], optional

Expand All @@ -62,8 +84,14 @@ def __init__(
"""
if attributes is not unset:
kwargs["attributes"] = attributes
if host is not unset:
kwargs["host"] = host
if message is not unset:
kwargs["message"] = message
if service is not unset:
kwargs["service"] = service
if status is not unset:
kwargs["status"] = status
if tags is not unset:
kwargs["tags"] = tags
if timestamp is not unset:
Expand Down
Loading