From 51c97742551a1676ec82ef198606cd3649ee777a Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Thu, 7 May 2026 16:09:47 +0000 Subject: [PATCH] Regenerate client from commit 6fe9b33 of spec repo --- .generator/schemas/v2/openapi.yaml | 381 ++++++++++++ .../CreateEmailTransportWebhookIntake.java | 106 ++++ .../com/datadog/api/client/ApiClient.java | 1 + .../api/client/v2/api/EmailTransportApi.java | 199 +++++++ .../client/v2/model/TransportWebhookLog.java | 297 ++++++++++ .../model/TransportWebhookLogAttributes.java | 497 ++++++++++++++++ .../v2/model/TransportWebhookLogEmail.java | 229 +++++++ .../model/TransportWebhookLogIpAttribute.java | 176 ++++++ .../v2/model/TransportWebhookLogMessage.java | 307 ++++++++++ .../model/TransportWebhookLogMessageAuth.java | 137 +++++ .../TransportWebhookLogMessageCustomArgs.java | 251 ++++++++ .../model/TransportWebhookLogMessageId.java | 192 ++++++ .../TransportWebhookLogMessageResponse.java | 194 ++++++ .../TransportWebhookLogMessageTimestamp.java | 220 +++++++ .../v2/model/TransportWebhookLogNetwork.java | 137 +++++ .../model/TransportWebhookLogNetworkIp.java | 188 ++++++ .../model/TransportWebhookLogOrgMetadata.java | 561 ++++++++++++++++++ .../api/client/v2/api/email_transport.feature | 22 + .../com/datadog/api/client/v2/api/undo.json | 6 + 19 files changed, 4101 insertions(+) create mode 100644 examples/v2/email-transport/CreateEmailTransportWebhookIntake.java create mode 100644 src/main/java/com/datadog/api/client/v2/api/EmailTransportApi.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/TransportWebhookLog.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/TransportWebhookLogAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/TransportWebhookLogEmail.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/TransportWebhookLogIpAttribute.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/TransportWebhookLogMessage.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/TransportWebhookLogMessageAuth.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/TransportWebhookLogMessageCustomArgs.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/TransportWebhookLogMessageId.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/TransportWebhookLogMessageResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/TransportWebhookLogMessageTimestamp.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/TransportWebhookLogNetwork.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/TransportWebhookLogNetworkIp.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/TransportWebhookLogOrgMetadata.java create mode 100644 src/test/resources/com/datadog/api/client/v2/api/email_transport.feature diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 440627d7e6b..ecadd5414e6 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -79306,6 +79306,321 @@ components: type: string x-enum-varnames: - SECRET + TransportWebhookLog: + description: A single email transport webhook log event. + properties: + attributes: + $ref: "#/components/schemas/TransportWebhookLogAttributes" + date: + description: The ISO 8601 timestamp of the event. + example: "2024-01-15T10:30:00Z" + format: date-time + type: string + log_id: + description: The unique log event identifier. + example: "AQAAAZPHnBT0TwJAdgAAAABBWlBIblVlNEFBQ0dFMmVkYTFDSnRR" + type: string + source: + description: The email transport provider. + example: "sendgrid" + type: string + status: + description: The log status level. + example: "info" + type: string + tags: + description: A list of tags associated with the event. + example: ["env:production"] + items: + description: A tag in key:value or key-only form (for example, env:production). + type: string + type: array + required: + - date + - log_id + - source + - status + - tags + - attributes + type: object + TransportWebhookLogAttributes: + description: Top-level attributes for the webhook log event, including delivery status, recipient details, and provider metadata. + properties: + category: + description: The event categories. + example: ["transactional"] + items: + description: An event category assigned by the transport provider. + type: string + type: array + email: + $ref: "#/components/schemas/TransportWebhookLogEmail" + email_id: + description: The unique email identifier. + example: "abc123-def456" + type: string + email_type_display_name: + description: The human-readable email type name. + example: "Monitor Alert" + type: string + message: + $ref: "#/components/schemas/TransportWebhookLogMessage" + network: + $ref: "#/components/schemas/TransportWebhookLogNetwork" + org: + description: The numeric organization identifier. + example: 1234 + format: int64 + type: integer + org_metadata: + $ref: "#/components/schemas/TransportWebhookLogOrgMetadata" + org_uuid: + description: The organization UUID. + example: "8dee7c38-00cb-11ea-a77b-8b5a08d3b091" + type: string + queue_time: + description: The timestamp when the email was queued. + example: "2024-01-15T10:29:00Z" + type: string + sg_machine_open: + description: Indicates whether the open event was triggered by automated machine activity rather than a human recipient (SendGrid-specific). + type: boolean + subject: + description: The email subject line. + example: "[Monitor Alert] CPU usage is high" + type: string + useragent: + description: The user agent string for open events. + example: "Mozilla/5.0" + type: string + type: object + TransportWebhookLogBatchRequest: + description: A batch of email transport webhook log events. + items: + $ref: "#/components/schemas/TransportWebhookLog" + type: array + TransportWebhookLogEmail: + description: The email address details. + properties: + address: + description: The recipient email address. + example: "user@example.com" + type: string + domain: + description: The recipient domain. + example: "example.com" + type: string + subject: + description: The email subject line. + example: "[Monitor Alert] CPU usage is high" + type: string + type: + description: Email categorization tags applied by the transport provider (for example, "transactional", "marketing"). + example: ["transactional"] + items: + description: An email type classification (for example, "transactional", "user"). + type: string + type: array + type: object + TransportWebhookLogIpAttribute: + description: An IP attribute with its sources. + properties: + ip: + description: The IP address. + example: "192.168.1.1" + type: string + source: + description: The transport providers or systems that reported this IP address. + example: ["sendgrid"] + items: + description: A transport provider or system that reported this IP address. + type: string + type: array + type: object + TransportWebhookLogMessage: + description: The message delivery event details. + properties: + auth: + $ref: "#/components/schemas/TransportWebhookLogMessageAuth" + custom_args: + $ref: "#/components/schemas/TransportWebhookLogMessageCustomArgs" + id: + $ref: "#/components/schemas/TransportWebhookLogMessageId" + name: + description: The delivery event type emitted by the transport provider (for example, "delivered", "dropped", "bounced"). + example: "delivered" + type: string + response: + $ref: "#/components/schemas/TransportWebhookLogMessageResponse" + sender_ip: + description: The IP address of the sending server. + example: "192.168.1.1" + type: string + timestamp: + $ref: "#/components/schemas/TransportWebhookLogMessageTimestamp" + type: object + TransportWebhookLogMessageAuth: + description: The message authentication details. + properties: + delivered_with_tls: + description: The TLS version or negotiation information. + example: "TLSv1.2" + type: string + type: object + TransportWebhookLogMessageCustomArgs: + description: Custom arguments passed through the email transport provider for tracking. + properties: + email_id: + description: The unique email identifier. + example: "abc123-def456" + type: string + email_type_display_name: + description: The human-readable email type name. + example: "Monitor Alert" + type: string + org_uuid: + description: The organization UUID. + example: "8dee7c38-00cb-11ea-a77b-8b5a08d3b091" + type: string + queue_time: + description: The timestamp when the email was queued. + example: "2024-01-15T10:29:00Z" + type: string + subject: + description: The email subject line. + example: "[Monitor Alert] CPU usage is high" + type: string + type: object + TransportWebhookLogMessageId: + description: The message identifiers. + properties: + message_id: + description: The RFC 5322 Message-ID. + example: "" + type: string + smtp_id: + description: The SMTP transaction identifier. + example: "" + type: string + transport_event_id: + description: The transport provider event identifier. + example: "evt_abc123" + type: string + type: object + TransportWebhookLogMessageResponse: + description: The SMTP response information. + properties: + enhanced_smtp_code: + description: The enhanced SMTP status code. + example: "2.0.0" + type: string + reason: + description: The SMTP response message. + example: "250 2.0.0 OK" + type: string + smtp_code: + description: The SMTP status code. + example: "250" + type: string + type: object + TransportWebhookLogMessageTimestamp: + description: The message delivery timing information. + properties: + event_timestamp: + description: The Unix timestamp of the event. + example: 1705312200.0 + format: double + type: number + lifetime: + description: The total delivery time in seconds. + example: 3.2 + format: double + type: number + queue_time: + description: Number of seconds the message spent in the delivery queue. + example: 1.5 + format: double + type: number + scheduled_time: + description: The scheduled delivery time as a Unix timestamp. + example: 1705312190.0 + format: double + type: number + type: object + TransportWebhookLogNetwork: + description: The network information for the event. + properties: + ip: + $ref: "#/components/schemas/TransportWebhookLogNetworkIp" + type: object + TransportWebhookLogNetworkIp: + description: The IP address information. + properties: + attributes: + description: Per-IP attribute records, each pairing an IP address with the providers that observed it. + items: + $ref: "#/components/schemas/TransportWebhookLogIpAttribute" + type: array + list: + description: The list of IP addresses. + example: ["192.168.1.1"] + items: + description: An IP address observed during message delivery. + type: string + type: array + type: object + TransportWebhookLogOrgMetadata: + description: Metadata about the organization that sent the email. + properties: + billing_country: + description: Country code or name used for billing purposes. + type: string + billing_plan: + description: The Datadog billing plan for the organization (for example, "pro", "enterprise"). + type: string + customer_tier: + description: Support or account tier assigned to the organization (for example, "tier-1"). + type: string + domain: + description: Primary email domain associated with the organization (for example, "example.com"). + type: string + industry: + description: Industry classification of the organization (for example, "technology", "finance"). + type: string + is_bugbounty: + description: Whether the organization is enrolled in the Datadog bug bounty program. + type: string + is_msp: + description: Whether the organization operates as a Managed Service Provider managing child orgs. + type: string + name: + description: Display name of the organization as configured in Datadog account settings. + type: string + org_uuid: + description: Globally unique identifier for the Datadog organization (UUID v1 format). + type: string + parent_org_id: + description: Identifier of the immediate parent organization, if this is a child org. + type: string + premium_support: + description: Whether the organization has a premium support plan with Datadog. + type: string + root_org_id: + description: Identifier of the top-level parent organization in a multi-org account hierarchy. + type: string + root_org_name: + description: Display name of the top-level parent organization in a multi-org account hierarchy. + type: string + shipping_country: + description: Country code or name used for shipping or regional assignment. + type: string + website: + description: Website URL provided during organization registration. + type: string + when_created: + description: ISO 8601 timestamp of when the Datadog organization was created. + type: string + type: object Trigger: description: "One of the triggers that can start the execution of a workflow." oneOf: @@ -99657,6 +99972,70 @@ paths: operator: OR permissions: - monitors_downtime + /api/v2/email/transport/webhook_intake: + post: + description: |- + Receives a batch of email transport webhook log events and emits an audit trail entry + for each event with a final delivery status (delivered, dropped, or bounced). + Only authorized organizations can submit events. + operationId: CreateEmailTransportWebhookIntake + requestBody: + content: + application/json: + examples: + default: + value: + - attributes: + email: + address: "user@example.com" + domain: "example.com" + email_id: "abc123-def456" + email_type_display_name: "Monitor Alert" + message: + id: + message_id: "" + smtp_id: "" + name: "delivered" + response: + reason: "250 2.0.0 OK" + smtp_code: "250" + timestamp: + event_timestamp: 1705312200.0 + org: 1234 + org_uuid: "8dee7c38-00cb-11ea-a77b-8b5a08d3b091" + subject: "[Monitor Alert] CPU usage is high" + date: "2024-01-15T10:30:00Z" + log_id: "AQAAAZPHnBT0TwJAdgAAAABBWlBIblVlNEFBQ0dFMmVkYTFDSnRR" + source: "sendgrid" + status: "info" + tags: + - "env:production" + schema: + $ref: "#/components/schemas/TransportWebhookLogBatchRequest" + required: true + responses: + "204": + description: No Content + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Ingest email transport webhook events + tags: + - Email Transport + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/error-tracking/issues/search: post: description: Search issues endpoint allows you to programmatically search for issues within your organization. This endpoint returns a list of issues that match a given search query, following the event search syntax. The search results are limited to a maximum of 100 issues per request. @@ -145653,6 +146032,8 @@ tags: scopes from alerting. Downtime settings, which can be scheduled with start and end times, prevent all alerting related to specified Datadog tags. name: Downtimes + - description: Endpoints for receiving email transport webhook events for audit trail processing. + name: Email Transport - description: Retrieves security risk scores for entities in your organization. name: Entity Risk Scores - description: View and manage issues within Error Tracking. See the [Error Tracking page](https://docs.datadoghq.com/error_tracking/) for more information. diff --git a/examples/v2/email-transport/CreateEmailTransportWebhookIntake.java b/examples/v2/email-transport/CreateEmailTransportWebhookIntake.java new file mode 100644 index 00000000000..0819ba67b1f --- /dev/null +++ b/examples/v2/email-transport/CreateEmailTransportWebhookIntake.java @@ -0,0 +1,106 @@ +// Ingest email transport webhook events returns "No Content" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.EmailTransportApi; +import com.datadog.api.client.v2.model.TransportWebhookLog; +import com.datadog.api.client.v2.model.TransportWebhookLogAttributes; +import com.datadog.api.client.v2.model.TransportWebhookLogEmail; +import com.datadog.api.client.v2.model.TransportWebhookLogIpAttribute; +import com.datadog.api.client.v2.model.TransportWebhookLogMessage; +import com.datadog.api.client.v2.model.TransportWebhookLogMessageAuth; +import com.datadog.api.client.v2.model.TransportWebhookLogMessageCustomArgs; +import com.datadog.api.client.v2.model.TransportWebhookLogMessageId; +import com.datadog.api.client.v2.model.TransportWebhookLogMessageResponse; +import com.datadog.api.client.v2.model.TransportWebhookLogMessageTimestamp; +import com.datadog.api.client.v2.model.TransportWebhookLogNetwork; +import com.datadog.api.client.v2.model.TransportWebhookLogNetworkIp; +import com.datadog.api.client.v2.model.TransportWebhookLogOrgMetadata; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.createEmailTransportWebhookIntake", true); + EmailTransportApi apiInstance = new EmailTransportApi(defaultClient); + + List body = + Collections.singletonList( + new TransportWebhookLog() + .attributes( + new TransportWebhookLogAttributes() + .category(Collections.singletonList("transactional")) + .email( + new TransportWebhookLogEmail() + .address("user@example.com") + .domain("example.com") + .subject("[Monitor Alert] CPU usage is high") + .type(Collections.singletonList("transactional"))) + .emailId("abc123-def456") + .emailTypeDisplayName("Monitor Alert") + .message( + new TransportWebhookLogMessage() + .auth( + new TransportWebhookLogMessageAuth() + .deliveredWithTls("TLSv1.2")) + .customArgs( + new TransportWebhookLogMessageCustomArgs() + .emailId("abc123-def456") + .emailTypeDisplayName("Monitor Alert") + .orgUuid("8dee7c38-00cb-11ea-a77b-8b5a08d3b091") + .queueTime("2024-01-15T10:29:00Z") + .subject("[Monitor Alert] CPU usage is high")) + .id( + new TransportWebhookLogMessageId() + .messageId("") + .smtpId("") + .transportEventId("evt_abc123")) + .name("delivered") + .response( + new TransportWebhookLogMessageResponse() + .enhancedSmtpCode("2.0.0") + .reason("250 2.0.0 OK") + .smtpCode("250")) + .senderIp("192.168.1.1") + .timestamp( + new TransportWebhookLogMessageTimestamp() + .eventTimestamp(1705312200.0) + .lifetime(3.2) + .queueTime(1.5) + .scheduledTime(1705312190.0))) + .network( + new TransportWebhookLogNetwork() + .ip( + new TransportWebhookLogNetworkIp() + .attributes( + Collections.singletonList( + new TransportWebhookLogIpAttribute() + .ip("192.168.1.1") + .source(Collections.singletonList("sendgrid")))) + .list(Collections.singletonList("192.168.1.1")))) + .org(1234L) + .orgMetadata(new TransportWebhookLogOrgMetadata()) + .orgUuid("8dee7c38-00cb-11ea-a77b-8b5a08d3b091") + .queueTime("2024-01-15T10:29:00Z") + .subject("[Monitor Alert] CPU usage is high") + .useragent("Mozilla/5.0")) + .date(OffsetDateTime.parse("2024-01-15T10:30:00Z")) + .logId("AQAAAZPHnBT0TwJAdgAAAABBWlBIblVlNEFBQ0dFMmVkYTFDSnRR") + .source("sendgrid") + .status("info") + .tags(Collections.singletonList("env:production"))); + + try { + apiInstance.createEmailTransportWebhookIntake(body); + } catch (ApiException e) { + System.err.println( + "Exception when calling EmailTransportApi#createEmailTransportWebhookIntake"); + 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/ApiClient.java b/src/main/java/com/datadog/api/client/ApiClient.java index e50cdd037c4..be887d473ed 100644 --- a/src/main/java/com/datadog/api/client/ApiClient.java +++ b/src/main/java/com/datadog/api/client/ApiClient.java @@ -883,6 +883,7 @@ public class ApiClient { put("v2.triggerDeploymentGatesEvaluation", false); put("v2.updateDeploymentGate", false); put("v2.updateDeploymentRule", false); + put("v2.createEmailTransportWebhookIntake", false); put("v2.createHamrOrgConnection", false); put("v2.getHamrOrgConnection", false); put("v2.createGlobalIncidentHandle", false); diff --git a/src/main/java/com/datadog/api/client/v2/api/EmailTransportApi.java b/src/main/java/com/datadog/api/client/v2/api/EmailTransportApi.java new file mode 100644 index 00000000000..49b3a65d3d6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/api/EmailTransportApi.java @@ -0,0 +1,199 @@ +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.TransportWebhookLog; +import jakarta.ws.rs.client.Invocation; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +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 EmailTransportApi { + private ApiClient apiClient; + + public EmailTransportApi() { + this(ApiClient.getDefaultApiClient()); + } + + public EmailTransportApi(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; + } + + /** + * Ingest email transport webhook events. + * + *

See {@link #createEmailTransportWebhookIntakeWithHttpInfo}. + * + * @param body (required) + * @throws ApiException if fails to make API call + */ + public void createEmailTransportWebhookIntake(List body) + throws ApiException { + createEmailTransportWebhookIntakeWithHttpInfo(body); + } + + /** + * Ingest email transport webhook events. + * + *

See {@link #createEmailTransportWebhookIntakeWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture + */ + public CompletableFuture createEmailTransportWebhookIntakeAsync( + List body) { + return createEmailTransportWebhookIntakeWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Receives a batch of email transport webhook log events and emits an audit trail entry for each + * event with a final delivery status (delivered, dropped, or bounced). Only authorized + * organizations can submit events. + * + * @param body (required) + * @return ApiResponse<Void> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
204 No Content -
400 Bad Request -
403 Forbidden -
429 Too many requests -
+ */ + public ApiResponse createEmailTransportWebhookIntakeWithHttpInfo( + List body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "createEmailTransportWebhookIntake"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, + "Missing the required parameter 'body' when calling createEmailTransportWebhookIntake"); + } + // create path and map variables + String localVarPath = "/api/v2/email/transport/webhook_intake"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.EmailTransportApi.createEmailTransportWebhookIntake", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Ingest email transport webhook events. + * + *

See {@link #createEmailTransportWebhookIntakeWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> createEmailTransportWebhookIntakeWithHttpInfoAsync( + List body) { + // Check if unstable operation is enabled + String operationId = "createEmailTransportWebhookIntake"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + 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" + + " createEmailTransportWebhookIntake")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/email/transport/webhook_intake"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.EmailTransportApi.createEmailTransportWebhookIntake", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + 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, + null); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/TransportWebhookLog.java b/src/main/java/com/datadog/api/client/v2/model/TransportWebhookLog.java new file mode 100644 index 00000000000..57c3b9ac2e6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TransportWebhookLog.java @@ -0,0 +1,297 @@ +/* + * 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.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** A single email transport webhook log event. */ +@JsonPropertyOrder({ + TransportWebhookLog.JSON_PROPERTY_ATTRIBUTES, + TransportWebhookLog.JSON_PROPERTY_DATE, + TransportWebhookLog.JSON_PROPERTY_LOG_ID, + TransportWebhookLog.JSON_PROPERTY_SOURCE, + TransportWebhookLog.JSON_PROPERTY_STATUS, + TransportWebhookLog.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TransportWebhookLog { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private TransportWebhookLogAttributes attributes; + + public static final String JSON_PROPERTY_DATE = "date"; + private OffsetDateTime date; + + public static final String JSON_PROPERTY_LOG_ID = "log_id"; + private String logId; + + public static final String JSON_PROPERTY_SOURCE = "source"; + private String source; + + public static final String JSON_PROPERTY_STATUS = "status"; + private String status; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private List tags = new ArrayList<>(); + + public TransportWebhookLog() {} + + @JsonCreator + public TransportWebhookLog( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + TransportWebhookLogAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_DATE) OffsetDateTime date, + @JsonProperty(required = true, value = JSON_PROPERTY_LOG_ID) String logId, + @JsonProperty(required = true, value = JSON_PROPERTY_SOURCE) String source, + @JsonProperty(required = true, value = JSON_PROPERTY_STATUS) String status, + @JsonProperty(required = true, value = JSON_PROPERTY_TAGS) List tags) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.date = date; + this.logId = logId; + this.source = source; + this.status = status; + this.tags = tags; + } + + public TransportWebhookLog attributes(TransportWebhookLogAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Top-level attributes for the webhook log event, including delivery status, recipient details, + * and provider metadata. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TransportWebhookLogAttributes getAttributes() { + return attributes; + } + + public void setAttributes(TransportWebhookLogAttributes attributes) { + this.attributes = attributes; + } + + public TransportWebhookLog date(OffsetDateTime date) { + this.date = date; + return this; + } + + /** + * The ISO 8601 timestamp of the event. + * + * @return date + */ + @JsonProperty(JSON_PROPERTY_DATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getDate() { + return date; + } + + public void setDate(OffsetDateTime date) { + this.date = date; + } + + public TransportWebhookLog logId(String logId) { + this.logId = logId; + return this; + } + + /** + * The unique log event identifier. + * + * @return logId + */ + @JsonProperty(JSON_PROPERTY_LOG_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getLogId() { + return logId; + } + + public void setLogId(String logId) { + this.logId = logId; + } + + public TransportWebhookLog source(String source) { + this.source = source; + return this; + } + + /** + * The email transport provider. + * + * @return source + */ + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getSource() { + return source; + } + + public void setSource(String source) { + this.source = source; + } + + public TransportWebhookLog status(String status) { + this.status = status; + return this; + } + + /** + * The log status level. + * + * @return status + */ + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public TransportWebhookLog tags(List tags) { + this.tags = tags; + return this; + } + + public TransportWebhookLog addTagsItem(String tagsItem) { + this.tags.add(tagsItem); + return this; + } + + /** + * A list of tags associated with the event. + * + * @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 TransportWebhookLog + */ + @JsonAnySetter + public TransportWebhookLog 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 TransportWebhookLog object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TransportWebhookLog transportWebhookLog = (TransportWebhookLog) o; + return Objects.equals(this.attributes, transportWebhookLog.attributes) + && Objects.equals(this.date, transportWebhookLog.date) + && Objects.equals(this.logId, transportWebhookLog.logId) + && Objects.equals(this.source, transportWebhookLog.source) + && Objects.equals(this.status, transportWebhookLog.status) + && Objects.equals(this.tags, transportWebhookLog.tags) + && Objects.equals(this.additionalProperties, transportWebhookLog.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, date, logId, source, status, tags, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TransportWebhookLog {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" date: ").append(toIndentedString(date)).append("\n"); + sb.append(" logId: ").append(toIndentedString(logId)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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/TransportWebhookLogAttributes.java b/src/main/java/com/datadog/api/client/v2/model/TransportWebhookLogAttributes.java new file mode 100644 index 00000000000..f3c839e6cbd --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TransportWebhookLogAttributes.java @@ -0,0 +1,497 @@ +/* + * 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.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; + +/** + * Top-level attributes for the webhook log event, including delivery status, recipient details, and + * provider metadata. + */ +@JsonPropertyOrder({ + TransportWebhookLogAttributes.JSON_PROPERTY_CATEGORY, + TransportWebhookLogAttributes.JSON_PROPERTY_EMAIL, + TransportWebhookLogAttributes.JSON_PROPERTY_EMAIL_ID, + TransportWebhookLogAttributes.JSON_PROPERTY_EMAIL_TYPE_DISPLAY_NAME, + TransportWebhookLogAttributes.JSON_PROPERTY_MESSAGE, + TransportWebhookLogAttributes.JSON_PROPERTY_NETWORK, + TransportWebhookLogAttributes.JSON_PROPERTY_ORG, + TransportWebhookLogAttributes.JSON_PROPERTY_ORG_METADATA, + TransportWebhookLogAttributes.JSON_PROPERTY_ORG_UUID, + TransportWebhookLogAttributes.JSON_PROPERTY_QUEUE_TIME, + TransportWebhookLogAttributes.JSON_PROPERTY_SG_MACHINE_OPEN, + TransportWebhookLogAttributes.JSON_PROPERTY_SUBJECT, + TransportWebhookLogAttributes.JSON_PROPERTY_USERAGENT +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TransportWebhookLogAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CATEGORY = "category"; + private List category = null; + + public static final String JSON_PROPERTY_EMAIL = "email"; + private TransportWebhookLogEmail email; + + public static final String JSON_PROPERTY_EMAIL_ID = "email_id"; + private String emailId; + + public static final String JSON_PROPERTY_EMAIL_TYPE_DISPLAY_NAME = "email_type_display_name"; + private String emailTypeDisplayName; + + public static final String JSON_PROPERTY_MESSAGE = "message"; + private TransportWebhookLogMessage message; + + public static final String JSON_PROPERTY_NETWORK = "network"; + private TransportWebhookLogNetwork network; + + public static final String JSON_PROPERTY_ORG = "org"; + private Long org; + + public static final String JSON_PROPERTY_ORG_METADATA = "org_metadata"; + private TransportWebhookLogOrgMetadata orgMetadata; + + public static final String JSON_PROPERTY_ORG_UUID = "org_uuid"; + private String orgUuid; + + public static final String JSON_PROPERTY_QUEUE_TIME = "queue_time"; + private String queueTime; + + public static final String JSON_PROPERTY_SG_MACHINE_OPEN = "sg_machine_open"; + private Boolean sgMachineOpen; + + public static final String JSON_PROPERTY_SUBJECT = "subject"; + private String subject; + + public static final String JSON_PROPERTY_USERAGENT = "useragent"; + private String useragent; + + public TransportWebhookLogAttributes category(List category) { + this.category = category; + return this; + } + + public TransportWebhookLogAttributes addCategoryItem(String categoryItem) { + if (this.category == null) { + this.category = new ArrayList<>(); + } + this.category.add(categoryItem); + return this; + } + + /** + * The event categories. + * + * @return category + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CATEGORY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getCategory() { + return category; + } + + public void setCategory(List category) { + this.category = category; + } + + public TransportWebhookLogAttributes email(TransportWebhookLogEmail email) { + this.email = email; + this.unparsed |= email.unparsed; + return this; + } + + /** + * The email address details. + * + * @return email + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMAIL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TransportWebhookLogEmail getEmail() { + return email; + } + + public void setEmail(TransportWebhookLogEmail email) { + this.email = email; + } + + public TransportWebhookLogAttributes emailId(String emailId) { + this.emailId = emailId; + return this; + } + + /** + * The unique email identifier. + * + * @return emailId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMAIL_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEmailId() { + return emailId; + } + + public void setEmailId(String emailId) { + this.emailId = emailId; + } + + public TransportWebhookLogAttributes emailTypeDisplayName(String emailTypeDisplayName) { + this.emailTypeDisplayName = emailTypeDisplayName; + return this; + } + + /** + * The human-readable email type name. + * + * @return emailTypeDisplayName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMAIL_TYPE_DISPLAY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEmailTypeDisplayName() { + return emailTypeDisplayName; + } + + public void setEmailTypeDisplayName(String emailTypeDisplayName) { + this.emailTypeDisplayName = emailTypeDisplayName; + } + + public TransportWebhookLogAttributes message(TransportWebhookLogMessage message) { + this.message = message; + this.unparsed |= message.unparsed; + return this; + } + + /** + * The message delivery event details. + * + * @return message + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TransportWebhookLogMessage getMessage() { + return message; + } + + public void setMessage(TransportWebhookLogMessage message) { + this.message = message; + } + + public TransportWebhookLogAttributes network(TransportWebhookLogNetwork network) { + this.network = network; + this.unparsed |= network.unparsed; + return this; + } + + /** + * The network information for the event. + * + * @return network + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NETWORK) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TransportWebhookLogNetwork getNetwork() { + return network; + } + + public void setNetwork(TransportWebhookLogNetwork network) { + this.network = network; + } + + public TransportWebhookLogAttributes org(Long org) { + this.org = org; + return this; + } + + /** + * The numeric organization identifier. + * + * @return org + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getOrg() { + return org; + } + + public void setOrg(Long org) { + this.org = org; + } + + public TransportWebhookLogAttributes orgMetadata(TransportWebhookLogOrgMetadata orgMetadata) { + this.orgMetadata = orgMetadata; + this.unparsed |= orgMetadata.unparsed; + return this; + } + + /** + * Metadata about the organization that sent the email. + * + * @return orgMetadata + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG_METADATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TransportWebhookLogOrgMetadata getOrgMetadata() { + return orgMetadata; + } + + public void setOrgMetadata(TransportWebhookLogOrgMetadata orgMetadata) { + this.orgMetadata = orgMetadata; + } + + public TransportWebhookLogAttributes orgUuid(String orgUuid) { + this.orgUuid = orgUuid; + return this; + } + + /** + * The organization UUID. + * + * @return orgUuid + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG_UUID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getOrgUuid() { + return orgUuid; + } + + public void setOrgUuid(String orgUuid) { + this.orgUuid = orgUuid; + } + + public TransportWebhookLogAttributes queueTime(String queueTime) { + this.queueTime = queueTime; + return this; + } + + /** + * The timestamp when the email was queued. + * + * @return queueTime + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUEUE_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getQueueTime() { + return queueTime; + } + + public void setQueueTime(String queueTime) { + this.queueTime = queueTime; + } + + public TransportWebhookLogAttributes sgMachineOpen(Boolean sgMachineOpen) { + this.sgMachineOpen = sgMachineOpen; + return this; + } + + /** + * Indicates whether the open event was triggered by automated machine activity rather than a + * human recipient (SendGrid-specific). + * + * @return sgMachineOpen + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SG_MACHINE_OPEN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getSgMachineOpen() { + return sgMachineOpen; + } + + public void setSgMachineOpen(Boolean sgMachineOpen) { + this.sgMachineOpen = sgMachineOpen; + } + + public TransportWebhookLogAttributes subject(String subject) { + this.subject = subject; + return this; + } + + /** + * The email subject line. + * + * @return subject + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUBJECT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSubject() { + return subject; + } + + public void setSubject(String subject) { + this.subject = subject; + } + + public TransportWebhookLogAttributes useragent(String useragent) { + this.useragent = useragent; + return this; + } + + /** + * The user agent string for open events. + * + * @return useragent + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USERAGENT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getUseragent() { + return useragent; + } + + public void setUseragent(String useragent) { + this.useragent = useragent; + } + + /** + * 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 TransportWebhookLogAttributes + */ + @JsonAnySetter + public TransportWebhookLogAttributes 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 TransportWebhookLogAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TransportWebhookLogAttributes transportWebhookLogAttributes = (TransportWebhookLogAttributes) o; + return Objects.equals(this.category, transportWebhookLogAttributes.category) + && Objects.equals(this.email, transportWebhookLogAttributes.email) + && Objects.equals(this.emailId, transportWebhookLogAttributes.emailId) + && Objects.equals( + this.emailTypeDisplayName, transportWebhookLogAttributes.emailTypeDisplayName) + && Objects.equals(this.message, transportWebhookLogAttributes.message) + && Objects.equals(this.network, transportWebhookLogAttributes.network) + && Objects.equals(this.org, transportWebhookLogAttributes.org) + && Objects.equals(this.orgMetadata, transportWebhookLogAttributes.orgMetadata) + && Objects.equals(this.orgUuid, transportWebhookLogAttributes.orgUuid) + && Objects.equals(this.queueTime, transportWebhookLogAttributes.queueTime) + && Objects.equals(this.sgMachineOpen, transportWebhookLogAttributes.sgMachineOpen) + && Objects.equals(this.subject, transportWebhookLogAttributes.subject) + && Objects.equals(this.useragent, transportWebhookLogAttributes.useragent) + && Objects.equals( + this.additionalProperties, transportWebhookLogAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + category, + email, + emailId, + emailTypeDisplayName, + message, + network, + org, + orgMetadata, + orgUuid, + queueTime, + sgMachineOpen, + subject, + useragent, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TransportWebhookLogAttributes {\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" emailId: ").append(toIndentedString(emailId)).append("\n"); + sb.append(" emailTypeDisplayName: ") + .append(toIndentedString(emailTypeDisplayName)) + .append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" network: ").append(toIndentedString(network)).append("\n"); + sb.append(" org: ").append(toIndentedString(org)).append("\n"); + sb.append(" orgMetadata: ").append(toIndentedString(orgMetadata)).append("\n"); + sb.append(" orgUuid: ").append(toIndentedString(orgUuid)).append("\n"); + sb.append(" queueTime: ").append(toIndentedString(queueTime)).append("\n"); + sb.append(" sgMachineOpen: ").append(toIndentedString(sgMachineOpen)).append("\n"); + sb.append(" subject: ").append(toIndentedString(subject)).append("\n"); + sb.append(" useragent: ").append(toIndentedString(useragent)).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/TransportWebhookLogEmail.java b/src/main/java/com/datadog/api/client/v2/model/TransportWebhookLogEmail.java new file mode 100644 index 00000000000..425519b00a6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TransportWebhookLogEmail.java @@ -0,0 +1,229 @@ +/* + * 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.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 email address details. */ +@JsonPropertyOrder({ + TransportWebhookLogEmail.JSON_PROPERTY_ADDRESS, + TransportWebhookLogEmail.JSON_PROPERTY_DOMAIN, + TransportWebhookLogEmail.JSON_PROPERTY_SUBJECT, + TransportWebhookLogEmail.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TransportWebhookLogEmail { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ADDRESS = "address"; + private String address; + + public static final String JSON_PROPERTY_DOMAIN = "domain"; + private String domain; + + public static final String JSON_PROPERTY_SUBJECT = "subject"; + private String subject; + + public static final String JSON_PROPERTY_TYPE = "type"; + private List type = null; + + public TransportWebhookLogEmail address(String address) { + this.address = address; + return this; + } + + /** + * The recipient email address. + * + * @return address + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ADDRESS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public TransportWebhookLogEmail domain(String domain) { + this.domain = domain; + return this; + } + + /** + * The recipient domain. + * + * @return domain + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DOMAIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDomain() { + return domain; + } + + public void setDomain(String domain) { + this.domain = domain; + } + + public TransportWebhookLogEmail subject(String subject) { + this.subject = subject; + return this; + } + + /** + * The email subject line. + * + * @return subject + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUBJECT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSubject() { + return subject; + } + + public void setSubject(String subject) { + this.subject = subject; + } + + public TransportWebhookLogEmail type(List type) { + this.type = type; + return this; + } + + public TransportWebhookLogEmail addTypeItem(String typeItem) { + if (this.type == null) { + this.type = new ArrayList<>(); + } + this.type.add(typeItem); + return this; + } + + /** + * Email categorization tags applied by the transport provider (for example, "transactional", + * "marketing"). + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getType() { + return type; + } + + public void setType(List 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 TransportWebhookLogEmail + */ + @JsonAnySetter + public TransportWebhookLogEmail 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 TransportWebhookLogEmail object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TransportWebhookLogEmail transportWebhookLogEmail = (TransportWebhookLogEmail) o; + return Objects.equals(this.address, transportWebhookLogEmail.address) + && Objects.equals(this.domain, transportWebhookLogEmail.domain) + && Objects.equals(this.subject, transportWebhookLogEmail.subject) + && Objects.equals(this.type, transportWebhookLogEmail.type) + && Objects.equals(this.additionalProperties, transportWebhookLogEmail.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(address, domain, subject, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TransportWebhookLogEmail {\n"); + sb.append(" address: ").append(toIndentedString(address)).append("\n"); + sb.append(" domain: ").append(toIndentedString(domain)).append("\n"); + sb.append(" subject: ").append(toIndentedString(subject)).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/TransportWebhookLogIpAttribute.java b/src/main/java/com/datadog/api/client/v2/model/TransportWebhookLogIpAttribute.java new file mode 100644 index 00000000000..24a112d80f2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TransportWebhookLogIpAttribute.java @@ -0,0 +1,176 @@ +/* + * 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.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; + +/** An IP attribute with its sources. */ +@JsonPropertyOrder({ + TransportWebhookLogIpAttribute.JSON_PROPERTY_IP, + TransportWebhookLogIpAttribute.JSON_PROPERTY_SOURCE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TransportWebhookLogIpAttribute { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_IP = "ip"; + private String ip; + + public static final String JSON_PROPERTY_SOURCE = "source"; + private List source = null; + + public TransportWebhookLogIpAttribute ip(String ip) { + this.ip = ip; + return this; + } + + /** + * The IP address. + * + * @return ip + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getIp() { + return ip; + } + + public void setIp(String ip) { + this.ip = ip; + } + + public TransportWebhookLogIpAttribute source(List source) { + this.source = source; + return this; + } + + public TransportWebhookLogIpAttribute addSourceItem(String sourceItem) { + if (this.source == null) { + this.source = new ArrayList<>(); + } + this.source.add(sourceItem); + return this; + } + + /** + * The transport providers or systems that reported this IP address. + * + * @return source + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getSource() { + return source; + } + + public void setSource(List source) { + this.source = source; + } + + /** + * 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 TransportWebhookLogIpAttribute + */ + @JsonAnySetter + public TransportWebhookLogIpAttribute 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 TransportWebhookLogIpAttribute object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TransportWebhookLogIpAttribute transportWebhookLogIpAttribute = + (TransportWebhookLogIpAttribute) o; + return Objects.equals(this.ip, transportWebhookLogIpAttribute.ip) + && Objects.equals(this.source, transportWebhookLogIpAttribute.source) + && Objects.equals( + this.additionalProperties, transportWebhookLogIpAttribute.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(ip, source, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TransportWebhookLogIpAttribute {\n"); + sb.append(" ip: ").append(toIndentedString(ip)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).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/TransportWebhookLogMessage.java b/src/main/java/com/datadog/api/client/v2/model/TransportWebhookLogMessage.java new file mode 100644 index 00000000000..2a720500e7d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TransportWebhookLogMessage.java @@ -0,0 +1,307 @@ +/* + * 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.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 message delivery event details. */ +@JsonPropertyOrder({ + TransportWebhookLogMessage.JSON_PROPERTY_AUTH, + TransportWebhookLogMessage.JSON_PROPERTY_CUSTOM_ARGS, + TransportWebhookLogMessage.JSON_PROPERTY_ID, + TransportWebhookLogMessage.JSON_PROPERTY_NAME, + TransportWebhookLogMessage.JSON_PROPERTY_RESPONSE, + TransportWebhookLogMessage.JSON_PROPERTY_SENDER_IP, + TransportWebhookLogMessage.JSON_PROPERTY_TIMESTAMP +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TransportWebhookLogMessage { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AUTH = "auth"; + private TransportWebhookLogMessageAuth auth; + + public static final String JSON_PROPERTY_CUSTOM_ARGS = "custom_args"; + private TransportWebhookLogMessageCustomArgs customArgs; + + public static final String JSON_PROPERTY_ID = "id"; + private TransportWebhookLogMessageId id; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_RESPONSE = "response"; + private TransportWebhookLogMessageResponse response; + + public static final String JSON_PROPERTY_SENDER_IP = "sender_ip"; + private String senderIp; + + public static final String JSON_PROPERTY_TIMESTAMP = "timestamp"; + private TransportWebhookLogMessageTimestamp timestamp; + + public TransportWebhookLogMessage auth(TransportWebhookLogMessageAuth auth) { + this.auth = auth; + this.unparsed |= auth.unparsed; + return this; + } + + /** + * The message authentication details. + * + * @return auth + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUTH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TransportWebhookLogMessageAuth getAuth() { + return auth; + } + + public void setAuth(TransportWebhookLogMessageAuth auth) { + this.auth = auth; + } + + public TransportWebhookLogMessage customArgs(TransportWebhookLogMessageCustomArgs customArgs) { + this.customArgs = customArgs; + this.unparsed |= customArgs.unparsed; + return this; + } + + /** + * Custom arguments passed through the email transport provider for tracking. + * + * @return customArgs + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOM_ARGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TransportWebhookLogMessageCustomArgs getCustomArgs() { + return customArgs; + } + + public void setCustomArgs(TransportWebhookLogMessageCustomArgs customArgs) { + this.customArgs = customArgs; + } + + public TransportWebhookLogMessage id(TransportWebhookLogMessageId id) { + this.id = id; + this.unparsed |= id.unparsed; + return this; + } + + /** + * The message identifiers. + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TransportWebhookLogMessageId getId() { + return id; + } + + public void setId(TransportWebhookLogMessageId id) { + this.id = id; + } + + public TransportWebhookLogMessage name(String name) { + this.name = name; + return this; + } + + /** + * The delivery event type emitted by the transport provider (for example, "delivered", "dropped", + * "bounced"). + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public TransportWebhookLogMessage response(TransportWebhookLogMessageResponse response) { + this.response = response; + this.unparsed |= response.unparsed; + return this; + } + + /** + * The SMTP response information. + * + * @return response + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESPONSE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TransportWebhookLogMessageResponse getResponse() { + return response; + } + + public void setResponse(TransportWebhookLogMessageResponse response) { + this.response = response; + } + + public TransportWebhookLogMessage senderIp(String senderIp) { + this.senderIp = senderIp; + return this; + } + + /** + * The IP address of the sending server. + * + * @return senderIp + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SENDER_IP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSenderIp() { + return senderIp; + } + + public void setSenderIp(String senderIp) { + this.senderIp = senderIp; + } + + public TransportWebhookLogMessage timestamp(TransportWebhookLogMessageTimestamp timestamp) { + this.timestamp = timestamp; + this.unparsed |= timestamp.unparsed; + return this; + } + + /** + * The message delivery timing information. + * + * @return timestamp + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TIMESTAMP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TransportWebhookLogMessageTimestamp getTimestamp() { + return timestamp; + } + + public void setTimestamp(TransportWebhookLogMessageTimestamp timestamp) { + this.timestamp = timestamp; + } + + /** + * 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 TransportWebhookLogMessage + */ + @JsonAnySetter + public TransportWebhookLogMessage 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 TransportWebhookLogMessage object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TransportWebhookLogMessage transportWebhookLogMessage = (TransportWebhookLogMessage) o; + return Objects.equals(this.auth, transportWebhookLogMessage.auth) + && Objects.equals(this.customArgs, transportWebhookLogMessage.customArgs) + && Objects.equals(this.id, transportWebhookLogMessage.id) + && Objects.equals(this.name, transportWebhookLogMessage.name) + && Objects.equals(this.response, transportWebhookLogMessage.response) + && Objects.equals(this.senderIp, transportWebhookLogMessage.senderIp) + && Objects.equals(this.timestamp, transportWebhookLogMessage.timestamp) + && Objects.equals( + this.additionalProperties, transportWebhookLogMessage.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + auth, customArgs, id, name, response, senderIp, timestamp, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TransportWebhookLogMessage {\n"); + sb.append(" auth: ").append(toIndentedString(auth)).append("\n"); + sb.append(" customArgs: ").append(toIndentedString(customArgs)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" response: ").append(toIndentedString(response)).append("\n"); + sb.append(" senderIp: ").append(toIndentedString(senderIp)).append("\n"); + sb.append(" timestamp: ").append(toIndentedString(timestamp)).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/TransportWebhookLogMessageAuth.java b/src/main/java/com/datadog/api/client/v2/model/TransportWebhookLogMessageAuth.java new file mode 100644 index 00000000000..74d62fcc5e0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TransportWebhookLogMessageAuth.java @@ -0,0 +1,137 @@ +/* + * 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.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 message authentication details. */ +@JsonPropertyOrder({TransportWebhookLogMessageAuth.JSON_PROPERTY_DELIVERED_WITH_TLS}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TransportWebhookLogMessageAuth { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DELIVERED_WITH_TLS = "delivered_with_tls"; + private String deliveredWithTls; + + public TransportWebhookLogMessageAuth deliveredWithTls(String deliveredWithTls) { + this.deliveredWithTls = deliveredWithTls; + return this; + } + + /** + * The TLS version or negotiation information. + * + * @return deliveredWithTls + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DELIVERED_WITH_TLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDeliveredWithTls() { + return deliveredWithTls; + } + + public void setDeliveredWithTls(String deliveredWithTls) { + this.deliveredWithTls = deliveredWithTls; + } + + /** + * 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 TransportWebhookLogMessageAuth + */ + @JsonAnySetter + public TransportWebhookLogMessageAuth 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 TransportWebhookLogMessageAuth object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TransportWebhookLogMessageAuth transportWebhookLogMessageAuth = + (TransportWebhookLogMessageAuth) o; + return Objects.equals(this.deliveredWithTls, transportWebhookLogMessageAuth.deliveredWithTls) + && Objects.equals( + this.additionalProperties, transportWebhookLogMessageAuth.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(deliveredWithTls, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TransportWebhookLogMessageAuth {\n"); + sb.append(" deliveredWithTls: ").append(toIndentedString(deliveredWithTls)).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/TransportWebhookLogMessageCustomArgs.java b/src/main/java/com/datadog/api/client/v2/model/TransportWebhookLogMessageCustomArgs.java new file mode 100644 index 00000000000..92a598e36d0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TransportWebhookLogMessageCustomArgs.java @@ -0,0 +1,251 @@ +/* + * 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.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; + +/** Custom arguments passed through the email transport provider for tracking. */ +@JsonPropertyOrder({ + TransportWebhookLogMessageCustomArgs.JSON_PROPERTY_EMAIL_ID, + TransportWebhookLogMessageCustomArgs.JSON_PROPERTY_EMAIL_TYPE_DISPLAY_NAME, + TransportWebhookLogMessageCustomArgs.JSON_PROPERTY_ORG_UUID, + TransportWebhookLogMessageCustomArgs.JSON_PROPERTY_QUEUE_TIME, + TransportWebhookLogMessageCustomArgs.JSON_PROPERTY_SUBJECT +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TransportWebhookLogMessageCustomArgs { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_EMAIL_ID = "email_id"; + private String emailId; + + public static final String JSON_PROPERTY_EMAIL_TYPE_DISPLAY_NAME = "email_type_display_name"; + private String emailTypeDisplayName; + + public static final String JSON_PROPERTY_ORG_UUID = "org_uuid"; + private String orgUuid; + + public static final String JSON_PROPERTY_QUEUE_TIME = "queue_time"; + private String queueTime; + + public static final String JSON_PROPERTY_SUBJECT = "subject"; + private String subject; + + public TransportWebhookLogMessageCustomArgs emailId(String emailId) { + this.emailId = emailId; + return this; + } + + /** + * The unique email identifier. + * + * @return emailId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMAIL_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEmailId() { + return emailId; + } + + public void setEmailId(String emailId) { + this.emailId = emailId; + } + + public TransportWebhookLogMessageCustomArgs emailTypeDisplayName(String emailTypeDisplayName) { + this.emailTypeDisplayName = emailTypeDisplayName; + return this; + } + + /** + * The human-readable email type name. + * + * @return emailTypeDisplayName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EMAIL_TYPE_DISPLAY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEmailTypeDisplayName() { + return emailTypeDisplayName; + } + + public void setEmailTypeDisplayName(String emailTypeDisplayName) { + this.emailTypeDisplayName = emailTypeDisplayName; + } + + public TransportWebhookLogMessageCustomArgs orgUuid(String orgUuid) { + this.orgUuid = orgUuid; + return this; + } + + /** + * The organization UUID. + * + * @return orgUuid + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG_UUID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getOrgUuid() { + return orgUuid; + } + + public void setOrgUuid(String orgUuid) { + this.orgUuid = orgUuid; + } + + public TransportWebhookLogMessageCustomArgs queueTime(String queueTime) { + this.queueTime = queueTime; + return this; + } + + /** + * The timestamp when the email was queued. + * + * @return queueTime + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUEUE_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getQueueTime() { + return queueTime; + } + + public void setQueueTime(String queueTime) { + this.queueTime = queueTime; + } + + public TransportWebhookLogMessageCustomArgs subject(String subject) { + this.subject = subject; + return this; + } + + /** + * The email subject line. + * + * @return subject + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUBJECT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSubject() { + return subject; + } + + public void setSubject(String subject) { + this.subject = subject; + } + + /** + * 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 TransportWebhookLogMessageCustomArgs + */ + @JsonAnySetter + public TransportWebhookLogMessageCustomArgs 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 TransportWebhookLogMessageCustomArgs object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TransportWebhookLogMessageCustomArgs transportWebhookLogMessageCustomArgs = + (TransportWebhookLogMessageCustomArgs) o; + return Objects.equals(this.emailId, transportWebhookLogMessageCustomArgs.emailId) + && Objects.equals( + this.emailTypeDisplayName, transportWebhookLogMessageCustomArgs.emailTypeDisplayName) + && Objects.equals(this.orgUuid, transportWebhookLogMessageCustomArgs.orgUuid) + && Objects.equals(this.queueTime, transportWebhookLogMessageCustomArgs.queueTime) + && Objects.equals(this.subject, transportWebhookLogMessageCustomArgs.subject) + && Objects.equals( + this.additionalProperties, transportWebhookLogMessageCustomArgs.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + emailId, emailTypeDisplayName, orgUuid, queueTime, subject, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TransportWebhookLogMessageCustomArgs {\n"); + sb.append(" emailId: ").append(toIndentedString(emailId)).append("\n"); + sb.append(" emailTypeDisplayName: ") + .append(toIndentedString(emailTypeDisplayName)) + .append("\n"); + sb.append(" orgUuid: ").append(toIndentedString(orgUuid)).append("\n"); + sb.append(" queueTime: ").append(toIndentedString(queueTime)).append("\n"); + sb.append(" subject: ").append(toIndentedString(subject)).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/TransportWebhookLogMessageId.java b/src/main/java/com/datadog/api/client/v2/model/TransportWebhookLogMessageId.java new file mode 100644 index 00000000000..ea5b8538dcc --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TransportWebhookLogMessageId.java @@ -0,0 +1,192 @@ +/* + * 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.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 message identifiers. */ +@JsonPropertyOrder({ + TransportWebhookLogMessageId.JSON_PROPERTY_MESSAGE_ID, + TransportWebhookLogMessageId.JSON_PROPERTY_SMTP_ID, + TransportWebhookLogMessageId.JSON_PROPERTY_TRANSPORT_EVENT_ID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TransportWebhookLogMessageId { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_MESSAGE_ID = "message_id"; + private String messageId; + + public static final String JSON_PROPERTY_SMTP_ID = "smtp_id"; + private String smtpId; + + public static final String JSON_PROPERTY_TRANSPORT_EVENT_ID = "transport_event_id"; + private String transportEventId; + + public TransportWebhookLogMessageId messageId(String messageId) { + this.messageId = messageId; + return this; + } + + /** + * The RFC 5322 Message-ID. + * + * @return messageId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMessageId() { + return messageId; + } + + public void setMessageId(String messageId) { + this.messageId = messageId; + } + + public TransportWebhookLogMessageId smtpId(String smtpId) { + this.smtpId = smtpId; + return this; + } + + /** + * The SMTP transaction identifier. + * + * @return smtpId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SMTP_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSmtpId() { + return smtpId; + } + + public void setSmtpId(String smtpId) { + this.smtpId = smtpId; + } + + public TransportWebhookLogMessageId transportEventId(String transportEventId) { + this.transportEventId = transportEventId; + return this; + } + + /** + * The transport provider event identifier. + * + * @return transportEventId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TRANSPORT_EVENT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTransportEventId() { + return transportEventId; + } + + public void setTransportEventId(String transportEventId) { + this.transportEventId = transportEventId; + } + + /** + * 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 TransportWebhookLogMessageId + */ + @JsonAnySetter + public TransportWebhookLogMessageId 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 TransportWebhookLogMessageId object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TransportWebhookLogMessageId transportWebhookLogMessageId = (TransportWebhookLogMessageId) o; + return Objects.equals(this.messageId, transportWebhookLogMessageId.messageId) + && Objects.equals(this.smtpId, transportWebhookLogMessageId.smtpId) + && Objects.equals(this.transportEventId, transportWebhookLogMessageId.transportEventId) + && Objects.equals( + this.additionalProperties, transportWebhookLogMessageId.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(messageId, smtpId, transportEventId, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TransportWebhookLogMessageId {\n"); + sb.append(" messageId: ").append(toIndentedString(messageId)).append("\n"); + sb.append(" smtpId: ").append(toIndentedString(smtpId)).append("\n"); + sb.append(" transportEventId: ").append(toIndentedString(transportEventId)).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/TransportWebhookLogMessageResponse.java b/src/main/java/com/datadog/api/client/v2/model/TransportWebhookLogMessageResponse.java new file mode 100644 index 00000000000..3babbf5b0a7 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TransportWebhookLogMessageResponse.java @@ -0,0 +1,194 @@ +/* + * 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.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 SMTP response information. */ +@JsonPropertyOrder({ + TransportWebhookLogMessageResponse.JSON_PROPERTY_ENHANCED_SMTP_CODE, + TransportWebhookLogMessageResponse.JSON_PROPERTY_REASON, + TransportWebhookLogMessageResponse.JSON_PROPERTY_SMTP_CODE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TransportWebhookLogMessageResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENHANCED_SMTP_CODE = "enhanced_smtp_code"; + private String enhancedSmtpCode; + + public static final String JSON_PROPERTY_REASON = "reason"; + private String reason; + + public static final String JSON_PROPERTY_SMTP_CODE = "smtp_code"; + private String smtpCode; + + public TransportWebhookLogMessageResponse enhancedSmtpCode(String enhancedSmtpCode) { + this.enhancedSmtpCode = enhancedSmtpCode; + return this; + } + + /** + * The enhanced SMTP status code. + * + * @return enhancedSmtpCode + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENHANCED_SMTP_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEnhancedSmtpCode() { + return enhancedSmtpCode; + } + + public void setEnhancedSmtpCode(String enhancedSmtpCode) { + this.enhancedSmtpCode = enhancedSmtpCode; + } + + public TransportWebhookLogMessageResponse reason(String reason) { + this.reason = reason; + return this; + } + + /** + * The SMTP response message. + * + * @return reason + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REASON) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getReason() { + return reason; + } + + public void setReason(String reason) { + this.reason = reason; + } + + public TransportWebhookLogMessageResponse smtpCode(String smtpCode) { + this.smtpCode = smtpCode; + return this; + } + + /** + * The SMTP status code. + * + * @return smtpCode + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SMTP_CODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSmtpCode() { + return smtpCode; + } + + public void setSmtpCode(String smtpCode) { + this.smtpCode = smtpCode; + } + + /** + * 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 TransportWebhookLogMessageResponse + */ + @JsonAnySetter + public TransportWebhookLogMessageResponse 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 TransportWebhookLogMessageResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TransportWebhookLogMessageResponse transportWebhookLogMessageResponse = + (TransportWebhookLogMessageResponse) o; + return Objects.equals( + this.enhancedSmtpCode, transportWebhookLogMessageResponse.enhancedSmtpCode) + && Objects.equals(this.reason, transportWebhookLogMessageResponse.reason) + && Objects.equals(this.smtpCode, transportWebhookLogMessageResponse.smtpCode) + && Objects.equals( + this.additionalProperties, transportWebhookLogMessageResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(enhancedSmtpCode, reason, smtpCode, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TransportWebhookLogMessageResponse {\n"); + sb.append(" enhancedSmtpCode: ").append(toIndentedString(enhancedSmtpCode)).append("\n"); + sb.append(" reason: ").append(toIndentedString(reason)).append("\n"); + sb.append(" smtpCode: ").append(toIndentedString(smtpCode)).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/TransportWebhookLogMessageTimestamp.java b/src/main/java/com/datadog/api/client/v2/model/TransportWebhookLogMessageTimestamp.java new file mode 100644 index 00000000000..a617a64ea38 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TransportWebhookLogMessageTimestamp.java @@ -0,0 +1,220 @@ +/* + * 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.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 message delivery timing information. */ +@JsonPropertyOrder({ + TransportWebhookLogMessageTimestamp.JSON_PROPERTY_EVENT_TIMESTAMP, + TransportWebhookLogMessageTimestamp.JSON_PROPERTY_LIFETIME, + TransportWebhookLogMessageTimestamp.JSON_PROPERTY_QUEUE_TIME, + TransportWebhookLogMessageTimestamp.JSON_PROPERTY_SCHEDULED_TIME +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TransportWebhookLogMessageTimestamp { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_EVENT_TIMESTAMP = "event_timestamp"; + private Double eventTimestamp; + + public static final String JSON_PROPERTY_LIFETIME = "lifetime"; + private Double lifetime; + + public static final String JSON_PROPERTY_QUEUE_TIME = "queue_time"; + private Double queueTime; + + public static final String JSON_PROPERTY_SCHEDULED_TIME = "scheduled_time"; + private Double scheduledTime; + + public TransportWebhookLogMessageTimestamp eventTimestamp(Double eventTimestamp) { + this.eventTimestamp = eventTimestamp; + return this; + } + + /** + * The Unix timestamp of the event. + * + * @return eventTimestamp + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EVENT_TIMESTAMP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Double getEventTimestamp() { + return eventTimestamp; + } + + public void setEventTimestamp(Double eventTimestamp) { + this.eventTimestamp = eventTimestamp; + } + + public TransportWebhookLogMessageTimestamp lifetime(Double lifetime) { + this.lifetime = lifetime; + return this; + } + + /** + * The total delivery time in seconds. + * + * @return lifetime + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIFETIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Double getLifetime() { + return lifetime; + } + + public void setLifetime(Double lifetime) { + this.lifetime = lifetime; + } + + public TransportWebhookLogMessageTimestamp queueTime(Double queueTime) { + this.queueTime = queueTime; + return this; + } + + /** + * Number of seconds the message spent in the delivery queue. + * + * @return queueTime + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_QUEUE_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Double getQueueTime() { + return queueTime; + } + + public void setQueueTime(Double queueTime) { + this.queueTime = queueTime; + } + + public TransportWebhookLogMessageTimestamp scheduledTime(Double scheduledTime) { + this.scheduledTime = scheduledTime; + return this; + } + + /** + * The scheduled delivery time as a Unix timestamp. + * + * @return scheduledTime + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCHEDULED_TIME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Double getScheduledTime() { + return scheduledTime; + } + + public void setScheduledTime(Double scheduledTime) { + this.scheduledTime = scheduledTime; + } + + /** + * 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 TransportWebhookLogMessageTimestamp + */ + @JsonAnySetter + public TransportWebhookLogMessageTimestamp 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 TransportWebhookLogMessageTimestamp object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TransportWebhookLogMessageTimestamp transportWebhookLogMessageTimestamp = + (TransportWebhookLogMessageTimestamp) o; + return Objects.equals(this.eventTimestamp, transportWebhookLogMessageTimestamp.eventTimestamp) + && Objects.equals(this.lifetime, transportWebhookLogMessageTimestamp.lifetime) + && Objects.equals(this.queueTime, transportWebhookLogMessageTimestamp.queueTime) + && Objects.equals(this.scheduledTime, transportWebhookLogMessageTimestamp.scheduledTime) + && Objects.equals( + this.additionalProperties, transportWebhookLogMessageTimestamp.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(eventTimestamp, lifetime, queueTime, scheduledTime, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TransportWebhookLogMessageTimestamp {\n"); + sb.append(" eventTimestamp: ").append(toIndentedString(eventTimestamp)).append("\n"); + sb.append(" lifetime: ").append(toIndentedString(lifetime)).append("\n"); + sb.append(" queueTime: ").append(toIndentedString(queueTime)).append("\n"); + sb.append(" scheduledTime: ").append(toIndentedString(scheduledTime)).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/TransportWebhookLogNetwork.java b/src/main/java/com/datadog/api/client/v2/model/TransportWebhookLogNetwork.java new file mode 100644 index 00000000000..9b8ecb402ae --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TransportWebhookLogNetwork.java @@ -0,0 +1,137 @@ +/* + * 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.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 network information for the event. */ +@JsonPropertyOrder({TransportWebhookLogNetwork.JSON_PROPERTY_IP}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TransportWebhookLogNetwork { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_IP = "ip"; + private TransportWebhookLogNetworkIp ip; + + public TransportWebhookLogNetwork ip(TransportWebhookLogNetworkIp ip) { + this.ip = ip; + this.unparsed |= ip.unparsed; + return this; + } + + /** + * The IP address information. + * + * @return ip + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TransportWebhookLogNetworkIp getIp() { + return ip; + } + + public void setIp(TransportWebhookLogNetworkIp ip) { + this.ip = ip; + } + + /** + * 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 TransportWebhookLogNetwork + */ + @JsonAnySetter + public TransportWebhookLogNetwork 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 TransportWebhookLogNetwork object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TransportWebhookLogNetwork transportWebhookLogNetwork = (TransportWebhookLogNetwork) o; + return Objects.equals(this.ip, transportWebhookLogNetwork.ip) + && Objects.equals( + this.additionalProperties, transportWebhookLogNetwork.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(ip, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TransportWebhookLogNetwork {\n"); + sb.append(" ip: ").append(toIndentedString(ip)).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/TransportWebhookLogNetworkIp.java b/src/main/java/com/datadog/api/client/v2/model/TransportWebhookLogNetworkIp.java new file mode 100644 index 00000000000..05aa4125d85 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TransportWebhookLogNetworkIp.java @@ -0,0 +1,188 @@ +/* + * 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.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 IP address information. */ +@JsonPropertyOrder({ + TransportWebhookLogNetworkIp.JSON_PROPERTY_ATTRIBUTES, + TransportWebhookLogNetworkIp.JSON_PROPERTY_LIST +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TransportWebhookLogNetworkIp { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private List attributes = null; + + public static final String JSON_PROPERTY_LIST = "list"; + private List list = null; + + public TransportWebhookLogNetworkIp attributes(List attributes) { + this.attributes = attributes; + for (TransportWebhookLogIpAttribute item : attributes) { + this.unparsed |= item.unparsed; + } + return this; + } + + public TransportWebhookLogNetworkIp addAttributesItem( + TransportWebhookLogIpAttribute attributesItem) { + if (this.attributes == null) { + this.attributes = new ArrayList<>(); + } + this.attributes.add(attributesItem); + this.unparsed |= attributesItem.unparsed; + return this; + } + + /** + * Per-IP attribute records, each pairing an IP address with the providers that observed it. + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getAttributes() { + return attributes; + } + + public void setAttributes(List attributes) { + this.attributes = attributes; + } + + public TransportWebhookLogNetworkIp list(List list) { + this.list = list; + return this; + } + + public TransportWebhookLogNetworkIp addListItem(String listItem) { + if (this.list == null) { + this.list = new ArrayList<>(); + } + this.list.add(listItem); + return this; + } + + /** + * The list of IP addresses. + * + * @return list + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LIST) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getList() { + return list; + } + + public void setList(List list) { + this.list = list; + } + + /** + * 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 TransportWebhookLogNetworkIp + */ + @JsonAnySetter + public TransportWebhookLogNetworkIp 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 TransportWebhookLogNetworkIp object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TransportWebhookLogNetworkIp transportWebhookLogNetworkIp = (TransportWebhookLogNetworkIp) o; + return Objects.equals(this.attributes, transportWebhookLogNetworkIp.attributes) + && Objects.equals(this.list, transportWebhookLogNetworkIp.list) + && Objects.equals( + this.additionalProperties, transportWebhookLogNetworkIp.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, list, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TransportWebhookLogNetworkIp {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" list: ").append(toIndentedString(list)).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/TransportWebhookLogOrgMetadata.java b/src/main/java/com/datadog/api/client/v2/model/TransportWebhookLogOrgMetadata.java new file mode 100644 index 00000000000..be9df33addb --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TransportWebhookLogOrgMetadata.java @@ -0,0 +1,561 @@ +/* + * 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.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; + +/** Metadata about the organization that sent the email. */ +@JsonPropertyOrder({ + TransportWebhookLogOrgMetadata.JSON_PROPERTY_BILLING_COUNTRY, + TransportWebhookLogOrgMetadata.JSON_PROPERTY_BILLING_PLAN, + TransportWebhookLogOrgMetadata.JSON_PROPERTY_CUSTOMER_TIER, + TransportWebhookLogOrgMetadata.JSON_PROPERTY_DOMAIN, + TransportWebhookLogOrgMetadata.JSON_PROPERTY_INDUSTRY, + TransportWebhookLogOrgMetadata.JSON_PROPERTY_IS_BUGBOUNTY, + TransportWebhookLogOrgMetadata.JSON_PROPERTY_IS_MSP, + TransportWebhookLogOrgMetadata.JSON_PROPERTY_NAME, + TransportWebhookLogOrgMetadata.JSON_PROPERTY_ORG_UUID, + TransportWebhookLogOrgMetadata.JSON_PROPERTY_PARENT_ORG_ID, + TransportWebhookLogOrgMetadata.JSON_PROPERTY_PREMIUM_SUPPORT, + TransportWebhookLogOrgMetadata.JSON_PROPERTY_ROOT_ORG_ID, + TransportWebhookLogOrgMetadata.JSON_PROPERTY_ROOT_ORG_NAME, + TransportWebhookLogOrgMetadata.JSON_PROPERTY_SHIPPING_COUNTRY, + TransportWebhookLogOrgMetadata.JSON_PROPERTY_WEBSITE, + TransportWebhookLogOrgMetadata.JSON_PROPERTY_WHEN_CREATED +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TransportWebhookLogOrgMetadata { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_BILLING_COUNTRY = "billing_country"; + private String billingCountry; + + public static final String JSON_PROPERTY_BILLING_PLAN = "billing_plan"; + private String billingPlan; + + public static final String JSON_PROPERTY_CUSTOMER_TIER = "customer_tier"; + private String customerTier; + + public static final String JSON_PROPERTY_DOMAIN = "domain"; + private String domain; + + public static final String JSON_PROPERTY_INDUSTRY = "industry"; + private String industry; + + public static final String JSON_PROPERTY_IS_BUGBOUNTY = "is_bugbounty"; + private String isBugbounty; + + public static final String JSON_PROPERTY_IS_MSP = "is_msp"; + private String isMsp; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_ORG_UUID = "org_uuid"; + private String orgUuid; + + public static final String JSON_PROPERTY_PARENT_ORG_ID = "parent_org_id"; + private String parentOrgId; + + public static final String JSON_PROPERTY_PREMIUM_SUPPORT = "premium_support"; + private String premiumSupport; + + public static final String JSON_PROPERTY_ROOT_ORG_ID = "root_org_id"; + private String rootOrgId; + + public static final String JSON_PROPERTY_ROOT_ORG_NAME = "root_org_name"; + private String rootOrgName; + + public static final String JSON_PROPERTY_SHIPPING_COUNTRY = "shipping_country"; + private String shippingCountry; + + public static final String JSON_PROPERTY_WEBSITE = "website"; + private String website; + + public static final String JSON_PROPERTY_WHEN_CREATED = "when_created"; + private String whenCreated; + + public TransportWebhookLogOrgMetadata billingCountry(String billingCountry) { + this.billingCountry = billingCountry; + return this; + } + + /** + * Country code or name used for billing purposes. + * + * @return billingCountry + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BILLING_COUNTRY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBillingCountry() { + return billingCountry; + } + + public void setBillingCountry(String billingCountry) { + this.billingCountry = billingCountry; + } + + public TransportWebhookLogOrgMetadata billingPlan(String billingPlan) { + this.billingPlan = billingPlan; + return this; + } + + /** + * The Datadog billing plan for the organization (for example, "pro", "enterprise"). + * + * @return billingPlan + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_BILLING_PLAN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getBillingPlan() { + return billingPlan; + } + + public void setBillingPlan(String billingPlan) { + this.billingPlan = billingPlan; + } + + public TransportWebhookLogOrgMetadata customerTier(String customerTier) { + this.customerTier = customerTier; + return this; + } + + /** + * Support or account tier assigned to the organization (for example, "tier-1"). + * + * @return customerTier + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CUSTOMER_TIER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getCustomerTier() { + return customerTier; + } + + public void setCustomerTier(String customerTier) { + this.customerTier = customerTier; + } + + public TransportWebhookLogOrgMetadata domain(String domain) { + this.domain = domain; + return this; + } + + /** + * Primary email domain associated with the organization (for example, "example.com"). + * + * @return domain + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DOMAIN) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDomain() { + return domain; + } + + public void setDomain(String domain) { + this.domain = domain; + } + + public TransportWebhookLogOrgMetadata industry(String industry) { + this.industry = industry; + return this; + } + + /** + * Industry classification of the organization (for example, "technology", "finance"). + * + * @return industry + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INDUSTRY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getIndustry() { + return industry; + } + + public void setIndustry(String industry) { + this.industry = industry; + } + + public TransportWebhookLogOrgMetadata isBugbounty(String isBugbounty) { + this.isBugbounty = isBugbounty; + return this; + } + + /** + * Whether the organization is enrolled in the Datadog bug bounty program. + * + * @return isBugbounty + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_BUGBOUNTY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getIsBugbounty() { + return isBugbounty; + } + + public void setIsBugbounty(String isBugbounty) { + this.isBugbounty = isBugbounty; + } + + public TransportWebhookLogOrgMetadata isMsp(String isMsp) { + this.isMsp = isMsp; + return this; + } + + /** + * Whether the organization operates as a Managed Service Provider managing child orgs. + * + * @return isMsp + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_IS_MSP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getIsMsp() { + return isMsp; + } + + public void setIsMsp(String isMsp) { + this.isMsp = isMsp; + } + + public TransportWebhookLogOrgMetadata name(String name) { + this.name = name; + return this; + } + + /** + * Display name of the organization as configured in Datadog account settings. + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public TransportWebhookLogOrgMetadata orgUuid(String orgUuid) { + this.orgUuid = orgUuid; + return this; + } + + /** + * Globally unique identifier for the Datadog organization (UUID v1 format). + * + * @return orgUuid + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ORG_UUID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getOrgUuid() { + return orgUuid; + } + + public void setOrgUuid(String orgUuid) { + this.orgUuid = orgUuid; + } + + public TransportWebhookLogOrgMetadata parentOrgId(String parentOrgId) { + this.parentOrgId = parentOrgId; + return this; + } + + /** + * Identifier of the immediate parent organization, if this is a child org. + * + * @return parentOrgId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PARENT_ORG_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getParentOrgId() { + return parentOrgId; + } + + public void setParentOrgId(String parentOrgId) { + this.parentOrgId = parentOrgId; + } + + public TransportWebhookLogOrgMetadata premiumSupport(String premiumSupport) { + this.premiumSupport = premiumSupport; + return this; + } + + /** + * Whether the organization has a premium support plan with Datadog. + * + * @return premiumSupport + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PREMIUM_SUPPORT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPremiumSupport() { + return premiumSupport; + } + + public void setPremiumSupport(String premiumSupport) { + this.premiumSupport = premiumSupport; + } + + public TransportWebhookLogOrgMetadata rootOrgId(String rootOrgId) { + this.rootOrgId = rootOrgId; + return this; + } + + /** + * Identifier of the top-level parent organization in a multi-org account hierarchy. + * + * @return rootOrgId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ROOT_ORG_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRootOrgId() { + return rootOrgId; + } + + public void setRootOrgId(String rootOrgId) { + this.rootOrgId = rootOrgId; + } + + public TransportWebhookLogOrgMetadata rootOrgName(String rootOrgName) { + this.rootOrgName = rootOrgName; + return this; + } + + /** + * Display name of the top-level parent organization in a multi-org account hierarchy. + * + * @return rootOrgName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ROOT_ORG_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getRootOrgName() { + return rootOrgName; + } + + public void setRootOrgName(String rootOrgName) { + this.rootOrgName = rootOrgName; + } + + public TransportWebhookLogOrgMetadata shippingCountry(String shippingCountry) { + this.shippingCountry = shippingCountry; + return this; + } + + /** + * Country code or name used for shipping or regional assignment. + * + * @return shippingCountry + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SHIPPING_COUNTRY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getShippingCountry() { + return shippingCountry; + } + + public void setShippingCountry(String shippingCountry) { + this.shippingCountry = shippingCountry; + } + + public TransportWebhookLogOrgMetadata website(String website) { + this.website = website; + return this; + } + + /** + * Website URL provided during organization registration. + * + * @return website + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WEBSITE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getWebsite() { + return website; + } + + public void setWebsite(String website) { + this.website = website; + } + + public TransportWebhookLogOrgMetadata whenCreated(String whenCreated) { + this.whenCreated = whenCreated; + return this; + } + + /** + * ISO 8601 timestamp of when the Datadog organization was created. + * + * @return whenCreated + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_WHEN_CREATED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getWhenCreated() { + return whenCreated; + } + + public void setWhenCreated(String whenCreated) { + this.whenCreated = whenCreated; + } + + /** + * 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 TransportWebhookLogOrgMetadata + */ + @JsonAnySetter + public TransportWebhookLogOrgMetadata 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 TransportWebhookLogOrgMetadata object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TransportWebhookLogOrgMetadata transportWebhookLogOrgMetadata = + (TransportWebhookLogOrgMetadata) o; + return Objects.equals(this.billingCountry, transportWebhookLogOrgMetadata.billingCountry) + && Objects.equals(this.billingPlan, transportWebhookLogOrgMetadata.billingPlan) + && Objects.equals(this.customerTier, transportWebhookLogOrgMetadata.customerTier) + && Objects.equals(this.domain, transportWebhookLogOrgMetadata.domain) + && Objects.equals(this.industry, transportWebhookLogOrgMetadata.industry) + && Objects.equals(this.isBugbounty, transportWebhookLogOrgMetadata.isBugbounty) + && Objects.equals(this.isMsp, transportWebhookLogOrgMetadata.isMsp) + && Objects.equals(this.name, transportWebhookLogOrgMetadata.name) + && Objects.equals(this.orgUuid, transportWebhookLogOrgMetadata.orgUuid) + && Objects.equals(this.parentOrgId, transportWebhookLogOrgMetadata.parentOrgId) + && Objects.equals(this.premiumSupport, transportWebhookLogOrgMetadata.premiumSupport) + && Objects.equals(this.rootOrgId, transportWebhookLogOrgMetadata.rootOrgId) + && Objects.equals(this.rootOrgName, transportWebhookLogOrgMetadata.rootOrgName) + && Objects.equals(this.shippingCountry, transportWebhookLogOrgMetadata.shippingCountry) + && Objects.equals(this.website, transportWebhookLogOrgMetadata.website) + && Objects.equals(this.whenCreated, transportWebhookLogOrgMetadata.whenCreated) + && Objects.equals( + this.additionalProperties, transportWebhookLogOrgMetadata.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + billingCountry, + billingPlan, + customerTier, + domain, + industry, + isBugbounty, + isMsp, + name, + orgUuid, + parentOrgId, + premiumSupport, + rootOrgId, + rootOrgName, + shippingCountry, + website, + whenCreated, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TransportWebhookLogOrgMetadata {\n"); + sb.append(" billingCountry: ").append(toIndentedString(billingCountry)).append("\n"); + sb.append(" billingPlan: ").append(toIndentedString(billingPlan)).append("\n"); + sb.append(" customerTier: ").append(toIndentedString(customerTier)).append("\n"); + sb.append(" domain: ").append(toIndentedString(domain)).append("\n"); + sb.append(" industry: ").append(toIndentedString(industry)).append("\n"); + sb.append(" isBugbounty: ").append(toIndentedString(isBugbounty)).append("\n"); + sb.append(" isMsp: ").append(toIndentedString(isMsp)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" orgUuid: ").append(toIndentedString(orgUuid)).append("\n"); + sb.append(" parentOrgId: ").append(toIndentedString(parentOrgId)).append("\n"); + sb.append(" premiumSupport: ").append(toIndentedString(premiumSupport)).append("\n"); + sb.append(" rootOrgId: ").append(toIndentedString(rootOrgId)).append("\n"); + sb.append(" rootOrgName: ").append(toIndentedString(rootOrgName)).append("\n"); + sb.append(" shippingCountry: ").append(toIndentedString(shippingCountry)).append("\n"); + sb.append(" website: ").append(toIndentedString(website)).append("\n"); + sb.append(" whenCreated: ").append(toIndentedString(whenCreated)).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/test/resources/com/datadog/api/client/v2/api/email_transport.feature b/src/test/resources/com/datadog/api/client/v2/api/email_transport.feature new file mode 100644 index 00000000000..f2b014905ed --- /dev/null +++ b/src/test/resources/com/datadog/api/client/v2/api/email_transport.feature @@ -0,0 +1,22 @@ +@endpoint(email-transport) @endpoint(email-transport-v2) +Feature: Email Transport + Endpoints for receiving email transport webhook events for audit trail + processing. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "EmailTransport" API + And operation "CreateEmailTransportWebhookIntake" enabled + And new "CreateEmailTransportWebhookIntake" request + And body with value [{"attributes": {"category": ["transactional"], "email": {"address": "user@example.com", "domain": "example.com", "subject": "[Monitor Alert] CPU usage is high", "type": ["transactional"]}, "email_id": "abc123-def456", "email_type_display_name": "Monitor Alert", "message": {"auth": {"delivered_with_tls": "TLSv1.2"}, "custom_args": {"email_id": "abc123-def456", "email_type_display_name": "Monitor Alert", "org_uuid": "8dee7c38-00cb-11ea-a77b-8b5a08d3b091", "queue_time": "2024-01-15T10:29:00Z", "subject": "[Monitor Alert] CPU usage is high"}, "id": {"message_id": "", "smtp_id": "", "transport_event_id": "evt_abc123"}, "name": "delivered", "response": {"enhanced_smtp_code": "2.0.0", "reason": "250 2.0.0 OK", "smtp_code": "250"}, "sender_ip": "192.168.1.1", "timestamp": {"event_timestamp": 1705312200.0, "lifetime": 3.2, "queue_time": 1.5, "scheduled_time": 1705312190.0}}, "network": {"ip": {"attributes": [{"ip": "192.168.1.1", "source": ["sendgrid"]}], "list": ["192.168.1.1"]}}, "org": 1234, "org_metadata": {}, "org_uuid": "8dee7c38-00cb-11ea-a77b-8b5a08d3b091", "queue_time": "2024-01-15T10:29:00Z", "subject": "[Monitor Alert] CPU usage is high", "useragent": "Mozilla/5.0"}, "date": "2024-01-15T10:30:00Z", "log_id": "AQAAAZPHnBT0TwJAdgAAAABBWlBIblVlNEFBQ0dFMmVkYTFDSnRR", "source": "sendgrid", "status": "info", "tags": ["env:production"]}] + + @generated @skip @team:DataDog/dogmail + Scenario: Ingest email transport webhook events returns "Bad Request" response + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/dogmail + Scenario: Ingest email transport webhook events returns "No Content" response + When the request is sent + Then the response status is 204 No Content 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 d5a8323e270..96d9f3eb5d1 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 @@ -1863,6 +1863,12 @@ "type": "idempotent" } }, + "CreateEmailTransportWebhookIntake": { + "tag": "Email Transport", + "undo": { + "type": "safe" + } + }, "SearchIssues": { "tag": "Error Tracking", "undo": {