From 3d2f3aaf8c6eb02e4b063c8e0bb2a340a88eed72 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Wed, 26 Aug 2026 17:22:56 +0000 Subject: [PATCH] Regenerate client from commit ad69f99 of spec repo --- .generator/schemas/v2/openapi.yaml | 4 ++- .../com/datadog/api/client/ApiClient.java | 28 +++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index e24a358f1bd..b92825008e5 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -22397,7 +22397,9 @@ components: $ref: "#/components/schemas/ConvertJobResultsToSignalsData" type: object CostAggregationType: - description: "Controls how costs are aggregated when using `start_date`. The `cumulative` option returns month-to-date running totals." + description: |- + Controls how costs are aggregated when using `start_date`. + The `cumulative` option returns month-to-date running totals. enum: - cumulative type: string diff --git a/src/main/java/com/datadog/api/client/ApiClient.java b/src/main/java/com/datadog/api/client/ApiClient.java index 968a6c36fe4..b088e22db49 100644 --- a/src/main/java/com/datadog/api/client/ApiClient.java +++ b/src/main/java/com/datadog/api/client/ApiClient.java @@ -77,6 +77,7 @@ public class ApiClient { protected Map defaultCookieMap = new HashMap(); protected String basePath = "https://api.datadoghq.com"; protected String userAgent; + private boolean isIaC = false; private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME; protected List servers = @@ -1937,6 +1938,33 @@ public ApiClient addDefaultHeader(String key, String value) { return this; } + /** + * Set whether this API client is managed by Infrastructure as Code (IaC) tooling. When enabled, + * the {@code X-Datadog-Managed-By: iac} header is sent on every request made through this client + * (by adding to the default header map). + * + * @param isIaC Whether calls made with this client originate from IaC tooling + * @return API client + */ + public ApiClient setIsIaC(boolean isIaC) { + this.isIaC = isIaC; + if (isIaC) { + addDefaultHeader("X-Datadog-Managed-By", "iac"); + } else { + defaultHeaderMap.remove("X-Datadog-Managed-By"); + } + return this; + } + + /** + * Get whether this API client is managed by Infrastructure as Code (IaC) tooling. + * + * @return Whether this client is managed by IaC tooling + */ + public boolean getIsIaC() { + return isIaC; + } + /** * Add a default cookie. *