diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 9e31333a3d0..329c447be34 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -1799,7 +1799,9 @@ components: example: cd73a516-a481-4af5-8352-9b577465c77b type: string RumRetentionQuotaScopeTypeParameter: - description: The type of scope the retention quota configuration applies to. + description: |- + The type of scope the retention quota configuration applies to. + `application` is the only supported scope type. in: path name: scope_type required: true @@ -92488,25 +92490,9 @@ components: $ref: "#/components/schemas/RumRetentionFilterData" type: array type: object - RumRetentionQuotaAdaptiveConfig: - description: The configuration used when `mode` is `adaptive`. - properties: - max_retention_rate: - description: The maximum fraction of sessions to retain, in the range `(0, 1]`. - example: 0.5 - exclusiveMinimum: true - format: double - maximum: 1 - minimum: 0 - type: number - required: - - max_retention_rate - type: object RumRetentionQuotaConfigAttributes: description: The RUM retention quota configuration properties. properties: - adaptive: - $ref: "#/components/schemas/RumRetentionQuotaAdaptiveConfig" custom: $ref: "#/components/schemas/RumRetentionQuotaCustomConfig" mode: @@ -92564,8 +92550,6 @@ components: RumRetentionQuotaConfigUpdateAttributes: description: The RUM retention quota configuration properties to create or update. properties: - adaptive: - $ref: "#/components/schemas/RumRetentionQuotaAdaptiveConfig" custom: $ref: "#/components/schemas/RumRetentionQuotaCustomConfig" mode: @@ -92631,14 +92615,13 @@ components: type: object RumRetentionQuotaMode: description: |- - The retention quota mode. `custom` enforces a fixed session limit, while - `adaptive` dynamically adjusts retention. + The retention quota mode. `custom` enforces a fixed session limit. + `custom` is the only supported mode. enum: - custom - - adaptive example: custom type: string - x-enum-varnames: ["CUSTOM", "ADAPTIVE"] + x-enum-varnames: ["CUSTOM"] RumRetentionQuotaReachedAction: description: The action to take when the session quota is reached. enum: @@ -92649,7 +92632,9 @@ components: x-enum-varnames: ["STOP", "SLOWDOWN"] RumRetentionQuotaScopeType: default: application - description: The type of scope the retention quota configuration applies to. + description: |- + The type of scope the retention quota configuration applies to. + `application` is the only supported scope type. enum: - application example: application @@ -187415,7 +187400,7 @@ paths: $ref: "#/components/responses/TooManyRequestsResponse" summary: Delete a RUM retention quota configuration tags: - - RUM Retention Quota + - RUM Retention Quotas x-permission: operator: OR permissions: @@ -187478,7 +187463,7 @@ paths: $ref: "#/components/responses/TooManyRequestsResponse" summary: Get a RUM retention quota configuration tags: - - RUM Retention Quota + - RUM Retention Quotas x-permission: operator: OR permissions: @@ -187564,7 +187549,7 @@ paths: $ref: "#/components/responses/TooManyRequestsResponse" summary: Create or update a RUM retention quota config tags: - - RUM Retention Quota + - RUM Retention Quotas x-codegen-request-body-name: body x-permission: operator: OR @@ -218487,7 +218472,7 @@ tags: name: RUM Remote Config - description: |- Manage RUM retention quota configurations for your organization's RUM applications. - name: RUM Retention Quota + name: RUM Retention Quotas - description: View and manage Reference Tables in your organization. name: Reference Tables - description: |- diff --git a/examples/v2/rum-retention-quota/DeleteRumQuotaConfig.java b/examples/v2/rum-retention-quotas/DeleteRumQuotaConfig.java similarity index 73% rename from examples/v2/rum-retention-quota/DeleteRumQuotaConfig.java rename to examples/v2/rum-retention-quotas/DeleteRumQuotaConfig.java index b9b38b8728d..7f0f91d3b3e 100644 --- a/examples/v2/rum-retention-quota/DeleteRumQuotaConfig.java +++ b/examples/v2/rum-retention-quotas/DeleteRumQuotaConfig.java @@ -2,19 +2,19 @@ import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; -import com.datadog.api.client.v2.api.RumRetentionQuotaApi; +import com.datadog.api.client.v2.api.RumRetentionQuotasApi; import com.datadog.api.client.v2.model.RumRetentionQuotaScopeType; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); - RumRetentionQuotaApi apiInstance = new RumRetentionQuotaApi(defaultClient); + RumRetentionQuotasApi apiInstance = new RumRetentionQuotasApi(defaultClient); try { apiInstance.deleteRumQuotaConfig( - RumRetentionQuotaScopeType.APPLICATION, "ced16651-97b6-4e67-8590-8caec3af0695"); + RumRetentionQuotaScopeType.APPLICATION, "cd73a516-a481-4af5-8352-9b577465c77b"); } catch (ApiException e) { - System.err.println("Exception when calling RumRetentionQuotaApi#deleteRumQuotaConfig"); + System.err.println("Exception when calling RumRetentionQuotasApi#deleteRumQuotaConfig"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/examples/v2/rum-retention-quota/GetRumQuotaConfig.java b/examples/v2/rum-retention-quotas/GetRumQuotaConfig.java similarity index 76% rename from examples/v2/rum-retention-quota/GetRumQuotaConfig.java rename to examples/v2/rum-retention-quotas/GetRumQuotaConfig.java index c7703f89bc1..cb42be2a572 100644 --- a/examples/v2/rum-retention-quota/GetRumQuotaConfig.java +++ b/examples/v2/rum-retention-quotas/GetRumQuotaConfig.java @@ -2,22 +2,22 @@ import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; -import com.datadog.api.client.v2.api.RumRetentionQuotaApi; +import com.datadog.api.client.v2.api.RumRetentionQuotasApi; import com.datadog.api.client.v2.model.RumRetentionQuotaConfigResponse; import com.datadog.api.client.v2.model.RumRetentionQuotaScopeType; public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); - RumRetentionQuotaApi apiInstance = new RumRetentionQuotaApi(defaultClient); + RumRetentionQuotasApi apiInstance = new RumRetentionQuotasApi(defaultClient); try { RumRetentionQuotaConfigResponse result = apiInstance.getRumQuotaConfig( - RumRetentionQuotaScopeType.APPLICATION, "ced16651-97b6-4e67-8590-8caec3af0695"); + RumRetentionQuotaScopeType.APPLICATION, "cd73a516-a481-4af5-8352-9b577465c77b"); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling RumRetentionQuotaApi#getRumQuotaConfig"); + System.err.println("Exception when calling RumRetentionQuotasApi#getRumQuotaConfig"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/examples/v2/rum-retention-quota/UpsertRumQuotaConfig.java b/examples/v2/rum-retention-quotas/UpsertRumQuotaConfig.java similarity index 82% rename from examples/v2/rum-retention-quota/UpsertRumQuotaConfig.java rename to examples/v2/rum-retention-quotas/UpsertRumQuotaConfig.java index 123adfd1e4b..7d2c78097f3 100644 --- a/examples/v2/rum-retention-quota/UpsertRumQuotaConfig.java +++ b/examples/v2/rum-retention-quotas/UpsertRumQuotaConfig.java @@ -2,8 +2,7 @@ import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; -import com.datadog.api.client.v2.api.RumRetentionQuotaApi; -import com.datadog.api.client.v2.model.RumRetentionQuotaAdaptiveConfig; +import com.datadog.api.client.v2.api.RumRetentionQuotasApi; import com.datadog.api.client.v2.model.RumRetentionQuotaConfigResponse; import com.datadog.api.client.v2.model.RumRetentionQuotaConfigType; import com.datadog.api.client.v2.model.RumRetentionQuotaConfigUpdateAttributes; @@ -18,7 +17,7 @@ public class Example { public static void main(String[] args) { ApiClient defaultClient = ApiClient.getDefaultApiClient(); - RumRetentionQuotaApi apiInstance = new RumRetentionQuotaApi(defaultClient); + RumRetentionQuotasApi apiInstance = new RumRetentionQuotasApi(defaultClient); RumRetentionQuotaConfigUpdateRequest body = new RumRetentionQuotaConfigUpdateRequest() @@ -26,7 +25,6 @@ public static void main(String[] args) { new RumRetentionQuotaConfigUpdateData() .attributes( new RumRetentionQuotaConfigUpdateAttributes() - .adaptive(new RumRetentionQuotaAdaptiveConfig().maxRetentionRate(0.5)) .custom( new RumRetentionQuotaCustomConfig() .dailyResetTime("08:00") @@ -35,16 +33,16 @@ public static void main(String[] args) { .sessionLimit(1000000L) .windowType(RumRetentionQuotaWindowType.DAILY)) .mode(RumRetentionQuotaMode.CUSTOM)) - .id("ced16651-97b6-4e67-8590-8caec3af0695") + .id("cd73a516-a481-4af5-8352-9b577465c77b") .type(RumRetentionQuotaConfigType.RUM_QUOTA_CONFIG)); try { RumRetentionQuotaConfigResponse result = apiInstance.upsertRumQuotaConfig( - RumRetentionQuotaScopeType.APPLICATION, "ced16651-97b6-4e67-8590-8caec3af0695", body); + RumRetentionQuotaScopeType.APPLICATION, "cd73a516-a481-4af5-8352-9b577465c77b", body); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling RumRetentionQuotaApi#upsertRumQuotaConfig"); + System.err.println("Exception when calling RumRetentionQuotasApi#upsertRumQuotaConfig"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); diff --git a/src/main/java/com/datadog/api/client/v2/api/RumRetentionQuotaApi.java b/src/main/java/com/datadog/api/client/v2/api/RumRetentionQuotasApi.java similarity index 92% rename from src/main/java/com/datadog/api/client/v2/api/RumRetentionQuotaApi.java rename to src/main/java/com/datadog/api/client/v2/api/RumRetentionQuotasApi.java index 0d0005c882d..5fe9422d665 100644 --- a/src/main/java/com/datadog/api/client/v2/api/RumRetentionQuotaApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/RumRetentionQuotasApi.java @@ -16,14 +16,14 @@ @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class RumRetentionQuotaApi { +public class RumRetentionQuotasApi { private ApiClient apiClient; - public RumRetentionQuotaApi() { + public RumRetentionQuotasApi() { this(ApiClient.getDefaultApiClient()); } - public RumRetentionQuotaApi(ApiClient apiClient) { + public RumRetentionQuotasApi(ApiClient apiClient) { this.apiClient = apiClient; } @@ -50,8 +50,8 @@ public void setApiClient(ApiClient apiClient) { * *

