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
35 changes: 30 additions & 5 deletions .generator/schemas/v2/openapi.yaml
Original file line numberDiff line numberDiff line change
Expand Up@@ -37460,12 +37460,17 @@ components:
type: integer
type: object
Event:
additionalProperties: {}
description: The metadata associated with a request.
properties:
id:
description: Event ID.
example: "6509751066204996294"
type: string
integration_id:
description: The integration ID of the event.
example: "custom-events"
type: string
name:
description: The event name.
type: string
Expand All@@ -37478,8 +37483,13 @@ components:
description: Event type.
example: "error_tracking_alert"
type: string
uid:
description: A unique identifier for the event. You can use this identifier to query or reference the event.
example: "AaBJ4QimAABPmEWRwc_8yAAA"
type: string
type: object
EventAttributes:
additionalProperties: {}
description: Object description of attributes from your event.
properties:
aggregation_key:
Expand DownExpand Up@@ -37729,16 +37739,27 @@ components:
- CUSTOM_EVENTS
EventPriority:
description: |-
The priority of the event's monitor. For example, `normal` or `low`.
The priority of the event alert. Legacy events use `normal` or `low`.
Alert events use `1` (highest priority) through `5` (lowest priority).
enum:
- normal
- low
- "1"
- "2"
- "3"
- "4"
- "5"
example: "normal"
nullable: true
type: string
x-enum-varnames:
- NORMAL
- LOW
- PRIORITY_ONE
- PRIORITY_TWO
- PRIORITY_THREE
- PRIORITY_FOUR
- PRIORITY_FIVE
EventResponse:
description: The object description of an event after being processed and stored by Datadog.
properties:
Expand DownExpand Up@@ -37774,13 +37795,15 @@ components:
type: object
EventStatusType:
description: |-
If an alert event is enabled, its status is one of the following:
`failure`, `error`, `warning`, `info`, `success`, `user_update`,
`recommendation`, or `snapshot`.
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`.
enum:
- failure
- error
- warn
- warning
- ok
- info
- success
- user_update
Expand All@@ -37791,7 +37814,9 @@ components:
x-enum-varnames:
- FAILURE
- ERROR
- WARN
- WARNING
- OK
- INFO
- SUCCESS
- USER_UPDATE
Expand DownExpand Up@@ -38046,7 +38071,7 @@ components:
type: string
limit:
default: 10
description: The maximum number of logs in the response.
description: The maximum number of events in the response.
example: 25
format: int32
maximum: 1000
Expand Down
58 changes: 56 additions & 2 deletions src/main/java/com/datadog/api/client/v2/model/Event.java
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,9 +19,11 @@
/** The metadata associated with a request. */
@JsonPropertyOrder({
Event.JSON_PROPERTY_ID,
Event.JSON_PROPERTY_INTEGRATION_ID,
Event.JSON_PROPERTY_NAME,
Event.JSON_PROPERTY_SOURCE_ID,
Event.JSON_PROPERTY_TYPE
Event.JSON_PROPERTY_TYPE,
Event.JSON_PROPERTY_UID
})
@jakarta.annotation.Generated(
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
Expand All@@ -30,6 +32,9 @@ public class Event {
public static final String JSON_PROPERTY_ID = "id";
private String id;

public static final String JSON_PROPERTY_INTEGRATION_ID = "integration_id";
private String integrationId;

public static final String JSON_PROPERTY_NAME = "name";
private String name;

Expand All@@ -39,6 +44,9 @@ public class Event {
public static final String JSON_PROPERTY_TYPE = "type";
private String type;

public static final String JSON_PROPERTY_UID = "uid";
private String uid;

public Event id(String id) {
this.id = id;
return this;
Expand All@@ -60,6 +68,27 @@ public void setId(String id) {
this.id = id;
}

public Event integrationId(String integrationId) {
this.integrationId = integrationId;
return this;
}

/**
* The integration ID of the event.
*
* @return integrationId
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_INTEGRATION_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getIntegrationId() {
return integrationId;
}

public void setIntegrationId(String integrationId) {
this.integrationId = integrationId;
}

public Event name(String name) {
this.name = name;
return this;
Expand DownExpand Up@@ -123,6 +152,27 @@ public void setType(String type) {
this.type = type;
}

public Event uid(String uid) {
this.uid = uid;
return this;
}

/**
* A unique identifier for the event. You can use this identifier to query or reference the event.
*
* @return uid
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_UID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getUid() {
return uid;
}

public void setUid(String uid) {
this.uid = uid;
}

/**
* A container for additional, undeclared properties. This is a holder for any undeclared
* properties as specified with the 'additionalProperties' keyword in the OAS document.
Expand DownExpand Up@@ -180,25 +230,29 @@ public boolean equals(Object o) {
}
Event event = (Event) o;
return Objects.equals(this.id, event.id)
&& Objects.equals(this.integrationId, event.integrationId)
&& Objects.equals(this.name, event.name)
&& Objects.equals(this.sourceId, event.sourceId)
&& Objects.equals(this.type, event.type)
&& Objects.equals(this.uid, event.uid)
&& Objects.equals(this.additionalProperties, event.additionalProperties);
}

@Override
public int hashCode() {
return Objects.hash(id, name, sourceId, type, additionalProperties);
return Objects.hash(id, integrationId, name, sourceId, type, uid, additionalProperties);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Event {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" integrationId: ").append(toIndentedString(integrationId)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" sourceId: ").append(toIndentedString(sourceId)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" uid: ").append(toIndentedString(uid)).append("\n");
sb.append(" additionalProperties: ")
.append(toIndentedString(additionalProperties))
.append("\n");
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -367,7 +367,8 @@ public EventAttributes priority(EventPriority priority) {
}

/**
* The priority of the event's monitor. For example, <code>normal</code> or <code>low</code>.
* The priority of the event alert. Legacy events use <code>normal</code> or <code>low</code>.
* Alert events use <code>1</code> (highest priority) through <code>5</code> (lowest priority).
*
* @return priority
*/
Expand DownExpand Up@@ -491,9 +492,10 @@ public EventAttributes status(EventStatusType status) {
}

/**
* If an alert event is enabled, its status is one of the following: <code>failure</code>, <code>
* error</code>, <code>warning</code>, <code>info</code>, <code>success</code>, <code>user_update
* </code>, <code>recommendation</code>, or <code>snapshot</code>.
* The event status. Legacy events can use <code>failure</code>, <code>error</code>, <code>warning
* </code>, <code>info</code>, <code>success</code>, <code>user_update</code>, <code>
* recommendation</code>, or <code>snapshot</code>. Alert events can use <code>error</code>,
* <code>warn</code>, or <code>ok</code>.
*
* @return status
*/
Expand Down
12 changes: 10 additions & 2 deletions src/main/java/com/datadog/api/client/v2/model/EventPriority.java
Original file line numberDiff line numberDiff line change
Expand Up@@ -18,15 +18,23 @@
import java.util.HashSet;
import java.util.Set;

/** The priority of the event's monitor. For example, <code>normal</code> or <code>low</code>. */
/**
* The priority of the event alert. Legacy events use <code>normal</code> or <code>low</code>. Alert
* events use <code>1</code> (highest priority) through <code>5</code> (lowest priority).
*/
@JsonSerialize(using = EventPriority.EventPrioritySerializer.class)
public class EventPriority extends ModelEnum<String> {

private static final Set<String> allowedValues =
new HashSet<String>(Arrays.asList("normal", "low"));
new HashSet<String>(Arrays.asList("normal", "low", "1", "2", "3", "4", "5"));

public static final EventPriority NORMAL = new EventPriority("normal");
public static final EventPriority LOW = new EventPriority("low");
public static final EventPriority PRIORITY_ONE = new EventPriority("1");
public static final EventPriority PRIORITY_TWO = new EventPriority("2");
public static final EventPriority PRIORITY_THREE = new EventPriority("3");
public static final EventPriority PRIORITY_FOUR = new EventPriority("4");
public static final EventPriority PRIORITY_FIVE = new EventPriority("5");

EventPriority(String value) {
super(value, allowedValues);
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,9 +19,10 @@
import java.util.Set;

/**
* If an alert event is enabled, its status is one of the following: <code>failure</code>, <code>
* error</code>, <code>warning</code>, <code>info</code>, <code>success</code>, <code>user_update
* </code>, <code>recommendation</code>, or <code>snapshot</code>.
* The event status. Legacy events can use <code>failure</code>, <code>error</code>, <code>warning
* </code>, <code>info</code>, <code>success</code>, <code>user_update</code>, <code>recommendation
* </code>, or <code>snapshot</code>. Alert events can use <code>error</code>, <code>warn</code>, or
* <code>ok</code>.
*/
@JsonSerialize(using = EventStatusType.EventStatusTypeSerializer.class)
public class EventStatusType extends ModelEnum<String> {
Expand All@@ -31,7 +32,9 @@ public class EventStatusType extends ModelEnum<String> {
Arrays.asList(
"failure",
"error",
"warn",
"warning",
"ok",
"info",
"success",
"user_update",
Expand All@@ -40,7 +43,9 @@ public class EventStatusType extends ModelEnum<String> {

public static final EventStatusType FAILURE = new EventStatusType("failure");
public static final EventStatusType ERROR = new EventStatusType("error");
public static final EventStatusType WARN = new EventStatusType("warn");
public static final EventStatusType WARNING = new EventStatusType("warning");
public static final EventStatusType OK = new EventStatusType("ok");
public static final EventStatusType INFO = new EventStatusType("info");
public static final EventStatusType SUCCESS = new EventStatusType("success");
public static final EventStatusType USER_UPDATE = new EventStatusType("user_update");
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -55,7 +55,7 @@ public EventsRequestPage limit(Integer limit) {
}

/**
* The maximum number of logs in the response. maximum: 1000
* The maximum number of events in the response. maximum: 1000
*
* @return limit
*/
Expand Down
Loading