From 47f8f823ec1cc9089c7f8251f7ba5c9e2d002c31 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Thu, 30 Jul 2026 13:06:06 +0000 Subject: [PATCH] Regenerate client from commit 1ecf794 of spec repo --- .generator/schemas/v2/openapi.yaml | 1391 +++++++++++++++++ .../CreateElasticCloudCcmAccount.rb | 30 + .../DeleteElasticCloudCcmAccount.rb | 8 + .../GetElasticCloudCcmAccount.rb | 8 + .../ListElasticCloudCcmAccounts.rb | 8 + .../UpdateElasticCloudCcmAccount.rb | 30 + .../CreateElasticCloudMonitoringAccount.rb | 41 + .../DeleteElasticCloudMonitoringAccount.rb | 8 + .../GetElasticCloudMonitoringAccount.rb | 8 + .../ListElasticCloudMonitoringAccounts.rb | 8 + .../UpdateElasticCloudMonitoringAccount.rb | 41 + .../CreateTwilioAccount.rb | 32 + .../DeleteTwilioAccount.rb | 8 + .../GetTwilioAccount.rb | 8 + .../ListTwilioAccounts.rb | 8 + .../UpdateTwilioAccount.rb | 32 + features/scenarios_model_mapping.rb | 39 + ...lastic_cloud_cloud_cost_management.feature | 131 ++ features/v2/elastic_cloud_monitoring.feature | 130 ++ .../v2/twilio_integration_accounts.feature | 130 ++ features/v2/undo.json | 111 ++ lib/datadog_api_client/configuration.rb | 15 + lib/datadog_api_client/inflector.rb | 55 + ...elastic_cloud_cloud_cost_management_api.rb | 385 +++++ .../v2/api/elastic_cloud_monitoring_api.rb | 385 +++++ .../v2/api/twilio_integration_accounts_api.rb | 385 +++++ .../v2/models/elastic_cloud_authentication.rb | 62 + .../v2/models/elastic_cloud_basic_auth.rb | 165 ++ .../models/elastic_cloud_basic_auth_type.rb | 26 + .../elastic_cloud_ccm_account_attributes.rb | 176 +++ .../elastic_cloud_ccm_account_create_data.rb | 144 ++ .../models/elastic_cloud_ccm_account_data.rb | 165 ++ .../elastic_cloud_ccm_account_request.rb | 123 ++ .../elastic_cloud_ccm_account_response.rb | 105 ++ ...tic_cloud_ccm_account_update_attributes.rb | 137 ++ .../elastic_cloud_ccm_account_update_data.rb | 144 ++ ...lastic_cloud_ccm_account_update_request.rb | 123 ++ .../elastic_cloud_ccm_accounts_response.rb | 107 ++ .../elastic_cloud_ccm_authentication.rb | 62 + .../v2/models/elastic_cloud_ccm_dataflow.rb | 143 ++ .../models/elastic_cloud_ccm_dataflow_id.rb | 26 + .../v2/models/elastic_cloud_ccm_settings.rb | 123 ++ .../elastic_cloud_ccm_settings_update.rb | 105 ++ .../v2/models/elastic_cloud_ccm_token_auth.rb | 144 ++ .../elastic_cloud_ccm_token_auth_type.rb | 26 + .../v2/models/elastic_cloud_dataflow.rb | 143 ++ .../v2/models/elastic_cloud_dataflow_id.rb | 26 + ...tic_cloud_monitoring_account_attributes.rb | 176 +++ ...ic_cloud_monitoring_account_create_data.rb | 144 ++ .../elastic_cloud_monitoring_account_data.rb | 165 ++ ...lastic_cloud_monitoring_account_request.rb | 123 ++ ...astic_cloud_monitoring_account_response.rb | 105 ++ ...ud_monitoring_account_update_attributes.rb | 137 ++ ...ic_cloud_monitoring_account_update_data.rb | 144 ++ ...cloud_monitoring_account_update_request.rb | 123 ++ ...stic_cloud_monitoring_accounts_response.rb | 107 ++ .../v2/models/elastic_cloud_settings.rb | 205 +++ .../models/elastic_cloud_settings_update.rb | 187 +++ .../integration_account_dataflow_health.rb | 28 + .../integration_account_dataflow_status.rb | 125 ++ .../models/integration_account_permissions.rb | 115 ++ .../v2/models/integration_account_type.rb | 26 + .../v2/models/twilio_account_attributes.rb | 176 +++ .../v2/models/twilio_account_create_data.rb | 144 ++ .../v2/models/twilio_account_data.rb | 165 ++ .../v2/models/twilio_account_request.rb | 123 ++ .../v2/models/twilio_account_response.rb | 105 ++ .../twilio_account_update_attributes.rb | 137 ++ .../v2/models/twilio_account_update_data.rb | 144 ++ .../models/twilio_account_update_request.rb | 123 ++ .../v2/models/twilio_accounts_response.rb | 107 ++ .../v2/models/twilio_authentication.rb | 62 + .../v2/models/twilio_basic_auth.rb | 165 ++ .../v2/models/twilio_basic_auth_type.rb | 26 + .../v2/models/twilio_dataflow.rb | 143 ++ .../v2/models/twilio_dataflow_id.rb | 30 + .../v2/models/twilio_settings.rb | 133 ++ .../v2/models/twilio_settings_update.rb | 115 ++ 78 files changed, 9518 insertions(+) create mode 100644 examples/v2/elastic-cloud-cloud-cost-management/CreateElasticCloudCcmAccount.rb create mode 100644 examples/v2/elastic-cloud-cloud-cost-management/DeleteElasticCloudCcmAccount.rb create mode 100644 examples/v2/elastic-cloud-cloud-cost-management/GetElasticCloudCcmAccount.rb create mode 100644 examples/v2/elastic-cloud-cloud-cost-management/ListElasticCloudCcmAccounts.rb create mode 100644 examples/v2/elastic-cloud-cloud-cost-management/UpdateElasticCloudCcmAccount.rb create mode 100644 examples/v2/elastic-cloud-monitoring/CreateElasticCloudMonitoringAccount.rb create mode 100644 examples/v2/elastic-cloud-monitoring/DeleteElasticCloudMonitoringAccount.rb create mode 100644 examples/v2/elastic-cloud-monitoring/GetElasticCloudMonitoringAccount.rb create mode 100644 examples/v2/elastic-cloud-monitoring/ListElasticCloudMonitoringAccounts.rb create mode 100644 examples/v2/elastic-cloud-monitoring/UpdateElasticCloudMonitoringAccount.rb create mode 100644 examples/v2/twilio-integration-accounts/CreateTwilioAccount.rb create mode 100644 examples/v2/twilio-integration-accounts/DeleteTwilioAccount.rb create mode 100644 examples/v2/twilio-integration-accounts/GetTwilioAccount.rb create mode 100644 examples/v2/twilio-integration-accounts/ListTwilioAccounts.rb create mode 100644 examples/v2/twilio-integration-accounts/UpdateTwilioAccount.rb create mode 100644 features/v2/elastic_cloud_cloud_cost_management.feature create mode 100644 features/v2/elastic_cloud_monitoring.feature create mode 100644 features/v2/twilio_integration_accounts.feature create mode 100644 lib/datadog_api_client/v2/api/elastic_cloud_cloud_cost_management_api.rb create mode 100644 lib/datadog_api_client/v2/api/elastic_cloud_monitoring_api.rb create mode 100644 lib/datadog_api_client/v2/api/twilio_integration_accounts_api.rb create mode 100644 lib/datadog_api_client/v2/models/elastic_cloud_authentication.rb create mode 100644 lib/datadog_api_client/v2/models/elastic_cloud_basic_auth.rb create mode 100644 lib/datadog_api_client/v2/models/elastic_cloud_basic_auth_type.rb create mode 100644 lib/datadog_api_client/v2/models/elastic_cloud_ccm_account_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/elastic_cloud_ccm_account_create_data.rb create mode 100644 lib/datadog_api_client/v2/models/elastic_cloud_ccm_account_data.rb create mode 100644 lib/datadog_api_client/v2/models/elastic_cloud_ccm_account_request.rb create mode 100644 lib/datadog_api_client/v2/models/elastic_cloud_ccm_account_response.rb create mode 100644 lib/datadog_api_client/v2/models/elastic_cloud_ccm_account_update_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/elastic_cloud_ccm_account_update_data.rb create mode 100644 lib/datadog_api_client/v2/models/elastic_cloud_ccm_account_update_request.rb create mode 100644 lib/datadog_api_client/v2/models/elastic_cloud_ccm_accounts_response.rb create mode 100644 lib/datadog_api_client/v2/models/elastic_cloud_ccm_authentication.rb create mode 100644 lib/datadog_api_client/v2/models/elastic_cloud_ccm_dataflow.rb create mode 100644 lib/datadog_api_client/v2/models/elastic_cloud_ccm_dataflow_id.rb create mode 100644 lib/datadog_api_client/v2/models/elastic_cloud_ccm_settings.rb create mode 100644 lib/datadog_api_client/v2/models/elastic_cloud_ccm_settings_update.rb create mode 100644 lib/datadog_api_client/v2/models/elastic_cloud_ccm_token_auth.rb create mode 100644 lib/datadog_api_client/v2/models/elastic_cloud_ccm_token_auth_type.rb create mode 100644 lib/datadog_api_client/v2/models/elastic_cloud_dataflow.rb create mode 100644 lib/datadog_api_client/v2/models/elastic_cloud_dataflow_id.rb create mode 100644 lib/datadog_api_client/v2/models/elastic_cloud_monitoring_account_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/elastic_cloud_monitoring_account_create_data.rb create mode 100644 lib/datadog_api_client/v2/models/elastic_cloud_monitoring_account_data.rb create mode 100644 lib/datadog_api_client/v2/models/elastic_cloud_monitoring_account_request.rb create mode 100644 lib/datadog_api_client/v2/models/elastic_cloud_monitoring_account_response.rb create mode 100644 lib/datadog_api_client/v2/models/elastic_cloud_monitoring_account_update_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/elastic_cloud_monitoring_account_update_data.rb create mode 100644 lib/datadog_api_client/v2/models/elastic_cloud_monitoring_account_update_request.rb create mode 100644 lib/datadog_api_client/v2/models/elastic_cloud_monitoring_accounts_response.rb create mode 100644 lib/datadog_api_client/v2/models/elastic_cloud_settings.rb create mode 100644 lib/datadog_api_client/v2/models/elastic_cloud_settings_update.rb create mode 100644 lib/datadog_api_client/v2/models/integration_account_dataflow_health.rb create mode 100644 lib/datadog_api_client/v2/models/integration_account_dataflow_status.rb create mode 100644 lib/datadog_api_client/v2/models/integration_account_permissions.rb create mode 100644 lib/datadog_api_client/v2/models/integration_account_type.rb create mode 100644 lib/datadog_api_client/v2/models/twilio_account_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/twilio_account_create_data.rb create mode 100644 lib/datadog_api_client/v2/models/twilio_account_data.rb create mode 100644 lib/datadog_api_client/v2/models/twilio_account_request.rb create mode 100644 lib/datadog_api_client/v2/models/twilio_account_response.rb create mode 100644 lib/datadog_api_client/v2/models/twilio_account_update_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/twilio_account_update_data.rb create mode 100644 lib/datadog_api_client/v2/models/twilio_account_update_request.rb create mode 100644 lib/datadog_api_client/v2/models/twilio_accounts_response.rb create mode 100644 lib/datadog_api_client/v2/models/twilio_authentication.rb create mode 100644 lib/datadog_api_client/v2/models/twilio_basic_auth.rb create mode 100644 lib/datadog_api_client/v2/models/twilio_basic_auth_type.rb create mode 100644 lib/datadog_api_client/v2/models/twilio_dataflow.rb create mode 100644 lib/datadog_api_client/v2/models/twilio_dataflow_id.rb create mode 100644 lib/datadog_api_client/v2/models/twilio_settings.rb create mode 100644 lib/datadog_api_client/v2/models/twilio_settings_update.rb diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 93f9955949ca..07abed576d81 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -885,6 +885,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" @@ -33979,6 +33986,440 @@ components: - score - severity type: object + ElasticCloudAuthentication: + description: >- + Authentication methods supported by the Elastic Cloud monitoring interface. Exactly one is set, selected by its `type`. + oneOf: + - $ref: "#/components/schemas/ElasticCloudBasicAuth" + ElasticCloudBasicAuth: + description: Username & password authentication for Elastic Cloud. + properties: + password: + description: Password used to authenticate against the deployment. This field is not returned by the API. + example: your-password + type: string + writeOnly: true + type: + $ref: "#/components/schemas/ElasticCloudBasicAuthType" + username: + description: Username used to authenticate against the deployment. + example: datadog + type: string + required: + - type + - username + - password + type: object + ElasticCloudBasicAuthType: + default: basic + description: Authentication method discriminator. + enum: + - basic + example: basic + type: string + x-enum-varnames: + - BASIC + ElasticCloudCcmAccountAttributes: + description: >- + Attributes of an Elastic Cloud CCM (Cloud Cost Management) account. The configuration is hoisted directly onto the attributes; there is no interface wrapper because the `elastic-cloud-ccm` interface is fixed by the endpoint path. + properties: + authentication: + $ref: "#/components/schemas/ElasticCloudCcmAuthentication" + dataflows: + description: Dataflows for the Elastic Cloud CCM interface. + items: + $ref: "#/components/schemas/ElasticCloudCcmDataflow" + type: array + name: + description: Human-readable name of the account. + example: elastic-cloud-ccm-prod + type: string + permissions: + $ref: "#/components/schemas/IntegrationAccountPermissions" + settings: + $ref: "#/components/schemas/ElasticCloudCcmSettings" + required: + - name + - authentication + type: object + ElasticCloudCcmAccountCreateData: + description: Data envelope for creating an Elastic Cloud CCM account. + properties: + attributes: + $ref: "#/components/schemas/ElasticCloudCcmAccountAttributes" + type: + $ref: "#/components/schemas/IntegrationAccountType" + required: + - type + - attributes + type: object + ElasticCloudCcmAccountData: + description: Data envelope of an Elastic Cloud CCM account, including server-assigned identity. + properties: + attributes: + $ref: "#/components/schemas/ElasticCloudCcmAccountAttributes" + 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 + ElasticCloudCcmAccountRequest: + description: Request payload to create an Elastic Cloud CCM (Cloud Cost Management) account. + properties: + data: + $ref: "#/components/schemas/ElasticCloudCcmAccountCreateData" + required: + - data + type: object + ElasticCloudCcmAccountResponse: + description: Response payload for a single Elastic Cloud CCM account. + properties: + data: + $ref: "#/components/schemas/ElasticCloudCcmAccountData" + type: object + ElasticCloudCcmAccountUpdateAttributes: + description: >- + Updatable attributes of an Elastic Cloud CCM account. Every field is optional; only the fields provided are changed. + properties: + authentication: + $ref: "#/components/schemas/ElasticCloudCcmAuthentication" + dataflows: + description: Dataflows for the Elastic Cloud CCM interface. + items: + $ref: "#/components/schemas/ElasticCloudCcmDataflow" + type: array + name: + description: Human-readable name of the account. + example: elastic-cloud-ccm-prod + type: string + settings: + $ref: "#/components/schemas/ElasticCloudCcmSettingsUpdate" + type: object + ElasticCloudCcmAccountUpdateData: + description: Data envelope for updating an Elastic Cloud CCM account. + properties: + attributes: + $ref: "#/components/schemas/ElasticCloudCcmAccountUpdateAttributes" + type: + $ref: "#/components/schemas/IntegrationAccountType" + required: + - type + - attributes + type: object + ElasticCloudCcmAccountUpdateRequest: + description: Request payload to update an Elastic Cloud CCM account as a partial merge. + properties: + data: + $ref: "#/components/schemas/ElasticCloudCcmAccountUpdateData" + required: + - data + type: object + ElasticCloudCcmAccountsResponse: + description: Response payload for a list of Elastic Cloud CCM accounts. + properties: + data: + description: List of Elastic Cloud CCM accounts. + items: + $ref: "#/components/schemas/ElasticCloudCcmAccountData" + type: array + type: object + ElasticCloudCcmAuthentication: + description: >- + Authentication methods supported by the Elastic Cloud CCM interface. Exactly one is set, selected by its `type`. + oneOf: + - $ref: "#/components/schemas/ElasticCloudCcmTokenAuth" + ElasticCloudCcmDataflow: + description: An Elastic Cloud CCM dataflow toggle. The set of dataflow ids is fixed by the interface schema. + properties: + enabled: + description: Whether the dataflow is enabled. + example: true + type: boolean + id: + $ref: "#/components/schemas/ElasticCloudCcmDataflowId" + status: + $ref: "#/components/schemas/IntegrationAccountDataflowStatus" + required: + - id + type: object + ElasticCloudCcmDataflowId: + description: Identifier of an Elastic Cloud CCM dataflow. + enum: + - elastic-cloud-cost-data + example: elastic-cloud-cost-data + type: string + x-enum-varnames: + - COST_DATA + ElasticCloudCcmSettings: + description: Elastic Cloud CCM interface settings. + properties: + elastic_org_id: + description: Your Elastic Cloud organization ID, found in your organization settings. + example: "2079364244" + type: string + required: + - elastic_org_id + type: object + ElasticCloudCcmSettingsUpdate: + description: Partial Elastic Cloud CCM interface settings for updates. + properties: + elastic_org_id: + description: Your Elastic Cloud organization ID, found in your organization settings. + example: "2079364244" + type: string + type: object + ElasticCloudCcmTokenAuth: + description: Encrypted token (bearer token) authentication for Elastic Cloud CCM. + properties: + api_key: + description: >- + Billing API key. An Elastic Cloud API key with read access to both Billing and Deployments. Create one under Organization settings > API Keys. This field is not returned by the API. + example: your-billing-api-key + type: string + writeOnly: true + type: + $ref: "#/components/schemas/ElasticCloudCcmTokenAuthType" + required: + - type + - api_key + type: object + ElasticCloudCcmTokenAuthType: + default: bearer_token + description: Authentication method discriminator. + enum: + - bearer_token + example: bearer_token + type: string + x-enum-varnames: + - BEARER_TOKEN + ElasticCloudDataflow: + description: An Elastic Cloud monitoring dataflow toggle. The set of dataflow ids is fixed by the interface schema. + properties: + enabled: + description: Whether the dataflow is enabled. + example: true + type: boolean + id: + $ref: "#/components/schemas/ElasticCloudDataflowId" + status: + $ref: "#/components/schemas/IntegrationAccountDataflowStatus" + required: + - id + type: object + ElasticCloudDataflowId: + description: Identifier of an Elastic Cloud monitoring dataflow. + enum: + - elastic-cloud-metrics + example: elastic-cloud-metrics + type: string + x-enum-varnames: + - METRICS + ElasticCloudMonitoringAccountAttributes: + description: >- + Attributes of an Elastic Cloud monitoring account. The configuration is hoisted directly onto the attributes; there is no interface wrapper because the `elastic-cloud` interface is fixed by the endpoint path. + properties: + authentication: + $ref: "#/components/schemas/ElasticCloudAuthentication" + dataflows: + description: Dataflows for the Elastic Cloud monitoring interface. + items: + $ref: "#/components/schemas/ElasticCloudDataflow" + type: array + name: + description: Human-readable name of the account. + example: elastic-cloud-prod + type: string + permissions: + $ref: "#/components/schemas/IntegrationAccountPermissions" + settings: + $ref: "#/components/schemas/ElasticCloudSettings" + required: + - name + - authentication + type: object + ElasticCloudMonitoringAccountCreateData: + description: Data envelope for creating an Elastic Cloud monitoring account. + properties: + attributes: + $ref: "#/components/schemas/ElasticCloudMonitoringAccountAttributes" + type: + $ref: "#/components/schemas/IntegrationAccountType" + required: + - type + - attributes + type: object + ElasticCloudMonitoringAccountData: + description: Data envelope of an Elastic Cloud monitoring account, including server-assigned identity. + properties: + attributes: + $ref: "#/components/schemas/ElasticCloudMonitoringAccountAttributes" + 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 + ElasticCloudMonitoringAccountRequest: + description: Request payload to create an Elastic Cloud monitoring account. + properties: + data: + $ref: "#/components/schemas/ElasticCloudMonitoringAccountCreateData" + required: + - data + type: object + ElasticCloudMonitoringAccountResponse: + description: Response payload for a single Elastic Cloud monitoring account. + properties: + data: + $ref: "#/components/schemas/ElasticCloudMonitoringAccountData" + type: object + ElasticCloudMonitoringAccountUpdateAttributes: + description: >- + Updatable attributes of an Elastic Cloud monitoring account. Every field is optional; only the fields provided are changed. + properties: + authentication: + $ref: "#/components/schemas/ElasticCloudAuthentication" + dataflows: + description: Dataflows for the Elastic Cloud monitoring interface. + items: + $ref: "#/components/schemas/ElasticCloudDataflow" + type: array + name: + description: Human-readable name of the account. + example: elastic-cloud-prod + type: string + settings: + $ref: "#/components/schemas/ElasticCloudSettingsUpdate" + type: object + ElasticCloudMonitoringAccountUpdateData: + description: Data envelope for updating an Elastic Cloud monitoring account. + properties: + attributes: + $ref: "#/components/schemas/ElasticCloudMonitoringAccountUpdateAttributes" + type: + $ref: "#/components/schemas/IntegrationAccountType" + required: + - type + - attributes + type: object + ElasticCloudMonitoringAccountUpdateRequest: + description: Request payload to update an Elastic Cloud monitoring account as a partial merge. + properties: + data: + $ref: "#/components/schemas/ElasticCloudMonitoringAccountUpdateData" + required: + - data + type: object + ElasticCloudMonitoringAccountsResponse: + description: Response payload for a list of Elastic Cloud monitoring accounts. + properties: + data: + description: List of Elastic Cloud monitoring accounts. + items: + $ref: "#/components/schemas/ElasticCloudMonitoringAccountData" + type: array + type: object + ElasticCloudSettings: + description: Elastic Cloud monitoring interface settings. + properties: + cat_allocation_stats_enabled: + description: Enable to collect shard allocation metrics. + example: false + type: boolean + detailed_index_stats_enabled: + description: Enable to collect index-specific stats. + example: false + type: boolean + index_stats_enabled: + description: Enable to collect metrics about the indices in your cluster. + example: false + type: boolean + pending_task_stats_enabled: + description: Enable to collect metrics about pending tasks. + example: false + type: boolean + pshard_graceful_to_enabled: + description: Enable to collect all metrics even if primary shard metric collection times out. + example: false + type: boolean + pshard_stats_enabled: + description: Enable to collect metrics over primary shards. + example: false + type: boolean + slm_stats_enabled: + description: Enable to collect snapshot lifecycle management metrics. + example: false + type: boolean + 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 + ElasticCloudSettingsUpdate: + description: Partial Elastic Cloud monitoring interface settings for updates. + properties: + cat_allocation_stats_enabled: + description: Enable to collect shard allocation metrics. + example: false + type: boolean + detailed_index_stats_enabled: + description: Enable to collect index-specific stats. + example: false + type: boolean + index_stats_enabled: + description: Enable to collect metrics about the indices in your cluster. + example: false + type: boolean + pending_task_stats_enabled: + description: Enable to collect metrics about pending tasks. + example: false + type: boolean + pshard_graceful_to_enabled: + description: Enable to collect all metrics even if primary shard metric collection times out. + example: false + type: boolean + pshard_stats_enabled: + description: Enable to collect metrics over primary shards. + example: false + type: boolean + slm_stats_enabled: + description: Enable to collect snapshot lifecycle management metrics. + example: false + type: boolean + 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 Enabled: description: Field used to enable or disable the rule. example: true @@ -48666,6 +49107,58 @@ components: - id - attributes type: object + 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, server-computed 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: JSON:API resource type for an integration account. Always `integration-account`. + enum: + - integration-account + example: integration-account + type: string + x-enum-varnames: + - INTEGRATION_ACCOUNT IntegrationAttributes: description: Attributes for an integration. properties: @@ -110576,6 +111069,206 @@ components: type: string x-enum-varnames: - TRIGGER_WORKFLOW_AUTOMATION + TwilioAccountAttributes: + description: >- + Attributes of a Twilio integration account. The Twilio configuration is hoisted directly onto the attributes; there is no interface wrapper because the `twilio` interface is fixed by the endpoint path. + properties: + authentication: + $ref: "#/components/schemas/TwilioAuthentication" + dataflows: + description: Dataflows for the Twilio interface. + items: + $ref: "#/components/schemas/TwilioDataflow" + type: array + name: + description: Human-readable name of the account. + example: twilio-prod + type: string + permissions: + $ref: "#/components/schemas/IntegrationAccountPermissions" + settings: + $ref: "#/components/schemas/TwilioSettings" + required: + - name + - authentication + type: object + TwilioAccountCreateData: + description: Data envelope for creating a Twilio integration account. + properties: + attributes: + $ref: "#/components/schemas/TwilioAccountAttributes" + type: + $ref: "#/components/schemas/IntegrationAccountType" + required: + - type + - attributes + type: object + TwilioAccountData: + description: Data envelope of a Twilio integration account, including server-assigned identity. + properties: + attributes: + $ref: "#/components/schemas/TwilioAccountAttributes" + 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 + TwilioAccountRequest: + description: Request payload to create a Twilio integration account. + properties: + data: + $ref: "#/components/schemas/TwilioAccountCreateData" + required: + - data + type: object + TwilioAccountResponse: + description: Response payload for a single Twilio integration account. + properties: + data: + $ref: "#/components/schemas/TwilioAccountData" + type: object + TwilioAccountUpdateAttributes: + description: >- + Updatable attributes of a Twilio integration account. Every field is optional; only the fields provided are changed. + properties: + authentication: + $ref: "#/components/schemas/TwilioAuthentication" + dataflows: + description: Dataflows for the Twilio interface. + items: + $ref: "#/components/schemas/TwilioDataflow" + type: array + name: + description: Human-readable name of the account. + example: twilio-prod + type: string + settings: + $ref: "#/components/schemas/TwilioSettingsUpdate" + type: object + TwilioAccountUpdateData: + description: Data envelope for updating a Twilio integration account. + properties: + attributes: + $ref: "#/components/schemas/TwilioAccountUpdateAttributes" + type: + $ref: "#/components/schemas/IntegrationAccountType" + required: + - type + - attributes + type: object + TwilioAccountUpdateRequest: + description: Request payload to update a Twilio integration account as a partial merge. + properties: + data: + $ref: "#/components/schemas/TwilioAccountUpdateData" + required: + - data + type: object + TwilioAccountsResponse: + description: Response payload for a list of Twilio integration accounts. + properties: + data: + description: List of Twilio integration accounts. + items: + $ref: "#/components/schemas/TwilioAccountData" + type: array + type: object + TwilioAuthentication: + description: >- + Authentication methods supported by the Twilio interface. Exactly one is set, selected by its `type`. + oneOf: + - $ref: "#/components/schemas/TwilioBasicAuth" + TwilioBasicAuth: + description: API Key & Secret authentication for Twilio. + properties: + api_key: + description: Twilio API Key SID for authentication. Create from Twilio Console > Account > API Keys & Tokens. + example: SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + type: string + api_key_token: + description: Twilio API Key Secret (token) corresponding to the API Key SID. This field is not returned by the API. + example: your-api-key-secret + type: string + writeOnly: true + type: + $ref: "#/components/schemas/TwilioBasicAuthType" + required: + - type + - api_key + - api_key_token + type: object + TwilioBasicAuthType: + default: basic + description: Authentication method discriminator. + enum: + - basic + example: basic + type: string + x-enum-varnames: + - BASIC + TwilioDataflow: + description: A Twilio dataflow toggle. The set of dataflow ids is fixed by the interface schema. + properties: + enabled: + description: Whether the dataflow is enabled. + example: true + type: boolean + id: + $ref: "#/components/schemas/TwilioDataflowId" + status: + $ref: "#/components/schemas/IntegrationAccountDataflowStatus" + required: + - id + type: object + TwilioDataflowId: + description: Identifier of a Twilio dataflow. + enum: + - twilio-cloud-cost-metrics + - twilio-events-logs + - twilio-messages-logs + - twilio-alerts-logs + - twilio-call-summaries-logs + example: twilio-messages-logs + type: string + x-enum-varnames: + - CLOUD_COST_METRICS + - EVENTS_LOGS + - MESSAGES_LOGS + - ALERTS_LOGS + - CALL_SUMMARIES_LOGS + TwilioSettings: + description: Twilio interface settings. + 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 + TwilioSettingsUpdate: + description: Partial Twilio interface settings for updates. + 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 UCConfigPair: description: The definition of `UCConfigPair` object. example: @@ -151264,6 +151957,464 @@ paths: operator: OR permissions: - manage_integrations + /api/v2/integrations/elastic-cloud/interfaces/elastic-cloud-ccm/accounts: + get: + description: List the Elastic Cloud CCM (Cloud Cost Management) accounts. + operationId: ListElasticCloudCcmAccounts + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + authentication: + type: bearer_token + dataflows: + - enabled: true + id: elastic-cloud-cost-data + status: + health: DATAFLOW_HEALTH_OK + updated_at: "2026-06-25T08:30:50Z" + name: elastic-cloud-ccm-prod + permissions: + resource_id: "integration-account:elastic-cloud-ccm:953a0060-81ec-4221-aed4-d4733b59cd96" + user_can_edit: true + settings: + elastic_org_id: "2079364244" + id: 953a0060-81ec-4221-aed4-d4733b59cd96 + type: integration-account + schema: + $ref: "#/components/schemas/ElasticCloudCcmAccountsResponse" + 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 CCM accounts + tags: + - Elastic Cloud Cloud Cost Management + 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 CCM (Cloud Cost Management) account. + operationId: CreateElasticCloudCcmAccount + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ElasticCloudCcmAccountRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + authentication: + type: bearer_token + dataflows: + - enabled: true + id: elastic-cloud-cost-data + status: + health: DATAFLOW_HEALTH_OK + updated_at: "2026-06-25T08:30:50Z" + name: elastic-cloud-ccm-prod + permissions: + resource_id: "integration-account:elastic-cloud-ccm:953a0060-81ec-4221-aed4-d4733b59cd96" + user_can_edit: true + settings: + elastic_org_id: "2079364244" + id: 953a0060-81ec-4221-aed4-d4733b59cd96 + type: integration-account + schema: + $ref: "#/components/schemas/ElasticCloudCcmAccountResponse" + 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 CCM account + tags: + - Elastic Cloud Cloud Cost Management + 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/integrations/elastic-cloud/interfaces/elastic-cloud-ccm/accounts/{account_id}: + delete: + description: Delete an Elastic Cloud CCM (Cloud Cost Management) account. + operationId: DeleteElasticCloudCcmAccount + 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 CCM account + tags: + - Elastic Cloud Cloud Cost Management + 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 CCM (Cloud Cost Management) account. + operationId: GetElasticCloudCcmAccount + parameters: + - $ref: "#/components/parameters/IntegrationAccountIdParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + authentication: + type: bearer_token + dataflows: + - enabled: true + id: elastic-cloud-cost-data + status: + health: DATAFLOW_HEALTH_OK + updated_at: "2026-06-25T08:30:50Z" + name: elastic-cloud-ccm-prod + permissions: + resource_id: "integration-account:elastic-cloud-ccm:953a0060-81ec-4221-aed4-d4733b59cd96" + user_can_edit: true + settings: + elastic_org_id: "2079364244" + id: 953a0060-81ec-4221-aed4-d4733b59cd96 + type: integration-account + schema: + $ref: "#/components/schemas/ElasticCloudCcmAccountResponse" + 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 CCM account + tags: + - Elastic Cloud Cloud Cost Management + 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 CCM account. The update is a partial merge: only the fields provided are changed, so a name-only or settings-only update does not need to resend the full payload or write-only credentials. + operationId: UpdateElasticCloudCcmAccount + parameters: + - $ref: "#/components/parameters/IntegrationAccountIdParameter" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ElasticCloudCcmAccountUpdateRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + authentication: + type: bearer_token + dataflows: + - enabled: true + id: elastic-cloud-cost-data + status: + health: DATAFLOW_HEALTH_OK + updated_at: "2026-06-25T08:30:50Z" + name: elastic-cloud-ccm-prod + permissions: + resource_id: "integration-account:elastic-cloud-ccm:953a0060-81ec-4221-aed4-d4733b59cd96" + user_can_edit: true + settings: + elastic_org_id: "2079364244" + id: 953a0060-81ec-4221-aed4-d4733b59cd96 + type: integration-account + schema: + $ref: "#/components/schemas/ElasticCloudCcmAccountResponse" + 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 CCM account + tags: + - Elastic Cloud Cloud Cost Management + 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/integrations/elastic-cloud/interfaces/elastic-cloud/accounts: + get: + description: List the Elastic Cloud monitoring accounts. + operationId: ListElasticCloudMonitoringAccounts + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + authentication: + type: basic + username: datadog + dataflows: + - enabled: true + id: elastic-cloud-metrics + status: + health: DATAFLOW_HEALTH_OK + updated_at: "2026-06-25T08:30:50Z" + 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/ElasticCloudMonitoringAccountsResponse" + 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 monitoring accounts + tags: + - Elastic Cloud Monitoring + 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 monitoring account. + operationId: CreateElasticCloudMonitoringAccount + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ElasticCloudMonitoringAccountRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + authentication: + type: basic + username: datadog + dataflows: + - enabled: true + id: elastic-cloud-metrics + status: + health: DATAFLOW_HEALTH_OK + updated_at: "2026-06-25T08:30:50Z" + 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/ElasticCloudMonitoringAccountResponse" + 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 monitoring account + tags: + - Elastic Cloud Monitoring + 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/integrations/elastic-cloud/interfaces/elastic-cloud/accounts/{account_id}: + delete: + description: Delete an Elastic Cloud monitoring account. + operationId: DeleteElasticCloudMonitoringAccount + 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 monitoring account + tags: + - Elastic Cloud Monitoring + 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 monitoring account. + operationId: GetElasticCloudMonitoringAccount + parameters: + - $ref: "#/components/parameters/IntegrationAccountIdParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + authentication: + type: basic + username: datadog + dataflows: + - enabled: true + id: elastic-cloud-metrics + status: + health: DATAFLOW_HEALTH_OK + updated_at: "2026-06-25T08:30:50Z" + 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/ElasticCloudMonitoringAccountResponse" + 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 monitoring account + tags: + - Elastic Cloud Monitoring + 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 monitoring account. The update is a partial merge: only the fields provided are changed, so a name-only or settings-only update does not need to resend the full payload or write-only credentials. + operationId: UpdateElasticCloudMonitoringAccount + parameters: + - $ref: "#/components/parameters/IntegrationAccountIdParameter" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ElasticCloudMonitoringAccountUpdateRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + authentication: + type: basic + username: datadog + dataflows: + - enabled: true + id: elastic-cloud-metrics + status: + health: DATAFLOW_HEALTH_OK + updated_at: "2026-06-25T08:30:50Z" + 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/ElasticCloudMonitoringAccountResponse" + 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 monitoring account + tags: + - Elastic Cloud Monitoring + 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/integrations/fastly/accounts: get: description: List Fastly accounts. @@ -151887,6 +153038,237 @@ paths: operator: OR permissions: - manage_integrations + /api/v2/integrations/twilio/interfaces/twilio/accounts: + get: + description: List the Twilio integration accounts. + operationId: ListTwilioAccounts + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + authentication: + api_key: SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + type: basic + dataflows: + - enabled: true + id: twilio-messages-logs + 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/TwilioAccountsResponse" + 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: CreateTwilioAccount + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/TwilioAccountRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + authentication: + api_key: SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + type: basic + dataflows: + - enabled: true + id: twilio-messages-logs + 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/TwilioAccountResponse" + 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/integrations/twilio/interfaces/twilio/accounts/{account_id}: + delete: + description: Delete a Twilio integration account. + operationId: DeleteTwilioAccount + 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: GetTwilioAccount + parameters: + - $ref: "#/components/parameters/IntegrationAccountIdParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + authentication: + api_key: SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + type: basic + dataflows: + - enabled: true + id: twilio-messages-logs + 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/TwilioAccountResponse" + 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. The update is a partial merge: only the fields provided are changed, so a name-only or settings-only update does not need to resend the full payload or write-only credentials. + operationId: UpdateTwilioAccount + parameters: + - $ref: "#/components/parameters/IntegrationAccountIdParameter" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/TwilioAccountUpdateRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + authentication: + api_key: SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + type: basic + dataflows: + - enabled: true + id: twilio-messages-logs + 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/TwilioAccountResponse" + 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/ip_allowlist: get: description: Returns the IP allowlist and its enabled or disabled state. @@ -206303,6 +207685,12 @@ 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 accounts for the Cloud Cost Management interface (`elastic-cloud-ccm`), served by the Account Management Service (AMS). Concrete, strongly typed CRUD operations for the Cloud Cost Management interface. + name: Elastic Cloud Cloud Cost Management + - description: >- + Manage Elastic Cloud accounts for the monitoring interface (`elastic-cloud`), served by the Account Management Service (AMS). Concrete, strongly typed CRUD operations for the monitoring interface. + name: Elastic Cloud Monitoring - 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. @@ -206730,6 +208118,9 @@ 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 Twilio accounts for the Twilio `twilio` interface, served by the Account Management Service (AMS). Concrete, strongly typed CRUD operations for the single Twilio interface. + 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-cloud-cost-management/CreateElasticCloudCcmAccount.rb b/examples/v2/elastic-cloud-cloud-cost-management/CreateElasticCloudCcmAccount.rb new file mode 100644 index 000000000000..a7009e7248f3 --- /dev/null +++ b/examples/v2/elastic-cloud-cloud-cost-management/CreateElasticCloudCcmAccount.rb @@ -0,0 +1,30 @@ +# Create an Elastic Cloud CCM account returns "Created" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.create_elastic_cloud_ccm_account".to_sym] = true +end +api_instance = DatadogAPIClient::V2::ElasticCloudCloudCostManagementAPI.new + +body = DatadogAPIClient::V2::ElasticCloudCcmAccountRequest.new({ + data: DatadogAPIClient::V2::ElasticCloudCcmAccountCreateData.new({ + attributes: DatadogAPIClient::V2::ElasticCloudCcmAccountAttributes.new({ + authentication: DatadogAPIClient::V2::ElasticCloudCcmTokenAuth.new({ + api_key: "your-billing-api-key", + type: DatadogAPIClient::V2::ElasticCloudCcmTokenAuthType::BEARER_TOKEN, + }), + dataflows: [ + DatadogAPIClient::V2::ElasticCloudCcmDataflow.new({ + enabled: true, + id: DatadogAPIClient::V2::ElasticCloudCcmDataflowId::COST_DATA, + }), + ], + name: "elastic-cloud-ccm-prod", + settings: DatadogAPIClient::V2::ElasticCloudCcmSettings.new({ + elastic_org_id: "2079364244", + }), + }), + type: DatadogAPIClient::V2::IntegrationAccountType::INTEGRATION_ACCOUNT, + }), +}) +p api_instance.create_elastic_cloud_ccm_account(body) diff --git a/examples/v2/elastic-cloud-cloud-cost-management/DeleteElasticCloudCcmAccount.rb b/examples/v2/elastic-cloud-cloud-cost-management/DeleteElasticCloudCcmAccount.rb new file mode 100644 index 000000000000..041c60ca69d6 --- /dev/null +++ b/examples/v2/elastic-cloud-cloud-cost-management/DeleteElasticCloudCcmAccount.rb @@ -0,0 +1,8 @@ +# Delete an Elastic Cloud CCM account returns "No Content" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.delete_elastic_cloud_ccm_account".to_sym] = true +end +api_instance = DatadogAPIClient::V2::ElasticCloudCloudCostManagementAPI.new +api_instance.delete_elastic_cloud_ccm_account("account_id") diff --git a/examples/v2/elastic-cloud-cloud-cost-management/GetElasticCloudCcmAccount.rb b/examples/v2/elastic-cloud-cloud-cost-management/GetElasticCloudCcmAccount.rb new file mode 100644 index 000000000000..e48f31dcd24a --- /dev/null +++ b/examples/v2/elastic-cloud-cloud-cost-management/GetElasticCloudCcmAccount.rb @@ -0,0 +1,8 @@ +# Get an Elastic Cloud CCM account returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.get_elastic_cloud_ccm_account".to_sym] = true +end +api_instance = DatadogAPIClient::V2::ElasticCloudCloudCostManagementAPI.new +p api_instance.get_elastic_cloud_ccm_account("account_id") diff --git a/examples/v2/elastic-cloud-cloud-cost-management/ListElasticCloudCcmAccounts.rb b/examples/v2/elastic-cloud-cloud-cost-management/ListElasticCloudCcmAccounts.rb new file mode 100644 index 000000000000..d7e5a21ed5db --- /dev/null +++ b/examples/v2/elastic-cloud-cloud-cost-management/ListElasticCloudCcmAccounts.rb @@ -0,0 +1,8 @@ +# List Elastic Cloud CCM accounts returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.list_elastic_cloud_ccm_accounts".to_sym] = true +end +api_instance = DatadogAPIClient::V2::ElasticCloudCloudCostManagementAPI.new +p api_instance.list_elastic_cloud_ccm_accounts() diff --git a/examples/v2/elastic-cloud-cloud-cost-management/UpdateElasticCloudCcmAccount.rb b/examples/v2/elastic-cloud-cloud-cost-management/UpdateElasticCloudCcmAccount.rb new file mode 100644 index 000000000000..2d41cad5f023 --- /dev/null +++ b/examples/v2/elastic-cloud-cloud-cost-management/UpdateElasticCloudCcmAccount.rb @@ -0,0 +1,30 @@ +# Update an Elastic Cloud CCM account returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.update_elastic_cloud_ccm_account".to_sym] = true +end +api_instance = DatadogAPIClient::V2::ElasticCloudCloudCostManagementAPI.new + +body = DatadogAPIClient::V2::ElasticCloudCcmAccountUpdateRequest.new({ + data: DatadogAPIClient::V2::ElasticCloudCcmAccountUpdateData.new({ + attributes: DatadogAPIClient::V2::ElasticCloudCcmAccountUpdateAttributes.new({ + authentication: DatadogAPIClient::V2::ElasticCloudCcmTokenAuth.new({ + api_key: "your-billing-api-key", + type: DatadogAPIClient::V2::ElasticCloudCcmTokenAuthType::BEARER_TOKEN, + }), + dataflows: [ + DatadogAPIClient::V2::ElasticCloudCcmDataflow.new({ + enabled: true, + id: DatadogAPIClient::V2::ElasticCloudCcmDataflowId::COST_DATA, + }), + ], + name: "elastic-cloud-ccm-prod", + settings: DatadogAPIClient::V2::ElasticCloudCcmSettingsUpdate.new({ + elastic_org_id: "2079364244", + }), + }), + type: DatadogAPIClient::V2::IntegrationAccountType::INTEGRATION_ACCOUNT, + }), +}) +p api_instance.update_elastic_cloud_ccm_account("account_id", body) diff --git a/examples/v2/elastic-cloud-monitoring/CreateElasticCloudMonitoringAccount.rb b/examples/v2/elastic-cloud-monitoring/CreateElasticCloudMonitoringAccount.rb new file mode 100644 index 000000000000..cd16d2ac7756 --- /dev/null +++ b/examples/v2/elastic-cloud-monitoring/CreateElasticCloudMonitoringAccount.rb @@ -0,0 +1,41 @@ +# Create an Elastic Cloud monitoring account returns "Created" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.create_elastic_cloud_monitoring_account".to_sym] = true +end +api_instance = DatadogAPIClient::V2::ElasticCloudMonitoringAPI.new + +body = DatadogAPIClient::V2::ElasticCloudMonitoringAccountRequest.new({ + data: DatadogAPIClient::V2::ElasticCloudMonitoringAccountCreateData.new({ + attributes: DatadogAPIClient::V2::ElasticCloudMonitoringAccountAttributes.new({ + authentication: DatadogAPIClient::V2::ElasticCloudBasicAuth.new({ + password: "your-password", + type: DatadogAPIClient::V2::ElasticCloudBasicAuthType::BASIC, + username: "datadog", + }), + dataflows: [ + DatadogAPIClient::V2::ElasticCloudDataflow.new({ + enabled: true, + id: DatadogAPIClient::V2::ElasticCloudDataflowId::METRICS, + }), + ], + name: "elastic-cloud-prod", + settings: DatadogAPIClient::V2::ElasticCloudSettings.new({ + cat_allocation_stats_enabled: false, + detailed_index_stats_enabled: false, + index_stats_enabled: false, + pending_task_stats_enabled: false, + pshard_graceful_to_enabled: false, + pshard_stats_enabled: false, + slm_stats_enabled: false, + tags: [ + "env:prod", + ], + url: "https://example.es.us-central1.gcp.cloud.es.io:9243", + }), + }), + type: DatadogAPIClient::V2::IntegrationAccountType::INTEGRATION_ACCOUNT, + }), +}) +p api_instance.create_elastic_cloud_monitoring_account(body) diff --git a/examples/v2/elastic-cloud-monitoring/DeleteElasticCloudMonitoringAccount.rb b/examples/v2/elastic-cloud-monitoring/DeleteElasticCloudMonitoringAccount.rb new file mode 100644 index 000000000000..11e85e46d958 --- /dev/null +++ b/examples/v2/elastic-cloud-monitoring/DeleteElasticCloudMonitoringAccount.rb @@ -0,0 +1,8 @@ +# Delete an Elastic Cloud monitoring account returns "No Content" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.delete_elastic_cloud_monitoring_account".to_sym] = true +end +api_instance = DatadogAPIClient::V2::ElasticCloudMonitoringAPI.new +api_instance.delete_elastic_cloud_monitoring_account("account_id") diff --git a/examples/v2/elastic-cloud-monitoring/GetElasticCloudMonitoringAccount.rb b/examples/v2/elastic-cloud-monitoring/GetElasticCloudMonitoringAccount.rb new file mode 100644 index 000000000000..3c7ccdc33d90 --- /dev/null +++ b/examples/v2/elastic-cloud-monitoring/GetElasticCloudMonitoringAccount.rb @@ -0,0 +1,8 @@ +# Get an Elastic Cloud monitoring account returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.get_elastic_cloud_monitoring_account".to_sym] = true +end +api_instance = DatadogAPIClient::V2::ElasticCloudMonitoringAPI.new +p api_instance.get_elastic_cloud_monitoring_account("account_id") diff --git a/examples/v2/elastic-cloud-monitoring/ListElasticCloudMonitoringAccounts.rb b/examples/v2/elastic-cloud-monitoring/ListElasticCloudMonitoringAccounts.rb new file mode 100644 index 000000000000..f9fbca1db722 --- /dev/null +++ b/examples/v2/elastic-cloud-monitoring/ListElasticCloudMonitoringAccounts.rb @@ -0,0 +1,8 @@ +# List Elastic Cloud monitoring accounts returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.list_elastic_cloud_monitoring_accounts".to_sym] = true +end +api_instance = DatadogAPIClient::V2::ElasticCloudMonitoringAPI.new +p api_instance.list_elastic_cloud_monitoring_accounts() diff --git a/examples/v2/elastic-cloud-monitoring/UpdateElasticCloudMonitoringAccount.rb b/examples/v2/elastic-cloud-monitoring/UpdateElasticCloudMonitoringAccount.rb new file mode 100644 index 000000000000..8cad25669fe5 --- /dev/null +++ b/examples/v2/elastic-cloud-monitoring/UpdateElasticCloudMonitoringAccount.rb @@ -0,0 +1,41 @@ +# Update an Elastic Cloud monitoring account returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.update_elastic_cloud_monitoring_account".to_sym] = true +end +api_instance = DatadogAPIClient::V2::ElasticCloudMonitoringAPI.new + +body = DatadogAPIClient::V2::ElasticCloudMonitoringAccountUpdateRequest.new({ + data: DatadogAPIClient::V2::ElasticCloudMonitoringAccountUpdateData.new({ + attributes: DatadogAPIClient::V2::ElasticCloudMonitoringAccountUpdateAttributes.new({ + authentication: DatadogAPIClient::V2::ElasticCloudBasicAuth.new({ + password: "your-password", + type: DatadogAPIClient::V2::ElasticCloudBasicAuthType::BASIC, + username: "datadog", + }), + dataflows: [ + DatadogAPIClient::V2::ElasticCloudDataflow.new({ + enabled: true, + id: DatadogAPIClient::V2::ElasticCloudDataflowId::METRICS, + }), + ], + name: "elastic-cloud-prod", + settings: DatadogAPIClient::V2::ElasticCloudSettingsUpdate.new({ + cat_allocation_stats_enabled: false, + detailed_index_stats_enabled: false, + index_stats_enabled: false, + pending_task_stats_enabled: false, + pshard_graceful_to_enabled: false, + pshard_stats_enabled: false, + slm_stats_enabled: false, + tags: [ + "env:prod", + ], + url: "https://example.es.us-central1.gcp.cloud.es.io:9243", + }), + }), + type: DatadogAPIClient::V2::IntegrationAccountType::INTEGRATION_ACCOUNT, + }), +}) +p api_instance.update_elastic_cloud_monitoring_account("account_id", body) diff --git a/examples/v2/twilio-integration-accounts/CreateTwilioAccount.rb b/examples/v2/twilio-integration-accounts/CreateTwilioAccount.rb new file mode 100644 index 000000000000..75ba6860ddca --- /dev/null +++ b/examples/v2/twilio-integration-accounts/CreateTwilioAccount.rb @@ -0,0 +1,32 @@ +# Create a Twilio integration account returns "Created" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.create_twilio_account".to_sym] = true +end +api_instance = DatadogAPIClient::V2::TwilioIntegrationAccountsAPI.new + +body = DatadogAPIClient::V2::TwilioAccountRequest.new({ + data: DatadogAPIClient::V2::TwilioAccountCreateData.new({ + attributes: DatadogAPIClient::V2::TwilioAccountAttributes.new({ + authentication: DatadogAPIClient::V2::TwilioBasicAuth.new({ + api_key: "SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", + api_key_token: "your-api-key-secret", + type: DatadogAPIClient::V2::TwilioBasicAuthType::BASIC, + }), + dataflows: [ + DatadogAPIClient::V2::TwilioDataflow.new({ + enabled: true, + id: DatadogAPIClient::V2::TwilioDataflowId::MESSAGES_LOGS, + }), + ], + name: "twilio-prod", + settings: DatadogAPIClient::V2::TwilioSettings.new({ + account_sid: "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", + censor_logs: true, + }), + }), + type: DatadogAPIClient::V2::IntegrationAccountType::INTEGRATION_ACCOUNT, + }), +}) +p api_instance.create_twilio_account(body) diff --git a/examples/v2/twilio-integration-accounts/DeleteTwilioAccount.rb b/examples/v2/twilio-integration-accounts/DeleteTwilioAccount.rb new file mode 100644 index 000000000000..887e19984081 --- /dev/null +++ b/examples/v2/twilio-integration-accounts/DeleteTwilioAccount.rb @@ -0,0 +1,8 @@ +# Delete a Twilio integration account returns "No Content" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.delete_twilio_account".to_sym] = true +end +api_instance = DatadogAPIClient::V2::TwilioIntegrationAccountsAPI.new +api_instance.delete_twilio_account("account_id") diff --git a/examples/v2/twilio-integration-accounts/GetTwilioAccount.rb b/examples/v2/twilio-integration-accounts/GetTwilioAccount.rb new file mode 100644 index 000000000000..1d42d4ac23cd --- /dev/null +++ b/examples/v2/twilio-integration-accounts/GetTwilioAccount.rb @@ -0,0 +1,8 @@ +# Get a Twilio integration account returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.get_twilio_account".to_sym] = true +end +api_instance = DatadogAPIClient::V2::TwilioIntegrationAccountsAPI.new +p api_instance.get_twilio_account("account_id") diff --git a/examples/v2/twilio-integration-accounts/ListTwilioAccounts.rb b/examples/v2/twilio-integration-accounts/ListTwilioAccounts.rb new file mode 100644 index 000000000000..ceb28f089856 --- /dev/null +++ b/examples/v2/twilio-integration-accounts/ListTwilioAccounts.rb @@ -0,0 +1,8 @@ +# List Twilio integration accounts returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.list_twilio_accounts".to_sym] = true +end +api_instance = DatadogAPIClient::V2::TwilioIntegrationAccountsAPI.new +p api_instance.list_twilio_accounts() diff --git a/examples/v2/twilio-integration-accounts/UpdateTwilioAccount.rb b/examples/v2/twilio-integration-accounts/UpdateTwilioAccount.rb new file mode 100644 index 000000000000..bc3cdefc51fe --- /dev/null +++ b/examples/v2/twilio-integration-accounts/UpdateTwilioAccount.rb @@ -0,0 +1,32 @@ +# Update a Twilio integration account returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.update_twilio_account".to_sym] = true +end +api_instance = DatadogAPIClient::V2::TwilioIntegrationAccountsAPI.new + +body = DatadogAPIClient::V2::TwilioAccountUpdateRequest.new({ + data: DatadogAPIClient::V2::TwilioAccountUpdateData.new({ + attributes: DatadogAPIClient::V2::TwilioAccountUpdateAttributes.new({ + authentication: DatadogAPIClient::V2::TwilioBasicAuth.new({ + api_key: "SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", + api_key_token: "your-api-key-secret", + type: DatadogAPIClient::V2::TwilioBasicAuthType::BASIC, + }), + dataflows: [ + DatadogAPIClient::V2::TwilioDataflow.new({ + enabled: true, + id: DatadogAPIClient::V2::TwilioDataflowId::MESSAGES_LOGS, + }), + ], + name: "twilio-prod", + settings: DatadogAPIClient::V2::TwilioSettingsUpdate.new({ + account_sid: "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", + censor_logs: true, + }), + }), + type: DatadogAPIClient::V2::IntegrationAccountType::INTEGRATION_ACCOUNT, + }), +}) +p api_instance.update_twilio_account("account_id", body) diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index 9442a906c5c3..e45643d8ef13 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -4054,6 +4054,32 @@ "resource_id" => "String", "body" => "ConfluentResourceRequest", }, + "v2.CreateElasticCloudCcmAccount" => { + "body" => "ElasticCloudCcmAccountRequest", + }, + "v2.DeleteElasticCloudCcmAccount" => { + "account_id" => "String", + }, + "v2.GetElasticCloudCcmAccount" => { + "account_id" => "String", + }, + "v2.UpdateElasticCloudCcmAccount" => { + "account_id" => "String", + "body" => "ElasticCloudCcmAccountUpdateRequest", + }, + "v2.CreateElasticCloudMonitoringAccount" => { + "body" => "ElasticCloudMonitoringAccountRequest", + }, + "v2.DeleteElasticCloudMonitoringAccount" => { + "account_id" => "String", + }, + "v2.GetElasticCloudMonitoringAccount" => { + "account_id" => "String", + }, + "v2.UpdateElasticCloudMonitoringAccount" => { + "account_id" => "String", + "body" => "ElasticCloudMonitoringAccountUpdateRequest", + }, "v2.CreateFastlyAccount" => { "body" => "FastlyAccountCreateRequest", }, @@ -4100,6 +4126,19 @@ "account_id" => "String", "body" => "OktaAccountUpdateRequest", }, + "v2.CreateTwilioAccount" => { + "body" => "TwilioAccountRequest", + }, + "v2.DeleteTwilioAccount" => { + "account_id" => "String", + }, + "v2.GetTwilioAccount" => { + "account_id" => "String", + }, + "v2.UpdateTwilioAccount" => { + "account_id" => "String", + "body" => "TwilioAccountUpdateRequest", + }, "v2.UpdateIPAllowlist" => { "body" => "IPAllowlistUpdateRequest", }, diff --git a/features/v2/elastic_cloud_cloud_cost_management.feature b/features/v2/elastic_cloud_cloud_cost_management.feature new file mode 100644 index 000000000000..4bc9e417f551 --- /dev/null +++ b/features/v2/elastic_cloud_cloud_cost_management.feature @@ -0,0 +1,131 @@ +@endpoint(elastic-cloud-cloud-cost-management) @endpoint(elastic-cloud-cloud-cost-management-v2) +Feature: Elastic Cloud Cloud Cost Management + Manage Elastic Cloud accounts for the Cloud Cost Management interface + (`elastic-cloud-ccm`), served by the Account Management Service (AMS). + Concrete, strongly typed CRUD operations for the Cloud Cost Management + interface. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "ElasticCloudCloudCostManagement" API + + @generated @skip @team:DataDog/saas-integrations + Scenario: Create an Elastic Cloud CCM account returns "Bad Request" response + Given operation "CreateElasticCloudCcmAccount" enabled + And new "CreateElasticCloudCcmAccount" request + And body with value {"data": {"attributes": {"authentication": {"api_key": "your-billing-api-key", "type": "bearer_token"}, "dataflows": [{"enabled": true, "id": "elastic-cloud-cost-data"}], "name": "elastic-cloud-ccm-prod", "settings": {"elastic_org_id": "2079364244"}}, "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 CCM account returns "Created" response + Given operation "CreateElasticCloudCcmAccount" enabled + And new "CreateElasticCloudCcmAccount" request + And body with value {"data": {"attributes": {"authentication": {"api_key": "your-billing-api-key", "type": "bearer_token"}, "dataflows": [{"enabled": true, "id": "elastic-cloud-cost-data"}], "name": "elastic-cloud-ccm-prod", "settings": {"elastic_org_id": "2079364244"}}, "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 CCM account returns "Not Found" response + Given operation "CreateElasticCloudCcmAccount" enabled + And new "CreateElasticCloudCcmAccount" request + And body with value {"data": {"attributes": {"authentication": {"api_key": "your-billing-api-key", "type": "bearer_token"}, "dataflows": [{"enabled": true, "id": "elastic-cloud-cost-data"}], "name": "elastic-cloud-ccm-prod", "settings": {"elastic_org_id": "2079364244"}}, "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 CCM account returns "Bad Request" response + Given operation "DeleteElasticCloudCcmAccount" enabled + And new "DeleteElasticCloudCcmAccount" 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 CCM account returns "No Content" response + Given operation "DeleteElasticCloudCcmAccount" enabled + And new "DeleteElasticCloudCcmAccount" 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 CCM account returns "Not Found" response + Given operation "DeleteElasticCloudCcmAccount" enabled + And new "DeleteElasticCloudCcmAccount" 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 CCM account returns "Bad Request" response + Given operation "GetElasticCloudCcmAccount" enabled + And new "GetElasticCloudCcmAccount" 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 CCM account returns "Not Found" response + Given operation "GetElasticCloudCcmAccount" enabled + And new "GetElasticCloudCcmAccount" 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 CCM account returns "OK" response + Given operation "GetElasticCloudCcmAccount" enabled + And new "GetElasticCloudCcmAccount" 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 CCM accounts returns "Bad Request" response + Given operation "ListElasticCloudCcmAccounts" enabled + And new "ListElasticCloudCcmAccounts" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/saas-integrations + Scenario: List Elastic Cloud CCM accounts returns "Not Found" response + Given operation "ListElasticCloudCcmAccounts" enabled + And new "ListElasticCloudCcmAccounts" request + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/saas-integrations + Scenario: List Elastic Cloud CCM accounts returns "OK" response + Given operation "ListElasticCloudCcmAccounts" enabled + And new "ListElasticCloudCcmAccounts" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/saas-integrations + Scenario: Update an Elastic Cloud CCM account returns "Bad Request" response + Given operation "UpdateElasticCloudCcmAccount" enabled + And new "UpdateElasticCloudCcmAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"authentication": {"api_key": "your-billing-api-key", "type": "bearer_token"}, "dataflows": [{"enabled": true, "id": "elastic-cloud-cost-data"}], "name": "elastic-cloud-ccm-prod", "settings": {"elastic_org_id": "2079364244"}}, "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 CCM account returns "Not Found" response + Given operation "UpdateElasticCloudCcmAccount" enabled + And new "UpdateElasticCloudCcmAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"authentication": {"api_key": "your-billing-api-key", "type": "bearer_token"}, "dataflows": [{"enabled": true, "id": "elastic-cloud-cost-data"}], "name": "elastic-cloud-ccm-prod", "settings": {"elastic_org_id": "2079364244"}}, "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 CCM account returns "OK" response + Given operation "UpdateElasticCloudCcmAccount" enabled + And new "UpdateElasticCloudCcmAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"authentication": {"api_key": "your-billing-api-key", "type": "bearer_token"}, "dataflows": [{"enabled": true, "id": "elastic-cloud-cost-data"}], "name": "elastic-cloud-ccm-prod", "settings": {"elastic_org_id": "2079364244"}}, "type": "integration-account"}} + When the request is sent + Then the response status is 200 OK diff --git a/features/v2/elastic_cloud_monitoring.feature b/features/v2/elastic_cloud_monitoring.feature new file mode 100644 index 000000000000..09301b640bf9 --- /dev/null +++ b/features/v2/elastic_cloud_monitoring.feature @@ -0,0 +1,130 @@ +@endpoint(elastic-cloud-monitoring) @endpoint(elastic-cloud-monitoring-v2) +Feature: Elastic Cloud Monitoring + Manage Elastic Cloud accounts for the monitoring interface (`elastic- + cloud`), served by the Account Management Service (AMS). Concrete, + strongly typed CRUD operations for the monitoring interface. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "ElasticCloudMonitoring" API + + @generated @skip @team:DataDog/saas-integrations + Scenario: Create an Elastic Cloud monitoring account returns "Bad Request" response + Given operation "CreateElasticCloudMonitoringAccount" enabled + And new "CreateElasticCloudMonitoringAccount" request + And body with value {"data": {"attributes": {"authentication": {"password": "your-password", "type": "basic", "username": "datadog"}, "dataflows": [{"enabled": true, "id": "elastic-cloud-metrics"}], "name": "elastic-cloud-prod", "settings": {"cat_allocation_stats_enabled": false, "detailed_index_stats_enabled": false, "index_stats_enabled": false, "pending_task_stats_enabled": false, "pshard_graceful_to_enabled": false, "pshard_stats_enabled": false, "slm_stats_enabled": false, "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 monitoring account returns "Created" response + Given operation "CreateElasticCloudMonitoringAccount" enabled + And new "CreateElasticCloudMonitoringAccount" request + And body with value {"data": {"attributes": {"authentication": {"password": "your-password", "type": "basic", "username": "datadog"}, "dataflows": [{"enabled": true, "id": "elastic-cloud-metrics"}], "name": "elastic-cloud-prod", "settings": {"cat_allocation_stats_enabled": false, "detailed_index_stats_enabled": false, "index_stats_enabled": false, "pending_task_stats_enabled": false, "pshard_graceful_to_enabled": false, "pshard_stats_enabled": false, "slm_stats_enabled": false, "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 monitoring account returns "Not Found" response + Given operation "CreateElasticCloudMonitoringAccount" enabled + And new "CreateElasticCloudMonitoringAccount" request + And body with value {"data": {"attributes": {"authentication": {"password": "your-password", "type": "basic", "username": "datadog"}, "dataflows": [{"enabled": true, "id": "elastic-cloud-metrics"}], "name": "elastic-cloud-prod", "settings": {"cat_allocation_stats_enabled": false, "detailed_index_stats_enabled": false, "index_stats_enabled": false, "pending_task_stats_enabled": false, "pshard_graceful_to_enabled": false, "pshard_stats_enabled": false, "slm_stats_enabled": false, "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 monitoring account returns "Bad Request" response + Given operation "DeleteElasticCloudMonitoringAccount" enabled + And new "DeleteElasticCloudMonitoringAccount" 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 monitoring account returns "No Content" response + Given operation "DeleteElasticCloudMonitoringAccount" enabled + And new "DeleteElasticCloudMonitoringAccount" 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 monitoring account returns "Not Found" response + Given operation "DeleteElasticCloudMonitoringAccount" enabled + And new "DeleteElasticCloudMonitoringAccount" 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 monitoring account returns "Bad Request" response + Given operation "GetElasticCloudMonitoringAccount" enabled + And new "GetElasticCloudMonitoringAccount" 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 monitoring account returns "Not Found" response + Given operation "GetElasticCloudMonitoringAccount" enabled + And new "GetElasticCloudMonitoringAccount" 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 monitoring account returns "OK" response + Given operation "GetElasticCloudMonitoringAccount" enabled + And new "GetElasticCloudMonitoringAccount" 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 monitoring accounts returns "Bad Request" response + Given operation "ListElasticCloudMonitoringAccounts" enabled + And new "ListElasticCloudMonitoringAccounts" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/saas-integrations + Scenario: List Elastic Cloud monitoring accounts returns "Not Found" response + Given operation "ListElasticCloudMonitoringAccounts" enabled + And new "ListElasticCloudMonitoringAccounts" request + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/saas-integrations + Scenario: List Elastic Cloud monitoring accounts returns "OK" response + Given operation "ListElasticCloudMonitoringAccounts" enabled + And new "ListElasticCloudMonitoringAccounts" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/saas-integrations + Scenario: Update an Elastic Cloud monitoring account returns "Bad Request" response + Given operation "UpdateElasticCloudMonitoringAccount" enabled + And new "UpdateElasticCloudMonitoringAccount" 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": [{"enabled": true, "id": "elastic-cloud-metrics"}], "name": "elastic-cloud-prod", "settings": {"cat_allocation_stats_enabled": false, "detailed_index_stats_enabled": false, "index_stats_enabled": false, "pending_task_stats_enabled": false, "pshard_graceful_to_enabled": false, "pshard_stats_enabled": false, "slm_stats_enabled": false, "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 monitoring account returns "Not Found" response + Given operation "UpdateElasticCloudMonitoringAccount" enabled + And new "UpdateElasticCloudMonitoringAccount" 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": [{"enabled": true, "id": "elastic-cloud-metrics"}], "name": "elastic-cloud-prod", "settings": {"cat_allocation_stats_enabled": false, "detailed_index_stats_enabled": false, "index_stats_enabled": false, "pending_task_stats_enabled": false, "pshard_graceful_to_enabled": false, "pshard_stats_enabled": false, "slm_stats_enabled": false, "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 monitoring account returns "OK" response + Given operation "UpdateElasticCloudMonitoringAccount" enabled + And new "UpdateElasticCloudMonitoringAccount" 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": [{"enabled": true, "id": "elastic-cloud-metrics"}], "name": "elastic-cloud-prod", "settings": {"cat_allocation_stats_enabled": false, "detailed_index_stats_enabled": false, "index_stats_enabled": false, "pending_task_stats_enabled": false, "pshard_graceful_to_enabled": false, "pshard_stats_enabled": false, "slm_stats_enabled": false, "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/features/v2/twilio_integration_accounts.feature b/features/v2/twilio_integration_accounts.feature new file mode 100644 index 000000000000..3a976c9b98c6 --- /dev/null +++ b/features/v2/twilio_integration_accounts.feature @@ -0,0 +1,130 @@ +@endpoint(twilio-integration-accounts) @endpoint(twilio-integration-accounts-v2) +Feature: Twilio Integration Accounts + Manage Twilio accounts for the Twilio `twilio` interface, served by the + Account Management Service (AMS). Concrete, strongly typed CRUD operations + for the single Twilio interface. + + 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 "CreateTwilioAccount" enabled + And new "CreateTwilioAccount" request + And body with value {"data": {"attributes": {"authentication": {"api_key": "SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "api_key_token": "your-api-key-secret", "type": "basic"}, "dataflows": [{"enabled": true, "id": "twilio-messages-logs"}], "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 "CreateTwilioAccount" enabled + And new "CreateTwilioAccount" request + And body with value {"data": {"attributes": {"authentication": {"api_key": "SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "api_key_token": "your-api-key-secret", "type": "basic"}, "dataflows": [{"enabled": true, "id": "twilio-messages-logs"}], "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 "CreateTwilioAccount" enabled + And new "CreateTwilioAccount" request + And body with value {"data": {"attributes": {"authentication": {"api_key": "SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "api_key_token": "your-api-key-secret", "type": "basic"}, "dataflows": [{"enabled": true, "id": "twilio-messages-logs"}], "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 "DeleteTwilioAccount" enabled + And new "DeleteTwilioAccount" 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 "DeleteTwilioAccount" enabled + And new "DeleteTwilioAccount" 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 "DeleteTwilioAccount" enabled + And new "DeleteTwilioAccount" 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 "GetTwilioAccount" enabled + And new "GetTwilioAccount" 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 "GetTwilioAccount" enabled + And new "GetTwilioAccount" 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 "GetTwilioAccount" enabled + And new "GetTwilioAccount" 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 "ListTwilioAccounts" enabled + And new "ListTwilioAccounts" 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 "ListTwilioAccounts" enabled + And new "ListTwilioAccounts" 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 "ListTwilioAccounts" enabled + And new "ListTwilioAccounts" 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 "UpdateTwilioAccount" enabled + And new "UpdateTwilioAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"authentication": {"api_key": "SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "api_key_token": "your-api-key-secret", "type": "basic"}, "dataflows": [{"enabled": true, "id": "twilio-messages-logs"}], "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 "UpdateTwilioAccount" enabled + And new "UpdateTwilioAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"authentication": {"api_key": "SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "api_key_token": "your-api-key-secret", "type": "basic"}, "dataflows": [{"enabled": true, "id": "twilio-messages-logs"}], "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 "UpdateTwilioAccount" enabled + And new "UpdateTwilioAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"authentication": {"api_key": "SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "api_key_token": "your-api-key-secret", "type": "basic"}, "dataflows": [{"enabled": true, "id": "twilio-messages-logs"}], "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/features/v2/undo.json b/features/v2/undo.json index 3e0cca0a0be8..1c42b0cd7137 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -4238,6 +4238,80 @@ "type": "idempotent" } }, + "ListElasticCloudCcmAccounts": { + "tag": "Elastic Cloud Cloud Cost Management", + "undo": { + "type": "safe" + } + }, + "CreateElasticCloudCcmAccount": { + "tag": "Elastic Cloud Cloud Cost Management", + "undo": { + "operationId": "DeleteElasticCloudCcmAccount", + "parameters": [ + { + "name": "account_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DeleteElasticCloudCcmAccount": { + "tag": "Elastic Cloud Cloud Cost Management", + "undo": { + "type": "idempotent" + } + }, + "GetElasticCloudCcmAccount": { + "tag": "Elastic Cloud Cloud Cost Management", + "undo": { + "type": "safe" + } + }, + "UpdateElasticCloudCcmAccount": { + "tag": "Elastic Cloud Cloud Cost Management", + "undo": { + "type": "idempotent" + } + }, + "ListElasticCloudMonitoringAccounts": { + "tag": "Elastic Cloud Monitoring", + "undo": { + "type": "safe" + } + }, + "CreateElasticCloudMonitoringAccount": { + "tag": "Elastic Cloud Monitoring", + "undo": { + "operationId": "DeleteElasticCloudMonitoringAccount", + "parameters": [ + { + "name": "account_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DeleteElasticCloudMonitoringAccount": { + "tag": "Elastic Cloud Monitoring", + "undo": { + "type": "idempotent" + } + }, + "GetElasticCloudMonitoringAccount": { + "tag": "Elastic Cloud Monitoring", + "undo": { + "type": "safe" + } + }, + "UpdateElasticCloudMonitoringAccount": { + "tag": "Elastic Cloud Monitoring", + "undo": { + "type": "idempotent" + } + }, "ListFastlyAccounts": { "tag": "Fastly Integration", "undo": { @@ -4349,6 +4423,43 @@ "type": "idempotent" } }, + "ListTwilioAccounts": { + "tag": "Twilio Integration Accounts", + "undo": { + "type": "safe" + } + }, + "CreateTwilioAccount": { + "tag": "Twilio Integration Accounts", + "undo": { + "operationId": "DeleteTwilioAccount", + "parameters": [ + { + "name": "account_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DeleteTwilioAccount": { + "tag": "Twilio Integration Accounts", + "undo": { + "type": "idempotent" + } + }, + "GetTwilioAccount": { + "tag": "Twilio Integration Accounts", + "undo": { + "type": "safe" + } + }, + "UpdateTwilioAccount": { + "tag": "Twilio Integration Accounts", + "undo": { + "type": "idempotent" + } + }, "GetIPAllowlist": { "tag": "IP Allowlist", "undo": { diff --git a/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index b20871c46d35..bae86495bd63 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -541,6 +541,21 @@ def initialize "v2.update_jira_issue_template": false, "v2.create_tenancy_config": false, "v2.get_tenancy_configs": false, + "v2.create_elastic_cloud_ccm_account": false, + "v2.delete_elastic_cloud_ccm_account": false, + "v2.get_elastic_cloud_ccm_account": false, + "v2.list_elastic_cloud_ccm_accounts": false, + "v2.update_elastic_cloud_ccm_account": false, + "v2.create_elastic_cloud_monitoring_account": false, + "v2.delete_elastic_cloud_monitoring_account": false, + "v2.get_elastic_cloud_monitoring_account": false, + "v2.list_elastic_cloud_monitoring_accounts": false, + "v2.update_elastic_cloud_monitoring_account": false, + "v2.create_twilio_account": false, + "v2.delete_twilio_account": false, + "v2.get_twilio_account": false, + "v2.list_twilio_accounts": false, + "v2.update_twilio_account": false, "v2.add_role_to_restriction_query": false, "v2.create_restriction_query": false, "v2.delete_restriction_query": false, diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 8b02789b65d9..2dda225b1de8 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -3075,6 +3075,38 @@ def overrides "v2.due_date_rule_type" => "DueDateRuleType", "v2.due_date_rule_update_request" => "DueDateRuleUpdateRequest", "v2.due_date_severity" => "DueDateSeverity", + "v2.elastic_cloud_authentication" => "ElasticCloudAuthentication", + "v2.elastic_cloud_basic_auth" => "ElasticCloudBasicAuth", + "v2.elastic_cloud_basic_auth_type" => "ElasticCloudBasicAuthType", + "v2.elastic_cloud_ccm_account_attributes" => "ElasticCloudCcmAccountAttributes", + "v2.elastic_cloud_ccm_account_create_data" => "ElasticCloudCcmAccountCreateData", + "v2.elastic_cloud_ccm_account_data" => "ElasticCloudCcmAccountData", + "v2.elastic_cloud_ccm_account_request" => "ElasticCloudCcmAccountRequest", + "v2.elastic_cloud_ccm_account_response" => "ElasticCloudCcmAccountResponse", + "v2.elastic_cloud_ccm_accounts_response" => "ElasticCloudCcmAccountsResponse", + "v2.elastic_cloud_ccm_account_update_attributes" => "ElasticCloudCcmAccountUpdateAttributes", + "v2.elastic_cloud_ccm_account_update_data" => "ElasticCloudCcmAccountUpdateData", + "v2.elastic_cloud_ccm_account_update_request" => "ElasticCloudCcmAccountUpdateRequest", + "v2.elastic_cloud_ccm_authentication" => "ElasticCloudCcmAuthentication", + "v2.elastic_cloud_ccm_dataflow" => "ElasticCloudCcmDataflow", + "v2.elastic_cloud_ccm_dataflow_id" => "ElasticCloudCcmDataflowId", + "v2.elastic_cloud_ccm_settings" => "ElasticCloudCcmSettings", + "v2.elastic_cloud_ccm_settings_update" => "ElasticCloudCcmSettingsUpdate", + "v2.elastic_cloud_ccm_token_auth" => "ElasticCloudCcmTokenAuth", + "v2.elastic_cloud_ccm_token_auth_type" => "ElasticCloudCcmTokenAuthType", + "v2.elastic_cloud_dataflow" => "ElasticCloudDataflow", + "v2.elastic_cloud_dataflow_id" => "ElasticCloudDataflowId", + "v2.elastic_cloud_monitoring_account_attributes" => "ElasticCloudMonitoringAccountAttributes", + "v2.elastic_cloud_monitoring_account_create_data" => "ElasticCloudMonitoringAccountCreateData", + "v2.elastic_cloud_monitoring_account_data" => "ElasticCloudMonitoringAccountData", + "v2.elastic_cloud_monitoring_account_request" => "ElasticCloudMonitoringAccountRequest", + "v2.elastic_cloud_monitoring_account_response" => "ElasticCloudMonitoringAccountResponse", + "v2.elastic_cloud_monitoring_accounts_response" => "ElasticCloudMonitoringAccountsResponse", + "v2.elastic_cloud_monitoring_account_update_attributes" => "ElasticCloudMonitoringAccountUpdateAttributes", + "v2.elastic_cloud_monitoring_account_update_data" => "ElasticCloudMonitoringAccountUpdateData", + "v2.elastic_cloud_monitoring_account_update_request" => "ElasticCloudMonitoringAccountUpdateRequest", + "v2.elastic_cloud_settings" => "ElasticCloudSettings", + "v2.elastic_cloud_settings_update" => "ElasticCloudSettingsUpdate", "v2.elf_sourcemap_attributes" => "ELFSourcemapAttributes", "v2.elf_sourcemap_data" => "ELFSourcemapData", "v2.entity_attributes" => "EntityAttributes", @@ -3968,6 +4000,10 @@ def overrides "v2.input_schema_parameters_type" => "InputSchemaParametersType", "v2.intake_payload_accepted" => "IntakePayloadAccepted", "v2.integration" => "Integration", + "v2.integration_account_dataflow_health" => "IntegrationAccountDataflowHealth", + "v2.integration_account_dataflow_status" => "IntegrationAccountDataflowStatus", + "v2.integration_account_permissions" => "IntegrationAccountPermissions", + "v2.integration_account_type" => "IntegrationAccountType", "v2.integration_attributes" => "IntegrationAttributes", "v2.integration_incident" => "IntegrationIncident", "v2.integration_incident_field_mappings_items" => "IntegrationIncidentFieldMappingsItems", @@ -7873,6 +7909,22 @@ def overrides "v2.trigger_type" => "TriggerType", "v2.trigger_workflow_automation_action" => "TriggerWorkflowAutomationAction", "v2.trigger_workflow_automation_action_type" => "TriggerWorkflowAutomationActionType", + "v2.twilio_account_attributes" => "TwilioAccountAttributes", + "v2.twilio_account_create_data" => "TwilioAccountCreateData", + "v2.twilio_account_data" => "TwilioAccountData", + "v2.twilio_account_request" => "TwilioAccountRequest", + "v2.twilio_account_response" => "TwilioAccountResponse", + "v2.twilio_accounts_response" => "TwilioAccountsResponse", + "v2.twilio_account_update_attributes" => "TwilioAccountUpdateAttributes", + "v2.twilio_account_update_data" => "TwilioAccountUpdateData", + "v2.twilio_account_update_request" => "TwilioAccountUpdateRequest", + "v2.twilio_authentication" => "TwilioAuthentication", + "v2.twilio_basic_auth" => "TwilioBasicAuth", + "v2.twilio_basic_auth_type" => "TwilioBasicAuthType", + "v2.twilio_dataflow" => "TwilioDataflow", + "v2.twilio_dataflow_id" => "TwilioDataflowId", + "v2.twilio_settings" => "TwilioSettings", + "v2.twilio_settings_update" => "TwilioSettingsUpdate", "v2.uc_config_pair" => "UCConfigPair", "v2.uc_config_pair_data" => "UCConfigPairData", "v2.uc_config_pair_data_attributes" => "UCConfigPairDataAttributes", @@ -8305,6 +8357,8 @@ def overrides "v2.domain_allowlist_api" => "DomainAllowlistAPI", "v2.dora_metrics_api" => "DORAMetricsAPI", "v2.downtimes_api" => "DowntimesAPI", + "v2.elastic_cloud_cloud_cost_management_api" => "ElasticCloudCloudCostManagementAPI", + "v2.elastic_cloud_monitoring_api" => "ElasticCloudMonitoringAPI", "v2.entity_integration_configs_api" => "EntityIntegrationConfigsAPI", "v2.entity_risk_scores_api" => "EntityRiskScoresAPI", "v2.error_tracking_api" => "ErrorTrackingAPI", @@ -8391,6 +8445,7 @@ def overrides "v2.tag_policies_api" => "TagPoliciesAPI", "v2.teams_api" => "TeamsAPI", "v2.test_optimization_api" => "TestOptimizationAPI", + "v2.twilio_integration_accounts_api" => "TwilioIntegrationAccountsAPI", "v2.usage_metering_api" => "UsageMeteringAPI", "v2.user_authorized_clients_api" => "UserAuthorizedClientsAPI", "v2.users_api" => "UsersAPI", diff --git a/lib/datadog_api_client/v2/api/elastic_cloud_cloud_cost_management_api.rb b/lib/datadog_api_client/v2/api/elastic_cloud_cloud_cost_management_api.rb new file mode 100644 index 000000000000..cd3641cac8dd --- /dev/null +++ b/lib/datadog_api_client/v2/api/elastic_cloud_cloud_cost_management_api.rb @@ -0,0 +1,385 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'cgi' + +module DatadogAPIClient::V2 + class ElasticCloudCloudCostManagementAPI + attr_accessor :api_client + + def initialize(api_client = DatadogAPIClient::APIClient.default) + @api_client = api_client + end + + # Create an Elastic Cloud CCM account. + # + # @see #create_elastic_cloud_ccm_account_with_http_info + def create_elastic_cloud_ccm_account(body, opts = {}) + data, _status_code, _headers = create_elastic_cloud_ccm_account_with_http_info(body, opts) + data + end + + # Create an Elastic Cloud CCM account. + # + # Create an Elastic Cloud CCM (Cloud Cost Management) account. + # + # @param body [ElasticCloudCcmAccountRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(ElasticCloudCcmAccountResponse, Integer, Hash)>] ElasticCloudCcmAccountResponse data, response status code and response headers + def create_elastic_cloud_ccm_account_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.create_elastic_cloud_ccm_account".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_elastic_cloud_ccm_account") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_elastic_cloud_ccm_account")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ElasticCloudCloudCostManagementAPI.create_elastic_cloud_ccm_account ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling ElasticCloudCloudCostManagementAPI.create_elastic_cloud_ccm_account" + end + # resource path + local_var_path = '/api/v2/integrations/elastic-cloud/interfaces/elastic-cloud-ccm/accounts' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'ElasticCloudCcmAccountResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :create_elastic_cloud_ccm_account, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ElasticCloudCloudCostManagementAPI#create_elastic_cloud_ccm_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Delete an Elastic Cloud CCM account. + # + # @see #delete_elastic_cloud_ccm_account_with_http_info + def delete_elastic_cloud_ccm_account(account_id, opts = {}) + delete_elastic_cloud_ccm_account_with_http_info(account_id, opts) + nil + end + + # Delete an Elastic Cloud CCM account. + # + # Delete an Elastic Cloud CCM (Cloud Cost Management) account. + # + # @param account_id [String] Unique identifier of the integration account. + # @param opts [Hash] the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_elastic_cloud_ccm_account_with_http_info(account_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.delete_elastic_cloud_ccm_account".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_elastic_cloud_ccm_account") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_elastic_cloud_ccm_account")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ElasticCloudCloudCostManagementAPI.delete_elastic_cloud_ccm_account ...' + end + # verify the required parameter 'account_id' is set + if @api_client.config.client_side_validation && account_id.nil? + fail ArgumentError, "Missing the required parameter 'account_id' when calling ElasticCloudCloudCostManagementAPI.delete_elastic_cloud_ccm_account" + end + # resource path + local_var_path = '/api/v2/integrations/elastic-cloud/interfaces/elastic-cloud-ccm/accounts/{account_id}'.sub('{account_id}', CGI.escape(account_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :delete_elastic_cloud_ccm_account, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ElasticCloudCloudCostManagementAPI#delete_elastic_cloud_ccm_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get an Elastic Cloud CCM account. + # + # @see #get_elastic_cloud_ccm_account_with_http_info + def get_elastic_cloud_ccm_account(account_id, opts = {}) + data, _status_code, _headers = get_elastic_cloud_ccm_account_with_http_info(account_id, opts) + data + end + + # Get an Elastic Cloud CCM account. + # + # Get a single Elastic Cloud CCM (Cloud Cost Management) account. + # + # @param account_id [String] Unique identifier of the integration account. + # @param opts [Hash] the optional parameters + # @return [Array<(ElasticCloudCcmAccountResponse, Integer, Hash)>] ElasticCloudCcmAccountResponse data, response status code and response headers + def get_elastic_cloud_ccm_account_with_http_info(account_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_elastic_cloud_ccm_account".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_elastic_cloud_ccm_account") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_elastic_cloud_ccm_account")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ElasticCloudCloudCostManagementAPI.get_elastic_cloud_ccm_account ...' + end + # verify the required parameter 'account_id' is set + if @api_client.config.client_side_validation && account_id.nil? + fail ArgumentError, "Missing the required parameter 'account_id' when calling ElasticCloudCloudCostManagementAPI.get_elastic_cloud_ccm_account" + end + # resource path + local_var_path = '/api/v2/integrations/elastic-cloud/interfaces/elastic-cloud-ccm/accounts/{account_id}'.sub('{account_id}', CGI.escape(account_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ElasticCloudCcmAccountResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :get_elastic_cloud_ccm_account, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ElasticCloudCloudCostManagementAPI#get_elastic_cloud_ccm_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List Elastic Cloud CCM accounts. + # + # @see #list_elastic_cloud_ccm_accounts_with_http_info + def list_elastic_cloud_ccm_accounts(opts = {}) + data, _status_code, _headers = list_elastic_cloud_ccm_accounts_with_http_info(opts) + data + end + + # List Elastic Cloud CCM accounts. + # + # List the Elastic Cloud CCM (Cloud Cost Management) accounts. + # + # @param opts [Hash] the optional parameters + # @return [Array<(ElasticCloudCcmAccountsResponse, Integer, Hash)>] ElasticCloudCcmAccountsResponse data, response status code and response headers + def list_elastic_cloud_ccm_accounts_with_http_info(opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_elastic_cloud_ccm_accounts".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_elastic_cloud_ccm_accounts") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_elastic_cloud_ccm_accounts")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ElasticCloudCloudCostManagementAPI.list_elastic_cloud_ccm_accounts ...' + end + # resource path + local_var_path = '/api/v2/integrations/elastic-cloud/interfaces/elastic-cloud-ccm/accounts' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ElasticCloudCcmAccountsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :list_elastic_cloud_ccm_accounts, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ElasticCloudCloudCostManagementAPI#list_elastic_cloud_ccm_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Update an Elastic Cloud CCM account. + # + # @see #update_elastic_cloud_ccm_account_with_http_info + def update_elastic_cloud_ccm_account(account_id, body, opts = {}) + data, _status_code, _headers = update_elastic_cloud_ccm_account_with_http_info(account_id, body, opts) + data + end + + # Update an Elastic Cloud CCM account. + # + # Update an Elastic Cloud CCM account. The update is a partial merge: only the fields provided are changed, so a name-only or settings-only update does not need to resend the full payload or write-only credentials. + # + # @param account_id [String] Unique identifier of the integration account. + # @param body [ElasticCloudCcmAccountUpdateRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(ElasticCloudCcmAccountResponse, Integer, Hash)>] ElasticCloudCcmAccountResponse data, response status code and response headers + def update_elastic_cloud_ccm_account_with_http_info(account_id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.update_elastic_cloud_ccm_account".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_elastic_cloud_ccm_account") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_elastic_cloud_ccm_account")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ElasticCloudCloudCostManagementAPI.update_elastic_cloud_ccm_account ...' + end + # verify the required parameter 'account_id' is set + if @api_client.config.client_side_validation && account_id.nil? + fail ArgumentError, "Missing the required parameter 'account_id' when calling ElasticCloudCloudCostManagementAPI.update_elastic_cloud_ccm_account" + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling ElasticCloudCloudCostManagementAPI.update_elastic_cloud_ccm_account" + end + # resource path + local_var_path = '/api/v2/integrations/elastic-cloud/interfaces/elastic-cloud-ccm/accounts/{account_id}'.sub('{account_id}', CGI.escape(account_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'ElasticCloudCcmAccountResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :update_elastic_cloud_ccm_account, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ElasticCloudCloudCostManagementAPI#update_elastic_cloud_ccm_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/datadog_api_client/v2/api/elastic_cloud_monitoring_api.rb b/lib/datadog_api_client/v2/api/elastic_cloud_monitoring_api.rb new file mode 100644 index 000000000000..dd09ca588a89 --- /dev/null +++ b/lib/datadog_api_client/v2/api/elastic_cloud_monitoring_api.rb @@ -0,0 +1,385 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'cgi' + +module DatadogAPIClient::V2 + class ElasticCloudMonitoringAPI + attr_accessor :api_client + + def initialize(api_client = DatadogAPIClient::APIClient.default) + @api_client = api_client + end + + # Create an Elastic Cloud monitoring account. + # + # @see #create_elastic_cloud_monitoring_account_with_http_info + def create_elastic_cloud_monitoring_account(body, opts = {}) + data, _status_code, _headers = create_elastic_cloud_monitoring_account_with_http_info(body, opts) + data + end + + # Create an Elastic Cloud monitoring account. + # + # Create an Elastic Cloud monitoring account. + # + # @param body [ElasticCloudMonitoringAccountRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(ElasticCloudMonitoringAccountResponse, Integer, Hash)>] ElasticCloudMonitoringAccountResponse data, response status code and response headers + def create_elastic_cloud_monitoring_account_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.create_elastic_cloud_monitoring_account".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_elastic_cloud_monitoring_account") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_elastic_cloud_monitoring_account")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ElasticCloudMonitoringAPI.create_elastic_cloud_monitoring_account ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling ElasticCloudMonitoringAPI.create_elastic_cloud_monitoring_account" + end + # resource path + local_var_path = '/api/v2/integrations/elastic-cloud/interfaces/elastic-cloud/accounts' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'ElasticCloudMonitoringAccountResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :create_elastic_cloud_monitoring_account, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ElasticCloudMonitoringAPI#create_elastic_cloud_monitoring_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Delete an Elastic Cloud monitoring account. + # + # @see #delete_elastic_cloud_monitoring_account_with_http_info + def delete_elastic_cloud_monitoring_account(account_id, opts = {}) + delete_elastic_cloud_monitoring_account_with_http_info(account_id, opts) + nil + end + + # Delete an Elastic Cloud monitoring account. + # + # Delete an Elastic Cloud monitoring account. + # + # @param account_id [String] Unique identifier of the integration account. + # @param opts [Hash] the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_elastic_cloud_monitoring_account_with_http_info(account_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.delete_elastic_cloud_monitoring_account".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_elastic_cloud_monitoring_account") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_elastic_cloud_monitoring_account")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ElasticCloudMonitoringAPI.delete_elastic_cloud_monitoring_account ...' + end + # verify the required parameter 'account_id' is set + if @api_client.config.client_side_validation && account_id.nil? + fail ArgumentError, "Missing the required parameter 'account_id' when calling ElasticCloudMonitoringAPI.delete_elastic_cloud_monitoring_account" + end + # resource path + local_var_path = '/api/v2/integrations/elastic-cloud/interfaces/elastic-cloud/accounts/{account_id}'.sub('{account_id}', CGI.escape(account_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :delete_elastic_cloud_monitoring_account, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ElasticCloudMonitoringAPI#delete_elastic_cloud_monitoring_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get an Elastic Cloud monitoring account. + # + # @see #get_elastic_cloud_monitoring_account_with_http_info + def get_elastic_cloud_monitoring_account(account_id, opts = {}) + data, _status_code, _headers = get_elastic_cloud_monitoring_account_with_http_info(account_id, opts) + data + end + + # Get an Elastic Cloud monitoring account. + # + # Get a single Elastic Cloud monitoring account. + # + # @param account_id [String] Unique identifier of the integration account. + # @param opts [Hash] the optional parameters + # @return [Array<(ElasticCloudMonitoringAccountResponse, Integer, Hash)>] ElasticCloudMonitoringAccountResponse data, response status code and response headers + def get_elastic_cloud_monitoring_account_with_http_info(account_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_elastic_cloud_monitoring_account".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_elastic_cloud_monitoring_account") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_elastic_cloud_monitoring_account")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ElasticCloudMonitoringAPI.get_elastic_cloud_monitoring_account ...' + end + # verify the required parameter 'account_id' is set + if @api_client.config.client_side_validation && account_id.nil? + fail ArgumentError, "Missing the required parameter 'account_id' when calling ElasticCloudMonitoringAPI.get_elastic_cloud_monitoring_account" + end + # resource path + local_var_path = '/api/v2/integrations/elastic-cloud/interfaces/elastic-cloud/accounts/{account_id}'.sub('{account_id}', CGI.escape(account_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ElasticCloudMonitoringAccountResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :get_elastic_cloud_monitoring_account, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ElasticCloudMonitoringAPI#get_elastic_cloud_monitoring_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List Elastic Cloud monitoring accounts. + # + # @see #list_elastic_cloud_monitoring_accounts_with_http_info + def list_elastic_cloud_monitoring_accounts(opts = {}) + data, _status_code, _headers = list_elastic_cloud_monitoring_accounts_with_http_info(opts) + data + end + + # List Elastic Cloud monitoring accounts. + # + # List the Elastic Cloud monitoring accounts. + # + # @param opts [Hash] the optional parameters + # @return [Array<(ElasticCloudMonitoringAccountsResponse, Integer, Hash)>] ElasticCloudMonitoringAccountsResponse data, response status code and response headers + def list_elastic_cloud_monitoring_accounts_with_http_info(opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_elastic_cloud_monitoring_accounts".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_elastic_cloud_monitoring_accounts") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_elastic_cloud_monitoring_accounts")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ElasticCloudMonitoringAPI.list_elastic_cloud_monitoring_accounts ...' + end + # resource path + local_var_path = '/api/v2/integrations/elastic-cloud/interfaces/elastic-cloud/accounts' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'ElasticCloudMonitoringAccountsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :list_elastic_cloud_monitoring_accounts, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ElasticCloudMonitoringAPI#list_elastic_cloud_monitoring_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Update an Elastic Cloud monitoring account. + # + # @see #update_elastic_cloud_monitoring_account_with_http_info + def update_elastic_cloud_monitoring_account(account_id, body, opts = {}) + data, _status_code, _headers = update_elastic_cloud_monitoring_account_with_http_info(account_id, body, opts) + data + end + + # Update an Elastic Cloud monitoring account. + # + # Update an Elastic Cloud monitoring account. The update is a partial merge: only the fields provided are changed, so a name-only or settings-only update does not need to resend the full payload or write-only credentials. + # + # @param account_id [String] Unique identifier of the integration account. + # @param body [ElasticCloudMonitoringAccountUpdateRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(ElasticCloudMonitoringAccountResponse, Integer, Hash)>] ElasticCloudMonitoringAccountResponse data, response status code and response headers + def update_elastic_cloud_monitoring_account_with_http_info(account_id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.update_elastic_cloud_monitoring_account".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_elastic_cloud_monitoring_account") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_elastic_cloud_monitoring_account")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ElasticCloudMonitoringAPI.update_elastic_cloud_monitoring_account ...' + end + # verify the required parameter 'account_id' is set + if @api_client.config.client_side_validation && account_id.nil? + fail ArgumentError, "Missing the required parameter 'account_id' when calling ElasticCloudMonitoringAPI.update_elastic_cloud_monitoring_account" + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling ElasticCloudMonitoringAPI.update_elastic_cloud_monitoring_account" + end + # resource path + local_var_path = '/api/v2/integrations/elastic-cloud/interfaces/elastic-cloud/accounts/{account_id}'.sub('{account_id}', CGI.escape(account_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'ElasticCloudMonitoringAccountResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :update_elastic_cloud_monitoring_account, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: ElasticCloudMonitoringAPI#update_elastic_cloud_monitoring_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/datadog_api_client/v2/api/twilio_integration_accounts_api.rb b/lib/datadog_api_client/v2/api/twilio_integration_accounts_api.rb new file mode 100644 index 000000000000..9390a19a5e67 --- /dev/null +++ b/lib/datadog_api_client/v2/api/twilio_integration_accounts_api.rb @@ -0,0 +1,385 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'cgi' + +module DatadogAPIClient::V2 + class TwilioIntegrationAccountsAPI + attr_accessor :api_client + + def initialize(api_client = DatadogAPIClient::APIClient.default) + @api_client = api_client + end + + # Create a Twilio integration account. + # + # @see #create_twilio_account_with_http_info + def create_twilio_account(body, opts = {}) + data, _status_code, _headers = create_twilio_account_with_http_info(body, opts) + data + end + + # Create a Twilio integration account. + # + # Create a Twilio integration account. + # + # @param body [TwilioAccountRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(TwilioAccountResponse, Integer, Hash)>] TwilioAccountResponse data, response status code and response headers + def create_twilio_account_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.create_twilio_account".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_twilio_account") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_twilio_account")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: TwilioIntegrationAccountsAPI.create_twilio_account ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling TwilioIntegrationAccountsAPI.create_twilio_account" + end + # resource path + local_var_path = '/api/v2/integrations/twilio/interfaces/twilio/accounts' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'TwilioAccountResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :create_twilio_account, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: TwilioIntegrationAccountsAPI#create_twilio_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Delete a Twilio integration account. + # + # @see #delete_twilio_account_with_http_info + def delete_twilio_account(account_id, opts = {}) + delete_twilio_account_with_http_info(account_id, opts) + nil + end + + # Delete a Twilio integration account. + # + # Delete a Twilio integration account. + # + # @param account_id [String] Unique identifier of the integration account. + # @param opts [Hash] the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_twilio_account_with_http_info(account_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.delete_twilio_account".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_twilio_account") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_twilio_account")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: TwilioIntegrationAccountsAPI.delete_twilio_account ...' + end + # verify the required parameter 'account_id' is set + if @api_client.config.client_side_validation && account_id.nil? + fail ArgumentError, "Missing the required parameter 'account_id' when calling TwilioIntegrationAccountsAPI.delete_twilio_account" + end + # resource path + local_var_path = '/api/v2/integrations/twilio/interfaces/twilio/accounts/{account_id}'.sub('{account_id}', CGI.escape(account_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :delete_twilio_account, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: TwilioIntegrationAccountsAPI#delete_twilio_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get a Twilio integration account. + # + # @see #get_twilio_account_with_http_info + def get_twilio_account(account_id, opts = {}) + data, _status_code, _headers = get_twilio_account_with_http_info(account_id, opts) + data + end + + # Get a Twilio integration account. + # + # Get a single Twilio integration account. + # + # @param account_id [String] Unique identifier of the integration account. + # @param opts [Hash] the optional parameters + # @return [Array<(TwilioAccountResponse, Integer, Hash)>] TwilioAccountResponse data, response status code and response headers + def get_twilio_account_with_http_info(account_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_twilio_account".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_twilio_account") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_twilio_account")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: TwilioIntegrationAccountsAPI.get_twilio_account ...' + end + # verify the required parameter 'account_id' is set + if @api_client.config.client_side_validation && account_id.nil? + fail ArgumentError, "Missing the required parameter 'account_id' when calling TwilioIntegrationAccountsAPI.get_twilio_account" + end + # resource path + local_var_path = '/api/v2/integrations/twilio/interfaces/twilio/accounts/{account_id}'.sub('{account_id}', CGI.escape(account_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'TwilioAccountResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :get_twilio_account, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: TwilioIntegrationAccountsAPI#get_twilio_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List Twilio integration accounts. + # + # @see #list_twilio_accounts_with_http_info + def list_twilio_accounts(opts = {}) + data, _status_code, _headers = list_twilio_accounts_with_http_info(opts) + data + end + + # List Twilio integration accounts. + # + # List the Twilio integration accounts. + # + # @param opts [Hash] the optional parameters + # @return [Array<(TwilioAccountsResponse, Integer, Hash)>] TwilioAccountsResponse data, response status code and response headers + def list_twilio_accounts_with_http_info(opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_twilio_accounts".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_twilio_accounts") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_twilio_accounts")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: TwilioIntegrationAccountsAPI.list_twilio_accounts ...' + end + # resource path + local_var_path = '/api/v2/integrations/twilio/interfaces/twilio/accounts' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'TwilioAccountsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :list_twilio_accounts, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: TwilioIntegrationAccountsAPI#list_twilio_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Update a Twilio integration account. + # + # @see #update_twilio_account_with_http_info + def update_twilio_account(account_id, body, opts = {}) + data, _status_code, _headers = update_twilio_account_with_http_info(account_id, body, opts) + data + end + + # Update a Twilio integration account. + # + # Update a Twilio integration account. The update is a partial merge: only the fields provided are changed, so a name-only or settings-only update does not need to resend the full payload or write-only credentials. + # + # @param account_id [String] Unique identifier of the integration account. + # @param body [TwilioAccountUpdateRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(TwilioAccountResponse, Integer, Hash)>] TwilioAccountResponse data, response status code and response headers + def update_twilio_account_with_http_info(account_id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.update_twilio_account".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_twilio_account") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_twilio_account")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: TwilioIntegrationAccountsAPI.update_twilio_account ...' + end + # verify the required parameter 'account_id' is set + if @api_client.config.client_side_validation && account_id.nil? + fail ArgumentError, "Missing the required parameter 'account_id' when calling TwilioIntegrationAccountsAPI.update_twilio_account" + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling TwilioIntegrationAccountsAPI.update_twilio_account" + end + # resource path + local_var_path = '/api/v2/integrations/twilio/interfaces/twilio/accounts/{account_id}'.sub('{account_id}', CGI.escape(account_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'TwilioAccountResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :update_twilio_account, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: TwilioIntegrationAccountsAPI#update_twilio_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/datadog_api_client/v2/models/elastic_cloud_authentication.rb b/lib/datadog_api_client/v2/models/elastic_cloud_authentication.rb new file mode 100644 index 000000000000..33ef02f7faba --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_authentication.rb @@ -0,0 +1,62 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Authentication methods supported by the Elastic Cloud monitoring interface. Exactly one is set, selected by its `type`. + module ElasticCloudAuthentication + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'ElasticCloudBasicAuth' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/elastic_cloud_basic_auth.rb b/lib/datadog_api_client/v2/models/elastic_cloud_basic_auth.rb new file mode 100644 index 000000000000..172351337fd6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_basic_auth.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Username & password authentication for Elastic Cloud. + class ElasticCloudBasicAuth + include BaseGenericModel + + # Password used to authenticate against the deployment. This field is not returned by the API. + attr_reader :password + + # Authentication method discriminator. + attr_reader :type + + # Username used to authenticate against the deployment. + attr_reader :username + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'password' => :'password', + :'type' => :'type', + :'username' => :'username' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'password' => :'String', + :'type' => :'ElasticCloudBasicAuthType', + :'username' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ElasticCloudBasicAuth` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'password') + self.password = attributes[:'password'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'username') + self.username = attributes[:'username'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @password.nil? + return false if @type.nil? + return false if @username.nil? + true + end + + # Custom attribute writer method with validation + # @param password [Object] Object to be assigned + # @!visibility private + def password=(password) + if password.nil? + fail ArgumentError, 'invalid value for "password", password cannot be nil.' + end + @password = password + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Custom attribute writer method with validation + # @param username [Object] Object to be assigned + # @!visibility private + def username=(username) + if username.nil? + fail ArgumentError, 'invalid value for "username", username cannot be nil.' + end + @username = username + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + password == o.password && + type == o.type && + username == o.username && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [password, type, username, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/elastic_cloud_basic_auth_type.rb b/lib/datadog_api_client/v2/models/elastic_cloud_basic_auth_type.rb new file mode 100644 index 000000000000..dedf842452b3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_basic_auth_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Authentication method discriminator. + class ElasticCloudBasicAuthType + include BaseEnumModel + + BASIC = "basic".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/elastic_cloud_ccm_account_attributes.rb b/lib/datadog_api_client/v2/models/elastic_cloud_ccm_account_attributes.rb new file mode 100644 index 000000000000..1099f8372fbb --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_ccm_account_attributes.rb @@ -0,0 +1,176 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of an Elastic Cloud CCM (Cloud Cost Management) account. The configuration is hoisted directly onto the attributes; there is no interface wrapper because the `elastic-cloud-ccm` interface is fixed by the endpoint path. + class ElasticCloudCcmAccountAttributes + include BaseGenericModel + + # Authentication methods supported by the Elastic Cloud CCM interface. Exactly one is set, selected by its `type`. + attr_reader :authentication + + # Dataflows for the Elastic Cloud CCM interface. + attr_accessor :dataflows + + # Human-readable name of the account. + attr_reader :name + + # Read-only permission information for the account, derived from its restriction policy. + attr_accessor :permissions + + # Elastic Cloud CCM interface settings. + attr_accessor :settings + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'authentication' => :'authentication', + :'dataflows' => :'dataflows', + :'name' => :'name', + :'permissions' => :'permissions', + :'settings' => :'settings' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'authentication' => :'ElasticCloudCcmAuthentication', + :'dataflows' => :'Array', + :'name' => :'String', + :'permissions' => :'IntegrationAccountPermissions', + :'settings' => :'ElasticCloudCcmSettings' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ElasticCloudCcmAccountAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'authentication') + self.authentication = attributes[:'authentication'] + end + + if attributes.key?(:'dataflows') + if (value = attributes[:'dataflows']).is_a?(Array) + self.dataflows = value + end + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'permissions') + self.permissions = attributes[:'permissions'] + end + + if attributes.key?(:'settings') + self.settings = attributes[:'settings'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @authentication.nil? + return false if @name.nil? + true + end + + # Custom attribute writer method with validation + # @param authentication [Object] Object to be assigned + # @!visibility private + def authentication=(authentication) + if authentication.nil? + fail ArgumentError, 'invalid value for "authentication", authentication cannot be nil.' + end + @authentication = authentication + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + authentication == o.authentication && + dataflows == o.dataflows && + name == o.name && + permissions == o.permissions && + settings == o.settings && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [authentication, dataflows, name, permissions, settings, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/elastic_cloud_ccm_account_create_data.rb b/lib/datadog_api_client/v2/models/elastic_cloud_ccm_account_create_data.rb new file mode 100644 index 000000000000..09c5e241a9cb --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_ccm_account_create_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data envelope for creating an Elastic Cloud CCM account. + class ElasticCloudCcmAccountCreateData + include BaseGenericModel + + # Attributes of an Elastic Cloud CCM (Cloud Cost Management) account. The configuration is hoisted directly onto the attributes; there is no interface wrapper because the `elastic-cloud-ccm` interface is fixed by the endpoint path. + attr_reader :attributes + + # JSON:API resource type for an integration account. Always `integration-account`. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'ElasticCloudCcmAccountAttributes', + :'type' => :'IntegrationAccountType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ElasticCloudCcmAccountCreateData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/elastic_cloud_ccm_account_data.rb b/lib/datadog_api_client/v2/models/elastic_cloud_ccm_account_data.rb new file mode 100644 index 000000000000..83ac47904fcf --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_ccm_account_data.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data envelope of an Elastic Cloud CCM account, including server-assigned identity. + class ElasticCloudCcmAccountData + include BaseGenericModel + + # Attributes of an Elastic Cloud CCM (Cloud Cost Management) account. The configuration is hoisted directly onto the attributes; there is no interface wrapper because the `elastic-cloud-ccm` interface is fixed by the endpoint path. + attr_reader :attributes + + # Server-generated unique identifier of the integration account. + attr_reader :id + + # JSON:API resource type for an integration account. Always `integration-account`. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'ElasticCloudCcmAccountAttributes', + :'id' => :'String', + :'type' => :'IntegrationAccountType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ElasticCloudCcmAccountData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/elastic_cloud_ccm_account_request.rb b/lib/datadog_api_client/v2/models/elastic_cloud_ccm_account_request.rb new file mode 100644 index 000000000000..bdd458b0e0c3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_ccm_account_request.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Request payload to create an Elastic Cloud CCM (Cloud Cost Management) account. + class ElasticCloudCcmAccountRequest + include BaseGenericModel + + # Data envelope for creating an Elastic Cloud CCM account. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'ElasticCloudCcmAccountCreateData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ElasticCloudCcmAccountRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/elastic_cloud_ccm_account_response.rb b/lib/datadog_api_client/v2/models/elastic_cloud_ccm_account_response.rb new file mode 100644 index 000000000000..06bb98c0e52a --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_ccm_account_response.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response payload for a single Elastic Cloud CCM account. + class ElasticCloudCcmAccountResponse + include BaseGenericModel + + # Data envelope of an Elastic Cloud CCM account, including server-assigned identity. + attr_accessor :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'ElasticCloudCcmAccountData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ElasticCloudCcmAccountResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/elastic_cloud_ccm_account_update_attributes.rb b/lib/datadog_api_client/v2/models/elastic_cloud_ccm_account_update_attributes.rb new file mode 100644 index 000000000000..18884fc06e1a --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_ccm_account_update_attributes.rb @@ -0,0 +1,137 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Updatable attributes of an Elastic Cloud CCM account. Every field is optional; only the fields provided are changed. + class ElasticCloudCcmAccountUpdateAttributes + include BaseGenericModel + + # Authentication methods supported by the Elastic Cloud CCM interface. Exactly one is set, selected by its `type`. + attr_accessor :authentication + + # Dataflows for the Elastic Cloud CCM interface. + attr_accessor :dataflows + + # Human-readable name of the account. + attr_accessor :name + + # Partial Elastic Cloud CCM interface settings for updates. + attr_accessor :settings + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'authentication' => :'authentication', + :'dataflows' => :'dataflows', + :'name' => :'name', + :'settings' => :'settings' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'authentication' => :'ElasticCloudCcmAuthentication', + :'dataflows' => :'Array', + :'name' => :'String', + :'settings' => :'ElasticCloudCcmSettingsUpdate' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ElasticCloudCcmAccountUpdateAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'authentication') + self.authentication = attributes[:'authentication'] + end + + if attributes.key?(:'dataflows') + if (value = attributes[:'dataflows']).is_a?(Array) + self.dataflows = value + end + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'settings') + self.settings = attributes[:'settings'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + authentication == o.authentication && + dataflows == o.dataflows && + name == o.name && + settings == o.settings && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [authentication, dataflows, name, settings, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/elastic_cloud_ccm_account_update_data.rb b/lib/datadog_api_client/v2/models/elastic_cloud_ccm_account_update_data.rb new file mode 100644 index 000000000000..caccbb41c9a2 --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_ccm_account_update_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data envelope for updating an Elastic Cloud CCM account. + class ElasticCloudCcmAccountUpdateData + include BaseGenericModel + + # Updatable attributes of an Elastic Cloud CCM account. Every field is optional; only the fields provided are changed. + attr_reader :attributes + + # JSON:API resource type for an integration account. Always `integration-account`. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'ElasticCloudCcmAccountUpdateAttributes', + :'type' => :'IntegrationAccountType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ElasticCloudCcmAccountUpdateData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/elastic_cloud_ccm_account_update_request.rb b/lib/datadog_api_client/v2/models/elastic_cloud_ccm_account_update_request.rb new file mode 100644 index 000000000000..7ad450ed8b2b --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_ccm_account_update_request.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Request payload to update an Elastic Cloud CCM account as a partial merge. + class ElasticCloudCcmAccountUpdateRequest + include BaseGenericModel + + # Data envelope for updating an Elastic Cloud CCM account. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'ElasticCloudCcmAccountUpdateData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ElasticCloudCcmAccountUpdateRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/elastic_cloud_ccm_accounts_response.rb b/lib/datadog_api_client/v2/models/elastic_cloud_ccm_accounts_response.rb new file mode 100644 index 000000000000..ff83862593a6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_ccm_accounts_response.rb @@ -0,0 +1,107 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response payload for a list of Elastic Cloud CCM accounts. + class ElasticCloudCcmAccountsResponse + include BaseGenericModel + + # List of Elastic Cloud CCM accounts. + attr_accessor :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ElasticCloudCcmAccountsResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/elastic_cloud_ccm_authentication.rb b/lib/datadog_api_client/v2/models/elastic_cloud_ccm_authentication.rb new file mode 100644 index 000000000000..66bc1e0ce7cf --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_ccm_authentication.rb @@ -0,0 +1,62 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Authentication methods supported by the Elastic Cloud CCM interface. Exactly one is set, selected by its `type`. + module ElasticCloudCcmAuthentication + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'ElasticCloudCcmTokenAuth' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/elastic_cloud_ccm_dataflow.rb b/lib/datadog_api_client/v2/models/elastic_cloud_ccm_dataflow.rb new file mode 100644 index 000000000000..ae41a31ebb27 --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_ccm_dataflow.rb @@ -0,0 +1,143 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # An Elastic Cloud CCM dataflow toggle. The set of dataflow ids is fixed by the interface schema. + class ElasticCloudCcmDataflow + include BaseGenericModel + + # Whether the dataflow is enabled. + attr_accessor :enabled + + # Identifier of an Elastic Cloud CCM dataflow. + attr_reader :id + + # Read-only, server-computed collection status of a dataflow. + attr_accessor :status + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'enabled' => :'enabled', + :'id' => :'id', + :'status' => :'status' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'Boolean', + :'id' => :'ElasticCloudCcmDataflowId', + :'status' => :'IntegrationAccountDataflowStatus' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ElasticCloudCcmDataflow` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @id.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + enabled == o.enabled && + id == o.id && + status == o.status && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [enabled, id, status, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/elastic_cloud_ccm_dataflow_id.rb b/lib/datadog_api_client/v2/models/elastic_cloud_ccm_dataflow_id.rb new file mode 100644 index 000000000000..9040e284420d --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_ccm_dataflow_id.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Identifier of an Elastic Cloud CCM dataflow. + class ElasticCloudCcmDataflowId + include BaseEnumModel + + COST_DATA = "elastic-cloud-cost-data".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/elastic_cloud_ccm_settings.rb b/lib/datadog_api_client/v2/models/elastic_cloud_ccm_settings.rb new file mode 100644 index 000000000000..a7b4493ccea7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_ccm_settings.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Elastic Cloud CCM interface settings. + class ElasticCloudCcmSettings + include BaseGenericModel + + # Your Elastic Cloud organization ID, found in your organization settings. + attr_reader :elastic_org_id + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'elastic_org_id' => :'elastic_org_id' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'elastic_org_id' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ElasticCloudCcmSettings` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'elastic_org_id') + self.elastic_org_id = attributes[:'elastic_org_id'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @elastic_org_id.nil? + true + end + + # Custom attribute writer method with validation + # @param elastic_org_id [Object] Object to be assigned + # @!visibility private + def elastic_org_id=(elastic_org_id) + if elastic_org_id.nil? + fail ArgumentError, 'invalid value for "elastic_org_id", elastic_org_id cannot be nil.' + end + @elastic_org_id = elastic_org_id + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + elastic_org_id == o.elastic_org_id && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [elastic_org_id, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/elastic_cloud_ccm_settings_update.rb b/lib/datadog_api_client/v2/models/elastic_cloud_ccm_settings_update.rb new file mode 100644 index 000000000000..2ad1e5a6c878 --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_ccm_settings_update.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Partial Elastic Cloud CCM interface settings for updates. + class ElasticCloudCcmSettingsUpdate + include BaseGenericModel + + # Your Elastic Cloud organization ID, found in your organization settings. + attr_accessor :elastic_org_id + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'elastic_org_id' => :'elastic_org_id' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'elastic_org_id' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ElasticCloudCcmSettingsUpdate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'elastic_org_id') + self.elastic_org_id = attributes[:'elastic_org_id'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + elastic_org_id == o.elastic_org_id && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [elastic_org_id, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/elastic_cloud_ccm_token_auth.rb b/lib/datadog_api_client/v2/models/elastic_cloud_ccm_token_auth.rb new file mode 100644 index 000000000000..1cb39fb0a65c --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_ccm_token_auth.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Encrypted token (bearer token) authentication for Elastic Cloud CCM. + class ElasticCloudCcmTokenAuth + include BaseGenericModel + + # Billing API key. An Elastic Cloud API key with read access to both Billing and Deployments. Create one under Organization settings > API Keys. This field is not returned by the API. + attr_reader :api_key + + # Authentication method discriminator. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'api_key' => :'api_key', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'api_key' => :'String', + :'type' => :'ElasticCloudCcmTokenAuthType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ElasticCloudCcmTokenAuth` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'api_key') + self.api_key = attributes[:'api_key'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @api_key.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param api_key [Object] Object to be assigned + # @!visibility private + def api_key=(api_key) + if api_key.nil? + fail ArgumentError, 'invalid value for "api_key", api_key cannot be nil.' + end + @api_key = api_key + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + api_key == o.api_key && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [api_key, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/elastic_cloud_ccm_token_auth_type.rb b/lib/datadog_api_client/v2/models/elastic_cloud_ccm_token_auth_type.rb new file mode 100644 index 000000000000..69e08099fa55 --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_ccm_token_auth_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Authentication method discriminator. + class ElasticCloudCcmTokenAuthType + include BaseEnumModel + + BEARER_TOKEN = "bearer_token".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/elastic_cloud_dataflow.rb b/lib/datadog_api_client/v2/models/elastic_cloud_dataflow.rb new file mode 100644 index 000000000000..d4e09985bac4 --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_dataflow.rb @@ -0,0 +1,143 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # An Elastic Cloud monitoring dataflow toggle. The set of dataflow ids is fixed by the interface schema. + class ElasticCloudDataflow + include BaseGenericModel + + # Whether the dataflow is enabled. + attr_accessor :enabled + + # Identifier of an Elastic Cloud monitoring dataflow. + attr_reader :id + + # Read-only, server-computed collection status of a dataflow. + attr_accessor :status + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'enabled' => :'enabled', + :'id' => :'id', + :'status' => :'status' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'Boolean', + :'id' => :'ElasticCloudDataflowId', + :'status' => :'IntegrationAccountDataflowStatus' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ElasticCloudDataflow` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @id.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + enabled == o.enabled && + id == o.id && + status == o.status && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [enabled, id, status, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/elastic_cloud_dataflow_id.rb b/lib/datadog_api_client/v2/models/elastic_cloud_dataflow_id.rb new file mode 100644 index 000000000000..2334a1cb8c54 --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_dataflow_id.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Identifier of an Elastic Cloud monitoring dataflow. + class ElasticCloudDataflowId + include BaseEnumModel + + METRICS = "elastic-cloud-metrics".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/elastic_cloud_monitoring_account_attributes.rb b/lib/datadog_api_client/v2/models/elastic_cloud_monitoring_account_attributes.rb new file mode 100644 index 000000000000..f493b44be55d --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_monitoring_account_attributes.rb @@ -0,0 +1,176 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of an Elastic Cloud monitoring account. The configuration is hoisted directly onto the attributes; there is no interface wrapper because the `elastic-cloud` interface is fixed by the endpoint path. + class ElasticCloudMonitoringAccountAttributes + include BaseGenericModel + + # Authentication methods supported by the Elastic Cloud monitoring interface. Exactly one is set, selected by its `type`. + attr_reader :authentication + + # Dataflows for the Elastic Cloud monitoring interface. + attr_accessor :dataflows + + # Human-readable name of the account. + attr_reader :name + + # Read-only permission information for the account, derived from its restriction policy. + attr_accessor :permissions + + # Elastic Cloud monitoring interface settings. + attr_accessor :settings + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'authentication' => :'authentication', + :'dataflows' => :'dataflows', + :'name' => :'name', + :'permissions' => :'permissions', + :'settings' => :'settings' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'authentication' => :'ElasticCloudAuthentication', + :'dataflows' => :'Array', + :'name' => :'String', + :'permissions' => :'IntegrationAccountPermissions', + :'settings' => :'ElasticCloudSettings' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ElasticCloudMonitoringAccountAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'authentication') + self.authentication = attributes[:'authentication'] + end + + if attributes.key?(:'dataflows') + if (value = attributes[:'dataflows']).is_a?(Array) + self.dataflows = value + end + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'permissions') + self.permissions = attributes[:'permissions'] + end + + if attributes.key?(:'settings') + self.settings = attributes[:'settings'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @authentication.nil? + return false if @name.nil? + true + end + + # Custom attribute writer method with validation + # @param authentication [Object] Object to be assigned + # @!visibility private + def authentication=(authentication) + if authentication.nil? + fail ArgumentError, 'invalid value for "authentication", authentication cannot be nil.' + end + @authentication = authentication + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + authentication == o.authentication && + dataflows == o.dataflows && + name == o.name && + permissions == o.permissions && + settings == o.settings && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [authentication, dataflows, name, permissions, settings, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/elastic_cloud_monitoring_account_create_data.rb b/lib/datadog_api_client/v2/models/elastic_cloud_monitoring_account_create_data.rb new file mode 100644 index 000000000000..6cdb6d0fdf93 --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_monitoring_account_create_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data envelope for creating an Elastic Cloud monitoring account. + class ElasticCloudMonitoringAccountCreateData + include BaseGenericModel + + # Attributes of an Elastic Cloud monitoring account. The configuration is hoisted directly onto the attributes; there is no interface wrapper because the `elastic-cloud` interface is fixed by the endpoint path. + attr_reader :attributes + + # JSON:API resource type for an integration account. Always `integration-account`. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'ElasticCloudMonitoringAccountAttributes', + :'type' => :'IntegrationAccountType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ElasticCloudMonitoringAccountCreateData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/elastic_cloud_monitoring_account_data.rb b/lib/datadog_api_client/v2/models/elastic_cloud_monitoring_account_data.rb new file mode 100644 index 000000000000..a1514c105210 --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_monitoring_account_data.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data envelope of an Elastic Cloud monitoring account, including server-assigned identity. + class ElasticCloudMonitoringAccountData + include BaseGenericModel + + # Attributes of an Elastic Cloud monitoring account. The configuration is hoisted directly onto the attributes; there is no interface wrapper because the `elastic-cloud` interface is fixed by the endpoint path. + attr_reader :attributes + + # Server-generated unique identifier of the integration account. + attr_reader :id + + # JSON:API resource type for an integration account. Always `integration-account`. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'ElasticCloudMonitoringAccountAttributes', + :'id' => :'String', + :'type' => :'IntegrationAccountType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ElasticCloudMonitoringAccountData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/elastic_cloud_monitoring_account_request.rb b/lib/datadog_api_client/v2/models/elastic_cloud_monitoring_account_request.rb new file mode 100644 index 000000000000..bf21759a06a3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_monitoring_account_request.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Request payload to create an Elastic Cloud monitoring account. + class ElasticCloudMonitoringAccountRequest + include BaseGenericModel + + # Data envelope for creating an Elastic Cloud monitoring account. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'ElasticCloudMonitoringAccountCreateData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ElasticCloudMonitoringAccountRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/elastic_cloud_monitoring_account_response.rb b/lib/datadog_api_client/v2/models/elastic_cloud_monitoring_account_response.rb new file mode 100644 index 000000000000..cf1de1fc69d0 --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_monitoring_account_response.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response payload for a single Elastic Cloud monitoring account. + class ElasticCloudMonitoringAccountResponse + include BaseGenericModel + + # Data envelope of an Elastic Cloud monitoring account, including server-assigned identity. + attr_accessor :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'ElasticCloudMonitoringAccountData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ElasticCloudMonitoringAccountResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/elastic_cloud_monitoring_account_update_attributes.rb b/lib/datadog_api_client/v2/models/elastic_cloud_monitoring_account_update_attributes.rb new file mode 100644 index 000000000000..fb5c8e5c00b2 --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_monitoring_account_update_attributes.rb @@ -0,0 +1,137 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Updatable attributes of an Elastic Cloud monitoring account. Every field is optional; only the fields provided are changed. + class ElasticCloudMonitoringAccountUpdateAttributes + include BaseGenericModel + + # Authentication methods supported by the Elastic Cloud monitoring interface. Exactly one is set, selected by its `type`. + attr_accessor :authentication + + # Dataflows for the Elastic Cloud monitoring interface. + attr_accessor :dataflows + + # Human-readable name of the account. + attr_accessor :name + + # Partial Elastic Cloud monitoring interface settings for updates. + attr_accessor :settings + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'authentication' => :'authentication', + :'dataflows' => :'dataflows', + :'name' => :'name', + :'settings' => :'settings' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'authentication' => :'ElasticCloudAuthentication', + :'dataflows' => :'Array', + :'name' => :'String', + :'settings' => :'ElasticCloudSettingsUpdate' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ElasticCloudMonitoringAccountUpdateAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'authentication') + self.authentication = attributes[:'authentication'] + end + + if attributes.key?(:'dataflows') + if (value = attributes[:'dataflows']).is_a?(Array) + self.dataflows = value + end + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'settings') + self.settings = attributes[:'settings'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + authentication == o.authentication && + dataflows == o.dataflows && + name == o.name && + settings == o.settings && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [authentication, dataflows, name, settings, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/elastic_cloud_monitoring_account_update_data.rb b/lib/datadog_api_client/v2/models/elastic_cloud_monitoring_account_update_data.rb new file mode 100644 index 000000000000..6c7d182af2d3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_monitoring_account_update_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data envelope for updating an Elastic Cloud monitoring account. + class ElasticCloudMonitoringAccountUpdateData + include BaseGenericModel + + # Updatable attributes of an Elastic Cloud monitoring account. Every field is optional; only the fields provided are changed. + attr_reader :attributes + + # JSON:API resource type for an integration account. Always `integration-account`. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'ElasticCloudMonitoringAccountUpdateAttributes', + :'type' => :'IntegrationAccountType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ElasticCloudMonitoringAccountUpdateData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/elastic_cloud_monitoring_account_update_request.rb b/lib/datadog_api_client/v2/models/elastic_cloud_monitoring_account_update_request.rb new file mode 100644 index 000000000000..308d7878ef64 --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_monitoring_account_update_request.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Request payload to update an Elastic Cloud monitoring account as a partial merge. + class ElasticCloudMonitoringAccountUpdateRequest + include BaseGenericModel + + # Data envelope for updating an Elastic Cloud monitoring account. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'ElasticCloudMonitoringAccountUpdateData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ElasticCloudMonitoringAccountUpdateRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/elastic_cloud_monitoring_accounts_response.rb b/lib/datadog_api_client/v2/models/elastic_cloud_monitoring_accounts_response.rb new file mode 100644 index 000000000000..8703590408f6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_monitoring_accounts_response.rb @@ -0,0 +1,107 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response payload for a list of Elastic Cloud monitoring accounts. + class ElasticCloudMonitoringAccountsResponse + include BaseGenericModel + + # List of Elastic Cloud monitoring accounts. + attr_accessor :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ElasticCloudMonitoringAccountsResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/elastic_cloud_settings.rb b/lib/datadog_api_client/v2/models/elastic_cloud_settings.rb new file mode 100644 index 000000000000..05a527d9bf5b --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_settings.rb @@ -0,0 +1,205 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Elastic Cloud monitoring interface settings. + class ElasticCloudSettings + include BaseGenericModel + + # Enable to collect shard allocation metrics. + attr_accessor :cat_allocation_stats_enabled + + # Enable to collect index-specific stats. + attr_accessor :detailed_index_stats_enabled + + # Enable to collect metrics about the indices in your cluster. + attr_accessor :index_stats_enabled + + # Enable to collect metrics about pending tasks. + attr_accessor :pending_task_stats_enabled + + # Enable to collect all metrics even if primary shard metric collection times out. + attr_accessor :pshard_graceful_to_enabled + + # Enable to collect metrics over primary shards. + attr_accessor :pshard_stats_enabled + + # Enable to collect snapshot lifecycle management metrics. + attr_accessor :slm_stats_enabled + + # Custom tags for this deployment. + attr_accessor :tags + + # Deployment URL. + attr_reader :url + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'cat_allocation_stats_enabled' => :'cat_allocation_stats_enabled', + :'detailed_index_stats_enabled' => :'detailed_index_stats_enabled', + :'index_stats_enabled' => :'index_stats_enabled', + :'pending_task_stats_enabled' => :'pending_task_stats_enabled', + :'pshard_graceful_to_enabled' => :'pshard_graceful_to_enabled', + :'pshard_stats_enabled' => :'pshard_stats_enabled', + :'slm_stats_enabled' => :'slm_stats_enabled', + :'tags' => :'tags', + :'url' => :'url' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'cat_allocation_stats_enabled' => :'Boolean', + :'detailed_index_stats_enabled' => :'Boolean', + :'index_stats_enabled' => :'Boolean', + :'pending_task_stats_enabled' => :'Boolean', + :'pshard_graceful_to_enabled' => :'Boolean', + :'pshard_stats_enabled' => :'Boolean', + :'slm_stats_enabled' => :'Boolean', + :'tags' => :'Array', + :'url' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ElasticCloudSettings` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'cat_allocation_stats_enabled') + self.cat_allocation_stats_enabled = attributes[:'cat_allocation_stats_enabled'] + end + + if attributes.key?(:'detailed_index_stats_enabled') + self.detailed_index_stats_enabled = attributes[:'detailed_index_stats_enabled'] + end + + if attributes.key?(:'index_stats_enabled') + self.index_stats_enabled = attributes[:'index_stats_enabled'] + end + + if attributes.key?(:'pending_task_stats_enabled') + self.pending_task_stats_enabled = attributes[:'pending_task_stats_enabled'] + end + + if attributes.key?(:'pshard_graceful_to_enabled') + self.pshard_graceful_to_enabled = attributes[:'pshard_graceful_to_enabled'] + end + + if attributes.key?(:'pshard_stats_enabled') + self.pshard_stats_enabled = attributes[:'pshard_stats_enabled'] + end + + if attributes.key?(:'slm_stats_enabled') + self.slm_stats_enabled = attributes[:'slm_stats_enabled'] + end + + if attributes.key?(:'tags') + if (value = attributes[:'tags']).is_a?(Array) + self.tags = value + end + end + + if attributes.key?(:'url') + self.url = attributes[:'url'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @url.nil? + true + end + + # Custom attribute writer method with validation + # @param url [Object] Object to be assigned + # @!visibility private + def url=(url) + if url.nil? + fail ArgumentError, 'invalid value for "url", url cannot be nil.' + end + @url = url + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + cat_allocation_stats_enabled == o.cat_allocation_stats_enabled && + detailed_index_stats_enabled == o.detailed_index_stats_enabled && + index_stats_enabled == o.index_stats_enabled && + pending_task_stats_enabled == o.pending_task_stats_enabled && + pshard_graceful_to_enabled == o.pshard_graceful_to_enabled && + pshard_stats_enabled == o.pshard_stats_enabled && + slm_stats_enabled == o.slm_stats_enabled && + tags == o.tags && + url == o.url && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [cat_allocation_stats_enabled, detailed_index_stats_enabled, index_stats_enabled, pending_task_stats_enabled, pshard_graceful_to_enabled, pshard_stats_enabled, slm_stats_enabled, tags, url, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/elastic_cloud_settings_update.rb b/lib/datadog_api_client/v2/models/elastic_cloud_settings_update.rb new file mode 100644 index 000000000000..c225e8ec6c11 --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_settings_update.rb @@ -0,0 +1,187 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Partial Elastic Cloud monitoring interface settings for updates. + class ElasticCloudSettingsUpdate + include BaseGenericModel + + # Enable to collect shard allocation metrics. + attr_accessor :cat_allocation_stats_enabled + + # Enable to collect index-specific stats. + attr_accessor :detailed_index_stats_enabled + + # Enable to collect metrics about the indices in your cluster. + attr_accessor :index_stats_enabled + + # Enable to collect metrics about pending tasks. + attr_accessor :pending_task_stats_enabled + + # Enable to collect all metrics even if primary shard metric collection times out. + attr_accessor :pshard_graceful_to_enabled + + # Enable to collect metrics over primary shards. + attr_accessor :pshard_stats_enabled + + # Enable to collect snapshot lifecycle management metrics. + attr_accessor :slm_stats_enabled + + # Custom tags for this deployment. + attr_accessor :tags + + # Deployment URL. + attr_accessor :url + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'cat_allocation_stats_enabled' => :'cat_allocation_stats_enabled', + :'detailed_index_stats_enabled' => :'detailed_index_stats_enabled', + :'index_stats_enabled' => :'index_stats_enabled', + :'pending_task_stats_enabled' => :'pending_task_stats_enabled', + :'pshard_graceful_to_enabled' => :'pshard_graceful_to_enabled', + :'pshard_stats_enabled' => :'pshard_stats_enabled', + :'slm_stats_enabled' => :'slm_stats_enabled', + :'tags' => :'tags', + :'url' => :'url' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'cat_allocation_stats_enabled' => :'Boolean', + :'detailed_index_stats_enabled' => :'Boolean', + :'index_stats_enabled' => :'Boolean', + :'pending_task_stats_enabled' => :'Boolean', + :'pshard_graceful_to_enabled' => :'Boolean', + :'pshard_stats_enabled' => :'Boolean', + :'slm_stats_enabled' => :'Boolean', + :'tags' => :'Array', + :'url' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::ElasticCloudSettingsUpdate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'cat_allocation_stats_enabled') + self.cat_allocation_stats_enabled = attributes[:'cat_allocation_stats_enabled'] + end + + if attributes.key?(:'detailed_index_stats_enabled') + self.detailed_index_stats_enabled = attributes[:'detailed_index_stats_enabled'] + end + + if attributes.key?(:'index_stats_enabled') + self.index_stats_enabled = attributes[:'index_stats_enabled'] + end + + if attributes.key?(:'pending_task_stats_enabled') + self.pending_task_stats_enabled = attributes[:'pending_task_stats_enabled'] + end + + if attributes.key?(:'pshard_graceful_to_enabled') + self.pshard_graceful_to_enabled = attributes[:'pshard_graceful_to_enabled'] + end + + if attributes.key?(:'pshard_stats_enabled') + self.pshard_stats_enabled = attributes[:'pshard_stats_enabled'] + end + + if attributes.key?(:'slm_stats_enabled') + self.slm_stats_enabled = attributes[:'slm_stats_enabled'] + end + + if attributes.key?(:'tags') + if (value = attributes[:'tags']).is_a?(Array) + self.tags = value + end + end + + if attributes.key?(:'url') + self.url = attributes[:'url'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + cat_allocation_stats_enabled == o.cat_allocation_stats_enabled && + detailed_index_stats_enabled == o.detailed_index_stats_enabled && + index_stats_enabled == o.index_stats_enabled && + pending_task_stats_enabled == o.pending_task_stats_enabled && + pshard_graceful_to_enabled == o.pshard_graceful_to_enabled && + pshard_stats_enabled == o.pshard_stats_enabled && + slm_stats_enabled == o.slm_stats_enabled && + tags == o.tags && + url == o.url && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [cat_allocation_stats_enabled, detailed_index_stats_enabled, index_stats_enabled, pending_task_stats_enabled, pshard_graceful_to_enabled, pshard_stats_enabled, slm_stats_enabled, tags, url, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/integration_account_dataflow_health.rb b/lib/datadog_api_client/v2/models/integration_account_dataflow_health.rb new file mode 100644 index 000000000000..8e837e515e5a --- /dev/null +++ b/lib/datadog_api_client/v2/models/integration_account_dataflow_health.rb @@ -0,0 +1,28 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Collection health of a single dataflow. + class IntegrationAccountDataflowHealth + include BaseEnumModel + + OK = "DATAFLOW_HEALTH_OK".freeze + BROKEN = "DATAFLOW_HEALTH_BROKEN".freeze + UNKNOWN = "DATAFLOW_HEALTH_UNKNOWN".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/integration_account_dataflow_status.rb b/lib/datadog_api_client/v2/models/integration_account_dataflow_status.rb new file mode 100644 index 000000000000..70a5501d62ca --- /dev/null +++ b/lib/datadog_api_client/v2/models/integration_account_dataflow_status.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Read-only, server-computed collection status of a dataflow. + class IntegrationAccountDataflowStatus + include BaseGenericModel + + # Collection health of a single dataflow. + attr_accessor :health + + # Human-readable detail, populated when the dataflow is not healthy. + attr_accessor :message + + # Time the status was last computed. + attr_accessor :updated_at + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'health' => :'health', + :'message' => :'message', + :'updated_at' => :'updated_at' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'health' => :'IntegrationAccountDataflowHealth', + :'message' => :'String', + :'updated_at' => :'Time' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IntegrationAccountDataflowStatus` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'health') + self.health = attributes[:'health'] + end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + health == o.health && + message == o.message && + updated_at == o.updated_at && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [health, message, updated_at, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/integration_account_permissions.rb b/lib/datadog_api_client/v2/models/integration_account_permissions.rb new file mode 100644 index 000000000000..0bda50c076c9 --- /dev/null +++ b/lib/datadog_api_client/v2/models/integration_account_permissions.rb @@ -0,0 +1,115 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Read-only permission information for the account, derived from its restriction policy. + class IntegrationAccountPermissions + include BaseGenericModel + + # Restriction-policy resource identifier of this account. + attr_accessor :resource_id + + # Whether the requesting user may edit this account. + attr_accessor :user_can_edit + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'resource_id' => :'resource_id', + :'user_can_edit' => :'user_can_edit' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'resource_id' => :'String', + :'user_can_edit' => :'Boolean' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::IntegrationAccountPermissions` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'resource_id') + self.resource_id = attributes[:'resource_id'] + end + + if attributes.key?(:'user_can_edit') + self.user_can_edit = attributes[:'user_can_edit'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + resource_id == o.resource_id && + user_can_edit == o.user_can_edit && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [resource_id, user_can_edit, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/integration_account_type.rb b/lib/datadog_api_client/v2/models/integration_account_type.rb new file mode 100644 index 000000000000..3cddddc7ed0e --- /dev/null +++ b/lib/datadog_api_client/v2/models/integration_account_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # JSON:API resource type for an integration account. Always `integration-account`. + class IntegrationAccountType + include BaseEnumModel + + INTEGRATION_ACCOUNT = "integration-account".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/twilio_account_attributes.rb b/lib/datadog_api_client/v2/models/twilio_account_attributes.rb new file mode 100644 index 000000000000..bbf4f4e1eccb --- /dev/null +++ b/lib/datadog_api_client/v2/models/twilio_account_attributes.rb @@ -0,0 +1,176 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of a Twilio integration account. The Twilio configuration is hoisted directly onto the attributes; there is no interface wrapper because the `twilio` interface is fixed by the endpoint path. + class TwilioAccountAttributes + include BaseGenericModel + + # Authentication methods supported by the Twilio interface. Exactly one is set, selected by its `type`. + attr_reader :authentication + + # Dataflows for the Twilio interface. + attr_accessor :dataflows + + # Human-readable name of the account. + attr_reader :name + + # Read-only permission information for the account, derived from its restriction policy. + attr_accessor :permissions + + # Twilio interface settings. + attr_accessor :settings + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'authentication' => :'authentication', + :'dataflows' => :'dataflows', + :'name' => :'name', + :'permissions' => :'permissions', + :'settings' => :'settings' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'authentication' => :'TwilioAuthentication', + :'dataflows' => :'Array', + :'name' => :'String', + :'permissions' => :'IntegrationAccountPermissions', + :'settings' => :'TwilioSettings' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TwilioAccountAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'authentication') + self.authentication = attributes[:'authentication'] + end + + if attributes.key?(:'dataflows') + if (value = attributes[:'dataflows']).is_a?(Array) + self.dataflows = value + end + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'permissions') + self.permissions = attributes[:'permissions'] + end + + if attributes.key?(:'settings') + self.settings = attributes[:'settings'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @authentication.nil? + return false if @name.nil? + true + end + + # Custom attribute writer method with validation + # @param authentication [Object] Object to be assigned + # @!visibility private + def authentication=(authentication) + if authentication.nil? + fail ArgumentError, 'invalid value for "authentication", authentication cannot be nil.' + end + @authentication = authentication + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + authentication == o.authentication && + dataflows == o.dataflows && + name == o.name && + permissions == o.permissions && + settings == o.settings && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [authentication, dataflows, name, permissions, settings, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/twilio_account_create_data.rb b/lib/datadog_api_client/v2/models/twilio_account_create_data.rb new file mode 100644 index 000000000000..d22dbbb797b1 --- /dev/null +++ b/lib/datadog_api_client/v2/models/twilio_account_create_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data envelope for creating a Twilio integration account. + class TwilioAccountCreateData + include BaseGenericModel + + # Attributes of a Twilio integration account. The Twilio configuration is hoisted directly onto the attributes; there is no interface wrapper because the `twilio` interface is fixed by the endpoint path. + attr_reader :attributes + + # JSON:API resource type for an integration account. Always `integration-account`. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'TwilioAccountAttributes', + :'type' => :'IntegrationAccountType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TwilioAccountCreateData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/twilio_account_data.rb b/lib/datadog_api_client/v2/models/twilio_account_data.rb new file mode 100644 index 000000000000..eee55dcb7f2a --- /dev/null +++ b/lib/datadog_api_client/v2/models/twilio_account_data.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data envelope of a Twilio integration account, including server-assigned identity. + class TwilioAccountData + include BaseGenericModel + + # Attributes of a Twilio integration account. The Twilio configuration is hoisted directly onto the attributes; there is no interface wrapper because the `twilio` interface is fixed by the endpoint path. + attr_reader :attributes + + # Server-generated unique identifier of the integration account. + attr_reader :id + + # JSON:API resource type for an integration account. Always `integration-account`. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'TwilioAccountAttributes', + :'id' => :'String', + :'type' => :'IntegrationAccountType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TwilioAccountData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/twilio_account_request.rb b/lib/datadog_api_client/v2/models/twilio_account_request.rb new file mode 100644 index 000000000000..2182993b848d --- /dev/null +++ b/lib/datadog_api_client/v2/models/twilio_account_request.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Request payload to create a Twilio integration account. + class TwilioAccountRequest + include BaseGenericModel + + # Data envelope for creating a Twilio integration account. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'TwilioAccountCreateData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TwilioAccountRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/twilio_account_response.rb b/lib/datadog_api_client/v2/models/twilio_account_response.rb new file mode 100644 index 000000000000..e796b0f224a6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/twilio_account_response.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response payload for a single Twilio integration account. + class TwilioAccountResponse + include BaseGenericModel + + # Data envelope of a Twilio integration account, including server-assigned identity. + attr_accessor :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'TwilioAccountData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TwilioAccountResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/twilio_account_update_attributes.rb b/lib/datadog_api_client/v2/models/twilio_account_update_attributes.rb new file mode 100644 index 000000000000..20a9d95f552f --- /dev/null +++ b/lib/datadog_api_client/v2/models/twilio_account_update_attributes.rb @@ -0,0 +1,137 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Updatable attributes of a Twilio integration account. Every field is optional; only the fields provided are changed. + class TwilioAccountUpdateAttributes + include BaseGenericModel + + # Authentication methods supported by the Twilio interface. Exactly one is set, selected by its `type`. + attr_accessor :authentication + + # Dataflows for the Twilio interface. + attr_accessor :dataflows + + # Human-readable name of the account. + attr_accessor :name + + # Partial Twilio interface settings for updates. + attr_accessor :settings + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'authentication' => :'authentication', + :'dataflows' => :'dataflows', + :'name' => :'name', + :'settings' => :'settings' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'authentication' => :'TwilioAuthentication', + :'dataflows' => :'Array', + :'name' => :'String', + :'settings' => :'TwilioSettingsUpdate' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TwilioAccountUpdateAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'authentication') + self.authentication = attributes[:'authentication'] + end + + if attributes.key?(:'dataflows') + if (value = attributes[:'dataflows']).is_a?(Array) + self.dataflows = value + end + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'settings') + self.settings = attributes[:'settings'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + authentication == o.authentication && + dataflows == o.dataflows && + name == o.name && + settings == o.settings && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [authentication, dataflows, name, settings, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/twilio_account_update_data.rb b/lib/datadog_api_client/v2/models/twilio_account_update_data.rb new file mode 100644 index 000000000000..08eeab17ed3c --- /dev/null +++ b/lib/datadog_api_client/v2/models/twilio_account_update_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data envelope for updating a Twilio integration account. + class TwilioAccountUpdateData + include BaseGenericModel + + # Updatable attributes of a Twilio integration account. Every field is optional; only the fields provided are changed. + attr_reader :attributes + + # JSON:API resource type for an integration account. Always `integration-account`. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'TwilioAccountUpdateAttributes', + :'type' => :'IntegrationAccountType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TwilioAccountUpdateData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/twilio_account_update_request.rb b/lib/datadog_api_client/v2/models/twilio_account_update_request.rb new file mode 100644 index 000000000000..2e2ea5dfb6d7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/twilio_account_update_request.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Request payload to update a Twilio integration account as a partial merge. + class TwilioAccountUpdateRequest + include BaseGenericModel + + # Data envelope for updating a Twilio integration account. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'TwilioAccountUpdateData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TwilioAccountUpdateRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/twilio_accounts_response.rb b/lib/datadog_api_client/v2/models/twilio_accounts_response.rb new file mode 100644 index 000000000000..2072851da205 --- /dev/null +++ b/lib/datadog_api_client/v2/models/twilio_accounts_response.rb @@ -0,0 +1,107 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response payload for a list of Twilio integration accounts. + class TwilioAccountsResponse + include BaseGenericModel + + # List of Twilio integration accounts. + attr_accessor :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TwilioAccountsResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/twilio_authentication.rb b/lib/datadog_api_client/v2/models/twilio_authentication.rb new file mode 100644 index 000000000000..a0adb4ff2e43 --- /dev/null +++ b/lib/datadog_api_client/v2/models/twilio_authentication.rb @@ -0,0 +1,62 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Authentication methods supported by the Twilio interface. Exactly one is set, selected by its `type`. + module TwilioAuthentication + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'TwilioBasicAuth' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/twilio_basic_auth.rb b/lib/datadog_api_client/v2/models/twilio_basic_auth.rb new file mode 100644 index 000000000000..06ab7c54ceab --- /dev/null +++ b/lib/datadog_api_client/v2/models/twilio_basic_auth.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # API Key & Secret authentication for Twilio. + class TwilioBasicAuth + include BaseGenericModel + + # Twilio API Key SID for authentication. Create from Twilio Console > Account > API Keys & Tokens. + attr_reader :api_key + + # Twilio API Key Secret (token) corresponding to the API Key SID. This field is not returned by the API. + attr_reader :api_key_token + + # Authentication method discriminator. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'api_key' => :'api_key', + :'api_key_token' => :'api_key_token', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'api_key' => :'String', + :'api_key_token' => :'String', + :'type' => :'TwilioBasicAuthType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TwilioBasicAuth` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'api_key') + self.api_key = attributes[:'api_key'] + end + + if attributes.key?(:'api_key_token') + self.api_key_token = attributes[:'api_key_token'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @api_key.nil? + return false if @api_key_token.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param api_key [Object] Object to be assigned + # @!visibility private + def api_key=(api_key) + if api_key.nil? + fail ArgumentError, 'invalid value for "api_key", api_key cannot be nil.' + end + @api_key = api_key + end + + # Custom attribute writer method with validation + # @param api_key_token [Object] Object to be assigned + # @!visibility private + def api_key_token=(api_key_token) + if api_key_token.nil? + fail ArgumentError, 'invalid value for "api_key_token", api_key_token cannot be nil.' + end + @api_key_token = api_key_token + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + api_key == o.api_key && + api_key_token == o.api_key_token && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [api_key, api_key_token, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/twilio_basic_auth_type.rb b/lib/datadog_api_client/v2/models/twilio_basic_auth_type.rb new file mode 100644 index 000000000000..79404c48053c --- /dev/null +++ b/lib/datadog_api_client/v2/models/twilio_basic_auth_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Authentication method discriminator. + class TwilioBasicAuthType + include BaseEnumModel + + BASIC = "basic".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/twilio_dataflow.rb b/lib/datadog_api_client/v2/models/twilio_dataflow.rb new file mode 100644 index 000000000000..1451ad37e3d9 --- /dev/null +++ b/lib/datadog_api_client/v2/models/twilio_dataflow.rb @@ -0,0 +1,143 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # A Twilio dataflow toggle. The set of dataflow ids is fixed by the interface schema. + class TwilioDataflow + include BaseGenericModel + + # Whether the dataflow is enabled. + attr_accessor :enabled + + # Identifier of a Twilio dataflow. + attr_reader :id + + # Read-only, server-computed collection status of a dataflow. + attr_accessor :status + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'enabled' => :'enabled', + :'id' => :'id', + :'status' => :'status' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'Boolean', + :'id' => :'TwilioDataflowId', + :'status' => :'IntegrationAccountDataflowStatus' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TwilioDataflow` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @id.nil? + true + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + enabled == o.enabled && + id == o.id && + status == o.status && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [enabled, id, status, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/twilio_dataflow_id.rb b/lib/datadog_api_client/v2/models/twilio_dataflow_id.rb new file mode 100644 index 000000000000..eb3ce0d285b0 --- /dev/null +++ b/lib/datadog_api_client/v2/models/twilio_dataflow_id.rb @@ -0,0 +1,30 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Identifier of a Twilio dataflow. + class TwilioDataflowId + include BaseEnumModel + + CLOUD_COST_METRICS = "twilio-cloud-cost-metrics".freeze + EVENTS_LOGS = "twilio-events-logs".freeze + MESSAGES_LOGS = "twilio-messages-logs".freeze + ALERTS_LOGS = "twilio-alerts-logs".freeze + CALL_SUMMARIES_LOGS = "twilio-call-summaries-logs".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/twilio_settings.rb b/lib/datadog_api_client/v2/models/twilio_settings.rb new file mode 100644 index 000000000000..4ddf12d2efac --- /dev/null +++ b/lib/datadog_api_client/v2/models/twilio_settings.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Twilio interface settings. + class TwilioSettings + include BaseGenericModel + + # Twilio Account SID that uniquely identifies your Twilio account. + attr_reader :account_sid + + # When enabled, phone numbers in the `to` field and SMS message bodies are censored for privacy. + attr_accessor :censor_logs + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'account_sid' => :'account_sid', + :'censor_logs' => :'censor_logs' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'account_sid' => :'String', + :'censor_logs' => :'Boolean' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TwilioSettings` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'account_sid') + self.account_sid = attributes[:'account_sid'] + end + + if attributes.key?(:'censor_logs') + self.censor_logs = attributes[:'censor_logs'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @account_sid.nil? + true + end + + # Custom attribute writer method with validation + # @param account_sid [Object] Object to be assigned + # @!visibility private + def account_sid=(account_sid) + if account_sid.nil? + fail ArgumentError, 'invalid value for "account_sid", account_sid cannot be nil.' + end + @account_sid = account_sid + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + account_sid == o.account_sid && + censor_logs == o.censor_logs && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [account_sid, censor_logs, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/twilio_settings_update.rb b/lib/datadog_api_client/v2/models/twilio_settings_update.rb new file mode 100644 index 000000000000..8abba600689c --- /dev/null +++ b/lib/datadog_api_client/v2/models/twilio_settings_update.rb @@ -0,0 +1,115 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + 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 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Partial Twilio interface settings for updates. + class TwilioSettingsUpdate + include BaseGenericModel + + # Twilio Account SID that uniquely identifies your Twilio account. + attr_accessor :account_sid + + # When enabled, phone numbers in the `to` field and SMS message bodies are censored for privacy. + attr_accessor :censor_logs + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'account_sid' => :'account_sid', + :'censor_logs' => :'censor_logs' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'account_sid' => :'String', + :'censor_logs' => :'Boolean' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::TwilioSettingsUpdate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'account_sid') + self.account_sid = attributes[:'account_sid'] + end + + if attributes.key?(:'censor_logs') + self.censor_logs = attributes[:'censor_logs'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + account_sid == o.account_sid && + censor_logs == o.censor_logs && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [account_sid, censor_logs, additional_properties].hash + end + end +end