See {@link #deleteRumQuotaConfigWithHttpInfo}. * - * @param scopeType The type of scope the retention quota configuration applies to. (required, - * default to "application") + * @param scopeType The type of scope the retention quota configuration applies to. + * application is the only supported scope type. (required, default to "application") * @param scopeId The identifier of the scope the retention quota configuration applies to. For * the application scope, this is the RUM application ID. (required) * @throws ApiException if fails to make API call @@ -66,8 +66,8 @@ public void deleteRumQuotaConfig(RumRetentionQuotaScopeType scopeType, String sc * *

See {@link #deleteRumQuotaConfigWithHttpInfoAsync}. * - * @param scopeType The type of scope the retention quota configuration applies to. (required, - * default to "application") + * @param scopeType The type of scope the retention quota configuration applies to. + * application is the only supported scope type. (required, default to "application") * @param scopeId The identifier of the scope the retention quota configuration applies to. For * the application scope, this is the RUM application ID. (required) * @return CompletableFuture @@ -84,7 +84,8 @@ public CompletableFuture deleteRumQuotaConfigAsync( /** * Delete the RUM retention quota configuration for a given scope. * - * @param scopeType The type of scope the retention quota configuration applies to. (required) + * @param scopeType The type of scope the retention quota configuration applies to. + * application is the only supported scope type. (required) * @param scopeId The identifier of the scope the retention quota configuration applies to. For * the application scope, this is the RUM application ID. (required) * @return ApiResponse<Void> @@ -126,7 +127,7 @@ public ApiResponse deleteRumQuotaConfigWithHttpInfo( Invocation.Builder builder = apiClient.createBuilder( - "v2.RumRetentionQuotaApi.deleteRumQuotaConfig", + "v2.RumRetentionQuotasApi.deleteRumQuotaConfig", localVarPath, new ArrayList(), localVarHeaderParams, @@ -149,7 +150,8 @@ public ApiResponse deleteRumQuotaConfigWithHttpInfo( * *

See {@link #deleteRumQuotaConfigWithHttpInfo}. * - * @param scopeType The type of scope the retention quota configuration applies to. (required) + * @param scopeType The type of scope the retention quota configuration applies to. + * application is the only supported scope type. (required) * @param scopeId The identifier of the scope the retention quota configuration applies to. For * the application scope, this is the RUM application ID. (required) * @return CompletableFuture<ApiResponse<Void>> @@ -187,7 +189,7 @@ public CompletableFuture> deleteRumQuotaConfigWithHttpInfoAsyn try { builder = apiClient.createBuilder( - "v2.RumRetentionQuotaApi.deleteRumQuotaConfig", + "v2.RumRetentionQuotasApi.deleteRumQuotaConfig", localVarPath, new ArrayList(), localVarHeaderParams, @@ -215,8 +217,8 @@ public CompletableFuture> deleteRumQuotaConfigWithHttpInfoAsyn * *

See {@link #getRumQuotaConfigWithHttpInfo}. * - * @param scopeType The type of scope the retention quota configuration applies to. (required, - * default to "application") + * @param scopeType The type of scope the retention quota configuration applies to. + * application is the only supported scope type. (required, default to "application") * @param scopeId The identifier of the scope the retention quota configuration applies to. For * the application scope, this is the RUM application ID. (required) * @return RumRetentionQuotaConfigResponse @@ -232,8 +234,8 @@ public RumRetentionQuotaConfigResponse getRumQuotaConfig( * *

See {@link #getRumQuotaConfigWithHttpInfoAsync}. * - * @param scopeType The type of scope the retention quota configuration applies to. (required, - * default to "application") + * @param scopeType The type of scope the retention quota configuration applies to. + * application is the only supported scope type. (required, default to "application") * @param scopeId The identifier of the scope the retention quota configuration applies to. For * the application scope, this is the RUM application ID. (required) * @return CompletableFuture<RumRetentionQuotaConfigResponse> @@ -250,7 +252,8 @@ public CompletableFuture getRumQuotaConfigAsync /** * Get the RUM retention quota configuration for a given scope. * - * @param scopeType The type of scope the retention quota configuration applies to. (required) + * @param scopeType The type of scope the retention quota configuration applies to. + * application is the only supported scope type. (required) * @param scopeId The identifier of the scope the retention quota configuration applies to. For * the application scope, this is the RUM application ID. (required) * @return ApiResponse<RumRetentionQuotaConfigResponse> @@ -292,7 +295,7 @@ public ApiResponse getRumQuotaConfigWithHttpInf Invocation.Builder builder = apiClient.createBuilder( - "v2.RumRetentionQuotaApi.getRumQuotaConfig", + "v2.RumRetentionQuotasApi.getRumQuotaConfig", localVarPath, new ArrayList(), localVarHeaderParams, @@ -315,7 +318,8 @@ public ApiResponse getRumQuotaConfigWithHttpInf * *

See {@link #getRumQuotaConfigWithHttpInfo}. * - * @param scopeType The type of scope the retention quota configuration applies to. (required) + * @param scopeType The type of scope the retention quota configuration applies to. + * application is the only supported scope type. (required) * @param scopeId The identifier of the scope the retention quota configuration applies to. For * the application scope, this is the RUM application ID. (required) * @return CompletableFuture<ApiResponse<RumRetentionQuotaConfigResponse>> @@ -355,7 +359,7 @@ public ApiResponse getRumQuotaConfigWithHttpInf try { builder = apiClient.createBuilder( - "v2.RumRetentionQuotaApi.getRumQuotaConfig", + "v2.RumRetentionQuotasApi.getRumQuotaConfig", localVarPath, new ArrayList(), localVarHeaderParams, @@ -384,8 +388,8 @@ public ApiResponse getRumQuotaConfigWithHttpInf * *

See {@link #upsertRumQuotaConfigWithHttpInfo}. * - * @param scopeType The type of scope the retention quota configuration applies to. (required, - * default to "application") + * @param scopeType The type of scope the retention quota configuration applies to. + * application is the only supported scope type. (required, default to "application") * @param scopeId The identifier of the scope the retention quota configuration applies to. For * the application scope, this is the RUM application ID. (required) * @param body The definition of the RUM retention quota configuration to create or update. @@ -406,8 +410,8 @@ public RumRetentionQuotaConfigResponse upsertRumQuotaConfig( * *

See {@link #upsertRumQuotaConfigWithHttpInfoAsync}. * - * @param scopeType The type of scope the retention quota configuration applies to. (required, - * default to "application") + * @param scopeType The type of scope the retention quota configuration applies to. + * application is the only supported scope type. (required, default to "application") * @param scopeId The identifier of the scope the retention quota configuration applies to. For * the application scope, this is the RUM application ID. (required) * @param body The definition of the RUM retention quota configuration to create or update. @@ -429,7 +433,8 @@ public CompletableFuture upsertRumQuotaConfigAs * Create or update the RUM retention quota configuration for a given scope. Returns the retention * quota configuration object when the request is successful. * - * @param scopeType The type of scope the retention quota configuration applies to. (required) + * @param scopeType The type of scope the retention quota configuration applies to. + * application is the only supported scope type. (required) * @param scopeId The identifier of the scope the retention quota configuration applies to. For * the application scope, this is the RUM application ID. (required) * @param body The definition of the RUM retention quota configuration to create or update. @@ -482,7 +487,7 @@ public ApiResponse upsertRumQuotaConfigWithHttp Invocation.Builder builder = apiClient.createBuilder( - "v2.RumRetentionQuotaApi.upsertRumQuotaConfig", + "v2.RumRetentionQuotasApi.upsertRumQuotaConfig", localVarPath, new ArrayList(), localVarHeaderParams, @@ -505,7 +510,8 @@ public ApiResponse upsertRumQuotaConfigWithHttp * *

See {@link #upsertRumQuotaConfigWithHttpInfo}. * - * @param scopeType The type of scope the retention quota configuration applies to. (required) + * @param scopeType The type of scope the retention quota configuration applies to. + * application is the only supported scope type. (required) * @param scopeId The identifier of the scope the retention quota configuration applies to. For * the application scope, this is the RUM application ID. (required) * @param body The definition of the RUM retention quota configuration to create or update. @@ -560,7 +566,7 @@ public ApiResponse upsertRumQuotaConfigWithHttp try { builder = apiClient.createBuilder( - "v2.RumRetentionQuotaApi.upsertRumQuotaConfig", + "v2.RumRetentionQuotasApi.upsertRumQuotaConfig", localVarPath, new ArrayList(), localVarHeaderParams, diff --git a/src/main/java/com/datadog/api/client/v2/model/RumRetentionQuotaAdaptiveConfig.java b/src/main/java/com/datadog/api/client/v2/model/RumRetentionQuotaAdaptiveConfig.java deleted file mode 100644 index 7a6912ef35f..00000000000 --- a/src/main/java/com/datadog/api/client/v2/model/RumRetentionQuotaAdaptiveConfig.java +++ /dev/null @@ -1,147 +0,0 @@ -/* - * 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; - -/** The configuration used when mode is adaptive. */ -@JsonPropertyOrder({RumRetentionQuotaAdaptiveConfig.JSON_PROPERTY_MAX_RETENTION_RATE}) -@jakarta.annotation.Generated( - value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class RumRetentionQuotaAdaptiveConfig { - @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_MAX_RETENTION_RATE = "max_retention_rate"; - private Double maxRetentionRate; - - public RumRetentionQuotaAdaptiveConfig() {} - - @JsonCreator - public RumRetentionQuotaAdaptiveConfig( - @JsonProperty(required = true, value = JSON_PROPERTY_MAX_RETENTION_RATE) - Double maxRetentionRate) { - this.maxRetentionRate = maxRetentionRate; - } - - public RumRetentionQuotaAdaptiveConfig maxRetentionRate(Double maxRetentionRate) { - this.maxRetentionRate = maxRetentionRate; - return this; - } - - /** - * The maximum fraction of sessions to retain, in the range (0, 1]. minimum: 0 - * maximum: 1 - * - * @return maxRetentionRate - */ - @JsonProperty(JSON_PROPERTY_MAX_RETENTION_RATE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Double getMaxRetentionRate() { - return maxRetentionRate; - } - - public void setMaxRetentionRate(Double maxRetentionRate) { - this.maxRetentionRate = maxRetentionRate; - } - - /** - * 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 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 RumRetentionQuotaAdaptiveConfig - */ - @JsonAnySetter - public RumRetentionQuotaAdaptiveConfig putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return The additional properties - */ - @JsonAnyGetter - public Map 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 RumRetentionQuotaAdaptiveConfig object is equal to o. */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - RumRetentionQuotaAdaptiveConfig rumRetentionQuotaAdaptiveConfig = - (RumRetentionQuotaAdaptiveConfig) o; - return Objects.equals(this.maxRetentionRate, rumRetentionQuotaAdaptiveConfig.maxRetentionRate) - && Objects.equals( - this.additionalProperties, rumRetentionQuotaAdaptiveConfig.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(maxRetentionRate, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class RumRetentionQuotaAdaptiveConfig {\n"); - sb.append(" maxRetentionRate: ").append(toIndentedString(maxRetentionRate)).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 "); - } -} diff --git a/src/main/java/com/datadog/api/client/v2/model/RumRetentionQuotaConfigAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RumRetentionQuotaConfigAttributes.java index f9b6b13b52f..1b892aecab3 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RumRetentionQuotaConfigAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/RumRetentionQuotaConfigAttributes.java @@ -20,7 +20,6 @@ /** The RUM retention quota configuration properties. */ @JsonPropertyOrder({ - RumRetentionQuotaConfigAttributes.JSON_PROPERTY_ADAPTIVE, RumRetentionQuotaConfigAttributes.JSON_PROPERTY_CUSTOM, RumRetentionQuotaConfigAttributes.JSON_PROPERTY_MODE, RumRetentionQuotaConfigAttributes.JSON_PROPERTY_ORG_ID, @@ -31,9 +30,6 @@ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RumRetentionQuotaConfigAttributes { @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_ADAPTIVE = "adaptive"; - private RumRetentionQuotaAdaptiveConfig adaptive; - public static final String JSON_PROPERTY_CUSTOM = "custom"; private RumRetentionQuotaCustomConfig custom; @@ -60,31 +56,6 @@ public RumRetentionQuotaConfigAttributes( this.orgId = orgId; } - public RumRetentionQuotaConfigAttributes adaptive(RumRetentionQuotaAdaptiveConfig adaptive) { - this.adaptive = adaptive; - this.unparsed |= adaptive.unparsed; - return this; - } - - /** - * The configuration used when mode is adaptive. - * - * @return adaptive - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ADAPTIVE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RumRetentionQuotaAdaptiveConfig getAdaptive() { - return adaptive; - } - - public void setAdaptive(RumRetentionQuotaAdaptiveConfig adaptive) { - this.adaptive = adaptive; - if (adaptive != null) { - this.unparsed |= adaptive.unparsed; - } - } - public RumRetentionQuotaConfigAttributes custom(RumRetentionQuotaCustomConfig custom) { this.custom = custom; this.unparsed |= custom.unparsed; @@ -117,8 +88,8 @@ public RumRetentionQuotaConfigAttributes mode(RumRetentionQuotaMode mode) { } /** - * The retention quota mode. custom enforces a fixed session limit, while - * adaptive dynamically adjusts retention. + * The retention quota mode. custom enforces a fixed session limit. custom + * is the only supported mode. * * @return mode */ @@ -254,8 +225,7 @@ public boolean equals(Object o) { } RumRetentionQuotaConfigAttributes rumRetentionQuotaConfigAttributes = (RumRetentionQuotaConfigAttributes) o; - return Objects.equals(this.adaptive, rumRetentionQuotaConfigAttributes.adaptive) - && Objects.equals(this.custom, rumRetentionQuotaConfigAttributes.custom) + return Objects.equals(this.custom, rumRetentionQuotaConfigAttributes.custom) && Objects.equals(this.mode, rumRetentionQuotaConfigAttributes.mode) && Objects.equals(this.orgId, rumRetentionQuotaConfigAttributes.orgId) && Objects.equals(this.updatedAt, rumRetentionQuotaConfigAttributes.updatedAt) @@ -266,14 +236,13 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(adaptive, custom, mode, orgId, updatedAt, updatedBy, additionalProperties); + return Objects.hash(custom, mode, orgId, updatedAt, updatedBy, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class RumRetentionQuotaConfigAttributes {\n"); - sb.append(" adaptive: ").append(toIndentedString(adaptive)).append("\n"); sb.append(" custom: ").append(toIndentedString(custom)).append("\n"); sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); sb.append(" orgId: ").append(toIndentedString(orgId)).append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/RumRetentionQuotaConfigUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/RumRetentionQuotaConfigUpdateAttributes.java index e71271ffa05..ea6fcc58974 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RumRetentionQuotaConfigUpdateAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/RumRetentionQuotaConfigUpdateAttributes.java @@ -19,7 +19,6 @@ /** The RUM retention quota configuration properties to create or update. */ @JsonPropertyOrder({ - RumRetentionQuotaConfigUpdateAttributes.JSON_PROPERTY_ADAPTIVE, RumRetentionQuotaConfigUpdateAttributes.JSON_PROPERTY_CUSTOM, RumRetentionQuotaConfigUpdateAttributes.JSON_PROPERTY_MODE }) @@ -27,9 +26,6 @@ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") public class RumRetentionQuotaConfigUpdateAttributes { @JsonIgnore public boolean unparsed = false; - public static final String JSON_PROPERTY_ADAPTIVE = "adaptive"; - private RumRetentionQuotaAdaptiveConfig adaptive; - public static final String JSON_PROPERTY_CUSTOM = "custom"; private RumRetentionQuotaCustomConfig custom; @@ -45,32 +41,6 @@ public RumRetentionQuotaConfigUpdateAttributes( this.unparsed |= !mode.isValid(); } - public RumRetentionQuotaConfigUpdateAttributes adaptive( - RumRetentionQuotaAdaptiveConfig adaptive) { - this.adaptive = adaptive; - this.unparsed |= adaptive.unparsed; - return this; - } - - /** - * The configuration used when mode is adaptive. - * - * @return adaptive - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ADAPTIVE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public RumRetentionQuotaAdaptiveConfig getAdaptive() { - return adaptive; - } - - public void setAdaptive(RumRetentionQuotaAdaptiveConfig adaptive) { - this.adaptive = adaptive; - if (adaptive != null) { - this.unparsed |= adaptive.unparsed; - } - } - public RumRetentionQuotaConfigUpdateAttributes custom(RumRetentionQuotaCustomConfig custom) { this.custom = custom; this.unparsed |= custom.unparsed; @@ -103,8 +73,8 @@ public RumRetentionQuotaConfigUpdateAttributes mode(RumRetentionQuotaMode mode) } /** - * The retention quota mode. custom enforces a fixed session limit, while - * adaptive dynamically adjusts retention. + * The retention quota mode. custom enforces a fixed session limit. custom + * is the only supported mode. * * @return mode */ @@ -178,8 +148,7 @@ public boolean equals(Object o) { } RumRetentionQuotaConfigUpdateAttributes rumRetentionQuotaConfigUpdateAttributes = (RumRetentionQuotaConfigUpdateAttributes) o; - return Objects.equals(this.adaptive, rumRetentionQuotaConfigUpdateAttributes.adaptive) - && Objects.equals(this.custom, rumRetentionQuotaConfigUpdateAttributes.custom) + return Objects.equals(this.custom, rumRetentionQuotaConfigUpdateAttributes.custom) && Objects.equals(this.mode, rumRetentionQuotaConfigUpdateAttributes.mode) && Objects.equals( this.additionalProperties, @@ -188,14 +157,13 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(adaptive, custom, mode, additionalProperties); + return Objects.hash(custom, mode, additionalProperties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class RumRetentionQuotaConfigUpdateAttributes {\n"); - sb.append(" adaptive: ").append(toIndentedString(adaptive)).append("\n"); sb.append(" custom: ").append(toIndentedString(custom)).append("\n"); sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); sb.append(" additionalProperties: ") diff --git a/src/main/java/com/datadog/api/client/v2/model/RumRetentionQuotaMode.java b/src/main/java/com/datadog/api/client/v2/model/RumRetentionQuotaMode.java index aa973080dc2..7334c5a9d65 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RumRetentionQuotaMode.java +++ b/src/main/java/com/datadog/api/client/v2/model/RumRetentionQuotaMode.java @@ -19,17 +19,15 @@ import java.util.Set; /** - * The retention quota mode. custom enforces a fixed session limit, while - * adaptive dynamically adjusts retention. + * The retention quota mode. custom enforces a fixed session limit. custom + * is the only supported mode. */ @JsonSerialize(using = RumRetentionQuotaMode.RumRetentionQuotaModeSerializer.class) public class RumRetentionQuotaMode extends ModelEnum { - private static final Set allowedValues = - new HashSet(Arrays.asList("custom", "adaptive")); + private static final Set allowedValues = new HashSet(Arrays.asList("custom")); public static final RumRetentionQuotaMode CUSTOM = new RumRetentionQuotaMode("custom"); - public static final RumRetentionQuotaMode ADAPTIVE = new RumRetentionQuotaMode("adaptive"); RumRetentionQuotaMode(String value) { super(value, allowedValues); diff --git a/src/main/java/com/datadog/api/client/v2/model/RumRetentionQuotaScopeType.java b/src/main/java/com/datadog/api/client/v2/model/RumRetentionQuotaScopeType.java index 07cc3cd478f..c258a559071 100644 --- a/src/main/java/com/datadog/api/client/v2/model/RumRetentionQuotaScopeType.java +++ b/src/main/java/com/datadog/api/client/v2/model/RumRetentionQuotaScopeType.java @@ -18,7 +18,10 @@ import java.util.HashSet; import java.util.Set; -/** The type of scope the retention quota configuration applies to. */ +/** + * The type of scope the retention quota configuration applies to. application is the + * only supported scope type. + */ @JsonSerialize(using = RumRetentionQuotaScopeType.RumRetentionQuotaScopeTypeSerializer.class) public class RumRetentionQuotaScopeType extends ModelEnum { diff --git a/src/test/resources/com/datadog/api/client/v2/api/rum_retention_quota.feature b/src/test/resources/com/datadog/api/client/v2/api/rum_retention_quota.feature deleted file mode 100644 index 527a1597d4d..00000000000 --- a/src/test/resources/com/datadog/api/client/v2/api/rum_retention_quota.feature +++ /dev/null @@ -1,100 +0,0 @@ -@endpoint(rum-retention-quota) @endpoint(rum-retention-quota-v2) -Feature: RUM Retention Quota - Manage RUM retention quota configurations for your organization's RUM - applications. - - Background: - Given a valid "apiKeyAuth" key in the system - And a valid "appKeyAuth" key in the system - And an instance of "RUMRetentionQuota" API - - @skip @team:DataDog/rum-backend - Scenario: Create or update a RUM retention quota config returns "Bad Request" response - Given new "UpsertRumQuotaConfig" request - And request contains "scope_type" parameter with value "application" - And request contains "scope_id" parameter with value "invalid-scope-id" - And body with value {"data": {"attributes": {"adaptive": {"max_retention_rate": 0.5}, "custom": {"daily_reset_time": "08:00", "daily_reset_timezone": "+09:00", "quota_reached_action": "stop", "session_limit": 1000000, "window_type": "daily"}, "mode": "custom"}, "id": "cd73a516-a481-4af5-8352-9b577465c77b", "type": "rum_quota_config"}} - When the request is sent - Then the response status is 400 Bad Request - - @skip @team:DataDog/rum-backend - Scenario: Create or update a RUM retention quota config returns "Not Found" response - Given new "UpsertRumQuotaConfig" request - And request contains "scope_type" parameter with value "application" - And request contains "scope_id" parameter with value "{{ unique }}" - And body with value {"data": {"attributes": {"adaptive": {"max_retention_rate": 0.5}, "custom": {"daily_reset_time": "08:00", "daily_reset_timezone": "+09:00", "quota_reached_action": "stop", "session_limit": 1000000, "window_type": "daily"}, "mode": "custom"}, "id": "{{ unique }}", "type": "rum_quota_config"}} - When the request is sent - Then the response status is 404 Not Found - - @skip @team:DataDog/rum-backend - Scenario: Create or update a RUM retention quota config returns "OK" response - Given new "UpsertRumQuotaConfig" request - And request contains "scope_type" parameter with value "application" - And request contains "scope_id" parameter with value "ced16651-97b6-4e67-8590-8caec3af0695" - And body with value {"data": {"attributes": {"adaptive": {"max_retention_rate": 0.5}, "custom": {"daily_reset_time": "08:00", "daily_reset_timezone": "+09:00", "quota_reached_action": "stop", "session_limit": 1000000, "window_type": "daily"}, "mode": "custom"}, "id": "ced16651-97b6-4e67-8590-8caec3af0695", "type": "rum_quota_config"}} - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/rum-backend - Scenario: Delete a RUM retention quota configuration returns "Bad Request" response - Given new "DeleteRumQuotaConfig" request - And request contains "scope_type" parameter from "REPLACE.ME" - And request contains "scope_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @skip @team:DataDog/rum-backend - Scenario: Delete a RUM retention quota configuration returns "No Content" response - Given new "DeleteRumQuotaConfig" request - And request contains "scope_type" parameter with value "application" - And request contains "scope_id" parameter with value "ced16651-97b6-4e67-8590-8caec3af0695" - When the request is sent - Then the response status is 204 No Content - - @skip @team:DataDog/rum-backend - Scenario: Delete a RUM retention quota configuration returns "Not Found" response - Given new "DeleteRumQuotaConfig" request - And request contains "scope_type" parameter with value "application" - And request contains "scope_id" parameter with value "{{ unique }}" - When the request is sent - Then the response status is 404 Not Found - - @skip @team:DataDog/rum-backend - Scenario: Delete a RUM retention quota configuration returns "Not Found" response for an invalid scope_id - Given new "DeleteRumQuotaConfig" request - And request contains "scope_type" parameter with value "application" - And request contains "scope_id" parameter with value "invalid-scope-id" - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/rum-backend - Scenario: Get a RUM retention quota configuration returns "Bad Request" response - Given new "GetRumQuotaConfig" request - And request contains "scope_type" parameter from "REPLACE.ME" - And request contains "scope_id" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @skip @team:DataDog/rum-backend - Scenario: Get a RUM retention quota configuration returns "Not Found" response - Given new "GetRumQuotaConfig" request - And request contains "scope_type" parameter with value "application" - And request contains "scope_id" parameter with value "1d4b9c34-7ac4-423a-91cf-9902d926e9b3" - When the request is sent - Then the response status is 404 Not Found - - @skip @team:DataDog/rum-backend - Scenario: Get a RUM retention quota configuration returns "Not Found" response for an invalid scope_id - Given new "GetRumQuotaConfig" request - And request contains "scope_type" parameter with value "application" - And request contains "scope_id" parameter with value "invalid-scope-id" - When the request is sent - Then the response status is 404 Not Found - - @skip @team:DataDog/rum-backend - Scenario: Get a RUM retention quota configuration returns "OK" response - Given new "GetRumQuotaConfig" request - And request contains "scope_type" parameter with value "application" - And request contains "scope_id" parameter with value "ced16651-97b6-4e67-8590-8caec3af0695" - When the request is sent - Then the response status is 200 OK diff --git a/src/test/resources/com/datadog/api/client/v2/api/rum_retention_quotas.feature b/src/test/resources/com/datadog/api/client/v2/api/rum_retention_quotas.feature new file mode 100644 index 00000000000..8f9c1bbe6e4 --- /dev/null +++ b/src/test/resources/com/datadog/api/client/v2/api/rum_retention_quotas.feature @@ -0,0 +1,84 @@ +@endpoint(rum-retention-quotas) @endpoint(rum-retention-quotas-v2) +Feature: RUM Retention Quotas + Manage RUM retention quota configurations for your organization's RUM + applications. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "RUMRetentionQuotas" API + + @generated @skip @team:DataDog/rum-backend + Scenario: Create or update a RUM retention quota config returns "Bad Request" response + Given new "UpsertRumQuotaConfig" request + And request contains "scope_type" parameter from "REPLACE.ME" + And request contains "scope_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"custom": {"daily_reset_time": "08:00", "daily_reset_timezone": "+09:00", "quota_reached_action": "stop", "session_limit": 1000000, "window_type": "daily"}, "mode": "custom"}, "id": "cd73a516-a481-4af5-8352-9b577465c77b", "type": "rum_quota_config"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/rum-backend + Scenario: Create or update a RUM retention quota config returns "Not Found" response + Given new "UpsertRumQuotaConfig" request + And request contains "scope_type" parameter from "REPLACE.ME" + And request contains "scope_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"custom": {"daily_reset_time": "08:00", "daily_reset_timezone": "+09:00", "quota_reached_action": "stop", "session_limit": 1000000, "window_type": "daily"}, "mode": "custom"}, "id": "cd73a516-a481-4af5-8352-9b577465c77b", "type": "rum_quota_config"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/rum-backend + Scenario: Create or update a RUM retention quota config returns "OK" response + Given new "UpsertRumQuotaConfig" request + And request contains "scope_type" parameter from "REPLACE.ME" + And request contains "scope_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"custom": {"daily_reset_time": "08:00", "daily_reset_timezone": "+09:00", "quota_reached_action": "stop", "session_limit": 1000000, "window_type": "daily"}, "mode": "custom"}, "id": "cd73a516-a481-4af5-8352-9b577465c77b", "type": "rum_quota_config"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/rum-backend + Scenario: Delete a RUM retention quota configuration returns "Bad Request" response + Given new "DeleteRumQuotaConfig" request + And request contains "scope_type" parameter from "REPLACE.ME" + And request contains "scope_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/rum-backend + Scenario: Delete a RUM retention quota configuration returns "No Content" response + Given new "DeleteRumQuotaConfig" request + And request contains "scope_type" parameter from "REPLACE.ME" + And request contains "scope_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/rum-backend + Scenario: Delete a RUM retention quota configuration returns "Not Found" response + Given new "DeleteRumQuotaConfig" request + And request contains "scope_type" parameter from "REPLACE.ME" + And request contains "scope_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/rum-backend + Scenario: Get a RUM retention quota configuration returns "Bad Request" response + Given new "GetRumQuotaConfig" request + And request contains "scope_type" parameter from "REPLACE.ME" + And request contains "scope_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/rum-backend + Scenario: Get a RUM retention quota configuration returns "Not Found" response + Given new "GetRumQuotaConfig" request + And request contains "scope_type" parameter from "REPLACE.ME" + And request contains "scope_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/rum-backend + Scenario: Get a RUM retention quota configuration returns "OK" response + Given new "GetRumQuotaConfig" request + And request contains "scope_type" parameter from "REPLACE.ME" + And request contains "scope_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK diff --git a/src/test/resources/com/datadog/api/client/v2/api/undo.json b/src/test/resources/com/datadog/api/client/v2/api/undo.json index b10abaebef6..d74ca348ae8 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/undo.json +++ b/src/test/resources/com/datadog/api/client/v2/api/undo.json @@ -7147,19 +7147,19 @@ } }, "DeleteRumQuotaConfig": { - "tag": "RUM Retention Quota", + "tag": "RUM Retention Quotas", "undo": { "type": "idempotent" } }, "GetRumQuotaConfig": { - "tag": "RUM Retention Quota", + "tag": "RUM Retention Quotas", "undo": { "type": "safe" } }, "UpsertRumQuotaConfig": { - "tag": "RUM Retention Quota", + "tag": "RUM Retention Quotas", "undo": { "type": "idempotent" }