From d09b1b61b0f44db8ff6cbc886494b1ae35b18c09 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 18 Aug 2026 11:35:46 +0000 Subject: [PATCH] Regenerate client from commit b2e244b of spec repo --- .generator/schemas/v2/openapi.yaml | 1020 ++++++++++++++++- .../CreateElasticCloudIntegrationAccount.java | 89 ++ .../DeleteElasticCloudIntegrationAccount.java | 24 + .../GetElasticCloudIntegrationAccount.java | 27 + .../ListElasticCloudIntegrationAccounts.java | 27 + .../UpdateElasticCloudIntegrationAccount.java | 89 ++ .../CreateSignalNotificationRule.java | 2 +- .../CreateVulnerabilityNotificationRule.java | 2 +- .../PatchSignalNotificationRule.java | 2 +- .../PatchVulnerabilityNotificationRule.java | 2 +- .../CreateTwilioIntegrationAccount.java | 73 ++ .../DeleteTwilioIntegrationAccount.java | 24 + .../GetTwilioIntegrationAccount.java | 27 + .../ListTwilioIntegrationAccounts.java | 26 + .../UpdateTwilioIntegrationAccount.java | 74 ++ .../com/datadog/api/client/ApiClient.java | 10 + .../api/client/v2/api/ElasticCloudApi.java | 849 ++++++++++++++ .../v2/api/TwilioIntegrationAccountsApi.java | 834 ++++++++++++++ ...DetailedIndexStatsIntegrationDataflow.java | 160 +++ ...ticCloudIndexStatsIntegrationDataflow.java | 158 +++ ...sticCloudIntegrationAccountAttributes.java | 267 +++++ ...CloudIntegrationAccountAuthentication.java | 226 ++++ ...sticCloudIntegrationAccountCreateData.java | 188 +++ .../ElasticCloudIntegrationAccountData.java | 206 ++++ ...ElasticCloudIntegrationAccountRequest.java | 151 +++ ...lasticCloudIntegrationAccountResponse.java | 141 +++ ...lasticCloudIntegrationAccountSettings.java | 184 +++ ...CloudIntegrationAccountSettingsUpdate.java | 181 +++ ...oudIntegrationAccountUpdateAttributes.java | 244 ++++ ...sticCloudIntegrationAccountUpdateData.java | 191 +++ ...cCloudIntegrationAccountUpdateRequest.java | 154 +++ ...asticCloudIntegrationAccountsResponse.java | 161 +++ .../ElasticCloudIntegrationDataflows.java | 366 ++++++ ...lasticCloudMetricsIntegrationDataflow.java | 157 +++ ...udPendingTaskStatsIntegrationDataflow.java | 160 +++ ...ardGracefulTimeoutIntegrationDataflow.java | 165 +++ ...dPrimaryShardStatsIntegrationDataflow.java | 160 +++ ...ardAllocationStatsIntegrationDataflow.java | 162 +++ ...asticCloudSlmStatsIntegrationDataflow.java | 158 +++ .../v2/model/IntegrationAccountBasicAuth.java | 208 ++++ .../IntegrationAccountBasicAuthType.java | 57 + .../IntegrationAccountDataflowHealth.java | 63 + .../IntegrationAccountDataflowStatus.java | 198 ++++ .../model/IntegrationAccountPermissions.java | 147 +++ .../v2/model/IntegrationAccountType.java | 57 + .../TwilioAlertsLogsIntegrationDataflow.java | 157 +++ ...oCallSummariesLogsIntegrationDataflow.java | 159 +++ ...ioCloudCostMetricsIntegrationDataflow.java | 158 +++ .../TwilioEventsLogsIntegrationDataflow.java | 157 +++ .../TwilioIntegrationAccountAttributes.java | 263 +++++ ...wilioIntegrationAccountAuthentication.java | 225 ++++ .../TwilioIntegrationAccountCreateData.java | 187 +++ .../model/TwilioIntegrationAccountData.java | 204 ++++ .../TwilioIntegrationAccountRequest.java | 151 +++ .../TwilioIntegrationAccountResponse.java | 141 +++ .../TwilioIntegrationAccountSettings.java | 175 +++ ...wilioIntegrationAccountSettingsUpdate.java | 167 +++ ...lioIntegrationAccountUpdateAttributes.java | 240 ++++ .../TwilioIntegrationAccountUpdateData.java | 189 +++ ...TwilioIntegrationAccountUpdateRequest.java | 151 +++ .../TwilioIntegrationAccountsResponse.java | 158 +++ .../v2/model/TwilioIntegrationDataflows.java | 230 ++++ ...TwilioMessagesLogsIntegrationDataflow.java | 157 +++ ...ated_the_notification_rule_response.freeze | 2 +- ...reated_the_notification_rule_response.json | 10 +- ...ated_the_notification_rule_response.freeze | 2 +- ...reated_the_notification_rule_response.json | 10 +- ..._Rule_successfully_deleted_response.freeze | 2 +- ...ns_Rule_successfully_deleted_response.json | 16 +- ..._Rule_successfully_deleted_response.freeze | 2 +- ...ns_Rule_successfully_deleted_response.json | 16 +- ..._Notification_rule_details_response.freeze | 2 +- ...ns_Notification_rule_details_response.json | 16 +- ..._Notification_rule_details_response.freeze | 2 +- ...ns_Notification_rule_details_response.json | 16 +- ...list_of_notification_rules_response.freeze | 2 +- ...e_list_of_notification_rules_response.json | 12 +- ...list_of_notification_rules_response.freeze | 2 +- ...e_list_of_notification_rules_response.json | 12 +- ...n_rule_returns_Bad_Request_response.freeze | 2 +- ...ion_rule_returns_Bad_Request_response.json | 14 +- ..._rule_successfully_patched_response.freeze | 2 +- ...on_rule_successfully_patched_response.json | 18 +- ...n_rule_returns_Bad_Request_response.freeze | 2 +- ...ion_rule_returns_Bad_Request_response.json | 14 +- ..._rule_successfully_patched_response.freeze | 2 +- ...on_rule_successfully_patched_response.json | 18 +- .../api/client/v2/api/elastic_cloud.feature | 128 +++ .../com/datadog/api/client/v2/api/given.json | 4 +- .../client/v2/api/security_monitoring.feature | 8 +- .../api/twilio_integration_accounts.feature | 133 +++ .../com/datadog/api/client/v2/api/undo.json | 74 ++ 92 files changed, 11571 insertions(+), 112 deletions(-) create mode 100644 examples/v2/elastic-cloud/CreateElasticCloudIntegrationAccount.java create mode 100644 examples/v2/elastic-cloud/DeleteElasticCloudIntegrationAccount.java create mode 100644 examples/v2/elastic-cloud/GetElasticCloudIntegrationAccount.java create mode 100644 examples/v2/elastic-cloud/ListElasticCloudIntegrationAccounts.java create mode 100644 examples/v2/elastic-cloud/UpdateElasticCloudIntegrationAccount.java create mode 100644 examples/v2/twilio-integration-accounts/CreateTwilioIntegrationAccount.java create mode 100644 examples/v2/twilio-integration-accounts/DeleteTwilioIntegrationAccount.java create mode 100644 examples/v2/twilio-integration-accounts/GetTwilioIntegrationAccount.java create mode 100644 examples/v2/twilio-integration-accounts/ListTwilioIntegrationAccounts.java create mode 100644 examples/v2/twilio-integration-accounts/UpdateTwilioIntegrationAccount.java create mode 100644 src/main/java/com/datadog/api/client/v2/api/ElasticCloudApi.java create mode 100644 src/main/java/com/datadog/api/client/v2/api/TwilioIntegrationAccountsApi.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ElasticCloudDetailedIndexStatsIntegrationDataflow.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ElasticCloudIndexStatsIntegrationDataflow.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ElasticCloudIntegrationAccountAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ElasticCloudIntegrationAccountAuthentication.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ElasticCloudIntegrationAccountCreateData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ElasticCloudIntegrationAccountData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ElasticCloudIntegrationAccountRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ElasticCloudIntegrationAccountResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ElasticCloudIntegrationAccountSettings.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ElasticCloudIntegrationAccountSettingsUpdate.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ElasticCloudIntegrationAccountUpdateAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ElasticCloudIntegrationAccountUpdateData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ElasticCloudIntegrationAccountUpdateRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ElasticCloudIntegrationAccountsResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ElasticCloudIntegrationDataflows.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ElasticCloudMetricsIntegrationDataflow.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ElasticCloudPendingTaskStatsIntegrationDataflow.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ElasticCloudPrimaryShardGracefulTimeoutIntegrationDataflow.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ElasticCloudPrimaryShardStatsIntegrationDataflow.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ElasticCloudShardAllocationStatsIntegrationDataflow.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/ElasticCloudSlmStatsIntegrationDataflow.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IntegrationAccountBasicAuth.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IntegrationAccountBasicAuthType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IntegrationAccountDataflowHealth.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IntegrationAccountDataflowStatus.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IntegrationAccountPermissions.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/IntegrationAccountType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/TwilioAlertsLogsIntegrationDataflow.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/TwilioCallSummariesLogsIntegrationDataflow.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/TwilioCloudCostMetricsIntegrationDataflow.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/TwilioEventsLogsIntegrationDataflow.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/TwilioIntegrationAccountAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/TwilioIntegrationAccountAuthentication.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/TwilioIntegrationAccountCreateData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/TwilioIntegrationAccountData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/TwilioIntegrationAccountRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/TwilioIntegrationAccountResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/TwilioIntegrationAccountSettings.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/TwilioIntegrationAccountSettingsUpdate.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/TwilioIntegrationAccountUpdateAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/TwilioIntegrationAccountUpdateData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/TwilioIntegrationAccountUpdateRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/TwilioIntegrationAccountsResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/TwilioIntegrationDataflows.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/TwilioMessagesLogsIntegrationDataflow.java create mode 100644 src/test/resources/com/datadog/api/client/v2/api/elastic_cloud.feature create mode 100644 src/test/resources/com/datadog/api/client/v2/api/twilio_integration_accounts.feature diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index db0bdfdf15a..466fd959924 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -941,6 +941,13 @@ components: required: true schema: type: string + IntegrationAccountIdParameter: + description: Unique identifier of the integration account. + in: path + name: account_id + required: true + schema: + type: string IssueIDPathParameter: description: The identifier of the issue. example: "c1726a66-1f64-11ee-b338-da7ad0900002" @@ -34847,6 +34854,247 @@ components: - score - severity type: object + ElasticCloudDetailedIndexStatsIntegrationDataflow: + description: The Elastic Cloud detailed index stats dataflow. + properties: + enabled: + description: Whether the dataflow is enabled. + example: true + type: boolean + status: + $ref: "#/components/schemas/IntegrationAccountDataflowStatus" + type: object + ElasticCloudIndexStatsIntegrationDataflow: + description: The Elastic Cloud index stats dataflow. + properties: + enabled: + description: Whether the dataflow is enabled. + example: true + type: boolean + status: + $ref: "#/components/schemas/IntegrationAccountDataflowStatus" + type: object + ElasticCloudIntegrationAccountAttributes: + description: Attributes of an Elastic Cloud integration account. + properties: + authentication: + $ref: "#/components/schemas/ElasticCloudIntegrationAccountAuthentication" + dataflows: + $ref: "#/components/schemas/ElasticCloudIntegrationDataflows" + name: + description: Human-readable name of the account. + example: elastic-cloud-prod + type: string + permissions: + $ref: "#/components/schemas/IntegrationAccountPermissions" + settings: + $ref: "#/components/schemas/ElasticCloudIntegrationAccountSettings" + required: + - name + - authentication + type: object + ElasticCloudIntegrationAccountAuthentication: + description: Authentication for the Elastic Cloud integration account. Exactly one method is set. + oneOf: + - $ref: "#/components/schemas/IntegrationAccountBasicAuth" + ElasticCloudIntegrationAccountCreateData: + description: Data envelope for creating an Elastic Cloud integration account. + properties: + attributes: + $ref: "#/components/schemas/ElasticCloudIntegrationAccountAttributes" + type: + $ref: "#/components/schemas/IntegrationAccountType" + required: + - type + - attributes + type: object + ElasticCloudIntegrationAccountData: + description: Data envelope of an Elastic Cloud integration account, including server-assigned identity. + properties: + attributes: + $ref: "#/components/schemas/ElasticCloudIntegrationAccountAttributes" + id: + description: Server-generated unique identifier of the integration account. + example: 953a0060-81ec-4221-aed4-d4733b59cd96 + readOnly: true + type: string + type: + $ref: "#/components/schemas/IntegrationAccountType" + required: + - id + - type + - attributes + type: object + ElasticCloudIntegrationAccountRequest: + description: Request payload to create an Elastic Cloud integration account. + properties: + data: + $ref: "#/components/schemas/ElasticCloudIntegrationAccountCreateData" + required: + - data + type: object + ElasticCloudIntegrationAccountResponse: + description: Response payload for a single Elastic Cloud integration account. + properties: + data: + $ref: "#/components/schemas/ElasticCloudIntegrationAccountData" + type: object + ElasticCloudIntegrationAccountSettings: + description: Settings for the Elastic Cloud integration account. + properties: + tags: + description: Custom tags for this deployment. + example: + - env:prod + items: + type: string + type: array + url: + description: Deployment URL. + example: "https://example.es.us-central1.gcp.cloud.es.io:9243" + type: string + required: + - url + type: object + ElasticCloudIntegrationAccountSettingsUpdate: + description: Settings to update on the Elastic Cloud integration account. Only the fields provided are changed. + properties: + tags: + description: Custom tags for this deployment. + example: + - env:prod + items: + type: string + type: array + url: + description: Deployment URL. + example: "https://example.es.us-central1.gcp.cloud.es.io:9243" + type: string + type: object + ElasticCloudIntegrationAccountUpdateAttributes: + description: >- + Updatable attributes of an Elastic Cloud integration account. Every field is optional; only the fields provided are changed. When `dataflows` is provided, only the dataflow ids included in the request are modified; dataflows omitted from the map keep their current configuration. + properties: + authentication: + $ref: "#/components/schemas/ElasticCloudIntegrationAccountAuthentication" + dataflows: + $ref: "#/components/schemas/ElasticCloudIntegrationDataflows" + name: + description: Human-readable name of the account. + example: elastic-cloud-prod + type: string + settings: + $ref: "#/components/schemas/ElasticCloudIntegrationAccountSettingsUpdate" + type: object + ElasticCloudIntegrationAccountUpdateData: + description: Data envelope for updating an Elastic Cloud integration account. + properties: + attributes: + $ref: "#/components/schemas/ElasticCloudIntegrationAccountUpdateAttributes" + type: + $ref: "#/components/schemas/IntegrationAccountType" + required: + - type + - attributes + type: object + ElasticCloudIntegrationAccountUpdateRequest: + description: Request payload to update an Elastic Cloud integration account as a partial merge. + properties: + data: + $ref: "#/components/schemas/ElasticCloudIntegrationAccountUpdateData" + required: + - data + type: object + ElasticCloudIntegrationAccountsResponse: + description: Response payload for a list of Elastic Cloud integration accounts. + properties: + data: + description: List of Elastic Cloud integration accounts. + items: + $ref: "#/components/schemas/ElasticCloudIntegrationAccountData" + type: array + type: object + ElasticCloudIntegrationDataflows: + additionalProperties: false + description: Dataflows for the Elastic Cloud integration account, keyed by dataflow id. + properties: + elastic-cloud-detailed-index-stats: + $ref: "#/components/schemas/ElasticCloudDetailedIndexStatsIntegrationDataflow" + elastic-cloud-index-stats: + $ref: "#/components/schemas/ElasticCloudIndexStatsIntegrationDataflow" + elastic-cloud-metrics: + $ref: "#/components/schemas/ElasticCloudMetricsIntegrationDataflow" + elastic-cloud-pending-task-stats: + $ref: "#/components/schemas/ElasticCloudPendingTaskStatsIntegrationDataflow" + elastic-cloud-primary-shard-graceful-timeout: + $ref: "#/components/schemas/ElasticCloudPrimaryShardGracefulTimeoutIntegrationDataflow" + elastic-cloud-primary-shard-stats: + $ref: "#/components/schemas/ElasticCloudPrimaryShardStatsIntegrationDataflow" + elastic-cloud-shard-allocation-stats: + $ref: "#/components/schemas/ElasticCloudShardAllocationStatsIntegrationDataflow" + elastic-cloud-slm-stats: + $ref: "#/components/schemas/ElasticCloudSlmStatsIntegrationDataflow" + type: object + ElasticCloudMetricsIntegrationDataflow: + description: The Elastic Cloud metrics dataflow. + properties: + enabled: + description: Whether the dataflow is enabled. + example: true + type: boolean + status: + $ref: "#/components/schemas/IntegrationAccountDataflowStatus" + type: object + ElasticCloudPendingTaskStatsIntegrationDataflow: + description: The Elastic Cloud pending task stats dataflow. + properties: + enabled: + description: Whether the dataflow is enabled. + example: true + type: boolean + status: + $ref: "#/components/schemas/IntegrationAccountDataflowStatus" + type: object + ElasticCloudPrimaryShardGracefulTimeoutIntegrationDataflow: + description: The Elastic Cloud primary shard graceful timeout dataflow. + properties: + enabled: + description: Whether the dataflow is enabled. + example: true + type: boolean + status: + $ref: "#/components/schemas/IntegrationAccountDataflowStatus" + type: object + ElasticCloudPrimaryShardStatsIntegrationDataflow: + description: The Elastic Cloud primary shard stats dataflow. + properties: + enabled: + description: Whether the dataflow is enabled. + example: true + type: boolean + status: + $ref: "#/components/schemas/IntegrationAccountDataflowStatus" + type: object + ElasticCloudShardAllocationStatsIntegrationDataflow: + description: The Elastic Cloud shard allocation stats dataflow. + properties: + enabled: + description: Whether the dataflow is enabled. + example: true + type: boolean + status: + $ref: "#/components/schemas/IntegrationAccountDataflowStatus" + type: object + ElasticCloudSlmStatsIntegrationDataflow: + description: The Elastic Cloud snapshot lifecycle management stats dataflow. + properties: + enabled: + description: Whether the dataflow is enabled. + example: true + type: boolean + status: + $ref: "#/components/schemas/IntegrationAccountDataflowStatus" + type: object Enabled: description: Field used to enable or disable the rule. example: true @@ -52292,6 +52540,86 @@ components: - id - attributes type: object + IntegrationAccountBasicAuth: + description: Username and password authentication. + properties: + password: + description: Secret password or private key. This field is not returned by the API. + example: your-password + type: string + writeOnly: true + type: + $ref: "#/components/schemas/IntegrationAccountBasicAuthType" + username: + description: Non-secret username or public identifier for the credential pair. + example: datadog + type: string + required: + - type + - username + - password + type: object + IntegrationAccountBasicAuthType: + default: basic + description: The authentication method type. + enum: + - basic + example: basic + type: string + x-enum-varnames: + - BASIC + IntegrationAccountDataflowHealth: + description: Collection health of a single dataflow. + enum: + - DATAFLOW_HEALTH_OK + - DATAFLOW_HEALTH_BROKEN + - DATAFLOW_HEALTH_UNKNOWN + example: DATAFLOW_HEALTH_OK + type: string + x-enum-varnames: + - OK + - BROKEN + - UNKNOWN + IntegrationAccountDataflowStatus: + description: Read-only collection status of a dataflow. + properties: + health: + $ref: "#/components/schemas/IntegrationAccountDataflowHealth" + message: + description: Human-readable detail, populated when the dataflow is not healthy. + example: "" + type: string + updated_at: + description: Time the status was last computed. + example: "2026-06-25T08:30:50Z" + format: date-time + type: string + readOnly: true + type: object + IntegrationAccountPermissions: + description: Read-only permission information for the account, derived from its restriction policy. + properties: + resource_id: + description: Restriction-policy resource identifier of this account. + example: "integration-account:twilio:953a0060-81ec-4221-aed4-d4733b59cd96" + readOnly: true + type: string + user_can_edit: + description: Whether the requesting user may edit this account. + example: true + readOnly: true + type: boolean + readOnly: true + type: object + IntegrationAccountType: + default: integration-account + description: The type of the integration account resource. Always `integration-account`. + enum: + - integration-account + example: integration-account + type: string + x-enum-varnames: + - INTEGRATION_ACCOUNT IntegrationAttributes: description: Attributes for an integration. properties: @@ -114602,6 +114930,205 @@ components: type: string x-enum-varnames: - TRIGGER_WORKFLOW_AUTOMATION + TwilioAlertsLogsIntegrationDataflow: + description: The Twilio alert logs dataflow. + properties: + enabled: + description: Whether the dataflow is enabled. + example: true + type: boolean + status: + $ref: "#/components/schemas/IntegrationAccountDataflowStatus" + type: object + TwilioCallSummariesLogsIntegrationDataflow: + description: The Twilio call summaries logs dataflow. + properties: + enabled: + description: Whether the dataflow is enabled. + example: true + type: boolean + status: + $ref: "#/components/schemas/IntegrationAccountDataflowStatus" + type: object + TwilioCloudCostMetricsIntegrationDataflow: + description: The Twilio cloud cost metrics dataflow. + properties: + enabled: + description: Whether the dataflow is enabled. + example: true + type: boolean + status: + $ref: "#/components/schemas/IntegrationAccountDataflowStatus" + type: object + TwilioEventsLogsIntegrationDataflow: + description: The Twilio event logs dataflow. + properties: + enabled: + description: Whether the dataflow is enabled. + example: true + type: boolean + status: + $ref: "#/components/schemas/IntegrationAccountDataflowStatus" + type: object + TwilioIntegrationAccountAttributes: + description: Attributes of a Twilio integration account. + properties: + authentication: + $ref: "#/components/schemas/TwilioIntegrationAccountAuthentication" + dataflows: + $ref: "#/components/schemas/TwilioIntegrationDataflows" + name: + description: Human-readable name of the account. + example: twilio-prod + type: string + permissions: + $ref: "#/components/schemas/IntegrationAccountPermissions" + settings: + $ref: "#/components/schemas/TwilioIntegrationAccountSettings" + required: + - name + - authentication + type: object + TwilioIntegrationAccountAuthentication: + description: Authentication for the Twilio integration account. Exactly one method is set. + oneOf: + - $ref: "#/components/schemas/IntegrationAccountBasicAuth" + TwilioIntegrationAccountCreateData: + description: Data envelope for creating a Twilio integration account. + properties: + attributes: + $ref: "#/components/schemas/TwilioIntegrationAccountAttributes" + type: + $ref: "#/components/schemas/IntegrationAccountType" + required: + - type + - attributes + type: object + TwilioIntegrationAccountData: + description: Data envelope of a Twilio integration account, including server-assigned identity. + properties: + attributes: + $ref: "#/components/schemas/TwilioIntegrationAccountAttributes" + id: + description: Server-generated unique identifier of the integration account. + example: 953a0060-81ec-4221-aed4-d4733b59cd96 + readOnly: true + type: string + type: + $ref: "#/components/schemas/IntegrationAccountType" + required: + - id + - type + - attributes + type: object + TwilioIntegrationAccountRequest: + description: Request payload to create a Twilio integration account. + properties: + data: + $ref: "#/components/schemas/TwilioIntegrationAccountCreateData" + required: + - data + type: object + TwilioIntegrationAccountResponse: + description: Response payload for a single Twilio integration account. + properties: + data: + $ref: "#/components/schemas/TwilioIntegrationAccountData" + type: object + TwilioIntegrationAccountSettings: + description: Settings for the Twilio integration account. + properties: + account_sid: + description: Twilio Account SID that uniquely identifies your Twilio account. + example: ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + type: string + censor_logs: + description: When enabled, phone numbers in the `to` field and SMS message bodies are censored for privacy. + example: true + type: boolean + required: + - account_sid + type: object + TwilioIntegrationAccountSettingsUpdate: + description: Settings to update on the Twilio integration account. Only the fields provided are changed. + properties: + account_sid: + description: Twilio Account SID that uniquely identifies your Twilio account. + example: ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + type: string + censor_logs: + description: When enabled, phone numbers in the `to` field and SMS message bodies are censored for privacy. + example: true + type: boolean + type: object + TwilioIntegrationAccountUpdateAttributes: + description: >- + Updatable attributes of a Twilio integration account. Every field is optional; only the fields provided are changed. When `dataflows` is provided, only the dataflow ids included in the request are modified; dataflows omitted from the map keep their current configuration. + properties: + authentication: + $ref: "#/components/schemas/TwilioIntegrationAccountAuthentication" + dataflows: + $ref: "#/components/schemas/TwilioIntegrationDataflows" + name: + description: Human-readable name of the account. + example: twilio-prod + type: string + settings: + $ref: "#/components/schemas/TwilioIntegrationAccountSettingsUpdate" + type: object + TwilioIntegrationAccountUpdateData: + description: Data envelope for updating a Twilio integration account. + properties: + attributes: + $ref: "#/components/schemas/TwilioIntegrationAccountUpdateAttributes" + type: + $ref: "#/components/schemas/IntegrationAccountType" + required: + - type + - attributes + type: object + TwilioIntegrationAccountUpdateRequest: + description: Request payload to update a Twilio integration account as a partial merge. + properties: + data: + $ref: "#/components/schemas/TwilioIntegrationAccountUpdateData" + required: + - data + type: object + TwilioIntegrationAccountsResponse: + description: Response payload for a list of Twilio integration accounts. + properties: + data: + description: List of Twilio integration accounts. + items: + $ref: "#/components/schemas/TwilioIntegrationAccountData" + type: array + type: object + TwilioIntegrationDataflows: + additionalProperties: false + description: Dataflows for the Twilio integration account, keyed by dataflow id. + properties: + twilio-alerts-logs: + $ref: "#/components/schemas/TwilioAlertsLogsIntegrationDataflow" + twilio-call-summaries-logs: + $ref: "#/components/schemas/TwilioCallSummariesLogsIntegrationDataflow" + twilio-cloud-cost-metrics: + $ref: "#/components/schemas/TwilioCloudCostMetricsIntegrationDataflow" + twilio-events-logs: + $ref: "#/components/schemas/TwilioEventsLogsIntegrationDataflow" + twilio-messages-logs: + $ref: "#/components/schemas/TwilioMessagesLogsIntegrationDataflow" + type: object + TwilioMessagesLogsIntegrationDataflow: + description: The Twilio messages logs dataflow. + properties: + enabled: + description: Whether the dataflow is enabled. + example: true + type: boolean + status: + $ref: "#/components/schemas/IntegrationAccountDataflowStatus" + type: object UCConfigPair: description: The definition of `UCConfigPair` object. example: @@ -152756,6 +153283,478 @@ paths: 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/integration-interfaces/elastic-cloud/accounts: + get: + description: List the Elastic Cloud integration accounts. + operationId: ListElasticCloudIntegrationAccounts + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + authentication: + type: basic + username: datadog + dataflows: + elastic-cloud-metrics: + enabled: true + status: + health: DATAFLOW_HEALTH_OK + updated_at: "2026-06-25T08:30:50Z" + elastic-cloud-primary-shard-stats: + enabled: false + name: elastic-cloud-prod + permissions: + resource_id: "integration-account:elastic-cloud:953a0060-81ec-4221-aed4-d4733b59cd96" + user_can_edit: true + settings: + tags: + - env:prod + url: "https://example.es.us-central1.gcp.cloud.es.io:9243" + id: 953a0060-81ec-4221-aed4-d4733b59cd96 + type: integration-account + schema: + $ref: "#/components/schemas/ElasticCloudIntegrationAccountsResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: List Elastic Cloud integration accounts + tags: + - Elastic Cloud + x-unstable: |- + **Note**: This endpoint is in public beta. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + post: + description: Create an Elastic Cloud integration account. + operationId: CreateElasticCloudIntegrationAccount + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ElasticCloudIntegrationAccountRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + authentication: + type: basic + username: datadog + dataflows: + elastic-cloud-metrics: + enabled: true + status: + health: DATAFLOW_HEALTH_OK + updated_at: "2026-06-25T08:30:50Z" + elastic-cloud-primary-shard-stats: + enabled: false + name: elastic-cloud-prod + permissions: + resource_id: "integration-account:elastic-cloud:953a0060-81ec-4221-aed4-d4733b59cd96" + user_can_edit: true + settings: + tags: + - env:prod + url: "https://example.es.us-central1.gcp.cloud.es.io:9243" + id: 953a0060-81ec-4221-aed4-d4733b59cd96 + type: integration-account + schema: + $ref: "#/components/schemas/ElasticCloudIntegrationAccountResponse" + description: Created + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Create an Elastic Cloud integration account + tags: + - Elastic Cloud + x-codegen-request-body-name: body + x-unstable: |- + **Note**: This endpoint is in public beta. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/integration-interfaces/elastic-cloud/accounts/{account_id}: + delete: + description: Delete an Elastic Cloud integration account. + operationId: DeleteElasticCloudIntegrationAccount + parameters: + - $ref: "#/components/parameters/IntegrationAccountIdParameter" + responses: + "204": + description: No Content + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Delete an Elastic Cloud integration account + tags: + - Elastic Cloud + x-unstable: |- + **Note**: This endpoint is in public beta. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + get: + description: Get a single Elastic Cloud integration account. + operationId: GetElasticCloudIntegrationAccount + parameters: + - $ref: "#/components/parameters/IntegrationAccountIdParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + authentication: + type: basic + username: datadog + dataflows: + elastic-cloud-metrics: + enabled: true + status: + health: DATAFLOW_HEALTH_OK + updated_at: "2026-06-25T08:30:50Z" + elastic-cloud-primary-shard-stats: + enabled: false + name: elastic-cloud-prod + permissions: + resource_id: "integration-account:elastic-cloud:953a0060-81ec-4221-aed4-d4733b59cd96" + user_can_edit: true + settings: + tags: + - env:prod + url: "https://example.es.us-central1.gcp.cloud.es.io:9243" + id: 953a0060-81ec-4221-aed4-d4733b59cd96 + type: integration-account + schema: + $ref: "#/components/schemas/ElasticCloudIntegrationAccountResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get an Elastic Cloud integration account + tags: + - Elastic Cloud + x-unstable: |- + **Note**: This endpoint is in public beta. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + patch: + description: Update an Elastic Cloud integration account. Only the fields provided are changed. + operationId: UpdateElasticCloudIntegrationAccount + parameters: + - $ref: "#/components/parameters/IntegrationAccountIdParameter" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ElasticCloudIntegrationAccountUpdateRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + authentication: + type: basic + username: datadog + dataflows: + elastic-cloud-metrics: + enabled: true + status: + health: DATAFLOW_HEALTH_OK + updated_at: "2026-06-25T08:30:50Z" + elastic-cloud-primary-shard-stats: + enabled: false + name: elastic-cloud-prod + permissions: + resource_id: "integration-account:elastic-cloud:953a0060-81ec-4221-aed4-d4733b59cd96" + user_can_edit: true + settings: + tags: + - env:prod + url: "https://example.es.us-central1.gcp.cloud.es.io:9243" + id: 953a0060-81ec-4221-aed4-d4733b59cd96 + type: integration-account + schema: + $ref: "#/components/schemas/ElasticCloudIntegrationAccountResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Update an Elastic Cloud integration account + tags: + - Elastic Cloud + x-codegen-request-body-name: body + x-unstable: |- + **Note**: This endpoint is in public beta. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/integration-interfaces/twilio/accounts: + get: + description: List the Twilio integration accounts. + operationId: ListTwilioIntegrationAccounts + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + authentication: + type: basic + username: SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + dataflows: + twilio-messages-logs: + enabled: true + status: + health: DATAFLOW_HEALTH_OK + updated_at: "2026-06-25T08:30:50Z" + name: twilio-prod + permissions: + resource_id: "integration-account:twilio:953a0060-81ec-4221-aed4-d4733b59cd96" + user_can_edit: true + settings: + account_sid: ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + censor_logs: true + id: 953a0060-81ec-4221-aed4-d4733b59cd96 + type: integration-account + schema: + $ref: "#/components/schemas/TwilioIntegrationAccountsResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: List Twilio integration accounts + tags: + - Twilio Integration Accounts + x-unstable: |- + **Note**: This endpoint is in public beta. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + post: + description: Create a Twilio integration account. + operationId: CreateTwilioIntegrationAccount + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/TwilioIntegrationAccountRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + authentication: + type: basic + username: SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + dataflows: + twilio-messages-logs: + enabled: true + status: + health: DATAFLOW_HEALTH_OK + updated_at: "2026-06-25T08:30:50Z" + name: twilio-prod + permissions: + resource_id: "integration-account:twilio:953a0060-81ec-4221-aed4-d4733b59cd96" + user_can_edit: true + settings: + account_sid: ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + censor_logs: true + id: 953a0060-81ec-4221-aed4-d4733b59cd96 + type: integration-account + schema: + $ref: "#/components/schemas/TwilioIntegrationAccountResponse" + description: Created + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Create a Twilio integration account + tags: + - Twilio Integration Accounts + x-codegen-request-body-name: body + x-unstable: |- + **Note**: This endpoint is in public beta. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/integration-interfaces/twilio/accounts/{account_id}: + delete: + description: Delete a Twilio integration account. + operationId: DeleteTwilioIntegrationAccount + parameters: + - $ref: "#/components/parameters/IntegrationAccountIdParameter" + responses: + "204": + description: No Content + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Delete a Twilio integration account + tags: + - Twilio Integration Accounts + x-unstable: |- + **Note**: This endpoint is in public beta. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + get: + description: Get a single Twilio integration account. + operationId: GetTwilioIntegrationAccount + parameters: + - $ref: "#/components/parameters/IntegrationAccountIdParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + authentication: + type: basic + username: SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + dataflows: + twilio-messages-logs: + enabled: true + status: + health: DATAFLOW_HEALTH_OK + updated_at: "2026-06-25T08:30:50Z" + name: twilio-prod + permissions: + resource_id: "integration-account:twilio:953a0060-81ec-4221-aed4-d4733b59cd96" + user_can_edit: true + settings: + account_sid: ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + censor_logs: true + id: 953a0060-81ec-4221-aed4-d4733b59cd96 + type: integration-account + schema: + $ref: "#/components/schemas/TwilioIntegrationAccountResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get a Twilio integration account + tags: + - Twilio Integration Accounts + x-unstable: |- + **Note**: This endpoint is in public beta. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + patch: + description: Update a Twilio integration account. Only the fields provided are changed. + operationId: UpdateTwilioIntegrationAccount + parameters: + - $ref: "#/components/parameters/IntegrationAccountIdParameter" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/TwilioIntegrationAccountUpdateRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + authentication: + type: basic + username: SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + dataflows: + twilio-messages-logs: + enabled: true + status: + health: DATAFLOW_HEALTH_OK + updated_at: "2026-06-25T08:30:50Z" + name: twilio-prod + permissions: + resource_id: "integration-account:twilio:953a0060-81ec-4221-aed4-d4733b59cd96" + user_can_edit: true + settings: + account_sid: ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + censor_logs: true + id: 953a0060-81ec-4221-aed4-d4733b59cd96 + type: integration-account + schema: + $ref: "#/components/schemas/TwilioIntegrationAccountResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Update a Twilio integration account + tags: + - Twilio Integration Accounts + x-codegen-request-body-name: body + x-unstable: |- + **Note**: This endpoint is in public beta. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/integration/aws/accounts: get: description: Get a list of AWS Account Integration Configs. @@ -189930,7 +190929,7 @@ paths: data: attributes: enabled: true - name: Rule + name: Rule 1 selectors: query: (source:production_service OR env:prod) rule_types: @@ -190111,7 +191110,7 @@ paths: data: attributes: enabled: true - name: Rule + name: Rule 1 selectors: query: (source:production_service OR env:prod) rule_types: @@ -190753,7 +191752,7 @@ paths: data: attributes: enabled: true - name: Rule + name: Rule 1 selectors: query: (source:production_service OR env:prod) rule_types: @@ -190936,7 +191935,7 @@ paths: data: attributes: enabled: true - name: Rule + name: Rule 1 selectors: query: (source:production_service OR env:prod) rule_types: @@ -213600,6 +214599,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: Manage Elastic Cloud integration accounts. + name: Elastic Cloud - description: Manage per-integration configurations for the Internal Developer Portal (IDP). These configurations control which external resources (for example, GitHub repositories, Jira projects, or PagerDuty services) are synced as entities into the Software Catalog. name: Entity Integration Configs - description: Retrieves security risk scores for entities in your organization. @@ -214027,6 +215028,17 @@ tags: - description: |- Search and manage flaky tests through Test Optimization. See the [Test Optimization page](https://docs.datadoghq.com/tests/) for more information. name: Test Optimization + - description: |- + Manage your Datadog Twilio integration accounts directly through the Datadog API. + Create, update, and delete accounts, configure authentication and settings, and + enable or disable dataflows such as message logs, event logs, alerts, call + summaries, and Cloud Cost Management metrics. See the + [Twilio integration page](https://docs.datadoghq.com/integrations/twilio/) for + more information. + externalDocs: + description: Twilio integration. + url: https://docs.datadoghq.com/integrations/twilio/ + name: Twilio Integration Accounts - description: |- The usage metering API allows you to get hourly, daily, and monthly usage across multiple facets of Datadog. diff --git a/examples/v2/elastic-cloud/CreateElasticCloudIntegrationAccount.java b/examples/v2/elastic-cloud/CreateElasticCloudIntegrationAccount.java new file mode 100644 index 00000000000..b727dfcc5d0 --- /dev/null +++ b/examples/v2/elastic-cloud/CreateElasticCloudIntegrationAccount.java @@ -0,0 +1,89 @@ +// Create an Elastic Cloud integration account returns "Created" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.ElasticCloudApi; +import com.datadog.api.client.v2.model.ElasticCloudDetailedIndexStatsIntegrationDataflow; +import com.datadog.api.client.v2.model.ElasticCloudIndexStatsIntegrationDataflow; +import com.datadog.api.client.v2.model.ElasticCloudIntegrationAccountAttributes; +import com.datadog.api.client.v2.model.ElasticCloudIntegrationAccountAuthentication; +import com.datadog.api.client.v2.model.ElasticCloudIntegrationAccountCreateData; +import com.datadog.api.client.v2.model.ElasticCloudIntegrationAccountRequest; +import com.datadog.api.client.v2.model.ElasticCloudIntegrationAccountResponse; +import com.datadog.api.client.v2.model.ElasticCloudIntegrationAccountSettings; +import com.datadog.api.client.v2.model.ElasticCloudIntegrationDataflows; +import com.datadog.api.client.v2.model.ElasticCloudMetricsIntegrationDataflow; +import com.datadog.api.client.v2.model.ElasticCloudPendingTaskStatsIntegrationDataflow; +import com.datadog.api.client.v2.model.ElasticCloudPrimaryShardGracefulTimeoutIntegrationDataflow; +import com.datadog.api.client.v2.model.ElasticCloudPrimaryShardStatsIntegrationDataflow; +import com.datadog.api.client.v2.model.ElasticCloudShardAllocationStatsIntegrationDataflow; +import com.datadog.api.client.v2.model.ElasticCloudSlmStatsIntegrationDataflow; +import com.datadog.api.client.v2.model.IntegrationAccountBasicAuth; +import com.datadog.api.client.v2.model.IntegrationAccountBasicAuthType; +import com.datadog.api.client.v2.model.IntegrationAccountType; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.createElasticCloudIntegrationAccount", true); + ElasticCloudApi apiInstance = new ElasticCloudApi(defaultClient); + + ElasticCloudIntegrationAccountRequest body = + new ElasticCloudIntegrationAccountRequest() + .data( + new ElasticCloudIntegrationAccountCreateData() + .attributes( + new ElasticCloudIntegrationAccountAttributes() + .authentication( + new ElasticCloudIntegrationAccountAuthentication( + new IntegrationAccountBasicAuth() + .password("your-password") + .type(IntegrationAccountBasicAuthType.BASIC) + .username("datadog"))) + .dataflows( + new ElasticCloudIntegrationDataflows() + .elasticCloudDetailedIndexStats( + new ElasticCloudDetailedIndexStatsIntegrationDataflow() + .enabled(true)) + .elasticCloudIndexStats( + new ElasticCloudIndexStatsIntegrationDataflow() + .enabled(true)) + .elasticCloudMetrics( + new ElasticCloudMetricsIntegrationDataflow().enabled(true)) + .elasticCloudPendingTaskStats( + new ElasticCloudPendingTaskStatsIntegrationDataflow() + .enabled(true)) + .elasticCloudPrimaryShardGracefulTimeout( + new ElasticCloudPrimaryShardGracefulTimeoutIntegrationDataflow() + .enabled(true)) + .elasticCloudPrimaryShardStats( + new ElasticCloudPrimaryShardStatsIntegrationDataflow() + .enabled(true)) + .elasticCloudShardAllocationStats( + new ElasticCloudShardAllocationStatsIntegrationDataflow() + .enabled(true)) + .elasticCloudSlmStats( + new ElasticCloudSlmStatsIntegrationDataflow() + .enabled(true))) + .name("elastic-cloud-prod") + .settings( + new ElasticCloudIntegrationAccountSettings() + .tags(Collections.singletonList("env:prod")) + .url("https://example.es.us-central1.gcp.cloud.es.io:9243"))) + .type(IntegrationAccountType.INTEGRATION_ACCOUNT)); + + try { + ElasticCloudIntegrationAccountResponse result = + apiInstance.createElasticCloudIntegrationAccount(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling ElasticCloudApi#createElasticCloudIntegrationAccount"); + 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/examples/v2/elastic-cloud/DeleteElasticCloudIntegrationAccount.java b/examples/v2/elastic-cloud/DeleteElasticCloudIntegrationAccount.java new file mode 100644 index 00000000000..7e136c8de9b --- /dev/null +++ b/examples/v2/elastic-cloud/DeleteElasticCloudIntegrationAccount.java @@ -0,0 +1,24 @@ +// Delete an Elastic Cloud integration account returns "No Content" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.ElasticCloudApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.deleteElasticCloudIntegrationAccount", true); + ElasticCloudApi apiInstance = new ElasticCloudApi(defaultClient); + + try { + apiInstance.deleteElasticCloudIntegrationAccount("account_id"); + } catch (ApiException e) { + System.err.println( + "Exception when calling ElasticCloudApi#deleteElasticCloudIntegrationAccount"); + 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/examples/v2/elastic-cloud/GetElasticCloudIntegrationAccount.java b/examples/v2/elastic-cloud/GetElasticCloudIntegrationAccount.java new file mode 100644 index 00000000000..f2622d0c621 --- /dev/null +++ b/examples/v2/elastic-cloud/GetElasticCloudIntegrationAccount.java @@ -0,0 +1,27 @@ +// Get an Elastic Cloud integration account returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.ElasticCloudApi; +import com.datadog.api.client.v2.model.ElasticCloudIntegrationAccountResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.getElasticCloudIntegrationAccount", true); + ElasticCloudApi apiInstance = new ElasticCloudApi(defaultClient); + + try { + ElasticCloudIntegrationAccountResponse result = + apiInstance.getElasticCloudIntegrationAccount("account_id"); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling ElasticCloudApi#getElasticCloudIntegrationAccount"); + 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/examples/v2/elastic-cloud/ListElasticCloudIntegrationAccounts.java b/examples/v2/elastic-cloud/ListElasticCloudIntegrationAccounts.java new file mode 100644 index 00000000000..dfe94a3ea36 --- /dev/null +++ b/examples/v2/elastic-cloud/ListElasticCloudIntegrationAccounts.java @@ -0,0 +1,27 @@ +// List Elastic Cloud integration accounts returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.ElasticCloudApi; +import com.datadog.api.client.v2.model.ElasticCloudIntegrationAccountsResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listElasticCloudIntegrationAccounts", true); + ElasticCloudApi apiInstance = new ElasticCloudApi(defaultClient); + + try { + ElasticCloudIntegrationAccountsResponse result = + apiInstance.listElasticCloudIntegrationAccounts(); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling ElasticCloudApi#listElasticCloudIntegrationAccounts"); + 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/examples/v2/elastic-cloud/UpdateElasticCloudIntegrationAccount.java b/examples/v2/elastic-cloud/UpdateElasticCloudIntegrationAccount.java new file mode 100644 index 00000000000..18612629be7 --- /dev/null +++ b/examples/v2/elastic-cloud/UpdateElasticCloudIntegrationAccount.java @@ -0,0 +1,89 @@ +// Update an Elastic Cloud integration account returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.ElasticCloudApi; +import com.datadog.api.client.v2.model.ElasticCloudDetailedIndexStatsIntegrationDataflow; +import com.datadog.api.client.v2.model.ElasticCloudIndexStatsIntegrationDataflow; +import com.datadog.api.client.v2.model.ElasticCloudIntegrationAccountAuthentication; +import com.datadog.api.client.v2.model.ElasticCloudIntegrationAccountResponse; +import com.datadog.api.client.v2.model.ElasticCloudIntegrationAccountSettingsUpdate; +import com.datadog.api.client.v2.model.ElasticCloudIntegrationAccountUpdateAttributes; +import com.datadog.api.client.v2.model.ElasticCloudIntegrationAccountUpdateData; +import com.datadog.api.client.v2.model.ElasticCloudIntegrationAccountUpdateRequest; +import com.datadog.api.client.v2.model.ElasticCloudIntegrationDataflows; +import com.datadog.api.client.v2.model.ElasticCloudMetricsIntegrationDataflow; +import com.datadog.api.client.v2.model.ElasticCloudPendingTaskStatsIntegrationDataflow; +import com.datadog.api.client.v2.model.ElasticCloudPrimaryShardGracefulTimeoutIntegrationDataflow; +import com.datadog.api.client.v2.model.ElasticCloudPrimaryShardStatsIntegrationDataflow; +import com.datadog.api.client.v2.model.ElasticCloudShardAllocationStatsIntegrationDataflow; +import com.datadog.api.client.v2.model.ElasticCloudSlmStatsIntegrationDataflow; +import com.datadog.api.client.v2.model.IntegrationAccountBasicAuth; +import com.datadog.api.client.v2.model.IntegrationAccountBasicAuthType; +import com.datadog.api.client.v2.model.IntegrationAccountType; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.updateElasticCloudIntegrationAccount", true); + ElasticCloudApi apiInstance = new ElasticCloudApi(defaultClient); + + ElasticCloudIntegrationAccountUpdateRequest body = + new ElasticCloudIntegrationAccountUpdateRequest() + .data( + new ElasticCloudIntegrationAccountUpdateData() + .attributes( + new ElasticCloudIntegrationAccountUpdateAttributes() + .authentication( + new ElasticCloudIntegrationAccountAuthentication( + new IntegrationAccountBasicAuth() + .password("your-password") + .type(IntegrationAccountBasicAuthType.BASIC) + .username("datadog"))) + .dataflows( + new ElasticCloudIntegrationDataflows() + .elasticCloudDetailedIndexStats( + new ElasticCloudDetailedIndexStatsIntegrationDataflow() + .enabled(true)) + .elasticCloudIndexStats( + new ElasticCloudIndexStatsIntegrationDataflow() + .enabled(true)) + .elasticCloudMetrics( + new ElasticCloudMetricsIntegrationDataflow().enabled(true)) + .elasticCloudPendingTaskStats( + new ElasticCloudPendingTaskStatsIntegrationDataflow() + .enabled(true)) + .elasticCloudPrimaryShardGracefulTimeout( + new ElasticCloudPrimaryShardGracefulTimeoutIntegrationDataflow() + .enabled(true)) + .elasticCloudPrimaryShardStats( + new ElasticCloudPrimaryShardStatsIntegrationDataflow() + .enabled(true)) + .elasticCloudShardAllocationStats( + new ElasticCloudShardAllocationStatsIntegrationDataflow() + .enabled(true)) + .elasticCloudSlmStats( + new ElasticCloudSlmStatsIntegrationDataflow() + .enabled(true))) + .name("elastic-cloud-prod") + .settings( + new ElasticCloudIntegrationAccountSettingsUpdate() + .tags(Collections.singletonList("env:prod")) + .url("https://example.es.us-central1.gcp.cloud.es.io:9243"))) + .type(IntegrationAccountType.INTEGRATION_ACCOUNT)); + + try { + ElasticCloudIntegrationAccountResponse result = + apiInstance.updateElasticCloudIntegrationAccount("account_id", body); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling ElasticCloudApi#updateElasticCloudIntegrationAccount"); + 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/examples/v2/security-monitoring/CreateSignalNotificationRule.java b/examples/v2/security-monitoring/CreateSignalNotificationRule.java index 312fee1ba9e..0815980a569 100644 --- a/examples/v2/security-monitoring/CreateSignalNotificationRule.java +++ b/examples/v2/security-monitoring/CreateSignalNotificationRule.java @@ -28,7 +28,7 @@ public static void main(String[] args) { .attributes( new CreateNotificationRuleParametersDataAttributes() .enabled(true) - .name("Rule 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d") + .name("Rule 1") .selectors( new Selectors() .query("(source:production_service OR env:prod)") diff --git a/examples/v2/security-monitoring/CreateVulnerabilityNotificationRule.java b/examples/v2/security-monitoring/CreateVulnerabilityNotificationRule.java index f7fae2b8308..ddde6b49461 100644 --- a/examples/v2/security-monitoring/CreateVulnerabilityNotificationRule.java +++ b/examples/v2/security-monitoring/CreateVulnerabilityNotificationRule.java @@ -28,7 +28,7 @@ public static void main(String[] args) { .attributes( new CreateNotificationRuleParametersDataAttributes() .enabled(true) - .name("Rule 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d") + .name("Rule 1") .selectors( new Selectors() .query("(source:production_service OR env:prod)") diff --git a/examples/v2/security-monitoring/PatchSignalNotificationRule.java b/examples/v2/security-monitoring/PatchSignalNotificationRule.java index 97fefb91b90..740397707ce 100644 --- a/examples/v2/security-monitoring/PatchSignalNotificationRule.java +++ b/examples/v2/security-monitoring/PatchSignalNotificationRule.java @@ -31,7 +31,7 @@ public static void main(String[] args) { .attributes( new PatchNotificationRuleParametersDataAttributes() .enabled(true) - .name("Rule 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d") + .name("Rule 1") .selectors( new Selectors() .query("(source:production_service OR env:prod)") diff --git a/examples/v2/security-monitoring/PatchVulnerabilityNotificationRule.java b/examples/v2/security-monitoring/PatchVulnerabilityNotificationRule.java index 9accae45487..ed7773fb3f8 100644 --- a/examples/v2/security-monitoring/PatchVulnerabilityNotificationRule.java +++ b/examples/v2/security-monitoring/PatchVulnerabilityNotificationRule.java @@ -32,7 +32,7 @@ public static void main(String[] args) { .attributes( new PatchNotificationRuleParametersDataAttributes() .enabled(true) - .name("Rule 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d") + .name("Rule 1") .selectors( new Selectors() .query("(source:production_service OR env:prod)") diff --git a/examples/v2/twilio-integration-accounts/CreateTwilioIntegrationAccount.java b/examples/v2/twilio-integration-accounts/CreateTwilioIntegrationAccount.java new file mode 100644 index 00000000000..6f8e457e23d --- /dev/null +++ b/examples/v2/twilio-integration-accounts/CreateTwilioIntegrationAccount.java @@ -0,0 +1,73 @@ +// Create a Twilio integration account returns "Created" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.TwilioIntegrationAccountsApi; +import com.datadog.api.client.v2.model.IntegrationAccountBasicAuth; +import com.datadog.api.client.v2.model.IntegrationAccountBasicAuthType; +import com.datadog.api.client.v2.model.IntegrationAccountType; +import com.datadog.api.client.v2.model.TwilioAlertsLogsIntegrationDataflow; +import com.datadog.api.client.v2.model.TwilioCallSummariesLogsIntegrationDataflow; +import com.datadog.api.client.v2.model.TwilioCloudCostMetricsIntegrationDataflow; +import com.datadog.api.client.v2.model.TwilioEventsLogsIntegrationDataflow; +import com.datadog.api.client.v2.model.TwilioIntegrationAccountAttributes; +import com.datadog.api.client.v2.model.TwilioIntegrationAccountAuthentication; +import com.datadog.api.client.v2.model.TwilioIntegrationAccountCreateData; +import com.datadog.api.client.v2.model.TwilioIntegrationAccountRequest; +import com.datadog.api.client.v2.model.TwilioIntegrationAccountResponse; +import com.datadog.api.client.v2.model.TwilioIntegrationAccountSettings; +import com.datadog.api.client.v2.model.TwilioIntegrationDataflows; +import com.datadog.api.client.v2.model.TwilioMessagesLogsIntegrationDataflow; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.createTwilioIntegrationAccount", true); + TwilioIntegrationAccountsApi apiInstance = new TwilioIntegrationAccountsApi(defaultClient); + + TwilioIntegrationAccountRequest body = + new TwilioIntegrationAccountRequest() + .data( + new TwilioIntegrationAccountCreateData() + .attributes( + new TwilioIntegrationAccountAttributes() + .authentication( + new TwilioIntegrationAccountAuthentication( + new IntegrationAccountBasicAuth() + .password("your-password") + .type(IntegrationAccountBasicAuthType.BASIC) + .username("datadog"))) + .dataflows( + new TwilioIntegrationDataflows() + .twilioAlertsLogs( + new TwilioAlertsLogsIntegrationDataflow().enabled(true)) + .twilioCallSummariesLogs( + new TwilioCallSummariesLogsIntegrationDataflow() + .enabled(true)) + .twilioCloudCostMetrics( + new TwilioCloudCostMetricsIntegrationDataflow() + .enabled(true)) + .twilioEventsLogs( + new TwilioEventsLogsIntegrationDataflow().enabled(true)) + .twilioMessagesLogs( + new TwilioMessagesLogsIntegrationDataflow().enabled(true))) + .name("twilio-prod") + .settings( + new TwilioIntegrationAccountSettings() + .accountSid("ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx") + .censorLogs(true))) + .type(IntegrationAccountType.INTEGRATION_ACCOUNT)); + + try { + TwilioIntegrationAccountResponse result = apiInstance.createTwilioIntegrationAccount(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling TwilioIntegrationAccountsApi#createTwilioIntegrationAccount"); + 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/examples/v2/twilio-integration-accounts/DeleteTwilioIntegrationAccount.java b/examples/v2/twilio-integration-accounts/DeleteTwilioIntegrationAccount.java new file mode 100644 index 00000000000..4b62ae132f2 --- /dev/null +++ b/examples/v2/twilio-integration-accounts/DeleteTwilioIntegrationAccount.java @@ -0,0 +1,24 @@ +// Delete a Twilio integration account returns "No Content" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.TwilioIntegrationAccountsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.deleteTwilioIntegrationAccount", true); + TwilioIntegrationAccountsApi apiInstance = new TwilioIntegrationAccountsApi(defaultClient); + + try { + apiInstance.deleteTwilioIntegrationAccount("account_id"); + } catch (ApiException e) { + System.err.println( + "Exception when calling TwilioIntegrationAccountsApi#deleteTwilioIntegrationAccount"); + 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/examples/v2/twilio-integration-accounts/GetTwilioIntegrationAccount.java b/examples/v2/twilio-integration-accounts/GetTwilioIntegrationAccount.java new file mode 100644 index 00000000000..947f67c72f2 --- /dev/null +++ b/examples/v2/twilio-integration-accounts/GetTwilioIntegrationAccount.java @@ -0,0 +1,27 @@ +// Get a Twilio integration account returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.TwilioIntegrationAccountsApi; +import com.datadog.api.client.v2.model.TwilioIntegrationAccountResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.getTwilioIntegrationAccount", true); + TwilioIntegrationAccountsApi apiInstance = new TwilioIntegrationAccountsApi(defaultClient); + + try { + TwilioIntegrationAccountResponse result = + apiInstance.getTwilioIntegrationAccount("account_id"); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling TwilioIntegrationAccountsApi#getTwilioIntegrationAccount"); + 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/examples/v2/twilio-integration-accounts/ListTwilioIntegrationAccounts.java b/examples/v2/twilio-integration-accounts/ListTwilioIntegrationAccounts.java new file mode 100644 index 00000000000..62cb2c79bad --- /dev/null +++ b/examples/v2/twilio-integration-accounts/ListTwilioIntegrationAccounts.java @@ -0,0 +1,26 @@ +// List Twilio integration accounts returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.TwilioIntegrationAccountsApi; +import com.datadog.api.client.v2.model.TwilioIntegrationAccountsResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listTwilioIntegrationAccounts", true); + TwilioIntegrationAccountsApi apiInstance = new TwilioIntegrationAccountsApi(defaultClient); + + try { + TwilioIntegrationAccountsResponse result = apiInstance.listTwilioIntegrationAccounts(); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling TwilioIntegrationAccountsApi#listTwilioIntegrationAccounts"); + 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/examples/v2/twilio-integration-accounts/UpdateTwilioIntegrationAccount.java b/examples/v2/twilio-integration-accounts/UpdateTwilioIntegrationAccount.java new file mode 100644 index 00000000000..c7326045eca --- /dev/null +++ b/examples/v2/twilio-integration-accounts/UpdateTwilioIntegrationAccount.java @@ -0,0 +1,74 @@ +// Update a Twilio integration account returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.TwilioIntegrationAccountsApi; +import com.datadog.api.client.v2.model.IntegrationAccountBasicAuth; +import com.datadog.api.client.v2.model.IntegrationAccountBasicAuthType; +import com.datadog.api.client.v2.model.IntegrationAccountType; +import com.datadog.api.client.v2.model.TwilioAlertsLogsIntegrationDataflow; +import com.datadog.api.client.v2.model.TwilioCallSummariesLogsIntegrationDataflow; +import com.datadog.api.client.v2.model.TwilioCloudCostMetricsIntegrationDataflow; +import com.datadog.api.client.v2.model.TwilioEventsLogsIntegrationDataflow; +import com.datadog.api.client.v2.model.TwilioIntegrationAccountAuthentication; +import com.datadog.api.client.v2.model.TwilioIntegrationAccountResponse; +import com.datadog.api.client.v2.model.TwilioIntegrationAccountSettingsUpdate; +import com.datadog.api.client.v2.model.TwilioIntegrationAccountUpdateAttributes; +import com.datadog.api.client.v2.model.TwilioIntegrationAccountUpdateData; +import com.datadog.api.client.v2.model.TwilioIntegrationAccountUpdateRequest; +import com.datadog.api.client.v2.model.TwilioIntegrationDataflows; +import com.datadog.api.client.v2.model.TwilioMessagesLogsIntegrationDataflow; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.updateTwilioIntegrationAccount", true); + TwilioIntegrationAccountsApi apiInstance = new TwilioIntegrationAccountsApi(defaultClient); + + TwilioIntegrationAccountUpdateRequest body = + new TwilioIntegrationAccountUpdateRequest() + .data( + new TwilioIntegrationAccountUpdateData() + .attributes( + new TwilioIntegrationAccountUpdateAttributes() + .authentication( + new TwilioIntegrationAccountAuthentication( + new IntegrationAccountBasicAuth() + .password("your-password") + .type(IntegrationAccountBasicAuthType.BASIC) + .username("datadog"))) + .dataflows( + new TwilioIntegrationDataflows() + .twilioAlertsLogs( + new TwilioAlertsLogsIntegrationDataflow().enabled(true)) + .twilioCallSummariesLogs( + new TwilioCallSummariesLogsIntegrationDataflow() + .enabled(true)) + .twilioCloudCostMetrics( + new TwilioCloudCostMetricsIntegrationDataflow() + .enabled(true)) + .twilioEventsLogs( + new TwilioEventsLogsIntegrationDataflow().enabled(true)) + .twilioMessagesLogs( + new TwilioMessagesLogsIntegrationDataflow().enabled(true))) + .name("twilio-prod") + .settings( + new TwilioIntegrationAccountSettingsUpdate() + .accountSid("ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx") + .censorLogs(true))) + .type(IntegrationAccountType.INTEGRATION_ACCOUNT)); + + try { + TwilioIntegrationAccountResponse result = + apiInstance.updateTwilioIntegrationAccount("account_id", body); + System.out.println(result); + } catch (ApiException e) { + System.err.println( + "Exception when calling TwilioIntegrationAccountsApi#updateTwilioIntegrationAccount"); + 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 0d8443e0d1a..3396949fd4d 100644 --- a/src/main/java/com/datadog/api/client/ApiClient.java +++ b/src/main/java/com/datadog/api/client/ApiClient.java @@ -1204,6 +1204,16 @@ public class ApiClient { put("v2.updateIncidentUserDefinedField", false); put("v2.updateIncidentUserDefinedRole", false); put("v2.updateTimestampOverride", false); + put("v2.createElasticCloudIntegrationAccount", false); + put("v2.deleteElasticCloudIntegrationAccount", false); + put("v2.getElasticCloudIntegrationAccount", false); + put("v2.listElasticCloudIntegrationAccounts", false); + put("v2.updateElasticCloudIntegrationAccount", false); + put("v2.createTwilioIntegrationAccount", false); + put("v2.deleteTwilioIntegrationAccount", false); + put("v2.getTwilioIntegrationAccount", false); + put("v2.listTwilioIntegrationAccounts", false); + put("v2.updateTwilioIntegrationAccount", false); put("v2.createAWSAccountCCMConfig", false); put("v2.deleteAWSAccountCCMConfig", false); put("v2.getAWSAccountCCMConfig", false); diff --git a/src/main/java/com/datadog/api/client/v2/api/ElasticCloudApi.java b/src/main/java/com/datadog/api/client/v2/api/ElasticCloudApi.java new file mode 100644 index 00000000000..355e75fcaa2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/api/ElasticCloudApi.java @@ -0,0 +1,849 @@ +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.ElasticCloudIntegrationAccountRequest; +import com.datadog.api.client.v2.model.ElasticCloudIntegrationAccountResponse; +import com.datadog.api.client.v2.model.ElasticCloudIntegrationAccountUpdateRequest; +import com.datadog.api.client.v2.model.ElasticCloudIntegrationAccountsResponse; +import jakarta.ws.rs.client.Invocation; +import jakarta.ws.rs.core.GenericType; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.CompletableFuture; + +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ElasticCloudApi { + private ApiClient apiClient; + + public ElasticCloudApi() { + this(ApiClient.getDefaultApiClient()); + } + + public ElasticCloudApi(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; + } + + /** + * Create an Elastic Cloud integration account. + * + *

