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
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.4.1.dev11",
"regenerated": "2021-09-03 13:54:25.660852",
"spec_repo_commit": "e9ac191"
"regenerated": "2021-09-03 16:54:36.762424",
"spec_repo_commit": "a9c0eae"
},
"v2": {
"apigentools_version": "1.4.1.dev11",
"regenerated": "2021-09-03 13:55:16.624933",
"spec_repo_commit": "e9ac191"
"regenerated": "2021-09-03 16:55:25.824256",
"spec_repo_commit": "a9c0eae"
}
}
}
1 change: 1 addition & 0 deletions api_docs/v1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,7 @@ Class | Method | HTTP request | Description
- [SLOHistoryResponse](SLOHistoryResponse.md)
- [SLOHistoryResponseData](SLOHistoryResponseData.md)
- [SLOHistoryResponseError](SLOHistoryResponseError.md)
- [SLOHistoryResponseErrorWithType](SLOHistoryResponseErrorWithType.md)
- [SLOHistorySLIData](SLOHistorySLIData.md)
- [SLOListResponse](SLOListResponse.md)
- [SLOListResponseMetadata](SLOListResponseMetadata.md)
Expand Down
2 changes: 1 addition & 1 deletion api_docs/v1/SLOHistoryResponseError.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# SLOHistoryResponseError

A service level objective response containing the requested history.
A list of errors while querying the history data for the service level objective.

## Properties

Expand Down
15 changes: 15 additions & 0 deletions api_docs/v1/SLOHistoryResponseErrorWithType.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@


# SLOHistoryResponseErrorWithType

An object describing the error with error type and error message.

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**errorMessage** | **String** | A message with more details about the error. |
**errorType** | **String** | Type of the error. |



2 changes: 1 addition & 1 deletion api_docs/v1/SLOHistorySLIData.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ An object that holds an SLI value and its associated data. It can represent an S
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**errorBudgetRemaining** | **Map<String, Double>** | A mapping of threshold `timeframe` to the remaining error budget. | [optional]
**errors** | [**List<SLOHistoryResponseError>**](SLOHistoryResponseError.md) | A list of errors while querying the history data for the service level objective. | [optional]
**errors** | [**List<SLOHistoryResponseErrorWithType>**](SLOHistoryResponseErrorWithType.md) | An array of error objects returned while querying the history data for the service level objective. | [optional]
**group** | **String** | For groups in a grouped SLO, this is the group name. | [optional]
**history** | **List<List<Double>>** | For `monitor` based SLOs, this includes the aggregated history as arrays that include time series and uptime data where `0=monitor` is in `OK` state and `1=monitor` is in `alert` state. | [optional]
**monitorModified** | **Long** | For `monitor` based SLOs, this is the last modified timestamp in epoch seconds of the monitor. | [optional]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@
import io.swagger.annotations.ApiModelProperty;
import java.util.Objects;

