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
17 changes: 17 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33708,10 +33708,27 @@ components:
example: 3600
format: int64
type: integer
fail_on_no_data:
default: true
description: Whether the rule should fail if a matching monitor group is in a NO DATA state.
example: false
type: boolean
fail_on_no_groups_found:
default: false
description: Whether the rule should fail if no monitor groups are found for the query.
example: false
type: boolean
query:
description: Monitors that match this query are evaluated.
example: "service:my-service env:prod"
type: string
warmup:
default: 0
description: Seconds to wait after a deployment starts before evaluating the monitor's status.
example: 0
format: int64
minimum: 0
type: integer
required:
- query
type: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
/** Monitor options for deployment rules. */
@JsonPropertyOrder({
DeploymentRuleOptionsMonitor.JSON_PROPERTY_DURATION,
DeploymentRuleOptionsMonitor.JSON_PROPERTY_QUERY
DeploymentRuleOptionsMonitor.JSON_PROPERTY_FAIL_ON_NO_DATA,
DeploymentRuleOptionsMonitor.JSON_PROPERTY_FAIL_ON_NO_GROUPS_FOUND,
DeploymentRuleOptionsMonitor.JSON_PROPERTY_QUERY,
DeploymentRuleOptionsMonitor.JSON_PROPERTY_WARMUP
})
@jakarta.annotation.Generated(
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
Expand All @@ -25,9 +28,18 @@ public class DeploymentRuleOptionsMonitor {
public static final String JSON_PROPERTY_DURATION = "duration";
private Long duration;

public static final String JSON_PROPERTY_FAIL_ON_NO_DATA = "fail_on_no_data";
private Boolean failOnNoData = true;

public static final String JSON_PROPERTY_FAIL_ON_NO_GROUPS_FOUND = "fail_on_no_groups_found";
private Boolean failOnNoGroupsFound = false;

public static final String JSON_PROPERTY_QUERY = "query";
private String query;

public static final String JSON_PROPERTY_WARMUP = "warmup";
private Long warmup = 0l;

public DeploymentRuleOptionsMonitor() {}

@JsonCreator
Expand Down Expand Up @@ -57,6 +69,48 @@ public void setDuration(Long duration) {
this.duration = duration;
}

public DeploymentRuleOptionsMonitor failOnNoData(Boolean failOnNoData) {
this.failOnNoData = failOnNoData;
return this;
}

/**
* Whether the rule should fail if a matching monitor group is in a NO DATA state.
*
* @return failOnNoData
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_FAIL_ON_NO_DATA)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getFailOnNoData() {
return failOnNoData;
}

public void setFailOnNoData(Boolean failOnNoData) {
this.failOnNoData = failOnNoData;
}

public DeploymentRuleOptionsMonitor failOnNoGroupsFound(Boolean failOnNoGroupsFound) {
this.failOnNoGroupsFound = failOnNoGroupsFound;
return this;
}

/**
* Whether the rule should fail if no monitor groups are found for the query.
*
* @return failOnNoGroupsFound
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_FAIL_ON_NO_GROUPS_FOUND)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getFailOnNoGroupsFound() {
return failOnNoGroupsFound;
}

public void setFailOnNoGroupsFound(Boolean failOnNoGroupsFound) {
this.failOnNoGroupsFound = failOnNoGroupsFound;
}

public DeploymentRuleOptionsMonitor query(String query) {
this.query = query;
return this;
Expand All @@ -77,6 +131,27 @@ public void setQuery(String query) {
this.query = query;
}

public DeploymentRuleOptionsMonitor warmup(Long warmup) {
this.warmup = warmup;
return this;
}

/**
* Seconds to wait after a deployment starts before evaluating the monitor's status. minimum: 0
*
* @return warmup
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_WARMUP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Long getWarmup() {
return warmup;
}

public void setWarmup(Long warmup) {
this.warmup = warmup;
}

/** Return true if this DeploymentRuleOptionsMonitor object is equal to o. */
@Override
public boolean equals(Object o) {
Expand All @@ -88,20 +163,29 @@ public boolean equals(Object o) {
}
DeploymentRuleOptionsMonitor deploymentRuleOptionsMonitor = (DeploymentRuleOptionsMonitor) o;
return Objects.equals(this.duration, deploymentRuleOptionsMonitor.duration)
&& Objects.equals(this.query, deploymentRuleOptionsMonitor.query);
&& Objects.equals(this.failOnNoData, deploymentRuleOptionsMonitor.failOnNoData)
&& Objects.equals(
this.failOnNoGroupsFound, deploymentRuleOptionsMonitor.failOnNoGroupsFound)
&& Objects.equals(this.query, deploymentRuleOptionsMonitor.query)
&& Objects.equals(this.warmup, deploymentRuleOptionsMonitor.warmup);
}

@Override
public int hashCode() {
return Objects.hash(duration, query);
return Objects.hash(duration, failOnNoData, failOnNoGroupsFound, query, warmup);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DeploymentRuleOptionsMonitor {\n");
sb.append(" duration: ").append(toIndentedString(duration)).append("\n");
sb.append(" failOnNoData: ").append(toIndentedString(failOnNoData)).append("\n");
sb.append(" failOnNoGroupsFound: ")
.append(toIndentedString(failOnNoGroupsFound))
.append("\n");
sb.append(" query: ").append(toIndentedString(query)).append("\n");
sb.append(" warmup: ").append(toIndentedString(warmup)).append("\n");
sb.append('}');
return sb.toString();
}
Expand Down
Loading