See {@link #createElasticCloudIntegrationAccountWithHttpInfo}. + * + * @param body (required) + * @return ElasticCloudIntegrationAccountResponse + * @throws ApiException if fails to make API call + */ + public ElasticCloudIntegrationAccountResponse createElasticCloudIntegrationAccount( + ElasticCloudIntegrationAccountRequest body) throws ApiException { + return createElasticCloudIntegrationAccountWithHttpInfo(body).getData(); + } + + /** + * Create an Elastic Cloud integration account. + * + *

See {@link #createElasticCloudIntegrationAccountWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<ElasticCloudIntegrationAccountResponse> + */ + public CompletableFuture + createElasticCloudIntegrationAccountAsync(ElasticCloudIntegrationAccountRequest body) { + return createElasticCloudIntegrationAccountWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Create an Elastic Cloud integration account. + * + * @param body (required) + * @return ApiResponse<ElasticCloudIntegrationAccountResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
201 Created -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse + createElasticCloudIntegrationAccountWithHttpInfo(ElasticCloudIntegrationAccountRequest body) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "createElasticCloudIntegrationAccount"; + 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" + + " createElasticCloudIntegrationAccount"); + } + // create path and map variables + String localVarPath = "/api/v2/integration-interfaces/elastic-cloud/accounts"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.ElasticCloudApi.createElasticCloudIntegrationAccount", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Create an Elastic Cloud integration account. + * + *

See {@link #createElasticCloudIntegrationAccountWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<ElasticCloudIntegrationAccountResponse>> + */ + public CompletableFuture> + createElasticCloudIntegrationAccountWithHttpInfoAsync( + ElasticCloudIntegrationAccountRequest body) { + // Check if unstable operation is enabled + String operationId = "createElasticCloudIntegrationAccount"; + 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" + + " createElasticCloudIntegrationAccount")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/integration-interfaces/elastic-cloud/accounts"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.ElasticCloudApi.createElasticCloudIntegrationAccount", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Delete an Elastic Cloud integration account. + * + *

See {@link #deleteElasticCloudIntegrationAccountWithHttpInfo}. + * + * @param accountId Unique identifier of the integration account. (required) + * @throws ApiException if fails to make API call + */ + public void deleteElasticCloudIntegrationAccount(String accountId) throws ApiException { + deleteElasticCloudIntegrationAccountWithHttpInfo(accountId); + } + + /** + * Delete an Elastic Cloud integration account. + * + *

See {@link #deleteElasticCloudIntegrationAccountWithHttpInfoAsync}. + * + * @param accountId Unique identifier of the integration account. (required) + * @return CompletableFuture + */ + public CompletableFuture deleteElasticCloudIntegrationAccountAsync(String accountId) { + return deleteElasticCloudIntegrationAccountWithHttpInfoAsync(accountId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Delete an Elastic Cloud integration account. + * + * @param accountId Unique identifier of the integration account. (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 -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse deleteElasticCloudIntegrationAccountWithHttpInfo(String accountId) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "deleteElasticCloudIntegrationAccount"; + 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 = null; + + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'accountId' when calling" + + " deleteElasticCloudIntegrationAccount"); + } + // create path and map variables + String localVarPath = + "/api/v2/integration-interfaces/elastic-cloud/accounts/{account_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.ElasticCloudApi.deleteElasticCloudIntegrationAccount", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Delete an Elastic Cloud integration account. + * + *

See {@link #deleteElasticCloudIntegrationAccountWithHttpInfo}. + * + * @param accountId Unique identifier of the integration account. (required) + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> deleteElasticCloudIntegrationAccountWithHttpInfoAsync( + String accountId) { + // Check if unstable operation is enabled + String operationId = "deleteElasticCloudIntegrationAccount"; + 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 = null; + + // verify the required parameter 'accountId' is set + if (accountId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'accountId' when calling" + + " deleteElasticCloudIntegrationAccount")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/integration-interfaces/elastic-cloud/accounts/{account_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.ElasticCloudApi.deleteElasticCloudIntegrationAccount", + 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( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Get an Elastic Cloud integration account. + * + *

See {@link #getElasticCloudIntegrationAccountWithHttpInfo}. + * + * @param accountId Unique identifier of the integration account. (required) + * @return ElasticCloudIntegrationAccountResponse + * @throws ApiException if fails to make API call + */ + public ElasticCloudIntegrationAccountResponse getElasticCloudIntegrationAccount(String accountId) + throws ApiException { + return getElasticCloudIntegrationAccountWithHttpInfo(accountId).getData(); + } + + /** + * Get an Elastic Cloud integration account. + * + *

See {@link #getElasticCloudIntegrationAccountWithHttpInfoAsync}. + * + * @param accountId Unique identifier of the integration account. (required) + * @return CompletableFuture<ElasticCloudIntegrationAccountResponse> + */ + public CompletableFuture + getElasticCloudIntegrationAccountAsync(String accountId) { + return getElasticCloudIntegrationAccountWithHttpInfoAsync(accountId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get a single Elastic Cloud integration account. + * + * @param accountId Unique identifier of the integration account. (required) + * @return ApiResponse<ElasticCloudIntegrationAccountResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse + getElasticCloudIntegrationAccountWithHttpInfo(String accountId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "getElasticCloudIntegrationAccount"; + 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 = null; + + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'accountId' when calling" + + " getElasticCloudIntegrationAccount"); + } + // create path and map variables + String localVarPath = + "/api/v2/integration-interfaces/elastic-cloud/accounts/{account_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.ElasticCloudApi.getElasticCloudIntegrationAccount", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get an Elastic Cloud integration account. + * + *

See {@link #getElasticCloudIntegrationAccountWithHttpInfo}. + * + * @param accountId Unique identifier of the integration account. (required) + * @return CompletableFuture<ApiResponse<ElasticCloudIntegrationAccountResponse>> + */ + public CompletableFuture> + getElasticCloudIntegrationAccountWithHttpInfoAsync(String accountId) { + // Check if unstable operation is enabled + String operationId = "getElasticCloudIntegrationAccount"; + 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 = null; + + // verify the required parameter 'accountId' is set + if (accountId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'accountId' when calling" + + " getElasticCloudIntegrationAccount")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/integration-interfaces/elastic-cloud/accounts/{account_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.ElasticCloudApi.getElasticCloudIntegrationAccount", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List Elastic Cloud integration accounts. + * + *

See {@link #listElasticCloudIntegrationAccountsWithHttpInfo}. + * + * @return ElasticCloudIntegrationAccountsResponse + * @throws ApiException if fails to make API call + */ + public ElasticCloudIntegrationAccountsResponse listElasticCloudIntegrationAccounts() + throws ApiException { + return listElasticCloudIntegrationAccountsWithHttpInfo().getData(); + } + + /** + * List Elastic Cloud integration accounts. + * + *

See {@link #listElasticCloudIntegrationAccountsWithHttpInfoAsync}. + * + * @return CompletableFuture<ElasticCloudIntegrationAccountsResponse> + */ + public CompletableFuture + listElasticCloudIntegrationAccountsAsync() { + return listElasticCloudIntegrationAccountsWithHttpInfoAsync() + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List the Elastic Cloud integration accounts. + * + * @return ApiResponse<ElasticCloudIntegrationAccountsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse + listElasticCloudIntegrationAccountsWithHttpInfo() throws ApiException { + // Check if unstable operation is enabled + String operationId = "listElasticCloudIntegrationAccounts"; + 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 = null; + // create path and map variables + String localVarPath = "/api/v2/integration-interfaces/elastic-cloud/accounts"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.ElasticCloudApi.listElasticCloudIntegrationAccounts", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List Elastic Cloud integration accounts. + * + *

See {@link #listElasticCloudIntegrationAccountsWithHttpInfo}. + * + * @return CompletableFuture<ApiResponse<ElasticCloudIntegrationAccountsResponse>> + */ + public CompletableFuture> + listElasticCloudIntegrationAccountsWithHttpInfoAsync() { + // Check if unstable operation is enabled + String operationId = "listElasticCloudIntegrationAccounts"; + 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 = null; + // create path and map variables + String localVarPath = "/api/v2/integration-interfaces/elastic-cloud/accounts"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.ElasticCloudApi.listElasticCloudIntegrationAccounts", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Update an Elastic Cloud integration account. + * + *

See {@link #updateElasticCloudIntegrationAccountWithHttpInfo}. + * + * @param accountId Unique identifier of the integration account. (required) + * @param body (required) + * @return ElasticCloudIntegrationAccountResponse + * @throws ApiException if fails to make API call + */ + public ElasticCloudIntegrationAccountResponse updateElasticCloudIntegrationAccount( + String accountId, ElasticCloudIntegrationAccountUpdateRequest body) throws ApiException { + return updateElasticCloudIntegrationAccountWithHttpInfo(accountId, body).getData(); + } + + /** + * Update an Elastic Cloud integration account. + * + *

See {@link #updateElasticCloudIntegrationAccountWithHttpInfoAsync}. + * + * @param accountId Unique identifier of the integration account. (required) + * @param body (required) + * @return CompletableFuture<ElasticCloudIntegrationAccountResponse> + */ + public CompletableFuture + updateElasticCloudIntegrationAccountAsync( + String accountId, ElasticCloudIntegrationAccountUpdateRequest body) { + return updateElasticCloudIntegrationAccountWithHttpInfoAsync(accountId, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Update an Elastic Cloud integration account. Only the fields provided are changed. + * + * @param accountId Unique identifier of the integration account. (required) + * @param body (required) + * @return ApiResponse<ElasticCloudIntegrationAccountResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse + updateElasticCloudIntegrationAccountWithHttpInfo( + String accountId, ElasticCloudIntegrationAccountUpdateRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "updateElasticCloudIntegrationAccount"; + 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 'accountId' is set + if (accountId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'accountId' when calling" + + " updateElasticCloudIntegrationAccount"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, + "Missing the required parameter 'body' when calling" + + " updateElasticCloudIntegrationAccount"); + } + // create path and map variables + String localVarPath = + "/api/v2/integration-interfaces/elastic-cloud/accounts/{account_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.ElasticCloudApi.updateElasticCloudIntegrationAccount", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Update an Elastic Cloud integration account. + * + *

See {@link #updateElasticCloudIntegrationAccountWithHttpInfo}. + * + * @param accountId Unique identifier of the integration account. (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<ElasticCloudIntegrationAccountResponse>> + */ + public CompletableFuture> + updateElasticCloudIntegrationAccountWithHttpInfoAsync( + String accountId, ElasticCloudIntegrationAccountUpdateRequest body) { + // Check if unstable operation is enabled + String operationId = "updateElasticCloudIntegrationAccount"; + 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 'accountId' is set + if (accountId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'accountId' when calling" + + " updateElasticCloudIntegrationAccount")); + return result; + } + + // 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" + + " updateElasticCloudIntegrationAccount")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/integration-interfaces/elastic-cloud/accounts/{account_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.ElasticCloudApi.updateElasticCloudIntegrationAccount", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/api/TwilioIntegrationAccountsApi.java b/src/main/java/com/datadog/api/client/v2/api/TwilioIntegrationAccountsApi.java new file mode 100644 index 00000000000..71875356d81 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/api/TwilioIntegrationAccountsApi.java @@ -0,0 +1,834 @@ +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.TwilioIntegrationAccountRequest; +import com.datadog.api.client.v2.model.TwilioIntegrationAccountResponse; +import com.datadog.api.client.v2.model.TwilioIntegrationAccountUpdateRequest; +import com.datadog.api.client.v2.model.TwilioIntegrationAccountsResponse; +import jakarta.ws.rs.client.Invocation; +import jakarta.ws.rs.core.GenericType; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.CompletableFuture; + +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TwilioIntegrationAccountsApi { + private ApiClient apiClient; + + public TwilioIntegrationAccountsApi() { + this(ApiClient.getDefaultApiClient()); + } + + public TwilioIntegrationAccountsApi(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; + } + + /** + * Create a Twilio integration account. + * + *

See {@link #createTwilioIntegrationAccountWithHttpInfo}. + * + * @param body (required) + * @return TwilioIntegrationAccountResponse + * @throws ApiException if fails to make API call + */ + public TwilioIntegrationAccountResponse createTwilioIntegrationAccount( + TwilioIntegrationAccountRequest body) throws ApiException { + return createTwilioIntegrationAccountWithHttpInfo(body).getData(); + } + + /** + * Create a Twilio integration account. + * + *

See {@link #createTwilioIntegrationAccountWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<TwilioIntegrationAccountResponse> + */ + public CompletableFuture createTwilioIntegrationAccountAsync( + TwilioIntegrationAccountRequest body) { + return createTwilioIntegrationAccountWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Create a Twilio integration account. + * + * @param body (required) + * @return ApiResponse<TwilioIntegrationAccountResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
201 Created -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse createTwilioIntegrationAccountWithHttpInfo( + TwilioIntegrationAccountRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "createTwilioIntegrationAccount"; + 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 createTwilioIntegrationAccount"); + } + // create path and map variables + String localVarPath = "/api/v2/integration-interfaces/twilio/accounts"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.TwilioIntegrationAccountsApi.createTwilioIntegrationAccount", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Create a Twilio integration account. + * + *

See {@link #createTwilioIntegrationAccountWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<TwilioIntegrationAccountResponse>> + */ + public CompletableFuture> + createTwilioIntegrationAccountWithHttpInfoAsync(TwilioIntegrationAccountRequest body) { + // Check if unstable operation is enabled + String operationId = "createTwilioIntegrationAccount"; + 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 createTwilioIntegrationAccount")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/integration-interfaces/twilio/accounts"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.TwilioIntegrationAccountsApi.createTwilioIntegrationAccount", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Delete a Twilio integration account. + * + *

See {@link #deleteTwilioIntegrationAccountWithHttpInfo}. + * + * @param accountId Unique identifier of the integration account. (required) + * @throws ApiException if fails to make API call + */ + public void deleteTwilioIntegrationAccount(String accountId) throws ApiException { + deleteTwilioIntegrationAccountWithHttpInfo(accountId); + } + + /** + * Delete a Twilio integration account. + * + *

See {@link #deleteTwilioIntegrationAccountWithHttpInfoAsync}. + * + * @param accountId Unique identifier of the integration account. (required) + * @return CompletableFuture + */ + public CompletableFuture deleteTwilioIntegrationAccountAsync(String accountId) { + return deleteTwilioIntegrationAccountWithHttpInfoAsync(accountId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Delete a Twilio integration account. + * + * @param accountId Unique identifier of the integration account. (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 -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse deleteTwilioIntegrationAccountWithHttpInfo(String accountId) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "deleteTwilioIntegrationAccount"; + 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 = null; + + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'accountId' when calling deleteTwilioIntegrationAccount"); + } + // create path and map variables + String localVarPath = + "/api/v2/integration-interfaces/twilio/accounts/{account_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.TwilioIntegrationAccountsApi.deleteTwilioIntegrationAccount", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"*/*"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Delete a Twilio integration account. + * + *

See {@link #deleteTwilioIntegrationAccountWithHttpInfo}. + * + * @param accountId Unique identifier of the integration account. (required) + * @return CompletableFuture<ApiResponse<Void>> + */ + public CompletableFuture> deleteTwilioIntegrationAccountWithHttpInfoAsync( + String accountId) { + // Check if unstable operation is enabled + String operationId = "deleteTwilioIntegrationAccount"; + 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 = null; + + // verify the required parameter 'accountId' is set + if (accountId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'accountId' when calling" + + " deleteTwilioIntegrationAccount")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/integration-interfaces/twilio/accounts/{account_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.TwilioIntegrationAccountsApi.deleteTwilioIntegrationAccount", + 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( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + null); + } + + /** + * Get a Twilio integration account. + * + *

See {@link #getTwilioIntegrationAccountWithHttpInfo}. + * + * @param accountId Unique identifier of the integration account. (required) + * @return TwilioIntegrationAccountResponse + * @throws ApiException if fails to make API call + */ + public TwilioIntegrationAccountResponse getTwilioIntegrationAccount(String accountId) + throws ApiException { + return getTwilioIntegrationAccountWithHttpInfo(accountId).getData(); + } + + /** + * Get a Twilio integration account. + * + *

See {@link #getTwilioIntegrationAccountWithHttpInfoAsync}. + * + * @param accountId Unique identifier of the integration account. (required) + * @return CompletableFuture<TwilioIntegrationAccountResponse> + */ + public CompletableFuture getTwilioIntegrationAccountAsync( + String accountId) { + return getTwilioIntegrationAccountWithHttpInfoAsync(accountId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get a single Twilio integration account. + * + * @param accountId Unique identifier of the integration account. (required) + * @return ApiResponse<TwilioIntegrationAccountResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse getTwilioIntegrationAccountWithHttpInfo( + String accountId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "getTwilioIntegrationAccount"; + 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 = null; + + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'accountId' when calling getTwilioIntegrationAccount"); + } + // create path and map variables + String localVarPath = + "/api/v2/integration-interfaces/twilio/accounts/{account_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.TwilioIntegrationAccountsApi.getTwilioIntegrationAccount", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Get a Twilio integration account. + * + *

See {@link #getTwilioIntegrationAccountWithHttpInfo}. + * + * @param accountId Unique identifier of the integration account. (required) + * @return CompletableFuture<ApiResponse<TwilioIntegrationAccountResponse>> + */ + public CompletableFuture> + getTwilioIntegrationAccountWithHttpInfoAsync(String accountId) { + // Check if unstable operation is enabled + String operationId = "getTwilioIntegrationAccount"; + 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 = null; + + // verify the required parameter 'accountId' is set + if (accountId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'accountId' when calling" + + " getTwilioIntegrationAccount")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/integration-interfaces/twilio/accounts/{account_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.TwilioIntegrationAccountsApi.getTwilioIntegrationAccount", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List Twilio integration accounts. + * + *

See {@link #listTwilioIntegrationAccountsWithHttpInfo}. + * + * @return TwilioIntegrationAccountsResponse + * @throws ApiException if fails to make API call + */ + public TwilioIntegrationAccountsResponse listTwilioIntegrationAccounts() throws ApiException { + return listTwilioIntegrationAccountsWithHttpInfo().getData(); + } + + /** + * List Twilio integration accounts. + * + *

See {@link #listTwilioIntegrationAccountsWithHttpInfoAsync}. + * + * @return CompletableFuture<TwilioIntegrationAccountsResponse> + */ + public CompletableFuture listTwilioIntegrationAccountsAsync() { + return listTwilioIntegrationAccountsWithHttpInfoAsync() + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List the Twilio integration accounts. + * + * @return ApiResponse<TwilioIntegrationAccountsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse listTwilioIntegrationAccountsWithHttpInfo() + throws ApiException { + // Check if unstable operation is enabled + String operationId = "listTwilioIntegrationAccounts"; + 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 = null; + // create path and map variables + String localVarPath = "/api/v2/integration-interfaces/twilio/accounts"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.TwilioIntegrationAccountsApi.listTwilioIntegrationAccounts", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List Twilio integration accounts. + * + *

See {@link #listTwilioIntegrationAccountsWithHttpInfo}. + * + * @return CompletableFuture<ApiResponse<TwilioIntegrationAccountsResponse>> + */ + public CompletableFuture> + listTwilioIntegrationAccountsWithHttpInfoAsync() { + // Check if unstable operation is enabled + String operationId = "listTwilioIntegrationAccounts"; + 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 = null; + // create path and map variables + String localVarPath = "/api/v2/integration-interfaces/twilio/accounts"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.TwilioIntegrationAccountsApi.listTwilioIntegrationAccounts", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Update a Twilio integration account. + * + *

See {@link #updateTwilioIntegrationAccountWithHttpInfo}. + * + * @param accountId Unique identifier of the integration account. (required) + * @param body (required) + * @return TwilioIntegrationAccountResponse + * @throws ApiException if fails to make API call + */ + public TwilioIntegrationAccountResponse updateTwilioIntegrationAccount( + String accountId, TwilioIntegrationAccountUpdateRequest body) throws ApiException { + return updateTwilioIntegrationAccountWithHttpInfo(accountId, body).getData(); + } + + /** + * Update a Twilio integration account. + * + *

See {@link #updateTwilioIntegrationAccountWithHttpInfoAsync}. + * + * @param accountId Unique identifier of the integration account. (required) + * @param body (required) + * @return CompletableFuture<TwilioIntegrationAccountResponse> + */ + public CompletableFuture updateTwilioIntegrationAccountAsync( + String accountId, TwilioIntegrationAccountUpdateRequest body) { + return updateTwilioIntegrationAccountWithHttpInfoAsync(accountId, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Update a Twilio integration account. Only the fields provided are changed. + * + * @param accountId Unique identifier of the integration account. (required) + * @param body (required) + * @return ApiResponse<TwilioIntegrationAccountResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse updateTwilioIntegrationAccountWithHttpInfo( + String accountId, TwilioIntegrationAccountUpdateRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "updateTwilioIntegrationAccount"; + 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 'accountId' is set + if (accountId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'accountId' when calling updateTwilioIntegrationAccount"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling updateTwilioIntegrationAccount"); + } + // create path and map variables + String localVarPath = + "/api/v2/integration-interfaces/twilio/accounts/{account_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.TwilioIntegrationAccountsApi.updateTwilioIntegrationAccount", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Update a Twilio integration account. + * + *

See {@link #updateTwilioIntegrationAccountWithHttpInfo}. + * + * @param accountId Unique identifier of the integration account. (required) + * @param body (required) + * @return CompletableFuture<ApiResponse<TwilioIntegrationAccountResponse>> + */ + public CompletableFuture> + updateTwilioIntegrationAccountWithHttpInfoAsync( + String accountId, TwilioIntegrationAccountUpdateRequest body) { + // Check if unstable operation is enabled + String operationId = "updateTwilioIntegrationAccount"; + 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 'accountId' is set + if (accountId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'accountId' when calling" + + " updateTwilioIntegrationAccount")); + return result; + } + + // 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 updateTwilioIntegrationAccount")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/integration-interfaces/twilio/accounts/{account_id}" + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.TwilioIntegrationAccountsApi.updateTwilioIntegrationAccount", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "PATCH", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ElasticCloudDetailedIndexStatsIntegrationDataflow.java b/src/main/java/com/datadog/api/client/v2/model/ElasticCloudDetailedIndexStatsIntegrationDataflow.java new file mode 100644 index 00000000000..7a711ef507d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ElasticCloudDetailedIndexStatsIntegrationDataflow.java @@ -0,0 +1,160 @@ +/* + * 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 Elastic Cloud detailed index stats dataflow. */ +@JsonPropertyOrder({ + ElasticCloudDetailedIndexStatsIntegrationDataflow.JSON_PROPERTY_ENABLED, + ElasticCloudDetailedIndexStatsIntegrationDataflow.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ElasticCloudDetailedIndexStatsIntegrationDataflow { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_STATUS = "status"; + private IntegrationAccountDataflowStatus status; + + public ElasticCloudDetailedIndexStatsIntegrationDataflow enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether the dataflow is enabled. + * + * @return enabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + /** + * Read-only collection status of a dataflow. + * + * @return status + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IntegrationAccountDataflowStatus getStatus() { + return status; + } + + /** + * 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 ElasticCloudDetailedIndexStatsIntegrationDataflow + */ + @JsonAnySetter + public ElasticCloudDetailedIndexStatsIntegrationDataflow 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 ElasticCloudDetailedIndexStatsIntegrationDataflow object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ElasticCloudDetailedIndexStatsIntegrationDataflow + elasticCloudDetailedIndexStatsIntegrationDataflow = + (ElasticCloudDetailedIndexStatsIntegrationDataflow) o; + return Objects.equals(this.enabled, elasticCloudDetailedIndexStatsIntegrationDataflow.enabled) + && Objects.equals(this.status, elasticCloudDetailedIndexStatsIntegrationDataflow.status) + && Objects.equals( + this.additionalProperties, + elasticCloudDetailedIndexStatsIntegrationDataflow.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ElasticCloudDetailedIndexStatsIntegrationDataflow {\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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/ElasticCloudIndexStatsIntegrationDataflow.java b/src/main/java/com/datadog/api/client/v2/model/ElasticCloudIndexStatsIntegrationDataflow.java new file mode 100644 index 00000000000..bf4ae79148d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ElasticCloudIndexStatsIntegrationDataflow.java @@ -0,0 +1,158 @@ +/* + * 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 Elastic Cloud index stats dataflow. */ +@JsonPropertyOrder({ + ElasticCloudIndexStatsIntegrationDataflow.JSON_PROPERTY_ENABLED, + ElasticCloudIndexStatsIntegrationDataflow.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ElasticCloudIndexStatsIntegrationDataflow { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_STATUS = "status"; + private IntegrationAccountDataflowStatus status; + + public ElasticCloudIndexStatsIntegrationDataflow enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether the dataflow is enabled. + * + * @return enabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + /** + * Read-only collection status of a dataflow. + * + * @return status + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IntegrationAccountDataflowStatus getStatus() { + return status; + } + + /** + * 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 ElasticCloudIndexStatsIntegrationDataflow + */ + @JsonAnySetter + public ElasticCloudIndexStatsIntegrationDataflow 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 ElasticCloudIndexStatsIntegrationDataflow object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ElasticCloudIndexStatsIntegrationDataflow elasticCloudIndexStatsIntegrationDataflow = + (ElasticCloudIndexStatsIntegrationDataflow) o; + return Objects.equals(this.enabled, elasticCloudIndexStatsIntegrationDataflow.enabled) + && Objects.equals(this.status, elasticCloudIndexStatsIntegrationDataflow.status) + && Objects.equals( + this.additionalProperties, + elasticCloudIndexStatsIntegrationDataflow.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ElasticCloudIndexStatsIntegrationDataflow {\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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/ElasticCloudIntegrationAccountAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ElasticCloudIntegrationAccountAttributes.java new file mode 100644 index 00000000000..8f402c2facf --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ElasticCloudIntegrationAccountAttributes.java @@ -0,0 +1,267 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes of an Elastic Cloud integration account. */ +@JsonPropertyOrder({ + ElasticCloudIntegrationAccountAttributes.JSON_PROPERTY_AUTHENTICATION, + ElasticCloudIntegrationAccountAttributes.JSON_PROPERTY_DATAFLOWS, + ElasticCloudIntegrationAccountAttributes.JSON_PROPERTY_NAME, + ElasticCloudIntegrationAccountAttributes.JSON_PROPERTY_PERMISSIONS, + ElasticCloudIntegrationAccountAttributes.JSON_PROPERTY_SETTINGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ElasticCloudIntegrationAccountAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AUTHENTICATION = "authentication"; + private ElasticCloudIntegrationAccountAuthentication authentication; + + public static final String JSON_PROPERTY_DATAFLOWS = "dataflows"; + private ElasticCloudIntegrationDataflows dataflows; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_PERMISSIONS = "permissions"; + private IntegrationAccountPermissions permissions; + + public static final String JSON_PROPERTY_SETTINGS = "settings"; + private ElasticCloudIntegrationAccountSettings settings; + + public ElasticCloudIntegrationAccountAttributes() {} + + @JsonCreator + public ElasticCloudIntegrationAccountAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_AUTHENTICATION) + ElasticCloudIntegrationAccountAuthentication authentication, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { + this.authentication = authentication; + this.unparsed |= authentication.unparsed; + this.name = name; + } + + public ElasticCloudIntegrationAccountAttributes authentication( + ElasticCloudIntegrationAccountAuthentication authentication) { + this.authentication = authentication; + this.unparsed |= authentication.unparsed; + return this; + } + + /** + * Authentication for the Elastic Cloud integration account. Exactly one method is set. + * + * @return authentication + */ + @JsonProperty(JSON_PROPERTY_AUTHENTICATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ElasticCloudIntegrationAccountAuthentication getAuthentication() { + return authentication; + } + + public void setAuthentication(ElasticCloudIntegrationAccountAuthentication authentication) { + this.authentication = authentication; + if (authentication != null) { + this.unparsed |= authentication.unparsed; + } + } + + public ElasticCloudIntegrationAccountAttributes dataflows( + ElasticCloudIntegrationDataflows dataflows) { + this.dataflows = dataflows; + this.unparsed |= dataflows.unparsed; + return this; + } + + /** + * Dataflows for the Elastic Cloud integration account, keyed by dataflow id. + * + * @return dataflows + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATAFLOWS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ElasticCloudIntegrationDataflows getDataflows() { + return dataflows; + } + + public void setDataflows(ElasticCloudIntegrationDataflows dataflows) { + this.dataflows = dataflows; + if (dataflows != null) { + this.unparsed |= dataflows.unparsed; + } + } + + public ElasticCloudIntegrationAccountAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Human-readable name of the account. + * + * @return name + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + /** + * Read-only permission information for the account, derived from its restriction policy. + * + * @return permissions + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PERMISSIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IntegrationAccountPermissions getPermissions() { + return permissions; + } + + public ElasticCloudIntegrationAccountAttributes settings( + ElasticCloudIntegrationAccountSettings settings) { + this.settings = settings; + this.unparsed |= settings.unparsed; + return this; + } + + /** + * Settings for the Elastic Cloud integration account. + * + * @return settings + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SETTINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ElasticCloudIntegrationAccountSettings getSettings() { + return settings; + } + + public void setSettings(ElasticCloudIntegrationAccountSettings settings) { + this.settings = settings; + if (settings != null) { + this.unparsed |= settings.unparsed; + } + } + + /** + * 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 ElasticCloudIntegrationAccountAttributes + */ + @JsonAnySetter + public ElasticCloudIntegrationAccountAttributes 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 ElasticCloudIntegrationAccountAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ElasticCloudIntegrationAccountAttributes elasticCloudIntegrationAccountAttributes = + (ElasticCloudIntegrationAccountAttributes) o; + return Objects.equals( + this.authentication, elasticCloudIntegrationAccountAttributes.authentication) + && Objects.equals(this.dataflows, elasticCloudIntegrationAccountAttributes.dataflows) + && Objects.equals(this.name, elasticCloudIntegrationAccountAttributes.name) + && Objects.equals(this.permissions, elasticCloudIntegrationAccountAttributes.permissions) + && Objects.equals(this.settings, elasticCloudIntegrationAccountAttributes.settings) + && Objects.equals( + this.additionalProperties, + elasticCloudIntegrationAccountAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + authentication, dataflows, name, permissions, settings, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ElasticCloudIntegrationAccountAttributes {\n"); + sb.append(" authentication: ").append(toIndentedString(authentication)).append("\n"); + sb.append(" dataflows: ").append(toIndentedString(dataflows)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" permissions: ").append(toIndentedString(permissions)).append("\n"); + sb.append(" settings: ").append(toIndentedString(settings)).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/ElasticCloudIntegrationAccountAuthentication.java b/src/main/java/com/datadog/api/client/v2/model/ElasticCloudIntegrationAccountAuthentication.java new file mode 100644 index 00000000000..50f68834bba --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ElasticCloudIntegrationAccountAuthentication.java @@ -0,0 +1,226 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.JSON; +import com.datadog.api.client.UnparsedObject; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import jakarta.ws.rs.core.GenericType; +import java.io.IOException; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; + +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonDeserialize( + using = + ElasticCloudIntegrationAccountAuthentication + .ElasticCloudIntegrationAccountAuthenticationDeserializer.class) +@JsonSerialize( + using = + ElasticCloudIntegrationAccountAuthentication + .ElasticCloudIntegrationAccountAuthenticationSerializer.class) +public class ElasticCloudIntegrationAccountAuthentication extends AbstractOpenApiSchema { + private static final Logger log = + Logger.getLogger(ElasticCloudIntegrationAccountAuthentication.class.getName()); + + @JsonIgnore public boolean unparsed = false; + + public static class ElasticCloudIntegrationAccountAuthenticationSerializer + extends StdSerializer { + public ElasticCloudIntegrationAccountAuthenticationSerializer( + Class t) { + super(t); + } + + public ElasticCloudIntegrationAccountAuthenticationSerializer() { + this(null); + } + + @Override + public void serialize( + ElasticCloudIntegrationAccountAuthentication value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class ElasticCloudIntegrationAccountAuthenticationDeserializer + extends StdDeserializer { + public ElasticCloudIntegrationAccountAuthenticationDeserializer() { + this(ElasticCloudIntegrationAccountAuthentication.class); + } + + public ElasticCloudIntegrationAccountAuthenticationDeserializer(Class vc) { + super(vc); + } + + @Override + public ElasticCloudIntegrationAccountAuthentication deserialize( + JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + Object tmp = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize IntegrationAccountBasicAuth + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (IntegrationAccountBasicAuth.class.equals(Integer.class) + || IntegrationAccountBasicAuth.class.equals(Long.class) + || IntegrationAccountBasicAuth.class.equals(Float.class) + || IntegrationAccountBasicAuth.class.equals(Double.class) + || IntegrationAccountBasicAuth.class.equals(Boolean.class) + || IntegrationAccountBasicAuth.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((IntegrationAccountBasicAuth.class.equals(Integer.class) + || IntegrationAccountBasicAuth.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((IntegrationAccountBasicAuth.class.equals(Float.class) + || IntegrationAccountBasicAuth.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (IntegrationAccountBasicAuth.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (IntegrationAccountBasicAuth.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(IntegrationAccountBasicAuth.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((IntegrationAccountBasicAuth) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'IntegrationAccountBasicAuth'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'IntegrationAccountBasicAuth'", e); + } + + ElasticCloudIntegrationAccountAuthentication ret = + new ElasticCloudIntegrationAccountAuthentication(); + if (match == 1) { + ret.setActualInstance(deserialized); + } else { + Map res = + new ObjectMapper() + .readValue( + tree.traverse(jp.getCodec()).readValueAsTree().toString(), + new TypeReference>() {}); + ret.setActualInstance(new UnparsedObject(res)); + } + return ret; + } + + /** Handle deserialization of the 'null' value. */ + @Override + public ElasticCloudIntegrationAccountAuthentication getNullValue(DeserializationContext ctxt) + throws JsonMappingException { + throw new JsonMappingException( + ctxt.getParser(), "ElasticCloudIntegrationAccountAuthentication cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public ElasticCloudIntegrationAccountAuthentication() { + super("oneOf", Boolean.FALSE); + } + + public ElasticCloudIntegrationAccountAuthentication(IntegrationAccountBasicAuth o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("IntegrationAccountBasicAuth", new GenericType() {}); + JSON.registerDescendants( + ElasticCloudIntegrationAccountAuthentication.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map getSchemas() { + return ElasticCloudIntegrationAccountAuthentication.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: IntegrationAccountBasicAuth + * + *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be a + * composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(IntegrationAccountBasicAuth.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + throw new RuntimeException("Invalid instance type. Must be IntegrationAccountBasicAuth"); + } + + /** + * Get the actual instance, which can be the following: IntegrationAccountBasicAuth + * + * @return The actual instance (IntegrationAccountBasicAuth) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `IntegrationAccountBasicAuth`. If the actual instance is not + * `IntegrationAccountBasicAuth`, the ClassCastException will be thrown. + * + * @return The actual instance of `IntegrationAccountBasicAuth` + * @throws ClassCastException if the instance is not `IntegrationAccountBasicAuth` + */ + public IntegrationAccountBasicAuth getIntegrationAccountBasicAuth() throws ClassCastException { + return (IntegrationAccountBasicAuth) super.getActualInstance(); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ElasticCloudIntegrationAccountCreateData.java b/src/main/java/com/datadog/api/client/v2/model/ElasticCloudIntegrationAccountCreateData.java new file mode 100644 index 00000000000..738df6fdd56 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ElasticCloudIntegrationAccountCreateData.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.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data envelope for creating an Elastic Cloud integration account. */ +@JsonPropertyOrder({ + ElasticCloudIntegrationAccountCreateData.JSON_PROPERTY_ATTRIBUTES, + ElasticCloudIntegrationAccountCreateData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ElasticCloudIntegrationAccountCreateData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private ElasticCloudIntegrationAccountAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IntegrationAccountType type = IntegrationAccountType.INTEGRATION_ACCOUNT; + + public ElasticCloudIntegrationAccountCreateData() {} + + @JsonCreator + public ElasticCloudIntegrationAccountCreateData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + ElasticCloudIntegrationAccountAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IntegrationAccountType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public ElasticCloudIntegrationAccountCreateData attributes( + ElasticCloudIntegrationAccountAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of an Elastic Cloud integration account. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ElasticCloudIntegrationAccountAttributes getAttributes() { + return attributes; + } + + public void setAttributes(ElasticCloudIntegrationAccountAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public ElasticCloudIntegrationAccountCreateData type(IntegrationAccountType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The type of the integration account resource. Always integration-account. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IntegrationAccountType getType() { + return type; + } + + public void setType(IntegrationAccountType type) { + if (!type.isValid()) { + this.unparsed = true; + } + 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 ElasticCloudIntegrationAccountCreateData + */ + @JsonAnySetter + public ElasticCloudIntegrationAccountCreateData 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 ElasticCloudIntegrationAccountCreateData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ElasticCloudIntegrationAccountCreateData elasticCloudIntegrationAccountCreateData = + (ElasticCloudIntegrationAccountCreateData) o; + return Objects.equals(this.attributes, elasticCloudIntegrationAccountCreateData.attributes) + && Objects.equals(this.type, elasticCloudIntegrationAccountCreateData.type) + && Objects.equals( + this.additionalProperties, + elasticCloudIntegrationAccountCreateData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ElasticCloudIntegrationAccountCreateData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).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/ElasticCloudIntegrationAccountData.java b/src/main/java/com/datadog/api/client/v2/model/ElasticCloudIntegrationAccountData.java new file mode 100644 index 00000000000..f59e61129f6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ElasticCloudIntegrationAccountData.java @@ -0,0 +1,206 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data envelope of an Elastic Cloud integration account, including server-assigned identity. */ +@JsonPropertyOrder({ + ElasticCloudIntegrationAccountData.JSON_PROPERTY_ATTRIBUTES, + ElasticCloudIntegrationAccountData.JSON_PROPERTY_ID, + ElasticCloudIntegrationAccountData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ElasticCloudIntegrationAccountData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private ElasticCloudIntegrationAccountAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IntegrationAccountType type = IntegrationAccountType.INTEGRATION_ACCOUNT; + + public ElasticCloudIntegrationAccountData() {} + + @JsonCreator + public ElasticCloudIntegrationAccountData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + ElasticCloudIntegrationAccountAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IntegrationAccountType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public ElasticCloudIntegrationAccountData attributes( + ElasticCloudIntegrationAccountAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of an Elastic Cloud integration account. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ElasticCloudIntegrationAccountAttributes getAttributes() { + return attributes; + } + + public void setAttributes(ElasticCloudIntegrationAccountAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + /** + * Server-generated unique identifier of the integration account. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public ElasticCloudIntegrationAccountData type(IntegrationAccountType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The type of the integration account resource. Always integration-account. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IntegrationAccountType getType() { + return type; + } + + public void setType(IntegrationAccountType type) { + if (!type.isValid()) { + this.unparsed = true; + } + 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 ElasticCloudIntegrationAccountData + */ + @JsonAnySetter + public ElasticCloudIntegrationAccountData 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 ElasticCloudIntegrationAccountData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ElasticCloudIntegrationAccountData elasticCloudIntegrationAccountData = + (ElasticCloudIntegrationAccountData) o; + return Objects.equals(this.attributes, elasticCloudIntegrationAccountData.attributes) + && Objects.equals(this.id, elasticCloudIntegrationAccountData.id) + && Objects.equals(this.type, elasticCloudIntegrationAccountData.type) + && Objects.equals( + this.additionalProperties, elasticCloudIntegrationAccountData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ElasticCloudIntegrationAccountData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).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/ElasticCloudIntegrationAccountRequest.java b/src/main/java/com/datadog/api/client/v2/model/ElasticCloudIntegrationAccountRequest.java new file mode 100644 index 00000000000..2bb8ec6e85b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ElasticCloudIntegrationAccountRequest.java @@ -0,0 +1,151 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request payload to create an Elastic Cloud integration account. */ +@JsonPropertyOrder({ElasticCloudIntegrationAccountRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ElasticCloudIntegrationAccountRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private ElasticCloudIntegrationAccountCreateData data; + + public ElasticCloudIntegrationAccountRequest() {} + + @JsonCreator + public ElasticCloudIntegrationAccountRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + ElasticCloudIntegrationAccountCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public ElasticCloudIntegrationAccountRequest data(ElasticCloudIntegrationAccountCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data envelope for creating an Elastic Cloud integration account. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ElasticCloudIntegrationAccountCreateData getData() { + return data; + } + + public void setData(ElasticCloudIntegrationAccountCreateData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 ElasticCloudIntegrationAccountRequest + */ + @JsonAnySetter + public ElasticCloudIntegrationAccountRequest 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 ElasticCloudIntegrationAccountRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ElasticCloudIntegrationAccountRequest elasticCloudIntegrationAccountRequest = + (ElasticCloudIntegrationAccountRequest) o; + return Objects.equals(this.data, elasticCloudIntegrationAccountRequest.data) + && Objects.equals( + this.additionalProperties, elasticCloudIntegrationAccountRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ElasticCloudIntegrationAccountRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).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/ElasticCloudIntegrationAccountResponse.java b/src/main/java/com/datadog/api/client/v2/model/ElasticCloudIntegrationAccountResponse.java new file mode 100644 index 00000000000..2b803df9a51 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ElasticCloudIntegrationAccountResponse.java @@ -0,0 +1,141 @@ +/* + * 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; + +/** Response payload for a single Elastic Cloud integration account. */ +@JsonPropertyOrder({ElasticCloudIntegrationAccountResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ElasticCloudIntegrationAccountResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private ElasticCloudIntegrationAccountData data; + + public ElasticCloudIntegrationAccountResponse data(ElasticCloudIntegrationAccountData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data envelope of an Elastic Cloud integration account, including server-assigned identity. + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ElasticCloudIntegrationAccountData getData() { + return data; + } + + public void setData(ElasticCloudIntegrationAccountData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 ElasticCloudIntegrationAccountResponse + */ + @JsonAnySetter + public ElasticCloudIntegrationAccountResponse 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 ElasticCloudIntegrationAccountResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ElasticCloudIntegrationAccountResponse elasticCloudIntegrationAccountResponse = + (ElasticCloudIntegrationAccountResponse) o; + return Objects.equals(this.data, elasticCloudIntegrationAccountResponse.data) + && Objects.equals( + this.additionalProperties, elasticCloudIntegrationAccountResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ElasticCloudIntegrationAccountResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).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/ElasticCloudIntegrationAccountSettings.java b/src/main/java/com/datadog/api/client/v2/model/ElasticCloudIntegrationAccountSettings.java new file mode 100644 index 00000000000..35b21970584 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ElasticCloudIntegrationAccountSettings.java @@ -0,0 +1,184 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Settings for the Elastic Cloud integration account. */ +@JsonPropertyOrder({ + ElasticCloudIntegrationAccountSettings.JSON_PROPERTY_TAGS, + ElasticCloudIntegrationAccountSettings.JSON_PROPERTY_URL +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ElasticCloudIntegrationAccountSettings { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_TAGS = "tags"; + private List tags = null; + + public static final String JSON_PROPERTY_URL = "url"; + private String url; + + public ElasticCloudIntegrationAccountSettings() {} + + @JsonCreator + public ElasticCloudIntegrationAccountSettings( + @JsonProperty(required = true, value = JSON_PROPERTY_URL) String url) { + this.url = url; + } + + public ElasticCloudIntegrationAccountSettings tags(List tags) { + this.tags = tags; + return this; + } + + public ElasticCloudIntegrationAccountSettings addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Custom tags for this deployment. + * + * @return tags + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } + + public void setTags(List tags) { + this.tags = tags; + } + + public ElasticCloudIntegrationAccountSettings url(String url) { + this.url = url; + return this; + } + + /** + * Deployment URL. + * + * @return url + */ + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ElasticCloudIntegrationAccountSettings + */ + @JsonAnySetter + public ElasticCloudIntegrationAccountSettings 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 ElasticCloudIntegrationAccountSettings object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ElasticCloudIntegrationAccountSettings elasticCloudIntegrationAccountSettings = + (ElasticCloudIntegrationAccountSettings) o; + return Objects.equals(this.tags, elasticCloudIntegrationAccountSettings.tags) + && Objects.equals(this.url, elasticCloudIntegrationAccountSettings.url) + && Objects.equals( + this.additionalProperties, elasticCloudIntegrationAccountSettings.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(tags, url, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ElasticCloudIntegrationAccountSettings {\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ElasticCloudIntegrationAccountSettingsUpdate.java b/src/main/java/com/datadog/api/client/v2/model/ElasticCloudIntegrationAccountSettingsUpdate.java new file mode 100644 index 00000000000..1cc09a08159 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ElasticCloudIntegrationAccountSettingsUpdate.java @@ -0,0 +1,181 @@ +/* + * 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; + +/** + * Settings to update on the Elastic Cloud integration account. Only the fields provided are + * changed. + */ +@JsonPropertyOrder({ + ElasticCloudIntegrationAccountSettingsUpdate.JSON_PROPERTY_TAGS, + ElasticCloudIntegrationAccountSettingsUpdate.JSON_PROPERTY_URL +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ElasticCloudIntegrationAccountSettingsUpdate { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_TAGS = "tags"; + private List tags = null; + + public static final String JSON_PROPERTY_URL = "url"; + private String url; + + public ElasticCloudIntegrationAccountSettingsUpdate tags(List tags) { + this.tags = tags; + return this; + } + + public ElasticCloudIntegrationAccountSettingsUpdate addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Custom tags for this deployment. + * + * @return tags + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } + + public void setTags(List tags) { + this.tags = tags; + } + + public ElasticCloudIntegrationAccountSettingsUpdate url(String url) { + this.url = url; + return this; + } + + /** + * Deployment URL. + * + * @return url + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_URL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return ElasticCloudIntegrationAccountSettingsUpdate + */ + @JsonAnySetter + public ElasticCloudIntegrationAccountSettingsUpdate 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 ElasticCloudIntegrationAccountSettingsUpdate object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ElasticCloudIntegrationAccountSettingsUpdate elasticCloudIntegrationAccountSettingsUpdate = + (ElasticCloudIntegrationAccountSettingsUpdate) o; + return Objects.equals(this.tags, elasticCloudIntegrationAccountSettingsUpdate.tags) + && Objects.equals(this.url, elasticCloudIntegrationAccountSettingsUpdate.url) + && Objects.equals( + this.additionalProperties, + elasticCloudIntegrationAccountSettingsUpdate.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(tags, url, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ElasticCloudIntegrationAccountSettingsUpdate {\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/ElasticCloudIntegrationAccountUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/ElasticCloudIntegrationAccountUpdateAttributes.java new file mode 100644 index 00000000000..c34f70646c8 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ElasticCloudIntegrationAccountUpdateAttributes.java @@ -0,0 +1,244 @@ +/* + * 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; + +/** + * Updatable attributes of an Elastic Cloud integration account. Every field is optional; only the + * fields provided are changed. When dataflows is provided, only the dataflow ids + * included in the request are modified; dataflows omitted from the map keep their current + * configuration. + */ +@JsonPropertyOrder({ + ElasticCloudIntegrationAccountUpdateAttributes.JSON_PROPERTY_AUTHENTICATION, + ElasticCloudIntegrationAccountUpdateAttributes.JSON_PROPERTY_DATAFLOWS, + ElasticCloudIntegrationAccountUpdateAttributes.JSON_PROPERTY_NAME, + ElasticCloudIntegrationAccountUpdateAttributes.JSON_PROPERTY_SETTINGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ElasticCloudIntegrationAccountUpdateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AUTHENTICATION = "authentication"; + private ElasticCloudIntegrationAccountAuthentication authentication; + + public static final String JSON_PROPERTY_DATAFLOWS = "dataflows"; + private ElasticCloudIntegrationDataflows dataflows; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_SETTINGS = "settings"; + private ElasticCloudIntegrationAccountSettingsUpdate settings; + + public ElasticCloudIntegrationAccountUpdateAttributes authentication( + ElasticCloudIntegrationAccountAuthentication authentication) { + this.authentication = authentication; + this.unparsed |= authentication.unparsed; + return this; + } + + /** + * Authentication for the Elastic Cloud integration account. Exactly one method is set. + * + * @return authentication + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUTHENTICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ElasticCloudIntegrationAccountAuthentication getAuthentication() { + return authentication; + } + + public void setAuthentication(ElasticCloudIntegrationAccountAuthentication authentication) { + this.authentication = authentication; + if (authentication != null) { + this.unparsed |= authentication.unparsed; + } + } + + public ElasticCloudIntegrationAccountUpdateAttributes dataflows( + ElasticCloudIntegrationDataflows dataflows) { + this.dataflows = dataflows; + this.unparsed |= dataflows.unparsed; + return this; + } + + /** + * Dataflows for the Elastic Cloud integration account, keyed by dataflow id. + * + * @return dataflows + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATAFLOWS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ElasticCloudIntegrationDataflows getDataflows() { + return dataflows; + } + + public void setDataflows(ElasticCloudIntegrationDataflows dataflows) { + this.dataflows = dataflows; + if (dataflows != null) { + this.unparsed |= dataflows.unparsed; + } + } + + public ElasticCloudIntegrationAccountUpdateAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Human-readable name of the account. + * + * @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 ElasticCloudIntegrationAccountUpdateAttributes settings( + ElasticCloudIntegrationAccountSettingsUpdate settings) { + this.settings = settings; + this.unparsed |= settings.unparsed; + return this; + } + + /** + * Settings to update on the Elastic Cloud integration account. Only the fields provided are + * changed. + * + * @return settings + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SETTINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ElasticCloudIntegrationAccountSettingsUpdate getSettings() { + return settings; + } + + public void setSettings(ElasticCloudIntegrationAccountSettingsUpdate settings) { + this.settings = settings; + if (settings != null) { + this.unparsed |= settings.unparsed; + } + } + + /** + * 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 ElasticCloudIntegrationAccountUpdateAttributes + */ + @JsonAnySetter + public ElasticCloudIntegrationAccountUpdateAttributes 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 ElasticCloudIntegrationAccountUpdateAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ElasticCloudIntegrationAccountUpdateAttributes elasticCloudIntegrationAccountUpdateAttributes = + (ElasticCloudIntegrationAccountUpdateAttributes) o; + return Objects.equals( + this.authentication, elasticCloudIntegrationAccountUpdateAttributes.authentication) + && Objects.equals(this.dataflows, elasticCloudIntegrationAccountUpdateAttributes.dataflows) + && Objects.equals(this.name, elasticCloudIntegrationAccountUpdateAttributes.name) + && Objects.equals(this.settings, elasticCloudIntegrationAccountUpdateAttributes.settings) + && Objects.equals( + this.additionalProperties, + elasticCloudIntegrationAccountUpdateAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(authentication, dataflows, name, settings, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ElasticCloudIntegrationAccountUpdateAttributes {\n"); + sb.append(" authentication: ").append(toIndentedString(authentication)).append("\n"); + sb.append(" dataflows: ").append(toIndentedString(dataflows)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" settings: ").append(toIndentedString(settings)).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/ElasticCloudIntegrationAccountUpdateData.java b/src/main/java/com/datadog/api/client/v2/model/ElasticCloudIntegrationAccountUpdateData.java new file mode 100644 index 00000000000..eab7d5611f5 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ElasticCloudIntegrationAccountUpdateData.java @@ -0,0 +1,191 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data envelope for updating an Elastic Cloud integration account. */ +@JsonPropertyOrder({ + ElasticCloudIntegrationAccountUpdateData.JSON_PROPERTY_ATTRIBUTES, + ElasticCloudIntegrationAccountUpdateData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ElasticCloudIntegrationAccountUpdateData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private ElasticCloudIntegrationAccountUpdateAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IntegrationAccountType type = IntegrationAccountType.INTEGRATION_ACCOUNT; + + public ElasticCloudIntegrationAccountUpdateData() {} + + @JsonCreator + public ElasticCloudIntegrationAccountUpdateData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + ElasticCloudIntegrationAccountUpdateAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IntegrationAccountType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public ElasticCloudIntegrationAccountUpdateData attributes( + ElasticCloudIntegrationAccountUpdateAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Updatable attributes of an Elastic Cloud integration account. Every field is optional; only the + * fields provided are changed. When dataflows is provided, only the dataflow ids + * included in the request are modified; dataflows omitted from the map keep their current + * configuration. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ElasticCloudIntegrationAccountUpdateAttributes getAttributes() { + return attributes; + } + + public void setAttributes(ElasticCloudIntegrationAccountUpdateAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public ElasticCloudIntegrationAccountUpdateData type(IntegrationAccountType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The type of the integration account resource. Always integration-account. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IntegrationAccountType getType() { + return type; + } + + public void setType(IntegrationAccountType type) { + if (!type.isValid()) { + this.unparsed = true; + } + 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 ElasticCloudIntegrationAccountUpdateData + */ + @JsonAnySetter + public ElasticCloudIntegrationAccountUpdateData 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 ElasticCloudIntegrationAccountUpdateData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ElasticCloudIntegrationAccountUpdateData elasticCloudIntegrationAccountUpdateData = + (ElasticCloudIntegrationAccountUpdateData) o; + return Objects.equals(this.attributes, elasticCloudIntegrationAccountUpdateData.attributes) + && Objects.equals(this.type, elasticCloudIntegrationAccountUpdateData.type) + && Objects.equals( + this.additionalProperties, + elasticCloudIntegrationAccountUpdateData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ElasticCloudIntegrationAccountUpdateData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).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/ElasticCloudIntegrationAccountUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/ElasticCloudIntegrationAccountUpdateRequest.java new file mode 100644 index 00000000000..7e918905e9b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ElasticCloudIntegrationAccountUpdateRequest.java @@ -0,0 +1,154 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request payload to update an Elastic Cloud integration account as a partial merge. */ +@JsonPropertyOrder({ElasticCloudIntegrationAccountUpdateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ElasticCloudIntegrationAccountUpdateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private ElasticCloudIntegrationAccountUpdateData data; + + public ElasticCloudIntegrationAccountUpdateRequest() {} + + @JsonCreator + public ElasticCloudIntegrationAccountUpdateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + ElasticCloudIntegrationAccountUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public ElasticCloudIntegrationAccountUpdateRequest data( + ElasticCloudIntegrationAccountUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data envelope for updating an Elastic Cloud integration account. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public ElasticCloudIntegrationAccountUpdateData getData() { + return data; + } + + public void setData(ElasticCloudIntegrationAccountUpdateData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 ElasticCloudIntegrationAccountUpdateRequest + */ + @JsonAnySetter + public ElasticCloudIntegrationAccountUpdateRequest 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 ElasticCloudIntegrationAccountUpdateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ElasticCloudIntegrationAccountUpdateRequest elasticCloudIntegrationAccountUpdateRequest = + (ElasticCloudIntegrationAccountUpdateRequest) o; + return Objects.equals(this.data, elasticCloudIntegrationAccountUpdateRequest.data) + && Objects.equals( + this.additionalProperties, + elasticCloudIntegrationAccountUpdateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ElasticCloudIntegrationAccountUpdateRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).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/ElasticCloudIntegrationAccountsResponse.java b/src/main/java/com/datadog/api/client/v2/model/ElasticCloudIntegrationAccountsResponse.java new file mode 100644 index 00000000000..e5c77bc637c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ElasticCloudIntegrationAccountsResponse.java @@ -0,0 +1,161 @@ +/* + * 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; + +/** Response payload for a list of Elastic Cloud integration accounts. */ +@JsonPropertyOrder({ElasticCloudIntegrationAccountsResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ElasticCloudIntegrationAccountsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = null; + + public ElasticCloudIntegrationAccountsResponse data( + List data) { + this.data = data; + if (data != null) { + for (ElasticCloudIntegrationAccountData item : data) { + this.unparsed |= item.unparsed; + } + } + return this; + } + + public ElasticCloudIntegrationAccountsResponse addDataItem( + ElasticCloudIntegrationAccountData dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * List of Elastic Cloud integration accounts. + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + if (data != null) { + for (ElasticCloudIntegrationAccountData item : data) { + this.unparsed |= item.unparsed; + } + } + } + + /** + * 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 ElasticCloudIntegrationAccountsResponse + */ + @JsonAnySetter + public ElasticCloudIntegrationAccountsResponse 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 ElasticCloudIntegrationAccountsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ElasticCloudIntegrationAccountsResponse elasticCloudIntegrationAccountsResponse = + (ElasticCloudIntegrationAccountsResponse) o; + return Objects.equals(this.data, elasticCloudIntegrationAccountsResponse.data) + && Objects.equals( + this.additionalProperties, + elasticCloudIntegrationAccountsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ElasticCloudIntegrationAccountsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).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/ElasticCloudIntegrationDataflows.java b/src/main/java/com/datadog/api/client/v2/model/ElasticCloudIntegrationDataflows.java new file mode 100644 index 00000000000..06f61c29d1e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ElasticCloudIntegrationDataflows.java @@ -0,0 +1,366 @@ +/* + * 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.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.Objects; + +/** Dataflows for the Elastic Cloud integration account, keyed by dataflow id. */ +@JsonPropertyOrder({ + ElasticCloudIntegrationDataflows.JSON_PROPERTY_ELASTIC_CLOUD_DETAILED_INDEX_STATS, + ElasticCloudIntegrationDataflows.JSON_PROPERTY_ELASTIC_CLOUD_INDEX_STATS, + ElasticCloudIntegrationDataflows.JSON_PROPERTY_ELASTIC_CLOUD_METRICS, + ElasticCloudIntegrationDataflows.JSON_PROPERTY_ELASTIC_CLOUD_PENDING_TASK_STATS, + ElasticCloudIntegrationDataflows.JSON_PROPERTY_ELASTIC_CLOUD_PRIMARY_SHARD_GRACEFUL_TIMEOUT, + ElasticCloudIntegrationDataflows.JSON_PROPERTY_ELASTIC_CLOUD_PRIMARY_SHARD_STATS, + ElasticCloudIntegrationDataflows.JSON_PROPERTY_ELASTIC_CLOUD_SHARD_ALLOCATION_STATS, + ElasticCloudIntegrationDataflows.JSON_PROPERTY_ELASTIC_CLOUD_SLM_STATS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ElasticCloudIntegrationDataflows { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ELASTIC_CLOUD_DETAILED_INDEX_STATS = + "elastic-cloud-detailed-index-stats"; + private ElasticCloudDetailedIndexStatsIntegrationDataflow elasticCloudDetailedIndexStats; + + public static final String JSON_PROPERTY_ELASTIC_CLOUD_INDEX_STATS = "elastic-cloud-index-stats"; + private ElasticCloudIndexStatsIntegrationDataflow elasticCloudIndexStats; + + public static final String JSON_PROPERTY_ELASTIC_CLOUD_METRICS = "elastic-cloud-metrics"; + private ElasticCloudMetricsIntegrationDataflow elasticCloudMetrics; + + public static final String JSON_PROPERTY_ELASTIC_CLOUD_PENDING_TASK_STATS = + "elastic-cloud-pending-task-stats"; + private ElasticCloudPendingTaskStatsIntegrationDataflow elasticCloudPendingTaskStats; + + public static final String JSON_PROPERTY_ELASTIC_CLOUD_PRIMARY_SHARD_GRACEFUL_TIMEOUT = + "elastic-cloud-primary-shard-graceful-timeout"; + private ElasticCloudPrimaryShardGracefulTimeoutIntegrationDataflow + elasticCloudPrimaryShardGracefulTimeout; + + public static final String JSON_PROPERTY_ELASTIC_CLOUD_PRIMARY_SHARD_STATS = + "elastic-cloud-primary-shard-stats"; + private ElasticCloudPrimaryShardStatsIntegrationDataflow elasticCloudPrimaryShardStats; + + public static final String JSON_PROPERTY_ELASTIC_CLOUD_SHARD_ALLOCATION_STATS = + "elastic-cloud-shard-allocation-stats"; + private ElasticCloudShardAllocationStatsIntegrationDataflow elasticCloudShardAllocationStats; + + public static final String JSON_PROPERTY_ELASTIC_CLOUD_SLM_STATS = "elastic-cloud-slm-stats"; + private ElasticCloudSlmStatsIntegrationDataflow elasticCloudSlmStats; + + public ElasticCloudIntegrationDataflows elasticCloudDetailedIndexStats( + ElasticCloudDetailedIndexStatsIntegrationDataflow elasticCloudDetailedIndexStats) { + this.elasticCloudDetailedIndexStats = elasticCloudDetailedIndexStats; + this.unparsed |= elasticCloudDetailedIndexStats.unparsed; + return this; + } + + /** + * The Elastic Cloud detailed index stats dataflow. + * + * @return elasticCloudDetailedIndexStats + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ELASTIC_CLOUD_DETAILED_INDEX_STATS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ElasticCloudDetailedIndexStatsIntegrationDataflow getElasticCloudDetailedIndexStats() { + return elasticCloudDetailedIndexStats; + } + + public void setElasticCloudDetailedIndexStats( + ElasticCloudDetailedIndexStatsIntegrationDataflow elasticCloudDetailedIndexStats) { + this.elasticCloudDetailedIndexStats = elasticCloudDetailedIndexStats; + if (elasticCloudDetailedIndexStats != null) { + this.unparsed |= elasticCloudDetailedIndexStats.unparsed; + } + } + + public ElasticCloudIntegrationDataflows elasticCloudIndexStats( + ElasticCloudIndexStatsIntegrationDataflow elasticCloudIndexStats) { + this.elasticCloudIndexStats = elasticCloudIndexStats; + this.unparsed |= elasticCloudIndexStats.unparsed; + return this; + } + + /** + * The Elastic Cloud index stats dataflow. + * + * @return elasticCloudIndexStats + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ELASTIC_CLOUD_INDEX_STATS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ElasticCloudIndexStatsIntegrationDataflow getElasticCloudIndexStats() { + return elasticCloudIndexStats; + } + + public void setElasticCloudIndexStats( + ElasticCloudIndexStatsIntegrationDataflow elasticCloudIndexStats) { + this.elasticCloudIndexStats = elasticCloudIndexStats; + if (elasticCloudIndexStats != null) { + this.unparsed |= elasticCloudIndexStats.unparsed; + } + } + + public ElasticCloudIntegrationDataflows elasticCloudMetrics( + ElasticCloudMetricsIntegrationDataflow elasticCloudMetrics) { + this.elasticCloudMetrics = elasticCloudMetrics; + this.unparsed |= elasticCloudMetrics.unparsed; + return this; + } + + /** + * The Elastic Cloud metrics dataflow. + * + * @return elasticCloudMetrics + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ELASTIC_CLOUD_METRICS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ElasticCloudMetricsIntegrationDataflow getElasticCloudMetrics() { + return elasticCloudMetrics; + } + + public void setElasticCloudMetrics(ElasticCloudMetricsIntegrationDataflow elasticCloudMetrics) { + this.elasticCloudMetrics = elasticCloudMetrics; + if (elasticCloudMetrics != null) { + this.unparsed |= elasticCloudMetrics.unparsed; + } + } + + public ElasticCloudIntegrationDataflows elasticCloudPendingTaskStats( + ElasticCloudPendingTaskStatsIntegrationDataflow elasticCloudPendingTaskStats) { + this.elasticCloudPendingTaskStats = elasticCloudPendingTaskStats; + this.unparsed |= elasticCloudPendingTaskStats.unparsed; + return this; + } + + /** + * The Elastic Cloud pending task stats dataflow. + * + * @return elasticCloudPendingTaskStats + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ELASTIC_CLOUD_PENDING_TASK_STATS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ElasticCloudPendingTaskStatsIntegrationDataflow getElasticCloudPendingTaskStats() { + return elasticCloudPendingTaskStats; + } + + public void setElasticCloudPendingTaskStats( + ElasticCloudPendingTaskStatsIntegrationDataflow elasticCloudPendingTaskStats) { + this.elasticCloudPendingTaskStats = elasticCloudPendingTaskStats; + if (elasticCloudPendingTaskStats != null) { + this.unparsed |= elasticCloudPendingTaskStats.unparsed; + } + } + + public ElasticCloudIntegrationDataflows elasticCloudPrimaryShardGracefulTimeout( + ElasticCloudPrimaryShardGracefulTimeoutIntegrationDataflow + elasticCloudPrimaryShardGracefulTimeout) { + this.elasticCloudPrimaryShardGracefulTimeout = elasticCloudPrimaryShardGracefulTimeout; + this.unparsed |= elasticCloudPrimaryShardGracefulTimeout.unparsed; + return this; + } + + /** + * The Elastic Cloud primary shard graceful timeout dataflow. + * + * @return elasticCloudPrimaryShardGracefulTimeout + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ELASTIC_CLOUD_PRIMARY_SHARD_GRACEFUL_TIMEOUT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ElasticCloudPrimaryShardGracefulTimeoutIntegrationDataflow + getElasticCloudPrimaryShardGracefulTimeout() { + return elasticCloudPrimaryShardGracefulTimeout; + } + + public void setElasticCloudPrimaryShardGracefulTimeout( + ElasticCloudPrimaryShardGracefulTimeoutIntegrationDataflow + elasticCloudPrimaryShardGracefulTimeout) { + this.elasticCloudPrimaryShardGracefulTimeout = elasticCloudPrimaryShardGracefulTimeout; + if (elasticCloudPrimaryShardGracefulTimeout != null) { + this.unparsed |= elasticCloudPrimaryShardGracefulTimeout.unparsed; + } + } + + public ElasticCloudIntegrationDataflows elasticCloudPrimaryShardStats( + ElasticCloudPrimaryShardStatsIntegrationDataflow elasticCloudPrimaryShardStats) { + this.elasticCloudPrimaryShardStats = elasticCloudPrimaryShardStats; + this.unparsed |= elasticCloudPrimaryShardStats.unparsed; + return this; + } + + /** + * The Elastic Cloud primary shard stats dataflow. + * + * @return elasticCloudPrimaryShardStats + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ELASTIC_CLOUD_PRIMARY_SHARD_STATS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ElasticCloudPrimaryShardStatsIntegrationDataflow getElasticCloudPrimaryShardStats() { + return elasticCloudPrimaryShardStats; + } + + public void setElasticCloudPrimaryShardStats( + ElasticCloudPrimaryShardStatsIntegrationDataflow elasticCloudPrimaryShardStats) { + this.elasticCloudPrimaryShardStats = elasticCloudPrimaryShardStats; + if (elasticCloudPrimaryShardStats != null) { + this.unparsed |= elasticCloudPrimaryShardStats.unparsed; + } + } + + public ElasticCloudIntegrationDataflows elasticCloudShardAllocationStats( + ElasticCloudShardAllocationStatsIntegrationDataflow elasticCloudShardAllocationStats) { + this.elasticCloudShardAllocationStats = elasticCloudShardAllocationStats; + this.unparsed |= elasticCloudShardAllocationStats.unparsed; + return this; + } + + /** + * The Elastic Cloud shard allocation stats dataflow. + * + * @return elasticCloudShardAllocationStats + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ELASTIC_CLOUD_SHARD_ALLOCATION_STATS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ElasticCloudShardAllocationStatsIntegrationDataflow getElasticCloudShardAllocationStats() { + return elasticCloudShardAllocationStats; + } + + public void setElasticCloudShardAllocationStats( + ElasticCloudShardAllocationStatsIntegrationDataflow elasticCloudShardAllocationStats) { + this.elasticCloudShardAllocationStats = elasticCloudShardAllocationStats; + if (elasticCloudShardAllocationStats != null) { + this.unparsed |= elasticCloudShardAllocationStats.unparsed; + } + } + + public ElasticCloudIntegrationDataflows elasticCloudSlmStats( + ElasticCloudSlmStatsIntegrationDataflow elasticCloudSlmStats) { + this.elasticCloudSlmStats = elasticCloudSlmStats; + this.unparsed |= elasticCloudSlmStats.unparsed; + return this; + } + + /** + * The Elastic Cloud snapshot lifecycle management stats dataflow. + * + * @return elasticCloudSlmStats + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ELASTIC_CLOUD_SLM_STATS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public ElasticCloudSlmStatsIntegrationDataflow getElasticCloudSlmStats() { + return elasticCloudSlmStats; + } + + public void setElasticCloudSlmStats( + ElasticCloudSlmStatsIntegrationDataflow elasticCloudSlmStats) { + this.elasticCloudSlmStats = elasticCloudSlmStats; + if (elasticCloudSlmStats != null) { + this.unparsed |= elasticCloudSlmStats.unparsed; + } + } + + /** Return true if this ElasticCloudIntegrationDataflows object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ElasticCloudIntegrationDataflows elasticCloudIntegrationDataflows = + (ElasticCloudIntegrationDataflows) o; + return Objects.equals( + this.elasticCloudDetailedIndexStats, + elasticCloudIntegrationDataflows.elasticCloudDetailedIndexStats) + && Objects.equals( + this.elasticCloudIndexStats, elasticCloudIntegrationDataflows.elasticCloudIndexStats) + && Objects.equals( + this.elasticCloudMetrics, elasticCloudIntegrationDataflows.elasticCloudMetrics) + && Objects.equals( + this.elasticCloudPendingTaskStats, + elasticCloudIntegrationDataflows.elasticCloudPendingTaskStats) + && Objects.equals( + this.elasticCloudPrimaryShardGracefulTimeout, + elasticCloudIntegrationDataflows.elasticCloudPrimaryShardGracefulTimeout) + && Objects.equals( + this.elasticCloudPrimaryShardStats, + elasticCloudIntegrationDataflows.elasticCloudPrimaryShardStats) + && Objects.equals( + this.elasticCloudShardAllocationStats, + elasticCloudIntegrationDataflows.elasticCloudShardAllocationStats) + && Objects.equals( + this.elasticCloudSlmStats, elasticCloudIntegrationDataflows.elasticCloudSlmStats); + } + + @Override + public int hashCode() { + return Objects.hash( + elasticCloudDetailedIndexStats, + elasticCloudIndexStats, + elasticCloudMetrics, + elasticCloudPendingTaskStats, + elasticCloudPrimaryShardGracefulTimeout, + elasticCloudPrimaryShardStats, + elasticCloudShardAllocationStats, + elasticCloudSlmStats); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ElasticCloudIntegrationDataflows {\n"); + sb.append(" elasticCloudDetailedIndexStats: ") + .append(toIndentedString(elasticCloudDetailedIndexStats)) + .append("\n"); + sb.append(" elasticCloudIndexStats: ") + .append(toIndentedString(elasticCloudIndexStats)) + .append("\n"); + sb.append(" elasticCloudMetrics: ") + .append(toIndentedString(elasticCloudMetrics)) + .append("\n"); + sb.append(" elasticCloudPendingTaskStats: ") + .append(toIndentedString(elasticCloudPendingTaskStats)) + .append("\n"); + sb.append(" elasticCloudPrimaryShardGracefulTimeout: ") + .append(toIndentedString(elasticCloudPrimaryShardGracefulTimeout)) + .append("\n"); + sb.append(" elasticCloudPrimaryShardStats: ") + .append(toIndentedString(elasticCloudPrimaryShardStats)) + .append("\n"); + sb.append(" elasticCloudShardAllocationStats: ") + .append(toIndentedString(elasticCloudShardAllocationStats)) + .append("\n"); + sb.append(" elasticCloudSlmStats: ") + .append(toIndentedString(elasticCloudSlmStats)) + .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/ElasticCloudMetricsIntegrationDataflow.java b/src/main/java/com/datadog/api/client/v2/model/ElasticCloudMetricsIntegrationDataflow.java new file mode 100644 index 00000000000..b93a982fb61 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ElasticCloudMetricsIntegrationDataflow.java @@ -0,0 +1,157 @@ +/* + * 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 Elastic Cloud metrics dataflow. */ +@JsonPropertyOrder({ + ElasticCloudMetricsIntegrationDataflow.JSON_PROPERTY_ENABLED, + ElasticCloudMetricsIntegrationDataflow.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ElasticCloudMetricsIntegrationDataflow { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_STATUS = "status"; + private IntegrationAccountDataflowStatus status; + + public ElasticCloudMetricsIntegrationDataflow enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether the dataflow is enabled. + * + * @return enabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + /** + * Read-only collection status of a dataflow. + * + * @return status + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IntegrationAccountDataflowStatus getStatus() { + return status; + } + + /** + * 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 ElasticCloudMetricsIntegrationDataflow + */ + @JsonAnySetter + public ElasticCloudMetricsIntegrationDataflow 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 ElasticCloudMetricsIntegrationDataflow object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ElasticCloudMetricsIntegrationDataflow elasticCloudMetricsIntegrationDataflow = + (ElasticCloudMetricsIntegrationDataflow) o; + return Objects.equals(this.enabled, elasticCloudMetricsIntegrationDataflow.enabled) + && Objects.equals(this.status, elasticCloudMetricsIntegrationDataflow.status) + && Objects.equals( + this.additionalProperties, elasticCloudMetricsIntegrationDataflow.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ElasticCloudMetricsIntegrationDataflow {\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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/ElasticCloudPendingTaskStatsIntegrationDataflow.java b/src/main/java/com/datadog/api/client/v2/model/ElasticCloudPendingTaskStatsIntegrationDataflow.java new file mode 100644 index 00000000000..908034c8384 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ElasticCloudPendingTaskStatsIntegrationDataflow.java @@ -0,0 +1,160 @@ +/* + * 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 Elastic Cloud pending task stats dataflow. */ +@JsonPropertyOrder({ + ElasticCloudPendingTaskStatsIntegrationDataflow.JSON_PROPERTY_ENABLED, + ElasticCloudPendingTaskStatsIntegrationDataflow.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ElasticCloudPendingTaskStatsIntegrationDataflow { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_STATUS = "status"; + private IntegrationAccountDataflowStatus status; + + public ElasticCloudPendingTaskStatsIntegrationDataflow enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether the dataflow is enabled. + * + * @return enabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + /** + * Read-only collection status of a dataflow. + * + * @return status + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IntegrationAccountDataflowStatus getStatus() { + return status; + } + + /** + * 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 ElasticCloudPendingTaskStatsIntegrationDataflow + */ + @JsonAnySetter + public ElasticCloudPendingTaskStatsIntegrationDataflow 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 ElasticCloudPendingTaskStatsIntegrationDataflow object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ElasticCloudPendingTaskStatsIntegrationDataflow + elasticCloudPendingTaskStatsIntegrationDataflow = + (ElasticCloudPendingTaskStatsIntegrationDataflow) o; + return Objects.equals(this.enabled, elasticCloudPendingTaskStatsIntegrationDataflow.enabled) + && Objects.equals(this.status, elasticCloudPendingTaskStatsIntegrationDataflow.status) + && Objects.equals( + this.additionalProperties, + elasticCloudPendingTaskStatsIntegrationDataflow.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ElasticCloudPendingTaskStatsIntegrationDataflow {\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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/ElasticCloudPrimaryShardGracefulTimeoutIntegrationDataflow.java b/src/main/java/com/datadog/api/client/v2/model/ElasticCloudPrimaryShardGracefulTimeoutIntegrationDataflow.java new file mode 100644 index 00000000000..a0c4894518d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ElasticCloudPrimaryShardGracefulTimeoutIntegrationDataflow.java @@ -0,0 +1,165 @@ +/* + * 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 Elastic Cloud primary shard graceful timeout dataflow. */ +@JsonPropertyOrder({ + ElasticCloudPrimaryShardGracefulTimeoutIntegrationDataflow.JSON_PROPERTY_ENABLED, + ElasticCloudPrimaryShardGracefulTimeoutIntegrationDataflow.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ElasticCloudPrimaryShardGracefulTimeoutIntegrationDataflow { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_STATUS = "status"; + private IntegrationAccountDataflowStatus status; + + public ElasticCloudPrimaryShardGracefulTimeoutIntegrationDataflow enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether the dataflow is enabled. + * + * @return enabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + /** + * Read-only collection status of a dataflow. + * + * @return status + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IntegrationAccountDataflowStatus getStatus() { + return status; + } + + /** + * 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 ElasticCloudPrimaryShardGracefulTimeoutIntegrationDataflow + */ + @JsonAnySetter + public ElasticCloudPrimaryShardGracefulTimeoutIntegrationDataflow 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 ElasticCloudPrimaryShardGracefulTimeoutIntegrationDataflow object is equal + * to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ElasticCloudPrimaryShardGracefulTimeoutIntegrationDataflow + elasticCloudPrimaryShardGracefulTimeoutIntegrationDataflow = + (ElasticCloudPrimaryShardGracefulTimeoutIntegrationDataflow) o; + return Objects.equals( + this.enabled, elasticCloudPrimaryShardGracefulTimeoutIntegrationDataflow.enabled) + && Objects.equals( + this.status, elasticCloudPrimaryShardGracefulTimeoutIntegrationDataflow.status) + && Objects.equals( + this.additionalProperties, + elasticCloudPrimaryShardGracefulTimeoutIntegrationDataflow.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ElasticCloudPrimaryShardGracefulTimeoutIntegrationDataflow {\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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/ElasticCloudPrimaryShardStatsIntegrationDataflow.java b/src/main/java/com/datadog/api/client/v2/model/ElasticCloudPrimaryShardStatsIntegrationDataflow.java new file mode 100644 index 00000000000..077d07f86cb --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ElasticCloudPrimaryShardStatsIntegrationDataflow.java @@ -0,0 +1,160 @@ +/* + * 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 Elastic Cloud primary shard stats dataflow. */ +@JsonPropertyOrder({ + ElasticCloudPrimaryShardStatsIntegrationDataflow.JSON_PROPERTY_ENABLED, + ElasticCloudPrimaryShardStatsIntegrationDataflow.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ElasticCloudPrimaryShardStatsIntegrationDataflow { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_STATUS = "status"; + private IntegrationAccountDataflowStatus status; + + public ElasticCloudPrimaryShardStatsIntegrationDataflow enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether the dataflow is enabled. + * + * @return enabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + /** + * Read-only collection status of a dataflow. + * + * @return status + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IntegrationAccountDataflowStatus getStatus() { + return status; + } + + /** + * 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 ElasticCloudPrimaryShardStatsIntegrationDataflow + */ + @JsonAnySetter + public ElasticCloudPrimaryShardStatsIntegrationDataflow 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 ElasticCloudPrimaryShardStatsIntegrationDataflow object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ElasticCloudPrimaryShardStatsIntegrationDataflow + elasticCloudPrimaryShardStatsIntegrationDataflow = + (ElasticCloudPrimaryShardStatsIntegrationDataflow) o; + return Objects.equals(this.enabled, elasticCloudPrimaryShardStatsIntegrationDataflow.enabled) + && Objects.equals(this.status, elasticCloudPrimaryShardStatsIntegrationDataflow.status) + && Objects.equals( + this.additionalProperties, + elasticCloudPrimaryShardStatsIntegrationDataflow.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ElasticCloudPrimaryShardStatsIntegrationDataflow {\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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/ElasticCloudShardAllocationStatsIntegrationDataflow.java b/src/main/java/com/datadog/api/client/v2/model/ElasticCloudShardAllocationStatsIntegrationDataflow.java new file mode 100644 index 00000000000..98923e4129e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ElasticCloudShardAllocationStatsIntegrationDataflow.java @@ -0,0 +1,162 @@ +/* + * 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 Elastic Cloud shard allocation stats dataflow. */ +@JsonPropertyOrder({ + ElasticCloudShardAllocationStatsIntegrationDataflow.JSON_PROPERTY_ENABLED, + ElasticCloudShardAllocationStatsIntegrationDataflow.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ElasticCloudShardAllocationStatsIntegrationDataflow { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_STATUS = "status"; + private IntegrationAccountDataflowStatus status; + + public ElasticCloudShardAllocationStatsIntegrationDataflow enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether the dataflow is enabled. + * + * @return enabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + /** + * Read-only collection status of a dataflow. + * + * @return status + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IntegrationAccountDataflowStatus getStatus() { + return status; + } + + /** + * 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 ElasticCloudShardAllocationStatsIntegrationDataflow + */ + @JsonAnySetter + public ElasticCloudShardAllocationStatsIntegrationDataflow 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 ElasticCloudShardAllocationStatsIntegrationDataflow object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ElasticCloudShardAllocationStatsIntegrationDataflow + elasticCloudShardAllocationStatsIntegrationDataflow = + (ElasticCloudShardAllocationStatsIntegrationDataflow) o; + return Objects.equals(this.enabled, elasticCloudShardAllocationStatsIntegrationDataflow.enabled) + && Objects.equals(this.status, elasticCloudShardAllocationStatsIntegrationDataflow.status) + && Objects.equals( + this.additionalProperties, + elasticCloudShardAllocationStatsIntegrationDataflow.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ElasticCloudShardAllocationStatsIntegrationDataflow {\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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/ElasticCloudSlmStatsIntegrationDataflow.java b/src/main/java/com/datadog/api/client/v2/model/ElasticCloudSlmStatsIntegrationDataflow.java new file mode 100644 index 00000000000..04379c192e3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/ElasticCloudSlmStatsIntegrationDataflow.java @@ -0,0 +1,158 @@ +/* + * 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 Elastic Cloud snapshot lifecycle management stats dataflow. */ +@JsonPropertyOrder({ + ElasticCloudSlmStatsIntegrationDataflow.JSON_PROPERTY_ENABLED, + ElasticCloudSlmStatsIntegrationDataflow.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class ElasticCloudSlmStatsIntegrationDataflow { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_STATUS = "status"; + private IntegrationAccountDataflowStatus status; + + public ElasticCloudSlmStatsIntegrationDataflow enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether the dataflow is enabled. + * + * @return enabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + /** + * Read-only collection status of a dataflow. + * + * @return status + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IntegrationAccountDataflowStatus getStatus() { + return status; + } + + /** + * 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 ElasticCloudSlmStatsIntegrationDataflow + */ + @JsonAnySetter + public ElasticCloudSlmStatsIntegrationDataflow 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 ElasticCloudSlmStatsIntegrationDataflow object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ElasticCloudSlmStatsIntegrationDataflow elasticCloudSlmStatsIntegrationDataflow = + (ElasticCloudSlmStatsIntegrationDataflow) o; + return Objects.equals(this.enabled, elasticCloudSlmStatsIntegrationDataflow.enabled) + && Objects.equals(this.status, elasticCloudSlmStatsIntegrationDataflow.status) + && Objects.equals( + this.additionalProperties, + elasticCloudSlmStatsIntegrationDataflow.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ElasticCloudSlmStatsIntegrationDataflow {\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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/IntegrationAccountBasicAuth.java b/src/main/java/com/datadog/api/client/v2/model/IntegrationAccountBasicAuth.java new file mode 100644 index 00000000000..22b1811c0e6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IntegrationAccountBasicAuth.java @@ -0,0 +1,208 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Username and password authentication. */ +@JsonPropertyOrder({ + IntegrationAccountBasicAuth.JSON_PROPERTY_PASSWORD, + IntegrationAccountBasicAuth.JSON_PROPERTY_TYPE, + IntegrationAccountBasicAuth.JSON_PROPERTY_USERNAME +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IntegrationAccountBasicAuth { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_PASSWORD = "password"; + private String password; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IntegrationAccountBasicAuthType type = IntegrationAccountBasicAuthType.BASIC; + + public static final String JSON_PROPERTY_USERNAME = "username"; + private String username; + + public IntegrationAccountBasicAuth() {} + + @JsonCreator + public IntegrationAccountBasicAuth( + @JsonProperty(required = true, value = JSON_PROPERTY_PASSWORD) String password, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + IntegrationAccountBasicAuthType type, + @JsonProperty(required = true, value = JSON_PROPERTY_USERNAME) String username) { + this.password = password; + this.type = type; + this.unparsed |= !type.isValid(); + this.username = username; + } + + public IntegrationAccountBasicAuth password(String password) { + this.password = password; + return this; + } + + /** + * Secret password or private key. This field is not returned by the API. + * + * @return password + */ + @JsonProperty(JSON_PROPERTY_PASSWORD) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public IntegrationAccountBasicAuth type(IntegrationAccountBasicAuthType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The authentication method type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IntegrationAccountBasicAuthType getType() { + return type; + } + + public void setType(IntegrationAccountBasicAuthType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + public IntegrationAccountBasicAuth username(String username) { + this.username = username; + return this; + } + + /** + * Non-secret username or public identifier for the credential pair. + * + * @return username + */ + @JsonProperty(JSON_PROPERTY_USERNAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + /** + * 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 IntegrationAccountBasicAuth + */ + @JsonAnySetter + public IntegrationAccountBasicAuth 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 IntegrationAccountBasicAuth object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IntegrationAccountBasicAuth integrationAccountBasicAuth = (IntegrationAccountBasicAuth) o; + return Objects.equals(this.password, integrationAccountBasicAuth.password) + && Objects.equals(this.type, integrationAccountBasicAuth.type) + && Objects.equals(this.username, integrationAccountBasicAuth.username) + && Objects.equals( + this.additionalProperties, integrationAccountBasicAuth.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(password, type, username, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IntegrationAccountBasicAuth {\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).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/IntegrationAccountBasicAuthType.java b/src/main/java/com/datadog/api/client/v2/model/IntegrationAccountBasicAuthType.java new file mode 100644 index 00000000000..ba57e4c4a6d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IntegrationAccountBasicAuthType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The authentication method type. */ +@JsonSerialize( + using = IntegrationAccountBasicAuthType.IntegrationAccountBasicAuthTypeSerializer.class) +public class IntegrationAccountBasicAuthType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("basic")); + + public static final IntegrationAccountBasicAuthType BASIC = + new IntegrationAccountBasicAuthType("basic"); + + IntegrationAccountBasicAuthType(String value) { + super(value, allowedValues); + } + + public static class IntegrationAccountBasicAuthTypeSerializer + extends StdSerializer { + public IntegrationAccountBasicAuthTypeSerializer(Class t) { + super(t); + } + + public IntegrationAccountBasicAuthTypeSerializer() { + this(null); + } + + @Override + public void serialize( + IntegrationAccountBasicAuthType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IntegrationAccountBasicAuthType fromValue(String value) { + return new IntegrationAccountBasicAuthType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IntegrationAccountDataflowHealth.java b/src/main/java/com/datadog/api/client/v2/model/IntegrationAccountDataflowHealth.java new file mode 100644 index 00000000000..2f426a777d8 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IntegrationAccountDataflowHealth.java @@ -0,0 +1,63 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Collection health of a single dataflow. */ +@JsonSerialize( + using = IntegrationAccountDataflowHealth.IntegrationAccountDataflowHealthSerializer.class) +public class IntegrationAccountDataflowHealth extends ModelEnum { + + private static final Set allowedValues = + new HashSet( + Arrays.asList("DATAFLOW_HEALTH_OK", "DATAFLOW_HEALTH_BROKEN", "DATAFLOW_HEALTH_UNKNOWN")); + + public static final IntegrationAccountDataflowHealth OK = + new IntegrationAccountDataflowHealth("DATAFLOW_HEALTH_OK"); + public static final IntegrationAccountDataflowHealth BROKEN = + new IntegrationAccountDataflowHealth("DATAFLOW_HEALTH_BROKEN"); + public static final IntegrationAccountDataflowHealth UNKNOWN = + new IntegrationAccountDataflowHealth("DATAFLOW_HEALTH_UNKNOWN"); + + IntegrationAccountDataflowHealth(String value) { + super(value, allowedValues); + } + + public static class IntegrationAccountDataflowHealthSerializer + extends StdSerializer { + public IntegrationAccountDataflowHealthSerializer(Class t) { + super(t); + } + + public IntegrationAccountDataflowHealthSerializer() { + this(null); + } + + @Override + public void serialize( + IntegrationAccountDataflowHealth value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IntegrationAccountDataflowHealth fromValue(String value) { + return new IntegrationAccountDataflowHealth(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/IntegrationAccountDataflowStatus.java b/src/main/java/com/datadog/api/client/v2/model/IntegrationAccountDataflowStatus.java new file mode 100644 index 00000000000..0b0238c7412 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IntegrationAccountDataflowStatus.java @@ -0,0 +1,198 @@ +/* + * 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.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Read-only collection status of a dataflow. */ +@JsonPropertyOrder({ + IntegrationAccountDataflowStatus.JSON_PROPERTY_HEALTH, + IntegrationAccountDataflowStatus.JSON_PROPERTY_MESSAGE, + IntegrationAccountDataflowStatus.JSON_PROPERTY_UPDATED_AT +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IntegrationAccountDataflowStatus { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_HEALTH = "health"; + private IntegrationAccountDataflowHealth health; + + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; + private OffsetDateTime updatedAt; + + public IntegrationAccountDataflowStatus health(IntegrationAccountDataflowHealth health) { + this.health = health; + this.unparsed |= !health.isValid(); + return this; + } + + /** + * Collection health of a single dataflow. + * + * @return health + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_HEALTH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IntegrationAccountDataflowHealth getHealth() { + return health; + } + + public void setHealth(IntegrationAccountDataflowHealth health) { + if (!health.isValid()) { + this.unparsed = true; + } + this.health = health; + } + + public IntegrationAccountDataflowStatus message(String message) { + this.message = message; + return this; + } + + /** + * Human-readable detail, populated when the dataflow is not healthy. + * + * @return message + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public IntegrationAccountDataflowStatus updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Time the status was last computed. + * + * @return updatedAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_UPDATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + /** + * 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 IntegrationAccountDataflowStatus + */ + @JsonAnySetter + public IntegrationAccountDataflowStatus 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 IntegrationAccountDataflowStatus object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IntegrationAccountDataflowStatus integrationAccountDataflowStatus = + (IntegrationAccountDataflowStatus) o; + return Objects.equals(this.health, integrationAccountDataflowStatus.health) + && Objects.equals(this.message, integrationAccountDataflowStatus.message) + && Objects.equals(this.updatedAt, integrationAccountDataflowStatus.updatedAt) + && Objects.equals( + this.additionalProperties, integrationAccountDataflowStatus.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(health, message, updatedAt, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IntegrationAccountDataflowStatus {\n"); + sb.append(" health: ").append(toIndentedString(health)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).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/IntegrationAccountPermissions.java b/src/main/java/com/datadog/api/client/v2/model/IntegrationAccountPermissions.java new file mode 100644 index 00000000000..4b0ad776c52 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IntegrationAccountPermissions.java @@ -0,0 +1,147 @@ +/* + * 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; + +/** Read-only permission information for the account, derived from its restriction policy. */ +@JsonPropertyOrder({ + IntegrationAccountPermissions.JSON_PROPERTY_RESOURCE_ID, + IntegrationAccountPermissions.JSON_PROPERTY_USER_CAN_EDIT +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class IntegrationAccountPermissions { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_RESOURCE_ID = "resource_id"; + private String resourceId; + + public static final String JSON_PROPERTY_USER_CAN_EDIT = "user_can_edit"; + private Boolean userCanEdit; + + /** + * Restriction-policy resource identifier of this account. + * + * @return resourceId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RESOURCE_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getResourceId() { + return resourceId; + } + + /** + * Whether the requesting user may edit this account. + * + * @return userCanEdit + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USER_CAN_EDIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getUserCanEdit() { + return userCanEdit; + } + + /** + * 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 IntegrationAccountPermissions + */ + @JsonAnySetter + public IntegrationAccountPermissions 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 IntegrationAccountPermissions object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IntegrationAccountPermissions integrationAccountPermissions = (IntegrationAccountPermissions) o; + return Objects.equals(this.resourceId, integrationAccountPermissions.resourceId) + && Objects.equals(this.userCanEdit, integrationAccountPermissions.userCanEdit) + && Objects.equals( + this.additionalProperties, integrationAccountPermissions.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(resourceId, userCanEdit, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IntegrationAccountPermissions {\n"); + sb.append(" resourceId: ").append(toIndentedString(resourceId)).append("\n"); + sb.append(" userCanEdit: ").append(toIndentedString(userCanEdit)).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/IntegrationAccountType.java b/src/main/java/com/datadog/api/client/v2/model/IntegrationAccountType.java new file mode 100644 index 00000000000..e90bafeb807 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/IntegrationAccountType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** The type of the integration account resource. Always integration-account. */ +@JsonSerialize(using = IntegrationAccountType.IntegrationAccountTypeSerializer.class) +public class IntegrationAccountType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("integration-account")); + + public static final IntegrationAccountType INTEGRATION_ACCOUNT = + new IntegrationAccountType("integration-account"); + + IntegrationAccountType(String value) { + super(value, allowedValues); + } + + public static class IntegrationAccountTypeSerializer + extends StdSerializer { + public IntegrationAccountTypeSerializer(Class t) { + super(t); + } + + public IntegrationAccountTypeSerializer() { + this(null); + } + + @Override + public void serialize( + IntegrationAccountType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static IntegrationAccountType fromValue(String value) { + return new IntegrationAccountType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/TwilioAlertsLogsIntegrationDataflow.java b/src/main/java/com/datadog/api/client/v2/model/TwilioAlertsLogsIntegrationDataflow.java new file mode 100644 index 00000000000..af65b446d9e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TwilioAlertsLogsIntegrationDataflow.java @@ -0,0 +1,157 @@ +/* + * 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 Twilio alert logs dataflow. */ +@JsonPropertyOrder({ + TwilioAlertsLogsIntegrationDataflow.JSON_PROPERTY_ENABLED, + TwilioAlertsLogsIntegrationDataflow.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TwilioAlertsLogsIntegrationDataflow { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_STATUS = "status"; + private IntegrationAccountDataflowStatus status; + + public TwilioAlertsLogsIntegrationDataflow enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether the dataflow is enabled. + * + * @return enabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + /** + * Read-only collection status of a dataflow. + * + * @return status + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IntegrationAccountDataflowStatus getStatus() { + return status; + } + + /** + * 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 TwilioAlertsLogsIntegrationDataflow + */ + @JsonAnySetter + public TwilioAlertsLogsIntegrationDataflow 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 TwilioAlertsLogsIntegrationDataflow object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TwilioAlertsLogsIntegrationDataflow twilioAlertsLogsIntegrationDataflow = + (TwilioAlertsLogsIntegrationDataflow) o; + return Objects.equals(this.enabled, twilioAlertsLogsIntegrationDataflow.enabled) + && Objects.equals(this.status, twilioAlertsLogsIntegrationDataflow.status) + && Objects.equals( + this.additionalProperties, twilioAlertsLogsIntegrationDataflow.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TwilioAlertsLogsIntegrationDataflow {\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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/TwilioCallSummariesLogsIntegrationDataflow.java b/src/main/java/com/datadog/api/client/v2/model/TwilioCallSummariesLogsIntegrationDataflow.java new file mode 100644 index 00000000000..21ff8c0b190 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TwilioCallSummariesLogsIntegrationDataflow.java @@ -0,0 +1,159 @@ +/* + * 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 Twilio call summaries logs dataflow. */ +@JsonPropertyOrder({ + TwilioCallSummariesLogsIntegrationDataflow.JSON_PROPERTY_ENABLED, + TwilioCallSummariesLogsIntegrationDataflow.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TwilioCallSummariesLogsIntegrationDataflow { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_STATUS = "status"; + private IntegrationAccountDataflowStatus status; + + public TwilioCallSummariesLogsIntegrationDataflow enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether the dataflow is enabled. + * + * @return enabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + /** + * Read-only collection status of a dataflow. + * + * @return status + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IntegrationAccountDataflowStatus getStatus() { + return status; + } + + /** + * 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 TwilioCallSummariesLogsIntegrationDataflow + */ + @JsonAnySetter + public TwilioCallSummariesLogsIntegrationDataflow 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 TwilioCallSummariesLogsIntegrationDataflow object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TwilioCallSummariesLogsIntegrationDataflow twilioCallSummariesLogsIntegrationDataflow = + (TwilioCallSummariesLogsIntegrationDataflow) o; + return Objects.equals(this.enabled, twilioCallSummariesLogsIntegrationDataflow.enabled) + && Objects.equals(this.status, twilioCallSummariesLogsIntegrationDataflow.status) + && Objects.equals( + this.additionalProperties, + twilioCallSummariesLogsIntegrationDataflow.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TwilioCallSummariesLogsIntegrationDataflow {\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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/TwilioCloudCostMetricsIntegrationDataflow.java b/src/main/java/com/datadog/api/client/v2/model/TwilioCloudCostMetricsIntegrationDataflow.java new file mode 100644 index 00000000000..058fbc30145 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TwilioCloudCostMetricsIntegrationDataflow.java @@ -0,0 +1,158 @@ +/* + * 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 Twilio cloud cost metrics dataflow. */ +@JsonPropertyOrder({ + TwilioCloudCostMetricsIntegrationDataflow.JSON_PROPERTY_ENABLED, + TwilioCloudCostMetricsIntegrationDataflow.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TwilioCloudCostMetricsIntegrationDataflow { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_STATUS = "status"; + private IntegrationAccountDataflowStatus status; + + public TwilioCloudCostMetricsIntegrationDataflow enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether the dataflow is enabled. + * + * @return enabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + /** + * Read-only collection status of a dataflow. + * + * @return status + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IntegrationAccountDataflowStatus getStatus() { + return status; + } + + /** + * 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 TwilioCloudCostMetricsIntegrationDataflow + */ + @JsonAnySetter + public TwilioCloudCostMetricsIntegrationDataflow 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 TwilioCloudCostMetricsIntegrationDataflow object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TwilioCloudCostMetricsIntegrationDataflow twilioCloudCostMetricsIntegrationDataflow = + (TwilioCloudCostMetricsIntegrationDataflow) o; + return Objects.equals(this.enabled, twilioCloudCostMetricsIntegrationDataflow.enabled) + && Objects.equals(this.status, twilioCloudCostMetricsIntegrationDataflow.status) + && Objects.equals( + this.additionalProperties, + twilioCloudCostMetricsIntegrationDataflow.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TwilioCloudCostMetricsIntegrationDataflow {\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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/TwilioEventsLogsIntegrationDataflow.java b/src/main/java/com/datadog/api/client/v2/model/TwilioEventsLogsIntegrationDataflow.java new file mode 100644 index 00000000000..e1f461c15fc --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TwilioEventsLogsIntegrationDataflow.java @@ -0,0 +1,157 @@ +/* + * 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 Twilio event logs dataflow. */ +@JsonPropertyOrder({ + TwilioEventsLogsIntegrationDataflow.JSON_PROPERTY_ENABLED, + TwilioEventsLogsIntegrationDataflow.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TwilioEventsLogsIntegrationDataflow { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_STATUS = "status"; + private IntegrationAccountDataflowStatus status; + + public TwilioEventsLogsIntegrationDataflow enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether the dataflow is enabled. + * + * @return enabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + /** + * Read-only collection status of a dataflow. + * + * @return status + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IntegrationAccountDataflowStatus getStatus() { + return status; + } + + /** + * 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 TwilioEventsLogsIntegrationDataflow + */ + @JsonAnySetter + public TwilioEventsLogsIntegrationDataflow 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 TwilioEventsLogsIntegrationDataflow object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TwilioEventsLogsIntegrationDataflow twilioEventsLogsIntegrationDataflow = + (TwilioEventsLogsIntegrationDataflow) o; + return Objects.equals(this.enabled, twilioEventsLogsIntegrationDataflow.enabled) + && Objects.equals(this.status, twilioEventsLogsIntegrationDataflow.status) + && Objects.equals( + this.additionalProperties, twilioEventsLogsIntegrationDataflow.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TwilioEventsLogsIntegrationDataflow {\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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/TwilioIntegrationAccountAttributes.java b/src/main/java/com/datadog/api/client/v2/model/TwilioIntegrationAccountAttributes.java new file mode 100644 index 00000000000..bf8457cbffb --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TwilioIntegrationAccountAttributes.java @@ -0,0 +1,263 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes of a Twilio integration account. */ +@JsonPropertyOrder({ + TwilioIntegrationAccountAttributes.JSON_PROPERTY_AUTHENTICATION, + TwilioIntegrationAccountAttributes.JSON_PROPERTY_DATAFLOWS, + TwilioIntegrationAccountAttributes.JSON_PROPERTY_NAME, + TwilioIntegrationAccountAttributes.JSON_PROPERTY_PERMISSIONS, + TwilioIntegrationAccountAttributes.JSON_PROPERTY_SETTINGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TwilioIntegrationAccountAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AUTHENTICATION = "authentication"; + private TwilioIntegrationAccountAuthentication authentication; + + public static final String JSON_PROPERTY_DATAFLOWS = "dataflows"; + private TwilioIntegrationDataflows dataflows; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_PERMISSIONS = "permissions"; + private IntegrationAccountPermissions permissions; + + public static final String JSON_PROPERTY_SETTINGS = "settings"; + private TwilioIntegrationAccountSettings settings; + + public TwilioIntegrationAccountAttributes() {} + + @JsonCreator + public TwilioIntegrationAccountAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_AUTHENTICATION) + TwilioIntegrationAccountAuthentication authentication, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name) { + this.authentication = authentication; + this.unparsed |= authentication.unparsed; + this.name = name; + } + + public TwilioIntegrationAccountAttributes authentication( + TwilioIntegrationAccountAuthentication authentication) { + this.authentication = authentication; + this.unparsed |= authentication.unparsed; + return this; + } + + /** + * Authentication for the Twilio integration account. Exactly one method is set. + * + * @return authentication + */ + @JsonProperty(JSON_PROPERTY_AUTHENTICATION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TwilioIntegrationAccountAuthentication getAuthentication() { + return authentication; + } + + public void setAuthentication(TwilioIntegrationAccountAuthentication authentication) { + this.authentication = authentication; + if (authentication != null) { + this.unparsed |= authentication.unparsed; + } + } + + public TwilioIntegrationAccountAttributes dataflows(TwilioIntegrationDataflows dataflows) { + this.dataflows = dataflows; + this.unparsed |= dataflows.unparsed; + return this; + } + + /** + * Dataflows for the Twilio integration account, keyed by dataflow id. + * + * @return dataflows + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATAFLOWS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TwilioIntegrationDataflows getDataflows() { + return dataflows; + } + + public void setDataflows(TwilioIntegrationDataflows dataflows) { + this.dataflows = dataflows; + if (dataflows != null) { + this.unparsed |= dataflows.unparsed; + } + } + + public TwilioIntegrationAccountAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Human-readable name of the account. + * + * @return name + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + /** + * Read-only permission information for the account, derived from its restriction policy. + * + * @return permissions + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PERMISSIONS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IntegrationAccountPermissions getPermissions() { + return permissions; + } + + public TwilioIntegrationAccountAttributes settings(TwilioIntegrationAccountSettings settings) { + this.settings = settings; + this.unparsed |= settings.unparsed; + return this; + } + + /** + * Settings for the Twilio integration account. + * + * @return settings + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SETTINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TwilioIntegrationAccountSettings getSettings() { + return settings; + } + + public void setSettings(TwilioIntegrationAccountSettings settings) { + this.settings = settings; + if (settings != null) { + this.unparsed |= settings.unparsed; + } + } + + /** + * 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 TwilioIntegrationAccountAttributes + */ + @JsonAnySetter + public TwilioIntegrationAccountAttributes 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 TwilioIntegrationAccountAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TwilioIntegrationAccountAttributes twilioIntegrationAccountAttributes = + (TwilioIntegrationAccountAttributes) o; + return Objects.equals(this.authentication, twilioIntegrationAccountAttributes.authentication) + && Objects.equals(this.dataflows, twilioIntegrationAccountAttributes.dataflows) + && Objects.equals(this.name, twilioIntegrationAccountAttributes.name) + && Objects.equals(this.permissions, twilioIntegrationAccountAttributes.permissions) + && Objects.equals(this.settings, twilioIntegrationAccountAttributes.settings) + && Objects.equals( + this.additionalProperties, twilioIntegrationAccountAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + authentication, dataflows, name, permissions, settings, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TwilioIntegrationAccountAttributes {\n"); + sb.append(" authentication: ").append(toIndentedString(authentication)).append("\n"); + sb.append(" dataflows: ").append(toIndentedString(dataflows)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" permissions: ").append(toIndentedString(permissions)).append("\n"); + sb.append(" settings: ").append(toIndentedString(settings)).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/TwilioIntegrationAccountAuthentication.java b/src/main/java/com/datadog/api/client/v2/model/TwilioIntegrationAccountAuthentication.java new file mode 100644 index 00000000000..2077fa9122e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TwilioIntegrationAccountAuthentication.java @@ -0,0 +1,225 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.JSON; +import com.datadog.api.client.UnparsedObject; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import jakarta.ws.rs.core.GenericType; +import java.io.IOException; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; + +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonDeserialize( + using = + TwilioIntegrationAccountAuthentication.TwilioIntegrationAccountAuthenticationDeserializer + .class) +@JsonSerialize( + using = + TwilioIntegrationAccountAuthentication.TwilioIntegrationAccountAuthenticationSerializer + .class) +public class TwilioIntegrationAccountAuthentication extends AbstractOpenApiSchema { + private static final Logger log = + Logger.getLogger(TwilioIntegrationAccountAuthentication.class.getName()); + + @JsonIgnore public boolean unparsed = false; + + public static class TwilioIntegrationAccountAuthenticationSerializer + extends StdSerializer { + public TwilioIntegrationAccountAuthenticationSerializer( + Class t) { + super(t); + } + + public TwilioIntegrationAccountAuthenticationSerializer() { + this(null); + } + + @Override + public void serialize( + TwilioIntegrationAccountAuthentication value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class TwilioIntegrationAccountAuthenticationDeserializer + extends StdDeserializer { + public TwilioIntegrationAccountAuthenticationDeserializer() { + this(TwilioIntegrationAccountAuthentication.class); + } + + public TwilioIntegrationAccountAuthenticationDeserializer(Class vc) { + super(vc); + } + + @Override + public TwilioIntegrationAccountAuthentication deserialize( + JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + Object tmp = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize IntegrationAccountBasicAuth + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (IntegrationAccountBasicAuth.class.equals(Integer.class) + || IntegrationAccountBasicAuth.class.equals(Long.class) + || IntegrationAccountBasicAuth.class.equals(Float.class) + || IntegrationAccountBasicAuth.class.equals(Double.class) + || IntegrationAccountBasicAuth.class.equals(Boolean.class) + || IntegrationAccountBasicAuth.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((IntegrationAccountBasicAuth.class.equals(Integer.class) + || IntegrationAccountBasicAuth.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((IntegrationAccountBasicAuth.class.equals(Float.class) + || IntegrationAccountBasicAuth.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (IntegrationAccountBasicAuth.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (IntegrationAccountBasicAuth.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(IntegrationAccountBasicAuth.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((IntegrationAccountBasicAuth) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'IntegrationAccountBasicAuth'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'IntegrationAccountBasicAuth'", e); + } + + TwilioIntegrationAccountAuthentication ret = new TwilioIntegrationAccountAuthentication(); + if (match == 1) { + ret.setActualInstance(deserialized); + } else { + Map res = + new ObjectMapper() + .readValue( + tree.traverse(jp.getCodec()).readValueAsTree().toString(), + new TypeReference>() {}); + ret.setActualInstance(new UnparsedObject(res)); + } + return ret; + } + + /** Handle deserialization of the 'null' value. */ + @Override + public TwilioIntegrationAccountAuthentication getNullValue(DeserializationContext ctxt) + throws JsonMappingException { + throw new JsonMappingException( + ctxt.getParser(), "TwilioIntegrationAccountAuthentication cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public TwilioIntegrationAccountAuthentication() { + super("oneOf", Boolean.FALSE); + } + + public TwilioIntegrationAccountAuthentication(IntegrationAccountBasicAuth o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("IntegrationAccountBasicAuth", new GenericType() {}); + JSON.registerDescendants( + TwilioIntegrationAccountAuthentication.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map getSchemas() { + return TwilioIntegrationAccountAuthentication.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: IntegrationAccountBasicAuth + * + *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be a + * composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(IntegrationAccountBasicAuth.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + throw new RuntimeException("Invalid instance type. Must be IntegrationAccountBasicAuth"); + } + + /** + * Get the actual instance, which can be the following: IntegrationAccountBasicAuth + * + * @return The actual instance (IntegrationAccountBasicAuth) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `IntegrationAccountBasicAuth`. If the actual instance is not + * `IntegrationAccountBasicAuth`, the ClassCastException will be thrown. + * + * @return The actual instance of `IntegrationAccountBasicAuth` + * @throws ClassCastException if the instance is not `IntegrationAccountBasicAuth` + */ + public IntegrationAccountBasicAuth getIntegrationAccountBasicAuth() throws ClassCastException { + return (IntegrationAccountBasicAuth) super.getActualInstance(); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/TwilioIntegrationAccountCreateData.java b/src/main/java/com/datadog/api/client/v2/model/TwilioIntegrationAccountCreateData.java new file mode 100644 index 00000000000..d1c23f0633d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TwilioIntegrationAccountCreateData.java @@ -0,0 +1,187 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data envelope for creating a Twilio integration account. */ +@JsonPropertyOrder({ + TwilioIntegrationAccountCreateData.JSON_PROPERTY_ATTRIBUTES, + TwilioIntegrationAccountCreateData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TwilioIntegrationAccountCreateData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private TwilioIntegrationAccountAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IntegrationAccountType type = IntegrationAccountType.INTEGRATION_ACCOUNT; + + public TwilioIntegrationAccountCreateData() {} + + @JsonCreator + public TwilioIntegrationAccountCreateData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + TwilioIntegrationAccountAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IntegrationAccountType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public TwilioIntegrationAccountCreateData attributes( + TwilioIntegrationAccountAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a Twilio integration account. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TwilioIntegrationAccountAttributes getAttributes() { + return attributes; + } + + public void setAttributes(TwilioIntegrationAccountAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public TwilioIntegrationAccountCreateData type(IntegrationAccountType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The type of the integration account resource. Always integration-account. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IntegrationAccountType getType() { + return type; + } + + public void setType(IntegrationAccountType type) { + if (!type.isValid()) { + this.unparsed = true; + } + 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 TwilioIntegrationAccountCreateData + */ + @JsonAnySetter + public TwilioIntegrationAccountCreateData 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 TwilioIntegrationAccountCreateData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TwilioIntegrationAccountCreateData twilioIntegrationAccountCreateData = + (TwilioIntegrationAccountCreateData) o; + return Objects.equals(this.attributes, twilioIntegrationAccountCreateData.attributes) + && Objects.equals(this.type, twilioIntegrationAccountCreateData.type) + && Objects.equals( + this.additionalProperties, twilioIntegrationAccountCreateData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TwilioIntegrationAccountCreateData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).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/TwilioIntegrationAccountData.java b/src/main/java/com/datadog/api/client/v2/model/TwilioIntegrationAccountData.java new file mode 100644 index 00000000000..0bf7d2e50f9 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TwilioIntegrationAccountData.java @@ -0,0 +1,204 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data envelope of a Twilio integration account, including server-assigned identity. */ +@JsonPropertyOrder({ + TwilioIntegrationAccountData.JSON_PROPERTY_ATTRIBUTES, + TwilioIntegrationAccountData.JSON_PROPERTY_ID, + TwilioIntegrationAccountData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TwilioIntegrationAccountData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private TwilioIntegrationAccountAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IntegrationAccountType type = IntegrationAccountType.INTEGRATION_ACCOUNT; + + public TwilioIntegrationAccountData() {} + + @JsonCreator + public TwilioIntegrationAccountData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + TwilioIntegrationAccountAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IntegrationAccountType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public TwilioIntegrationAccountData attributes(TwilioIntegrationAccountAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a Twilio integration account. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TwilioIntegrationAccountAttributes getAttributes() { + return attributes; + } + + public void setAttributes(TwilioIntegrationAccountAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + /** + * Server-generated unique identifier of the integration account. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public TwilioIntegrationAccountData type(IntegrationAccountType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The type of the integration account resource. Always integration-account. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IntegrationAccountType getType() { + return type; + } + + public void setType(IntegrationAccountType type) { + if (!type.isValid()) { + this.unparsed = true; + } + 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 TwilioIntegrationAccountData + */ + @JsonAnySetter + public TwilioIntegrationAccountData 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 TwilioIntegrationAccountData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TwilioIntegrationAccountData twilioIntegrationAccountData = (TwilioIntegrationAccountData) o; + return Objects.equals(this.attributes, twilioIntegrationAccountData.attributes) + && Objects.equals(this.id, twilioIntegrationAccountData.id) + && Objects.equals(this.type, twilioIntegrationAccountData.type) + && Objects.equals( + this.additionalProperties, twilioIntegrationAccountData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TwilioIntegrationAccountData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).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/TwilioIntegrationAccountRequest.java b/src/main/java/com/datadog/api/client/v2/model/TwilioIntegrationAccountRequest.java new file mode 100644 index 00000000000..ff96397652c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TwilioIntegrationAccountRequest.java @@ -0,0 +1,151 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request payload to create a Twilio integration account. */ +@JsonPropertyOrder({TwilioIntegrationAccountRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TwilioIntegrationAccountRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private TwilioIntegrationAccountCreateData data; + + public TwilioIntegrationAccountRequest() {} + + @JsonCreator + public TwilioIntegrationAccountRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + TwilioIntegrationAccountCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public TwilioIntegrationAccountRequest data(TwilioIntegrationAccountCreateData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data envelope for creating a Twilio integration account. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TwilioIntegrationAccountCreateData getData() { + return data; + } + + public void setData(TwilioIntegrationAccountCreateData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 TwilioIntegrationAccountRequest + */ + @JsonAnySetter + public TwilioIntegrationAccountRequest 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 TwilioIntegrationAccountRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TwilioIntegrationAccountRequest twilioIntegrationAccountRequest = + (TwilioIntegrationAccountRequest) o; + return Objects.equals(this.data, twilioIntegrationAccountRequest.data) + && Objects.equals( + this.additionalProperties, twilioIntegrationAccountRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TwilioIntegrationAccountRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).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/TwilioIntegrationAccountResponse.java b/src/main/java/com/datadog/api/client/v2/model/TwilioIntegrationAccountResponse.java new file mode 100644 index 00000000000..99c9689cc2e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TwilioIntegrationAccountResponse.java @@ -0,0 +1,141 @@ +/* + * 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; + +/** Response payload for a single Twilio integration account. */ +@JsonPropertyOrder({TwilioIntegrationAccountResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TwilioIntegrationAccountResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private TwilioIntegrationAccountData data; + + public TwilioIntegrationAccountResponse data(TwilioIntegrationAccountData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data envelope of a Twilio integration account, including server-assigned identity. + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TwilioIntegrationAccountData getData() { + return data; + } + + public void setData(TwilioIntegrationAccountData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 TwilioIntegrationAccountResponse + */ + @JsonAnySetter + public TwilioIntegrationAccountResponse 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 TwilioIntegrationAccountResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TwilioIntegrationAccountResponse twilioIntegrationAccountResponse = + (TwilioIntegrationAccountResponse) o; + return Objects.equals(this.data, twilioIntegrationAccountResponse.data) + && Objects.equals( + this.additionalProperties, twilioIntegrationAccountResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TwilioIntegrationAccountResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).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/TwilioIntegrationAccountSettings.java b/src/main/java/com/datadog/api/client/v2/model/TwilioIntegrationAccountSettings.java new file mode 100644 index 00000000000..f3b2f037bca --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TwilioIntegrationAccountSettings.java @@ -0,0 +1,175 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Settings for the Twilio integration account. */ +@JsonPropertyOrder({ + TwilioIntegrationAccountSettings.JSON_PROPERTY_ACCOUNT_SID, + TwilioIntegrationAccountSettings.JSON_PROPERTY_CENSOR_LOGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TwilioIntegrationAccountSettings { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ACCOUNT_SID = "account_sid"; + private String accountSid; + + public static final String JSON_PROPERTY_CENSOR_LOGS = "censor_logs"; + private Boolean censorLogs; + + public TwilioIntegrationAccountSettings() {} + + @JsonCreator + public TwilioIntegrationAccountSettings( + @JsonProperty(required = true, value = JSON_PROPERTY_ACCOUNT_SID) String accountSid) { + this.accountSid = accountSid; + } + + public TwilioIntegrationAccountSettings accountSid(String accountSid) { + this.accountSid = accountSid; + return this; + } + + /** + * Twilio Account SID that uniquely identifies your Twilio account. + * + * @return accountSid + */ + @JsonProperty(JSON_PROPERTY_ACCOUNT_SID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getAccountSid() { + return accountSid; + } + + public void setAccountSid(String accountSid) { + this.accountSid = accountSid; + } + + public TwilioIntegrationAccountSettings censorLogs(Boolean censorLogs) { + this.censorLogs = censorLogs; + return this; + } + + /** + * When enabled, phone numbers in the to field and SMS message bodies are censored + * for privacy. + * + * @return censorLogs + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CENSOR_LOGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getCensorLogs() { + return censorLogs; + } + + public void setCensorLogs(Boolean censorLogs) { + this.censorLogs = censorLogs; + } + + /** + * 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 TwilioIntegrationAccountSettings + */ + @JsonAnySetter + public TwilioIntegrationAccountSettings 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 TwilioIntegrationAccountSettings object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TwilioIntegrationAccountSettings twilioIntegrationAccountSettings = + (TwilioIntegrationAccountSettings) o; + return Objects.equals(this.accountSid, twilioIntegrationAccountSettings.accountSid) + && Objects.equals(this.censorLogs, twilioIntegrationAccountSettings.censorLogs) + && Objects.equals( + this.additionalProperties, twilioIntegrationAccountSettings.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(accountSid, censorLogs, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TwilioIntegrationAccountSettings {\n"); + sb.append(" accountSid: ").append(toIndentedString(accountSid)).append("\n"); + sb.append(" censorLogs: ").append(toIndentedString(censorLogs)).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/TwilioIntegrationAccountSettingsUpdate.java b/src/main/java/com/datadog/api/client/v2/model/TwilioIntegrationAccountSettingsUpdate.java new file mode 100644 index 00000000000..656124ab29e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TwilioIntegrationAccountSettingsUpdate.java @@ -0,0 +1,167 @@ +/* + * 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; + +/** Settings to update on the Twilio integration account. Only the fields provided are changed. */ +@JsonPropertyOrder({ + TwilioIntegrationAccountSettingsUpdate.JSON_PROPERTY_ACCOUNT_SID, + TwilioIntegrationAccountSettingsUpdate.JSON_PROPERTY_CENSOR_LOGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TwilioIntegrationAccountSettingsUpdate { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ACCOUNT_SID = "account_sid"; + private String accountSid; + + public static final String JSON_PROPERTY_CENSOR_LOGS = "censor_logs"; + private Boolean censorLogs; + + public TwilioIntegrationAccountSettingsUpdate accountSid(String accountSid) { + this.accountSid = accountSid; + return this; + } + + /** + * Twilio Account SID that uniquely identifies your Twilio account. + * + * @return accountSid + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACCOUNT_SID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAccountSid() { + return accountSid; + } + + public void setAccountSid(String accountSid) { + this.accountSid = accountSid; + } + + public TwilioIntegrationAccountSettingsUpdate censorLogs(Boolean censorLogs) { + this.censorLogs = censorLogs; + return this; + } + + /** + * When enabled, phone numbers in the to field and SMS message bodies are censored + * for privacy. + * + * @return censorLogs + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CENSOR_LOGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getCensorLogs() { + return censorLogs; + } + + public void setCensorLogs(Boolean censorLogs) { + this.censorLogs = censorLogs; + } + + /** + * 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 TwilioIntegrationAccountSettingsUpdate + */ + @JsonAnySetter + public TwilioIntegrationAccountSettingsUpdate 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 TwilioIntegrationAccountSettingsUpdate object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TwilioIntegrationAccountSettingsUpdate twilioIntegrationAccountSettingsUpdate = + (TwilioIntegrationAccountSettingsUpdate) o; + return Objects.equals(this.accountSid, twilioIntegrationAccountSettingsUpdate.accountSid) + && Objects.equals(this.censorLogs, twilioIntegrationAccountSettingsUpdate.censorLogs) + && Objects.equals( + this.additionalProperties, twilioIntegrationAccountSettingsUpdate.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(accountSid, censorLogs, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TwilioIntegrationAccountSettingsUpdate {\n"); + sb.append(" accountSid: ").append(toIndentedString(accountSid)).append("\n"); + sb.append(" censorLogs: ").append(toIndentedString(censorLogs)).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/TwilioIntegrationAccountUpdateAttributes.java b/src/main/java/com/datadog/api/client/v2/model/TwilioIntegrationAccountUpdateAttributes.java new file mode 100644 index 00000000000..050551122a1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TwilioIntegrationAccountUpdateAttributes.java @@ -0,0 +1,240 @@ +/* + * 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; + +/** + * Updatable attributes of a Twilio integration account. Every field is optional; only the fields + * provided are changed. When dataflows is provided, only the dataflow ids included in + * the request are modified; dataflows omitted from the map keep their current configuration. + */ +@JsonPropertyOrder({ + TwilioIntegrationAccountUpdateAttributes.JSON_PROPERTY_AUTHENTICATION, + TwilioIntegrationAccountUpdateAttributes.JSON_PROPERTY_DATAFLOWS, + TwilioIntegrationAccountUpdateAttributes.JSON_PROPERTY_NAME, + TwilioIntegrationAccountUpdateAttributes.JSON_PROPERTY_SETTINGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TwilioIntegrationAccountUpdateAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AUTHENTICATION = "authentication"; + private TwilioIntegrationAccountAuthentication authentication; + + public static final String JSON_PROPERTY_DATAFLOWS = "dataflows"; + private TwilioIntegrationDataflows dataflows; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_SETTINGS = "settings"; + private TwilioIntegrationAccountSettingsUpdate settings; + + public TwilioIntegrationAccountUpdateAttributes authentication( + TwilioIntegrationAccountAuthentication authentication) { + this.authentication = authentication; + this.unparsed |= authentication.unparsed; + return this; + } + + /** + * Authentication for the Twilio integration account. Exactly one method is set. + * + * @return authentication + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUTHENTICATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TwilioIntegrationAccountAuthentication getAuthentication() { + return authentication; + } + + public void setAuthentication(TwilioIntegrationAccountAuthentication authentication) { + this.authentication = authentication; + if (authentication != null) { + this.unparsed |= authentication.unparsed; + } + } + + public TwilioIntegrationAccountUpdateAttributes dataflows(TwilioIntegrationDataflows dataflows) { + this.dataflows = dataflows; + this.unparsed |= dataflows.unparsed; + return this; + } + + /** + * Dataflows for the Twilio integration account, keyed by dataflow id. + * + * @return dataflows + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATAFLOWS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TwilioIntegrationDataflows getDataflows() { + return dataflows; + } + + public void setDataflows(TwilioIntegrationDataflows dataflows) { + this.dataflows = dataflows; + if (dataflows != null) { + this.unparsed |= dataflows.unparsed; + } + } + + public TwilioIntegrationAccountUpdateAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Human-readable name of the account. + * + * @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 TwilioIntegrationAccountUpdateAttributes settings( + TwilioIntegrationAccountSettingsUpdate settings) { + this.settings = settings; + this.unparsed |= settings.unparsed; + return this; + } + + /** + * Settings to update on the Twilio integration account. Only the fields provided are changed. + * + * @return settings + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SETTINGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TwilioIntegrationAccountSettingsUpdate getSettings() { + return settings; + } + + public void setSettings(TwilioIntegrationAccountSettingsUpdate settings) { + this.settings = settings; + if (settings != null) { + this.unparsed |= settings.unparsed; + } + } + + /** + * 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 TwilioIntegrationAccountUpdateAttributes + */ + @JsonAnySetter + public TwilioIntegrationAccountUpdateAttributes 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 TwilioIntegrationAccountUpdateAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TwilioIntegrationAccountUpdateAttributes twilioIntegrationAccountUpdateAttributes = + (TwilioIntegrationAccountUpdateAttributes) o; + return Objects.equals( + this.authentication, twilioIntegrationAccountUpdateAttributes.authentication) + && Objects.equals(this.dataflows, twilioIntegrationAccountUpdateAttributes.dataflows) + && Objects.equals(this.name, twilioIntegrationAccountUpdateAttributes.name) + && Objects.equals(this.settings, twilioIntegrationAccountUpdateAttributes.settings) + && Objects.equals( + this.additionalProperties, + twilioIntegrationAccountUpdateAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(authentication, dataflows, name, settings, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TwilioIntegrationAccountUpdateAttributes {\n"); + sb.append(" authentication: ").append(toIndentedString(authentication)).append("\n"); + sb.append(" dataflows: ").append(toIndentedString(dataflows)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" settings: ").append(toIndentedString(settings)).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/TwilioIntegrationAccountUpdateData.java b/src/main/java/com/datadog/api/client/v2/model/TwilioIntegrationAccountUpdateData.java new file mode 100644 index 00000000000..941f94bc7ee --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TwilioIntegrationAccountUpdateData.java @@ -0,0 +1,189 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data envelope for updating a Twilio integration account. */ +@JsonPropertyOrder({ + TwilioIntegrationAccountUpdateData.JSON_PROPERTY_ATTRIBUTES, + TwilioIntegrationAccountUpdateData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TwilioIntegrationAccountUpdateData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private TwilioIntegrationAccountUpdateAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private IntegrationAccountType type = IntegrationAccountType.INTEGRATION_ACCOUNT; + + public TwilioIntegrationAccountUpdateData() {} + + @JsonCreator + public TwilioIntegrationAccountUpdateData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + TwilioIntegrationAccountUpdateAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) IntegrationAccountType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public TwilioIntegrationAccountUpdateData attributes( + TwilioIntegrationAccountUpdateAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Updatable attributes of a Twilio integration account. Every field is optional; only the fields + * provided are changed. When dataflows is provided, only the dataflow ids included + * in the request are modified; dataflows omitted from the map keep their current configuration. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TwilioIntegrationAccountUpdateAttributes getAttributes() { + return attributes; + } + + public void setAttributes(TwilioIntegrationAccountUpdateAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public TwilioIntegrationAccountUpdateData type(IntegrationAccountType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * The type of the integration account resource. Always integration-account. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public IntegrationAccountType getType() { + return type; + } + + public void setType(IntegrationAccountType type) { + if (!type.isValid()) { + this.unparsed = true; + } + 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 TwilioIntegrationAccountUpdateData + */ + @JsonAnySetter + public TwilioIntegrationAccountUpdateData 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 TwilioIntegrationAccountUpdateData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TwilioIntegrationAccountUpdateData twilioIntegrationAccountUpdateData = + (TwilioIntegrationAccountUpdateData) o; + return Objects.equals(this.attributes, twilioIntegrationAccountUpdateData.attributes) + && Objects.equals(this.type, twilioIntegrationAccountUpdateData.type) + && Objects.equals( + this.additionalProperties, twilioIntegrationAccountUpdateData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TwilioIntegrationAccountUpdateData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).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/TwilioIntegrationAccountUpdateRequest.java b/src/main/java/com/datadog/api/client/v2/model/TwilioIntegrationAccountUpdateRequest.java new file mode 100644 index 00000000000..4d78c42f2f2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TwilioIntegrationAccountUpdateRequest.java @@ -0,0 +1,151 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request payload to update a Twilio integration account as a partial merge. */ +@JsonPropertyOrder({TwilioIntegrationAccountUpdateRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TwilioIntegrationAccountUpdateRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private TwilioIntegrationAccountUpdateData data; + + public TwilioIntegrationAccountUpdateRequest() {} + + @JsonCreator + public TwilioIntegrationAccountUpdateRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + TwilioIntegrationAccountUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public TwilioIntegrationAccountUpdateRequest data(TwilioIntegrationAccountUpdateData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data envelope for updating a Twilio integration account. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public TwilioIntegrationAccountUpdateData getData() { + return data; + } + + public void setData(TwilioIntegrationAccountUpdateData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * 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 TwilioIntegrationAccountUpdateRequest + */ + @JsonAnySetter + public TwilioIntegrationAccountUpdateRequest 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 TwilioIntegrationAccountUpdateRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TwilioIntegrationAccountUpdateRequest twilioIntegrationAccountUpdateRequest = + (TwilioIntegrationAccountUpdateRequest) o; + return Objects.equals(this.data, twilioIntegrationAccountUpdateRequest.data) + && Objects.equals( + this.additionalProperties, twilioIntegrationAccountUpdateRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TwilioIntegrationAccountUpdateRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).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/TwilioIntegrationAccountsResponse.java b/src/main/java/com/datadog/api/client/v2/model/TwilioIntegrationAccountsResponse.java new file mode 100644 index 00000000000..54ef8a5fce9 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TwilioIntegrationAccountsResponse.java @@ -0,0 +1,158 @@ +/* + * 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; + +/** Response payload for a list of Twilio integration accounts. */ +@JsonPropertyOrder({TwilioIntegrationAccountsResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TwilioIntegrationAccountsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = null; + + public TwilioIntegrationAccountsResponse data(List data) { + this.data = data; + if (data != null) { + for (TwilioIntegrationAccountData item : data) { + this.unparsed |= item.unparsed; + } + } + return this; + } + + public TwilioIntegrationAccountsResponse addDataItem(TwilioIntegrationAccountData dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * List of Twilio integration accounts. + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + if (data != null) { + for (TwilioIntegrationAccountData item : data) { + this.unparsed |= item.unparsed; + } + } + } + + /** + * 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 TwilioIntegrationAccountsResponse + */ + @JsonAnySetter + public TwilioIntegrationAccountsResponse 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 TwilioIntegrationAccountsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TwilioIntegrationAccountsResponse twilioIntegrationAccountsResponse = + (TwilioIntegrationAccountsResponse) o; + return Objects.equals(this.data, twilioIntegrationAccountsResponse.data) + && Objects.equals( + this.additionalProperties, twilioIntegrationAccountsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TwilioIntegrationAccountsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).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/TwilioIntegrationDataflows.java b/src/main/java/com/datadog/api/client/v2/model/TwilioIntegrationDataflows.java new file mode 100644 index 00000000000..e4346e9e280 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TwilioIntegrationDataflows.java @@ -0,0 +1,230 @@ +/* + * 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.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.Objects; + +/** Dataflows for the Twilio integration account, keyed by dataflow id. */ +@JsonPropertyOrder({ + TwilioIntegrationDataflows.JSON_PROPERTY_TWILIO_ALERTS_LOGS, + TwilioIntegrationDataflows.JSON_PROPERTY_TWILIO_CALL_SUMMARIES_LOGS, + TwilioIntegrationDataflows.JSON_PROPERTY_TWILIO_CLOUD_COST_METRICS, + TwilioIntegrationDataflows.JSON_PROPERTY_TWILIO_EVENTS_LOGS, + TwilioIntegrationDataflows.JSON_PROPERTY_TWILIO_MESSAGES_LOGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TwilioIntegrationDataflows { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_TWILIO_ALERTS_LOGS = "twilio-alerts-logs"; + private TwilioAlertsLogsIntegrationDataflow twilioAlertsLogs; + + public static final String JSON_PROPERTY_TWILIO_CALL_SUMMARIES_LOGS = + "twilio-call-summaries-logs"; + private TwilioCallSummariesLogsIntegrationDataflow twilioCallSummariesLogs; + + public static final String JSON_PROPERTY_TWILIO_CLOUD_COST_METRICS = "twilio-cloud-cost-metrics"; + private TwilioCloudCostMetricsIntegrationDataflow twilioCloudCostMetrics; + + public static final String JSON_PROPERTY_TWILIO_EVENTS_LOGS = "twilio-events-logs"; + private TwilioEventsLogsIntegrationDataflow twilioEventsLogs; + + public static final String JSON_PROPERTY_TWILIO_MESSAGES_LOGS = "twilio-messages-logs"; + private TwilioMessagesLogsIntegrationDataflow twilioMessagesLogs; + + public TwilioIntegrationDataflows twilioAlertsLogs( + TwilioAlertsLogsIntegrationDataflow twilioAlertsLogs) { + this.twilioAlertsLogs = twilioAlertsLogs; + this.unparsed |= twilioAlertsLogs.unparsed; + return this; + } + + /** + * The Twilio alert logs dataflow. + * + * @return twilioAlertsLogs + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TWILIO_ALERTS_LOGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TwilioAlertsLogsIntegrationDataflow getTwilioAlertsLogs() { + return twilioAlertsLogs; + } + + public void setTwilioAlertsLogs(TwilioAlertsLogsIntegrationDataflow twilioAlertsLogs) { + this.twilioAlertsLogs = twilioAlertsLogs; + if (twilioAlertsLogs != null) { + this.unparsed |= twilioAlertsLogs.unparsed; + } + } + + public TwilioIntegrationDataflows twilioCallSummariesLogs( + TwilioCallSummariesLogsIntegrationDataflow twilioCallSummariesLogs) { + this.twilioCallSummariesLogs = twilioCallSummariesLogs; + this.unparsed |= twilioCallSummariesLogs.unparsed; + return this; + } + + /** + * The Twilio call summaries logs dataflow. + * + * @return twilioCallSummariesLogs + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TWILIO_CALL_SUMMARIES_LOGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TwilioCallSummariesLogsIntegrationDataflow getTwilioCallSummariesLogs() { + return twilioCallSummariesLogs; + } + + public void setTwilioCallSummariesLogs( + TwilioCallSummariesLogsIntegrationDataflow twilioCallSummariesLogs) { + this.twilioCallSummariesLogs = twilioCallSummariesLogs; + if (twilioCallSummariesLogs != null) { + this.unparsed |= twilioCallSummariesLogs.unparsed; + } + } + + public TwilioIntegrationDataflows twilioCloudCostMetrics( + TwilioCloudCostMetricsIntegrationDataflow twilioCloudCostMetrics) { + this.twilioCloudCostMetrics = twilioCloudCostMetrics; + this.unparsed |= twilioCloudCostMetrics.unparsed; + return this; + } + + /** + * The Twilio cloud cost metrics dataflow. + * + * @return twilioCloudCostMetrics + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TWILIO_CLOUD_COST_METRICS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TwilioCloudCostMetricsIntegrationDataflow getTwilioCloudCostMetrics() { + return twilioCloudCostMetrics; + } + + public void setTwilioCloudCostMetrics( + TwilioCloudCostMetricsIntegrationDataflow twilioCloudCostMetrics) { + this.twilioCloudCostMetrics = twilioCloudCostMetrics; + if (twilioCloudCostMetrics != null) { + this.unparsed |= twilioCloudCostMetrics.unparsed; + } + } + + public TwilioIntegrationDataflows twilioEventsLogs( + TwilioEventsLogsIntegrationDataflow twilioEventsLogs) { + this.twilioEventsLogs = twilioEventsLogs; + this.unparsed |= twilioEventsLogs.unparsed; + return this; + } + + /** + * The Twilio event logs dataflow. + * + * @return twilioEventsLogs + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TWILIO_EVENTS_LOGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TwilioEventsLogsIntegrationDataflow getTwilioEventsLogs() { + return twilioEventsLogs; + } + + public void setTwilioEventsLogs(TwilioEventsLogsIntegrationDataflow twilioEventsLogs) { + this.twilioEventsLogs = twilioEventsLogs; + if (twilioEventsLogs != null) { + this.unparsed |= twilioEventsLogs.unparsed; + } + } + + public TwilioIntegrationDataflows twilioMessagesLogs( + TwilioMessagesLogsIntegrationDataflow twilioMessagesLogs) { + this.twilioMessagesLogs = twilioMessagesLogs; + this.unparsed |= twilioMessagesLogs.unparsed; + return this; + } + + /** + * The Twilio messages logs dataflow. + * + * @return twilioMessagesLogs + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TWILIO_MESSAGES_LOGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public TwilioMessagesLogsIntegrationDataflow getTwilioMessagesLogs() { + return twilioMessagesLogs; + } + + public void setTwilioMessagesLogs(TwilioMessagesLogsIntegrationDataflow twilioMessagesLogs) { + this.twilioMessagesLogs = twilioMessagesLogs; + if (twilioMessagesLogs != null) { + this.unparsed |= twilioMessagesLogs.unparsed; + } + } + + /** Return true if this TwilioIntegrationDataflows object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TwilioIntegrationDataflows twilioIntegrationDataflows = (TwilioIntegrationDataflows) o; + return Objects.equals(this.twilioAlertsLogs, twilioIntegrationDataflows.twilioAlertsLogs) + && Objects.equals( + this.twilioCallSummariesLogs, twilioIntegrationDataflows.twilioCallSummariesLogs) + && Objects.equals( + this.twilioCloudCostMetrics, twilioIntegrationDataflows.twilioCloudCostMetrics) + && Objects.equals(this.twilioEventsLogs, twilioIntegrationDataflows.twilioEventsLogs) + && Objects.equals(this.twilioMessagesLogs, twilioIntegrationDataflows.twilioMessagesLogs); + } + + @Override + public int hashCode() { + return Objects.hash( + twilioAlertsLogs, + twilioCallSummariesLogs, + twilioCloudCostMetrics, + twilioEventsLogs, + twilioMessagesLogs); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TwilioIntegrationDataflows {\n"); + sb.append(" twilioAlertsLogs: ").append(toIndentedString(twilioAlertsLogs)).append("\n"); + sb.append(" twilioCallSummariesLogs: ") + .append(toIndentedString(twilioCallSummariesLogs)) + .append("\n"); + sb.append(" twilioCloudCostMetrics: ") + .append(toIndentedString(twilioCloudCostMetrics)) + .append("\n"); + sb.append(" twilioEventsLogs: ").append(toIndentedString(twilioEventsLogs)).append("\n"); + sb.append(" twilioMessagesLogs: ").append(toIndentedString(twilioMessagesLogs)).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/TwilioMessagesLogsIntegrationDataflow.java b/src/main/java/com/datadog/api/client/v2/model/TwilioMessagesLogsIntegrationDataflow.java new file mode 100644 index 00000000000..284a2e403a9 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/TwilioMessagesLogsIntegrationDataflow.java @@ -0,0 +1,157 @@ +/* + * 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 Twilio messages logs dataflow. */ +@JsonPropertyOrder({ + TwilioMessagesLogsIntegrationDataflow.JSON_PROPERTY_ENABLED, + TwilioMessagesLogsIntegrationDataflow.JSON_PROPERTY_STATUS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class TwilioMessagesLogsIntegrationDataflow { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ENABLED = "enabled"; + private Boolean enabled; + + public static final String JSON_PROPERTY_STATUS = "status"; + private IntegrationAccountDataflowStatus status; + + public TwilioMessagesLogsIntegrationDataflow enabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Whether the dataflow is enabled. + * + * @return enabled + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENABLED) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + /** + * Read-only collection status of a dataflow. + * + * @return status + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_STATUS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public IntegrationAccountDataflowStatus getStatus() { + return status; + } + + /** + * 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 TwilioMessagesLogsIntegrationDataflow + */ + @JsonAnySetter + public TwilioMessagesLogsIntegrationDataflow 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 TwilioMessagesLogsIntegrationDataflow object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TwilioMessagesLogsIntegrationDataflow twilioMessagesLogsIntegrationDataflow = + (TwilioMessagesLogsIntegrationDataflow) o; + return Objects.equals(this.enabled, twilioMessagesLogsIntegrationDataflow.enabled) + && Objects.equals(this.status, twilioMessagesLogsIntegrationDataflow.status) + && Objects.equals( + this.additionalProperties, twilioMessagesLogsIntegrationDataflow.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TwilioMessagesLogsIntegrationDataflow {\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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/cassettes/features/v2/Create_a_new_signal_based_notification_rule_returns_Successfully_created_the_notification_rule_response.freeze b/src/test/resources/cassettes/features/v2/Create_a_new_signal_based_notification_rule_returns_Successfully_created_the_notification_rule_response.freeze index 63badec3e16..594e432cb69 100644 --- a/src/test/resources/cassettes/features/v2/Create_a_new_signal_based_notification_rule_returns_Successfully_created_the_notification_rule_response.freeze +++ b/src/test/resources/cassettes/features/v2/Create_a_new_signal_based_notification_rule_returns_Successfully_created_the_notification_rule_response.freeze @@ -1 +1 @@ -2026-08-18T08:25:48.962Z \ No newline at end of file +2025-02-05T13:45:37.454Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_a_new_signal_based_notification_rule_returns_Successfully_created_the_notification_rule_response.json b/src/test/resources/cassettes/features/v2/Create_a_new_signal_based_notification_rule_returns_Successfully_created_the_notification_rule_response.json index 4b691a58632..e468ef74b48 100644 --- a/src/test/resources/cassettes/features/v2/Create_a_new_signal_based_notification_rule_returns_Successfully_created_the_notification_rule_response.json +++ b/src/test/resources/cassettes/features/v2/Create_a_new_signal_based_notification_rule_returns_Successfully_created_the_notification_rule_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Rule 17870415-0000-0000-0000-178704154800\",\"selectors\":{\"query\":\"(source:production_service OR env:prod)\",\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"severities\":[\"critical\"],\"trigger_source\":\"security_findings\"},\"targets\":[\"@john.doe@email.com\"],\"time_aggregation\":86400},\"type\":\"notification_rules\"}}" + "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Rule 1\",\"selectors\":{\"query\":\"(source:production_service OR env:prod)\",\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"severities\":[\"critical\"],\"trigger_source\":\"security_findings\"},\"targets\":[\"@john.doe@email.com\"],\"time_aggregation\":86400},\"type\":\"notification_rules\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"lro-dlc-wg9\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1787041551054,\"created_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"enabled\":true,\"modified_at\":1787041551054,\"modified_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"name\":\"Rule 17870415-0000-0000-0000-178704154800\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"query\":\"(source:production_service OR env:prod)\",\"trigger_source\":\"security_findings\"},\"targets\":[\"@john.doe@email.com\"],\"time_aggregation\":86400,\"version\":1}}}", + "body": "{\"data\":{\"id\":\"hvb-for-lpm\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1738763137979,\"created_by\":{\"name\":\"\",\"handle\":\"\"},\"enabled\":true,\"modified_at\":1738763137979,\"modified_by\":{\"name\":\"\",\"handle\":\"\"},\"name\":\"Rule 1\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"query\":\"(source:production_service OR env:prod)\",\"trigger_source\":\"security_findings\"},\"targets\":[\"@john.doe@email.com\"],\"time_aggregation\":86400,\"version\":1}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,13 +27,13 @@ "timeToLive": { "unlimited": true }, - "id": "0a47d343-c7fd-adea-3ee6-4a620d216454" + "id": "5bf44d5d-e1c1-c14f-2dba-99bb7cf73c43" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/security/signals/notification_rules/lro-dlc-wg9", + "path": "/api/v2/security/signals/notification_rules/hvb-for-lpm", "keepAlive": false, "secure": true }, @@ -48,6 +48,6 @@ "timeToLive": { "unlimited": true }, - "id": "1fc7df30-2b63-92d1-4b20-4c17b7b78533" + "id": "66bbdb1d-091e-adf0-b395-b128182abfcb" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_a_new_vulnerability_based_notification_rule_returns_Successfully_created_the_notification_rule_response.freeze b/src/test/resources/cassettes/features/v2/Create_a_new_vulnerability_based_notification_rule_returns_Successfully_created_the_notification_rule_response.freeze index 3ca7ed78331..e3138e7d626 100644 --- a/src/test/resources/cassettes/features/v2/Create_a_new_vulnerability_based_notification_rule_returns_Successfully_created_the_notification_rule_response.freeze +++ b/src/test/resources/cassettes/features/v2/Create_a_new_vulnerability_based_notification_rule_returns_Successfully_created_the_notification_rule_response.freeze @@ -1 +1 @@ -2026-08-18T08:25:51.223Z \ No newline at end of file +2025-02-05T13:45:38.493Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_a_new_vulnerability_based_notification_rule_returns_Successfully_created_the_notification_rule_response.json b/src/test/resources/cassettes/features/v2/Create_a_new_vulnerability_based_notification_rule_returns_Successfully_created_the_notification_rule_response.json index ddbf8973964..7e4e03068a5 100644 --- a/src/test/resources/cassettes/features/v2/Create_a_new_vulnerability_based_notification_rule_returns_Successfully_created_the_notification_rule_response.json +++ b/src/test/resources/cassettes/features/v2/Create_a_new_vulnerability_based_notification_rule_returns_Successfully_created_the_notification_rule_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Rule 17870415-0000-0000-0000-178704155100\",\"selectors\":{\"query\":\"(source:production_service OR env:prod)\",\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"severities\":[\"critical\"],\"trigger_source\":\"security_findings\"},\"targets\":[\"@john.doe@email.com\"],\"time_aggregation\":86400},\"type\":\"notification_rules\"}}" + "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Rule 1\",\"selectors\":{\"query\":\"(source:production_service OR env:prod)\",\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"severities\":[\"critical\"],\"trigger_source\":\"security_findings\"},\"targets\":[\"@john.doe@email.com\"],\"time_aggregation\":86400},\"type\":\"notification_rules\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"ieg-wc2-qal\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1787041551334,\"created_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"enabled\":true,\"modified_at\":1787041551334,\"modified_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"name\":\"Rule 17870415-0000-0000-0000-178704155100\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"query\":\"(source:production_service OR env:prod)\",\"trigger_source\":\"security_findings\"},\"targets\":[\"@john.doe@email.com\"],\"time_aggregation\":86400,\"version\":1}}}", + "body": "{\"data\":{\"id\":\"iwz-k3b-tpk\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1738763138982,\"created_by\":{\"name\":\"\",\"handle\":\"\"},\"enabled\":true,\"modified_at\":1738763138982,\"modified_by\":{\"name\":\"\",\"handle\":\"\"},\"name\":\"Rule 1\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"query\":\"(source:production_service OR env:prod)\",\"trigger_source\":\"security_findings\"},\"targets\":[\"@john.doe@email.com\"],\"time_aggregation\":86400,\"version\":1}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,13 +27,13 @@ "timeToLive": { "unlimited": true }, - "id": "9419197d-5f10-2282-2d04-7c0d20d58a45" + "id": "a79fd497-19e9-0c50-3012-6159be5aefbb" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/security/vulnerabilities/notification_rules/ieg-wc2-qal", + "path": "/api/v2/security/vulnerabilities/notification_rules/iwz-k3b-tpk", "keepAlive": false, "secure": true }, @@ -48,6 +48,6 @@ "timeToLive": { "unlimited": true }, - "id": "0309ae46-2412-7f11-25b5-ac15d1c56b8b" + "id": "4524692d-f5aa-aca4-3cd6-cb72f1ac31e9" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_a_signal_based_notification_rule_returns_Rule_successfully_deleted_response.freeze b/src/test/resources/cassettes/features/v2/Delete_a_signal_based_notification_rule_returns_Rule_successfully_deleted_response.freeze index 47175083735..f51e67baf31 100644 --- a/src/test/resources/cassettes/features/v2/Delete_a_signal_based_notification_rule_returns_Rule_successfully_deleted_response.freeze +++ b/src/test/resources/cassettes/features/v2/Delete_a_signal_based_notification_rule_returns_Rule_successfully_deleted_response.freeze @@ -1 +1 @@ -2026-08-18T08:25:51.547Z \ No newline at end of file +2025-02-05T13:45:44.348Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_a_signal_based_notification_rule_returns_Rule_successfully_deleted_response.json b/src/test/resources/cassettes/features/v2/Delete_a_signal_based_notification_rule_returns_Rule_successfully_deleted_response.json index 9d325f4c572..f6e97d2169d 100644 --- a/src/test/resources/cassettes/features/v2/Delete_a_signal_based_notification_rule_returns_Rule_successfully_deleted_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_a_signal_based_notification_rule_returns_Rule_successfully_deleted_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Rule 17870415-0000-0000-0000-178704155100\",\"selectors\":{\"query\":\"env:test\",\"rule_types\":[\"signal_correlation\"],\"severities\":[\"critical\"],\"trigger_source\":\"security_signals\"},\"targets\":[\"@email@email.com\"]},\"type\":\"notification_rules\"}}" + "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Test-Delete_a_signal_based_notification_rule_returns_Rule_successfully_deleted_response-1738763144\",\"selectors\":{\"query\":\"env:test\",\"rule_types\":[\"signal_correlation\"],\"severities\":[\"critical\"],\"trigger_source\":\"security_signals\"},\"targets\":[\"@email@email.com\"]},\"type\":\"notification_rules\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"faz-jrz-vdw\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1787041551643,\"created_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"enabled\":true,\"modified_at\":1787041551643,\"modified_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"name\":\"Rule 17870415-0000-0000-0000-178704155100\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"signal_correlation\"],\"query\":\"env:test\",\"trigger_source\":\"security_signals\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":0,\"version\":1}}}", + "body": "{\"data\":{\"id\":\"x4n-qps-p3w\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1738763144838,\"created_by\":{\"name\":\"\",\"handle\":\"\"},\"enabled\":true,\"modified_at\":1738763144838,\"modified_by\":{\"name\":\"\",\"handle\":\"\"},\"name\":\"Test-Delete_a_signal_based_notification_rule_returns_Rule_successfully_deleted_response-1738763144\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"signal_correlation\"],\"query\":\"env:test\",\"trigger_source\":\"security_signals\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":0,\"version\":1}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,13 +27,13 @@ "timeToLive": { "unlimited": true }, - "id": "283d7de1-ea56-dd7e-ed03-38436e0f4dd4" + "id": "963f16c8-c856-c118-c75b-9f00fbeaefdf" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/security/signals/notification_rules/faz-jrz-vdw", + "path": "/api/v2/security/signals/notification_rules/x4n-qps-p3w", "keepAlive": false, "secure": true }, @@ -48,18 +48,18 @@ "timeToLive": { "unlimited": true }, - "id": "5d761178-9472-f6fd-92f6-97a8d638c332" + "id": "a1fe9a5e-0529-8805-31b3-7c7a2a597365" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/security/signals/notification_rules/faz-jrz-vdw", + "path": "/api/v2/security/signals/notification_rules/x4n-qps-p3w", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"errors\":[\"not_found(Notification rule with id 'faz-jrz-vdw' not found)\"]}", + "body": "{\"errors\":[\"not_found(Notification rule with id 'x4n-qps-p3w' not found)\"]}", "headers": { "Content-Type": [ "application/json" @@ -74,6 +74,6 @@ "timeToLive": { "unlimited": true }, - "id": "5d761178-9472-f6fd-92f6-97a8d638c333" + "id": "a1fe9a5e-0529-8805-31b3-7c7a2a597366" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_a_vulnerability_based_notification_rule_returns_Rule_successfully_deleted_response.freeze b/src/test/resources/cassettes/features/v2/Delete_a_vulnerability_based_notification_rule_returns_Rule_successfully_deleted_response.freeze index 0efe8051b34..c5f1ae22125 100644 --- a/src/test/resources/cassettes/features/v2/Delete_a_vulnerability_based_notification_rule_returns_Rule_successfully_deleted_response.freeze +++ b/src/test/resources/cassettes/features/v2/Delete_a_vulnerability_based_notification_rule_returns_Rule_successfully_deleted_response.freeze @@ -1 +1 @@ -2026-08-18T08:25:51.881Z \ No newline at end of file +2025-02-05T13:45:47.393Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_a_vulnerability_based_notification_rule_returns_Rule_successfully_deleted_response.json b/src/test/resources/cassettes/features/v2/Delete_a_vulnerability_based_notification_rule_returns_Rule_successfully_deleted_response.json index e9ffe9ae61d..72f32c1bd91 100644 --- a/src/test/resources/cassettes/features/v2/Delete_a_vulnerability_based_notification_rule_returns_Rule_successfully_deleted_response.json +++ b/src/test/resources/cassettes/features/v2/Delete_a_vulnerability_based_notification_rule_returns_Rule_successfully_deleted_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Rule 17870415-0000-0000-0000-178704155100\",\"selectors\":{\"query\":\"env:test\",\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"severities\":[\"critical\"],\"trigger_source\":\"security_findings\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":86400},\"type\":\"notification_rules\"}}" + "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Test-Delete_a_vulnerability_based_notification_rule_returns_Rule_successfully_deleted_response-1738763147\",\"selectors\":{\"query\":\"env:test\",\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"severities\":[\"critical\"],\"trigger_source\":\"security_findings\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":86400},\"type\":\"notification_rules\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"bpb-oos-ppt\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1787041551965,\"created_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"enabled\":true,\"modified_at\":1787041551965,\"modified_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"name\":\"Rule 17870415-0000-0000-0000-178704155100\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"query\":\"env:test\",\"trigger_source\":\"security_findings\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":86400,\"version\":1}}}", + "body": "{\"data\":{\"id\":\"p3z-nij-ygf\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1738763147765,\"created_by\":{\"name\":\"\",\"handle\":\"\"},\"enabled\":true,\"modified_at\":1738763147765,\"modified_by\":{\"name\":\"\",\"handle\":\"\"},\"name\":\"Test-Delete_a_vulnerability_based_notification_rule_returns_Rule_successfully_deleted_response-1738763147\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"query\":\"env:test\",\"trigger_source\":\"security_findings\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":86400,\"version\":1}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,13 +27,13 @@ "timeToLive": { "unlimited": true }, - "id": "11d65a89-b564-29c5-7785-e6edc5f62108" + "id": "129b8c39-3aa9-048e-c386-32bb203b76c2" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/security/vulnerabilities/notification_rules/bpb-oos-ppt", + "path": "/api/v2/security/vulnerabilities/notification_rules/p3z-nij-ygf", "keepAlive": false, "secure": true }, @@ -48,18 +48,18 @@ "timeToLive": { "unlimited": true }, - "id": "2fe1f38b-2fed-8c28-0760-a9e109621673" + "id": "26b0c93b-96d5-fa63-87fd-ed9fc446bca0" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/security/vulnerabilities/notification_rules/bpb-oos-ppt", + "path": "/api/v2/security/vulnerabilities/notification_rules/p3z-nij-ygf", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"errors\":[\"not_found(Notification rule with id 'bpb-oos-ppt' not found)\"]}", + "body": "{\"errors\":[\"not_found(Notification rule with id 'p3z-nij-ygf' not found)\"]}", "headers": { "Content-Type": [ "application/json" @@ -74,6 +74,6 @@ "timeToLive": { "unlimited": true }, - "id": "2fe1f38b-2fed-8c28-0760-a9e109621674" + "id": "26b0c93b-96d5-fa63-87fd-ed9fc446bca1" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_details_of_a_signal_based_notification_rule_returns_Notification_rule_details_response.freeze b/src/test/resources/cassettes/features/v2/Get_details_of_a_signal_based_notification_rule_returns_Notification_rule_details_response.freeze index b64851789f6..51dd6f91753 100644 --- a/src/test/resources/cassettes/features/v2/Get_details_of_a_signal_based_notification_rule_returns_Notification_rule_details_response.freeze +++ b/src/test/resources/cassettes/features/v2/Get_details_of_a_signal_based_notification_rule_returns_Notification_rule_details_response.freeze @@ -1 +1 @@ -2026-08-18T08:25:52.299Z \ No newline at end of file +2025-02-05T13:46:01.602Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_details_of_a_signal_based_notification_rule_returns_Notification_rule_details_response.json b/src/test/resources/cassettes/features/v2/Get_details_of_a_signal_based_notification_rule_returns_Notification_rule_details_response.json index 618bdc4a067..0d7e74001e9 100644 --- a/src/test/resources/cassettes/features/v2/Get_details_of_a_signal_based_notification_rule_returns_Notification_rule_details_response.json +++ b/src/test/resources/cassettes/features/v2/Get_details_of_a_signal_based_notification_rule_returns_Notification_rule_details_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Rule 17870415-0000-0000-0000-178704155200\",\"selectors\":{\"query\":\"env:test\",\"rule_types\":[\"signal_correlation\"],\"severities\":[\"critical\"],\"trigger_source\":\"security_signals\"},\"targets\":[\"@email@email.com\"]},\"type\":\"notification_rules\"}}" + "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Test-Get_details_of_a_signal_based_notification_rule_returns_Notification_rule_details_response-1738763161\",\"selectors\":{\"query\":\"env:test\",\"rule_types\":[\"signal_correlation\"],\"severities\":[\"critical\"],\"trigger_source\":\"security_signals\"},\"targets\":[\"@email@email.com\"]},\"type\":\"notification_rules\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"we4-vwn-ub3\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1787041552392,\"created_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"enabled\":true,\"modified_at\":1787041552392,\"modified_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"name\":\"Rule 17870415-0000-0000-0000-178704155200\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"signal_correlation\"],\"query\":\"env:test\",\"trigger_source\":\"security_signals\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":0,\"version\":1}}}", + "body": "{\"data\":{\"id\":\"tcf-juk-5tr\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1738763162076,\"created_by\":{\"name\":\"\",\"handle\":\"\"},\"enabled\":true,\"modified_at\":1738763162076,\"modified_by\":{\"name\":\"\",\"handle\":\"\"},\"name\":\"Test-Get_details_of_a_signal_based_notification_rule_returns_Notification_rule_details_response-1738763161\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"signal_correlation\"],\"query\":\"env:test\",\"trigger_source\":\"security_signals\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":0,\"version\":1}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,18 +27,18 @@ "timeToLive": { "unlimited": true }, - "id": "0801e257-29f7-c80b-58f6-370c227c0bd6" + "id": "6ad97986-8094-6062-47f2-b00755856f7f" }, { "httpRequest": { "headers": {}, "method": "GET", - "path": "/api/v2/security/signals/notification_rules/we4-vwn-ub3", + "path": "/api/v2/security/signals/notification_rules/tcf-juk-5tr", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"we4-vwn-ub3\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1787041552392,\"created_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"enabled\":true,\"modified_at\":1787041552392,\"modified_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"name\":\"Rule 17870415-0000-0000-0000-178704155200\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"signal_correlation\"],\"query\":\"env:test\",\"trigger_source\":\"security_signals\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":0,\"version\":1}}}", + "body": "{\"data\":{\"id\":\"tcf-juk-5tr\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1738763162076,\"created_by\":{\"name\":\"\",\"handle\":\"\"},\"enabled\":true,\"modified_at\":1738763162076,\"modified_by\":{\"name\":\"\",\"handle\":\"\"},\"name\":\"Test-Get_details_of_a_signal_based_notification_rule_returns_Notification_rule_details_response-1738763161\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"signal_correlation\"],\"query\":\"env:test\",\"trigger_source\":\"security_signals\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":0,\"version\":1}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -53,13 +53,13 @@ "timeToLive": { "unlimited": true }, - "id": "c9fc2571-99dc-3a8d-9e01-0c83f3418750" + "id": "3ed460a3-2899-341e-9735-7a1ecf98a7db" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/security/signals/notification_rules/we4-vwn-ub3", + "path": "/api/v2/security/signals/notification_rules/tcf-juk-5tr", "keepAlive": false, "secure": true }, @@ -74,6 +74,6 @@ "timeToLive": { "unlimited": true }, - "id": "a63e4502-22a1-ad40-41b3-703b7a7cb45a" + "id": "d7669f70-d429-dfd5-acc5-df2270b7cec5" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_details_of_a_vulnerability_notification_rule_returns_Notification_rule_details_response.freeze b/src/test/resources/cassettes/features/v2/Get_details_of_a_vulnerability_notification_rule_returns_Notification_rule_details_response.freeze index 8ad2aa3c3a3..5c0ebad9720 100644 --- a/src/test/resources/cassettes/features/v2/Get_details_of_a_vulnerability_notification_rule_returns_Notification_rule_details_response.freeze +++ b/src/test/resources/cassettes/features/v2/Get_details_of_a_vulnerability_notification_rule_returns_Notification_rule_details_response.freeze @@ -1 +1 @@ -2026-08-18T08:25:52.650Z \ No newline at end of file +2025-02-05T13:46:03.335Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_details_of_a_vulnerability_notification_rule_returns_Notification_rule_details_response.json b/src/test/resources/cassettes/features/v2/Get_details_of_a_vulnerability_notification_rule_returns_Notification_rule_details_response.json index 63123ddd33c..4aedaf960f5 100644 --- a/src/test/resources/cassettes/features/v2/Get_details_of_a_vulnerability_notification_rule_returns_Notification_rule_details_response.json +++ b/src/test/resources/cassettes/features/v2/Get_details_of_a_vulnerability_notification_rule_returns_Notification_rule_details_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Rule 17870415-0000-0000-0000-178704155200\",\"selectors\":{\"query\":\"env:test\",\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"severities\":[\"critical\"],\"trigger_source\":\"security_findings\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":86400},\"type\":\"notification_rules\"}}" + "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Test-Get_details_of_a_vulnerability_notification_rule_returns_Notification_rule_details_response-1738763163\",\"selectors\":{\"query\":\"env:test\",\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"severities\":[\"critical\"],\"trigger_source\":\"security_findings\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":86400},\"type\":\"notification_rules\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"54b-raw-0dt\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1787041552745,\"created_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"enabled\":true,\"modified_at\":1787041552745,\"modified_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"name\":\"Rule 17870415-0000-0000-0000-178704155200\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"query\":\"env:test\",\"trigger_source\":\"security_findings\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":86400,\"version\":1}}}", + "body": "{\"data\":{\"id\":\"ryn-rs2-tef\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1738763163705,\"created_by\":{\"name\":\"\",\"handle\":\"\"},\"enabled\":true,\"modified_at\":1738763163705,\"modified_by\":{\"name\":\"\",\"handle\":\"\"},\"name\":\"Test-Get_details_of_a_vulnerability_notification_rule_returns_Notification_rule_details_response-1738763163\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"query\":\"env:test\",\"trigger_source\":\"security_findings\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":86400,\"version\":1}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,18 +27,18 @@ "timeToLive": { "unlimited": true }, - "id": "d47e08f7-3b2d-8516-ecbc-293d05d5883f" + "id": "4d938234-091d-3c4a-8408-12f224528220" }, { "httpRequest": { "headers": {}, "method": "GET", - "path": "/api/v2/security/vulnerabilities/notification_rules/54b-raw-0dt", + "path": "/api/v2/security/vulnerabilities/notification_rules/ryn-rs2-tef", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"54b-raw-0dt\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1787041552745,\"created_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"enabled\":true,\"modified_at\":1787041552745,\"modified_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"name\":\"Rule 17870415-0000-0000-0000-178704155200\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"query\":\"env:test\",\"trigger_source\":\"security_findings\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":86400,\"version\":1}}}", + "body": "{\"data\":{\"id\":\"ryn-rs2-tef\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1738763163705,\"created_by\":{\"name\":\"\",\"handle\":\"\"},\"enabled\":true,\"modified_at\":1738763163705,\"modified_by\":{\"name\":\"\",\"handle\":\"\"},\"name\":\"Test-Get_details_of_a_vulnerability_notification_rule_returns_Notification_rule_details_response-1738763163\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"query\":\"env:test\",\"trigger_source\":\"security_findings\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":86400,\"version\":1}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -53,13 +53,13 @@ "timeToLive": { "unlimited": true }, - "id": "dca15993-6162-1aac-9aa9-66317db3095c" + "id": "4a17758a-04f7-a529-7d4d-0f3498924a17" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/security/vulnerabilities/notification_rules/54b-raw-0dt", + "path": "/api/v2/security/vulnerabilities/notification_rules/ryn-rs2-tef", "keepAlive": false, "secure": true }, @@ -74,6 +74,6 @@ "timeToLive": { "unlimited": true }, - "id": "67308b85-577b-7ec9-cded-42c51957fae6" + "id": "78170c56-d05a-e13a-24e1-68c46568ab77" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_the_list_of_signal_based_notification_rules_returns_The_list_of_notification_rules_response.freeze b/src/test/resources/cassettes/features/v2/Get_the_list_of_signal_based_notification_rules_returns_The_list_of_notification_rules_response.freeze index c2aed0ebbee..2c353113bd4 100644 --- a/src/test/resources/cassettes/features/v2/Get_the_list_of_signal_based_notification_rules_returns_The_list_of_notification_rules_response.freeze +++ b/src/test/resources/cassettes/features/v2/Get_the_list_of_signal_based_notification_rules_returns_The_list_of_notification_rules_response.freeze @@ -1 +1 @@ -2026-08-18T08:25:53.057Z \ No newline at end of file +2025-02-05T13:46:04.585Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_the_list_of_signal_based_notification_rules_returns_The_list_of_notification_rules_response.json b/src/test/resources/cassettes/features/v2/Get_the_list_of_signal_based_notification_rules_returns_The_list_of_notification_rules_response.json index a79de0bc7e9..4ec4b70ccfb 100644 --- a/src/test/resources/cassettes/features/v2/Get_the_list_of_signal_based_notification_rules_returns_The_list_of_notification_rules_response.json +++ b/src/test/resources/cassettes/features/v2/Get_the_list_of_signal_based_notification_rules_returns_The_list_of_notification_rules_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Rule 17870415-0000-0000-0000-178704155300\",\"selectors\":{\"query\":\"env:test\",\"rule_types\":[\"signal_correlation\"],\"severities\":[\"critical\"],\"trigger_source\":\"security_signals\"},\"targets\":[\"@email@email.com\"]},\"type\":\"notification_rules\"}}" + "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Test-Get_the_list_of_signal_based_notification_rules_returns_The_list_of_notification_rules_response-1738763164\",\"selectors\":{\"query\":\"env:test\",\"rule_types\":[\"signal_correlation\"],\"severities\":[\"critical\"],\"trigger_source\":\"security_signals\"},\"targets\":[\"@email@email.com\"]},\"type\":\"notification_rules\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"yc8-i7q-9be\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1787041553174,\"created_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"enabled\":true,\"modified_at\":1787041553174,\"modified_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"name\":\"Rule 17870415-0000-0000-0000-178704155300\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"signal_correlation\"],\"query\":\"env:test\",\"trigger_source\":\"security_signals\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":0,\"version\":1}}}", + "body": "{\"data\":{\"id\":\"btd-udo-vn7\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1738763164939,\"created_by\":{\"name\":\"\",\"handle\":\"\"},\"enabled\":true,\"modified_at\":1738763164939,\"modified_by\":{\"name\":\"\",\"handle\":\"\"},\"name\":\"Test-Get_the_list_of_signal_based_notification_rules_returns_The_list_of_notification_rules_response-1738763164\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"signal_correlation\"],\"query\":\"env:test\",\"trigger_source\":\"security_signals\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":0,\"version\":1}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "8da6c6cc-d976-5d34-ba62-5b6774404c8c" + "id": "36450e02-5c21-6f92-98f6-f2bd9b210ca6" }, { "httpRequest": { @@ -38,7 +38,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":[{\"id\":\"yja-vtn-jr9\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1755115900029,\"created_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"enabled\":true,\"modified_at\":1755115900029,\"modified_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"name\":\"Test-Delete_a_signal_based_notification_rule_returns_Rule_successfully_deleted_response-1755115899\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"signal_correlation\"],\"query\":\"env:test\",\"trigger_source\":\"security_signals\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":0,\"version\":1}},{\"id\":\"yc8-i7q-9be\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1787041553174,\"created_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"enabled\":true,\"modified_at\":1787041553174,\"modified_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"name\":\"Rule 17870415-0000-0000-0000-178704155300\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"signal_correlation\"],\"query\":\"env:test\",\"trigger_source\":\"security_signals\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":0,\"version\":1}}]}", + "body": "{\"data\":[{\"id\":\"btd-udo-vn7\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1738763164939,\"created_by\":{\"name\":\"\",\"handle\":\"\"},\"enabled\":true,\"modified_at\":1738763164939,\"modified_by\":{\"name\":\"\",\"handle\":\"\"},\"name\":\"Test-Get_the_list_of_signal_based_notification_rules_returns_The_list_of_notification_rules_response-1738763164\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"signal_correlation\"],\"query\":\"env:test\",\"trigger_source\":\"security_signals\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":0,\"version\":1}}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -59,7 +59,7 @@ "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/security/signals/notification_rules/yc8-i7q-9be", + "path": "/api/v2/security/signals/notification_rules/btd-udo-vn7", "keepAlive": false, "secure": true }, @@ -74,6 +74,6 @@ "timeToLive": { "unlimited": true }, - "id": "95a74d85-fe2e-1179-d27b-fbb6409473d1" + "id": "97135ae7-8827-0f4a-5ede-bfc41954206f" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_the_list_of_vulnerability_notification_rules_returns_The_list_of_notification_rules_response.freeze b/src/test/resources/cassettes/features/v2/Get_the_list_of_vulnerability_notification_rules_returns_The_list_of_notification_rules_response.freeze index 557296bdaa1..a29f84ee456 100644 --- a/src/test/resources/cassettes/features/v2/Get_the_list_of_vulnerability_notification_rules_returns_The_list_of_notification_rules_response.freeze +++ b/src/test/resources/cassettes/features/v2/Get_the_list_of_vulnerability_notification_rules_returns_The_list_of_notification_rules_response.freeze @@ -1 +1 @@ -2026-08-18T08:25:53.433Z \ No newline at end of file +2025-02-05T13:46:05.871Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_the_list_of_vulnerability_notification_rules_returns_The_list_of_notification_rules_response.json b/src/test/resources/cassettes/features/v2/Get_the_list_of_vulnerability_notification_rules_returns_The_list_of_notification_rules_response.json index 89ea872a9b6..56768af629a 100644 --- a/src/test/resources/cassettes/features/v2/Get_the_list_of_vulnerability_notification_rules_returns_The_list_of_notification_rules_response.json +++ b/src/test/resources/cassettes/features/v2/Get_the_list_of_vulnerability_notification_rules_returns_The_list_of_notification_rules_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Rule 17870415-0000-0000-0000-178704155300\",\"selectors\":{\"query\":\"env:test\",\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"severities\":[\"critical\"],\"trigger_source\":\"security_findings\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":86400},\"type\":\"notification_rules\"}}" + "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Test-Get_the_list_of_vulnerability_notification_rules_returns_The_list_of_notification_rules_response-1738763165\",\"selectors\":{\"query\":\"env:test\",\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"severities\":[\"critical\"],\"trigger_source\":\"security_findings\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":86400},\"type\":\"notification_rules\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"bpd-ytx-gr7\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1787041553522,\"created_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"enabled\":true,\"modified_at\":1787041553522,\"modified_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"name\":\"Rule 17870415-0000-0000-0000-178704155300\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"query\":\"env:test\",\"trigger_source\":\"security_findings\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":86400,\"version\":1}}}", + "body": "{\"data\":{\"id\":\"jl2-gq4-vr0\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1738763166229,\"created_by\":{\"name\":\"\",\"handle\":\"\"},\"enabled\":true,\"modified_at\":1738763166229,\"modified_by\":{\"name\":\"\",\"handle\":\"\"},\"name\":\"Test-Get_the_list_of_vulnerability_notification_rules_returns_The_list_of_notification_rules_response-1738763165\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"query\":\"env:test\",\"trigger_source\":\"security_findings\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":86400,\"version\":1}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "474026a9-d094-2dcc-cec5-26d23d3c1030" + "id": "400e5d1e-9a00-0ef8-7577-172a172b0809" }, { "httpRequest": { @@ -38,7 +38,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":[{\"id\":\"k41-pa4-6wc\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1739223055334,\"created_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"enabled\":true,\"modified_at\":1739223055759,\"modified_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"name\":\"Rule 1\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"query\":\"(source:production_service OR env:prod)\",\"trigger_source\":\"security_findings\"},\"targets\":[\"@john.doe@email.com\"],\"time_aggregation\":86400,\"version\":9}},{\"id\":\"o8d-quc-x6c\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1739972529211,\"created_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"enabled\":true,\"modified_at\":1754569022707,\"modified_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"name\":\"My vulnerability notification rule 2\",\"selectors\":{\"severities\":[\"high\",\"critical\"],\"rule_types\":[\"iac_misconfiguration\",\"host_vulnerability\"],\"query\":\"\",\"trigger_source\":\"security_findings\"},\"targets\":[\"john@email.com\"],\"time_aggregation\":36000,\"version\":10}},{\"id\":\"euw-tg7-zrp\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1755114943037,\"created_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"enabled\":true,\"modified_at\":1755114943037,\"modified_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"name\":\"Test-Get_the_list_of_vulnerability_notification_rules_returns_The_list_of_notification_rules_response-1755114942\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"query\":\"env:test\",\"trigger_source\":\"security_findings\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":86400,\"version\":8}},{\"id\":\"cd2-sth-brq\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1776474749079,\"created_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"enabled\":true,\"modified_at\":1776474749079,\"modified_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"name\":\"Test-Go-Get_the_list_of_vulnerability_notification_rules_returns_The_list_of_notification_rules_response-1776474748\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"query\":\"env:test\",\"trigger_source\":\"security_findings\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":86400,\"version\":2}},{\"id\":\"std-aoa-qzn\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1777511746262,\"created_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"enabled\":true,\"modified_at\":1777511746262,\"modified_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"name\":\"Test-Go-Delete_a_vulnerability_based_notification_rule_returns_Rule_successfully_deleted_response-1777511746\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"query\":\"env:test\",\"trigger_source\":\"security_findings\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":86400,\"version\":1}},{\"id\":\"ced-ocu-dbc\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1786467545634,\"created_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"enabled\":true,\"modified_at\":1786467545993,\"modified_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"name\":\"Rule 1786467545\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"query\":\"(source:production_service OR env:prod)\",\"trigger_source\":\"security_findings\"},\"targets\":[\"@john.doe@email.com\"],\"time_aggregation\":86400,\"version\":2}},{\"id\":\"fzb-0zu-hwz\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1786467569620,\"created_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"enabled\":true,\"modified_at\":1786467569956,\"modified_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"name\":\"Rule 1786467569\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"query\":\"(source:production_service OR env:prod)\",\"trigger_source\":\"security_findings\"},\"targets\":[\"@john.doe@email.com\"],\"time_aggregation\":86400,\"version\":2}},{\"id\":\"l3e-nqw-ero\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1786467603254,\"created_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"enabled\":true,\"modified_at\":1786467603614,\"modified_by\":{\"name\":\"frog\",\"handle\":\"frog@datadoghq.com\"},\"name\":\"Rule 1786467602\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"query\":\"(source:production_service OR env:prod)\",\"trigger_source\":\"security_findings\"},\"targets\":[\"@john.doe@email.com\"],\"time_aggregation\":86400,\"version\":2}},{\"id\":\"bpd-ytx-gr7\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1787041553522,\"created_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"enabled\":true,\"modified_at\":1787041553522,\"modified_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"name\":\"Rule 17870415-0000-0000-0000-178704155300\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"query\":\"env:test\",\"trigger_source\":\"security_findings\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":86400,\"version\":1}}]}", + "body": "{\"data\":[{\"id\":\"jl2-gq4-vr0\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1738763166229,\"created_by\":{\"name\":\"\",\"handle\":\"\"},\"enabled\":true,\"modified_at\":1738763166229,\"modified_by\":{\"name\":\"\",\"handle\":\"\"},\"name\":\"Test-Get_the_list_of_vulnerability_notification_rules_returns_The_list_of_notification_rules_response-1738763165\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"query\":\"env:test\",\"trigger_source\":\"security_findings\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":86400,\"version\":1}}]}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -59,7 +59,7 @@ "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/security/vulnerabilities/notification_rules/bpd-ytx-gr7", + "path": "/api/v2/security/vulnerabilities/notification_rules/jl2-gq4-vr0", "keepAlive": false, "secure": true }, @@ -74,6 +74,6 @@ "timeToLive": { "unlimited": true }, - "id": "f274fad6-11b3-e2df-4b1c-f7de3825b569" + "id": "39b0277a-8974-b6ee-4c81-da4408e84fe7" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Patch_a_signal_based_notification_rule_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Patch_a_signal_based_notification_rule_returns_Bad_Request_response.freeze index 6d7fbe70a43..3ba9d1b93aa 100644 --- a/src/test/resources/cassettes/features/v2/Patch_a_signal_based_notification_rule_returns_Bad_Request_response.freeze +++ b/src/test/resources/cassettes/features/v2/Patch_a_signal_based_notification_rule_returns_Bad_Request_response.freeze @@ -1 +1 @@ -2026-08-18T08:25:53.852Z \ No newline at end of file +2025-02-05T13:46:11.165Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Patch_a_signal_based_notification_rule_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Patch_a_signal_based_notification_rule_returns_Bad_Request_response.json index 932d20e62f2..acb8278aebe 100644 --- a/src/test/resources/cassettes/features/v2/Patch_a_signal_based_notification_rule_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Patch_a_signal_based_notification_rule_returns_Bad_Request_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Rule 17870415-0000-0000-0000-178704155300\",\"selectors\":{\"query\":\"env:test\",\"rule_types\":[\"signal_correlation\"],\"severities\":[\"critical\"],\"trigger_source\":\"security_signals\"},\"targets\":[\"@email@email.com\"]},\"type\":\"notification_rules\"}}" + "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Test-Patch_a_signal_based_notification_rule_returns_Bad_Request_response-1738763171\",\"selectors\":{\"query\":\"env:test\",\"rule_types\":[\"signal_correlation\"],\"severities\":[\"critical\"],\"trigger_source\":\"security_signals\"},\"targets\":[\"@email@email.com\"]},\"type\":\"notification_rules\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"cih-ioz-u8b\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1787041553943,\"created_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"enabled\":true,\"modified_at\":1787041553943,\"modified_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"name\":\"Rule 17870415-0000-0000-0000-178704155300\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"signal_correlation\"],\"query\":\"env:test\",\"trigger_source\":\"security_signals\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":0,\"version\":1}}}", + "body": "{\"data\":{\"id\":\"uwx-6n1-x2z\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1738763171531,\"created_by\":{\"name\":\"\",\"handle\":\"\"},\"enabled\":true,\"modified_at\":1738763171531,\"modified_by\":{\"name\":\"\",\"handle\":\"\"},\"name\":\"Test-Patch_a_signal_based_notification_rule_returns_Bad_Request_response-1738763171\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"signal_correlation\"],\"query\":\"env:test\",\"trigger_source\":\"security_signals\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":0,\"version\":1}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "8da6c6cc-d976-5d34-ba62-5b6774404c8d" + "id": "5465fd63-1ad9-f036-d4de-86a2bee8be2f" }, { "httpRequest": { @@ -37,7 +37,7 @@ }, "headers": {}, "method": "PATCH", - "path": "/api/v2/security/signals/notification_rules/cih-ioz-u8b", + "path": "/api/v2/security/signals/notification_rules/uwx-6n1-x2z", "keepAlive": false, "secure": true }, @@ -57,13 +57,13 @@ "timeToLive": { "unlimited": true }, - "id": "67681cd7-70b6-482e-5599-56d0e8deca71" + "id": "e7f62ae6-2be6-0274-cbac-7df3efec6433" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/security/signals/notification_rules/cih-ioz-u8b", + "path": "/api/v2/security/signals/notification_rules/uwx-6n1-x2z", "keepAlive": false, "secure": true }, @@ -78,6 +78,6 @@ "timeToLive": { "unlimited": true }, - "id": "019c9744-c696-0ee8-8c93-e369f4006d58" + "id": "4d804465-6bb1-f69d-2514-3f86f04ad696" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Patch_a_signal_based_notification_rule_returns_Notification_rule_successfully_patched_response.freeze b/src/test/resources/cassettes/features/v2/Patch_a_signal_based_notification_rule_returns_Notification_rule_successfully_patched_response.freeze index dc50984e54a..4a319955473 100644 --- a/src/test/resources/cassettes/features/v2/Patch_a_signal_based_notification_rule_returns_Notification_rule_successfully_patched_response.freeze +++ b/src/test/resources/cassettes/features/v2/Patch_a_signal_based_notification_rule_returns_Notification_rule_successfully_patched_response.freeze @@ -1 +1 @@ -2026-08-18T08:25:54.184Z \ No newline at end of file +2025-02-05T13:46:12.789Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Patch_a_signal_based_notification_rule_returns_Notification_rule_successfully_patched_response.json b/src/test/resources/cassettes/features/v2/Patch_a_signal_based_notification_rule_returns_Notification_rule_successfully_patched_response.json index 0085e056543..138d3a8c1fc 100644 --- a/src/test/resources/cassettes/features/v2/Patch_a_signal_based_notification_rule_returns_Notification_rule_successfully_patched_response.json +++ b/src/test/resources/cassettes/features/v2/Patch_a_signal_based_notification_rule_returns_Notification_rule_successfully_patched_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Rule 17870415-0000-0000-0000-178704155400\",\"selectors\":{\"query\":\"env:test\",\"rule_types\":[\"signal_correlation\"],\"severities\":[\"critical\"],\"trigger_source\":\"security_signals\"},\"targets\":[\"@email@email.com\"]},\"type\":\"notification_rules\"}}" + "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Test-Patch_a_signal_based_notification_rule_returns_Notification_rule_successfully_patched_response-1738763172\",\"selectors\":{\"query\":\"env:test\",\"rule_types\":[\"signal_correlation\"],\"severities\":[\"critical\"],\"trigger_source\":\"security_signals\"},\"targets\":[\"@email@email.com\"]},\"type\":\"notification_rules\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"v6q-o1k-aul\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1787041554291,\"created_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"enabled\":true,\"modified_at\":1787041554291,\"modified_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"name\":\"Rule 17870415-0000-0000-0000-178704155400\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"signal_correlation\"],\"query\":\"env:test\",\"trigger_source\":\"security_signals\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":0,\"version\":1}}}", + "body": "{\"data\":{\"id\":\"ob0-6ru-hc6\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1738763173259,\"created_by\":{\"name\":\"\",\"handle\":\"\"},\"enabled\":true,\"modified_at\":1738763173259,\"modified_by\":{\"name\":\"\",\"handle\":\"\"},\"name\":\"Test-Patch_a_signal_based_notification_rule_returns_Notification_rule_successfully_patched_response-1738763172\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"signal_correlation\"],\"query\":\"env:test\",\"trigger_source\":\"security_signals\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":0,\"version\":1}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,22 +27,22 @@ "timeToLive": { "unlimited": true }, - "id": "e5d862ee-7ad6-7a80-3e3f-efc69b6a6a7b" + "id": "5452f6d4-b2ab-1d5b-0e77-d9ae12089200" }, { "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Rule 17870415-0000-0000-0000-178704155400\",\"selectors\":{\"query\":\"(source:production_service OR env:prod)\",\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"severities\":[\"critical\"],\"trigger_source\":\"security_findings\"},\"targets\":[\"@john.doe@email.com\"],\"time_aggregation\":86400,\"version\":1},\"id\":\"aaa-bbb-ccc\",\"type\":\"notification_rules\"}}" + "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Rule 1\",\"selectors\":{\"query\":\"(source:production_service OR env:prod)\",\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"severities\":[\"critical\"],\"trigger_source\":\"security_findings\"},\"targets\":[\"@john.doe@email.com\"],\"time_aggregation\":86400,\"version\":1},\"id\":\"aaa-bbb-ccc\",\"type\":\"notification_rules\"}}" }, "headers": {}, "method": "PATCH", - "path": "/api/v2/security/signals/notification_rules/v6q-o1k-aul", + "path": "/api/v2/security/signals/notification_rules/ob0-6ru-hc6", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"v6q-o1k-aul\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1787041554291,\"created_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"enabled\":true,\"modified_at\":1787041554426,\"modified_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"name\":\"Rule 17870415-0000-0000-0000-178704155400\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"query\":\"(source:production_service OR env:prod)\",\"trigger_source\":\"security_findings\"},\"targets\":[\"@john.doe@email.com\"],\"time_aggregation\":86400,\"version\":2}}}", + "body": "{\"data\":{\"id\":\"ob0-6ru-hc6\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1738763173259,\"created_by\":{\"name\":\"\",\"handle\":\"\"},\"enabled\":true,\"modified_at\":1738763173722,\"modified_by\":{\"name\":\"\",\"handle\":\"\"},\"name\":\"Rule 1\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"query\":\"(source:production_service OR env:prod)\",\"trigger_source\":\"security_findings\"},\"targets\":[\"@john.doe@email.com\"],\"time_aggregation\":86400,\"version\":2}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -57,13 +57,13 @@ "timeToLive": { "unlimited": true }, - "id": "98d7990b-59d0-0b12-bc59-4c32f29461b1" + "id": "7618b672-3030-f111-96a6-471c6204bbd9" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/security/signals/notification_rules/v6q-o1k-aul", + "path": "/api/v2/security/signals/notification_rules/ob0-6ru-hc6", "keepAlive": false, "secure": true }, @@ -78,6 +78,6 @@ "timeToLive": { "unlimited": true }, - "id": "72462d9d-fff7-4037-5391-60945b71aefd" + "id": "10dd55b6-8f49-ba49-d052-f0b4795d7ac7" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_notification_rule_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_notification_rule_returns_Bad_Request_response.freeze index afbe0ec03de..9c16ba59f02 100644 --- a/src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_notification_rule_returns_Bad_Request_response.freeze +++ b/src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_notification_rule_returns_Bad_Request_response.freeze @@ -1 +1 @@ -2026-08-18T08:25:54.566Z \ No newline at end of file +2025-02-05T13:46:14.056Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_notification_rule_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_notification_rule_returns_Bad_Request_response.json index e182638fc72..dd1a8846f18 100644 --- a/src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_notification_rule_returns_Bad_Request_response.json +++ b/src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_notification_rule_returns_Bad_Request_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Rule 17870415-0000-0000-0000-178704155400\",\"selectors\":{\"query\":\"env:test\",\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"severities\":[\"critical\"],\"trigger_source\":\"security_findings\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":86400},\"type\":\"notification_rules\"}}" + "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Test-Patch_a_vulnerability_based_notification_rule_returns_Bad_Request_response-1738763174\",\"selectors\":{\"query\":\"env:test\",\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"severities\":[\"critical\"],\"trigger_source\":\"security_findings\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":86400},\"type\":\"notification_rules\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"fjt-abw-hko\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1787041554666,\"created_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"enabled\":true,\"modified_at\":1787041554666,\"modified_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"name\":\"Rule 17870415-0000-0000-0000-178704155400\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"query\":\"env:test\",\"trigger_source\":\"security_findings\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":86400,\"version\":1}}}", + "body": "{\"data\":{\"id\":\"flc-8up-dya\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1738763174531,\"created_by\":{\"name\":\"\",\"handle\":\"\"},\"enabled\":true,\"modified_at\":1738763174531,\"modified_by\":{\"name\":\"\",\"handle\":\"\"},\"name\":\"Test-Patch_a_vulnerability_based_notification_rule_returns_Bad_Request_response-1738763174\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"query\":\"env:test\",\"trigger_source\":\"security_findings\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":86400,\"version\":1}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,7 +27,7 @@ "timeToLive": { "unlimited": true }, - "id": "954c10d9-9045-618d-9230-cb4ccc7e1a93" + "id": "b4ed034f-34bb-b680-779f-d39ff75a6fef" }, { "httpRequest": { @@ -37,7 +37,7 @@ }, "headers": {}, "method": "PATCH", - "path": "/api/v2/security/vulnerabilities/notification_rules/fjt-abw-hko", + "path": "/api/v2/security/vulnerabilities/notification_rules/flc-8up-dya", "keepAlive": false, "secure": true }, @@ -57,13 +57,13 @@ "timeToLive": { "unlimited": true }, - "id": "0a3e06bd-66b0-3577-c2ef-0d810ae5787f" + "id": "4b065c79-f3fb-39fd-3eef-be9db71e0d81" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/security/vulnerabilities/notification_rules/fjt-abw-hko", + "path": "/api/v2/security/vulnerabilities/notification_rules/flc-8up-dya", "keepAlive": false, "secure": true }, @@ -78,6 +78,6 @@ "timeToLive": { "unlimited": true }, - "id": "be2578d1-c5c1-f904-df54-5d53f54e8d47" + "id": "7ef6c260-4141-1591-3460-5184f5d5048b" } ] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_notification_rule_returns_Notification_rule_successfully_patched_response.freeze b/src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_notification_rule_returns_Notification_rule_successfully_patched_response.freeze index 31dc78bdc70..f3adcb384c9 100644 --- a/src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_notification_rule_returns_Notification_rule_successfully_patched_response.freeze +++ b/src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_notification_rule_returns_Notification_rule_successfully_patched_response.freeze @@ -1 +1 @@ -2026-08-18T08:25:54.935Z \ No newline at end of file +2025-02-05T13:46:15.824Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_notification_rule_returns_Notification_rule_successfully_patched_response.json b/src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_notification_rule_returns_Notification_rule_successfully_patched_response.json index 395ff00377e..fc356df380f 100644 --- a/src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_notification_rule_returns_Notification_rule_successfully_patched_response.json +++ b/src/test/resources/cassettes/features/v2/Patch_a_vulnerability_based_notification_rule_returns_Notification_rule_successfully_patched_response.json @@ -3,7 +3,7 @@ "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Rule 17870415-0000-0000-0000-178704155400\",\"selectors\":{\"query\":\"env:test\",\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"severities\":[\"critical\"],\"trigger_source\":\"security_findings\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":86400},\"type\":\"notification_rules\"}}" + "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Test-Patch_a_vulnerability_based_notification_rule_returns_Notification_rule_successfully_patched_respons-1738763175\",\"selectors\":{\"query\":\"env:test\",\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"severities\":[\"critical\"],\"trigger_source\":\"security_findings\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":86400},\"type\":\"notification_rules\"}}" }, "headers": {}, "method": "POST", @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"9be-hlt-vgl\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1787041555020,\"created_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"enabled\":true,\"modified_at\":1787041555020,\"modified_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"name\":\"Rule 17870415-0000-0000-0000-178704155400\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"query\":\"env:test\",\"trigger_source\":\"security_findings\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":86400,\"version\":1}}}", + "body": "{\"data\":{\"id\":\"tnd-jgq-yl5\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1738763176297,\"created_by\":{\"name\":\"\",\"handle\":\"\"},\"enabled\":true,\"modified_at\":1738763176297,\"modified_by\":{\"name\":\"\",\"handle\":\"\"},\"name\":\"Test-Patch_a_vulnerability_based_notification_rule_returns_Notification_rule_successfully_patched_respons-1738763175\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"query\":\"env:test\",\"trigger_source\":\"security_findings\"},\"targets\":[\"@email@email.com\"],\"time_aggregation\":86400,\"version\":1}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -27,22 +27,22 @@ "timeToLive": { "unlimited": true }, - "id": "954c10d9-9045-618d-9230-cb4ccc7e1a92" + "id": "2816c69c-2e82-9bfb-03d3-455a87ab322c" }, { "httpRequest": { "body": { "type": "JSON", - "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Rule 17870415-0000-0000-0000-178704155400\",\"selectors\":{\"query\":\"(source:production_service OR env:prod)\",\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"severities\":[\"critical\"],\"trigger_source\":\"security_findings\"},\"targets\":[\"@john.doe@email.com\"],\"time_aggregation\":86400,\"version\":1},\"id\":\"aaa-bbb-ccc\",\"type\":\"notification_rules\"}}" + "json": "{\"data\":{\"attributes\":{\"enabled\":true,\"name\":\"Rule 1\",\"selectors\":{\"query\":\"(source:production_service OR env:prod)\",\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"severities\":[\"critical\"],\"trigger_source\":\"security_findings\"},\"targets\":[\"@john.doe@email.com\"],\"time_aggregation\":86400,\"version\":1},\"id\":\"aaa-bbb-ccc\",\"type\":\"notification_rules\"}}" }, "headers": {}, "method": "PATCH", - "path": "/api/v2/security/vulnerabilities/notification_rules/9be-hlt-vgl", + "path": "/api/v2/security/vulnerabilities/notification_rules/tnd-jgq-yl5", "keepAlive": false, "secure": true }, "httpResponse": { - "body": "{\"data\":{\"id\":\"9be-hlt-vgl\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1787041555020,\"created_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"enabled\":true,\"modified_at\":1787041555144,\"modified_by\":{\"name\":\"CI Account\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\"},\"name\":\"Rule 17870415-0000-0000-0000-178704155400\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"query\":\"(source:production_service OR env:prod)\",\"trigger_source\":\"security_findings\"},\"targets\":[\"@john.doe@email.com\"],\"time_aggregation\":86400,\"version\":2}}}", + "body": "{\"data\":{\"id\":\"tnd-jgq-yl5\",\"type\":\"notification_rules\",\"attributes\":{\"created_at\":1738763176297,\"created_by\":{\"name\":\"\",\"handle\":\"\"},\"enabled\":true,\"modified_at\":1738763176649,\"modified_by\":{\"name\":\"\",\"handle\":\"\"},\"name\":\"Rule 1\",\"selectors\":{\"severities\":[\"critical\"],\"rule_types\":[\"misconfiguration\",\"attack_path\"],\"query\":\"(source:production_service OR env:prod)\",\"trigger_source\":\"security_findings\"},\"targets\":[\"@john.doe@email.com\"],\"time_aggregation\":86400,\"version\":2}}}", "headers": { "Content-Type": [ "application/vnd.api+json" @@ -57,13 +57,13 @@ "timeToLive": { "unlimited": true }, - "id": "bb1bd9e7-c23a-dd43-5db0-10fe1ed64770" + "id": "18d1a012-6f5f-edd9-243f-d3a690f16b9f" }, { "httpRequest": { "headers": {}, "method": "DELETE", - "path": "/api/v2/security/vulnerabilities/notification_rules/9be-hlt-vgl", + "path": "/api/v2/security/vulnerabilities/notification_rules/tnd-jgq-yl5", "keepAlive": false, "secure": true }, @@ -78,6 +78,6 @@ "timeToLive": { "unlimited": true }, - "id": "45dbc535-d970-35fd-bd0b-333e0bb1d0ff" + "id": "69292c45-0ff0-c662-9612-fd7cbc52008f" } ] \ No newline at end of file diff --git a/src/test/resources/com/datadog/api/client/v2/api/elastic_cloud.feature b/src/test/resources/com/datadog/api/client/v2/api/elastic_cloud.feature new file mode 100644 index 00000000000..6d9c64d49e9 --- /dev/null +++ b/src/test/resources/com/datadog/api/client/v2/api/elastic_cloud.feature @@ -0,0 +1,128 @@ +@endpoint(elastic-cloud) @endpoint(elastic-cloud-v2) +Feature: Elastic Cloud + Manage Elastic Cloud integration accounts. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "ElasticCloud" API + + @generated @skip @team:DataDog/saas-integrations + Scenario: Create an Elastic Cloud integration account returns "Bad Request" response + Given operation "CreateElasticCloudIntegrationAccount" enabled + And new "CreateElasticCloudIntegrationAccount" request + And body with value {"data": {"attributes": {"authentication": {"password": "your-password", "type": "basic", "username": "datadog"}, "dataflows": {"elastic-cloud-detailed-index-stats": {"enabled": true}, "elastic-cloud-index-stats": {"enabled": true}, "elastic-cloud-metrics": {"enabled": true}, "elastic-cloud-pending-task-stats": {"enabled": true}, "elastic-cloud-primary-shard-graceful-timeout": {"enabled": true}, "elastic-cloud-primary-shard-stats": {"enabled": true}, "elastic-cloud-shard-allocation-stats": {"enabled": true}, "elastic-cloud-slm-stats": {"enabled": true}}, "name": "elastic-cloud-prod", "settings": {"tags": ["env:prod"], "url": "https://example.es.us-central1.gcp.cloud.es.io:9243"}}, "type": "integration-account"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/saas-integrations + Scenario: Create an Elastic Cloud integration account returns "Created" response + Given operation "CreateElasticCloudIntegrationAccount" enabled + And new "CreateElasticCloudIntegrationAccount" request + And body with value {"data": {"attributes": {"authentication": {"password": "your-password", "type": "basic", "username": "datadog"}, "dataflows": {"elastic-cloud-detailed-index-stats": {"enabled": true}, "elastic-cloud-index-stats": {"enabled": true}, "elastic-cloud-metrics": {"enabled": true}, "elastic-cloud-pending-task-stats": {"enabled": true}, "elastic-cloud-primary-shard-graceful-timeout": {"enabled": true}, "elastic-cloud-primary-shard-stats": {"enabled": true}, "elastic-cloud-shard-allocation-stats": {"enabled": true}, "elastic-cloud-slm-stats": {"enabled": true}}, "name": "elastic-cloud-prod", "settings": {"tags": ["env:prod"], "url": "https://example.es.us-central1.gcp.cloud.es.io:9243"}}, "type": "integration-account"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/saas-integrations + Scenario: Create an Elastic Cloud integration account returns "Not Found" response + Given operation "CreateElasticCloudIntegrationAccount" enabled + And new "CreateElasticCloudIntegrationAccount" request + And body with value {"data": {"attributes": {"authentication": {"password": "your-password", "type": "basic", "username": "datadog"}, "dataflows": {"elastic-cloud-detailed-index-stats": {"enabled": true}, "elastic-cloud-index-stats": {"enabled": true}, "elastic-cloud-metrics": {"enabled": true}, "elastic-cloud-pending-task-stats": {"enabled": true}, "elastic-cloud-primary-shard-graceful-timeout": {"enabled": true}, "elastic-cloud-primary-shard-stats": {"enabled": true}, "elastic-cloud-shard-allocation-stats": {"enabled": true}, "elastic-cloud-slm-stats": {"enabled": true}}, "name": "elastic-cloud-prod", "settings": {"tags": ["env:prod"], "url": "https://example.es.us-central1.gcp.cloud.es.io:9243"}}, "type": "integration-account"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/saas-integrations + Scenario: Delete an Elastic Cloud integration account returns "Bad Request" response + Given operation "DeleteElasticCloudIntegrationAccount" enabled + And new "DeleteElasticCloudIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/saas-integrations + Scenario: Delete an Elastic Cloud integration account returns "No Content" response + Given operation "DeleteElasticCloudIntegrationAccount" enabled + And new "DeleteElasticCloudIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/saas-integrations + Scenario: Delete an Elastic Cloud integration account returns "Not Found" response + Given operation "DeleteElasticCloudIntegrationAccount" enabled + And new "DeleteElasticCloudIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/saas-integrations + Scenario: Get an Elastic Cloud integration account returns "Bad Request" response + Given operation "GetElasticCloudIntegrationAccount" enabled + And new "GetElasticCloudIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/saas-integrations + Scenario: Get an Elastic Cloud integration account returns "Not Found" response + Given operation "GetElasticCloudIntegrationAccount" enabled + And new "GetElasticCloudIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/saas-integrations + Scenario: Get an Elastic Cloud integration account returns "OK" response + Given operation "GetElasticCloudIntegrationAccount" enabled + And new "GetElasticCloudIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/saas-integrations + Scenario: List Elastic Cloud integration accounts returns "Bad Request" response + Given operation "ListElasticCloudIntegrationAccounts" enabled + And new "ListElasticCloudIntegrationAccounts" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/saas-integrations + Scenario: List Elastic Cloud integration accounts returns "Not Found" response + Given operation "ListElasticCloudIntegrationAccounts" enabled + And new "ListElasticCloudIntegrationAccounts" request + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/saas-integrations + Scenario: List Elastic Cloud integration accounts returns "OK" response + Given operation "ListElasticCloudIntegrationAccounts" enabled + And new "ListElasticCloudIntegrationAccounts" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/saas-integrations + Scenario: Update an Elastic Cloud integration account returns "Bad Request" response + Given operation "UpdateElasticCloudIntegrationAccount" enabled + And new "UpdateElasticCloudIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"authentication": {"password": "your-password", "type": "basic", "username": "datadog"}, "dataflows": {"elastic-cloud-detailed-index-stats": {"enabled": true}, "elastic-cloud-index-stats": {"enabled": true}, "elastic-cloud-metrics": {"enabled": true}, "elastic-cloud-pending-task-stats": {"enabled": true}, "elastic-cloud-primary-shard-graceful-timeout": {"enabled": true}, "elastic-cloud-primary-shard-stats": {"enabled": true}, "elastic-cloud-shard-allocation-stats": {"enabled": true}, "elastic-cloud-slm-stats": {"enabled": true}}, "name": "elastic-cloud-prod", "settings": {"tags": ["env:prod"], "url": "https://example.es.us-central1.gcp.cloud.es.io:9243"}}, "type": "integration-account"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/saas-integrations + Scenario: Update an Elastic Cloud integration account returns "Not Found" response + Given operation "UpdateElasticCloudIntegrationAccount" enabled + And new "UpdateElasticCloudIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"authentication": {"password": "your-password", "type": "basic", "username": "datadog"}, "dataflows": {"elastic-cloud-detailed-index-stats": {"enabled": true}, "elastic-cloud-index-stats": {"enabled": true}, "elastic-cloud-metrics": {"enabled": true}, "elastic-cloud-pending-task-stats": {"enabled": true}, "elastic-cloud-primary-shard-graceful-timeout": {"enabled": true}, "elastic-cloud-primary-shard-stats": {"enabled": true}, "elastic-cloud-shard-allocation-stats": {"enabled": true}, "elastic-cloud-slm-stats": {"enabled": true}}, "name": "elastic-cloud-prod", "settings": {"tags": ["env:prod"], "url": "https://example.es.us-central1.gcp.cloud.es.io:9243"}}, "type": "integration-account"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/saas-integrations + Scenario: Update an Elastic Cloud integration account returns "OK" response + Given operation "UpdateElasticCloudIntegrationAccount" enabled + And new "UpdateElasticCloudIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"authentication": {"password": "your-password", "type": "basic", "username": "datadog"}, "dataflows": {"elastic-cloud-detailed-index-stats": {"enabled": true}, "elastic-cloud-index-stats": {"enabled": true}, "elastic-cloud-metrics": {"enabled": true}, "elastic-cloud-pending-task-stats": {"enabled": true}, "elastic-cloud-primary-shard-graceful-timeout": {"enabled": true}, "elastic-cloud-primary-shard-stats": {"enabled": true}, "elastic-cloud-shard-allocation-stats": {"enabled": true}, "elastic-cloud-slm-stats": {"enabled": true}}, "name": "elastic-cloud-prod", "settings": {"tags": ["env:prod"], "url": "https://example.es.us-central1.gcp.cloud.es.io:9243"}}, "type": "integration-account"}} + When the request is sent + Then the response status is 200 OK diff --git a/src/test/resources/com/datadog/api/client/v2/api/given.json b/src/test/resources/com/datadog/api/client/v2/api/given.json index e4cee92d7aa..6e48ed1fc53 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/given.json +++ b/src/test/resources/com/datadog/api/client/v2/api/given.json @@ -1370,7 +1370,7 @@ "parameters": [ { "name": "body", - "value": "{\n \"data\": {\n \"type\": \"notification_rules\",\n \"attributes\": {\n \"name\": \"Rule {{ uuid }}\",\n \"selectors\": {\n \"rule_types\": [\"signal_correlation\"],\n \"trigger_source\": \"security_signals\",\n \"severities\": [\"critical\"],\n \"query\": \"env:test\"\n },\n \"targets\": [\"@email@email.com\"],\n \"enabled\": true\n }\n }\n}" + "value": "{\n \"data\": {\n \"type\": \"notification_rules\",\n \"attributes\": {\n \"name\": \"{{ unique }}\",\n \"selectors\": {\n \"rule_types\": [\"signal_correlation\"],\n \"trigger_source\": \"security_signals\",\n \"severities\": [\"critical\"],\n \"query\": \"env:test\"\n },\n \"targets\": [\"@email@email.com\"],\n \"enabled\": true\n }\n }\n}" } ], "step": "there is a valid \"valid_signal_notification_rule\" in the system", @@ -1382,7 +1382,7 @@ "parameters": [ { "name": "body", - "value": "{\n \"data\": {\n \"type\": \"notification_rules\",\n \"attributes\": {\n \"name\": \"Rule {{ uuid }}\",\n \"selectors\": {\n \"rule_types\": [\"misconfiguration\", \"attack_path\"],\n \"trigger_source\": \"security_findings\",\n \"severities\": [\"critical\"],\n \"query\": \"env:test\"\n },\n \"time_aggregation\": 86400,\n \"targets\": [\"@email@email.com\"],\n \"enabled\": true\n }\n }\n}" + "value": "{\n \"data\": {\n \"type\": \"notification_rules\",\n \"attributes\": {\n \"name\": \"{{ unique }}\",\n \"selectors\": {\n \"rule_types\": [\"misconfiguration\", \"attack_path\"],\n \"trigger_source\": \"security_findings\",\n \"severities\": [\"critical\"],\n \"query\": \"env:test\"\n },\n \"time_aggregation\": 86400,\n \"targets\": [\"@email@email.com\"],\n \"enabled\": true\n }\n }\n}" } ], "step": "there is a valid \"valid_vulnerability_notification_rule\" in the system", diff --git a/src/test/resources/com/datadog/api/client/v2/api/security_monitoring.feature b/src/test/resources/com/datadog/api/client/v2/api/security_monitoring.feature index 69917526a2d..14f3d34a11d 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/security_monitoring.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/security_monitoring.feature @@ -883,7 +883,7 @@ Feature: Security Monitoring @team:DataDog/cloud-security-posture-management Scenario: Create a new signal-based notification rule returns "Successfully created the notification rule." response Given new "CreateSignalNotificationRule" request - And body with value {"data": {"attributes": {"enabled": true, "name": "Rule {{ uuid }}", "selectors": {"query": "(source:production_service OR env:prod)", "rule_types": ["misconfiguration", "attack_path"], "severities": ["critical"], "trigger_source": "security_findings"}, "targets": ["@john.doe@email.com"], "time_aggregation": 86400}, "type": "notification_rules"}} + And body with value {"data": {"attributes": {"enabled": true, "name": "Rule 1", "selectors": {"query": "(source:production_service OR env:prod)", "rule_types": ["misconfiguration", "attack_path"], "severities": ["critical"], "trigger_source": "security_findings"}, "targets": ["@john.doe@email.com"], "time_aggregation": 86400}, "type": "notification_rules"}} When the request is sent Then the response status is 201 Successfully created the notification rule. @@ -897,7 +897,7 @@ Feature: Security Monitoring @team:DataDog/cloud-security-posture-management Scenario: Create a new vulnerability-based notification rule returns "Successfully created the notification rule." response Given new "CreateVulnerabilityNotificationRule" request - And body with value {"data": {"attributes": {"enabled": true, "name": "Rule {{ uuid }}", "selectors": {"query": "(source:production_service OR env:prod)", "rule_types": ["misconfiguration", "attack_path"], "severities": ["critical"], "trigger_source": "security_findings"}, "targets": ["@john.doe@email.com"], "time_aggregation": 86400}, "type": "notification_rules"}} + And body with value {"data": {"attributes": {"enabled": true, "name": "Rule 1", "selectors": {"query": "(source:production_service OR env:prod)", "rule_types": ["misconfiguration", "attack_path"], "severities": ["critical"], "trigger_source": "security_findings"}, "targets": ["@john.doe@email.com"], "time_aggregation": 86400}, "type": "notification_rules"}} When the request is sent Then the response status is 201 Successfully created the notification rule. @@ -2810,7 +2810,7 @@ Feature: Security Monitoring Given new "PatchSignalNotificationRule" request And there is a valid "valid_signal_notification_rule" in the system And request contains "id" parameter from "valid_signal_notification_rule.data.id" - And body with value {"data": {"attributes": {"enabled": true, "name": "Rule {{ uuid }}", "selectors": {"query": "(source:production_service OR env:prod)", "rule_types": ["misconfiguration", "attack_path"], "severities": ["critical"], "trigger_source": "security_findings"}, "targets": ["@john.doe@email.com"], "time_aggregation": 86400, "version": 1}, "id": "aaa-bbb-ccc", "type": "notification_rules"}} + And body with value {"data": {"attributes": {"enabled": true, "name": "Rule 1", "selectors": {"query": "(source:production_service OR env:prod)", "rule_types": ["misconfiguration", "attack_path"], "severities": ["critical"], "trigger_source": "security_findings"}, "targets": ["@john.doe@email.com"], "time_aggregation": 86400, "version": 1}, "id": "aaa-bbb-ccc", "type": "notification_rules"}} When the request is sent Then the response status is 200 Notification rule successfully patched. @@ -2844,7 +2844,7 @@ Feature: Security Monitoring Given new "PatchVulnerabilityNotificationRule" request And there is a valid "valid_vulnerability_notification_rule" in the system And request contains "id" parameter from "valid_vulnerability_notification_rule.data.id" - And body with value {"data": {"attributes": {"enabled": true, "name": "Rule {{ uuid }}", "selectors": {"query": "(source:production_service OR env:prod)", "rule_types": ["misconfiguration", "attack_path"], "severities": ["critical"], "trigger_source": "security_findings"}, "targets": ["@john.doe@email.com"], "time_aggregation": 86400, "version": 1}, "id": "aaa-bbb-ccc", "type": "notification_rules"}} + And body with value {"data": {"attributes": {"enabled": true, "name": "Rule 1", "selectors": {"query": "(source:production_service OR env:prod)", "rule_types": ["misconfiguration", "attack_path"], "severities": ["critical"], "trigger_source": "security_findings"}, "targets": ["@john.doe@email.com"], "time_aggregation": 86400, "version": 1}, "id": "aaa-bbb-ccc", "type": "notification_rules"}} When the request is sent Then the response status is 200 Notification rule successfully patched. diff --git a/src/test/resources/com/datadog/api/client/v2/api/twilio_integration_accounts.feature b/src/test/resources/com/datadog/api/client/v2/api/twilio_integration_accounts.feature new file mode 100644 index 00000000000..a41b9495240 --- /dev/null +++ b/src/test/resources/com/datadog/api/client/v2/api/twilio_integration_accounts.feature @@ -0,0 +1,133 @@ +@endpoint(twilio-integration-accounts) @endpoint(twilio-integration-accounts-v2) +Feature: Twilio Integration Accounts + Manage your Datadog Twilio integration accounts directly through the + Datadog API. Create, update, and delete accounts, configure authentication + and settings, and enable or disable dataflows such as message logs, event + logs, alerts, call summaries, and Cloud Cost Management metrics. See the + [Twilio integration page](https://docs.datadoghq.com/integrations/twilio/) + for more information. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "TwilioIntegrationAccounts" API + + @generated @skip @team:DataDog/saas-integrations + Scenario: Create a Twilio integration account returns "Bad Request" response + Given operation "CreateTwilioIntegrationAccount" enabled + And new "CreateTwilioIntegrationAccount" request + And body with value {"data": {"attributes": {"authentication": {"password": "your-password", "type": "basic", "username": "datadog"}, "dataflows": {"twilio-alerts-logs": {"enabled": true}, "twilio-call-summaries-logs": {"enabled": true}, "twilio-cloud-cost-metrics": {"enabled": true}, "twilio-events-logs": {"enabled": true}, "twilio-messages-logs": {"enabled": true}}, "name": "twilio-prod", "settings": {"account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "censor_logs": true}}, "type": "integration-account"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/saas-integrations + Scenario: Create a Twilio integration account returns "Created" response + Given operation "CreateTwilioIntegrationAccount" enabled + And new "CreateTwilioIntegrationAccount" request + And body with value {"data": {"attributes": {"authentication": {"password": "your-password", "type": "basic", "username": "datadog"}, "dataflows": {"twilio-alerts-logs": {"enabled": true}, "twilio-call-summaries-logs": {"enabled": true}, "twilio-cloud-cost-metrics": {"enabled": true}, "twilio-events-logs": {"enabled": true}, "twilio-messages-logs": {"enabled": true}}, "name": "twilio-prod", "settings": {"account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "censor_logs": true}}, "type": "integration-account"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/saas-integrations + Scenario: Create a Twilio integration account returns "Not Found" response + Given operation "CreateTwilioIntegrationAccount" enabled + And new "CreateTwilioIntegrationAccount" request + And body with value {"data": {"attributes": {"authentication": {"password": "your-password", "type": "basic", "username": "datadog"}, "dataflows": {"twilio-alerts-logs": {"enabled": true}, "twilio-call-summaries-logs": {"enabled": true}, "twilio-cloud-cost-metrics": {"enabled": true}, "twilio-events-logs": {"enabled": true}, "twilio-messages-logs": {"enabled": true}}, "name": "twilio-prod", "settings": {"account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "censor_logs": true}}, "type": "integration-account"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/saas-integrations + Scenario: Delete a Twilio integration account returns "Bad Request" response + Given operation "DeleteTwilioIntegrationAccount" enabled + And new "DeleteTwilioIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/saas-integrations + Scenario: Delete a Twilio integration account returns "No Content" response + Given operation "DeleteTwilioIntegrationAccount" enabled + And new "DeleteTwilioIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/saas-integrations + Scenario: Delete a Twilio integration account returns "Not Found" response + Given operation "DeleteTwilioIntegrationAccount" enabled + And new "DeleteTwilioIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/saas-integrations + Scenario: Get a Twilio integration account returns "Bad Request" response + Given operation "GetTwilioIntegrationAccount" enabled + And new "GetTwilioIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/saas-integrations + Scenario: Get a Twilio integration account returns "Not Found" response + Given operation "GetTwilioIntegrationAccount" enabled + And new "GetTwilioIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/saas-integrations + Scenario: Get a Twilio integration account returns "OK" response + Given operation "GetTwilioIntegrationAccount" enabled + And new "GetTwilioIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/saas-integrations + Scenario: List Twilio integration accounts returns "Bad Request" response + Given operation "ListTwilioIntegrationAccounts" enabled + And new "ListTwilioIntegrationAccounts" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/saas-integrations + Scenario: List Twilio integration accounts returns "Not Found" response + Given operation "ListTwilioIntegrationAccounts" enabled + And new "ListTwilioIntegrationAccounts" request + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/saas-integrations + Scenario: List Twilio integration accounts returns "OK" response + Given operation "ListTwilioIntegrationAccounts" enabled + And new "ListTwilioIntegrationAccounts" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/saas-integrations + Scenario: Update a Twilio integration account returns "Bad Request" response + Given operation "UpdateTwilioIntegrationAccount" enabled + And new "UpdateTwilioIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"authentication": {"password": "your-password", "type": "basic", "username": "datadog"}, "dataflows": {"twilio-alerts-logs": {"enabled": true}, "twilio-call-summaries-logs": {"enabled": true}, "twilio-cloud-cost-metrics": {"enabled": true}, "twilio-events-logs": {"enabled": true}, "twilio-messages-logs": {"enabled": true}}, "name": "twilio-prod", "settings": {"account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "censor_logs": true}}, "type": "integration-account"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/saas-integrations + Scenario: Update a Twilio integration account returns "Not Found" response + Given operation "UpdateTwilioIntegrationAccount" enabled + And new "UpdateTwilioIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"authentication": {"password": "your-password", "type": "basic", "username": "datadog"}, "dataflows": {"twilio-alerts-logs": {"enabled": true}, "twilio-call-summaries-logs": {"enabled": true}, "twilio-cloud-cost-metrics": {"enabled": true}, "twilio-events-logs": {"enabled": true}, "twilio-messages-logs": {"enabled": true}}, "name": "twilio-prod", "settings": {"account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "censor_logs": true}}, "type": "integration-account"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/saas-integrations + Scenario: Update a Twilio integration account returns "OK" response + Given operation "UpdateTwilioIntegrationAccount" enabled + And new "UpdateTwilioIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"authentication": {"password": "your-password", "type": "basic", "username": "datadog"}, "dataflows": {"twilio-alerts-logs": {"enabled": true}, "twilio-call-summaries-logs": {"enabled": true}, "twilio-cloud-cost-metrics": {"enabled": true}, "twilio-events-logs": {"enabled": true}, "twilio-messages-logs": {"enabled": true}}, "name": "twilio-prod", "settings": {"account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "censor_logs": true}}, "type": "integration-account"}} + When the request is sent + Then the response status is 200 OK diff --git a/src/test/resources/com/datadog/api/client/v2/api/undo.json b/src/test/resources/com/datadog/api/client/v2/api/undo.json index df961ee10c8..3fd94f767a8 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 @@ -3457,6 +3457,80 @@ "type": "idempotent" } }, + "ListElasticCloudIntegrationAccounts": { + "tag": "Elastic Cloud", + "undo": { + "type": "safe" + } + }, + "CreateElasticCloudIntegrationAccount": { + "tag": "Elastic Cloud", + "undo": { + "operationId": "DeleteElasticCloudIntegrationAccount", + "parameters": [ + { + "name": "account_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DeleteElasticCloudIntegrationAccount": { + "tag": "Elastic Cloud", + "undo": { + "type": "idempotent" + } + }, + "GetElasticCloudIntegrationAccount": { + "tag": "Elastic Cloud", + "undo": { + "type": "safe" + } + }, + "UpdateElasticCloudIntegrationAccount": { + "tag": "Elastic Cloud", + "undo": { + "type": "idempotent" + } + }, + "ListTwilioIntegrationAccounts": { + "tag": "Twilio Integration Accounts", + "undo": { + "type": "safe" + } + }, + "CreateTwilioIntegrationAccount": { + "tag": "Twilio Integration Accounts", + "undo": { + "operationId": "DeleteTwilioIntegrationAccount", + "parameters": [ + { + "name": "account_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DeleteTwilioIntegrationAccount": { + "tag": "Twilio Integration Accounts", + "undo": { + "type": "idempotent" + } + }, + "GetTwilioIntegrationAccount": { + "tag": "Twilio Integration Accounts", + "undo": { + "type": "safe" + } + }, + "UpdateTwilioIntegrationAccount": { + "tag": "Twilio Integration Accounts", + "undo": { + "type": "idempotent" + } + }, "ListAWSAccounts": { "tag": "AWS Integration", "undo": {