diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml
index ce0ea5b8443..d582c8e1385 100644
--- a/.generator/schemas/v2/openapi.yaml
+++ b/.generator/schemas/v2/openapi.yaml
@@ -2066,6 +2066,256 @@ components:
$ref: "#/components/schemas/JSONAPIErrorResponse"
description: The server cannot process the request because it contains invalid data.
schemas:
+ AIGuardAction:
+ description: The action recommendation from the AI Guard evaluation.
+ enum:
+ - ALLOW
+ - DENY
+ - ABORT
+ example: ALLOW
+ type: string
+ x-enum-varnames:
+ - ALLOW
+ - DENY
+ - ABORT
+ AIGuardContentPart:
+ description: A single part of a multipart message content.
+ properties:
+ image_url:
+ $ref: "#/components/schemas/AIGuardImageURL"
+ text:
+ description: The text content of this part, required when type is text.
+ example: "How do I delete all files?"
+ type: string
+ type:
+ description: The type of content part, either text or image_url.
+ example: text
+ type: string
+ required:
+ - type
+ type: object
+ AIGuardContentPartList:
+ description: A list of content parts forming a multipart message.
+ items:
+ $ref: "#/components/schemas/AIGuardContentPart"
+ type: array
+ AIGuardEvaluateRequest:
+ description: The evaluation request payload containing conversation messages and optional metadata.
+ example:
+ messages:
+ - content: How do I delete all files on the system?
+ role: user
+ meta:
+ env: production
+ service: my-llm-service
+ properties:
+ messages:
+ description: The list of conversation messages to evaluate. Must contain at least one message.
+ example:
+ - content: How do I delete all files on the system?
+ role: user
+ items:
+ $ref: "#/components/schemas/AIGuardMessage"
+ type: array
+ meta:
+ $ref: "#/components/schemas/AIGuardMeta"
+ required:
+ - messages
+ type: object
+ AIGuardEvaluateResponse:
+ description: The result of the AI Guard evaluation.
+ properties:
+ action:
+ $ref: "#/components/schemas/AIGuardAction"
+ global_prob:
+ description: The overall threat probability score across all evaluated tags.
+ example: 0.02
+ format: double
+ type: number
+ is_blocking_enabled:
+ description: Whether blocking mode is enabled for this organization.
+ example: false
+ type: boolean
+ reason:
+ description: A human-readable explanation of the action recommendation.
+ example: No threats detected.
+ type: string
+ sds_findings:
+ description: Sensitive data findings detected in the evaluated conversation.
+ items:
+ $ref: "#/components/schemas/AIGuardSdsFinding"
+ type: array
+ tag_probs:
+ additionalProperties:
+ format: double
+ type: number
+ description: Probability scores for each evaluated threat tag.
+ example:
+ indirect-prompt-injection: 0.01
+ jailbreak: 0.02
+ type: object
+ tags:
+ description: Security threat tags detected in the evaluated conversation.
+ example: []
+ items:
+ type: string
+ type: array
+ required:
+ - action
+ - reason
+ - tags
+ - tag_probs
+ - is_blocking_enabled
+ type: object
+ AIGuardImageURL:
+ description: An image URL reference for multimodal content.
+ properties:
+ url:
+ description: The URL pointing to the image.
+ example: "https://example.com/image.png"
+ type: string
+ required:
+ - url
+ type: object
+ AIGuardMessage:
+ description: A single message in the conversation to evaluate.
+ properties:
+ content:
+ $ref: "#/components/schemas/AIGuardMessageContent"
+ role:
+ $ref: "#/components/schemas/AIGuardMessageRole"
+ tool_call_id:
+ description: The ID of the tool call this message is responding to, required for tool messages.
+ example: call_abc123
+ type: string
+ tool_calls:
+ description: Tool calls issued by the assistant in this message.
+ items:
+ $ref: "#/components/schemas/AIGuardToolCall"
+ type: array
+ required:
+ - role
+ type: object
+ AIGuardMessageContent:
+ description: The message content, either a plain string or an array of content parts.
+ oneOf:
+ - example: "How do I delete all files on the system?"
+ type: string
+ - $ref: "#/components/schemas/AIGuardContentPartList"
+ AIGuardMessageRole:
+ description: The role of the message author in the conversation.
+ enum:
+ - user
+ - assistant
+ - system
+ - tool
+ - developer
+ example: user
+ type: string
+ x-enum-varnames:
+ - USER
+ - ASSISTANT
+ - SYSTEM
+ - TOOL
+ - DEVELOPER
+ AIGuardMeta:
+ description: Optional metadata providing context about the originating service and request.
+ properties:
+ coding_agent:
+ description: Identifier of the coding agent sending the request, if applicable.
+ example: claude-code
+ type: string
+ confidence_threshold:
+ description: Override for the default threat detection confidence threshold, between 0.0 and 1.0.
+ example: 0.7
+ format: double
+ type: number
+ env:
+ description: The deployment environment of the originating service.
+ example: production
+ type: string
+ is_sds_enabled_override:
+ description: Override whether sensitive data scanning is applied to this request.
+ example: false
+ type: boolean
+ service:
+ description: The name of the service sending the evaluation request.
+ example: my-llm-service
+ type: string
+ type: object
+ AIGuardSdsFinding:
+ description: A sensitive data finding detected by the SDS scanner.
+ properties:
+ category:
+ description: The category of sensitive data detected.
+ example: payment_card_number
+ type: string
+ location:
+ $ref: "#/components/schemas/AIGuardSdsFindingLocation"
+ rule_display_name:
+ description: The human-readable name of the SDS rule that triggered.
+ example: Credit Card Number
+ type: string
+ rule_tag:
+ description: The tag identifier of the SDS rule that triggered.
+ example: credit_card
+ type: string
+ required:
+ - rule_display_name
+ - rule_tag
+ - category
+ - location
+ type: object
+ AIGuardSdsFindingLocation:
+ description: The location of a sensitive data match within the evaluated request.
+ properties:
+ end_index_exclusive:
+ description: The end character index (exclusive) of the sensitive data match.
+ example: 42
+ format: int64
+ type: integer
+ path:
+ description: The JSON path to the field containing the sensitive data.
+ example: "messages[0].content"
+ type: string
+ start_index:
+ description: The start character index of the sensitive data match.
+ example: 0
+ format: int64
+ type: integer
+ required:
+ - path
+ - start_index
+ - end_index_exclusive
+ type: object
+ AIGuardToolCall:
+ description: A tool call issued by the assistant.
+ properties:
+ function:
+ $ref: "#/components/schemas/AIGuardToolCallFunction"
+ id:
+ description: The unique identifier of the tool call.
+ example: call_abc123
+ type: string
+ required:
+ - id
+ - function
+ type: object
+ AIGuardToolCallFunction:
+ description: The function definition within a tool call.
+ properties:
+ arguments:
+ description: The JSON-encoded arguments passed to the function.
+ example: '{"location": "San Francisco"}'
+ type: string
+ name:
+ description: The name of the function being called.
+ example: get_weather
+ type: string
+ required:
+ - name
+ - arguments
+ type: object
APIErrorResponse:
description: API error response.
properties:
@@ -108469,6 +108719,88 @@ paths:
operator: OR
permissions:
- security_monitoring_findings_read
+ /api/v2/ai-guard/evaluate:
+ post:
+ description: |-
+ Analyzes a conversation for security threats such as prompt injection, jailbreak
+ attempts, and other AI-specific attacks. Returns an action recommendation (ALLOW,
+ DENY, or ABORT) along with the detected threat tags.
+ operationId: EvaluateAIGuardRequest
+ requestBody:
+ content:
+ application/json:
+ examples:
+ default:
+ value:
+ messages:
+ - content: How do I delete all files on the system?
+ role: user
+ meta:
+ env: production
+ service: my-llm-service
+ schema:
+ $ref: "#/components/schemas/AIGuardEvaluateRequest"
+ required: true
+ responses:
+ "200":
+ content:
+ application/json:
+ examples:
+ default:
+ value:
+ action: ALLOW
+ global_prob: 0.02
+ is_blocking_enabled: false
+ reason: No threats detected.
+ sds_findings: []
+ tag_probs:
+ authority-override: 0.01
+ data-exfiltration: 0.01
+ denial-of-service-tool-call: 0.01
+ destructive-tool-call: 0.01
+ indirect-prompt-injection: 0.01
+ instruction-override: 0.01
+ jailbreak: 0.02
+ obfuscation: 0.01
+ role-play: 0.01
+ security-exploit: 0.01
+ system-prompt-extraction: 0.01
+ tags: []
+ schema:
+ $ref: "#/components/schemas/AIGuardEvaluateResponse"
+ description: Evaluation result with action recommendation
+ "400":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/JSONAPIErrorResponse"
+ description: Bad Request
+ "401":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/JSONAPIErrorResponse"
+ description: Unauthorized
+ "403":
+ content:
+ application/json:
+ schema:
+ $ref: "#/components/schemas/JSONAPIErrorResponse"
+ description: Forbidden
+ "429":
+ $ref: "#/components/responses/TooManyRequestsResponse"
+ security:
+ - apiKeyAuth: []
+ appKeyAuth:
+ - ai_guard_evaluate
+ summary: Evaluate an AI Guard request
+ tags:
+ - AI Guard
+ x-codegen-request-body-name: body
+ x-permission:
+ operator: AND
+ permissions:
+ - ai_guard_evaluate
/api/v2/annotation:
get:
description: Returns a flat list of annotations matching the given page, time window, and optional widget filter.
@@ -186414,6 +186746,12 @@ servers:
default: api
description: The subdomain where the API is deployed.
tags:
+ - description: |-
+ Analyze AI conversations for security threats including prompt injection,
+ jailbreak attempts, and other AI-specific attacks.
+ externalDocs:
+ url: https://docs.datadoghq.com/security/ai_security/
+ name: AI Guard
- description: |-
Configure your API endpoints through the Datadog API.
name: API Management
diff --git a/examples/v2/ai-guard/EvaluateAIGuardRequest.java b/examples/v2/ai-guard/EvaluateAIGuardRequest.java
new file mode 100644
index 00000000000..43cb12178b5
--- /dev/null
+++ b/examples/v2/ai-guard/EvaluateAIGuardRequest.java
@@ -0,0 +1,40 @@
+// Evaluate an AI Guard request returns "Evaluation result with action recommendation" response
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.v2.api.AiGuardApi;
+import com.datadog.api.client.v2.model.AIGuardEvaluateRequest;
+import com.datadog.api.client.v2.model.AIGuardEvaluateResponse;
+import com.datadog.api.client.v2.model.AIGuardMessage;
+import com.datadog.api.client.v2.model.AIGuardMessageContent;
+import com.datadog.api.client.v2.model.AIGuardMessageRole;
+import com.datadog.api.client.v2.model.AIGuardMeta;
+import java.util.Collections;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = ApiClient.getDefaultApiClient();
+ AiGuardApi apiInstance = new AiGuardApi(defaultClient);
+
+ AIGuardEvaluateRequest body =
+ new AIGuardEvaluateRequest()
+ .messages(
+ Collections.singletonList(
+ new AIGuardMessage()
+ .content(
+ new AIGuardMessageContent("How do I delete all files on the system?"))
+ .role(AIGuardMessageRole.USER)))
+ .meta(new AIGuardMeta().env("production").service("my-llm-service"));
+
+ try {
+ AIGuardEvaluateResponse result = apiInstance.evaluateAIGuardRequest(body);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling AiGuardApi#evaluateAIGuardRequest");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/api/AiGuardApi.java b/src/main/java/com/datadog/api/client/v2/api/AiGuardApi.java
new file mode 100644
index 00000000000..085d92c3029
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/api/AiGuardApi.java
@@ -0,0 +1,182 @@
+package com.datadog.api.client.v2.api;
+
+import com.datadog.api.client.ApiClient;
+import com.datadog.api.client.ApiException;
+import com.datadog.api.client.ApiResponse;
+import com.datadog.api.client.Pair;
+import com.datadog.api.client.v2.model.AIGuardEvaluateRequest;
+import com.datadog.api.client.v2.model.AIGuardEvaluateResponse;
+import jakarta.ws.rs.client.Invocation;
+import jakarta.ws.rs.core.GenericType;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.CompletableFuture;
+
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class AiGuardApi {
+ private ApiClient apiClient;
+
+ public AiGuardApi() {
+ this(ApiClient.getDefaultApiClient());
+ }
+
+ public AiGuardApi(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ /**
+ * Get the API client.
+ *
+ * @return API client
+ */
+ public ApiClient getApiClient() {
+ return apiClient;
+ }
+
+ /**
+ * Set the API client.
+ *
+ * @param apiClient an instance of API client
+ */
+ public void setApiClient(ApiClient apiClient) {
+ this.apiClient = apiClient;
+ }
+
+ /**
+ * Evaluate an AI Guard request.
+ *
+ *
See {@link #evaluateAIGuardRequestWithHttpInfo}.
+ *
+ * @param body (required)
+ * @return AIGuardEvaluateResponse
+ * @throws ApiException if fails to make API call
+ */
+ public AIGuardEvaluateResponse evaluateAIGuardRequest(AIGuardEvaluateRequest body)
+ throws ApiException {
+ return evaluateAIGuardRequestWithHttpInfo(body).getData();
+ }
+
+ /**
+ * Evaluate an AI Guard request.
+ *
+ *
See {@link #evaluateAIGuardRequestWithHttpInfoAsync}.
+ *
+ * @param body (required)
+ * @return CompletableFuture<AIGuardEvaluateResponse>
+ */
+ public CompletableFuture evaluateAIGuardRequestAsync(
+ AIGuardEvaluateRequest body) {
+ return evaluateAIGuardRequestWithHttpInfoAsync(body)
+ .thenApply(
+ response -> {
+ return response.getData();
+ });
+ }
+
+ /**
+ * Analyzes a conversation for security threats such as prompt injection, jailbreak attempts, and
+ * other AI-specific attacks. Returns an action recommendation (ALLOW, DENY, or ABORT) along with
+ * the detected threat tags.
+ *
+ * @param body (required)
+ * @return ApiResponse<AIGuardEvaluateResponse>
+ * @throws ApiException if fails to make API call
+ * @http.response.details
+ *
+ * Response details
+ * | Status Code | Description | Response Headers |
+ * | 200 | Evaluation result with action recommendation | - |
+ * | 400 | Bad Request | - |
+ * | 401 | Unauthorized | - |
+ * | 403 | Forbidden | - |
+ * | 429 | Too many requests | - |
+ *
+ */
+ public ApiResponse evaluateAIGuardRequestWithHttpInfo(
+ AIGuardEvaluateRequest body) throws ApiException {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ throw new ApiException(
+ 400, "Missing the required parameter 'body' when calling evaluateAIGuardRequest");
+ }
+ // create path and map variables
+ String localVarPath = "/api/v2/ai-guard/evaluate";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder =
+ apiClient.createBuilder(
+ "v2.AiGuardApi.evaluateAIGuardRequest",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ return apiClient.invokeAPI(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+
+ /**
+ * Evaluate an AI Guard request.
+ *
+ * See {@link #evaluateAIGuardRequestWithHttpInfo}.
+ *
+ * @param body (required)
+ * @return CompletableFuture<ApiResponse<AIGuardEvaluateResponse>>
+ */
+ public CompletableFuture>
+ evaluateAIGuardRequestWithHttpInfoAsync(AIGuardEvaluateRequest body) {
+ Object localVarPostBody = body;
+
+ // verify the required parameter 'body' is set
+ if (body == null) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(
+ new ApiException(
+ 400, "Missing the required parameter 'body' when calling evaluateAIGuardRequest"));
+ return result;
+ }
+ // create path and map variables
+ String localVarPath = "/api/v2/ai-guard/evaluate";
+
+ Map localVarHeaderParams = new HashMap();
+
+ Invocation.Builder builder;
+ try {
+ builder =
+ apiClient.createBuilder(
+ "v2.AiGuardApi.evaluateAIGuardRequest",
+ localVarPath,
+ new ArrayList(),
+ localVarHeaderParams,
+ new HashMap(),
+ new String[] {"application/json"},
+ new String[] {"apiKeyAuth", "appKeyAuth"});
+ } catch (ApiException ex) {
+ CompletableFuture> result = new CompletableFuture<>();
+ result.completeExceptionally(ex);
+ return result;
+ }
+ return apiClient.invokeAPIAsync(
+ "POST",
+ builder,
+ localVarHeaderParams,
+ new String[] {"application/json"},
+ localVarPostBody,
+ new HashMap(),
+ false,
+ new GenericType() {});
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/AIGuardAction.java b/src/main/java/com/datadog/api/client/v2/model/AIGuardAction.java
new file mode 100644
index 00000000000..1c74cc4862e
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/AIGuardAction.java
@@ -0,0 +1,56 @@
+/*
+ * 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.datadog.api.client.ModelEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.StdSerializer;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+/** The action recommendation from the AI Guard evaluation. */
+@JsonSerialize(using = AIGuardAction.AIGuardActionSerializer.class)
+public class AIGuardAction extends ModelEnum {
+
+ private static final Set allowedValues =
+ new HashSet(Arrays.asList("ALLOW", "DENY", "ABORT"));
+
+ public static final AIGuardAction ALLOW = new AIGuardAction("ALLOW");
+ public static final AIGuardAction DENY = new AIGuardAction("DENY");
+ public static final AIGuardAction ABORT = new AIGuardAction("ABORT");
+
+ AIGuardAction(String value) {
+ super(value, allowedValues);
+ }
+
+ public static class AIGuardActionSerializer extends StdSerializer {
+ public AIGuardActionSerializer(Class t) {
+ super(t);
+ }
+
+ public AIGuardActionSerializer() {
+ this(null);
+ }
+
+ @Override
+ public void serialize(AIGuardAction value, JsonGenerator jgen, SerializerProvider provider)
+ throws IOException, JsonProcessingException {
+ jgen.writeObject(value.value);
+ }
+ }
+
+ @JsonCreator
+ public static AIGuardAction fromValue(String value) {
+ return new AIGuardAction(value);
+ }
+}
diff --git a/src/main/java/com/datadog/api/client/v2/model/AIGuardContentPart.java b/src/main/java/com/datadog/api/client/v2/model/AIGuardContentPart.java
new file mode 100644
index 00000000000..1c46408e448
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/AIGuardContentPart.java
@@ -0,0 +1,200 @@
+/*
+ * 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;
+
+/** A single part of a multipart message content. */
+@JsonPropertyOrder({
+ AIGuardContentPart.JSON_PROPERTY_IMAGE_URL,
+ AIGuardContentPart.JSON_PROPERTY_TEXT,
+ AIGuardContentPart.JSON_PROPERTY_TYPE
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class AIGuardContentPart {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_IMAGE_URL = "image_url";
+ private AIGuardImageURL imageUrl;
+
+ public static final String JSON_PROPERTY_TEXT = "text";
+ private String text;
+
+ public static final String JSON_PROPERTY_TYPE = "type";
+ private String type;
+
+ public AIGuardContentPart() {}
+
+ @JsonCreator
+ public AIGuardContentPart(
+ @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) String type) {
+ this.type = type;
+ }
+
+ public AIGuardContentPart imageUrl(AIGuardImageURL imageUrl) {
+ this.imageUrl = imageUrl;
+ this.unparsed |= imageUrl.unparsed;
+ return this;
+ }
+
+ /**
+ * An image URL reference for multimodal content.
+ *
+ * @return imageUrl
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_IMAGE_URL)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public AIGuardImageURL getImageUrl() {
+ return imageUrl;
+ }
+
+ public void setImageUrl(AIGuardImageURL imageUrl) {
+ this.imageUrl = imageUrl;
+ }
+
+ public AIGuardContentPart text(String text) {
+ this.text = text;
+ return this;
+ }
+
+ /**
+ * The text content of this part, required when type is text.
+ *
+ * @return text
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_TEXT)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getText() {
+ return text;
+ }
+
+ public void setText(String text) {
+ this.text = text;
+ }
+
+ public AIGuardContentPart type(String type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * The type of content part, either text or image_url.
+ *
+ * @return type
+ */
+ @JsonProperty(JSON_PROPERTY_TYPE)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ * 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 AIGuardContentPart
+ */
+ @JsonAnySetter
+ public AIGuardContentPart 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 AIGuardContentPart object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AIGuardContentPart aiGuardContentPart = (AIGuardContentPart) o;
+ return Objects.equals(this.imageUrl, aiGuardContentPart.imageUrl)
+ && Objects.equals(this.text, aiGuardContentPart.text)
+ && Objects.equals(this.type, aiGuardContentPart.type)
+ && Objects.equals(this.additionalProperties, aiGuardContentPart.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(imageUrl, text, type, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AIGuardContentPart {\n");
+ sb.append(" imageUrl: ").append(toIndentedString(imageUrl)).append("\n");
+ sb.append(" text: ").append(toIndentedString(text)).append("\n");
+ sb.append(" type: ").append(toIndentedString(type)).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/AIGuardEvaluateRequest.java b/src/main/java/com/datadog/api/client/v2/model/AIGuardEvaluateRequest.java
new file mode 100644
index 00000000000..991e7d36b7c
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/AIGuardEvaluateRequest.java
@@ -0,0 +1,185 @@
+/*
+ * 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.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+
+/** The evaluation request payload containing conversation messages and optional metadata. */
+@JsonPropertyOrder({
+ AIGuardEvaluateRequest.JSON_PROPERTY_MESSAGES,
+ AIGuardEvaluateRequest.JSON_PROPERTY_META
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class AIGuardEvaluateRequest {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_MESSAGES = "messages";
+ private List messages = new ArrayList<>();
+
+ public static final String JSON_PROPERTY_META = "meta";
+ private AIGuardMeta meta;
+
+ public AIGuardEvaluateRequest() {}
+
+ @JsonCreator
+ public AIGuardEvaluateRequest(
+ @JsonProperty(required = true, value = JSON_PROPERTY_MESSAGES)
+ List messages) {
+ this.messages = messages;
+ }
+
+ public AIGuardEvaluateRequest messages(List messages) {
+ this.messages = messages;
+ for (AIGuardMessage item : messages) {
+ this.unparsed |= item.unparsed;
+ }
+ return this;
+ }
+
+ public AIGuardEvaluateRequest addMessagesItem(AIGuardMessage messagesItem) {
+ this.messages.add(messagesItem);
+ this.unparsed |= messagesItem.unparsed;
+ return this;
+ }
+
+ /**
+ * The list of conversation messages to evaluate. Must contain at least one message.
+ *
+ * @return messages
+ */
+ @JsonProperty(JSON_PROPERTY_MESSAGES)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public List getMessages() {
+ return messages;
+ }
+
+ public void setMessages(List messages) {
+ this.messages = messages;
+ }
+
+ public AIGuardEvaluateRequest meta(AIGuardMeta meta) {
+ this.meta = meta;
+ this.unparsed |= meta.unparsed;
+ return this;
+ }
+
+ /**
+ * Optional metadata providing context about the originating service and request.
+ *
+ * @return meta
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_META)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public AIGuardMeta getMeta() {
+ return meta;
+ }
+
+ public void setMeta(AIGuardMeta meta) {
+ this.meta = meta;
+ }
+
+ /**
+ * 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 AIGuardEvaluateRequest
+ */
+ @JsonAnySetter
+ public AIGuardEvaluateRequest 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 AIGuardEvaluateRequest object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AIGuardEvaluateRequest aiGuardEvaluateRequest = (AIGuardEvaluateRequest) o;
+ return Objects.equals(this.messages, aiGuardEvaluateRequest.messages)
+ && Objects.equals(this.meta, aiGuardEvaluateRequest.meta)
+ && Objects.equals(this.additionalProperties, aiGuardEvaluateRequest.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(messages, meta, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AIGuardEvaluateRequest {\n");
+ sb.append(" messages: ").append(toIndentedString(messages)).append("\n");
+ sb.append(" meta: ").append(toIndentedString(meta)).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/AIGuardEvaluateResponse.java b/src/main/java/com/datadog/api/client/v2/model/AIGuardEvaluateResponse.java
new file mode 100644
index 00000000000..cc6e91f8cb1
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/AIGuardEvaluateResponse.java
@@ -0,0 +1,349 @@
+/*
+ * 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.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+
+/** The result of the AI Guard evaluation. */
+@JsonPropertyOrder({
+ AIGuardEvaluateResponse.JSON_PROPERTY_ACTION,
+ AIGuardEvaluateResponse.JSON_PROPERTY_GLOBAL_PROB,
+ AIGuardEvaluateResponse.JSON_PROPERTY_IS_BLOCKING_ENABLED,
+ AIGuardEvaluateResponse.JSON_PROPERTY_REASON,
+ AIGuardEvaluateResponse.JSON_PROPERTY_SDS_FINDINGS,
+ AIGuardEvaluateResponse.JSON_PROPERTY_TAG_PROBS,
+ AIGuardEvaluateResponse.JSON_PROPERTY_TAGS
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class AIGuardEvaluateResponse {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_ACTION = "action";
+ private AIGuardAction action;
+
+ public static final String JSON_PROPERTY_GLOBAL_PROB = "global_prob";
+ private Double globalProb;
+
+ public static final String JSON_PROPERTY_IS_BLOCKING_ENABLED = "is_blocking_enabled";
+ private Boolean isBlockingEnabled;
+
+ public static final String JSON_PROPERTY_REASON = "reason";
+ private String reason;
+
+ public static final String JSON_PROPERTY_SDS_FINDINGS = "sds_findings";
+ private List sdsFindings = null;
+
+ public static final String JSON_PROPERTY_TAG_PROBS = "tag_probs";
+ private Map tagProbs = new HashMap();
+
+ public static final String JSON_PROPERTY_TAGS = "tags";
+ private List tags = new ArrayList<>();
+
+ public AIGuardEvaluateResponse() {}
+
+ @JsonCreator
+ public AIGuardEvaluateResponse(
+ @JsonProperty(required = true, value = JSON_PROPERTY_ACTION) AIGuardAction action,
+ @JsonProperty(required = true, value = JSON_PROPERTY_IS_BLOCKING_ENABLED)
+ Boolean isBlockingEnabled,
+ @JsonProperty(required = true, value = JSON_PROPERTY_REASON) String reason,
+ @JsonProperty(required = true, value = JSON_PROPERTY_TAG_PROBS) Map tagProbs,
+ @JsonProperty(required = true, value = JSON_PROPERTY_TAGS) List tags) {
+ this.action = action;
+ this.unparsed |= !action.isValid();
+ this.isBlockingEnabled = isBlockingEnabled;
+ this.reason = reason;
+ this.tagProbs = tagProbs;
+ this.tags = tags;
+ }
+
+ public AIGuardEvaluateResponse action(AIGuardAction action) {
+ this.action = action;
+ this.unparsed |= !action.isValid();
+ return this;
+ }
+
+ /**
+ * The action recommendation from the AI Guard evaluation.
+ *
+ * @return action
+ */
+ @JsonProperty(JSON_PROPERTY_ACTION)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public AIGuardAction getAction() {
+ return action;
+ }
+
+ public void setAction(AIGuardAction action) {
+ if (!action.isValid()) {
+ this.unparsed = true;
+ }
+ this.action = action;
+ }
+
+ public AIGuardEvaluateResponse globalProb(Double globalProb) {
+ this.globalProb = globalProb;
+ return this;
+ }
+
+ /**
+ * The overall threat probability score across all evaluated tags.
+ *
+ * @return globalProb
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_GLOBAL_PROB)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public Double getGlobalProb() {
+ return globalProb;
+ }
+
+ public void setGlobalProb(Double globalProb) {
+ this.globalProb = globalProb;
+ }
+
+ public AIGuardEvaluateResponse isBlockingEnabled(Boolean isBlockingEnabled) {
+ this.isBlockingEnabled = isBlockingEnabled;
+ return this;
+ }
+
+ /**
+ * Whether blocking mode is enabled for this organization.
+ *
+ * @return isBlockingEnabled
+ */
+ @JsonProperty(JSON_PROPERTY_IS_BLOCKING_ENABLED)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public Boolean getIsBlockingEnabled() {
+ return isBlockingEnabled;
+ }
+
+ public void setIsBlockingEnabled(Boolean isBlockingEnabled) {
+ this.isBlockingEnabled = isBlockingEnabled;
+ }
+
+ public AIGuardEvaluateResponse reason(String reason) {
+ this.reason = reason;
+ return this;
+ }
+
+ /**
+ * A human-readable explanation of the action recommendation.
+ *
+ * @return reason
+ */
+ @JsonProperty(JSON_PROPERTY_REASON)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getReason() {
+ return reason;
+ }
+
+ public void setReason(String reason) {
+ this.reason = reason;
+ }
+
+ public AIGuardEvaluateResponse sdsFindings(List sdsFindings) {
+ this.sdsFindings = sdsFindings;
+ for (AIGuardSdsFinding item : sdsFindings) {
+ this.unparsed |= item.unparsed;
+ }
+ return this;
+ }
+
+ public AIGuardEvaluateResponse addSdsFindingsItem(AIGuardSdsFinding sdsFindingsItem) {
+ if (this.sdsFindings == null) {
+ this.sdsFindings = new ArrayList<>();
+ }
+ this.sdsFindings.add(sdsFindingsItem);
+ this.unparsed |= sdsFindingsItem.unparsed;
+ return this;
+ }
+
+ /**
+ * Sensitive data findings detected in the evaluated conversation.
+ *
+ * @return sdsFindings
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_SDS_FINDINGS)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public List getSdsFindings() {
+ return sdsFindings;
+ }
+
+ public void setSdsFindings(List sdsFindings) {
+ this.sdsFindings = sdsFindings;
+ }
+
+ public AIGuardEvaluateResponse tagProbs(Map tagProbs) {
+ this.tagProbs = tagProbs;
+ return this;
+ }
+
+ public AIGuardEvaluateResponse putTagProbsItem(String key, Double tagProbsItem) {
+ this.tagProbs.put(key, tagProbsItem);
+ return this;
+ }
+
+ /**
+ * Probability scores for each evaluated threat tag.
+ *
+ * @return tagProbs
+ */
+ @JsonProperty(JSON_PROPERTY_TAG_PROBS)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public Map getTagProbs() {
+ return tagProbs;
+ }
+
+ public void setTagProbs(Map tagProbs) {
+ this.tagProbs = tagProbs;
+ }
+
+ public AIGuardEvaluateResponse tags(List tags) {
+ this.tags = tags;
+ return this;
+ }
+
+ public AIGuardEvaluateResponse addTagsItem(String tagsItem) {
+ this.tags.add(tagsItem);
+ return this;
+ }
+
+ /**
+ * Security threat tags detected in the evaluated conversation.
+ *
+ * @return tags
+ */
+ @JsonProperty(JSON_PROPERTY_TAGS)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public List getTags() {
+ return tags;
+ }
+
+ public void setTags(List tags) {
+ this.tags = tags;
+ }
+
+ /**
+ * 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 AIGuardEvaluateResponse
+ */
+ @JsonAnySetter
+ public AIGuardEvaluateResponse 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 AIGuardEvaluateResponse object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AIGuardEvaluateResponse aiGuardEvaluateResponse = (AIGuardEvaluateResponse) o;
+ return Objects.equals(this.action, aiGuardEvaluateResponse.action)
+ && Objects.equals(this.globalProb, aiGuardEvaluateResponse.globalProb)
+ && Objects.equals(this.isBlockingEnabled, aiGuardEvaluateResponse.isBlockingEnabled)
+ && Objects.equals(this.reason, aiGuardEvaluateResponse.reason)
+ && Objects.equals(this.sdsFindings, aiGuardEvaluateResponse.sdsFindings)
+ && Objects.equals(this.tagProbs, aiGuardEvaluateResponse.tagProbs)
+ && Objects.equals(this.tags, aiGuardEvaluateResponse.tags)
+ && Objects.equals(this.additionalProperties, aiGuardEvaluateResponse.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(
+ action,
+ globalProb,
+ isBlockingEnabled,
+ reason,
+ sdsFindings,
+ tagProbs,
+ tags,
+ additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AIGuardEvaluateResponse {\n");
+ sb.append(" action: ").append(toIndentedString(action)).append("\n");
+ sb.append(" globalProb: ").append(toIndentedString(globalProb)).append("\n");
+ sb.append(" isBlockingEnabled: ").append(toIndentedString(isBlockingEnabled)).append("\n");
+ sb.append(" reason: ").append(toIndentedString(reason)).append("\n");
+ sb.append(" sdsFindings: ").append(toIndentedString(sdsFindings)).append("\n");
+ sb.append(" tagProbs: ").append(toIndentedString(tagProbs)).append("\n");
+ sb.append(" tags: ").append(toIndentedString(tags)).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/AIGuardImageURL.java b/src/main/java/com/datadog/api/client/v2/model/AIGuardImageURL.java
new file mode 100644
index 00000000000..91355e38dde
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/AIGuardImageURL.java
@@ -0,0 +1,142 @@
+/*
+ * 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;
+
+/** An image URL reference for multimodal content. */
+@JsonPropertyOrder({AIGuardImageURL.JSON_PROPERTY_URL})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class AIGuardImageURL {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_URL = "url";
+ private String url;
+
+ public AIGuardImageURL() {}
+
+ @JsonCreator
+ public AIGuardImageURL(@JsonProperty(required = true, value = JSON_PROPERTY_URL) String url) {
+ this.url = url;
+ }
+
+ public AIGuardImageURL url(String url) {
+ this.url = url;
+ return this;
+ }
+
+ /**
+ * The URL pointing to the image.
+ *
+ * @return url
+ */
+ @JsonProperty(JSON_PROPERTY_URL)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public String getUrl() {
+ return url;
+ }
+
+ public void setUrl(String url) {
+ this.url = url;
+ }
+
+ /**
+ * 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 AIGuardImageURL
+ */
+ @JsonAnySetter
+ public AIGuardImageURL 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 AIGuardImageURL object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AIGuardImageURL aiGuardImageUrl = (AIGuardImageURL) o;
+ return Objects.equals(this.url, aiGuardImageUrl.url)
+ && Objects.equals(this.additionalProperties, aiGuardImageUrl.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(url, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AIGuardImageURL {\n");
+ sb.append(" url: ").append(toIndentedString(url)).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/AIGuardMessage.java b/src/main/java/com/datadog/api/client/v2/model/AIGuardMessage.java
new file mode 100644
index 00000000000..51da7aa1d25
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/AIGuardMessage.java
@@ -0,0 +1,246 @@
+/*
+ * 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.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+
+/** A single message in the conversation to evaluate. */
+@JsonPropertyOrder({
+ AIGuardMessage.JSON_PROPERTY_CONTENT,
+ AIGuardMessage.JSON_PROPERTY_ROLE,
+ AIGuardMessage.JSON_PROPERTY_TOOL_CALL_ID,
+ AIGuardMessage.JSON_PROPERTY_TOOL_CALLS
+})
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+public class AIGuardMessage {
+ @JsonIgnore public boolean unparsed = false;
+ public static final String JSON_PROPERTY_CONTENT = "content";
+ private AIGuardMessageContent content;
+
+ public static final String JSON_PROPERTY_ROLE = "role";
+ private AIGuardMessageRole role;
+
+ public static final String JSON_PROPERTY_TOOL_CALL_ID = "tool_call_id";
+ private String toolCallId;
+
+ public static final String JSON_PROPERTY_TOOL_CALLS = "tool_calls";
+ private List toolCalls = null;
+
+ public AIGuardMessage() {}
+
+ @JsonCreator
+ public AIGuardMessage(
+ @JsonProperty(required = true, value = JSON_PROPERTY_ROLE) AIGuardMessageRole role) {
+ this.role = role;
+ this.unparsed |= !role.isValid();
+ }
+
+ public AIGuardMessage content(AIGuardMessageContent content) {
+ this.content = content;
+ this.unparsed |= content.unparsed;
+ return this;
+ }
+
+ /**
+ * The message content, either a plain string or an array of content parts.
+ *
+ * @return content
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_CONTENT)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public AIGuardMessageContent getContent() {
+ return content;
+ }
+
+ public void setContent(AIGuardMessageContent content) {
+ this.content = content;
+ }
+
+ public AIGuardMessage role(AIGuardMessageRole role) {
+ this.role = role;
+ this.unparsed |= !role.isValid();
+ return this;
+ }
+
+ /**
+ * The role of the message author in the conversation.
+ *
+ * @return role
+ */
+ @JsonProperty(JSON_PROPERTY_ROLE)
+ @JsonInclude(value = JsonInclude.Include.ALWAYS)
+ public AIGuardMessageRole getRole() {
+ return role;
+ }
+
+ public void setRole(AIGuardMessageRole role) {
+ if (!role.isValid()) {
+ this.unparsed = true;
+ }
+ this.role = role;
+ }
+
+ public AIGuardMessage toolCallId(String toolCallId) {
+ this.toolCallId = toolCallId;
+ return this;
+ }
+
+ /**
+ * The ID of the tool call this message is responding to, required for tool messages.
+ *
+ * @return toolCallId
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_TOOL_CALL_ID)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public String getToolCallId() {
+ return toolCallId;
+ }
+
+ public void setToolCallId(String toolCallId) {
+ this.toolCallId = toolCallId;
+ }
+
+ public AIGuardMessage toolCalls(List toolCalls) {
+ this.toolCalls = toolCalls;
+ for (AIGuardToolCall item : toolCalls) {
+ this.unparsed |= item.unparsed;
+ }
+ return this;
+ }
+
+ public AIGuardMessage addToolCallsItem(AIGuardToolCall toolCallsItem) {
+ if (this.toolCalls == null) {
+ this.toolCalls = new ArrayList<>();
+ }
+ this.toolCalls.add(toolCallsItem);
+ this.unparsed |= toolCallsItem.unparsed;
+ return this;
+ }
+
+ /**
+ * Tool calls issued by the assistant in this message.
+ *
+ * @return toolCalls
+ */
+ @jakarta.annotation.Nullable
+ @JsonProperty(JSON_PROPERTY_TOOL_CALLS)
+ @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
+ public List getToolCalls() {
+ return toolCalls;
+ }
+
+ public void setToolCalls(List toolCalls) {
+ this.toolCalls = toolCalls;
+ }
+
+ /**
+ * 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 AIGuardMessage
+ */
+ @JsonAnySetter
+ public AIGuardMessage 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 AIGuardMessage object is equal to o. */
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AIGuardMessage aiGuardMessage = (AIGuardMessage) o;
+ return Objects.equals(this.content, aiGuardMessage.content)
+ && Objects.equals(this.role, aiGuardMessage.role)
+ && Objects.equals(this.toolCallId, aiGuardMessage.toolCallId)
+ && Objects.equals(this.toolCalls, aiGuardMessage.toolCalls)
+ && Objects.equals(this.additionalProperties, aiGuardMessage.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(content, role, toolCallId, toolCalls, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AIGuardMessage {\n");
+ sb.append(" content: ").append(toIndentedString(content)).append("\n");
+ sb.append(" role: ").append(toIndentedString(role)).append("\n");
+ sb.append(" toolCallId: ").append(toIndentedString(toolCallId)).append("\n");
+ sb.append(" toolCalls: ").append(toIndentedString(toolCalls)).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/AIGuardMessageContent.java b/src/main/java/com/datadog/api/client/v2/model/AIGuardMessageContent.java
new file mode 100644
index 00000000000..b01165d86f1
--- /dev/null
+++ b/src/main/java/com/datadog/api/client/v2/model/AIGuardMessageContent.java
@@ -0,0 +1,272 @@
+/*
+ * 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.datadog.api.client.AbstractOpenApiSchema;
+import com.datadog.api.client.JSON;
+import com.datadog.api.client.UnparsedObject;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.JsonToken;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.DeserializationContext;
+import com.fasterxml.jackson.databind.JsonMappingException;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.MapperFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
+import com.fasterxml.jackson.databind.ser.std.StdSerializer;
+import jakarta.ws.rs.core.GenericType;
+import java.io.IOException;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+@jakarta.annotation.Generated(
+ value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
+@JsonDeserialize(using = AIGuardMessageContent.AIGuardMessageContentDeserializer.class)
+@JsonSerialize(using = AIGuardMessageContent.AIGuardMessageContentSerializer.class)
+public class AIGuardMessageContent extends AbstractOpenApiSchema {
+ private static final Logger log = Logger.getLogger(AIGuardMessageContent.class.getName());
+
+ @JsonIgnore public boolean unparsed = false;
+
+ public static class AIGuardMessageContentSerializer extends StdSerializer {
+ public AIGuardMessageContentSerializer(Class t) {
+ super(t);
+ }
+
+ public AIGuardMessageContentSerializer() {
+ this(null);
+ }
+
+ @Override
+ public void serialize(
+ AIGuardMessageContent value, JsonGenerator jgen, SerializerProvider provider)
+ throws IOException, JsonProcessingException {
+ jgen.writeObject(value.getActualInstance());
+ }
+ }
+
+ public static class AIGuardMessageContentDeserializer
+ extends StdDeserializer {
+ public AIGuardMessageContentDeserializer() {
+ this(AIGuardMessageContent.class);
+ }
+
+ public AIGuardMessageContentDeserializer(Class> vc) {
+ super(vc);
+ }
+
+ @Override
+ public AIGuardMessageContent deserialize(JsonParser jp, DeserializationContext ctxt)
+ throws IOException, JsonProcessingException {
+ JsonNode tree = jp.readValueAsTree();
+ Object deserialized = null;
+ Object tmp = null;
+ boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS);
+ int match = 0;
+ JsonToken token = tree.traverse(jp.getCodec()).nextToken();
+ // deserialize String
+ try {
+ boolean attemptParsing = true;
+ // ensure that we respect type coercion as set on the client ObjectMapper
+ if (String.class.equals(Integer.class)
+ || String.class.equals(Long.class)
+ || String.class.equals(Float.class)
+ || String.class.equals(Double.class)
+ || String.class.equals(Boolean.class)
+ || String.class.equals(String.class)) {
+ attemptParsing = typeCoercion;
+ if (!attemptParsing) {
+ attemptParsing |=
+ ((String.class.equals(Integer.class) || String.class.equals(Long.class))
+ && token == JsonToken.VALUE_NUMBER_INT);
+ attemptParsing |=
+ ((String.class.equals(Float.class) || String.class.equals(Double.class))
+ && (token == JsonToken.VALUE_NUMBER_FLOAT
+ || token == JsonToken.VALUE_NUMBER_INT));
+ attemptParsing |=
+ (String.class.equals(Boolean.class)
+ && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE));
+ attemptParsing |=
+ (String.class.equals(String.class) && token == JsonToken.VALUE_STRING);
+ }
+ }
+ if (attemptParsing) {
+ tmp = tree.traverse(jp.getCodec()).readValueAs(String.class);
+ // TODO: there is no validation against JSON schema constraints
+ // (min, max, enum, pattern...), this does not perform a strict JSON
+ // validation, which means the 'match' count may be higher than it should be.
+ deserialized = tmp;
+ match++;
+
+ log.log(Level.FINER, "Input data matches schema 'String'");
+ }
+ } catch (Exception e) {
+ // deserialization failed, continue
+ log.log(Level.FINER, "Input data does not match schema 'String'", e);
+ }
+
+ // deserialize List
+ try {
+ boolean attemptParsing = true;
+ // ensure that we respect type coercion as set on the client ObjectMapper
+ if (List.class.equals(Integer.class)
+ || List.class.equals(Long.class)
+ || List.class.equals(Float.class)
+ || List.class.equals(Double.class)
+ || List.class.equals(Boolean.class)
+ || List.class.equals(String.class)) {
+ attemptParsing = typeCoercion;
+ if (!attemptParsing) {
+ attemptParsing |=
+ ((List.class.equals(Integer.class) || List.class.equals(Long.class))
+ && token == JsonToken.VALUE_NUMBER_INT);
+ attemptParsing |=
+ ((List.class.equals(Float.class) || List.class.equals(Double.class))
+ && (token == JsonToken.VALUE_NUMBER_FLOAT
+ || token == JsonToken.VALUE_NUMBER_INT));
+ attemptParsing |=
+ (List.class.equals(Boolean.class)
+ && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE));
+ attemptParsing |= (List.class.equals(String.class) && token == JsonToken.VALUE_STRING);
+ }
+ }
+ if (attemptParsing) {
+ tmp =
+ tree.traverse(jp.getCodec())
+ .readValueAs(new TypeReference>() {});
+ // TODO: there is no validation against JSON schema constraints
+ // (min, max, enum, pattern...), this does not perform a strict JSON
+ // validation, which means the 'match' count may be higher than it should be.
+ deserialized = tmp;
+ match++;
+
+ log.log(Level.FINER, "Input data matches schema 'List'");
+ }
+ } catch (Exception e) {
+ // deserialization failed, continue
+ log.log(Level.FINER, "Input data does not match schema 'List'", e);
+ }
+
+ AIGuardMessageContent ret = new AIGuardMessageContent();
+ if (match == 1) {
+ ret.setActualInstance(deserialized);
+ } else {
+ Map res =
+ new ObjectMapper()
+ .readValue(
+ tree.traverse(jp.getCodec()).readValueAsTree().toString(),
+ new TypeReference