Skip to content
Merged
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
24 changes: 22 additions & 2 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4978,7 +4978,7 @@ components:
example: ccbc53b1-74f2-496b-bdd7-9a8fa7b7376b
type: string
criteria:
$ref: '#/components/schemas/AggregatedWaterfallPerformanceCriteria'
$ref: '#/components/schemas/AggregatedLongTasksResponseAttributesCriteria'
from:
description: Start of the analyzed time range as a Unix timestamp in seconds.
example: 1762437564
Expand Down Expand Up @@ -5017,9 +5017,29 @@ components:
- view_count
- from
- to
- criteria
- sampled_view_ids
- long_tasks_by_invoker_type
type: object
AggregatedLongTasksResponseAttributesCriteria:
description: Performance criteria used to filter view instances by a metric threshold, or null if no criteria were applied.
nullable: true
properties:
max:
description: Maximum threshold in seconds (inclusive).
example: 5.0
format: double
type: number
metric:
$ref: '#/components/schemas/AggregatedWaterfallPerformanceCriteriaMetric'
min:
description: Minimum threshold in seconds (inclusive).
example: 2.5
format: double
type: number
required:
- metric
type: object
AggregatedLongTasksResponseData:
description: Data envelope for an aggregated long tasks response.
properties:
Expand Down Expand Up @@ -121786,7 +121806,6 @@ components:
type: integer
required:
- invoker
- file
- view_occurrences
- stats_per_view
type: object
Expand Down Expand Up @@ -197270,6 +197289,7 @@ paths:
data:
attributes:
application_id: ccbc53b1-74f2-496b-bdd7-9a8fa7b7376b
criteria:
from: 1762437564
long_tasks_by_invoker_type:
- impact_score: 0.4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class AggregatedLongTasksResponseAttributes {
private String applicationId;

public static final String JSON_PROPERTY_CRITERIA = "criteria";
private AggregatedWaterfallPerformanceCriteria criteria;
private AggregatedLongTasksResponseAttributesCriteria criteria;

public static final String JSON_PROPERTY_FROM = "from";
private Long from;
Expand All @@ -64,6 +64,8 @@ public AggregatedLongTasksResponseAttributes() {}
@JsonCreator
public AggregatedLongTasksResponseAttributes(
@JsonProperty(required = true, value = JSON_PROPERTY_APPLICATION_ID) String applicationId,
@JsonProperty(required = true, value = JSON_PROPERTY_CRITERIA)
AggregatedLongTasksResponseAttributesCriteria criteria,
@JsonProperty(required = true, value = JSON_PROPERTY_FROM) Long from,
@JsonProperty(required = true, value = JSON_PROPERTY_LONG_TASKS_BY_INVOKER_TYPE)
List<AggregatedLongTasksByInvokerType> longTasksByInvokerType,
Expand All @@ -73,6 +75,10 @@ public AggregatedLongTasksResponseAttributes(
@JsonProperty(required = true, value = JSON_PROPERTY_VIEW_COUNT) Integer viewCount,
@JsonProperty(required = true, value = JSON_PROPERTY_VIEW_NAME) String viewName) {
this.applicationId = applicationId;
this.criteria = criteria;
if (criteria != null) {
this.unparsed |= criteria.unparsed;
}
this.from = from;
this.longTasksByInvokerType = longTasksByInvokerType;
for (AggregatedLongTasksByInvokerType item : longTasksByInvokerType) {
Expand Down Expand Up @@ -105,25 +111,28 @@ public void setApplicationId(String applicationId) {
}

public AggregatedLongTasksResponseAttributes criteria(
AggregatedWaterfallPerformanceCriteria criteria) {
AggregatedLongTasksResponseAttributesCriteria criteria) {
this.criteria = criteria;
this.unparsed |= criteria.unparsed;
if (criteria != null) {
this.unparsed |= criteria.unparsed;
}
return this;
}

/**
* Performance criteria to filter view instances by a metric threshold.
* Performance criteria used to filter view instances by a metric threshold, or null if no
* criteria were applied.
*
* @return criteria
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_CRITERIA)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public AggregatedWaterfallPerformanceCriteria getCriteria() {
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public AggregatedLongTasksResponseAttributesCriteria getCriteria() {
return criteria;
}

public void setCriteria(AggregatedWaterfallPerformanceCriteria criteria) {
public void setCriteria(AggregatedLongTasksResponseAttributesCriteria criteria) {
this.criteria = criteria;
if (criteria != null) {
this.unparsed |= criteria.unparsed;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,213 @@
/*
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
* This product includes software developed at Datadog (https://www.datadoghq.com/).
* Copyright 2019-Present Datadog, Inc.
*/

package com.datadog.api.client.v2.model;

import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;

/**
* Performance criteria used to filter view instances by a metric threshold, or null if no criteria
* were applied.
*/
@JsonPropertyOrder({
AggregatedLongTasksResponseAttributesCriteria.JSON_PROPERTY_MAX,
AggregatedLongTasksResponseAttributesCriteria.JSON_PROPERTY_METRIC,
AggregatedLongTasksResponseAttributesCriteria.JSON_PROPERTY_MIN
})
@jakarta.annotation.Generated(
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
public class AggregatedLongTasksResponseAttributesCriteria {
@JsonIgnore public boolean unparsed = false;
public static final String JSON_PROPERTY_MAX = "max";
private Double max;

public static final String JSON_PROPERTY_METRIC = "metric";
private AggregatedWaterfallPerformanceCriteriaMetric metric;

public static final String JSON_PROPERTY_MIN = "min";
private Double min;

public AggregatedLongTasksResponseAttributesCriteria() {}

@JsonCreator
public AggregatedLongTasksResponseAttributesCriteria(
@JsonProperty(required = true, value = JSON_PROPERTY_METRIC)
AggregatedWaterfallPerformanceCriteriaMetric metric) {
this.metric = metric;
this.unparsed |= !metric.isValid();
}

public AggregatedLongTasksResponseAttributesCriteria max(Double max) {
this.max = max;
return this;
}

/**
* Maximum threshold in seconds (inclusive).
*
* @return max
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_MAX)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Double getMax() {
return max;
}

public void setMax(Double max) {
this.max = max;
}

public AggregatedLongTasksResponseAttributesCriteria metric(
AggregatedWaterfallPerformanceCriteriaMetric metric) {
this.metric = metric;
this.unparsed |= !metric.isValid();
return this;
}

/**
* Performance metric used to filter view instances by threshold.
*
* @return metric
*/
@JsonProperty(JSON_PROPERTY_METRIC)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public AggregatedWaterfallPerformanceCriteriaMetric getMetric() {
return metric;
}

public void setMetric(AggregatedWaterfallPerformanceCriteriaMetric metric) {
if (!metric.isValid()) {
this.unparsed = true;
}
this.metric = metric;
}

public AggregatedLongTasksResponseAttributesCriteria min(Double min) {
this.min = min;
return this;
}

/**
* Minimum threshold in seconds (inclusive).
*
* @return min
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_MIN)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Double getMin() {
return min;
}

public void setMin(Double min) {
this.min = min;
}

/**
* A container for additional, undeclared properties. This is a holder for any undeclared
* properties as specified with the 'additionalProperties' keyword in the OAS document.
*/
private Map<String, Object> additionalProperties;

/**
* Set the additional (undeclared) property with the specified name and value. If the property
* does not already exist, create it otherwise replace it.
*
* @param key The arbitrary key to set
* @param value The associated value
* @return AggregatedLongTasksResponseAttributesCriteria
*/
@JsonAnySetter
public AggregatedLongTasksResponseAttributesCriteria putAdditionalProperty(
String key, Object value) {
if (this.additionalProperties == null) {
this.additionalProperties = new HashMap<String, Object>();
}
this.additionalProperties.put(key, value);
return this;
}

/**
* Return the additional (undeclared) property.
*
* @return The additional properties
*/
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
return additionalProperties;
}

/**
* Return the additional (undeclared) property with the specified name.
*
* @param key The arbitrary key to get
* @return The specific additional property for the given key
*/
public Object getAdditionalProperty(String key) {
if (this.additionalProperties == null) {
return null;
}
return this.additionalProperties.get(key);
}

/** Return true if this AggregatedLongTasksResponseAttributesCriteria object is equal to o. */
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AggregatedLongTasksResponseAttributesCriteria aggregatedLongTasksResponseAttributesCriteria =
(AggregatedLongTasksResponseAttributesCriteria) o;
return Objects.equals(this.max, aggregatedLongTasksResponseAttributesCriteria.max)
&& Objects.equals(this.metric, aggregatedLongTasksResponseAttributesCriteria.metric)
&& Objects.equals(this.min, aggregatedLongTasksResponseAttributesCriteria.min)
&& Objects.equals(
this.additionalProperties,
aggregatedLongTasksResponseAttributesCriteria.additionalProperties);
}

@Override
public int hashCode() {
return Objects.hash(max, metric, min, additionalProperties);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AggregatedLongTasksResponseAttributesCriteria {\n");
sb.append(" max: ").append(toIndentedString(max)).append("\n");
sb.append(" metric: ").append(toIndentedString(metric)).append("\n");
sb.append(" min: ").append(toIndentedString(min)).append("\n");
sb.append(" additionalProperties: ")
.append(toIndentedString(additionalProperties))
.append("\n");
sb.append('}');
return sb.toString();
}

/**
* Convert the given object to string with each line indented by 4 spaces (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
Loading
Loading