diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 560b3188e9f9..949387d37f04 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -949,6 +949,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" @@ -34896,6 +34903,364 @@ components: - score - severity type: object + ElasticCloudDetailedIndexStatsIntegrationDataflowRequest: + description: The Elastic Cloud detailed index stats dataflow. + properties: + enabled: + description: Whether the Elastic Cloud dataflow is enabled. + example: true + type: boolean + type: object + ElasticCloudDetailedIndexStatsIntegrationDataflowResponse: + description: The Elastic Cloud detailed index stats dataflow. + properties: + enabled: + description: Whether the Elastic Cloud dataflow is enabled. + example: true + type: boolean + status: + $ref: "#/components/schemas/IntegrationAccountDataflowStatus" + type: object + ElasticCloudIndexStatsIntegrationDataflowRequest: + description: The Elastic Cloud index stats dataflow. + properties: + enabled: + description: Whether the Elastic Cloud dataflow is enabled. + example: true + type: boolean + type: object + ElasticCloudIndexStatsIntegrationDataflowResponse: + description: The Elastic Cloud index stats dataflow. + properties: + enabled: + description: Whether the Elastic Cloud dataflow is enabled. + example: true + type: boolean + status: + $ref: "#/components/schemas/IntegrationAccountDataflowStatus" + type: object + ElasticCloudIntegrationAccountAuthenticationRequest: + description: Authentication for creating the Elastic Cloud integration account. Exactly one method is set. + oneOf: + - $ref: "#/components/schemas/IntegrationAccountBasicAuthRequest" + ElasticCloudIntegrationAccountAuthenticationResponse: + description: Authentication configured on the Elastic Cloud integration account. + oneOf: + - $ref: "#/components/schemas/IntegrationAccountBasicAuthResponse" + ElasticCloudIntegrationAccountAuthenticationUpdate: + description: Authentication for updating the Elastic Cloud integration account. Exactly one method is set. + oneOf: + - $ref: "#/components/schemas/IntegrationAccountBasicAuthUpdate" + ElasticCloudIntegrationAccountCreateAttributes: + description: Writable attributes used to create an Elastic Cloud integration account. + properties: + authentication: + $ref: "#/components/schemas/ElasticCloudIntegrationAccountAuthenticationRequest" + dataflows: + $ref: "#/components/schemas/ElasticCloudIntegrationDataflowsRequest" + name: + description: Human-readable name of the Elastic Cloud integration account. + example: elastic-cloud-prod + type: string + settings: + $ref: "#/components/schemas/ElasticCloudIntegrationAccountSettingsRequest" + required: + - name + - authentication + - settings + type: object + ElasticCloudIntegrationAccountCreateData: + description: Data envelope for creating an Elastic Cloud integration account. + properties: + attributes: + $ref: "#/components/schemas/ElasticCloudIntegrationAccountCreateAttributes" + type: + $ref: "#/components/schemas/IntegrationAccountType" + required: + - type + - attributes + type: object + ElasticCloudIntegrationAccountCreateRequest: + description: Request payload to create an Elastic Cloud integration account. + properties: + data: + $ref: "#/components/schemas/ElasticCloudIntegrationAccountCreateData" + required: + - data + type: object + ElasticCloudIntegrationAccountResponse: + description: Response payload for a single Elastic Cloud integration account. + properties: + data: + $ref: "#/components/schemas/ElasticCloudIntegrationAccountResponseData" + required: + - data + type: object + ElasticCloudIntegrationAccountResponseAttributes: + description: Attributes of an Elastic Cloud integration account returned in responses. + properties: + authentication: + $ref: "#/components/schemas/ElasticCloudIntegrationAccountAuthenticationResponse" + dataflows: + $ref: "#/components/schemas/ElasticCloudIntegrationDataflowsResponse" + name: + description: Human-readable name of the Elastic Cloud integration account. + example: elastic-cloud-prod + type: string + settings: + $ref: "#/components/schemas/ElasticCloudIntegrationAccountSettingsResponse" + required: + - name + - settings + type: object + ElasticCloudIntegrationAccountResponseData: + description: Data envelope of an Elastic Cloud integration account, including server-assigned identity. + properties: + attributes: + $ref: "#/components/schemas/ElasticCloudIntegrationAccountResponseAttributes" + id: + description: Server-generated unique identifier of the Elastic Cloud integration account. + example: 953a0060-81ec-4221-aed4-d4733b59cd96 + readOnly: true + type: string + type: + $ref: "#/components/schemas/IntegrationAccountType" + required: + - id + - attributes + - type + type: object + ElasticCloudIntegrationAccountSettingsRequest: + description: Settings for creating the Elastic Cloud integration account. + properties: + tags: + description: Comma-separated list of custom tags for this Elastic Cloud deployment. + example: "env:prod,team:saasint" + type: string + url: + description: Elastic Cloud deployment URL. + example: "https://example.es.us-central1.gcp.cloud.es.io:9243" + type: string + required: + - url + type: object + ElasticCloudIntegrationAccountSettingsResponse: + description: Settings configured on the Elastic Cloud integration account. + properties: + tags: + description: Comma-separated list of custom tags for this Elastic Cloud deployment. + example: "env:prod,team:saasint" + type: string + url: + description: Elastic Cloud deployment URL. + example: "https://example.es.us-central1.gcp.cloud.es.io:9243" + type: string + required: + - url + type: object + ElasticCloudIntegrationAccountSettingsUpdate: + description: Settings for updating the Elastic Cloud integration account. Only the fields provided are changed. + properties: + tags: + description: Comma-separated list of custom tags for this Elastic Cloud deployment. + example: "env:prod,team:saasint" + type: string + url: + description: Elastic Cloud deployment URL. + example: "https://example.es.us-central1.gcp.cloud.es.io:9243" + type: string + type: object + ElasticCloudIntegrationAccountUpdateAttributes: + description: >- + Writable attributes used to update an Elastic Cloud integration account. Every field is optional; only the fields provided are changed. When `dataflows` is provided, only the dataflow ids included in the request are modified; dataflows omitted from the map keep their current configuration. + properties: + authentication: + $ref: "#/components/schemas/ElasticCloudIntegrationAccountAuthenticationUpdate" + dataflows: + $ref: "#/components/schemas/ElasticCloudIntegrationDataflowsRequest" + name: + description: Human-readable name of the Elastic Cloud integration account. + example: elastic-cloud-prod + type: string + settings: + $ref: "#/components/schemas/ElasticCloudIntegrationAccountSettingsUpdate" + type: object + ElasticCloudIntegrationAccountUpdateData: + description: Data envelope for updating an Elastic Cloud integration account. + properties: + attributes: + $ref: "#/components/schemas/ElasticCloudIntegrationAccountUpdateAttributes" + id: + description: Unique identifier of the Elastic Cloud integration account to update. + example: 953a0060-81ec-4221-aed4-d4733b59cd96 + type: string + type: + $ref: "#/components/schemas/IntegrationAccountType" + required: + - id + - type + - attributes + type: object + ElasticCloudIntegrationAccountUpdateRequest: + description: Request payload to update an Elastic Cloud integration account. + properties: + data: + $ref: "#/components/schemas/ElasticCloudIntegrationAccountUpdateData" + required: + - data + type: object + ElasticCloudIntegrationAccountsResponse: + description: Response payload for a list of Elastic Cloud integration accounts. + properties: + data: + description: List of Elastic Cloud integration accounts. + items: + $ref: "#/components/schemas/ElasticCloudIntegrationAccountResponseData" + type: array + required: + - data + type: object + ElasticCloudIntegrationDataflowsRequest: + additionalProperties: false + description: Dataflows to configure on the Elastic Cloud integration account, keyed by dataflow id. + properties: + elastic-cloud-detailed-index-stats: + $ref: "#/components/schemas/ElasticCloudDetailedIndexStatsIntegrationDataflowRequest" + elastic-cloud-index-stats: + $ref: "#/components/schemas/ElasticCloudIndexStatsIntegrationDataflowRequest" + elastic-cloud-pending-task-stats: + $ref: "#/components/schemas/ElasticCloudPendingTaskStatsIntegrationDataflowRequest" + elastic-cloud-primary-shard-graceful-timeout: + $ref: "#/components/schemas/ElasticCloudPrimaryShardGracefulTimeoutIntegrationDataflowRequest" + elastic-cloud-primary-shard-stats: + $ref: "#/components/schemas/ElasticCloudPrimaryShardStatsIntegrationDataflowRequest" + elastic-cloud-shard-allocation-stats: + $ref: "#/components/schemas/ElasticCloudShardAllocationStatsIntegrationDataflowRequest" + elastic-cloud-slm-stats: + $ref: "#/components/schemas/ElasticCloudSlmStatsIntegrationDataflowRequest" + type: object + ElasticCloudIntegrationDataflowsResponse: + additionalProperties: false + description: Dataflows configured on the Elastic Cloud integration account, keyed by dataflow id. + properties: + elastic-cloud-detailed-index-stats: + $ref: "#/components/schemas/ElasticCloudDetailedIndexStatsIntegrationDataflowResponse" + elastic-cloud-index-stats: + $ref: "#/components/schemas/ElasticCloudIndexStatsIntegrationDataflowResponse" + elastic-cloud-metrics: + $ref: "#/components/schemas/ElasticCloudMetricsIntegrationDataflowResponse" + elastic-cloud-pending-task-stats: + $ref: "#/components/schemas/ElasticCloudPendingTaskStatsIntegrationDataflowResponse" + elastic-cloud-primary-shard-graceful-timeout: + $ref: "#/components/schemas/ElasticCloudPrimaryShardGracefulTimeoutIntegrationDataflowResponse" + elastic-cloud-primary-shard-stats: + $ref: "#/components/schemas/ElasticCloudPrimaryShardStatsIntegrationDataflowResponse" + elastic-cloud-shard-allocation-stats: + $ref: "#/components/schemas/ElasticCloudShardAllocationStatsIntegrationDataflowResponse" + elastic-cloud-slm-stats: + $ref: "#/components/schemas/ElasticCloudSlmStatsIntegrationDataflowResponse" + type: object + ElasticCloudMetricsIntegrationDataflowResponse: + description: The Elastic Cloud metrics dataflow. + properties: + enabled: + description: Whether the Elastic Cloud dataflow is enabled. + example: true + readOnly: true + type: boolean + status: + $ref: "#/components/schemas/IntegrationAccountDataflowStatus" + type: object + ElasticCloudPendingTaskStatsIntegrationDataflowRequest: + description: The Elastic Cloud pending task stats dataflow. + properties: + enabled: + description: Whether the Elastic Cloud dataflow is enabled. + example: true + type: boolean + type: object + ElasticCloudPendingTaskStatsIntegrationDataflowResponse: + description: The Elastic Cloud pending task stats dataflow. + properties: + enabled: + description: Whether the Elastic Cloud dataflow is enabled. + example: true + type: boolean + status: + $ref: "#/components/schemas/IntegrationAccountDataflowStatus" + type: object + ElasticCloudPrimaryShardGracefulTimeoutIntegrationDataflowRequest: + description: The Elastic Cloud primary shard graceful timeout dataflow. + properties: + enabled: + description: Whether the Elastic Cloud dataflow is enabled. + example: true + type: boolean + type: object + ElasticCloudPrimaryShardGracefulTimeoutIntegrationDataflowResponse: + description: The Elastic Cloud primary shard graceful timeout dataflow. + properties: + enabled: + description: Whether the Elastic Cloud dataflow is enabled. + example: true + type: boolean + status: + $ref: "#/components/schemas/IntegrationAccountDataflowStatus" + type: object + ElasticCloudPrimaryShardStatsIntegrationDataflowRequest: + description: The Elastic Cloud primary shard stats dataflow. + properties: + enabled: + description: Whether the Elastic Cloud dataflow is enabled. + example: true + type: boolean + type: object + ElasticCloudPrimaryShardStatsIntegrationDataflowResponse: + description: The Elastic Cloud primary shard stats dataflow. + properties: + enabled: + description: Whether the Elastic Cloud dataflow is enabled. + example: true + type: boolean + status: + $ref: "#/components/schemas/IntegrationAccountDataflowStatus" + type: object + ElasticCloudShardAllocationStatsIntegrationDataflowRequest: + description: The Elastic Cloud shard allocation stats dataflow. + properties: + enabled: + description: Whether the Elastic Cloud dataflow is enabled. + example: true + type: boolean + type: object + ElasticCloudShardAllocationStatsIntegrationDataflowResponse: + description: The Elastic Cloud shard allocation stats dataflow. + properties: + enabled: + description: Whether the Elastic Cloud dataflow is enabled. + example: true + type: boolean + status: + $ref: "#/components/schemas/IntegrationAccountDataflowStatus" + type: object + ElasticCloudSlmStatsIntegrationDataflowRequest: + description: The Elastic Cloud snapshot lifecycle management stats dataflow. + properties: + enabled: + description: Whether the Elastic Cloud dataflow is enabled. + example: true + type: boolean + type: object + ElasticCloudSlmStatsIntegrationDataflowResponse: + description: The Elastic Cloud snapshot lifecycle management stats dataflow. + properties: + enabled: + description: Whether the Elastic Cloud dataflow is enabled. + example: true + type: boolean + status: + $ref: "#/components/schemas/IntegrationAccountDataflowStatus" + type: object Enabled: description: Field used to enable or disable the rule. example: true @@ -52685,6 +53050,101 @@ components: - id - attributes type: object + IntegrationAccountBasicAuthRequest: + description: Username and password authentication. + properties: + auth_type: + $ref: "#/components/schemas/IntegrationAccountBasicAuthType" + password: + description: Secret password or private key. + example: your-password + type: string + writeOnly: true + username: + description: Non-secret username or public identifier for the credential pair. + example: datadog + type: string + required: + - auth_type + - username + - password + type: object + IntegrationAccountBasicAuthResponse: + description: The basic authentication method and username configured on the account. + properties: + auth_type: + $ref: "#/components/schemas/IntegrationAccountBasicAuthType" + username: + description: Non-secret username or public identifier for the credential pair. + example: datadog + type: string + required: + - auth_type + - username + type: object + IntegrationAccountBasicAuthType: + default: basic + description: The authentication method type. + enum: + - basic + example: basic + type: string + x-enum-varnames: + - BASIC + IntegrationAccountBasicAuthUpdate: + description: Username and password authentication. Only the fields provided are changed; omit `password` to keep the stored one. + properties: + auth_type: + $ref: "#/components/schemas/IntegrationAccountBasicAuthType" + password: + description: Secret password or private key. + example: your-password + type: string + writeOnly: true + username: + description: Non-secret username or public identifier for the credential pair. + example: datadog + type: string + required: + - auth_type + 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 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 + IntegrationAccountType: + default: integration-account + description: The type of the integration account resource. Always `integration-account`. + enum: + - integration-account + example: integration-account + type: string + x-enum-varnames: + - INTEGRATION_ACCOUNT IntegrationAttributes: description: Attributes for an integration. properties: @@ -115314,6 +115774,307 @@ components: type: string x-enum-varnames: - TRIGGER_WORKFLOW_AUTOMATION + TwilioAlertsLogsIntegrationDataflowRequest: + description: The Twilio alerts logs dataflow. + properties: + enabled: + description: Whether the Twilio dataflow is enabled. + example: true + type: boolean + type: object + TwilioAlertsLogsIntegrationDataflowResponse: + description: The Twilio alerts logs dataflow. + properties: + enabled: + description: Whether the Twilio dataflow is enabled. + example: true + type: boolean + status: + $ref: "#/components/schemas/IntegrationAccountDataflowStatus" + type: object + TwilioCallSummariesLogsIntegrationDataflowRequest: + description: The Twilio call summaries logs dataflow. + properties: + enabled: + description: Whether the Twilio dataflow is enabled. + example: true + type: boolean + type: object + TwilioCallSummariesLogsIntegrationDataflowResponse: + description: The Twilio call summaries logs dataflow. + properties: + enabled: + description: Whether the Twilio dataflow is enabled. + example: true + type: boolean + status: + $ref: "#/components/schemas/IntegrationAccountDataflowStatus" + type: object + TwilioCloudCostMetricsIntegrationDataflowRequest: + description: The Twilio cloud cost metrics dataflow. + properties: + enabled: + description: Whether the Twilio dataflow is enabled. + example: true + type: boolean + type: object + TwilioCloudCostMetricsIntegrationDataflowResponse: + description: The Twilio cloud cost metrics dataflow. + properties: + enabled: + description: Whether the Twilio dataflow is enabled. + example: true + type: boolean + status: + $ref: "#/components/schemas/IntegrationAccountDataflowStatus" + type: object + TwilioEventsLogsIntegrationDataflowRequest: + description: The Twilio events logs dataflow. + properties: + enabled: + description: Whether the Twilio dataflow is enabled. + example: true + type: boolean + type: object + TwilioEventsLogsIntegrationDataflowResponse: + description: The Twilio events logs dataflow. + properties: + enabled: + description: Whether the Twilio dataflow is enabled. + example: true + type: boolean + status: + $ref: "#/components/schemas/IntegrationAccountDataflowStatus" + type: object + TwilioIntegrationAccountAuthenticationRequest: + description: Authentication for creating the Twilio integration account. Exactly one method is set. + oneOf: + - $ref: "#/components/schemas/IntegrationAccountBasicAuthRequest" + TwilioIntegrationAccountAuthenticationResponse: + description: Authentication configured on the Twilio integration account. + oneOf: + - $ref: "#/components/schemas/IntegrationAccountBasicAuthResponse" + TwilioIntegrationAccountAuthenticationUpdate: + description: Authentication for updating the Twilio integration account. Exactly one method is set. + oneOf: + - $ref: "#/components/schemas/IntegrationAccountBasicAuthUpdate" + TwilioIntegrationAccountCreateAttributes: + description: Writable attributes used to create a Twilio integration account. + properties: + authentication: + $ref: "#/components/schemas/TwilioIntegrationAccountAuthenticationRequest" + dataflows: + $ref: "#/components/schemas/TwilioIntegrationDataflowsRequest" + name: + description: Human-readable name of the Twilio integration account. + example: twilio-prod + type: string + settings: + $ref: "#/components/schemas/TwilioIntegrationAccountSettingsRequest" + required: + - name + - authentication + - settings + type: object + TwilioIntegrationAccountCreateData: + description: Data envelope for creating a Twilio integration account. + properties: + attributes: + $ref: "#/components/schemas/TwilioIntegrationAccountCreateAttributes" + type: + $ref: "#/components/schemas/IntegrationAccountType" + required: + - type + - attributes + type: object + TwilioIntegrationAccountCreateRequest: + description: Request payload to create a Twilio integration account. + properties: + data: + $ref: "#/components/schemas/TwilioIntegrationAccountCreateData" + required: + - data + type: object + TwilioIntegrationAccountResponse: + description: Response payload for a single Twilio integration account. + properties: + data: + $ref: "#/components/schemas/TwilioIntegrationAccountResponseData" + required: + - data + type: object + TwilioIntegrationAccountResponseAttributes: + description: Attributes of a Twilio integration account returned in responses. + properties: + authentication: + $ref: "#/components/schemas/TwilioIntegrationAccountAuthenticationResponse" + dataflows: + $ref: "#/components/schemas/TwilioIntegrationDataflowsResponse" + name: + description: Human-readable name of the Twilio integration account. + example: twilio-prod + type: string + settings: + $ref: "#/components/schemas/TwilioIntegrationAccountSettingsResponse" + required: + - name + - settings + type: object + TwilioIntegrationAccountResponseData: + description: Data envelope of a Twilio integration account, including server-assigned identity. + properties: + attributes: + $ref: "#/components/schemas/TwilioIntegrationAccountResponseAttributes" + id: + description: Server-generated unique identifier of the Twilio integration account. + example: 953a0060-81ec-4221-aed4-d4733b59cd96 + readOnly: true + type: string + type: + $ref: "#/components/schemas/IntegrationAccountType" + required: + - id + - attributes + - type + type: object + TwilioIntegrationAccountSettingsRequest: + description: Settings for creating the Twilio integration account. + properties: + account_sid: + description: Twilio Account SID that uniquely identifies your Twilio account. + example: ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + type: string + censor_logs: + description: When enabled, Twilio phone numbers in the `to` field and SMS message bodies are censored for privacy. + example: true + type: boolean + required: + - account_sid + type: object + TwilioIntegrationAccountSettingsResponse: + description: Settings configured on the Twilio integration account. + properties: + account_sid: + description: Twilio Account SID that uniquely identifies your Twilio account. + example: ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + type: string + censor_logs: + description: When enabled, Twilio phone numbers in the `to` field and SMS message bodies are censored for privacy. + example: true + type: boolean + required: + - account_sid + type: object + TwilioIntegrationAccountSettingsUpdate: + description: Settings for updating the Twilio integration account. Only the fields provided are changed. + properties: + account_sid: + description: Twilio Account SID that uniquely identifies your Twilio account. + example: ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + type: string + censor_logs: + description: When enabled, Twilio phone numbers in the `to` field and SMS message bodies are censored for privacy. + example: true + type: boolean + type: object + TwilioIntegrationAccountUpdateAttributes: + description: >- + Writable attributes used to update a Twilio integration account. Every field is optional; only the fields provided are changed. When `dataflows` is provided, only the dataflow ids included in the request are modified; dataflows omitted from the map keep their current configuration. + properties: + authentication: + $ref: "#/components/schemas/TwilioIntegrationAccountAuthenticationUpdate" + dataflows: + $ref: "#/components/schemas/TwilioIntegrationDataflowsRequest" + name: + description: Human-readable name of the Twilio integration account. + example: twilio-prod + type: string + settings: + $ref: "#/components/schemas/TwilioIntegrationAccountSettingsUpdate" + type: object + TwilioIntegrationAccountUpdateData: + description: Data envelope for updating a Twilio integration account. + properties: + attributes: + $ref: "#/components/schemas/TwilioIntegrationAccountUpdateAttributes" + id: + description: Unique identifier of the Twilio integration account to update. + example: 953a0060-81ec-4221-aed4-d4733b59cd96 + type: string + type: + $ref: "#/components/schemas/IntegrationAccountType" + required: + - id + - type + - attributes + type: object + TwilioIntegrationAccountUpdateRequest: + description: Request payload to update a Twilio integration account. + properties: + data: + $ref: "#/components/schemas/TwilioIntegrationAccountUpdateData" + required: + - data + type: object + TwilioIntegrationAccountsResponse: + description: Response payload for a list of Twilio integration accounts. + properties: + data: + description: List of Twilio integration accounts. + items: + $ref: "#/components/schemas/TwilioIntegrationAccountResponseData" + type: array + required: + - data + type: object + TwilioIntegrationDataflowsRequest: + additionalProperties: false + description: Dataflows to configure on the Twilio integration account, keyed by dataflow id. + properties: + twilio-alerts-logs: + $ref: "#/components/schemas/TwilioAlertsLogsIntegrationDataflowRequest" + twilio-call-summaries-logs: + $ref: "#/components/schemas/TwilioCallSummariesLogsIntegrationDataflowRequest" + twilio-cloud-cost-metrics: + $ref: "#/components/schemas/TwilioCloudCostMetricsIntegrationDataflowRequest" + twilio-events-logs: + $ref: "#/components/schemas/TwilioEventsLogsIntegrationDataflowRequest" + twilio-messages-logs: + $ref: "#/components/schemas/TwilioMessagesLogsIntegrationDataflowRequest" + type: object + TwilioIntegrationDataflowsResponse: + additionalProperties: false + description: Dataflows configured on the Twilio integration account, keyed by dataflow id. + properties: + twilio-alerts-logs: + $ref: "#/components/schemas/TwilioAlertsLogsIntegrationDataflowResponse" + twilio-call-summaries-logs: + $ref: "#/components/schemas/TwilioCallSummariesLogsIntegrationDataflowResponse" + twilio-cloud-cost-metrics: + $ref: "#/components/schemas/TwilioCloudCostMetricsIntegrationDataflowResponse" + twilio-events-logs: + $ref: "#/components/schemas/TwilioEventsLogsIntegrationDataflowResponse" + twilio-messages-logs: + $ref: "#/components/schemas/TwilioMessagesLogsIntegrationDataflowResponse" + type: object + TwilioMessagesLogsIntegrationDataflowRequest: + description: The Twilio messages logs dataflow. + properties: + enabled: + description: Whether the Twilio dataflow is enabled. + example: true + type: boolean + type: object + TwilioMessagesLogsIntegrationDataflowResponse: + description: The Twilio messages logs dataflow. + properties: + enabled: + description: Whether the Twilio dataflow is enabled. + example: true + type: boolean + status: + $ref: "#/components/schemas/IntegrationAccountDataflowStatus" + type: object UCConfigPair: description: The definition of `UCConfigPair` object. example: @@ -153883,6 +154644,458 @@ paths: x-unstable: |- **Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/integration-interfaces/elastic-cloud/accounts: + get: + description: List Elastic Cloud integration accounts. + operationId: ListElasticCloudIntegrationAccounts + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + authentication: + auth_type: basic + username: datadog + dataflows: + elastic-cloud-metrics: + enabled: true + status: + health: DATAFLOW_HEALTH_OK + updated_at: "2026-06-25T08:30:50Z" + elastic-cloud-primary-shard-stats: + enabled: false + name: elastic-cloud-prod + settings: + tags: "env:prod,team:saasint" + url: "https://example.es.us-central1.gcp.cloud.es.io:9243" + id: 953a0060-81ec-4221-aed4-d4733b59cd96 + type: integration-account + schema: + $ref: "#/components/schemas/ElasticCloudIntegrationAccountsResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: List Elastic Cloud integration accounts + tags: + - Elastic Cloud 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 an Elastic Cloud integration account. + operationId: CreateElasticCloudIntegrationAccount + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ElasticCloudIntegrationAccountCreateRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + authentication: + auth_type: basic + username: datadog + dataflows: + elastic-cloud-metrics: + enabled: true + status: + health: DATAFLOW_HEALTH_OK + updated_at: "2026-06-25T08:30:50Z" + elastic-cloud-primary-shard-stats: + enabled: false + name: elastic-cloud-prod + settings: + tags: "env:prod,team:saasint" + url: "https://example.es.us-central1.gcp.cloud.es.io:9243" + id: 953a0060-81ec-4221-aed4-d4733b59cd96 + type: integration-account + schema: + $ref: "#/components/schemas/ElasticCloudIntegrationAccountResponse" + description: Created + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "422": + $ref: "#/components/responses/UnprocessableEntityResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Create an Elastic Cloud integration account + tags: + - Elastic Cloud Integration Accounts + x-codegen-request-body-name: body + x-unstable: |- + **Note**: This endpoint is in public beta. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/integration-interfaces/elastic-cloud/accounts/{account_id}: + delete: + description: Delete an Elastic Cloud integration account. + operationId: DeleteElasticCloudIntegrationAccount + parameters: + - $ref: "#/components/parameters/IntegrationAccountIdParameter" + responses: + "200": + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Delete an Elastic Cloud integration account + tags: + - Elastic Cloud 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 an Elastic Cloud integration account. + operationId: GetElasticCloudIntegrationAccount + parameters: + - $ref: "#/components/parameters/IntegrationAccountIdParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + authentication: + auth_type: basic + username: datadog + dataflows: + elastic-cloud-metrics: + enabled: true + status: + health: DATAFLOW_HEALTH_OK + updated_at: "2026-06-25T08:30:50Z" + elastic-cloud-primary-shard-stats: + enabled: false + name: elastic-cloud-prod + settings: + tags: "env:prod,team:saasint" + url: "https://example.es.us-central1.gcp.cloud.es.io:9243" + id: 953a0060-81ec-4221-aed4-d4733b59cd96 + type: integration-account + schema: + $ref: "#/components/schemas/ElasticCloudIntegrationAccountResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get an Elastic Cloud integration account + tags: + - Elastic Cloud 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 an Elastic Cloud integration account. Only the fields provided are changed. + operationId: UpdateElasticCloudIntegrationAccount + parameters: + - $ref: "#/components/parameters/IntegrationAccountIdParameter" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ElasticCloudIntegrationAccountUpdateRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + authentication: + auth_type: basic + username: datadog + dataflows: + elastic-cloud-metrics: + enabled: true + status: + health: DATAFLOW_HEALTH_OK + updated_at: "2026-06-25T08:30:50Z" + elastic-cloud-primary-shard-stats: + enabled: false + name: elastic-cloud-prod + settings: + tags: "env:prod,team:saasint" + url: "https://example.es.us-central1.gcp.cloud.es.io:9243" + id: 953a0060-81ec-4221-aed4-d4733b59cd96 + type: integration-account + schema: + $ref: "#/components/schemas/ElasticCloudIntegrationAccountResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "422": + $ref: "#/components/responses/UnprocessableEntityResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Update an Elastic Cloud integration account + tags: + - Elastic Cloud Integration Accounts + x-codegen-request-body-name: body + x-unstable: |- + **Note**: This endpoint is in public beta. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/integration-interfaces/twilio/accounts: + get: + description: List Twilio integration accounts. + operationId: ListTwilioIntegrationAccounts + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + authentication: + auth_type: basic + username: SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + dataflows: + twilio-messages-logs: + enabled: true + status: + health: DATAFLOW_HEALTH_OK + updated_at: "2026-06-25T08:30:50Z" + name: twilio-prod + settings: + account_sid: ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + censor_logs: true + id: 953a0060-81ec-4221-aed4-d4733b59cd96 + type: integration-account + schema: + $ref: "#/components/schemas/TwilioIntegrationAccountsResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: List Twilio integration accounts + tags: + - Twilio Integration Accounts + x-unstable: |- + **Note**: This endpoint is in public beta. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + post: + description: Create a Twilio integration account. + operationId: CreateTwilioIntegrationAccount + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/TwilioIntegrationAccountCreateRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + authentication: + auth_type: basic + username: SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + dataflows: + twilio-messages-logs: + enabled: true + status: + health: DATAFLOW_HEALTH_OK + updated_at: "2026-06-25T08:30:50Z" + name: twilio-prod + settings: + account_sid: ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + censor_logs: true + id: 953a0060-81ec-4221-aed4-d4733b59cd96 + type: integration-account + schema: + $ref: "#/components/schemas/TwilioIntegrationAccountResponse" + description: Created + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "422": + $ref: "#/components/responses/UnprocessableEntityResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Create a Twilio integration account + tags: + - Twilio Integration Accounts + x-codegen-request-body-name: body + x-unstable: |- + **Note**: This endpoint is in public beta. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/integration-interfaces/twilio/accounts/{account_id}: + delete: + description: Delete a Twilio integration account. + operationId: DeleteTwilioIntegrationAccount + parameters: + - $ref: "#/components/parameters/IntegrationAccountIdParameter" + responses: + "200": + description: OK + "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 Twilio integration account. + operationId: GetTwilioIntegrationAccount + parameters: + - $ref: "#/components/parameters/IntegrationAccountIdParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + authentication: + auth_type: basic + username: SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + dataflows: + twilio-messages-logs: + enabled: true + status: + health: DATAFLOW_HEALTH_OK + updated_at: "2026-06-25T08:30:50Z" + name: twilio-prod + settings: + account_sid: ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + censor_logs: true + id: 953a0060-81ec-4221-aed4-d4733b59cd96 + type: integration-account + schema: + $ref: "#/components/schemas/TwilioIntegrationAccountResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get a Twilio integration account + tags: + - Twilio Integration Accounts + x-unstable: |- + **Note**: This endpoint is in public beta. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + patch: + description: Update a Twilio integration account. Only the fields provided are changed. + operationId: UpdateTwilioIntegrationAccount + parameters: + - $ref: "#/components/parameters/IntegrationAccountIdParameter" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/TwilioIntegrationAccountUpdateRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + authentication: + auth_type: basic + username: SKxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + dataflows: + twilio-messages-logs: + enabled: true + status: + health: DATAFLOW_HEALTH_OK + updated_at: "2026-06-25T08:30:50Z" + name: twilio-prod + settings: + account_sid: ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + censor_logs: true + id: 953a0060-81ec-4221-aed4-d4733b59cd96 + type: integration-account + schema: + $ref: "#/components/schemas/TwilioIntegrationAccountResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "422": + $ref: "#/components/responses/UnprocessableEntityResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Update a Twilio integration account + tags: + - Twilio Integration Accounts + x-codegen-request-body-name: body + x-unstable: |- + **Note**: This endpoint is in public beta. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/integration/aws/accounts: get: description: Get a list of AWS Account Integration Configs. @@ -215309,6 +216522,17 @@ 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 your Datadog Elastic Cloud integration accounts directly through the Datadog API. + Create, update, and delete accounts, configure authentication and settings, and + enable or disable dataflows such as cluster metrics, index stats, shard stats, + pending tasks, and snapshot lifecycle management stats. See the + [Elastic Cloud integration page](https://docs.datadoghq.com/integrations/elastic-cloud/) for + more information. + externalDocs: + description: Elastic Cloud integration. + url: https://docs.datadoghq.com/integrations/elastic-cloud/ + name: Elastic Cloud Integration Accounts - 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. @@ -215742,6 +216966,17 @@ tags: - description: |- Search and manage flaky tests through Test Optimization. See the [Test Optimization page](https://docs.datadoghq.com/tests/) for more information. name: Test Optimization + - description: |- + Manage your Datadog Twilio integration accounts directly through the Datadog API. + Create, update, and delete accounts, configure authentication and settings, and + enable or disable dataflows such as message logs, event logs, alerts, call + summaries, and Cloud Cost Management metrics. See the + [Twilio integration page](https://docs.datadoghq.com/integrations/twilio/) for + more information. + externalDocs: + description: Twilio integration. + url: https://docs.datadoghq.com/integrations/twilio/ + name: Twilio Integration Accounts - description: |- The usage metering API allows you to get hourly, daily, and monthly usage across multiple facets of Datadog. diff --git a/examples/v2/elastic-cloud-integration-accounts/CreateElasticCloudIntegrationAccount.rb b/examples/v2/elastic-cloud-integration-accounts/CreateElasticCloudIntegrationAccount.rb new file mode 100644 index 000000000000..fffedb9eec5f --- /dev/null +++ b/examples/v2/elastic-cloud-integration-accounts/CreateElasticCloudIntegrationAccount.rb @@ -0,0 +1,49 @@ +# Create an Elastic Cloud integration account returns "Created" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.create_elastic_cloud_integration_account".to_sym] = true +end +api_instance = DatadogAPIClient::V2::ElasticCloudIntegrationAccountsAPI.new + +body = DatadogAPIClient::V2::ElasticCloudIntegrationAccountCreateRequest.new({ + data: DatadogAPIClient::V2::ElasticCloudIntegrationAccountCreateData.new({ + attributes: DatadogAPIClient::V2::ElasticCloudIntegrationAccountCreateAttributes.new({ + authentication: DatadogAPIClient::V2::IntegrationAccountBasicAuthRequest.new({ + auth_type: DatadogAPIClient::V2::IntegrationAccountBasicAuthType::BASIC, + password: "your-password", + username: "datadog", + }), + dataflows: DatadogAPIClient::V2::ElasticCloudIntegrationDataflowsRequest.new({ + elastic_cloud_detailed_index_stats: DatadogAPIClient::V2::ElasticCloudDetailedIndexStatsIntegrationDataflowRequest.new({ + enabled: true, + }), + elastic_cloud_index_stats: DatadogAPIClient::V2::ElasticCloudIndexStatsIntegrationDataflowRequest.new({ + enabled: true, + }), + elastic_cloud_pending_task_stats: DatadogAPIClient::V2::ElasticCloudPendingTaskStatsIntegrationDataflowRequest.new({ + enabled: true, + }), + elastic_cloud_primary_shard_graceful_timeout: DatadogAPIClient::V2::ElasticCloudPrimaryShardGracefulTimeoutIntegrationDataflowRequest.new({ + enabled: true, + }), + elastic_cloud_primary_shard_stats: DatadogAPIClient::V2::ElasticCloudPrimaryShardStatsIntegrationDataflowRequest.new({ + enabled: true, + }), + elastic_cloud_shard_allocation_stats: DatadogAPIClient::V2::ElasticCloudShardAllocationStatsIntegrationDataflowRequest.new({ + enabled: true, + }), + elastic_cloud_slm_stats: DatadogAPIClient::V2::ElasticCloudSlmStatsIntegrationDataflowRequest.new({ + enabled: true, + }), + }), + name: "elastic-cloud-prod", + settings: DatadogAPIClient::V2::ElasticCloudIntegrationAccountSettingsRequest.new({ + tags: "env:prod,team:saasint", + url: "https://example.es.us-central1.gcp.cloud.es.io:9243", + }), + }), + type: DatadogAPIClient::V2::IntegrationAccountType::INTEGRATION_ACCOUNT, + }), +}) +p api_instance.create_elastic_cloud_integration_account(body) diff --git a/examples/v2/elastic-cloud-integration-accounts/DeleteElasticCloudIntegrationAccount.rb b/examples/v2/elastic-cloud-integration-accounts/DeleteElasticCloudIntegrationAccount.rb new file mode 100644 index 000000000000..e7382374a982 --- /dev/null +++ b/examples/v2/elastic-cloud-integration-accounts/DeleteElasticCloudIntegrationAccount.rb @@ -0,0 +1,8 @@ +# Delete an Elastic Cloud integration account returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.delete_elastic_cloud_integration_account".to_sym] = true +end +api_instance = DatadogAPIClient::V2::ElasticCloudIntegrationAccountsAPI.new +p api_instance.delete_elastic_cloud_integration_account("account_id") diff --git a/examples/v2/elastic-cloud-integration-accounts/GetElasticCloudIntegrationAccount.rb b/examples/v2/elastic-cloud-integration-accounts/GetElasticCloudIntegrationAccount.rb new file mode 100644 index 000000000000..2dcf7391a97c --- /dev/null +++ b/examples/v2/elastic-cloud-integration-accounts/GetElasticCloudIntegrationAccount.rb @@ -0,0 +1,8 @@ +# Get an Elastic Cloud integration account returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.get_elastic_cloud_integration_account".to_sym] = true +end +api_instance = DatadogAPIClient::V2::ElasticCloudIntegrationAccountsAPI.new +p api_instance.get_elastic_cloud_integration_account("account_id") diff --git a/examples/v2/elastic-cloud-integration-accounts/ListElasticCloudIntegrationAccounts.rb b/examples/v2/elastic-cloud-integration-accounts/ListElasticCloudIntegrationAccounts.rb new file mode 100644 index 000000000000..17f8a9249aaa --- /dev/null +++ b/examples/v2/elastic-cloud-integration-accounts/ListElasticCloudIntegrationAccounts.rb @@ -0,0 +1,8 @@ +# List Elastic Cloud integration accounts returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.list_elastic_cloud_integration_accounts".to_sym] = true +end +api_instance = DatadogAPIClient::V2::ElasticCloudIntegrationAccountsAPI.new +p api_instance.list_elastic_cloud_integration_accounts() diff --git a/examples/v2/elastic-cloud-integration-accounts/UpdateElasticCloudIntegrationAccount.rb b/examples/v2/elastic-cloud-integration-accounts/UpdateElasticCloudIntegrationAccount.rb new file mode 100644 index 000000000000..cdc648965128 --- /dev/null +++ b/examples/v2/elastic-cloud-integration-accounts/UpdateElasticCloudIntegrationAccount.rb @@ -0,0 +1,50 @@ +# Update an Elastic Cloud integration account returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.update_elastic_cloud_integration_account".to_sym] = true +end +api_instance = DatadogAPIClient::V2::ElasticCloudIntegrationAccountsAPI.new + +body = DatadogAPIClient::V2::ElasticCloudIntegrationAccountUpdateRequest.new({ + data: DatadogAPIClient::V2::ElasticCloudIntegrationAccountUpdateData.new({ + attributes: DatadogAPIClient::V2::ElasticCloudIntegrationAccountUpdateAttributes.new({ + authentication: DatadogAPIClient::V2::IntegrationAccountBasicAuthUpdate.new({ + auth_type: DatadogAPIClient::V2::IntegrationAccountBasicAuthType::BASIC, + password: "your-password", + username: "datadog", + }), + dataflows: DatadogAPIClient::V2::ElasticCloudIntegrationDataflowsRequest.new({ + elastic_cloud_detailed_index_stats: DatadogAPIClient::V2::ElasticCloudDetailedIndexStatsIntegrationDataflowRequest.new({ + enabled: true, + }), + elastic_cloud_index_stats: DatadogAPIClient::V2::ElasticCloudIndexStatsIntegrationDataflowRequest.new({ + enabled: true, + }), + elastic_cloud_pending_task_stats: DatadogAPIClient::V2::ElasticCloudPendingTaskStatsIntegrationDataflowRequest.new({ + enabled: true, + }), + elastic_cloud_primary_shard_graceful_timeout: DatadogAPIClient::V2::ElasticCloudPrimaryShardGracefulTimeoutIntegrationDataflowRequest.new({ + enabled: true, + }), + elastic_cloud_primary_shard_stats: DatadogAPIClient::V2::ElasticCloudPrimaryShardStatsIntegrationDataflowRequest.new({ + enabled: true, + }), + elastic_cloud_shard_allocation_stats: DatadogAPIClient::V2::ElasticCloudShardAllocationStatsIntegrationDataflowRequest.new({ + enabled: true, + }), + elastic_cloud_slm_stats: DatadogAPIClient::V2::ElasticCloudSlmStatsIntegrationDataflowRequest.new({ + enabled: true, + }), + }), + name: "elastic-cloud-prod", + settings: DatadogAPIClient::V2::ElasticCloudIntegrationAccountSettingsUpdate.new({ + tags: "env:prod,team:saasint", + url: "https://example.es.us-central1.gcp.cloud.es.io:9243", + }), + }), + id: "953a0060-81ec-4221-aed4-d4733b59cd96", + type: DatadogAPIClient::V2::IntegrationAccountType::INTEGRATION_ACCOUNT, + }), +}) +p api_instance.update_elastic_cloud_integration_account("account_id", body) diff --git a/examples/v2/twilio-integration-accounts/CreateTwilioIntegrationAccount.rb b/examples/v2/twilio-integration-accounts/CreateTwilioIntegrationAccount.rb new file mode 100644 index 000000000000..94e7386b3de9 --- /dev/null +++ b/examples/v2/twilio-integration-accounts/CreateTwilioIntegrationAccount.rb @@ -0,0 +1,43 @@ +# Create a Twilio integration account returns "Created" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.create_twilio_integration_account".to_sym] = true +end +api_instance = DatadogAPIClient::V2::TwilioIntegrationAccountsAPI.new + +body = DatadogAPIClient::V2::TwilioIntegrationAccountCreateRequest.new({ + data: DatadogAPIClient::V2::TwilioIntegrationAccountCreateData.new({ + attributes: DatadogAPIClient::V2::TwilioIntegrationAccountCreateAttributes.new({ + authentication: DatadogAPIClient::V2::IntegrationAccountBasicAuthRequest.new({ + auth_type: DatadogAPIClient::V2::IntegrationAccountBasicAuthType::BASIC, + password: "your-password", + username: "datadog", + }), + dataflows: DatadogAPIClient::V2::TwilioIntegrationDataflowsRequest.new({ + twilio_alerts_logs: DatadogAPIClient::V2::TwilioAlertsLogsIntegrationDataflowRequest.new({ + enabled: true, + }), + twilio_call_summaries_logs: DatadogAPIClient::V2::TwilioCallSummariesLogsIntegrationDataflowRequest.new({ + enabled: true, + }), + twilio_cloud_cost_metrics: DatadogAPIClient::V2::TwilioCloudCostMetricsIntegrationDataflowRequest.new({ + enabled: true, + }), + twilio_events_logs: DatadogAPIClient::V2::TwilioEventsLogsIntegrationDataflowRequest.new({ + enabled: true, + }), + twilio_messages_logs: DatadogAPIClient::V2::TwilioMessagesLogsIntegrationDataflowRequest.new({ + enabled: true, + }), + }), + name: "twilio-prod", + settings: DatadogAPIClient::V2::TwilioIntegrationAccountSettingsRequest.new({ + account_sid: "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", + censor_logs: true, + }), + }), + type: DatadogAPIClient::V2::IntegrationAccountType::INTEGRATION_ACCOUNT, + }), +}) +p api_instance.create_twilio_integration_account(body) diff --git a/examples/v2/twilio-integration-accounts/DeleteTwilioIntegrationAccount.rb b/examples/v2/twilio-integration-accounts/DeleteTwilioIntegrationAccount.rb new file mode 100644 index 000000000000..3812aea2fe04 --- /dev/null +++ b/examples/v2/twilio-integration-accounts/DeleteTwilioIntegrationAccount.rb @@ -0,0 +1,8 @@ +# Delete a Twilio integration account returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.delete_twilio_integration_account".to_sym] = true +end +api_instance = DatadogAPIClient::V2::TwilioIntegrationAccountsAPI.new +p api_instance.delete_twilio_integration_account("account_id") diff --git a/examples/v2/twilio-integration-accounts/GetTwilioIntegrationAccount.rb b/examples/v2/twilio-integration-accounts/GetTwilioIntegrationAccount.rb new file mode 100644 index 000000000000..4baba3d8d893 --- /dev/null +++ b/examples/v2/twilio-integration-accounts/GetTwilioIntegrationAccount.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_integration_account".to_sym] = true +end +api_instance = DatadogAPIClient::V2::TwilioIntegrationAccountsAPI.new +p api_instance.get_twilio_integration_account("account_id") diff --git a/examples/v2/twilio-integration-accounts/ListTwilioIntegrationAccounts.rb b/examples/v2/twilio-integration-accounts/ListTwilioIntegrationAccounts.rb new file mode 100644 index 000000000000..5419ff0967a2 --- /dev/null +++ b/examples/v2/twilio-integration-accounts/ListTwilioIntegrationAccounts.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_integration_accounts".to_sym] = true +end +api_instance = DatadogAPIClient::V2::TwilioIntegrationAccountsAPI.new +p api_instance.list_twilio_integration_accounts() diff --git a/examples/v2/twilio-integration-accounts/UpdateTwilioIntegrationAccount.rb b/examples/v2/twilio-integration-accounts/UpdateTwilioIntegrationAccount.rb new file mode 100644 index 000000000000..953d3505065d --- /dev/null +++ b/examples/v2/twilio-integration-accounts/UpdateTwilioIntegrationAccount.rb @@ -0,0 +1,44 @@ +# Update a Twilio integration account returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.update_twilio_integration_account".to_sym] = true +end +api_instance = DatadogAPIClient::V2::TwilioIntegrationAccountsAPI.new + +body = DatadogAPIClient::V2::TwilioIntegrationAccountUpdateRequest.new({ + data: DatadogAPIClient::V2::TwilioIntegrationAccountUpdateData.new({ + attributes: DatadogAPIClient::V2::TwilioIntegrationAccountUpdateAttributes.new({ + authentication: DatadogAPIClient::V2::IntegrationAccountBasicAuthUpdate.new({ + auth_type: DatadogAPIClient::V2::IntegrationAccountBasicAuthType::BASIC, + password: "your-password", + username: "datadog", + }), + dataflows: DatadogAPIClient::V2::TwilioIntegrationDataflowsRequest.new({ + twilio_alerts_logs: DatadogAPIClient::V2::TwilioAlertsLogsIntegrationDataflowRequest.new({ + enabled: true, + }), + twilio_call_summaries_logs: DatadogAPIClient::V2::TwilioCallSummariesLogsIntegrationDataflowRequest.new({ + enabled: true, + }), + twilio_cloud_cost_metrics: DatadogAPIClient::V2::TwilioCloudCostMetricsIntegrationDataflowRequest.new({ + enabled: true, + }), + twilio_events_logs: DatadogAPIClient::V2::TwilioEventsLogsIntegrationDataflowRequest.new({ + enabled: true, + }), + twilio_messages_logs: DatadogAPIClient::V2::TwilioMessagesLogsIntegrationDataflowRequest.new({ + enabled: true, + }), + }), + name: "twilio-prod", + settings: DatadogAPIClient::V2::TwilioIntegrationAccountSettingsUpdate.new({ + account_sid: "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", + censor_logs: true, + }), + }), + id: "953a0060-81ec-4221-aed4-d4733b59cd96", + type: DatadogAPIClient::V2::IntegrationAccountType::INTEGRATION_ACCOUNT, + }), +}) +p api_instance.update_twilio_integration_account("account_id", body) diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index 6dd185830a99..cfeebde1271a 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -3918,6 +3918,32 @@ "id" => "UUID", "body" => "IncidentTimestampOverridePatchRequest", }, + "v2.CreateElasticCloudIntegrationAccount" => { + "body" => "ElasticCloudIntegrationAccountCreateRequest", + }, + "v2.DeleteElasticCloudIntegrationAccount" => { + "account_id" => "String", + }, + "v2.GetElasticCloudIntegrationAccount" => { + "account_id" => "String", + }, + "v2.UpdateElasticCloudIntegrationAccount" => { + "account_id" => "String", + "body" => "ElasticCloudIntegrationAccountUpdateRequest", + }, + "v2.CreateTwilioIntegrationAccount" => { + "body" => "TwilioIntegrationAccountCreateRequest", + }, + "v2.DeleteTwilioIntegrationAccount" => { + "account_id" => "String", + }, + "v2.GetTwilioIntegrationAccount" => { + "account_id" => "String", + }, + "v2.UpdateTwilioIntegrationAccount" => { + "account_id" => "String", + "body" => "TwilioIntegrationAccountUpdateRequest", + }, "v2.ListAWSAccounts" => { "aws_account_id" => "String", }, diff --git a/features/v2/elastic_cloud_integration_accounts.feature b/features/v2/elastic_cloud_integration_accounts.feature new file mode 100644 index 000000000000..a4d54a29a068 --- /dev/null +++ b/features/v2/elastic_cloud_integration_accounts.feature @@ -0,0 +1,151 @@ +@endpoint(elastic-cloud-integration-accounts) @endpoint(elastic-cloud-integration-accounts-v2) +Feature: Elastic Cloud Integration Accounts + Manage your Datadog Elastic Cloud integration accounts directly through + the Datadog API. Create, update, and delete accounts, configure + authentication and settings, and enable or disable dataflows such as + cluster metrics, index stats, shard stats, pending tasks, and snapshot + lifecycle management stats. See the [Elastic Cloud integration + page](https://docs.datadoghq.com/integrations/elastic-cloud/) for more + information. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "ElasticCloudIntegrationAccounts" API + + @generated @skip @team:DataDog/saas-integrations + Scenario: Create an Elastic Cloud integration account returns "Bad Request" response + Given operation "CreateElasticCloudIntegrationAccount" enabled + And new "CreateElasticCloudIntegrationAccount" request + And body with value {"data": {"attributes": {"authentication": {"auth_type": "basic", "password": "your-password", "username": "datadog"}, "dataflows": {"elastic-cloud-detailed-index-stats": {"enabled": true}, "elastic-cloud-index-stats": {"enabled": true}, "elastic-cloud-pending-task-stats": {"enabled": true}, "elastic-cloud-primary-shard-graceful-timeout": {"enabled": true}, "elastic-cloud-primary-shard-stats": {"enabled": true}, "elastic-cloud-shard-allocation-stats": {"enabled": true}, "elastic-cloud-slm-stats": {"enabled": true}}, "name": "elastic-cloud-prod", "settings": {"tags": "env:prod,team:saasint", "url": "https://example.es.us-central1.gcp.cloud.es.io:9243"}}, "type": "integration-account"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/saas-integrations + Scenario: Create an Elastic Cloud integration account returns "Created" response + Given operation "CreateElasticCloudIntegrationAccount" enabled + And new "CreateElasticCloudIntegrationAccount" request + And body with value {"data": {"attributes": {"authentication": {"auth_type": "basic", "password": "your-password", "username": "datadog"}, "dataflows": {"elastic-cloud-detailed-index-stats": {"enabled": true}, "elastic-cloud-index-stats": {"enabled": true}, "elastic-cloud-pending-task-stats": {"enabled": true}, "elastic-cloud-primary-shard-graceful-timeout": {"enabled": true}, "elastic-cloud-primary-shard-stats": {"enabled": true}, "elastic-cloud-shard-allocation-stats": {"enabled": true}, "elastic-cloud-slm-stats": {"enabled": true}}, "name": "elastic-cloud-prod", "settings": {"tags": "env:prod,team:saasint", "url": "https://example.es.us-central1.gcp.cloud.es.io:9243"}}, "type": "integration-account"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/saas-integrations + Scenario: Create an Elastic Cloud integration account returns "Not Found" response + Given operation "CreateElasticCloudIntegrationAccount" enabled + And new "CreateElasticCloudIntegrationAccount" request + And body with value {"data": {"attributes": {"authentication": {"auth_type": "basic", "password": "your-password", "username": "datadog"}, "dataflows": {"elastic-cloud-detailed-index-stats": {"enabled": true}, "elastic-cloud-index-stats": {"enabled": true}, "elastic-cloud-pending-task-stats": {"enabled": true}, "elastic-cloud-primary-shard-graceful-timeout": {"enabled": true}, "elastic-cloud-primary-shard-stats": {"enabled": true}, "elastic-cloud-shard-allocation-stats": {"enabled": true}, "elastic-cloud-slm-stats": {"enabled": true}}, "name": "elastic-cloud-prod", "settings": {"tags": "env:prod,team:saasint", "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: Create an Elastic Cloud integration account returns "The server cannot process the request because it contains invalid data." response + Given operation "CreateElasticCloudIntegrationAccount" enabled + And new "CreateElasticCloudIntegrationAccount" request + And body with value {"data": {"attributes": {"authentication": {"auth_type": "basic", "password": "your-password", "username": "datadog"}, "dataflows": {"elastic-cloud-detailed-index-stats": {"enabled": true}, "elastic-cloud-index-stats": {"enabled": true}, "elastic-cloud-pending-task-stats": {"enabled": true}, "elastic-cloud-primary-shard-graceful-timeout": {"enabled": true}, "elastic-cloud-primary-shard-stats": {"enabled": true}, "elastic-cloud-shard-allocation-stats": {"enabled": true}, "elastic-cloud-slm-stats": {"enabled": true}}, "name": "elastic-cloud-prod", "settings": {"tags": "env:prod,team:saasint", "url": "https://example.es.us-central1.gcp.cloud.es.io:9243"}}, "type": "integration-account"}} + When the request is sent + Then the response status is 422 The server cannot process the request because it contains invalid data. + + @generated @skip @team:DataDog/saas-integrations + Scenario: Delete an Elastic Cloud integration account returns "Bad Request" response + Given operation "DeleteElasticCloudIntegrationAccount" enabled + And new "DeleteElasticCloudIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/saas-integrations + Scenario: Delete an Elastic Cloud integration account returns "Not Found" response + Given operation "DeleteElasticCloudIntegrationAccount" enabled + And new "DeleteElasticCloudIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/saas-integrations + Scenario: Delete an Elastic Cloud integration account returns "OK" response + Given operation "DeleteElasticCloudIntegrationAccount" enabled + And new "DeleteElasticCloudIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/saas-integrations + Scenario: Get an Elastic Cloud integration account returns "Bad Request" response + Given operation "GetElasticCloudIntegrationAccount" enabled + And new "GetElasticCloudIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/saas-integrations + Scenario: Get an Elastic Cloud integration account returns "Not Found" response + Given operation "GetElasticCloudIntegrationAccount" enabled + And new "GetElasticCloudIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/saas-integrations + Scenario: Get an Elastic Cloud integration account returns "OK" response + Given operation "GetElasticCloudIntegrationAccount" enabled + And new "GetElasticCloudIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/saas-integrations + Scenario: List Elastic Cloud integration accounts returns "Bad Request" response + Given operation "ListElasticCloudIntegrationAccounts" enabled + And new "ListElasticCloudIntegrationAccounts" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/saas-integrations + Scenario: List Elastic Cloud integration accounts returns "Not Found" response + Given operation "ListElasticCloudIntegrationAccounts" enabled + And new "ListElasticCloudIntegrationAccounts" request + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/saas-integrations + Scenario: List Elastic Cloud integration accounts returns "OK" response + Given operation "ListElasticCloudIntegrationAccounts" enabled + And new "ListElasticCloudIntegrationAccounts" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/saas-integrations + Scenario: Update an Elastic Cloud integration account returns "Bad Request" response + Given operation "UpdateElasticCloudIntegrationAccount" enabled + And new "UpdateElasticCloudIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"authentication": {"auth_type": "basic", "password": "your-password", "username": "datadog"}, "dataflows": {"elastic-cloud-detailed-index-stats": {"enabled": true}, "elastic-cloud-index-stats": {"enabled": true}, "elastic-cloud-pending-task-stats": {"enabled": true}, "elastic-cloud-primary-shard-graceful-timeout": {"enabled": true}, "elastic-cloud-primary-shard-stats": {"enabled": true}, "elastic-cloud-shard-allocation-stats": {"enabled": true}, "elastic-cloud-slm-stats": {"enabled": true}}, "name": "elastic-cloud-prod", "settings": {"tags": "env:prod,team:saasint", "url": "https://example.es.us-central1.gcp.cloud.es.io:9243"}}, "id": "953a0060-81ec-4221-aed4-d4733b59cd96", "type": "integration-account"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/saas-integrations + Scenario: Update an Elastic Cloud integration account returns "Not Found" response + Given operation "UpdateElasticCloudIntegrationAccount" enabled + And new "UpdateElasticCloudIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"authentication": {"auth_type": "basic", "password": "your-password", "username": "datadog"}, "dataflows": {"elastic-cloud-detailed-index-stats": {"enabled": true}, "elastic-cloud-index-stats": {"enabled": true}, "elastic-cloud-pending-task-stats": {"enabled": true}, "elastic-cloud-primary-shard-graceful-timeout": {"enabled": true}, "elastic-cloud-primary-shard-stats": {"enabled": true}, "elastic-cloud-shard-allocation-stats": {"enabled": true}, "elastic-cloud-slm-stats": {"enabled": true}}, "name": "elastic-cloud-prod", "settings": {"tags": "env:prod,team:saasint", "url": "https://example.es.us-central1.gcp.cloud.es.io:9243"}}, "id": "953a0060-81ec-4221-aed4-d4733b59cd96", "type": "integration-account"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/saas-integrations + Scenario: Update an Elastic Cloud integration account returns "OK" response + Given operation "UpdateElasticCloudIntegrationAccount" enabled + And new "UpdateElasticCloudIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"authentication": {"auth_type": "basic", "password": "your-password", "username": "datadog"}, "dataflows": {"elastic-cloud-detailed-index-stats": {"enabled": true}, "elastic-cloud-index-stats": {"enabled": true}, "elastic-cloud-pending-task-stats": {"enabled": true}, "elastic-cloud-primary-shard-graceful-timeout": {"enabled": true}, "elastic-cloud-primary-shard-stats": {"enabled": true}, "elastic-cloud-shard-allocation-stats": {"enabled": true}, "elastic-cloud-slm-stats": {"enabled": true}}, "name": "elastic-cloud-prod", "settings": {"tags": "env:prod,team:saasint", "url": "https://example.es.us-central1.gcp.cloud.es.io:9243"}}, "id": "953a0060-81ec-4221-aed4-d4733b59cd96", "type": "integration-account"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/saas-integrations + Scenario: Update an Elastic Cloud integration account returns "The server cannot process the request because it contains invalid data." response + Given operation "UpdateElasticCloudIntegrationAccount" enabled + And new "UpdateElasticCloudIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"authentication": {"auth_type": "basic", "password": "your-password", "username": "datadog"}, "dataflows": {"elastic-cloud-detailed-index-stats": {"enabled": true}, "elastic-cloud-index-stats": {"enabled": true}, "elastic-cloud-pending-task-stats": {"enabled": true}, "elastic-cloud-primary-shard-graceful-timeout": {"enabled": true}, "elastic-cloud-primary-shard-stats": {"enabled": true}, "elastic-cloud-shard-allocation-stats": {"enabled": true}, "elastic-cloud-slm-stats": {"enabled": true}}, "name": "elastic-cloud-prod", "settings": {"tags": "env:prod,team:saasint", "url": "https://example.es.us-central1.gcp.cloud.es.io:9243"}}, "id": "953a0060-81ec-4221-aed4-d4733b59cd96", "type": "integration-account"}} + When the request is sent + Then the response status is 422 The server cannot process the request because it contains invalid data. diff --git a/features/v2/twilio_integration_accounts.feature b/features/v2/twilio_integration_accounts.feature new file mode 100644 index 000000000000..cb09ad702cd9 --- /dev/null +++ b/features/v2/twilio_integration_accounts.feature @@ -0,0 +1,150 @@ +@endpoint(twilio-integration-accounts) @endpoint(twilio-integration-accounts-v2) +Feature: Twilio Integration Accounts + Manage your Datadog Twilio integration accounts directly through the + Datadog API. Create, update, and delete accounts, configure authentication + and settings, and enable or disable dataflows such as message logs, event + logs, alerts, call summaries, and Cloud Cost Management metrics. See the + [Twilio integration page](https://docs.datadoghq.com/integrations/twilio/) + for more information. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "TwilioIntegrationAccounts" API + + @generated @skip @team:DataDog/saas-integrations + Scenario: Create a Twilio integration account returns "Bad Request" response + Given operation "CreateTwilioIntegrationAccount" enabled + And new "CreateTwilioIntegrationAccount" request + And body with value {"data": {"attributes": {"authentication": {"auth_type": "basic", "password": "your-password", "username": "datadog"}, "dataflows": {"twilio-alerts-logs": {"enabled": true}, "twilio-call-summaries-logs": {"enabled": true}, "twilio-cloud-cost-metrics": {"enabled": true}, "twilio-events-logs": {"enabled": true}, "twilio-messages-logs": {"enabled": true}}, "name": "twilio-prod", "settings": {"account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "censor_logs": true}}, "type": "integration-account"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/saas-integrations + Scenario: Create a Twilio integration account returns "Created" response + Given operation "CreateTwilioIntegrationAccount" enabled + And new "CreateTwilioIntegrationAccount" request + And body with value {"data": {"attributes": {"authentication": {"auth_type": "basic", "password": "your-password", "username": "datadog"}, "dataflows": {"twilio-alerts-logs": {"enabled": true}, "twilio-call-summaries-logs": {"enabled": true}, "twilio-cloud-cost-metrics": {"enabled": true}, "twilio-events-logs": {"enabled": true}, "twilio-messages-logs": {"enabled": true}}, "name": "twilio-prod", "settings": {"account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "censor_logs": true}}, "type": "integration-account"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/saas-integrations + Scenario: Create a Twilio integration account returns "Not Found" response + Given operation "CreateTwilioIntegrationAccount" enabled + And new "CreateTwilioIntegrationAccount" request + And body with value {"data": {"attributes": {"authentication": {"auth_type": "basic", "password": "your-password", "username": "datadog"}, "dataflows": {"twilio-alerts-logs": {"enabled": true}, "twilio-call-summaries-logs": {"enabled": true}, "twilio-cloud-cost-metrics": {"enabled": true}, "twilio-events-logs": {"enabled": true}, "twilio-messages-logs": {"enabled": true}}, "name": "twilio-prod", "settings": {"account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "censor_logs": true}}, "type": "integration-account"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/saas-integrations + Scenario: Create a Twilio integration account returns "The server cannot process the request because it contains invalid data." response + Given operation "CreateTwilioIntegrationAccount" enabled + And new "CreateTwilioIntegrationAccount" request + And body with value {"data": {"attributes": {"authentication": {"auth_type": "basic", "password": "your-password", "username": "datadog"}, "dataflows": {"twilio-alerts-logs": {"enabled": true}, "twilio-call-summaries-logs": {"enabled": true}, "twilio-cloud-cost-metrics": {"enabled": true}, "twilio-events-logs": {"enabled": true}, "twilio-messages-logs": {"enabled": true}}, "name": "twilio-prod", "settings": {"account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "censor_logs": true}}, "type": "integration-account"}} + When the request is sent + Then the response status is 422 The server cannot process the request because it contains invalid data. + + @generated @skip @team:DataDog/saas-integrations + Scenario: Delete a Twilio integration account returns "Bad Request" response + Given operation "DeleteTwilioIntegrationAccount" enabled + And new "DeleteTwilioIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/saas-integrations + Scenario: Delete a Twilio integration account returns "Not Found" response + Given operation "DeleteTwilioIntegrationAccount" enabled + And new "DeleteTwilioIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/saas-integrations + Scenario: Delete a Twilio integration account returns "OK" response + Given operation "DeleteTwilioIntegrationAccount" enabled + And new "DeleteTwilioIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/saas-integrations + Scenario: Get a Twilio integration account returns "Bad Request" response + Given operation "GetTwilioIntegrationAccount" enabled + And new "GetTwilioIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/saas-integrations + Scenario: Get a Twilio integration account returns "Not Found" response + Given operation "GetTwilioIntegrationAccount" enabled + And new "GetTwilioIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/saas-integrations + Scenario: Get a Twilio integration account returns "OK" response + Given operation "GetTwilioIntegrationAccount" enabled + And new "GetTwilioIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/saas-integrations + Scenario: List Twilio integration accounts returns "Bad Request" response + Given operation "ListTwilioIntegrationAccounts" enabled + And new "ListTwilioIntegrationAccounts" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/saas-integrations + Scenario: List Twilio integration accounts returns "Not Found" response + Given operation "ListTwilioIntegrationAccounts" enabled + And new "ListTwilioIntegrationAccounts" request + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/saas-integrations + Scenario: List Twilio integration accounts returns "OK" response + Given operation "ListTwilioIntegrationAccounts" enabled + And new "ListTwilioIntegrationAccounts" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/saas-integrations + Scenario: Update a Twilio integration account returns "Bad Request" response + Given operation "UpdateTwilioIntegrationAccount" enabled + And new "UpdateTwilioIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"authentication": {"auth_type": "basic", "password": "your-password", "username": "datadog"}, "dataflows": {"twilio-alerts-logs": {"enabled": true}, "twilio-call-summaries-logs": {"enabled": true}, "twilio-cloud-cost-metrics": {"enabled": true}, "twilio-events-logs": {"enabled": true}, "twilio-messages-logs": {"enabled": true}}, "name": "twilio-prod", "settings": {"account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "censor_logs": true}}, "id": "953a0060-81ec-4221-aed4-d4733b59cd96", "type": "integration-account"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/saas-integrations + Scenario: Update a Twilio integration account returns "Not Found" response + Given operation "UpdateTwilioIntegrationAccount" enabled + And new "UpdateTwilioIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"authentication": {"auth_type": "basic", "password": "your-password", "username": "datadog"}, "dataflows": {"twilio-alerts-logs": {"enabled": true}, "twilio-call-summaries-logs": {"enabled": true}, "twilio-cloud-cost-metrics": {"enabled": true}, "twilio-events-logs": {"enabled": true}, "twilio-messages-logs": {"enabled": true}}, "name": "twilio-prod", "settings": {"account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "censor_logs": true}}, "id": "953a0060-81ec-4221-aed4-d4733b59cd96", "type": "integration-account"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/saas-integrations + Scenario: Update a Twilio integration account returns "OK" response + Given operation "UpdateTwilioIntegrationAccount" enabled + And new "UpdateTwilioIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"authentication": {"auth_type": "basic", "password": "your-password", "username": "datadog"}, "dataflows": {"twilio-alerts-logs": {"enabled": true}, "twilio-call-summaries-logs": {"enabled": true}, "twilio-cloud-cost-metrics": {"enabled": true}, "twilio-events-logs": {"enabled": true}, "twilio-messages-logs": {"enabled": true}}, "name": "twilio-prod", "settings": {"account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "censor_logs": true}}, "id": "953a0060-81ec-4221-aed4-d4733b59cd96", "type": "integration-account"}} + 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 "The server cannot process the request because it contains invalid data." response + Given operation "UpdateTwilioIntegrationAccount" enabled + And new "UpdateTwilioIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"authentication": {"auth_type": "basic", "password": "your-password", "username": "datadog"}, "dataflows": {"twilio-alerts-logs": {"enabled": true}, "twilio-call-summaries-logs": {"enabled": true}, "twilio-cloud-cost-metrics": {"enabled": true}, "twilio-events-logs": {"enabled": true}, "twilio-messages-logs": {"enabled": true}}, "name": "twilio-prod", "settings": {"account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "censor_logs": true}}, "id": "953a0060-81ec-4221-aed4-d4733b59cd96", "type": "integration-account"}} + When the request is sent + Then the response status is 422 The server cannot process the request because it contains invalid data. diff --git a/features/v2/undo.json b/features/v2/undo.json index b0bc955911dd..c7cb9ed93b4c 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -3494,6 +3494,80 @@ "type": "idempotent" } }, + "ListElasticCloudIntegrationAccounts": { + "tag": "Elastic Cloud Integration Accounts", + "undo": { + "type": "safe" + } + }, + "CreateElasticCloudIntegrationAccount": { + "tag": "Elastic Cloud Integration Accounts", + "undo": { + "operationId": "DeleteElasticCloudIntegrationAccount", + "parameters": [ + { + "name": "account_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DeleteElasticCloudIntegrationAccount": { + "tag": "Elastic Cloud Integration Accounts", + "undo": { + "type": "idempotent" + } + }, + "GetElasticCloudIntegrationAccount": { + "tag": "Elastic Cloud Integration Accounts", + "undo": { + "type": "safe" + } + }, + "UpdateElasticCloudIntegrationAccount": { + "tag": "Elastic Cloud Integration Accounts", + "undo": { + "type": "idempotent" + } + }, + "ListTwilioIntegrationAccounts": { + "tag": "Twilio Integration Accounts", + "undo": { + "type": "safe" + } + }, + "CreateTwilioIntegrationAccount": { + "tag": "Twilio Integration Accounts", + "undo": { + "operationId": "DeleteTwilioIntegrationAccount", + "parameters": [ + { + "name": "account_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DeleteTwilioIntegrationAccount": { + "tag": "Twilio Integration Accounts", + "undo": { + "type": "idempotent" + } + }, + "GetTwilioIntegrationAccount": { + "tag": "Twilio Integration Accounts", + "undo": { + "type": "safe" + } + }, + "UpdateTwilioIntegrationAccount": { + "tag": "Twilio Integration Accounts", + "undo": { + "type": "idempotent" + } + }, "ListAWSAccounts": { "tag": "AWS Integration", "undo": { diff --git a/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index 831de578c22c..a1ec15709765 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -566,6 +566,16 @@ def initialize "v2.update_incident_user_defined_field": false, "v2.update_incident_user_defined_role": false, "v2.update_timestamp_override": false, + "v2.create_elastic_cloud_integration_account": false, + "v2.delete_elastic_cloud_integration_account": false, + "v2.get_elastic_cloud_integration_account": false, + "v2.list_elastic_cloud_integration_accounts": false, + "v2.update_elastic_cloud_integration_account": false, + "v2.create_twilio_integration_account": false, + "v2.delete_twilio_integration_account": false, + "v2.get_twilio_integration_account": false, + "v2.list_twilio_integration_accounts": false, + "v2.update_twilio_integration_account": false, "v2.create_aws_account_ccm_config": false, "v2.delete_aws_account_ccm_config": false, "v2.get_aws_account_ccm_config": false, diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 0b9c2762236e..292d3fd28a7b 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -3139,6 +3139,39 @@ def overrides "v2.due_date_rule_type" => "DueDateRuleType", "v2.due_date_rule_update_request" => "DueDateRuleUpdateRequest", "v2.due_date_severity" => "DueDateSeverity", + "v2.elastic_cloud_detailed_index_stats_integration_dataflow_request" => "ElasticCloudDetailedIndexStatsIntegrationDataflowRequest", + "v2.elastic_cloud_detailed_index_stats_integration_dataflow_response" => "ElasticCloudDetailedIndexStatsIntegrationDataflowResponse", + "v2.elastic_cloud_index_stats_integration_dataflow_request" => "ElasticCloudIndexStatsIntegrationDataflowRequest", + "v2.elastic_cloud_index_stats_integration_dataflow_response" => "ElasticCloudIndexStatsIntegrationDataflowResponse", + "v2.elastic_cloud_integration_account_authentication_request" => "ElasticCloudIntegrationAccountAuthenticationRequest", + "v2.elastic_cloud_integration_account_authentication_response" => "ElasticCloudIntegrationAccountAuthenticationResponse", + "v2.elastic_cloud_integration_account_authentication_update" => "ElasticCloudIntegrationAccountAuthenticationUpdate", + "v2.elastic_cloud_integration_account_create_attributes" => "ElasticCloudIntegrationAccountCreateAttributes", + "v2.elastic_cloud_integration_account_create_data" => "ElasticCloudIntegrationAccountCreateData", + "v2.elastic_cloud_integration_account_create_request" => "ElasticCloudIntegrationAccountCreateRequest", + "v2.elastic_cloud_integration_account_response" => "ElasticCloudIntegrationAccountResponse", + "v2.elastic_cloud_integration_account_response_attributes" => "ElasticCloudIntegrationAccountResponseAttributes", + "v2.elastic_cloud_integration_account_response_data" => "ElasticCloudIntegrationAccountResponseData", + "v2.elastic_cloud_integration_account_settings_request" => "ElasticCloudIntegrationAccountSettingsRequest", + "v2.elastic_cloud_integration_account_settings_response" => "ElasticCloudIntegrationAccountSettingsResponse", + "v2.elastic_cloud_integration_account_settings_update" => "ElasticCloudIntegrationAccountSettingsUpdate", + "v2.elastic_cloud_integration_accounts_response" => "ElasticCloudIntegrationAccountsResponse", + "v2.elastic_cloud_integration_account_update_attributes" => "ElasticCloudIntegrationAccountUpdateAttributes", + "v2.elastic_cloud_integration_account_update_data" => "ElasticCloudIntegrationAccountUpdateData", + "v2.elastic_cloud_integration_account_update_request" => "ElasticCloudIntegrationAccountUpdateRequest", + "v2.elastic_cloud_integration_dataflows_request" => "ElasticCloudIntegrationDataflowsRequest", + "v2.elastic_cloud_integration_dataflows_response" => "ElasticCloudIntegrationDataflowsResponse", + "v2.elastic_cloud_metrics_integration_dataflow_response" => "ElasticCloudMetricsIntegrationDataflowResponse", + "v2.elastic_cloud_pending_task_stats_integration_dataflow_request" => "ElasticCloudPendingTaskStatsIntegrationDataflowRequest", + "v2.elastic_cloud_pending_task_stats_integration_dataflow_response" => "ElasticCloudPendingTaskStatsIntegrationDataflowResponse", + "v2.elastic_cloud_primary_shard_graceful_timeout_integration_dataflow_request" => "ElasticCloudPrimaryShardGracefulTimeoutIntegrationDataflowRequest", + "v2.elastic_cloud_primary_shard_graceful_timeout_integration_dataflow_response" => "ElasticCloudPrimaryShardGracefulTimeoutIntegrationDataflowResponse", + "v2.elastic_cloud_primary_shard_stats_integration_dataflow_request" => "ElasticCloudPrimaryShardStatsIntegrationDataflowRequest", + "v2.elastic_cloud_primary_shard_stats_integration_dataflow_response" => "ElasticCloudPrimaryShardStatsIntegrationDataflowResponse", + "v2.elastic_cloud_shard_allocation_stats_integration_dataflow_request" => "ElasticCloudShardAllocationStatsIntegrationDataflowRequest", + "v2.elastic_cloud_shard_allocation_stats_integration_dataflow_response" => "ElasticCloudShardAllocationStatsIntegrationDataflowResponse", + "v2.elastic_cloud_slm_stats_integration_dataflow_request" => "ElasticCloudSlmStatsIntegrationDataflowRequest", + "v2.elastic_cloud_slm_stats_integration_dataflow_response" => "ElasticCloudSlmStatsIntegrationDataflowResponse", "v2.elf_sourcemap_attributes" => "ELFSourcemapAttributes", "v2.elf_sourcemap_data" => "ELFSourcemapData", "v2.entity_attributes" => "EntityAttributes", @@ -4235,6 +4268,13 @@ def overrides "v2.input_schema_parameters_type" => "InputSchemaParametersType", "v2.intake_payload_accepted" => "IntakePayloadAccepted", "v2.integration" => "Integration", + "v2.integration_account_basic_auth_request" => "IntegrationAccountBasicAuthRequest", + "v2.integration_account_basic_auth_response" => "IntegrationAccountBasicAuthResponse", + "v2.integration_account_basic_auth_type" => "IntegrationAccountBasicAuthType", + "v2.integration_account_basic_auth_update" => "IntegrationAccountBasicAuthUpdate", + "v2.integration_account_dataflow_health" => "IntegrationAccountDataflowHealth", + "v2.integration_account_dataflow_status" => "IntegrationAccountDataflowStatus", + "v2.integration_account_type" => "IntegrationAccountType", "v2.integration_attributes" => "IntegrationAttributes", "v2.integration_incident" => "IntegrationIncident", "v2.integration_incident_field_mappings_items" => "IntegrationIncidentFieldMappingsItems", @@ -8195,6 +8235,34 @@ def overrides "v2.trigger_type" => "TriggerType", "v2.trigger_workflow_automation_action" => "TriggerWorkflowAutomationAction", "v2.trigger_workflow_automation_action_type" => "TriggerWorkflowAutomationActionType", + "v2.twilio_alerts_logs_integration_dataflow_request" => "TwilioAlertsLogsIntegrationDataflowRequest", + "v2.twilio_alerts_logs_integration_dataflow_response" => "TwilioAlertsLogsIntegrationDataflowResponse", + "v2.twilio_call_summaries_logs_integration_dataflow_request" => "TwilioCallSummariesLogsIntegrationDataflowRequest", + "v2.twilio_call_summaries_logs_integration_dataflow_response" => "TwilioCallSummariesLogsIntegrationDataflowResponse", + "v2.twilio_cloud_cost_metrics_integration_dataflow_request" => "TwilioCloudCostMetricsIntegrationDataflowRequest", + "v2.twilio_cloud_cost_metrics_integration_dataflow_response" => "TwilioCloudCostMetricsIntegrationDataflowResponse", + "v2.twilio_events_logs_integration_dataflow_request" => "TwilioEventsLogsIntegrationDataflowRequest", + "v2.twilio_events_logs_integration_dataflow_response" => "TwilioEventsLogsIntegrationDataflowResponse", + "v2.twilio_integration_account_authentication_request" => "TwilioIntegrationAccountAuthenticationRequest", + "v2.twilio_integration_account_authentication_response" => "TwilioIntegrationAccountAuthenticationResponse", + "v2.twilio_integration_account_authentication_update" => "TwilioIntegrationAccountAuthenticationUpdate", + "v2.twilio_integration_account_create_attributes" => "TwilioIntegrationAccountCreateAttributes", + "v2.twilio_integration_account_create_data" => "TwilioIntegrationAccountCreateData", + "v2.twilio_integration_account_create_request" => "TwilioIntegrationAccountCreateRequest", + "v2.twilio_integration_account_response" => "TwilioIntegrationAccountResponse", + "v2.twilio_integration_account_response_attributes" => "TwilioIntegrationAccountResponseAttributes", + "v2.twilio_integration_account_response_data" => "TwilioIntegrationAccountResponseData", + "v2.twilio_integration_account_settings_request" => "TwilioIntegrationAccountSettingsRequest", + "v2.twilio_integration_account_settings_response" => "TwilioIntegrationAccountSettingsResponse", + "v2.twilio_integration_account_settings_update" => "TwilioIntegrationAccountSettingsUpdate", + "v2.twilio_integration_accounts_response" => "TwilioIntegrationAccountsResponse", + "v2.twilio_integration_account_update_attributes" => "TwilioIntegrationAccountUpdateAttributes", + "v2.twilio_integration_account_update_data" => "TwilioIntegrationAccountUpdateData", + "v2.twilio_integration_account_update_request" => "TwilioIntegrationAccountUpdateRequest", + "v2.twilio_integration_dataflows_request" => "TwilioIntegrationDataflowsRequest", + "v2.twilio_integration_dataflows_response" => "TwilioIntegrationDataflowsResponse", + "v2.twilio_messages_logs_integration_dataflow_request" => "TwilioMessagesLogsIntegrationDataflowRequest", + "v2.twilio_messages_logs_integration_dataflow_response" => "TwilioMessagesLogsIntegrationDataflowResponse", "v2.uc_config_pair" => "UCConfigPair", "v2.uc_config_pair_data" => "UCConfigPairData", "v2.uc_config_pair_data_attributes" => "UCConfigPairDataAttributes", @@ -8629,6 +8697,7 @@ def overrides "v2.domain_allowlist_api" => "DomainAllowlistAPI", "v2.dora_metrics_api" => "DORAMetricsAPI", "v2.downtimes_api" => "DowntimesAPI", + "v2.elastic_cloud_integration_accounts_api" => "ElasticCloudIntegrationAccountsAPI", "v2.entity_integration_configs_api" => "EntityIntegrationConfigsAPI", "v2.entity_risk_scores_api" => "EntityRiskScoresAPI", "v2.error_tracking_api" => "ErrorTrackingAPI", @@ -8714,6 +8783,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_integration_accounts_api.rb b/lib/datadog_api_client/v2/api/elastic_cloud_integration_accounts_api.rb new file mode 100644 index 000000000000..05e632409ad2 --- /dev/null +++ b/lib/datadog_api_client/v2/api/elastic_cloud_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 ElasticCloudIntegrationAccountsAPI + attr_accessor :api_client + + def initialize(api_client = DatadogAPIClient::APIClient.default) + @api_client = api_client + end + + # Create an Elastic Cloud integration account. + # + # @see #create_elastic_cloud_integration_account_with_http_info + def create_elastic_cloud_integration_account(body, opts = {}) + data, _status_code, _headers = create_elastic_cloud_integration_account_with_http_info(body, opts) + data + end + + # Create an Elastic Cloud integration account. + # + # Create an Elastic Cloud integration account. + # + # @param body [ElasticCloudIntegrationAccountCreateRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(ElasticCloudIntegrationAccountResponse, Integer, Hash)>] ElasticCloudIntegrationAccountResponse data, response status code and response headers + def create_elastic_cloud_integration_account_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.create_elastic_cloud_integration_account".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_elastic_cloud_integration_account") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_elastic_cloud_integration_account")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ElasticCloudIntegrationAccountsAPI.create_elastic_cloud_integration_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 ElasticCloudIntegrationAccountsAPI.create_elastic_cloud_integration_account" + end + # resource path + local_var_path = '/api/v2/integration-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] || 'ElasticCloudIntegrationAccountResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :create_elastic_cloud_integration_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: ElasticCloudIntegrationAccountsAPI#create_elastic_cloud_integration_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Delete an Elastic Cloud integration account. + # + # @see #delete_elastic_cloud_integration_account_with_http_info + def delete_elastic_cloud_integration_account(account_id, opts = {}) + delete_elastic_cloud_integration_account_with_http_info(account_id, opts) + nil + end + + # Delete an Elastic Cloud integration account. + # + # Delete an Elastic Cloud 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_elastic_cloud_integration_account_with_http_info(account_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.delete_elastic_cloud_integration_account".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_elastic_cloud_integration_account") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_elastic_cloud_integration_account")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ElasticCloudIntegrationAccountsAPI.delete_elastic_cloud_integration_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 ElasticCloudIntegrationAccountsAPI.delete_elastic_cloud_integration_account" + end + # resource path + local_var_path = '/api/v2/integration-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_integration_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: ElasticCloudIntegrationAccountsAPI#delete_elastic_cloud_integration_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get an Elastic Cloud integration account. + # + # @see #get_elastic_cloud_integration_account_with_http_info + def get_elastic_cloud_integration_account(account_id, opts = {}) + data, _status_code, _headers = get_elastic_cloud_integration_account_with_http_info(account_id, opts) + data + end + + # Get an Elastic Cloud integration account. + # + # Get an Elastic Cloud integration account. + # + # @param account_id [String] Unique identifier of the integration account. + # @param opts [Hash] the optional parameters + # @return [Array<(ElasticCloudIntegrationAccountResponse, Integer, Hash)>] ElasticCloudIntegrationAccountResponse data, response status code and response headers + def get_elastic_cloud_integration_account_with_http_info(account_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_elastic_cloud_integration_account".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_elastic_cloud_integration_account") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_elastic_cloud_integration_account")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ElasticCloudIntegrationAccountsAPI.get_elastic_cloud_integration_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 ElasticCloudIntegrationAccountsAPI.get_elastic_cloud_integration_account" + end + # resource path + local_var_path = '/api/v2/integration-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] || 'ElasticCloudIntegrationAccountResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :get_elastic_cloud_integration_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: ElasticCloudIntegrationAccountsAPI#get_elastic_cloud_integration_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List Elastic Cloud integration accounts. + # + # @see #list_elastic_cloud_integration_accounts_with_http_info + def list_elastic_cloud_integration_accounts(opts = {}) + data, _status_code, _headers = list_elastic_cloud_integration_accounts_with_http_info(opts) + data + end + + # List Elastic Cloud integration accounts. + # + # List Elastic Cloud integration accounts. + # + # @param opts [Hash] the optional parameters + # @return [Array<(ElasticCloudIntegrationAccountsResponse, Integer, Hash)>] ElasticCloudIntegrationAccountsResponse data, response status code and response headers + def list_elastic_cloud_integration_accounts_with_http_info(opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_elastic_cloud_integration_accounts".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_elastic_cloud_integration_accounts") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_elastic_cloud_integration_accounts")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ElasticCloudIntegrationAccountsAPI.list_elastic_cloud_integration_accounts ...' + end + # resource path + local_var_path = '/api/v2/integration-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] || 'ElasticCloudIntegrationAccountsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :list_elastic_cloud_integration_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: ElasticCloudIntegrationAccountsAPI#list_elastic_cloud_integration_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Update an Elastic Cloud integration account. + # + # @see #update_elastic_cloud_integration_account_with_http_info + def update_elastic_cloud_integration_account(account_id, body, opts = {}) + data, _status_code, _headers = update_elastic_cloud_integration_account_with_http_info(account_id, body, opts) + data + end + + # Update an Elastic Cloud integration account. + # + # Update an Elastic Cloud integration account. Only the fields provided are changed. + # + # @param account_id [String] Unique identifier of the integration account. + # @param body [ElasticCloudIntegrationAccountUpdateRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(ElasticCloudIntegrationAccountResponse, Integer, Hash)>] ElasticCloudIntegrationAccountResponse data, response status code and response headers + def update_elastic_cloud_integration_account_with_http_info(account_id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.update_elastic_cloud_integration_account".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_elastic_cloud_integration_account") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_elastic_cloud_integration_account")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: ElasticCloudIntegrationAccountsAPI.update_elastic_cloud_integration_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 ElasticCloudIntegrationAccountsAPI.update_elastic_cloud_integration_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 ElasticCloudIntegrationAccountsAPI.update_elastic_cloud_integration_account" + end + # resource path + local_var_path = '/api/v2/integration-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] || 'ElasticCloudIntegrationAccountResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :update_elastic_cloud_integration_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: ElasticCloudIntegrationAccountsAPI#update_elastic_cloud_integration_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..84c0599c610b --- /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_integration_account_with_http_info + def create_twilio_integration_account(body, opts = {}) + data, _status_code, _headers = create_twilio_integration_account_with_http_info(body, opts) + data + end + + # Create a Twilio integration account. + # + # Create a Twilio integration account. + # + # @param body [TwilioIntegrationAccountCreateRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(TwilioIntegrationAccountResponse, Integer, Hash)>] TwilioIntegrationAccountResponse data, response status code and response headers + def create_twilio_integration_account_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.create_twilio_integration_account".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_twilio_integration_account") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_twilio_integration_account")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: TwilioIntegrationAccountsAPI.create_twilio_integration_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_integration_account" + end + # resource path + local_var_path = '/api/v2/integration-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] || 'TwilioIntegrationAccountResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :create_twilio_integration_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_integration_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_integration_account_with_http_info + def delete_twilio_integration_account(account_id, opts = {}) + delete_twilio_integration_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_integration_account_with_http_info(account_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.delete_twilio_integration_account".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_twilio_integration_account") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_twilio_integration_account")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: TwilioIntegrationAccountsAPI.delete_twilio_integration_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_integration_account" + end + # resource path + local_var_path = '/api/v2/integration-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_integration_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_integration_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_integration_account_with_http_info + def get_twilio_integration_account(account_id, opts = {}) + data, _status_code, _headers = get_twilio_integration_account_with_http_info(account_id, opts) + data + end + + # Get a Twilio integration account. + # + # Get a Twilio integration account. + # + # @param account_id [String] Unique identifier of the integration account. + # @param opts [Hash] the optional parameters + # @return [Array<(TwilioIntegrationAccountResponse, Integer, Hash)>] TwilioIntegrationAccountResponse data, response status code and response headers + def get_twilio_integration_account_with_http_info(account_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_twilio_integration_account".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_twilio_integration_account") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_twilio_integration_account")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: TwilioIntegrationAccountsAPI.get_twilio_integration_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_integration_account" + end + # resource path + local_var_path = '/api/v2/integration-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] || 'TwilioIntegrationAccountResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :get_twilio_integration_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_integration_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List Twilio integration accounts. + # + # @see #list_twilio_integration_accounts_with_http_info + def list_twilio_integration_accounts(opts = {}) + data, _status_code, _headers = list_twilio_integration_accounts_with_http_info(opts) + data + end + + # List Twilio integration accounts. + # + # List Twilio integration accounts. + # + # @param opts [Hash] the optional parameters + # @return [Array<(TwilioIntegrationAccountsResponse, Integer, Hash)>] TwilioIntegrationAccountsResponse data, response status code and response headers + def list_twilio_integration_accounts_with_http_info(opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_twilio_integration_accounts".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_twilio_integration_accounts") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_twilio_integration_accounts")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: TwilioIntegrationAccountsAPI.list_twilio_integration_accounts ...' + end + # resource path + local_var_path = '/api/v2/integration-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] || 'TwilioIntegrationAccountsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :list_twilio_integration_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_integration_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_integration_account_with_http_info + def update_twilio_integration_account(account_id, body, opts = {}) + data, _status_code, _headers = update_twilio_integration_account_with_http_info(account_id, body, opts) + data + end + + # Update a Twilio integration account. + # + # Update a Twilio integration account. Only the fields provided are changed. + # + # @param account_id [String] Unique identifier of the integration account. + # @param body [TwilioIntegrationAccountUpdateRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(TwilioIntegrationAccountResponse, Integer, Hash)>] TwilioIntegrationAccountResponse data, response status code and response headers + def update_twilio_integration_account_with_http_info(account_id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.update_twilio_integration_account".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_twilio_integration_account") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_twilio_integration_account")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: TwilioIntegrationAccountsAPI.update_twilio_integration_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_integration_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_integration_account" + end + # resource path + local_var_path = '/api/v2/integration-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] || 'TwilioIntegrationAccountResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :update_twilio_integration_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_integration_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_detailed_index_stats_integration_dataflow_request.rb b/lib/datadog_api_client/v2/models/elastic_cloud_detailed_index_stats_integration_dataflow_request.rb new file mode 100644 index 000000000000..a8ba74a30c05 --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_detailed_index_stats_integration_dataflow_request.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 + # The Elastic Cloud detailed index stats dataflow. + class ElasticCloudDetailedIndexStatsIntegrationDataflowRequest + include BaseGenericModel + + # Whether the Elastic Cloud dataflow is enabled. + attr_accessor :enabled + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'enabled' => :'enabled' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'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::ElasticCloudDetailedIndexStatsIntegrationDataflowRequest` 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 + 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 && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [enabled, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/elastic_cloud_detailed_index_stats_integration_dataflow_response.rb b/lib/datadog_api_client/v2/models/elastic_cloud_detailed_index_stats_integration_dataflow_response.rb new file mode 100644 index 000000000000..4626fb7dd4e9 --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_detailed_index_stats_integration_dataflow_response.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 + # The Elastic Cloud detailed index stats dataflow. + class ElasticCloudDetailedIndexStatsIntegrationDataflowResponse + include BaseGenericModel + + # Whether the Elastic Cloud dataflow is enabled. + attr_accessor :enabled + + # Read-only 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', + :'status' => :'status' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'Boolean', + :'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::ElasticCloudDetailedIndexStatsIntegrationDataflowResponse` 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?(:'status') + self.status = attributes[:'status'] + 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 && + enabled == o.enabled && + 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, status, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/elastic_cloud_index_stats_integration_dataflow_request.rb b/lib/datadog_api_client/v2/models/elastic_cloud_index_stats_integration_dataflow_request.rb new file mode 100644 index 000000000000..99d42a32b67c --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_index_stats_integration_dataflow_request.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 + # The Elastic Cloud index stats dataflow. + class ElasticCloudIndexStatsIntegrationDataflowRequest + include BaseGenericModel + + # Whether the Elastic Cloud dataflow is enabled. + attr_accessor :enabled + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'enabled' => :'enabled' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'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::ElasticCloudIndexStatsIntegrationDataflowRequest` 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 + 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 && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [enabled, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/elastic_cloud_index_stats_integration_dataflow_response.rb b/lib/datadog_api_client/v2/models/elastic_cloud_index_stats_integration_dataflow_response.rb new file mode 100644 index 000000000000..556e0cd636f7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_index_stats_integration_dataflow_response.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 + # The Elastic Cloud index stats dataflow. + class ElasticCloudIndexStatsIntegrationDataflowResponse + include BaseGenericModel + + # Whether the Elastic Cloud dataflow is enabled. + attr_accessor :enabled + + # Read-only 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', + :'status' => :'status' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'Boolean', + :'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::ElasticCloudIndexStatsIntegrationDataflowResponse` 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?(:'status') + self.status = attributes[:'status'] + 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 && + enabled == o.enabled && + 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, status, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/elastic_cloud_integration_account_authentication_request.rb b/lib/datadog_api_client/v2/models/elastic_cloud_integration_account_authentication_request.rb new file mode 100644 index 000000000000..9d97f198667e --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_integration_account_authentication_request.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 for creating the Elastic Cloud integration account. Exactly one method is set. + module ElasticCloudIntegrationAccountAuthenticationRequest + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'IntegrationAccountBasicAuthRequest' + ] + 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_integration_account_authentication_response.rb b/lib/datadog_api_client/v2/models/elastic_cloud_integration_account_authentication_response.rb new file mode 100644 index 000000000000..bbaf2353ab2f --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_integration_account_authentication_response.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 configured on the Elastic Cloud integration account. + module ElasticCloudIntegrationAccountAuthenticationResponse + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'IntegrationAccountBasicAuthResponse' + ] + 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_integration_account_authentication_update.rb b/lib/datadog_api_client/v2/models/elastic_cloud_integration_account_authentication_update.rb new file mode 100644 index 000000000000..1487d4448f6c --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_integration_account_authentication_update.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 for updating the Elastic Cloud integration account. Exactly one method is set. + module ElasticCloudIntegrationAccountAuthenticationUpdate + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'IntegrationAccountBasicAuthUpdate' + ] + 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_integration_account_create_attributes.rb b/lib/datadog_api_client/v2/models/elastic_cloud_integration_account_create_attributes.rb new file mode 100644 index 000000000000..7e547bd232e6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_integration_account_create_attributes.rb @@ -0,0 +1,175 @@ +=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 + # Writable attributes used to create an Elastic Cloud integration account. + class ElasticCloudIntegrationAccountCreateAttributes + include BaseGenericModel + + # Authentication for creating the Elastic Cloud integration account. Exactly one method is set. + attr_reader :authentication + + # Dataflows to configure on the Elastic Cloud integration account, keyed by dataflow id. + attr_accessor :dataflows + + # Human-readable name of the Elastic Cloud integration account. + attr_reader :name + + # Settings for creating the Elastic Cloud integration account. + attr_reader :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' => :'ElasticCloudIntegrationAccountAuthenticationRequest', + :'dataflows' => :'ElasticCloudIntegrationDataflowsRequest', + :'name' => :'String', + :'settings' => :'ElasticCloudIntegrationAccountSettingsRequest' + } + 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::ElasticCloudIntegrationAccountCreateAttributes` 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') + self.dataflows = attributes[:'dataflows'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + 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? + return false if @settings.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 + + # Custom attribute writer method with validation + # @param settings [Object] Object to be assigned + # @!visibility private + def settings=(settings) + if settings.nil? + fail ArgumentError, 'invalid value for "settings", settings cannot be nil.' + end + @settings = settings + 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_integration_account_create_data.rb b/lib/datadog_api_client/v2/models/elastic_cloud_integration_account_create_data.rb new file mode 100644 index 000000000000..0ad63894a63b --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_integration_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 integration account. + class ElasticCloudIntegrationAccountCreateData + include BaseGenericModel + + # Writable attributes used to create an Elastic Cloud integration account. + attr_reader :attributes + + # The type of the integration account resource. 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' => :'ElasticCloudIntegrationAccountCreateAttributes', + :'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::ElasticCloudIntegrationAccountCreateData` 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_integration_account_create_request.rb b/lib/datadog_api_client/v2/models/elastic_cloud_integration_account_create_request.rb new file mode 100644 index 000000000000..387ed1b14d2a --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_integration_account_create_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 integration account. + class ElasticCloudIntegrationAccountCreateRequest + include BaseGenericModel + + # Data envelope for creating an Elastic Cloud 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' => :'ElasticCloudIntegrationAccountCreateData' + } + 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::ElasticCloudIntegrationAccountCreateRequest` 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_integration_account_response.rb b/lib/datadog_api_client/v2/models/elastic_cloud_integration_account_response.rb new file mode 100644 index 000000000000..d0361daa8dc6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_integration_account_response.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 + # Response payload for a single Elastic Cloud integration account. + class ElasticCloudIntegrationAccountResponse + include BaseGenericModel + + # Data envelope of an Elastic Cloud integration account, including server-assigned identity. + 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' => :'ElasticCloudIntegrationAccountResponseData' + } + 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::ElasticCloudIntegrationAccountResponse` 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_integration_account_response_attributes.rb b/lib/datadog_api_client/v2/models/elastic_cloud_integration_account_response_attributes.rb new file mode 100644 index 000000000000..789f21669e00 --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_integration_account_response_attributes.rb @@ -0,0 +1,164 @@ +=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 integration account returned in responses. + class ElasticCloudIntegrationAccountResponseAttributes + include BaseGenericModel + + # Authentication configured on the Elastic Cloud integration account. + attr_accessor :authentication + + # Dataflows configured on the Elastic Cloud integration account, keyed by dataflow id. + attr_accessor :dataflows + + # Human-readable name of the Elastic Cloud integration account. + attr_reader :name + + # Settings configured on the Elastic Cloud integration account. + attr_reader :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' => :'ElasticCloudIntegrationAccountAuthenticationResponse', + :'dataflows' => :'ElasticCloudIntegrationDataflowsResponse', + :'name' => :'String', + :'settings' => :'ElasticCloudIntegrationAccountSettingsResponse' + } + 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::ElasticCloudIntegrationAccountResponseAttributes` 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') + self.dataflows = attributes[:'dataflows'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + 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 @name.nil? + return false if @settings.nil? + true + 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 + + # Custom attribute writer method with validation + # @param settings [Object] Object to be assigned + # @!visibility private + def settings=(settings) + if settings.nil? + fail ArgumentError, 'invalid value for "settings", settings cannot be nil.' + end + @settings = settings + 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_integration_account_response_data.rb b/lib/datadog_api_client/v2/models/elastic_cloud_integration_account_response_data.rb new file mode 100644 index 000000000000..da5afb30e13f --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_integration_account_response_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 integration account, including server-assigned identity. + class ElasticCloudIntegrationAccountResponseData + include BaseGenericModel + + # Attributes of an Elastic Cloud integration account returned in responses. + attr_reader :attributes + + # Server-generated unique identifier of the Elastic Cloud integration account. + attr_reader :id + + # The type of the integration account resource. 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' => :'ElasticCloudIntegrationAccountResponseAttributes', + :'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::ElasticCloudIntegrationAccountResponseData` 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_integration_account_settings_request.rb b/lib/datadog_api_client/v2/models/elastic_cloud_integration_account_settings_request.rb new file mode 100644 index 000000000000..89505679006d --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_integration_account_settings_request.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 + # Settings for creating the Elastic Cloud integration account. + class ElasticCloudIntegrationAccountSettingsRequest + include BaseGenericModel + + # Comma-separated list of custom tags for this Elastic Cloud deployment. + attr_accessor :tags + + # Elastic Cloud 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 + { + :'tags' => :'tags', + :'url' => :'url' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'tags' => :'String', + :'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::ElasticCloudIntegrationAccountSettingsRequest` 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?(:'tags') + self.tags = attributes[:'tags'] + 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 && + 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 + [tags, url, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/elastic_cloud_integration_account_settings_response.rb b/lib/datadog_api_client/v2/models/elastic_cloud_integration_account_settings_response.rb new file mode 100644 index 000000000000..3279846d0386 --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_integration_account_settings_response.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 + # Settings configured on the Elastic Cloud integration account. + class ElasticCloudIntegrationAccountSettingsResponse + include BaseGenericModel + + # Comma-separated list of custom tags for this Elastic Cloud deployment. + attr_accessor :tags + + # Elastic Cloud 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 + { + :'tags' => :'tags', + :'url' => :'url' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'tags' => :'String', + :'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::ElasticCloudIntegrationAccountSettingsResponse` 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?(:'tags') + self.tags = attributes[:'tags'] + 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 && + 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 + [tags, url, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/elastic_cloud_integration_account_settings_update.rb b/lib/datadog_api_client/v2/models/elastic_cloud_integration_account_settings_update.rb new file mode 100644 index 000000000000..ed851d0e395d --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_integration_account_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 + # Settings for updating the Elastic Cloud integration account. Only the fields provided are changed. + class ElasticCloudIntegrationAccountSettingsUpdate + include BaseGenericModel + + # Comma-separated list of custom tags for this Elastic Cloud deployment. + attr_accessor :tags + + # Elastic Cloud 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 + { + :'tags' => :'tags', + :'url' => :'url' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'tags' => :'String', + :'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::ElasticCloudIntegrationAccountSettingsUpdate` 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?(:'tags') + self.tags = attributes[:'tags'] + 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 && + 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 + [tags, url, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/elastic_cloud_integration_account_update_attributes.rb b/lib/datadog_api_client/v2/models/elastic_cloud_integration_account_update_attributes.rb new file mode 100644 index 000000000000..21ddd3460f51 --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_integration_account_update_attributes.rb @@ -0,0 +1,135 @@ +=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 + # Writable attributes used to update an Elastic Cloud integration account. Every field is optional; only the fields provided are changed. When `dataflows` is provided, only the dataflow ids included in the request are modified; dataflows omitted from the map keep their current configuration. + class ElasticCloudIntegrationAccountUpdateAttributes + include BaseGenericModel + + # Authentication for updating the Elastic Cloud integration account. Exactly one method is set. + attr_accessor :authentication + + # Dataflows to configure on the Elastic Cloud integration account, keyed by dataflow id. + attr_accessor :dataflows + + # Human-readable name of the Elastic Cloud integration account. + attr_accessor :name + + # Settings for updating the Elastic Cloud integration account. Only the fields provided are changed. + 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' => :'ElasticCloudIntegrationAccountAuthenticationUpdate', + :'dataflows' => :'ElasticCloudIntegrationDataflowsRequest', + :'name' => :'String', + :'settings' => :'ElasticCloudIntegrationAccountSettingsUpdate' + } + 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::ElasticCloudIntegrationAccountUpdateAttributes` 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') + self.dataflows = attributes[:'dataflows'] + 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_integration_account_update_data.rb b/lib/datadog_api_client/v2/models/elastic_cloud_integration_account_update_data.rb new file mode 100644 index 000000000000..72862620ced0 --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_integration_account_update_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 for updating an Elastic Cloud integration account. + class ElasticCloudIntegrationAccountUpdateData + include BaseGenericModel + + # Writable attributes used to update an Elastic Cloud integration account. Every field is optional; only the fields provided are changed. When `dataflows` is provided, only the dataflow ids included in the request are modified; dataflows omitted from the map keep their current configuration. + attr_reader :attributes + + # Unique identifier of the Elastic Cloud integration account to update. + attr_reader :id + + # The type of the integration account resource. 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' => :'ElasticCloudIntegrationAccountUpdateAttributes', + :'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::ElasticCloudIntegrationAccountUpdateData` 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_integration_account_update_request.rb b/lib/datadog_api_client/v2/models/elastic_cloud_integration_account_update_request.rb new file mode 100644 index 000000000000..f17abaaf211c --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_integration_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 integration account. + class ElasticCloudIntegrationAccountUpdateRequest + include BaseGenericModel + + # Data envelope for updating an Elastic Cloud 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' => :'ElasticCloudIntegrationAccountUpdateData' + } + 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::ElasticCloudIntegrationAccountUpdateRequest` 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_integration_accounts_response.rb b/lib/datadog_api_client/v2/models/elastic_cloud_integration_accounts_response.rb new file mode 100644 index 000000000000..9224d97a30ec --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_integration_accounts_response.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 + # Response payload for a list of Elastic Cloud integration accounts. + class ElasticCloudIntegrationAccountsResponse + include BaseGenericModel + + # List of Elastic Cloud integration accounts. + 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' => :'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::ElasticCloudIntegrationAccountsResponse` 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 + + # 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_integration_dataflows_request.rb b/lib/datadog_api_client/v2/models/elastic_cloud_integration_dataflows_request.rb new file mode 100644 index 000000000000..4c1312d737ec --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_integration_dataflows_request.rb @@ -0,0 +1,140 @@ +=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 + # Dataflows to configure on the Elastic Cloud integration account, keyed by dataflow id. + class ElasticCloudIntegrationDataflowsRequest + include BaseGenericModel + + # The Elastic Cloud detailed index stats dataflow. + attr_accessor :elastic_cloud_detailed_index_stats + + # The Elastic Cloud index stats dataflow. + attr_accessor :elastic_cloud_index_stats + + # The Elastic Cloud pending task stats dataflow. + attr_accessor :elastic_cloud_pending_task_stats + + # The Elastic Cloud primary shard graceful timeout dataflow. + attr_accessor :elastic_cloud_primary_shard_graceful_timeout + + # The Elastic Cloud primary shard stats dataflow. + attr_accessor :elastic_cloud_primary_shard_stats + + # The Elastic Cloud shard allocation stats dataflow. + attr_accessor :elastic_cloud_shard_allocation_stats + + # The Elastic Cloud snapshot lifecycle management stats dataflow. + attr_accessor :elastic_cloud_slm_stats + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'elastic_cloud_detailed_index_stats' => :'elastic-cloud-detailed-index-stats', + :'elastic_cloud_index_stats' => :'elastic-cloud-index-stats', + :'elastic_cloud_pending_task_stats' => :'elastic-cloud-pending-task-stats', + :'elastic_cloud_primary_shard_graceful_timeout' => :'elastic-cloud-primary-shard-graceful-timeout', + :'elastic_cloud_primary_shard_stats' => :'elastic-cloud-primary-shard-stats', + :'elastic_cloud_shard_allocation_stats' => :'elastic-cloud-shard-allocation-stats', + :'elastic_cloud_slm_stats' => :'elastic-cloud-slm-stats' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'elastic_cloud_detailed_index_stats' => :'ElasticCloudDetailedIndexStatsIntegrationDataflowRequest', + :'elastic_cloud_index_stats' => :'ElasticCloudIndexStatsIntegrationDataflowRequest', + :'elastic_cloud_pending_task_stats' => :'ElasticCloudPendingTaskStatsIntegrationDataflowRequest', + :'elastic_cloud_primary_shard_graceful_timeout' => :'ElasticCloudPrimaryShardGracefulTimeoutIntegrationDataflowRequest', + :'elastic_cloud_primary_shard_stats' => :'ElasticCloudPrimaryShardStatsIntegrationDataflowRequest', + :'elastic_cloud_shard_allocation_stats' => :'ElasticCloudShardAllocationStatsIntegrationDataflowRequest', + :'elastic_cloud_slm_stats' => :'ElasticCloudSlmStatsIntegrationDataflowRequest' + } + 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::ElasticCloudIntegrationDataflowsRequest` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ElasticCloudIntegrationDataflowsRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'elastic_cloud_detailed_index_stats') + self.elastic_cloud_detailed_index_stats = attributes[:'elastic_cloud_detailed_index_stats'] + end + + if attributes.key?(:'elastic_cloud_index_stats') + self.elastic_cloud_index_stats = attributes[:'elastic_cloud_index_stats'] + end + + if attributes.key?(:'elastic_cloud_pending_task_stats') + self.elastic_cloud_pending_task_stats = attributes[:'elastic_cloud_pending_task_stats'] + end + + if attributes.key?(:'elastic_cloud_primary_shard_graceful_timeout') + self.elastic_cloud_primary_shard_graceful_timeout = attributes[:'elastic_cloud_primary_shard_graceful_timeout'] + end + + if attributes.key?(:'elastic_cloud_primary_shard_stats') + self.elastic_cloud_primary_shard_stats = attributes[:'elastic_cloud_primary_shard_stats'] + end + + if attributes.key?(:'elastic_cloud_shard_allocation_stats') + self.elastic_cloud_shard_allocation_stats = attributes[:'elastic_cloud_shard_allocation_stats'] + end + + if attributes.key?(:'elastic_cloud_slm_stats') + self.elastic_cloud_slm_stats = attributes[:'elastic_cloud_slm_stats'] + end + 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_cloud_detailed_index_stats == o.elastic_cloud_detailed_index_stats && + elastic_cloud_index_stats == o.elastic_cloud_index_stats && + elastic_cloud_pending_task_stats == o.elastic_cloud_pending_task_stats && + elastic_cloud_primary_shard_graceful_timeout == o.elastic_cloud_primary_shard_graceful_timeout && + elastic_cloud_primary_shard_stats == o.elastic_cloud_primary_shard_stats && + elastic_cloud_shard_allocation_stats == o.elastic_cloud_shard_allocation_stats && + elastic_cloud_slm_stats == o.elastic_cloud_slm_stats + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [elastic_cloud_detailed_index_stats, elastic_cloud_index_stats, elastic_cloud_pending_task_stats, elastic_cloud_primary_shard_graceful_timeout, elastic_cloud_primary_shard_stats, elastic_cloud_shard_allocation_stats, elastic_cloud_slm_stats].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/elastic_cloud_integration_dataflows_response.rb b/lib/datadog_api_client/v2/models/elastic_cloud_integration_dataflows_response.rb new file mode 100644 index 000000000000..a0b69ce4b4e5 --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_integration_dataflows_response.rb @@ -0,0 +1,150 @@ +=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 + # Dataflows configured on the Elastic Cloud integration account, keyed by dataflow id. + class ElasticCloudIntegrationDataflowsResponse + include BaseGenericModel + + # The Elastic Cloud detailed index stats dataflow. + attr_accessor :elastic_cloud_detailed_index_stats + + # The Elastic Cloud index stats dataflow. + attr_accessor :elastic_cloud_index_stats + + # The Elastic Cloud metrics dataflow. + attr_accessor :elastic_cloud_metrics + + # The Elastic Cloud pending task stats dataflow. + attr_accessor :elastic_cloud_pending_task_stats + + # The Elastic Cloud primary shard graceful timeout dataflow. + attr_accessor :elastic_cloud_primary_shard_graceful_timeout + + # The Elastic Cloud primary shard stats dataflow. + attr_accessor :elastic_cloud_primary_shard_stats + + # The Elastic Cloud shard allocation stats dataflow. + attr_accessor :elastic_cloud_shard_allocation_stats + + # The Elastic Cloud snapshot lifecycle management stats dataflow. + attr_accessor :elastic_cloud_slm_stats + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'elastic_cloud_detailed_index_stats' => :'elastic-cloud-detailed-index-stats', + :'elastic_cloud_index_stats' => :'elastic-cloud-index-stats', + :'elastic_cloud_metrics' => :'elastic-cloud-metrics', + :'elastic_cloud_pending_task_stats' => :'elastic-cloud-pending-task-stats', + :'elastic_cloud_primary_shard_graceful_timeout' => :'elastic-cloud-primary-shard-graceful-timeout', + :'elastic_cloud_primary_shard_stats' => :'elastic-cloud-primary-shard-stats', + :'elastic_cloud_shard_allocation_stats' => :'elastic-cloud-shard-allocation-stats', + :'elastic_cloud_slm_stats' => :'elastic-cloud-slm-stats' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'elastic_cloud_detailed_index_stats' => :'ElasticCloudDetailedIndexStatsIntegrationDataflowResponse', + :'elastic_cloud_index_stats' => :'ElasticCloudIndexStatsIntegrationDataflowResponse', + :'elastic_cloud_metrics' => :'ElasticCloudMetricsIntegrationDataflowResponse', + :'elastic_cloud_pending_task_stats' => :'ElasticCloudPendingTaskStatsIntegrationDataflowResponse', + :'elastic_cloud_primary_shard_graceful_timeout' => :'ElasticCloudPrimaryShardGracefulTimeoutIntegrationDataflowResponse', + :'elastic_cloud_primary_shard_stats' => :'ElasticCloudPrimaryShardStatsIntegrationDataflowResponse', + :'elastic_cloud_shard_allocation_stats' => :'ElasticCloudShardAllocationStatsIntegrationDataflowResponse', + :'elastic_cloud_slm_stats' => :'ElasticCloudSlmStatsIntegrationDataflowResponse' + } + 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::ElasticCloudIntegrationDataflowsResponse` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::ElasticCloudIntegrationDataflowsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'elastic_cloud_detailed_index_stats') + self.elastic_cloud_detailed_index_stats = attributes[:'elastic_cloud_detailed_index_stats'] + end + + if attributes.key?(:'elastic_cloud_index_stats') + self.elastic_cloud_index_stats = attributes[:'elastic_cloud_index_stats'] + end + + if attributes.key?(:'elastic_cloud_metrics') + self.elastic_cloud_metrics = attributes[:'elastic_cloud_metrics'] + end + + if attributes.key?(:'elastic_cloud_pending_task_stats') + self.elastic_cloud_pending_task_stats = attributes[:'elastic_cloud_pending_task_stats'] + end + + if attributes.key?(:'elastic_cloud_primary_shard_graceful_timeout') + self.elastic_cloud_primary_shard_graceful_timeout = attributes[:'elastic_cloud_primary_shard_graceful_timeout'] + end + + if attributes.key?(:'elastic_cloud_primary_shard_stats') + self.elastic_cloud_primary_shard_stats = attributes[:'elastic_cloud_primary_shard_stats'] + end + + if attributes.key?(:'elastic_cloud_shard_allocation_stats') + self.elastic_cloud_shard_allocation_stats = attributes[:'elastic_cloud_shard_allocation_stats'] + end + + if attributes.key?(:'elastic_cloud_slm_stats') + self.elastic_cloud_slm_stats = attributes[:'elastic_cloud_slm_stats'] + end + 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_cloud_detailed_index_stats == o.elastic_cloud_detailed_index_stats && + elastic_cloud_index_stats == o.elastic_cloud_index_stats && + elastic_cloud_metrics == o.elastic_cloud_metrics && + elastic_cloud_pending_task_stats == o.elastic_cloud_pending_task_stats && + elastic_cloud_primary_shard_graceful_timeout == o.elastic_cloud_primary_shard_graceful_timeout && + elastic_cloud_primary_shard_stats == o.elastic_cloud_primary_shard_stats && + elastic_cloud_shard_allocation_stats == o.elastic_cloud_shard_allocation_stats && + elastic_cloud_slm_stats == o.elastic_cloud_slm_stats + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [elastic_cloud_detailed_index_stats, elastic_cloud_index_stats, elastic_cloud_metrics, elastic_cloud_pending_task_stats, elastic_cloud_primary_shard_graceful_timeout, elastic_cloud_primary_shard_stats, elastic_cloud_shard_allocation_stats, elastic_cloud_slm_stats].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/elastic_cloud_metrics_integration_dataflow_response.rb b/lib/datadog_api_client/v2/models/elastic_cloud_metrics_integration_dataflow_response.rb new file mode 100644 index 000000000000..12f1bb56977e --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_metrics_integration_dataflow_response.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 + # The Elastic Cloud metrics dataflow. + class ElasticCloudMetricsIntegrationDataflowResponse + include BaseGenericModel + + # Whether the Elastic Cloud dataflow is enabled. + attr_accessor :enabled + + # Read-only 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', + :'status' => :'status' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'Boolean', + :'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::ElasticCloudMetricsIntegrationDataflowResponse` 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?(:'status') + self.status = attributes[:'status'] + 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 && + enabled == o.enabled && + 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, status, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/elastic_cloud_pending_task_stats_integration_dataflow_request.rb b/lib/datadog_api_client/v2/models/elastic_cloud_pending_task_stats_integration_dataflow_request.rb new file mode 100644 index 000000000000..2e6e24184976 --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_pending_task_stats_integration_dataflow_request.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 + # The Elastic Cloud pending task stats dataflow. + class ElasticCloudPendingTaskStatsIntegrationDataflowRequest + include BaseGenericModel + + # Whether the Elastic Cloud dataflow is enabled. + attr_accessor :enabled + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'enabled' => :'enabled' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'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::ElasticCloudPendingTaskStatsIntegrationDataflowRequest` 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 + 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 && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [enabled, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/elastic_cloud_pending_task_stats_integration_dataflow_response.rb b/lib/datadog_api_client/v2/models/elastic_cloud_pending_task_stats_integration_dataflow_response.rb new file mode 100644 index 000000000000..d2ddb6a37c23 --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_pending_task_stats_integration_dataflow_response.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 + # The Elastic Cloud pending task stats dataflow. + class ElasticCloudPendingTaskStatsIntegrationDataflowResponse + include BaseGenericModel + + # Whether the Elastic Cloud dataflow is enabled. + attr_accessor :enabled + + # Read-only 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', + :'status' => :'status' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'Boolean', + :'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::ElasticCloudPendingTaskStatsIntegrationDataflowResponse` 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?(:'status') + self.status = attributes[:'status'] + 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 && + enabled == o.enabled && + 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, status, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/elastic_cloud_primary_shard_graceful_timeout_integration_dataflow_request.rb b/lib/datadog_api_client/v2/models/elastic_cloud_primary_shard_graceful_timeout_integration_dataflow_request.rb new file mode 100644 index 000000000000..196008351943 --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_primary_shard_graceful_timeout_integration_dataflow_request.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 + # The Elastic Cloud primary shard graceful timeout dataflow. + class ElasticCloudPrimaryShardGracefulTimeoutIntegrationDataflowRequest + include BaseGenericModel + + # Whether the Elastic Cloud dataflow is enabled. + attr_accessor :enabled + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'enabled' => :'enabled' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'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::ElasticCloudPrimaryShardGracefulTimeoutIntegrationDataflowRequest` 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 + 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 && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [enabled, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/elastic_cloud_primary_shard_graceful_timeout_integration_dataflow_response.rb b/lib/datadog_api_client/v2/models/elastic_cloud_primary_shard_graceful_timeout_integration_dataflow_response.rb new file mode 100644 index 000000000000..65d7dadc41ee --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_primary_shard_graceful_timeout_integration_dataflow_response.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 + # The Elastic Cloud primary shard graceful timeout dataflow. + class ElasticCloudPrimaryShardGracefulTimeoutIntegrationDataflowResponse + include BaseGenericModel + + # Whether the Elastic Cloud dataflow is enabled. + attr_accessor :enabled + + # Read-only 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', + :'status' => :'status' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'Boolean', + :'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::ElasticCloudPrimaryShardGracefulTimeoutIntegrationDataflowResponse` 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?(:'status') + self.status = attributes[:'status'] + 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 && + enabled == o.enabled && + 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, status, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/elastic_cloud_primary_shard_stats_integration_dataflow_request.rb b/lib/datadog_api_client/v2/models/elastic_cloud_primary_shard_stats_integration_dataflow_request.rb new file mode 100644 index 000000000000..2d8ec052c1be --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_primary_shard_stats_integration_dataflow_request.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 + # The Elastic Cloud primary shard stats dataflow. + class ElasticCloudPrimaryShardStatsIntegrationDataflowRequest + include BaseGenericModel + + # Whether the Elastic Cloud dataflow is enabled. + attr_accessor :enabled + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'enabled' => :'enabled' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'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::ElasticCloudPrimaryShardStatsIntegrationDataflowRequest` 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 + 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 && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [enabled, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/elastic_cloud_primary_shard_stats_integration_dataflow_response.rb b/lib/datadog_api_client/v2/models/elastic_cloud_primary_shard_stats_integration_dataflow_response.rb new file mode 100644 index 000000000000..d1ffb08bfbfe --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_primary_shard_stats_integration_dataflow_response.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 + # The Elastic Cloud primary shard stats dataflow. + class ElasticCloudPrimaryShardStatsIntegrationDataflowResponse + include BaseGenericModel + + # Whether the Elastic Cloud dataflow is enabled. + attr_accessor :enabled + + # Read-only 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', + :'status' => :'status' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'Boolean', + :'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::ElasticCloudPrimaryShardStatsIntegrationDataflowResponse` 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?(:'status') + self.status = attributes[:'status'] + 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 && + enabled == o.enabled && + 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, status, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/elastic_cloud_shard_allocation_stats_integration_dataflow_request.rb b/lib/datadog_api_client/v2/models/elastic_cloud_shard_allocation_stats_integration_dataflow_request.rb new file mode 100644 index 000000000000..821117d4001e --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_shard_allocation_stats_integration_dataflow_request.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 + # The Elastic Cloud shard allocation stats dataflow. + class ElasticCloudShardAllocationStatsIntegrationDataflowRequest + include BaseGenericModel + + # Whether the Elastic Cloud dataflow is enabled. + attr_accessor :enabled + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'enabled' => :'enabled' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'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::ElasticCloudShardAllocationStatsIntegrationDataflowRequest` 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 + 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 && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [enabled, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/elastic_cloud_shard_allocation_stats_integration_dataflow_response.rb b/lib/datadog_api_client/v2/models/elastic_cloud_shard_allocation_stats_integration_dataflow_response.rb new file mode 100644 index 000000000000..751772891257 --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_shard_allocation_stats_integration_dataflow_response.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 + # The Elastic Cloud shard allocation stats dataflow. + class ElasticCloudShardAllocationStatsIntegrationDataflowResponse + include BaseGenericModel + + # Whether the Elastic Cloud dataflow is enabled. + attr_accessor :enabled + + # Read-only 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', + :'status' => :'status' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'Boolean', + :'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::ElasticCloudShardAllocationStatsIntegrationDataflowResponse` 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?(:'status') + self.status = attributes[:'status'] + 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 && + enabled == o.enabled && + 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, status, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/elastic_cloud_slm_stats_integration_dataflow_request.rb b/lib/datadog_api_client/v2/models/elastic_cloud_slm_stats_integration_dataflow_request.rb new file mode 100644 index 000000000000..d63273a12512 --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_slm_stats_integration_dataflow_request.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 + # The Elastic Cloud snapshot lifecycle management stats dataflow. + class ElasticCloudSlmStatsIntegrationDataflowRequest + include BaseGenericModel + + # Whether the Elastic Cloud dataflow is enabled. + attr_accessor :enabled + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'enabled' => :'enabled' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'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::ElasticCloudSlmStatsIntegrationDataflowRequest` 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 + 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 && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [enabled, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/elastic_cloud_slm_stats_integration_dataflow_response.rb b/lib/datadog_api_client/v2/models/elastic_cloud_slm_stats_integration_dataflow_response.rb new file mode 100644 index 000000000000..5c925d94534d --- /dev/null +++ b/lib/datadog_api_client/v2/models/elastic_cloud_slm_stats_integration_dataflow_response.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 + # The Elastic Cloud snapshot lifecycle management stats dataflow. + class ElasticCloudSlmStatsIntegrationDataflowResponse + include BaseGenericModel + + # Whether the Elastic Cloud dataflow is enabled. + attr_accessor :enabled + + # Read-only 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', + :'status' => :'status' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'Boolean', + :'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::ElasticCloudSlmStatsIntegrationDataflowResponse` 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?(:'status') + self.status = attributes[:'status'] + 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 && + enabled == o.enabled && + 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, status, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/integration_account_basic_auth_request.rb b/lib/datadog_api_client/v2/models/integration_account_basic_auth_request.rb new file mode 100644 index 000000000000..bd4c22ebda28 --- /dev/null +++ b/lib/datadog_api_client/v2/models/integration_account_basic_auth_request.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 and password authentication. + class IntegrationAccountBasicAuthRequest + include BaseGenericModel + + # The authentication method type. + attr_reader :auth_type + + # Secret password or private key. + attr_reader :password + + # Non-secret username or public identifier for the credential pair. + attr_reader :username + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'auth_type' => :'auth_type', + :'password' => :'password', + :'username' => :'username' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'auth_type' => :'IntegrationAccountBasicAuthType', + :'password' => :'String', + :'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::IntegrationAccountBasicAuthRequest` 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?(:'auth_type') + self.auth_type = attributes[:'auth_type'] + end + + if attributes.key?(:'password') + self.password = attributes[:'password'] + 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 @auth_type.nil? + return false if @password.nil? + return false if @username.nil? + true + end + + # Custom attribute writer method with validation + # @param auth_type [Object] Object to be assigned + # @!visibility private + def auth_type=(auth_type) + if auth_type.nil? + fail ArgumentError, 'invalid value for "auth_type", auth_type cannot be nil.' + end + @auth_type = auth_type + 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 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 && + auth_type == o.auth_type && + password == o.password && + username == o.username && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [auth_type, password, username, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/integration_account_basic_auth_response.rb b/lib/datadog_api_client/v2/models/integration_account_basic_auth_response.rb new file mode 100644 index 000000000000..8424a187d7fe --- /dev/null +++ b/lib/datadog_api_client/v2/models/integration_account_basic_auth_response.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 + # The basic authentication method and username configured on the account. + class IntegrationAccountBasicAuthResponse + include BaseGenericModel + + # The authentication method type. + attr_reader :auth_type + + # Non-secret username or public identifier for the credential pair. + attr_reader :username + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'auth_type' => :'auth_type', + :'username' => :'username' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'auth_type' => :'IntegrationAccountBasicAuthType', + :'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::IntegrationAccountBasicAuthResponse` 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?(:'auth_type') + self.auth_type = attributes[:'auth_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 @auth_type.nil? + return false if @username.nil? + true + end + + # Custom attribute writer method with validation + # @param auth_type [Object] Object to be assigned + # @!visibility private + def auth_type=(auth_type) + if auth_type.nil? + fail ArgumentError, 'invalid value for "auth_type", auth_type cannot be nil.' + end + @auth_type = auth_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 && + auth_type == o.auth_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 + [auth_type, username, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/integration_account_basic_auth_type.rb b/lib/datadog_api_client/v2/models/integration_account_basic_auth_type.rb new file mode 100644 index 000000000000..cf3d37d38feb --- /dev/null +++ b/lib/datadog_api_client/v2/models/integration_account_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 + # The authentication method type. + class IntegrationAccountBasicAuthType + include BaseEnumModel + + BASIC = "basic".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/integration_account_basic_auth_update.rb b/lib/datadog_api_client/v2/models/integration_account_basic_auth_update.rb new file mode 100644 index 000000000000..fdf5f7f44bc9 --- /dev/null +++ b/lib/datadog_api_client/v2/models/integration_account_basic_auth_update.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 + # Username and password authentication. Only the fields provided are changed; omit `password` to keep the stored one. + class IntegrationAccountBasicAuthUpdate + include BaseGenericModel + + # The authentication method type. + attr_reader :auth_type + + # Secret password or private key. + attr_accessor :password + + # Non-secret username or public identifier for the credential pair. + attr_accessor :username + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'auth_type' => :'auth_type', + :'password' => :'password', + :'username' => :'username' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'auth_type' => :'IntegrationAccountBasicAuthType', + :'password' => :'String', + :'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::IntegrationAccountBasicAuthUpdate` 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?(:'auth_type') + self.auth_type = attributes[:'auth_type'] + end + + if attributes.key?(:'password') + self.password = attributes[:'password'] + 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 @auth_type.nil? + true + end + + # Custom attribute writer method with validation + # @param auth_type [Object] Object to be assigned + # @!visibility private + def auth_type=(auth_type) + if auth_type.nil? + fail ArgumentError, 'invalid value for "auth_type", auth_type cannot be nil.' + end + @auth_type = auth_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 && + auth_type == o.auth_type && + password == o.password && + username == o.username && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [auth_type, password, username, 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..26460c7db355 --- /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 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_type.rb b/lib/datadog_api_client/v2/models/integration_account_type.rb new file mode 100644 index 000000000000..67dbd586d202 --- /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 + # The type of the integration account resource. Always `integration-account`. + class IntegrationAccountType + include BaseEnumModel + + INTEGRATION_ACCOUNT = "integration-account".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/twilio_alerts_logs_integration_dataflow_request.rb b/lib/datadog_api_client/v2/models/twilio_alerts_logs_integration_dataflow_request.rb new file mode 100644 index 000000000000..5c796fb41d9b --- /dev/null +++ b/lib/datadog_api_client/v2/models/twilio_alerts_logs_integration_dataflow_request.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 + # The Twilio alerts logs dataflow. + class TwilioAlertsLogsIntegrationDataflowRequest + include BaseGenericModel + + # Whether the Twilio dataflow is enabled. + attr_accessor :enabled + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'enabled' => :'enabled' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'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::TwilioAlertsLogsIntegrationDataflowRequest` 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 + 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 && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [enabled, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/twilio_alerts_logs_integration_dataflow_response.rb b/lib/datadog_api_client/v2/models/twilio_alerts_logs_integration_dataflow_response.rb new file mode 100644 index 000000000000..34269a3f372f --- /dev/null +++ b/lib/datadog_api_client/v2/models/twilio_alerts_logs_integration_dataflow_response.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 + # The Twilio alerts logs dataflow. + class TwilioAlertsLogsIntegrationDataflowResponse + include BaseGenericModel + + # Whether the Twilio dataflow is enabled. + attr_accessor :enabled + + # Read-only 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', + :'status' => :'status' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'Boolean', + :'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::TwilioAlertsLogsIntegrationDataflowResponse` 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?(:'status') + self.status = attributes[:'status'] + 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 && + enabled == o.enabled && + 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, status, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/twilio_call_summaries_logs_integration_dataflow_request.rb b/lib/datadog_api_client/v2/models/twilio_call_summaries_logs_integration_dataflow_request.rb new file mode 100644 index 000000000000..57ad7283a2e6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/twilio_call_summaries_logs_integration_dataflow_request.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 + # The Twilio call summaries logs dataflow. + class TwilioCallSummariesLogsIntegrationDataflowRequest + include BaseGenericModel + + # Whether the Twilio dataflow is enabled. + attr_accessor :enabled + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'enabled' => :'enabled' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'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::TwilioCallSummariesLogsIntegrationDataflowRequest` 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 + 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 && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [enabled, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/twilio_call_summaries_logs_integration_dataflow_response.rb b/lib/datadog_api_client/v2/models/twilio_call_summaries_logs_integration_dataflow_response.rb new file mode 100644 index 000000000000..a00f244bb6f4 --- /dev/null +++ b/lib/datadog_api_client/v2/models/twilio_call_summaries_logs_integration_dataflow_response.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 + # The Twilio call summaries logs dataflow. + class TwilioCallSummariesLogsIntegrationDataflowResponse + include BaseGenericModel + + # Whether the Twilio dataflow is enabled. + attr_accessor :enabled + + # Read-only 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', + :'status' => :'status' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'Boolean', + :'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::TwilioCallSummariesLogsIntegrationDataflowResponse` 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?(:'status') + self.status = attributes[:'status'] + 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 && + enabled == o.enabled && + 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, status, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/twilio_cloud_cost_metrics_integration_dataflow_request.rb b/lib/datadog_api_client/v2/models/twilio_cloud_cost_metrics_integration_dataflow_request.rb new file mode 100644 index 000000000000..41731b20d5af --- /dev/null +++ b/lib/datadog_api_client/v2/models/twilio_cloud_cost_metrics_integration_dataflow_request.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 + # The Twilio cloud cost metrics dataflow. + class TwilioCloudCostMetricsIntegrationDataflowRequest + include BaseGenericModel + + # Whether the Twilio dataflow is enabled. + attr_accessor :enabled + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'enabled' => :'enabled' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'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::TwilioCloudCostMetricsIntegrationDataflowRequest` 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 + 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 && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [enabled, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/twilio_cloud_cost_metrics_integration_dataflow_response.rb b/lib/datadog_api_client/v2/models/twilio_cloud_cost_metrics_integration_dataflow_response.rb new file mode 100644 index 000000000000..d42134f79b15 --- /dev/null +++ b/lib/datadog_api_client/v2/models/twilio_cloud_cost_metrics_integration_dataflow_response.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 + # The Twilio cloud cost metrics dataflow. + class TwilioCloudCostMetricsIntegrationDataflowResponse + include BaseGenericModel + + # Whether the Twilio dataflow is enabled. + attr_accessor :enabled + + # Read-only 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', + :'status' => :'status' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'Boolean', + :'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::TwilioCloudCostMetricsIntegrationDataflowResponse` 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?(:'status') + self.status = attributes[:'status'] + 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 && + enabled == o.enabled && + 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, status, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/twilio_events_logs_integration_dataflow_request.rb b/lib/datadog_api_client/v2/models/twilio_events_logs_integration_dataflow_request.rb new file mode 100644 index 000000000000..6dcca9bfb608 --- /dev/null +++ b/lib/datadog_api_client/v2/models/twilio_events_logs_integration_dataflow_request.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 + # The Twilio events logs dataflow. + class TwilioEventsLogsIntegrationDataflowRequest + include BaseGenericModel + + # Whether the Twilio dataflow is enabled. + attr_accessor :enabled + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'enabled' => :'enabled' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'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::TwilioEventsLogsIntegrationDataflowRequest` 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 + 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 && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [enabled, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/twilio_events_logs_integration_dataflow_response.rb b/lib/datadog_api_client/v2/models/twilio_events_logs_integration_dataflow_response.rb new file mode 100644 index 000000000000..9e06de7c07a8 --- /dev/null +++ b/lib/datadog_api_client/v2/models/twilio_events_logs_integration_dataflow_response.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 + # The Twilio events logs dataflow. + class TwilioEventsLogsIntegrationDataflowResponse + include BaseGenericModel + + # Whether the Twilio dataflow is enabled. + attr_accessor :enabled + + # Read-only 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', + :'status' => :'status' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'Boolean', + :'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::TwilioEventsLogsIntegrationDataflowResponse` 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?(:'status') + self.status = attributes[:'status'] + 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 && + enabled == o.enabled && + 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, status, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/twilio_integration_account_authentication_request.rb b/lib/datadog_api_client/v2/models/twilio_integration_account_authentication_request.rb new file mode 100644 index 000000000000..83863df6f890 --- /dev/null +++ b/lib/datadog_api_client/v2/models/twilio_integration_account_authentication_request.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 for creating the Twilio integration account. Exactly one method is set. + module TwilioIntegrationAccountAuthenticationRequest + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'IntegrationAccountBasicAuthRequest' + ] + 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_integration_account_authentication_response.rb b/lib/datadog_api_client/v2/models/twilio_integration_account_authentication_response.rb new file mode 100644 index 000000000000..63e63d211141 --- /dev/null +++ b/lib/datadog_api_client/v2/models/twilio_integration_account_authentication_response.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 configured on the Twilio integration account. + module TwilioIntegrationAccountAuthenticationResponse + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'IntegrationAccountBasicAuthResponse' + ] + 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_integration_account_authentication_update.rb b/lib/datadog_api_client/v2/models/twilio_integration_account_authentication_update.rb new file mode 100644 index 000000000000..a2e3f698c021 --- /dev/null +++ b/lib/datadog_api_client/v2/models/twilio_integration_account_authentication_update.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 for updating the Twilio integration account. Exactly one method is set. + module TwilioIntegrationAccountAuthenticationUpdate + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'IntegrationAccountBasicAuthUpdate' + ] + 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_integration_account_create_attributes.rb b/lib/datadog_api_client/v2/models/twilio_integration_account_create_attributes.rb new file mode 100644 index 000000000000..6ebad405dc2c --- /dev/null +++ b/lib/datadog_api_client/v2/models/twilio_integration_account_create_attributes.rb @@ -0,0 +1,175 @@ +=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 + # Writable attributes used to create a Twilio integration account. + class TwilioIntegrationAccountCreateAttributes + include BaseGenericModel + + # Authentication for creating the Twilio integration account. Exactly one method is set. + attr_reader :authentication + + # Dataflows to configure on the Twilio integration account, keyed by dataflow id. + attr_accessor :dataflows + + # Human-readable name of the Twilio integration account. + attr_reader :name + + # Settings for creating the Twilio integration account. + attr_reader :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' => :'TwilioIntegrationAccountAuthenticationRequest', + :'dataflows' => :'TwilioIntegrationDataflowsRequest', + :'name' => :'String', + :'settings' => :'TwilioIntegrationAccountSettingsRequest' + } + 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::TwilioIntegrationAccountCreateAttributes` 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') + self.dataflows = attributes[:'dataflows'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + 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? + return false if @settings.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 + + # Custom attribute writer method with validation + # @param settings [Object] Object to be assigned + # @!visibility private + def settings=(settings) + if settings.nil? + fail ArgumentError, 'invalid value for "settings", settings cannot be nil.' + end + @settings = settings + 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_integration_account_create_data.rb b/lib/datadog_api_client/v2/models/twilio_integration_account_create_data.rb new file mode 100644 index 000000000000..4b4d16044852 --- /dev/null +++ b/lib/datadog_api_client/v2/models/twilio_integration_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 TwilioIntegrationAccountCreateData + include BaseGenericModel + + # Writable attributes used to create a Twilio integration account. + attr_reader :attributes + + # The type of the integration account resource. 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' => :'TwilioIntegrationAccountCreateAttributes', + :'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::TwilioIntegrationAccountCreateData` 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_integration_account_create_request.rb b/lib/datadog_api_client/v2/models/twilio_integration_account_create_request.rb new file mode 100644 index 000000000000..b5e6c845dc81 --- /dev/null +++ b/lib/datadog_api_client/v2/models/twilio_integration_account_create_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 TwilioIntegrationAccountCreateRequest + 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' => :'TwilioIntegrationAccountCreateData' + } + 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::TwilioIntegrationAccountCreateRequest` 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_integration_account_response.rb b/lib/datadog_api_client/v2/models/twilio_integration_account_response.rb new file mode 100644 index 000000000000..21d2535ab5bc --- /dev/null +++ b/lib/datadog_api_client/v2/models/twilio_integration_account_response.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 + # Response payload for a single Twilio integration account. + class TwilioIntegrationAccountResponse + include BaseGenericModel + + # Data envelope of a Twilio integration account, including server-assigned identity. + 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' => :'TwilioIntegrationAccountResponseData' + } + 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::TwilioIntegrationAccountResponse` 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_integration_account_response_attributes.rb b/lib/datadog_api_client/v2/models/twilio_integration_account_response_attributes.rb new file mode 100644 index 000000000000..5d1a9c740ffb --- /dev/null +++ b/lib/datadog_api_client/v2/models/twilio_integration_account_response_attributes.rb @@ -0,0 +1,164 @@ +=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 returned in responses. + class TwilioIntegrationAccountResponseAttributes + include BaseGenericModel + + # Authentication configured on the Twilio integration account. + attr_accessor :authentication + + # Dataflows configured on the Twilio integration account, keyed by dataflow id. + attr_accessor :dataflows + + # Human-readable name of the Twilio integration account. + attr_reader :name + + # Settings configured on the Twilio integration account. + attr_reader :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' => :'TwilioIntegrationAccountAuthenticationResponse', + :'dataflows' => :'TwilioIntegrationDataflowsResponse', + :'name' => :'String', + :'settings' => :'TwilioIntegrationAccountSettingsResponse' + } + 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::TwilioIntegrationAccountResponseAttributes` 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') + self.dataflows = attributes[:'dataflows'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + 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 @name.nil? + return false if @settings.nil? + true + 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 + + # Custom attribute writer method with validation + # @param settings [Object] Object to be assigned + # @!visibility private + def settings=(settings) + if settings.nil? + fail ArgumentError, 'invalid value for "settings", settings cannot be nil.' + end + @settings = settings + 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_integration_account_response_data.rb b/lib/datadog_api_client/v2/models/twilio_integration_account_response_data.rb new file mode 100644 index 000000000000..2aaaffded5c1 --- /dev/null +++ b/lib/datadog_api_client/v2/models/twilio_integration_account_response_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 TwilioIntegrationAccountResponseData + include BaseGenericModel + + # Attributes of a Twilio integration account returned in responses. + attr_reader :attributes + + # Server-generated unique identifier of the Twilio integration account. + attr_reader :id + + # The type of the integration account resource. 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' => :'TwilioIntegrationAccountResponseAttributes', + :'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::TwilioIntegrationAccountResponseData` 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_integration_account_settings_request.rb b/lib/datadog_api_client/v2/models/twilio_integration_account_settings_request.rb new file mode 100644 index 000000000000..1c989719db9e --- /dev/null +++ b/lib/datadog_api_client/v2/models/twilio_integration_account_settings_request.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 + # Settings for creating the Twilio integration account. + class TwilioIntegrationAccountSettingsRequest + include BaseGenericModel + + # Twilio Account SID that uniquely identifies your Twilio account. + attr_reader :account_sid + + # When enabled, Twilio 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::TwilioIntegrationAccountSettingsRequest` 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_integration_account_settings_response.rb b/lib/datadog_api_client/v2/models/twilio_integration_account_settings_response.rb new file mode 100644 index 000000000000..0858f572a27b --- /dev/null +++ b/lib/datadog_api_client/v2/models/twilio_integration_account_settings_response.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 + # Settings configured on the Twilio integration account. + class TwilioIntegrationAccountSettingsResponse + include BaseGenericModel + + # Twilio Account SID that uniquely identifies your Twilio account. + attr_reader :account_sid + + # When enabled, Twilio 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::TwilioIntegrationAccountSettingsResponse` 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_integration_account_settings_update.rb b/lib/datadog_api_client/v2/models/twilio_integration_account_settings_update.rb new file mode 100644 index 000000000000..c1e29e323603 --- /dev/null +++ b/lib/datadog_api_client/v2/models/twilio_integration_account_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 + # Settings for updating the Twilio integration account. Only the fields provided are changed. + class TwilioIntegrationAccountSettingsUpdate + include BaseGenericModel + + # Twilio Account SID that uniquely identifies your Twilio account. + attr_accessor :account_sid + + # When enabled, Twilio 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::TwilioIntegrationAccountSettingsUpdate` 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 diff --git a/lib/datadog_api_client/v2/models/twilio_integration_account_update_attributes.rb b/lib/datadog_api_client/v2/models/twilio_integration_account_update_attributes.rb new file mode 100644 index 000000000000..a3c24e9b05ea --- /dev/null +++ b/lib/datadog_api_client/v2/models/twilio_integration_account_update_attributes.rb @@ -0,0 +1,135 @@ +=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 + # Writable attributes used to update a Twilio integration account. Every field is optional; only the fields provided are changed. When `dataflows` is provided, only the dataflow ids included in the request are modified; dataflows omitted from the map keep their current configuration. + class TwilioIntegrationAccountUpdateAttributes + include BaseGenericModel + + # Authentication for updating the Twilio integration account. Exactly one method is set. + attr_accessor :authentication + + # Dataflows to configure on the Twilio integration account, keyed by dataflow id. + attr_accessor :dataflows + + # Human-readable name of the Twilio integration account. + attr_accessor :name + + # Settings for updating the Twilio integration account. Only the fields provided are changed. + 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' => :'TwilioIntegrationAccountAuthenticationUpdate', + :'dataflows' => :'TwilioIntegrationDataflowsRequest', + :'name' => :'String', + :'settings' => :'TwilioIntegrationAccountSettingsUpdate' + } + 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::TwilioIntegrationAccountUpdateAttributes` 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') + self.dataflows = attributes[:'dataflows'] + 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_integration_account_update_data.rb b/lib/datadog_api_client/v2/models/twilio_integration_account_update_data.rb new file mode 100644 index 000000000000..e11b535c2f5e --- /dev/null +++ b/lib/datadog_api_client/v2/models/twilio_integration_account_update_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 for updating a Twilio integration account. + class TwilioIntegrationAccountUpdateData + include BaseGenericModel + + # Writable attributes used to update a Twilio integration account. Every field is optional; only the fields provided are changed. When `dataflows` is provided, only the dataflow ids included in the request are modified; dataflows omitted from the map keep their current configuration. + attr_reader :attributes + + # Unique identifier of the Twilio integration account to update. + attr_reader :id + + # The type of the integration account resource. 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' => :'TwilioIntegrationAccountUpdateAttributes', + :'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::TwilioIntegrationAccountUpdateData` 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_integration_account_update_request.rb b/lib/datadog_api_client/v2/models/twilio_integration_account_update_request.rb new file mode 100644 index 000000000000..6fd5ac007068 --- /dev/null +++ b/lib/datadog_api_client/v2/models/twilio_integration_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. + class TwilioIntegrationAccountUpdateRequest + 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' => :'TwilioIntegrationAccountUpdateData' + } + 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::TwilioIntegrationAccountUpdateRequest` 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_integration_accounts_response.rb b/lib/datadog_api_client/v2/models/twilio_integration_accounts_response.rb new file mode 100644 index 000000000000..dda454120905 --- /dev/null +++ b/lib/datadog_api_client/v2/models/twilio_integration_accounts_response.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 + # Response payload for a list of Twilio integration accounts. + class TwilioIntegrationAccountsResponse + include BaseGenericModel + + # List of Twilio integration accounts. + 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' => :'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::TwilioIntegrationAccountsResponse` 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 + + # 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_integration_dataflows_request.rb b/lib/datadog_api_client/v2/models/twilio_integration_dataflows_request.rb new file mode 100644 index 000000000000..79215801c4a3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/twilio_integration_dataflows_request.rb @@ -0,0 +1,120 @@ +=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 + # Dataflows to configure on the Twilio integration account, keyed by dataflow id. + class TwilioIntegrationDataflowsRequest + include BaseGenericModel + + # The Twilio alerts logs dataflow. + attr_accessor :twilio_alerts_logs + + # The Twilio call summaries logs dataflow. + attr_accessor :twilio_call_summaries_logs + + # The Twilio cloud cost metrics dataflow. + attr_accessor :twilio_cloud_cost_metrics + + # The Twilio events logs dataflow. + attr_accessor :twilio_events_logs + + # The Twilio messages logs dataflow. + attr_accessor :twilio_messages_logs + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'twilio_alerts_logs' => :'twilio-alerts-logs', + :'twilio_call_summaries_logs' => :'twilio-call-summaries-logs', + :'twilio_cloud_cost_metrics' => :'twilio-cloud-cost-metrics', + :'twilio_events_logs' => :'twilio-events-logs', + :'twilio_messages_logs' => :'twilio-messages-logs' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'twilio_alerts_logs' => :'TwilioAlertsLogsIntegrationDataflowRequest', + :'twilio_call_summaries_logs' => :'TwilioCallSummariesLogsIntegrationDataflowRequest', + :'twilio_cloud_cost_metrics' => :'TwilioCloudCostMetricsIntegrationDataflowRequest', + :'twilio_events_logs' => :'TwilioEventsLogsIntegrationDataflowRequest', + :'twilio_messages_logs' => :'TwilioMessagesLogsIntegrationDataflowRequest' + } + 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::TwilioIntegrationDataflowsRequest` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::TwilioIntegrationDataflowsRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'twilio_alerts_logs') + self.twilio_alerts_logs = attributes[:'twilio_alerts_logs'] + end + + if attributes.key?(:'twilio_call_summaries_logs') + self.twilio_call_summaries_logs = attributes[:'twilio_call_summaries_logs'] + end + + if attributes.key?(:'twilio_cloud_cost_metrics') + self.twilio_cloud_cost_metrics = attributes[:'twilio_cloud_cost_metrics'] + end + + if attributes.key?(:'twilio_events_logs') + self.twilio_events_logs = attributes[:'twilio_events_logs'] + end + + if attributes.key?(:'twilio_messages_logs') + self.twilio_messages_logs = attributes[:'twilio_messages_logs'] + end + 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 && + twilio_alerts_logs == o.twilio_alerts_logs && + twilio_call_summaries_logs == o.twilio_call_summaries_logs && + twilio_cloud_cost_metrics == o.twilio_cloud_cost_metrics && + twilio_events_logs == o.twilio_events_logs && + twilio_messages_logs == o.twilio_messages_logs + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [twilio_alerts_logs, twilio_call_summaries_logs, twilio_cloud_cost_metrics, twilio_events_logs, twilio_messages_logs].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/twilio_integration_dataflows_response.rb b/lib/datadog_api_client/v2/models/twilio_integration_dataflows_response.rb new file mode 100644 index 000000000000..bcd4e3d788a3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/twilio_integration_dataflows_response.rb @@ -0,0 +1,120 @@ +=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 + # Dataflows configured on the Twilio integration account, keyed by dataflow id. + class TwilioIntegrationDataflowsResponse + include BaseGenericModel + + # The Twilio alerts logs dataflow. + attr_accessor :twilio_alerts_logs + + # The Twilio call summaries logs dataflow. + attr_accessor :twilio_call_summaries_logs + + # The Twilio cloud cost metrics dataflow. + attr_accessor :twilio_cloud_cost_metrics + + # The Twilio events logs dataflow. + attr_accessor :twilio_events_logs + + # The Twilio messages logs dataflow. + attr_accessor :twilio_messages_logs + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'twilio_alerts_logs' => :'twilio-alerts-logs', + :'twilio_call_summaries_logs' => :'twilio-call-summaries-logs', + :'twilio_cloud_cost_metrics' => :'twilio-cloud-cost-metrics', + :'twilio_events_logs' => :'twilio-events-logs', + :'twilio_messages_logs' => :'twilio-messages-logs' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'twilio_alerts_logs' => :'TwilioAlertsLogsIntegrationDataflowResponse', + :'twilio_call_summaries_logs' => :'TwilioCallSummariesLogsIntegrationDataflowResponse', + :'twilio_cloud_cost_metrics' => :'TwilioCloudCostMetricsIntegrationDataflowResponse', + :'twilio_events_logs' => :'TwilioEventsLogsIntegrationDataflowResponse', + :'twilio_messages_logs' => :'TwilioMessagesLogsIntegrationDataflowResponse' + } + 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::TwilioIntegrationDataflowsResponse` initialize method" + end + + # 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)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::TwilioIntegrationDataflowsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'twilio_alerts_logs') + self.twilio_alerts_logs = attributes[:'twilio_alerts_logs'] + end + + if attributes.key?(:'twilio_call_summaries_logs') + self.twilio_call_summaries_logs = attributes[:'twilio_call_summaries_logs'] + end + + if attributes.key?(:'twilio_cloud_cost_metrics') + self.twilio_cloud_cost_metrics = attributes[:'twilio_cloud_cost_metrics'] + end + + if attributes.key?(:'twilio_events_logs') + self.twilio_events_logs = attributes[:'twilio_events_logs'] + end + + if attributes.key?(:'twilio_messages_logs') + self.twilio_messages_logs = attributes[:'twilio_messages_logs'] + end + 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 && + twilio_alerts_logs == o.twilio_alerts_logs && + twilio_call_summaries_logs == o.twilio_call_summaries_logs && + twilio_cloud_cost_metrics == o.twilio_cloud_cost_metrics && + twilio_events_logs == o.twilio_events_logs && + twilio_messages_logs == o.twilio_messages_logs + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [twilio_alerts_logs, twilio_call_summaries_logs, twilio_cloud_cost_metrics, twilio_events_logs, twilio_messages_logs].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/twilio_messages_logs_integration_dataflow_request.rb b/lib/datadog_api_client/v2/models/twilio_messages_logs_integration_dataflow_request.rb new file mode 100644 index 000000000000..9266c313fed3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/twilio_messages_logs_integration_dataflow_request.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 + # The Twilio messages logs dataflow. + class TwilioMessagesLogsIntegrationDataflowRequest + include BaseGenericModel + + # Whether the Twilio dataflow is enabled. + attr_accessor :enabled + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'enabled' => :'enabled' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'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::TwilioMessagesLogsIntegrationDataflowRequest` 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 + 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 && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [enabled, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/twilio_messages_logs_integration_dataflow_response.rb b/lib/datadog_api_client/v2/models/twilio_messages_logs_integration_dataflow_response.rb new file mode 100644 index 000000000000..c4b06928e2ef --- /dev/null +++ b/lib/datadog_api_client/v2/models/twilio_messages_logs_integration_dataflow_response.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 + # The Twilio messages logs dataflow. + class TwilioMessagesLogsIntegrationDataflowResponse + include BaseGenericModel + + # Whether the Twilio dataflow is enabled. + attr_accessor :enabled + + # Read-only 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', + :'status' => :'status' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'Boolean', + :'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::TwilioMessagesLogsIntegrationDataflowResponse` 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?(:'status') + self.status = attributes[:'status'] + 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 && + enabled == o.enabled && + 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, status, additional_properties].hash + end + end +end