From af0268aa5d34d5a53c131b987868c57a513da6eb Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Fri, 29 Jan 2021 12:49:56 +0000 Subject: [PATCH] Regenerate client from commit bc876ff of spec repo --- .apigentools-info | 8 +- api_docs/v1/README.md | 3 + api_docs/v1/UsageIoTHour.md | 14 ++ api_docs/v1/UsageIoTResponse.md | 13 ++ api_docs/v1/UsageMeteringApi.md | 87 +++++++++++ api_docs/v1/UsageSummaryDate.md | 2 + api_docs/v1/UsageSummaryDateOrg.md | 2 + api_docs/v1/UsageSummaryResponse.md | 2 + .../api/v1/client/api/UsageMeteringApi.java | 121 +++++++++++++++ .../api/v1/client/model/UsageIoTHour.java | 139 ++++++++++++++++++ .../api/v1/client/model/UsageIoTResponse.java | 119 +++++++++++++++ .../api/v1/client/model/UsageSummaryDate.java | 62 +++++++- .../v1/client/model/UsageSummaryDateOrg.java | 62 +++++++- .../v1/client/model/UsageSummaryResponse.java | 62 +++++++- src/main/java/com/datadog/api/v1/openapi.yaml | 99 +++++++++++++ .../com/datadog/api/v1/client/api/undo.json | 6 + .../api/v1/client/api/usage_metering.feature | 12 ++ 17 files changed, 806 insertions(+), 7 deletions(-) create mode 100644 api_docs/v1/UsageIoTHour.md create mode 100644 api_docs/v1/UsageIoTResponse.md create mode 100644 src/main/java/com/datadog/api/v1/client/model/UsageIoTHour.java create mode 100644 src/main/java/com/datadog/api/v1/client/model/UsageIoTResponse.java diff --git a/.apigentools-info b/.apigentools-info index b432b880801..3f9788296e2 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.4.1.dev2", - "regenerated": "2021-01-29 07:52:53.308581", - "spec_repo_commit": "6dc3341" + "regenerated": "2021-01-29 12:49:43.486193", + "spec_repo_commit": "bc876ff" }, "v2": { "apigentools_version": "1.4.1.dev2", - "regenerated": "2021-01-29 07:53:03.170641", - "spec_repo_commit": "6dc3341" + "regenerated": "2021-01-29 12:49:54.642406", + "spec_repo_commit": "bc876ff" } } } \ No newline at end of file diff --git a/api_docs/v1/README.md b/api_docs/v1/README.md index 00a78dc66f1..2b7b5242c1f 100644 --- a/api_docs/v1/README.md +++ b/api_docs/v1/README.md @@ -151,6 +151,7 @@ Class | Method | HTTP request | Description *UsageMeteringApi* | [**getUsageFargate**](UsageMeteringApi.md#getUsageFargate) | **GET** /api/v1/usage/fargate | Get hourly usage for Fargate *UsageMeteringApi* | [**getUsageHosts**](UsageMeteringApi.md#getUsageHosts) | **GET** /api/v1/usage/hosts | Get hourly usage for hosts and containers *UsageMeteringApi* | [**getUsageIndexedSpans**](UsageMeteringApi.md#getUsageIndexedSpans) | **GET** /api/v1/usage/indexed-spans | Get hourly usage for indexed spans +*UsageMeteringApi* | [**getUsageInternetOfThings**](UsageMeteringApi.md#getUsageInternetOfThings) | **GET** /api/v1/usage/iot | Get hourly usage for IoT *UsageMeteringApi* | [**getUsageLambda**](UsageMeteringApi.md#getUsageLambda) | **GET** /api/v1/usage/aws_lambda | Get hourly usage for Lambda *UsageMeteringApi* | [**getUsageLogs**](UsageMeteringApi.md#getUsageLogs) | **GET** /api/v1/usage/logs | Get hourly usage for Logs *UsageMeteringApi* | [**getUsageLogsByIndex**](UsageMeteringApi.md#getUsageLogsByIndex) | **GET** /api/v1/usage/logs_by_index | Get hourly usage for Logs by Index @@ -563,6 +564,8 @@ Class | Method | HTTP request | Description - [UsageIndexedSpansResponse](UsageIndexedSpansResponse.md) - [UsageIngestedSpansHour](UsageIngestedSpansHour.md) - [UsageIngestedSpansResponse](UsageIngestedSpansResponse.md) + - [UsageIoTHour](UsageIoTHour.md) + - [UsageIoTResponse](UsageIoTResponse.md) - [UsageLambdaHour](UsageLambdaHour.md) - [UsageLambdaResponse](UsageLambdaResponse.md) - [UsageLogsByIndexHour](UsageLogsByIndexHour.md) diff --git a/api_docs/v1/UsageIoTHour.md b/api_docs/v1/UsageIoTHour.md new file mode 100644 index 00000000000..d8fedfda577 --- /dev/null +++ b/api_docs/v1/UsageIoTHour.md @@ -0,0 +1,14 @@ + + +# UsageIoTHour + +IoT usage for a given organization for a given hour. +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**hour** | **OffsetDateTime** | The hour for the usage. | [optional] +**iotDeviceCount** | **Long** | The total number of IoT device hours from the start of the given hour's month until the given hour. | [optional] + + + diff --git a/api_docs/v1/UsageIoTResponse.md b/api_docs/v1/UsageIoTResponse.md new file mode 100644 index 00000000000..0d8db181568 --- /dev/null +++ b/api_docs/v1/UsageIoTResponse.md @@ -0,0 +1,13 @@ + + +# UsageIoTResponse + +Response containing the IoT usage for each hour for a given organization. +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**usage** | [**List<UsageIoTHour>**](UsageIoTHour.md) | Get hourly usage for IoT. | [optional] + + + diff --git a/api_docs/v1/UsageMeteringApi.md b/api_docs/v1/UsageMeteringApi.md index e35650632d3..94b71e04712 100644 --- a/api_docs/v1/UsageMeteringApi.md +++ b/api_docs/v1/UsageMeteringApi.md @@ -17,6 +17,7 @@ Method | HTTP request | Description [**getUsageFargate**](UsageMeteringApi.md#getUsageFargate) | **GET** /api/v1/usage/fargate | Get hourly usage for Fargate [**getUsageHosts**](UsageMeteringApi.md#getUsageHosts) | **GET** /api/v1/usage/hosts | Get hourly usage for hosts and containers [**getUsageIndexedSpans**](UsageMeteringApi.md#getUsageIndexedSpans) | **GET** /api/v1/usage/indexed-spans | Get hourly usage for indexed spans +[**getUsageInternetOfThings**](UsageMeteringApi.md#getUsageInternetOfThings) | **GET** /api/v1/usage/iot | Get hourly usage for IoT [**getUsageLambda**](UsageMeteringApi.md#getUsageLambda) | **GET** /api/v1/usage/aws_lambda | Get hourly usage for Lambda [**getUsageLogs**](UsageMeteringApi.md#getUsageLogs) | **GET** /api/v1/usage/logs | Get hourly usage for Logs [**getUsageLogsByIndex**](UsageMeteringApi.md#getUsageLogsByIndex) | **GET** /api/v1/usage/logs_by_index | Get hourly usage for Logs by Index @@ -1159,6 +1160,92 @@ Name | Type | Description | Notes | **403** | Forbidden - User is not authorized | - | +## getUsageInternetOfThings + +> UsageIoTResponse getUsageInternetOfThings().startHr(startHr).endHr(endHr).execute(); + +Get hourly usage for IoT + +Get hourly usage for IoT. + +### Example + +```java +import java.time.OffsetDateTime; +// Import classes: +import java.util.*; +import com.datadog.api.v1.client.ApiClient; +import com.datadog.api.v1.client.ApiException; +import com.datadog.api.v1.client.Configuration; +import com.datadog.api.v1.client.auth.*; +import com.datadog.api.v1.client.model.*; +import com.datadog.api.v1.client.api.UsageMeteringApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + // Configure the Datadog site to send API calls to + HashMap serverVariables = new HashMap(); + String site = System.getenv("DD_SITE"); + if (site != null) { + serverVariables.put("site", site); + defaultClient.setServerVariables(serverVariables); + } + // Configure API key authorization: + HashMap secrets = new HashMap(); + secrets.put("apiKeyAuth", System.getenv("DD_CLIENT_API_KEY")); + secrets.put("appKeyAuth", System.getenv("DD_CLIENT_APP_KEY")); + defaultClient.configureApiKeys(secrets); + + UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient); + OffsetDateTime startHr = OffsetDateTime.now(); // OffsetDateTime | Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. + OffsetDateTime endHr = OffsetDateTime.now(); // OffsetDateTime | Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending **before** this hour. + try { + UsageIoTResponse result = apiInstance.getUsageInternetOfThings() + .startHr(startHr) + .endHr(endHr) + .execute(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UsageMeteringApi#getUsageInternetOfThings"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **startHr** | **OffsetDateTime**| Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. | + **endHr** | **OffsetDateTime**| Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending **before** this hour. | [optional] + +### Return type + +[**UsageIoTResponse**](UsageIoTResponse.md) + +### Authorization + +[apiKeyAuth](README.md#apiKeyAuth), [appKeyAuth](README.md#appKeyAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json;datetime-format=rfc3339 + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **400** | Bad Request | - | +| **403** | Forbidden - User is not authorized | - | + + ## getUsageLambda > UsageLambdaResponse getUsageLambda().startHr(startHr).endHr(endHr).execute(); diff --git a/api_docs/v1/UsageSummaryDate.md b/api_docs/v1/UsageSummaryDate.md index aeca8703f88..99a15a39960 100644 --- a/api_docs/v1/UsageSummaryDate.md +++ b/api_docs/v1/UsageSummaryDate.md @@ -26,6 +26,8 @@ Name | Type | Description | Notes **indexedEventsCountSum** | **Long** | Shows the sum of all log events indexed over all hours in the current date for all organizations. | [optional] **infraHostTop99p** | **Long** | Shows the 99th percentile of all distinct infrastructure hosts over all hours in the current date for all organizations. | [optional] **ingestedEventsBytesSum** | **Long** | Shows the sum of all log bytes ingested over all hours in the current date for all organizations. | [optional] +**iotDeviceAggSum** | **Long** | Shows the sum of all IoT devices over all hours in the current date for all organizations. | [optional] +**iotDeviceTop99pSum** | **Long** | Shows the 99th percentile of all IoT devices over all hours in the current date all organizations. | [optional] **mobileRumSessionCountAndroidSum** | **Long** | Shows the sum of all mobile RUM Sessions on Android over all hours in the current date for all organizations. | [optional] **mobileRumSessionCountIosSum** | **Long** | Shows the sum of all mobile RUM Sessions on iOS over all hours in the current date for all organizations. | [optional] **mobileRumSessionCountSum** | **Long** | Shows the sum of all mobile RUM Sessions over all hours in the current date for all organizations | [optional] diff --git a/api_docs/v1/UsageSummaryDateOrg.md b/api_docs/v1/UsageSummaryDateOrg.md index 46eb954c3a5..af45df51712 100644 --- a/api_docs/v1/UsageSummaryDateOrg.md +++ b/api_docs/v1/UsageSummaryDateOrg.md @@ -26,6 +26,8 @@ Name | Type | Description | Notes **indexedEventsCountSum** | **Long** | Shows the sum of all log events indexed over all hours in the current date for the given org. | [optional] **infraHostTop99p** | **Long** | Shows the 99th percentile of all distinct infrastructure hosts over all hours in the current date for the given org. | [optional] **ingestedEventsBytesSum** | **Long** | Shows the sum of all log bytes ingested over all hours in the current date for the given org. | [optional] +**iotDeviceAggSum** | **Long** | Shows the sum of all IoT devices over all hours in the current date for the given org. | [optional] +**iotDeviceTop99pSum** | **Long** | Shows the 99th percentile of all IoT devices over all hours in the current date for the given org. | [optional] **mobileRumSessionCountAndroidSum** | **Long** | Shows the sum of all mobile RUM Sessions on Android over all hours in the current date for the given org. | [optional] **mobileRumSessionCountIosSum** | **Long** | Shows the sum of all mobile RUM Sessions on iOS over all hours in the current date for the given org. | [optional] **mobileRumSessionCountSum** | **Long** | Shows the sum of all mobile RUM Sessions over all hours in the current date for the given org. | [optional] diff --git a/api_docs/v1/UsageSummaryResponse.md b/api_docs/v1/UsageSummaryResponse.md index 3b63bbefd5b..0437d80fc02 100644 --- a/api_docs/v1/UsageSummaryResponse.md +++ b/api_docs/v1/UsageSummaryResponse.md @@ -27,6 +27,8 @@ Name | Type | Description | Notes **indexedEventsCountAggSum** | **Long** | Shows the sum of all log events indexed over all hours in the current months for all organizations. | [optional] **infraHostTop99pSum** | **Long** | Shows the 99th percentile of all distinct infrastructure hosts over all hours in the current months for all organizations. | [optional] **ingestedEventsBytesAggSum** | **Long** | Shows the sum of all log bytes ingested over all hours in the current months for all organizations. | [optional] +**iotDeviceAggSum** | **Long** | Shows the sum of all IoT devices over all hours in the current months for all organizations. | [optional] +**iotDeviceTop99pSum** | **Long** | Shows the 99th percentile of all IoT devices over all hours in the current months of all organizations. | [optional] **lastUpdated** | **OffsetDateTime** | Shows the the most recent hour in the current months for all organizations for which all usages were calculated. | [optional] **liveIndexedEventsAggSum** | **Long** | Shows the sum of all live logs indexed over all hours in the current months for all organizations (data available as of December 1, 2020). | [optional] **liveIngestedBytesAggSum** | **Long** | Shows the sum of all live logs bytes ingested over all hours in the current months for all organizations (data available as of December 1, 2020). | [optional] diff --git a/src/main/java/com/datadog/api/v1/client/api/UsageMeteringApi.java b/src/main/java/com/datadog/api/v1/client/api/UsageMeteringApi.java index d8bb06d390d..616e5d64d14 100644 --- a/src/main/java/com/datadog/api/v1/client/api/UsageMeteringApi.java +++ b/src/main/java/com/datadog/api/v1/client/api/UsageMeteringApi.java @@ -20,6 +20,7 @@ import com.datadog.api.v1.client.model.UsageIncidentManagementResponse; import com.datadog.api.v1.client.model.UsageIndexedSpansResponse; import com.datadog.api.v1.client.model.UsageIngestedSpansResponse; +import com.datadog.api.v1.client.model.UsageIoTResponse; import com.datadog.api.v1.client.model.UsageLambdaResponse; import com.datadog.api.v1.client.model.UsageLogsByIndexResponse; import com.datadog.api.v1.client.model.UsageLogsResponse; @@ -1686,6 +1687,126 @@ public APIgetUsageIndexedSpansRequest getUsageIndexedSpans() throws ApiException return new APIgetUsageIndexedSpansRequest(); } +private ApiResponse getUsageInternetOfThingsWithHttpInfo(OffsetDateTime startHr, OffsetDateTime endHr) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'startHr' is set + if (startHr == null) { + throw new ApiException(400, "Missing the required parameter 'startHr' when calling getUsageInternetOfThings"); + } + + // create path and map variables + String localVarPath = "/api/v1/usage/iot"; + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "start_hr", startHr)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "end_hr", endHr)); + + // Set Operation-ID header for telemetry + localVarHeaderParams.put("DD-OPERATION-ID", "getUsageInternetOfThings"); + + + + + final String[] localVarAccepts = { + "application/json;datetime-format=rfc3339" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "apiKeyAuth", "appKeyAuth" }; + + GenericType localVarReturnType = new GenericType() {}; + + return apiClient.invokeAPI("UsageMeteringApi.getUsageInternetOfThings", localVarPath, "GET", localVarQueryParams, localVarPostBody, + localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, + localVarAuthNames, localVarReturnType, false); + } + + public class APIgetUsageInternetOfThingsRequest { + private OffsetDateTime startHr; + private OffsetDateTime endHr; + + private APIgetUsageInternetOfThingsRequest() { + } + + /** + * Set startHr + * @param startHr Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. (required) + * @return APIgetUsageInternetOfThingsRequest + */ + public APIgetUsageInternetOfThingsRequest startHr(OffsetDateTime startHr) { + this.startHr = startHr; + return this; + } + + /** + * Set endHr + * @param endHr Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending **before** this hour. (optional) + * @return APIgetUsageInternetOfThingsRequest + */ + public APIgetUsageInternetOfThingsRequest endHr(OffsetDateTime endHr) { + this.endHr = endHr; + return this; + } + + /** + * Execute getUsageInternetOfThings request + * @return UsageIoTResponse + * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden - User is not authorized -
+ + */ + + public UsageIoTResponse execute() throws ApiException { + return this.executeWithHttpInfo().getData(); + } + + /** + * Execute getUsageInternetOfThings request with HTTP info returned + * @return ApiResponse<UsageIoTResponse> + * @throws ApiException if fails to make API call + * @http.response.details + + + + + +
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden - User is not authorized -
+ + */ + public ApiResponse executeWithHttpInfo() throws ApiException { + return getUsageInternetOfThingsWithHttpInfo(startHr, endHr); + } + } + + /** + * Get hourly usage for IoT + * Get hourly usage for IoT. + * @return getUsageInternetOfThingsRequest + * @throws ApiException if fails to make API call + + + */ + public APIgetUsageInternetOfThingsRequest getUsageInternetOfThings() throws ApiException { + return new APIgetUsageInternetOfThingsRequest(); + } + private ApiResponse getUsageLambdaWithHttpInfo(OffsetDateTime startHr, OffsetDateTime endHr) throws ApiException { Object localVarPostBody = null; diff --git a/src/main/java/com/datadog/api/v1/client/model/UsageIoTHour.java b/src/main/java/com/datadog/api/v1/client/model/UsageIoTHour.java new file mode 100644 index 00000000000..c4002c11790 --- /dev/null +++ b/src/main/java/com/datadog/api/v1/client/model/UsageIoTHour.java @@ -0,0 +1,139 @@ +/* + * 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 java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.datadog.api.v1.client.JSON; + + +/** + * IoT usage for a given organization for a given hour. + */ +@ApiModel(description = "IoT usage for a given organization for a given hour.") +@JsonPropertyOrder({ + UsageIoTHour.JSON_PROPERTY_HOUR, + UsageIoTHour.JSON_PROPERTY_IOT_DEVICE_COUNT +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UsageIoTHour { + public static final String JSON_PROPERTY_HOUR = "hour"; + private OffsetDateTime hour; + + public static final String JSON_PROPERTY_IOT_DEVICE_COUNT = "iot_device_count"; + private Long iotDeviceCount; + + + public UsageIoTHour hour(OffsetDateTime hour) { + this.hour = hour; + return this; + } + + /** + * The hour for the usage. + * @return hour + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "The hour for the usage.") + @JsonProperty(JSON_PROPERTY_HOUR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getHour() { + return hour; + } + + + public void setHour(OffsetDateTime hour) { + this.hour = hour; + } + + + public UsageIoTHour iotDeviceCount(Long iotDeviceCount) { + this.iotDeviceCount = iotDeviceCount; + return this; + } + + /** + * The total number of IoT device hours from the start of the given hour's month until the given hour. + * @return iotDeviceCount + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "The total number of IoT device hours from the start of the given hour's month until the given hour.") + @JsonProperty(JSON_PROPERTY_IOT_DEVICE_COUNT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getIotDeviceCount() { + return iotDeviceCount; + } + + + public void setIotDeviceCount(Long iotDeviceCount) { + this.iotDeviceCount = iotDeviceCount; + } + + + /** + * Return true if this UsageIoTHour object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UsageIoTHour usageIoTHour = (UsageIoTHour) o; + return Objects.equals(this.hour, usageIoTHour.hour) && + Objects.equals(this.iotDeviceCount, usageIoTHour.iotDeviceCount); + } + + @Override + public int hashCode() { + return Objects.hash(hour, iotDeviceCount); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UsageIoTHour {\n"); + sb.append(" hour: ").append(toIndentedString(hour)).append("\n"); + sb.append(" iotDeviceCount: ").append(toIndentedString(iotDeviceCount)).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 "); + } + +} + diff --git a/src/main/java/com/datadog/api/v1/client/model/UsageIoTResponse.java b/src/main/java/com/datadog/api/v1/client/model/UsageIoTResponse.java new file mode 100644 index 00000000000..855c619502e --- /dev/null +++ b/src/main/java/com/datadog/api/v1/client/model/UsageIoTResponse.java @@ -0,0 +1,119 @@ +/* + * 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 java.util.Objects; +import java.util.Arrays; +import java.util.Map; +import java.util.HashMap; +import com.datadog.api.v1.client.model.UsageIoTHour; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.datadog.api.v1.client.JSON; + + +/** + * Response containing the IoT usage for each hour for a given organization. + */ +@ApiModel(description = "Response containing the IoT usage for each hour for a given organization.") +@JsonPropertyOrder({ + UsageIoTResponse.JSON_PROPERTY_USAGE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class UsageIoTResponse { + public static final String JSON_PROPERTY_USAGE = "usage"; + private List usage = null; + + + public UsageIoTResponse usage(List usage) { + this.usage = usage; + return this; + } + + public UsageIoTResponse addUsageItem(UsageIoTHour usageItem) { + if (this.usage == null) { + this.usage = new ArrayList<>(); + } + this.usage.add(usageItem); + return this; + } + + /** + * Get hourly usage for IoT. + * @return usage + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Get hourly usage for IoT.") + @JsonProperty(JSON_PROPERTY_USAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getUsage() { + return usage; + } + + + public void setUsage(List usage) { + this.usage = usage; + } + + + /** + * Return true if this UsageIoTResponse object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UsageIoTResponse usageIoTResponse = (UsageIoTResponse) o; + return Objects.equals(this.usage, usageIoTResponse.usage); + } + + @Override + public int hashCode() { + return Objects.hash(usage); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UsageIoTResponse {\n"); + sb.append(" usage: ").append(toIndentedString(usage)).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 "); + } + +} + diff --git a/src/main/java/com/datadog/api/v1/client/model/UsageSummaryDate.java b/src/main/java/com/datadog/api/v1/client/model/UsageSummaryDate.java index a2814a1c918..a92b57da727 100644 --- a/src/main/java/com/datadog/api/v1/client/model/UsageSummaryDate.java +++ b/src/main/java/com/datadog/api/v1/client/model/UsageSummaryDate.java @@ -54,6 +54,8 @@ UsageSummaryDate.JSON_PROPERTY_INDEXED_EVENTS_COUNT_SUM, UsageSummaryDate.JSON_PROPERTY_INFRA_HOST_TOP99P, UsageSummaryDate.JSON_PROPERTY_INGESTED_EVENTS_BYTES_SUM, + UsageSummaryDate.JSON_PROPERTY_IOT_DEVICE_AGG_SUM, + UsageSummaryDate.JSON_PROPERTY_IOT_DEVICE_TOP99P_SUM, UsageSummaryDate.JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_ANDROID_SUM, UsageSummaryDate.JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_IOS_SUM, UsageSummaryDate.JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_SUM, @@ -127,6 +129,12 @@ public class UsageSummaryDate { public static final String JSON_PROPERTY_INGESTED_EVENTS_BYTES_SUM = "ingested_events_bytes_sum"; private Long ingestedEventsBytesSum; + public static final String JSON_PROPERTY_IOT_DEVICE_AGG_SUM = "iot_device_agg_sum"; + private Long iotDeviceAggSum; + + public static final String JSON_PROPERTY_IOT_DEVICE_TOP99P_SUM = "iot_device_top99p_sum"; + private Long iotDeviceTop99pSum; + public static final String JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_ANDROID_SUM = "mobile_rum_session_count_android_sum"; private Long mobileRumSessionCountAndroidSum; @@ -623,6 +631,54 @@ public void setIngestedEventsBytesSum(Long ingestedEventsBytesSum) { } + public UsageSummaryDate iotDeviceAggSum(Long iotDeviceAggSum) { + this.iotDeviceAggSum = iotDeviceAggSum; + return this; + } + + /** + * Shows the sum of all IoT devices over all hours in the current date for all organizations. + * @return iotDeviceAggSum + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Shows the sum of all IoT devices over all hours in the current date for all organizations.") + @JsonProperty(JSON_PROPERTY_IOT_DEVICE_AGG_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getIotDeviceAggSum() { + return iotDeviceAggSum; + } + + + public void setIotDeviceAggSum(Long iotDeviceAggSum) { + this.iotDeviceAggSum = iotDeviceAggSum; + } + + + public UsageSummaryDate iotDeviceTop99pSum(Long iotDeviceTop99pSum) { + this.iotDeviceTop99pSum = iotDeviceTop99pSum; + return this; + } + + /** + * Shows the 99th percentile of all IoT devices over all hours in the current date all organizations. + * @return iotDeviceTop99pSum + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Shows the 99th percentile of all IoT devices over all hours in the current date all organizations.") + @JsonProperty(JSON_PROPERTY_IOT_DEVICE_TOP99P_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getIotDeviceTop99pSum() { + return iotDeviceTop99pSum; + } + + + public void setIotDeviceTop99pSum(Long iotDeviceTop99pSum) { + this.iotDeviceTop99pSum = iotDeviceTop99pSum; + } + + public UsageSummaryDate mobileRumSessionCountAndroidSum(Long mobileRumSessionCountAndroidSum) { this.mobileRumSessionCountAndroidSum = mobileRumSessionCountAndroidSum; return this; @@ -974,6 +1030,8 @@ public boolean equals(Object o) { Objects.equals(this.indexedEventsCountSum, usageSummaryDate.indexedEventsCountSum) && Objects.equals(this.infraHostTop99p, usageSummaryDate.infraHostTop99p) && Objects.equals(this.ingestedEventsBytesSum, usageSummaryDate.ingestedEventsBytesSum) && + Objects.equals(this.iotDeviceAggSum, usageSummaryDate.iotDeviceAggSum) && + Objects.equals(this.iotDeviceTop99pSum, usageSummaryDate.iotDeviceTop99pSum) && Objects.equals(this.mobileRumSessionCountAndroidSum, usageSummaryDate.mobileRumSessionCountAndroidSum) && Objects.equals(this.mobileRumSessionCountIosSum, usageSummaryDate.mobileRumSessionCountIosSum) && Objects.equals(this.mobileRumSessionCountSum, usageSummaryDate.mobileRumSessionCountSum) && @@ -991,7 +1049,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(agentHostTop99p, apmAzureAppServiceHostTop99p, apmHostTop99p, awsHostTop99p, awsLambdaFuncCount, awsLambdaInvocationsSum, azureAppServiceTop99p, billableIngestedBytesSum, containerAvg, containerHwm, customTsAvg, date, fargateTasksCountAvg, fargateTasksCountHwm, gcpHostTop99p, incidentManagementMonthlyActiveUsersHwm, indexedEventsCountSum, infraHostTop99p, ingestedEventsBytesSum, mobileRumSessionCountAndroidSum, mobileRumSessionCountIosSum, mobileRumSessionCountSum, netflowIndexedEventsCountSum, npmHostTop99p, orgs, profilingHostTop99p, rumSessionCountSum, rumTotalSessionCountSum, syntheticsBrowserCheckCallsCountSum, syntheticsCheckCallsCountSum, traceSearchIndexedEventsCountSum, twolIngestedEventsBytesSum); + return Objects.hash(agentHostTop99p, apmAzureAppServiceHostTop99p, apmHostTop99p, awsHostTop99p, awsLambdaFuncCount, awsLambdaInvocationsSum, azureAppServiceTop99p, billableIngestedBytesSum, containerAvg, containerHwm, customTsAvg, date, fargateTasksCountAvg, fargateTasksCountHwm, gcpHostTop99p, incidentManagementMonthlyActiveUsersHwm, indexedEventsCountSum, infraHostTop99p, ingestedEventsBytesSum, iotDeviceAggSum, iotDeviceTop99pSum, mobileRumSessionCountAndroidSum, mobileRumSessionCountIosSum, mobileRumSessionCountSum, netflowIndexedEventsCountSum, npmHostTop99p, orgs, profilingHostTop99p, rumSessionCountSum, rumTotalSessionCountSum, syntheticsBrowserCheckCallsCountSum, syntheticsCheckCallsCountSum, traceSearchIndexedEventsCountSum, twolIngestedEventsBytesSum); } @@ -1018,6 +1076,8 @@ public String toString() { sb.append(" indexedEventsCountSum: ").append(toIndentedString(indexedEventsCountSum)).append("\n"); sb.append(" infraHostTop99p: ").append(toIndentedString(infraHostTop99p)).append("\n"); sb.append(" ingestedEventsBytesSum: ").append(toIndentedString(ingestedEventsBytesSum)).append("\n"); + sb.append(" iotDeviceAggSum: ").append(toIndentedString(iotDeviceAggSum)).append("\n"); + sb.append(" iotDeviceTop99pSum: ").append(toIndentedString(iotDeviceTop99pSum)).append("\n"); sb.append(" mobileRumSessionCountAndroidSum: ").append(toIndentedString(mobileRumSessionCountAndroidSum)).append("\n"); sb.append(" mobileRumSessionCountIosSum: ").append(toIndentedString(mobileRumSessionCountIosSum)).append("\n"); sb.append(" mobileRumSessionCountSum: ").append(toIndentedString(mobileRumSessionCountSum)).append("\n"); diff --git a/src/main/java/com/datadog/api/v1/client/model/UsageSummaryDateOrg.java b/src/main/java/com/datadog/api/v1/client/model/UsageSummaryDateOrg.java index 26e4c844c0a..8731a8dcc73 100644 --- a/src/main/java/com/datadog/api/v1/client/model/UsageSummaryDateOrg.java +++ b/src/main/java/com/datadog/api/v1/client/model/UsageSummaryDateOrg.java @@ -50,6 +50,8 @@ UsageSummaryDateOrg.JSON_PROPERTY_INDEXED_EVENTS_COUNT_SUM, UsageSummaryDateOrg.JSON_PROPERTY_INFRA_HOST_TOP99P, UsageSummaryDateOrg.JSON_PROPERTY_INGESTED_EVENTS_BYTES_SUM, + UsageSummaryDateOrg.JSON_PROPERTY_IOT_DEVICE_AGG_SUM, + UsageSummaryDateOrg.JSON_PROPERTY_IOT_DEVICE_TOP99P_SUM, UsageSummaryDateOrg.JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_ANDROID_SUM, UsageSummaryDateOrg.JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_IOS_SUM, UsageSummaryDateOrg.JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_SUM, @@ -124,6 +126,12 @@ public class UsageSummaryDateOrg { public static final String JSON_PROPERTY_INGESTED_EVENTS_BYTES_SUM = "ingested_events_bytes_sum"; private Long ingestedEventsBytesSum; + public static final String JSON_PROPERTY_IOT_DEVICE_AGG_SUM = "iot_device_agg_sum"; + private Long iotDeviceAggSum; + + public static final String JSON_PROPERTY_IOT_DEVICE_TOP99P_SUM = "iot_device_top99p_sum"; + private Long iotDeviceTop99pSum; + public static final String JSON_PROPERTY_MOBILE_RUM_SESSION_COUNT_ANDROID_SUM = "mobile_rum_session_count_android_sum"; private Long mobileRumSessionCountAndroidSum; @@ -623,6 +631,54 @@ public void setIngestedEventsBytesSum(Long ingestedEventsBytesSum) { } + public UsageSummaryDateOrg iotDeviceAggSum(Long iotDeviceAggSum) { + this.iotDeviceAggSum = iotDeviceAggSum; + return this; + } + + /** + * Shows the sum of all IoT devices over all hours in the current date for the given org. + * @return iotDeviceAggSum + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Shows the sum of all IoT devices over all hours in the current date for the given org.") + @JsonProperty(JSON_PROPERTY_IOT_DEVICE_AGG_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getIotDeviceAggSum() { + return iotDeviceAggSum; + } + + + public void setIotDeviceAggSum(Long iotDeviceAggSum) { + this.iotDeviceAggSum = iotDeviceAggSum; + } + + + public UsageSummaryDateOrg iotDeviceTop99pSum(Long iotDeviceTop99pSum) { + this.iotDeviceTop99pSum = iotDeviceTop99pSum; + return this; + } + + /** + * Shows the 99th percentile of all IoT devices over all hours in the current date for the given org. + * @return iotDeviceTop99pSum + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Shows the 99th percentile of all IoT devices over all hours in the current date for the given org.") + @JsonProperty(JSON_PROPERTY_IOT_DEVICE_TOP99P_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getIotDeviceTop99pSum() { + return iotDeviceTop99pSum; + } + + + public void setIotDeviceTop99pSum(Long iotDeviceTop99pSum) { + this.iotDeviceTop99pSum = iotDeviceTop99pSum; + } + + public UsageSummaryDateOrg mobileRumSessionCountAndroidSum(Long mobileRumSessionCountAndroidSum) { this.mobileRumSessionCountAndroidSum = mobileRumSessionCountAndroidSum; return this; @@ -990,6 +1046,8 @@ public boolean equals(Object o) { Objects.equals(this.indexedEventsCountSum, usageSummaryDateOrg.indexedEventsCountSum) && Objects.equals(this.infraHostTop99p, usageSummaryDateOrg.infraHostTop99p) && Objects.equals(this.ingestedEventsBytesSum, usageSummaryDateOrg.ingestedEventsBytesSum) && + Objects.equals(this.iotDeviceAggSum, usageSummaryDateOrg.iotDeviceAggSum) && + Objects.equals(this.iotDeviceTop99pSum, usageSummaryDateOrg.iotDeviceTop99pSum) && Objects.equals(this.mobileRumSessionCountAndroidSum, usageSummaryDateOrg.mobileRumSessionCountAndroidSum) && Objects.equals(this.mobileRumSessionCountIosSum, usageSummaryDateOrg.mobileRumSessionCountIosSum) && Objects.equals(this.mobileRumSessionCountSum, usageSummaryDateOrg.mobileRumSessionCountSum) && @@ -1008,7 +1066,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(agentHostTop99p, apmAzureAppServiceHostTop99p, apmHostTop99p, awsHostTop99p, awsLambdaFuncCount, awsLambdaInvocationsSum, azureAppServiceTop99p, billableIngestedBytesSum, containerAvg, containerHwm, customTsAvg, fargateTasksCountAvg, fargateTasksCountHwm, gcpHostTop99p, id, incidentManagementMonthlyActiveUsersHwm, indexedEventsCountSum, infraHostTop99p, ingestedEventsBytesSum, mobileRumSessionCountAndroidSum, mobileRumSessionCountIosSum, mobileRumSessionCountSum, name, netflowIndexedEventsCountSum, npmHostTop99p, profilingHostTop99p, publicId, rumSessionCountSum, rumTotalSessionCountSum, syntheticsBrowserCheckCallsCountSum, syntheticsCheckCallsCountSum, traceSearchIndexedEventsCountSum, twolIngestedEventsBytesSum); + return Objects.hash(agentHostTop99p, apmAzureAppServiceHostTop99p, apmHostTop99p, awsHostTop99p, awsLambdaFuncCount, awsLambdaInvocationsSum, azureAppServiceTop99p, billableIngestedBytesSum, containerAvg, containerHwm, customTsAvg, fargateTasksCountAvg, fargateTasksCountHwm, gcpHostTop99p, id, incidentManagementMonthlyActiveUsersHwm, indexedEventsCountSum, infraHostTop99p, ingestedEventsBytesSum, iotDeviceAggSum, iotDeviceTop99pSum, mobileRumSessionCountAndroidSum, mobileRumSessionCountIosSum, mobileRumSessionCountSum, name, netflowIndexedEventsCountSum, npmHostTop99p, profilingHostTop99p, publicId, rumSessionCountSum, rumTotalSessionCountSum, syntheticsBrowserCheckCallsCountSum, syntheticsCheckCallsCountSum, traceSearchIndexedEventsCountSum, twolIngestedEventsBytesSum); } @@ -1035,6 +1093,8 @@ public String toString() { sb.append(" indexedEventsCountSum: ").append(toIndentedString(indexedEventsCountSum)).append("\n"); sb.append(" infraHostTop99p: ").append(toIndentedString(infraHostTop99p)).append("\n"); sb.append(" ingestedEventsBytesSum: ").append(toIndentedString(ingestedEventsBytesSum)).append("\n"); + sb.append(" iotDeviceAggSum: ").append(toIndentedString(iotDeviceAggSum)).append("\n"); + sb.append(" iotDeviceTop99pSum: ").append(toIndentedString(iotDeviceTop99pSum)).append("\n"); sb.append(" mobileRumSessionCountAndroidSum: ").append(toIndentedString(mobileRumSessionCountAndroidSum)).append("\n"); sb.append(" mobileRumSessionCountIosSum: ").append(toIndentedString(mobileRumSessionCountIosSum)).append("\n"); sb.append(" mobileRumSessionCountSum: ").append(toIndentedString(mobileRumSessionCountSum)).append("\n"); diff --git a/src/main/java/com/datadog/api/v1/client/model/UsageSummaryResponse.java b/src/main/java/com/datadog/api/v1/client/model/UsageSummaryResponse.java index 49699282977..a905b636229 100644 --- a/src/main/java/com/datadog/api/v1/client/model/UsageSummaryResponse.java +++ b/src/main/java/com/datadog/api/v1/client/model/UsageSummaryResponse.java @@ -55,6 +55,8 @@ UsageSummaryResponse.JSON_PROPERTY_INDEXED_EVENTS_COUNT_AGG_SUM, UsageSummaryResponse.JSON_PROPERTY_INFRA_HOST_TOP99P_SUM, UsageSummaryResponse.JSON_PROPERTY_INGESTED_EVENTS_BYTES_AGG_SUM, + UsageSummaryResponse.JSON_PROPERTY_IOT_DEVICE_AGG_SUM, + UsageSummaryResponse.JSON_PROPERTY_IOT_DEVICE_TOP99P_SUM, UsageSummaryResponse.JSON_PROPERTY_LAST_UPDATED, UsageSummaryResponse.JSON_PROPERTY_LIVE_INDEXED_EVENTS_AGG_SUM, UsageSummaryResponse.JSON_PROPERTY_LIVE_INGESTED_BYTES_AGG_SUM, @@ -138,6 +140,12 @@ public class UsageSummaryResponse { public static final String JSON_PROPERTY_INGESTED_EVENTS_BYTES_AGG_SUM = "ingested_events_bytes_agg_sum"; private Long ingestedEventsBytesAggSum; + public static final String JSON_PROPERTY_IOT_DEVICE_AGG_SUM = "iot_device_agg_sum"; + private Long iotDeviceAggSum; + + public static final String JSON_PROPERTY_IOT_DEVICE_TOP99P_SUM = "iot_device_top99p_sum"; + private Long iotDeviceTop99pSum; + public static final String JSON_PROPERTY_LAST_UPDATED = "last_updated"; private OffsetDateTime lastUpdated; @@ -679,6 +687,54 @@ public void setIngestedEventsBytesAggSum(Long ingestedEventsBytesAggSum) { } + public UsageSummaryResponse iotDeviceAggSum(Long iotDeviceAggSum) { + this.iotDeviceAggSum = iotDeviceAggSum; + return this; + } + + /** + * Shows the sum of all IoT devices over all hours in the current months for all organizations. + * @return iotDeviceAggSum + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Shows the sum of all IoT devices over all hours in the current months for all organizations.") + @JsonProperty(JSON_PROPERTY_IOT_DEVICE_AGG_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getIotDeviceAggSum() { + return iotDeviceAggSum; + } + + + public void setIotDeviceAggSum(Long iotDeviceAggSum) { + this.iotDeviceAggSum = iotDeviceAggSum; + } + + + public UsageSummaryResponse iotDeviceTop99pSum(Long iotDeviceTop99pSum) { + this.iotDeviceTop99pSum = iotDeviceTop99pSum; + return this; + } + + /** + * Shows the 99th percentile of all IoT devices over all hours in the current months of all organizations. + * @return iotDeviceTop99pSum + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Shows the 99th percentile of all IoT devices over all hours in the current months of all organizations.") + @JsonProperty(JSON_PROPERTY_IOT_DEVICE_TOP99P_SUM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getIotDeviceTop99pSum() { + return iotDeviceTop99pSum; + } + + + public void setIotDeviceTop99pSum(Long iotDeviceTop99pSum) { + this.iotDeviceTop99pSum = iotDeviceTop99pSum; + } + + public UsageSummaryResponse lastUpdated(OffsetDateTime lastUpdated) { this.lastUpdated = lastUpdated; return this; @@ -1199,6 +1255,8 @@ public boolean equals(Object o) { Objects.equals(this.indexedEventsCountAggSum, usageSummaryResponse.indexedEventsCountAggSum) && Objects.equals(this.infraHostTop99pSum, usageSummaryResponse.infraHostTop99pSum) && Objects.equals(this.ingestedEventsBytesAggSum, usageSummaryResponse.ingestedEventsBytesAggSum) && + Objects.equals(this.iotDeviceAggSum, usageSummaryResponse.iotDeviceAggSum) && + Objects.equals(this.iotDeviceTop99pSum, usageSummaryResponse.iotDeviceTop99pSum) && Objects.equals(this.lastUpdated, usageSummaryResponse.lastUpdated) && Objects.equals(this.liveIndexedEventsAggSum, usageSummaryResponse.liveIndexedEventsAggSum) && Objects.equals(this.liveIngestedBytesAggSum, usageSummaryResponse.liveIngestedBytesAggSum) && @@ -1223,7 +1281,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(agentHostTop99pSum, apmAzureAppServiceHostTop99pSum, apmHostTop99pSum, awsHostTop99pSum, awsLambdaFuncCount, awsLambdaInvocationsSum, azureAppServiceTop99pSum, azureHostTop99pSum, billableIngestedBytesAggSum, containerAvgSum, containerHwmSum, customTsSum, endDate, fargateTasksCountAvgSum, fargateTasksCountHwmSum, gcpHostTop99pSum, incidentManagementMonthlyActiveUsersHwmSum, indexedEventsCountAggSum, infraHostTop99pSum, ingestedEventsBytesAggSum, lastUpdated, liveIndexedEventsAggSum, liveIngestedBytesAggSum, mobileRumSessionCountAggSum, mobileRumSessionCountAndroidAggSum, mobileRumSessionCountIosAggSum, netflowIndexedEventsCountAggSum, npmHostTop99pSum, profilingContainerAgentCountAvg, profilingHostCountTop99pSum, rehydratedIndexedEventsAggSum, rehydratedIngestedBytesAggSum, rumSessionCountAggSum, rumTotalSessionCountAggSum, startDate, syntheticsBrowserCheckCallsCountAggSum, syntheticsCheckCallsCountAggSum, traceSearchIndexedEventsCountAggSum, twolIngestedEventsBytesAggSum, usage); + return Objects.hash(agentHostTop99pSum, apmAzureAppServiceHostTop99pSum, apmHostTop99pSum, awsHostTop99pSum, awsLambdaFuncCount, awsLambdaInvocationsSum, azureAppServiceTop99pSum, azureHostTop99pSum, billableIngestedBytesAggSum, containerAvgSum, containerHwmSum, customTsSum, endDate, fargateTasksCountAvgSum, fargateTasksCountHwmSum, gcpHostTop99pSum, incidentManagementMonthlyActiveUsersHwmSum, indexedEventsCountAggSum, infraHostTop99pSum, ingestedEventsBytesAggSum, iotDeviceAggSum, iotDeviceTop99pSum, lastUpdated, liveIndexedEventsAggSum, liveIngestedBytesAggSum, mobileRumSessionCountAggSum, mobileRumSessionCountAndroidAggSum, mobileRumSessionCountIosAggSum, netflowIndexedEventsCountAggSum, npmHostTop99pSum, profilingContainerAgentCountAvg, profilingHostCountTop99pSum, rehydratedIndexedEventsAggSum, rehydratedIngestedBytesAggSum, rumSessionCountAggSum, rumTotalSessionCountAggSum, startDate, syntheticsBrowserCheckCallsCountAggSum, syntheticsCheckCallsCountAggSum, traceSearchIndexedEventsCountAggSum, twolIngestedEventsBytesAggSum, usage); } @@ -1251,6 +1309,8 @@ public String toString() { sb.append(" indexedEventsCountAggSum: ").append(toIndentedString(indexedEventsCountAggSum)).append("\n"); sb.append(" infraHostTop99pSum: ").append(toIndentedString(infraHostTop99pSum)).append("\n"); sb.append(" ingestedEventsBytesAggSum: ").append(toIndentedString(ingestedEventsBytesAggSum)).append("\n"); + sb.append(" iotDeviceAggSum: ").append(toIndentedString(iotDeviceAggSum)).append("\n"); + sb.append(" iotDeviceTop99pSum: ").append(toIndentedString(iotDeviceTop99pSum)).append("\n"); sb.append(" lastUpdated: ").append(toIndentedString(lastUpdated)).append("\n"); sb.append(" liveIndexedEventsAggSum: ").append(toIndentedString(liveIndexedEventsAggSum)).append("\n"); sb.append(" liveIngestedBytesAggSum: ").append(toIndentedString(liveIngestedBytesAggSum)).append("\n"); diff --git a/src/main/java/com/datadog/api/v1/openapi.yaml b/src/main/java/com/datadog/api/v1/openapi.yaml index 3c8e3a48c34..94ab5b66703 100644 --- a/src/main/java/com/datadog/api/v1/openapi.yaml +++ b/src/main/java/com/datadog/api/v1/openapi.yaml @@ -8483,6 +8483,28 @@ components: $ref: '#/components/schemas/UsageIngestedSpansHour' type: array type: object + UsageIoTHour: + description: IoT usage for a given organization for a given hour. + properties: + hour: + description: The hour for the usage. + format: date-time + type: string + iot_device_count: + description: The total number of IoT device hours from the start of the + given hour's month until the given hour. + format: int64 + type: integer + type: object + UsageIoTResponse: + description: Response containing the IoT usage for each hour for a given organization. + properties: + usage: + description: Get hourly usage for IoT. + items: + $ref: '#/components/schemas/UsageIoTHour' + type: array + type: object UsageLambdaHour: description: 'Number of lambda functions and sum of the invocations of all lambda functions @@ -8922,6 +8944,16 @@ components: current date for all organizations. format: int64 type: integer + iot_device_agg_sum: + description: Shows the sum of all IoT devices over all hours in the current + date for all organizations. + format: int64 + type: integer + iot_device_top99p_sum: + description: Shows the 99th percentile of all IoT devices over all hours + in the current date all organizations. + format: int64 + type: integer mobile_rum_session_count_android_sum: description: Shows the sum of all mobile RUM Sessions on Android over all hours in the current date for all organizations. @@ -9084,6 +9116,16 @@ components: current date for the given org. format: int64 type: integer + iot_device_agg_sum: + description: Shows the sum of all IoT devices over all hours in the current + date for the given org. + format: int64 + type: integer + iot_device_top99p_sum: + description: Shows the 99th percentile of all IoT devices over all hours + in the current date for the given org. + format: int64 + type: integer mobile_rum_session_count_android_sum: description: Shows the sum of all mobile RUM Sessions on Android over all hours in the current date for the given org. @@ -9254,6 +9296,16 @@ components: current months for all organizations. format: int64 type: integer + iot_device_agg_sum: + description: Shows the sum of all IoT devices over all hours in the current + months for all organizations. + format: int64 + type: integer + iot_device_top99p_sum: + description: Shows the 99th percentile of all IoT devices over all hours + in the current months of all organizations. + format: int64 + type: integer last_updated: description: Shows the the most recent hour in the current months for all organizations for which all usages were calculated. @@ -16744,6 +16796,53 @@ paths: - Usage Metering x-undo: type: safe + /api/v1/usage/iot: + get: + description: Get hourly usage for IoT. + operationId: GetUsageInternetOfThings + parameters: + - description: 'Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` + for usage beginning at this hour.' + in: query + name: start_hr + required: true + schema: + format: date-time + type: string + - description: 'Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` + for usage ending + + **before** this hour.' + in: query + name: end_hr + required: false + schema: + format: date-time + type: string + responses: + '200': + content: + application/json;datetime-format=rfc3339: + schema: + $ref: '#/components/schemas/UsageIoTResponse' + description: OK + '400': + content: + application/json;datetime-format=rfc3339: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request + '403': + content: + application/json;datetime-format=rfc3339: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Forbidden - User is not authorized + summary: Get hourly usage for IoT + tags: + - Usage Metering + x-undo: + type: safe /api/v1/usage/logs: get: description: Get hourly usage for logs. diff --git a/src/test/resources/com/datadog/api/v1/client/api/undo.json b/src/test/resources/com/datadog/api/v1/client/api/undo.json index dfcaf2ae837..7a2f3d48daa 100644 --- a/src/test/resources/com/datadog/api/v1/client/api/undo.json +++ b/src/test/resources/com/datadog/api/v1/client/api/undo.json @@ -982,6 +982,12 @@ "type": "safe" } }, + "GetUsageInternetOfThings": { + "tag": "Usage Metering", + "undo": { + "type": "safe" + } + }, "GetUsageLogs": { "tag": "Usage Metering", "undo": { diff --git a/src/test/resources/com/datadog/api/v1/client/api/usage_metering.feature b/src/test/resources/com/datadog/api/v1/client/api/usage_metering.feature index 9a82ed8c79e..a2e14549003 100644 --- a/src/test/resources/com/datadog/api/v1/client/api/usage_metering.feature +++ b/src/test/resources/com/datadog/api/v1/client/api/usage_metering.feature @@ -43,6 +43,18 @@ Feature: Usage Metering When the request is sent Then the response status is 200 OK + @generated @skip + Scenario: Get hourly usage for IoT returns "Bad Request" response + Given new "GetUsageInternetOfThings" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip + Scenario: Get hourly usage for IoT returns "OK" response + Given new "GetUsageInternetOfThings" request + When the request is sent + Then the response status is 200 OK + @generated @skip Scenario: Get hourly usage for Lambda returns "Bad Request" response Given new "GetUsageLambda" request