/** A service level objective response containing the requested history. */
@ApiModel(description = "A service level objective response containing the requested history.")
/** A list of errors while querying the history data for the service level objective. */
@ApiModel(
description =
"A list of errors while querying the history data for the service level objective.")
@JsonPropertyOrder({SLOHistoryResponseError.JSON_PROPERTY_ERROR})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class SLOHistoryResponseError {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
/*
* 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.
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/

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

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 io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Objects;

/** An object describing the error with error type and error message. */
@ApiModel(description = "An object describing the error with error type and error message.")
@JsonPropertyOrder({
SLOHistoryResponseErrorWithType.JSON_PROPERTY_ERROR_MESSAGE,
SLOHistoryResponseErrorWithType.JSON_PROPERTY_ERROR_TYPE
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class SLOHistoryResponseErrorWithType {
@JsonIgnore public boolean unparsed = false;
public static final String JSON_PROPERTY_ERROR_MESSAGE = "error_message";
private String errorMessage;

public static final String JSON_PROPERTY_ERROR_TYPE = "error_type";
private String errorType;

public SLOHistoryResponseErrorWithType() {}

@JsonCreator
public SLOHistoryResponseErrorWithType(
@JsonProperty(required = true, value = JSON_PROPERTY_ERROR_MESSAGE) String errorMessage,
@JsonProperty(required = true, value = JSON_PROPERTY_ERROR_TYPE) String errorType) {
this.errorMessage = errorMessage;
this.errorType = errorType;
}

public SLOHistoryResponseErrorWithType errorMessage(String errorMessage) {
this.errorMessage = errorMessage;
return this;
}

/**
* A message with more details about the error.
*
* @return errorMessage
*/
@ApiModelProperty(
example = "",
required = true,
value = "A message with more details about the error.")
@JsonProperty(JSON_PROPERTY_ERROR_MESSAGE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getErrorMessage() {
return errorMessage;
}

public void setErrorMessage(String errorMessage) {
this.errorMessage = errorMessage;
}

public SLOHistoryResponseErrorWithType errorType(String errorType) {
this.errorType = errorType;
return this;
}

/**
* Type of the error.
*
* @return errorType
*/
@ApiModelProperty(example = "", required = true, value = "Type of the error.")
@JsonProperty(JSON_PROPERTY_ERROR_TYPE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getErrorType() {
return errorType;
}

public void setErrorType(String errorType) {
this.errorType = errorType;
}

/** Return true if this SLOHistoryResponseErrorWithType object is equal to o. */
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
SLOHistoryResponseErrorWithType slOHistoryResponseErrorWithType =
(SLOHistoryResponseErrorWithType) o;
return Objects.equals(this.errorMessage, slOHistoryResponseErrorWithType.errorMessage)
&& Objects.equals(this.errorType, slOHistoryResponseErrorWithType.errorType);
}

@Override
public int hashCode() {
return Objects.hash(errorMessage, errorType);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class SLOHistoryResponseErrorWithType {\n");
sb.append(" errorMessage: ").append(toIndentedString(errorMessage)).append("\n");
sb.append(" errorType: ").append(toIndentedString(errorType)).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 ");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public class SLOHistorySLIData {
private Map<String, Double> errorBudgetRemaining = null;

public static final String JSON_PROPERTY_ERRORS = "errors";
private List<SLOHistoryResponseError> errors = null;
private List<SLOHistoryResponseErrorWithType> errors = null;

public static final String JSON_PROPERTY_GROUP = "group";
private String group;
Expand Down Expand Up @@ -118,15 +118,15 @@ public void setErrorBudgetRemaining(Map<String, Double> errorBudgetRemaining) {
this.errorBudgetRemaining = errorBudgetRemaining;
}

public SLOHistorySLIData errors(List<SLOHistoryResponseError> errors) {
public SLOHistorySLIData errors(List<SLOHistoryResponseErrorWithType> errors) {
this.errors = errors;
for (SLOHistoryResponseError item : errors) {
for (SLOHistoryResponseErrorWithType item : errors) {
this.unparsed |= item.unparsed;
}
return this;
}

public SLOHistorySLIData addErrorsItem(SLOHistoryResponseError errorsItem) {
public SLOHistorySLIData addErrorsItem(SLOHistoryResponseErrorWithType errorsItem) {
if (this.errors == null) {
this.errors = new ArrayList<>();
}
Expand All @@ -136,21 +136,23 @@ public SLOHistorySLIData addErrorsItem(SLOHistoryResponseError errorsItem) {
}

/**
* A list of errors while querying the history data for the service level objective.
* An array of error objects returned while querying the history data for the service level
* objective.
*
* @return errors
*/
@javax.annotation.Nullable
@ApiModelProperty(
example = "[]",
value = "A list of errors while querying the history data for the service level objective.")
value =
"An array of error objects returned while querying the history data for the service"
+ " level objective.")
@JsonProperty(JSON_PROPERTY_ERRORS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<SLOHistoryResponseError> getErrors() {
public List<SLOHistoryResponseErrorWithType> getErrors() {
return errors;
}

public void setErrors(List<SLOHistoryResponseError> errors) {
public void setErrors(List<SLOHistoryResponseErrorWithType> errors) {
this.errors = errors;
}

Expand Down
46 changes: 38 additions & 8 deletions src/main/java/com/datadog/api/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19512,7 +19512,11 @@ components:
- - - 1579212382
- 0
monitor_type: string
errors: []
errors:
- error_message: ""
error_type: ""
- error_message: ""
error_type: ""
group: name
uptime: 99.99
type: metric
Expand All @@ -19531,14 +19535,33 @@ components:
type: array
type: object
SLOHistoryResponseError:
description: A service level objective response containing the requested history.
description: A list of errors while querying the history data for the service
level objective.
example:
error: error
properties:
error:
description: Human readable error.
type: string
type: object
SLOHistoryResponseErrorWithType:
description: An object describing the error with error type and error message.
example:
error_message: ""
error_type: ""
properties:
error_message:
description: A message with more details about the error.
example: ""
type: string
error_type:
description: Type of the error.
example: ""
type: string
required:
- error_message
- error_type
type: object
SLOHistorySLIData:
description: |-
An object that holds an SLI value and its associated data. It can represent an SLO's overall SLI value.
Expand All @@ -19560,7 +19583,11 @@ components:
- - - 1579212382
- 0
monitor_type: string
errors: []
errors:
- error_message: ""
error_type: ""
- error_message: ""
error_type: ""
group: name
uptime: 99.99
properties:
Expand All @@ -19574,11 +19601,10 @@ components:
"7d": 100.0
type: object
errors:
description: A list of errors while querying the history data for the service
level objective.
example: []
description: An array of error objects returned while querying the history
data for the service level objective.
items:
$ref: '#/components/schemas/SLOHistoryResponseError'
$ref: '#/components/schemas/SLOHistoryResponseErrorWithType'
type: array
group:
description: For groups in a grouped SLO, this is the group name.
Expand Down Expand Up @@ -30376,7 +30402,11 @@ components:
- - - 1579212382
- 0
monitor_type: string
errors: []
errors:
- error_message: ""
error_type: ""
- error_message: ""
error_type: ""
group: name
uptime: 99.99
type: metric
Expand Down