From 306b5e1dac6f41fda7be3da0327c9f272c265121 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 6 Jan 2026 13:56:12 +0000 Subject: [PATCH] Regenerate client from commit 0337d16 of spec repo --- .generator/schemas/v2/openapi.yaml | 868 ++++++++++++++---- .../v2/dora-metrics/GetDORADeployment.java | 4 +- examples/v2/dora-metrics/GetDORAFailure.java | 4 +- .../v2/dora-metrics/ListDORADeployments.java | 4 +- .../v2/dora-metrics/ListDORAFailures.java | 4 +- .../v2/synthetics/CreateSyntheticsSuite.java | 44 + .../v2/synthetics/DeleteSyntheticsSuites.java | 38 + .../v2/synthetics/EditSyntheticsSuite.java | 52 ++ .../v2/synthetics/GetSyntheticsSuite.java | 24 + examples/v2/synthetics/SearchSuites.java | 24 + .../api/client/v2/api/DoraMetricsApi.java | 116 +-- .../api/client/v2/api/SyntheticsApi.java | 786 ++++++++++++++++ .../v2/model/DORADeploymentFetchResponse.java | 137 +++ .../client/v2/model/DORADeploymentObject.java | 196 ++++ .../model/DORADeploymentObjectAttributes.java | 366 ++++++++ .../v2/model/DORADeploymentsListResponse.java | 150 +++ ...nse.java => DORAFailureFetchResponse.java} | 30 +- .../v2/model/DORAFailuresListResponse.java | 149 +++ ...DORAEvent.java => DORAIncidentObject.java} | 57 +- .../model/DORAIncidentObjectAttributes.java | 435 +++++++++ .../model/DORAListDeploymentsRequestData.java | 3 +- .../v2/model/DORAListFailuresRequestData.java | 3 +- .../v2/model/DeletedSuiteResponseData.java | 196 ++++ .../DeletedSuiteResponseDataAttributes.java | 166 ++++ .../v2/model/DeletedSuitesRequestDelete.java | 207 +++++ .../DeletedSuitesRequestDeleteAttributes.java | 186 ++++ .../DeletedSuitesRequestDeleteRequest.java | 147 +++ .../v2/model/DeletedSuitesRequestType.java | 57 ++ ...sponse.java => DeletedSuitesResponse.java} | 34 +- .../api/client/v2/model/SuiteCreateEdit.java | 177 ++++ .../v2/model/SuiteCreateEditRequest.java | 145 +++ .../v2/model/SuiteSearchResponseType.java | 57 ++ .../api/client/v2/model/SyntheticsSuite.java | 328 +++++++ .../v2/model/SyntheticsSuiteOptions.java | 135 +++ .../v2/model/SyntheticsSuiteResponse.java | 136 +++ .../v2/model/SyntheticsSuiteResponseData.java | 137 +++ .../model/SyntheticsSuiteSearchResponse.java | 137 +++ .../SyntheticsSuiteSearchResponseData.java | 200 ++++ ...ticsSuiteSearchResponseDataAttributes.java | 182 ++++ .../client/v2/model/SyntheticsSuiteTest.java | 179 ++++ ...yntheticsSuiteTestAlertingCriticality.java | 65 ++ .../client/v2/model/SyntheticsSuiteType.java | 54 ++ .../client/v2/model/SyntheticsSuiteTypes.java | 54 ++ .../api/client/v2/api/synthetics.feature | 70 ++ .../com/datadog/api/client/v2/api/undo.json | 37 + 45 files changed, 6286 insertions(+), 294 deletions(-) create mode 100644 examples/v2/synthetics/CreateSyntheticsSuite.java create mode 100644 examples/v2/synthetics/DeleteSyntheticsSuites.java create mode 100644 examples/v2/synthetics/EditSyntheticsSuite.java create mode 100644 examples/v2/synthetics/GetSyntheticsSuite.java create mode 100644 examples/v2/synthetics/SearchSuites.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/DORADeploymentFetchResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/DORADeploymentObject.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/DORADeploymentObjectAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/DORADeploymentsListResponse.java rename src/main/java/com/datadog/api/client/v2/model/{DORAFetchResponse.java => DORAFailureFetchResponse.java} (79%) create mode 100644 src/main/java/com/datadog/api/client/v2/model/DORAFailuresListResponse.java rename src/main/java/com/datadog/api/client/v2/model/{DORAEvent.java => DORAIncidentObject.java} (73%) create mode 100644 src/main/java/com/datadog/api/client/v2/model/DORAIncidentObjectAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/DeletedSuiteResponseData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/DeletedSuiteResponseDataAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/DeletedSuitesRequestDelete.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/DeletedSuitesRequestDeleteAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/DeletedSuitesRequestDeleteRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/DeletedSuitesRequestType.java rename src/main/java/com/datadog/api/client/v2/model/{DORAListResponse.java => DeletedSuitesResponse.java} (78%) create mode 100644 src/main/java/com/datadog/api/client/v2/model/SuiteCreateEdit.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SuiteCreateEditRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SuiteSearchResponseType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SyntheticsSuite.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteOptions.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteResponseData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteSearchResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteSearchResponseData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteSearchResponseDataAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteTest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteTestAlertingCriticality.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteTypes.java diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index d2192b74841..575e1e47c6e 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -15878,6 +15878,78 @@ components: type: string nullable: true type: array + DORADeploymentFetchResponse: + description: Response for fetching a single deployment event. + properties: + data: + $ref: '#/components/schemas/DORADeploymentObject' + type: object + DORADeploymentObject: + description: A DORA deployment event. + example: + attributes: + custom_tags: + - language:java + - department:engineering + - region:us-east-1 + env: production + finished_at: 1693491984000000000 + git: + commit_sha: 66adc9350f2cc9b250b69abddab733dd55e1a588 + repository_url: https://github.com/organization/example-repository + service: shopist + started_at: 1693491974000000000 + team: backend + version: v1.12.07 + id: 4242fcdd31586083 + type: dora_deployment + properties: + attributes: + $ref: '#/components/schemas/DORADeploymentObjectAttributes' + id: + description: The ID of the deployment event. + type: string + type: + $ref: '#/components/schemas/DORADeploymentType' + type: object + DORADeploymentObjectAttributes: + description: The attributes of the deployment event. + properties: + custom_tags: + $ref: '#/components/schemas/DORACustomTags' + env: + description: Environment name to where the service was deployed. + example: production + type: string + finished_at: + description: Unix timestamp when the deployment finished. + example: 1693491984000000000 + format: int64 + type: integer + git: + $ref: '#/components/schemas/DORAGitInfo' + service: + description: Service name. + example: shopist + type: string + started_at: + description: Unix timestamp when the deployment started. + example: 1693491974000000000 + format: int64 + type: integer + team: + description: Name of the team owning the deployed service. + example: backend + type: string + version: + description: Version to correlate with APM Deployment Tracking. + example: v1.12.07 + type: string + required: + - service + - started_at + - finished_at + type: object DORADeploymentRequest: description: Request to create a DORA deployment event. properties: @@ -15968,18 +16040,53 @@ components: type: string x-enum-varnames: - DORA_DEPLOYMENT - DORAEvent: - description: A DORA event. + DORADeploymentsListResponse: + description: Response for the list deployments endpoint. + example: + data: + - attributes: + custom_tags: + - language:java + - department:engineering + - region:us-east-1 + env: production + finished_at: 1693491984000000000 + git: + commit_sha: 66adc9350f2cc9b250b69abddab733dd55e1a588 + repository_url: https://github.com/organization/example-repository + service: shopist + started_at: 1693491974000000000 + team: backend + version: v1.12.07 + id: 4242fcdd31586083 + type: dora_deployment + - attributes: + custom_tags: + - language:go + - department:platform + env: production + finished_at: 1693492084000000000 + git: + commit_sha: 77bdc9350f2cc9b250b69abddab733dd55e1a599 + repository_url: https://github.com/organization/api-service + service: api-service + started_at: 1693492074000000000 + team: backend + version: v2.1.0 + id: 4242fcdd31586084 + type: dora_deployment properties: - attributes: - description: The attributes of the event. - type: object - id: - description: The ID of the event. - type: string - type: - description: The type of the event. - type: string + data: + description: The list of DORA deployment events. + items: + $ref: '#/components/schemas/DORADeploymentObject' + type: array + type: object + DORAFailureFetchResponse: + description: Response for fetching a single failure event. + properties: + data: + $ref: '#/components/schemas/DORAIncidentObject' type: object DORAFailureRequest: description: Request to create a DORA failure event. @@ -16083,11 +16190,45 @@ components: type: string x-enum-varnames: - DORA_FAILURE - DORAFetchResponse: - description: Response for the DORA fetch endpoints. + DORAFailuresListResponse: + description: Response for the list failures endpoint. + example: + data: + - attributes: + custom_tags: + - incident_type:database + - department:engineering + env: production + finished_at: 1693492274000000000 + name: Database outage + services: + - shopist + severity: SEV-1 + started_at: 1693492174000000000 + team: backend + id: 4242fcdd31586085 + type: dora_incident + - attributes: + custom_tags: + - incident_type:service_down + - department:platform + env: production + finished_at: 1693492474000000000 + name: API service outage + services: + - api-service + - payment-service + severity: SEV-2 + started_at: 1693492374000000000 + team: backend + id: 4242fcdd31586086 + type: dora_incident properties: data: - $ref: '#/components/schemas/DORAEvent' + description: The list of DORA incident events. + items: + $ref: '#/components/schemas/DORAIncidentObject' + type: array type: object DORAGitInfo: description: Git info for DORA Metrics events. @@ -16100,6 +16241,82 @@ components: - repository_url - commit_sha type: object + DORAIncidentObject: + description: A DORA incident event. + example: + attributes: + custom_tags: + - incident_type:database + - department:engineering + env: production + finished_at: 1693492274000000000 + git: + commit_sha: 66adc9350f2cc9b250b69abddab733dd55e1a588 + repository_url: https://github.com/organization/example-repository + name: Database outage + services: + - shopist + severity: SEV-1 + started_at: 1693492174000000000 + team: backend + id: 4242fcdd31586085 + type: dora_incident + properties: + attributes: + $ref: '#/components/schemas/DORAIncidentObjectAttributes' + id: + description: The ID of the incident event. + type: string + type: + $ref: '#/components/schemas/DORAFailureType' + type: object + DORAIncidentObjectAttributes: + description: The attributes of the incident event. + properties: + custom_tags: + $ref: '#/components/schemas/DORACustomTags' + env: + description: Environment name that was impacted by the incident. + example: production + type: string + finished_at: + description: Unix timestamp when the incident finished. + example: 1693491984000000000 + format: int64 + type: integer + git: + $ref: '#/components/schemas/DORAGitInfo' + name: + description: Incident name. + example: Database outage + type: string + services: + description: Service names impacted by the incident. + example: + - shopist + items: + type: string + type: array + severity: + description: Incident severity. + example: SEV-1 + type: string + started_at: + description: Unix timestamp when the incident started. + example: 1693491974000000000 + format: int64 + type: integer + team: + description: Name of the team owning the services impacted. + example: backend + type: string + version: + description: Version to correlate with APM Deployment Tracking. + example: v1.12.07 + type: string + required: + - started_at + type: object DORAListDeploymentsRequest: description: Request to get a list of deployments. example: @@ -16119,32 +16336,31 @@ components: type: object DORAListDeploymentsRequestAttributes: description: Attributes to get a list of deployments. - example: - from: '2025-01-01T00:00:00Z' - limit: 500 - query: service:(shopist OR api-service OR payment-service) env:(production - OR staging) team:(backend OR platform) - sort: -started_at - to: '2025-01-31T23:59:59Z' properties: from: description: Minimum timestamp for requested events. + example: '2025-01-01T00:00:00Z' format: date-time type: string limit: default: 10 description: Maximum number of events in the response. + example: 500 format: int32 maximum: 1000 type: integer query: description: Search query with event platform syntax. + example: service:(shopist OR api-service OR payment-service) env:(production + OR staging) team:(backend OR platform) type: string sort: description: Sort order (prefixed with `-` for descending). + example: -started_at type: string to: description: Maximum timestamp for requested events. + example: '2025-01-31T23:59:59Z' format: date-time type: string type: object @@ -16167,9 +16383,11 @@ components: - attributes type: object DORAListDeploymentsRequestDataType: + default: dora_deployments_list_request description: The definition of `DORAListDeploymentsRequestDataType` object. enum: - dora_deployments_list_request + example: dora_deployments_list_request type: string x-enum-varnames: - DORA_DEPLOYMENTS_LIST_REQUEST @@ -16192,32 +16410,31 @@ components: type: object DORAListFailuresRequestAttributes: description: Attributes to get a list of failures. - example: - from: '2025-01-01T00:00:00Z' - limit: 500 - query: severity:(SEV-1 OR SEV-2) env:(production OR staging) service:(shopist - OR api-service OR payment-service) team:(backend OR platform OR payments) - sort: -started_at - to: '2025-01-31T23:59:59Z' properties: from: description: Minimum timestamp for requested events. + example: '2025-01-01T00:00:00Z' format: date-time type: string limit: default: 10 description: Maximum number of events in the response. + example: 500 format: int32 maximum: 1000 type: integer query: description: Search query with event platform syntax. + example: severity:(SEV-1 OR SEV-2) env:(production OR staging) service:(shopist + OR api-service OR payment-service) team:(backend OR platform OR payments) type: string sort: description: Sort order (prefixed with `-` for descending). + example: -started_at type: string to: description: Maximum timestamp for requested events. + example: '2025-01-31T23:59:59Z' format: date-time type: string type: object @@ -16240,54 +16457,14 @@ components: - attributes type: object DORAListFailuresRequestDataType: + default: dora_failures_list_request description: The definition of `DORAListFailuresRequestDataType` object. enum: - dora_failures_list_request + example: dora_failures_list_request type: string x-enum-varnames: - DORA_FAILURES_LIST_REQUEST - DORAListResponse: - description: Response for the DORA list endpoints. - example: - data: - - attributes: - custom_tags: - - language:java - - department:engineering - - region:us-east-1 - env: production - finished_at: 1693491984000000000 - git: - commit_sha: 66adc9350f2cc9b250b69abddab733dd55e1a588 - repository_url: https://github.com/organization/example-repository - service: shopist - started_at: 1693491974000000000 - team: backend - version: v1.12.07 - id: 4242fcdd31586083 - type: dora_deployment - - attributes: - custom_tags: - - language:go - - department:platform - env: production - finished_at: 1693492084000000000 - git: - commit_sha: 77bdc9350f2cc9b250b69abddab733dd55e1a599 - repository_url: https://github.com/organization/api-service - service: api-service - started_at: 1693492074000000000 - team: backend - version: v2.1.0 - id: 4242fcdd31586084 - type: dora_deployment - properties: - data: - description: The list of DORA events. - items: - $ref: '#/components/schemas/DORAEvent' - type: array - type: object DashboardListAddItemsRequest: description: Request containing a list of dashboards to add. properties: @@ -17278,6 +17455,70 @@ components: required: - data type: object + DeletedSuiteResponseData: + properties: + attributes: + $ref: '#/components/schemas/DeletedSuiteResponseDataAttributes' + id: + type: string + type: + $ref: '#/components/schemas/SyntheticsSuiteTypes' + type: object + DeletedSuiteResponseDataAttributes: + properties: + deleted_at: + description: Deletion timestamp of the Synthetic suite ID. + type: string + public_id: + description: The Synthetic suite ID deleted. + type: string + type: object + DeletedSuitesRequestDelete: + properties: + attributes: + $ref: '#/components/schemas/DeletedSuitesRequestDeleteAttributes' + id: + type: string + type: + $ref: '#/components/schemas/DeletedSuitesRequestType' + required: + - attributes + type: object + DeletedSuitesRequestDeleteAttributes: + properties: + force_delete_dependencies: + type: boolean + public_ids: + example: + - '' + items: + type: string + type: array + required: + - public_ids + type: object + DeletedSuitesRequestDeleteRequest: + properties: + data: + $ref: '#/components/schemas/DeletedSuitesRequestDelete' + required: + - data + type: object + DeletedSuitesRequestType: + default: delete_suites_request + enum: + - delete_suites_request + example: delete_suites_request + type: string + x-enum-varnames: + - DELETE_SUITES_REQUEST + DeletedSuitesResponse: + properties: + data: + items: + $ref: '#/components/schemas/DeletedSuiteResponseData' + type: array + type: object DependencyLocation: description: Static library vulnerability location. properties: @@ -53388,6 +53629,31 @@ components: format: double type: number type: object + SuiteCreateEdit: + properties: + attributes: + $ref: '#/components/schemas/SyntheticsSuite' + type: + $ref: '#/components/schemas/SyntheticsSuiteTypes' + required: + - attributes + - type + type: object + SuiteCreateEditRequest: + properties: + data: + $ref: '#/components/schemas/SuiteCreateEdit' + required: + - data + type: object + SuiteSearchResponseType: + default: suites_search + enum: + - suites_search + example: suites_search + type: string + x-enum-varnames: + - SUITES_SEARCH SuppressionVersionHistory: description: Response object containing the version history of a suppression. properties: @@ -53414,6 +53680,137 @@ components: suppression: $ref: '#/components/schemas/SecurityMonitoringSuppressionAttributes' type: object + SyntheticsSuite: + description: Object containing details about a Synthetic suite. + properties: + message: + description: Notification message associated with the suite. + example: Notification message + type: string + name: + description: Name of the suite. + example: Example suite name + type: string + options: + $ref: '#/components/schemas/SyntheticsSuiteOptions' + public_id: + description: The public ID for the test. + example: 123-abc-456 + readOnly: true + type: string + tags: + description: Array of tags attached to the suite. + example: + - env:production + items: + description: A tag attached to the suite. + type: string + type: array + tests: + items: + $ref: '#/components/schemas/SyntheticsSuiteTest' + type: array + type: + $ref: '#/components/schemas/SyntheticsSuiteType' + required: + - name + - message + - type + - tests + - options + type: object + SyntheticsSuiteOptions: + description: Object describing the extra options for a Synthetic suite. + properties: + alerting_threshold: + description: Percentage of critical tests failure needed for a suite to + fail. + format: double + maximum: 1 + minimum: 0 + type: number + type: object + SyntheticsSuiteResponse: + description: Synthetics suite response + properties: + data: + $ref: '#/components/schemas/SyntheticsSuiteResponseData' + type: object + SyntheticsSuiteResponseData: + description: Synthetics suite response data + properties: + attributes: + $ref: '#/components/schemas/SyntheticsSuite' + type: object + SyntheticsSuiteSearchResponse: + description: Synthetics suite search response + properties: + data: + $ref: '#/components/schemas/SyntheticsSuiteSearchResponseData' + type: object + SyntheticsSuiteSearchResponseData: + description: Synthetics suite search response data + properties: + attributes: + $ref: '#/components/schemas/SyntheticsSuiteSearchResponseDataAttributes' + id: + format: uuid + type: string + type: + $ref: '#/components/schemas/SuiteSearchResponseType' + type: object + SyntheticsSuiteSearchResponseDataAttributes: + description: Synthetics suite search response data attributes + properties: + suites: + items: + $ref: '#/components/schemas/SyntheticsSuite' + type: array + total: + format: int32 + maximum: 2147483647 + type: integer + type: object + SyntheticsSuiteTest: + description: Object containing details about a Synthetic test included in a + Synthetic suite. + properties: + alerting_criticality: + $ref: '#/components/schemas/SyntheticsSuiteTestAlertingCriticality' + public_id: + example: '' + type: string + required: + - public_id + type: object + SyntheticsSuiteTestAlertingCriticality: + description: Alerting criticality for each the test. + enum: + - ignore + - critical + example: critical + type: string + x-enum-varnames: + - IGNORE + - CRITICAL + SyntheticsSuiteType: + default: suite + description: Type of the Synthetic suite, `suite`. + enum: + - suite + example: suite + type: string + x-enum-varnames: + - SUITE + SyntheticsSuiteTypes: + default: suites + description: Type for the Synthetics suites responses, `suites`. + enum: + - suites + example: suites + type: string + x-enum-varnames: + - SUITES TableResultV2: description: A reference table resource containing its full configuration and state. @@ -67820,7 +68217,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/DORAListResponse' + $ref: '#/components/schemas/DORADeploymentsListResponse' description: OK '400': content: @@ -67858,26 +68255,8 @@ paths: '200': content: application/json: - example: - data: - attributes: - custom_tags: - - language:java - - department:engineering - - region:us-east-1 - env: staging - finished_at: 1693491984000000000 - git: - commit_sha: 66adc9350f2cc9b250b69abddab733dd55e1a588 - repository_url: https://github.com/organization/example-repository - service: shopist - started_at: 1693491974000000000 - team: backend - version: v1.12.07 - id: 4242fcdd31586083 - type: dora_deployment - schema: - $ref: '#/components/schemas/DORAFetchResponse' + schema: + $ref: '#/components/schemas/DORADeploymentFetchResponse' description: OK '400': content: @@ -67994,66 +68373,8 @@ paths: '200': content: application/json: - example: - data: - - attributes: - custom_tags: - - language:java - - department:engineering - - region:us-east-1 - env: production - finished_at: 1693491984000000000 - git: - commit_sha: 66adc9350f2cc9b250b69abddab733dd55e1a588 - repository_url: https://github.com/organization/example-repository - name: Web server is down; all requests are failing. - services: - - shopist - severity: SEV-1 - started_at: 1693491974000000000 - team: backend - id: 4242fcdd31586085 - type: dora_failure - - attributes: - custom_tags: - - language:go - - department:platform - env: production - finished_at: 1693492084000000000 - git: - commit_sha: 77bdc9350f2cc9b250b69abddab733dd55e1a599 - repository_url: https://github.com/organization/api-service - name: Database connection timeout - services: - - api-service - - payment-service - severity: SEV-1 - started_at: 1693492074000000000 - team: platform - version: v2.1.0 - id: 4242fcdd31586086 - type: dora_failure - - attributes: - custom_tags: - - language:python - - department:payments - - region:eu-west-1 - env: staging - finished_at: 1693492204000000000 - git: - commit_sha: 99edc9350f2cc9b250b69abddab733dd55e1a601 - repository_url: https://github.com/organization/payment-service - name: Payment gateway API rate limit exceeded - services: - - payment-service - severity: SEV-2 - started_at: 1693492174000000000 - team: payments - version: v1.8.3 - id: 4242fcdd31586087 - type: dora_failure - schema: - $ref: '#/components/schemas/DORAListResponse' + schema: + $ref: '#/components/schemas/DORAFailuresListResponse' description: OK '400': content: @@ -68091,28 +68412,8 @@ paths: '200': content: application/json: - example: - data: - attributes: - custom_tags: - - language:java - - department:engineering - - region:us-east-1 - env: staging - finished_at: 1693491984000000000 - git: - commit_sha: 66adc9350f2cc9b250b69abddab733dd55e1a588 - repository_url: https://github.com/organization/example-repository - name: Web server is down; all requests are failing. - services: - - shopist - severity: High - started_at: 1693491974000000000 - team: backend - id: 4242fcdd31586085 - type: dora_failure - schema: - $ref: '#/components/schemas/DORAFetchResponse' + schema: + $ref: '#/components/schemas/DORAFailureFetchResponse' description: OK '400': content: @@ -86063,6 +86364,227 @@ paths: operator: OR permissions: - billing_edit + /api/v2/synthetics/suites: + post: + operationId: CreateSyntheticsSuite + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SuiteCreateEditRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SyntheticsSuiteResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - synthetics_write + summary: 'Synthetics: Create a test suite' + tags: + - Synthetics + x-permission: + operator: OR + permissions: + - synthetics_write + - synthetics_create_edit_trigger + /api/v2/synthetics/suites/bulk-delete: + post: + operationId: DeleteSyntheticsSuites + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DeletedSuitesRequestDeleteRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DeletedSuitesResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - synthetics_write + summary: 'Synthetics: Bulk delete suites' + tags: + - Synthetics + x-permission: + operator: OR + permissions: + - synthetics_write + /api/v2/synthetics/suites/search: + get: + description: Search for Synthetics suites. + operationId: SearchSuites + parameters: + - description: The search query. + in: query + name: query + required: false + schema: + type: string + - description: The sort order for the results (e.g., `name,asc` or `name,desc`). + in: query + name: sort + required: false + schema: + default: name,asc + type: string + - description: If true, return only facets instead of full test details. + in: query + name: facets_only + required: false + schema: + default: false + type: boolean + - description: The offset from which to start returning results. + in: query + name: start + required: false + schema: + default: 0 + format: int64 + type: integer + - description: The maximum number of results to return. + in: query + name: count + required: false + schema: + default: 50 + format: int64 + type: integer + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SyntheticsSuiteSearchResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - synthetics_read + summary: Search Synthetics suites + tags: + - Synthetics + x-permission: + operator: OR + permissions: + - synthetics_read + /api/v2/synthetics/suites/{public_id}: + get: + operationId: GetSyntheticsSuite + parameters: + - description: The public ID of the suite to get details from. + in: path + name: public_id + required: true + schema: + type: string + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SyntheticsSuiteResponse' + description: OK + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - synthetics_read + summary: 'Synthetics: Get a suite' + tags: + - Synthetics + x-permission: + operator: OR + permissions: + - synthetics_read + put: + operationId: EditSyntheticsSuite + parameters: + - description: The public ID of the suite to edit. + in: path + name: public_id + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SuiteCreateEditRequest' + description: New suite details to be saved. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/SyntheticsSuiteResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response. + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - synthetics_write + summary: 'Synthetics: edit a test suite' + tags: + - Synthetics + x-permission: + operator: OR + permissions: + - synthetics_write /api/v2/tags/enrichment: get: description: List all tag pipeline rulesets - Retrieve a list of all tag pipeline diff --git a/examples/v2/dora-metrics/GetDORADeployment.java b/examples/v2/dora-metrics/GetDORADeployment.java index 1d0a1813cb4..f2c7e10c840 100644 --- a/examples/v2/dora-metrics/GetDORADeployment.java +++ b/examples/v2/dora-metrics/GetDORADeployment.java @@ -3,7 +3,7 @@ import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.v2.api.DoraMetricsApi; -import com.datadog.api.client.v2.model.DORAFetchResponse; +import com.datadog.api.client.v2.model.DORADeploymentFetchResponse; public class Example { public static void main(String[] args) { @@ -11,7 +11,7 @@ public static void main(String[] args) { DoraMetricsApi apiInstance = new DoraMetricsApi(defaultClient); try { - DORAFetchResponse result = apiInstance.getDORADeployment("deployment_id"); + DORADeploymentFetchResponse result = apiInstance.getDORADeployment("deployment_id"); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling DoraMetricsApi#getDORADeployment"); diff --git a/examples/v2/dora-metrics/GetDORAFailure.java b/examples/v2/dora-metrics/GetDORAFailure.java index 9a856540095..8f6c063febf 100644 --- a/examples/v2/dora-metrics/GetDORAFailure.java +++ b/examples/v2/dora-metrics/GetDORAFailure.java @@ -3,7 +3,7 @@ import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.v2.api.DoraMetricsApi; -import com.datadog.api.client.v2.model.DORAFetchResponse; +import com.datadog.api.client.v2.model.DORAFailureFetchResponse; public class Example { public static void main(String[] args) { @@ -11,7 +11,7 @@ public static void main(String[] args) { DoraMetricsApi apiInstance = new DoraMetricsApi(defaultClient); try { - DORAFetchResponse result = apiInstance.getDORAFailure("failure_id"); + DORAFailureFetchResponse result = apiInstance.getDORAFailure("failure_id"); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling DoraMetricsApi#getDORAFailure"); diff --git a/examples/v2/dora-metrics/ListDORADeployments.java b/examples/v2/dora-metrics/ListDORADeployments.java index cfe6c4eb52c..84d9b6766f4 100644 --- a/examples/v2/dora-metrics/ListDORADeployments.java +++ b/examples/v2/dora-metrics/ListDORADeployments.java @@ -3,11 +3,11 @@ import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.v2.api.DoraMetricsApi; +import com.datadog.api.client.v2.model.DORADeploymentsListResponse; import com.datadog.api.client.v2.model.DORAListDeploymentsRequest; import com.datadog.api.client.v2.model.DORAListDeploymentsRequestAttributes; import com.datadog.api.client.v2.model.DORAListDeploymentsRequestData; import com.datadog.api.client.v2.model.DORAListDeploymentsRequestDataType; -import com.datadog.api.client.v2.model.DORAListResponse; import java.time.OffsetDateTime; public class Example { @@ -27,7 +27,7 @@ public static void main(String[] args) { .type(DORAListDeploymentsRequestDataType.DORA_DEPLOYMENTS_LIST_REQUEST)); try { - DORAListResponse result = apiInstance.listDORADeployments(body); + DORADeploymentsListResponse result = apiInstance.listDORADeployments(body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling DoraMetricsApi#listDORADeployments"); diff --git a/examples/v2/dora-metrics/ListDORAFailures.java b/examples/v2/dora-metrics/ListDORAFailures.java index dc0f181b69c..555266cd1eb 100644 --- a/examples/v2/dora-metrics/ListDORAFailures.java +++ b/examples/v2/dora-metrics/ListDORAFailures.java @@ -3,11 +3,11 @@ import com.datadog.api.client.ApiClient; import com.datadog.api.client.ApiException; import com.datadog.api.client.v2.api.DoraMetricsApi; +import com.datadog.api.client.v2.model.DORAFailuresListResponse; import com.datadog.api.client.v2.model.DORAListFailuresRequest; import com.datadog.api.client.v2.model.DORAListFailuresRequestAttributes; import com.datadog.api.client.v2.model.DORAListFailuresRequestData; import com.datadog.api.client.v2.model.DORAListFailuresRequestDataType; -import com.datadog.api.client.v2.model.DORAListResponse; import java.time.OffsetDateTime; public class Example { @@ -27,7 +27,7 @@ public static void main(String[] args) { .type(DORAListFailuresRequestDataType.DORA_FAILURES_LIST_REQUEST)); try { - DORAListResponse result = apiInstance.listDORAFailures(body); + DORAFailuresListResponse result = apiInstance.listDORAFailures(body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling DoraMetricsApi#listDORAFailures"); diff --git a/examples/v2/synthetics/CreateSyntheticsSuite.java b/examples/v2/synthetics/CreateSyntheticsSuite.java new file mode 100644 index 00000000000..a09cfeb589d --- /dev/null +++ b/examples/v2/synthetics/CreateSyntheticsSuite.java @@ -0,0 +1,44 @@ +// Synthetics: Create a test suite returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.SyntheticsApi; +import com.datadog.api.client.v2.model.SuiteCreateEdit; +import com.datadog.api.client.v2.model.SuiteCreateEditRequest; +import com.datadog.api.client.v2.model.SyntheticsSuite; +import com.datadog.api.client.v2.model.SyntheticsSuiteOptions; +import com.datadog.api.client.v2.model.SyntheticsSuiteResponse; +import com.datadog.api.client.v2.model.SyntheticsSuiteType; +import com.datadog.api.client.v2.model.SyntheticsSuiteTypes; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + SyntheticsApi apiInstance = new SyntheticsApi(defaultClient); + + SuiteCreateEditRequest body = + new SuiteCreateEditRequest() + .data( + new SuiteCreateEdit() + .attributes( + new SyntheticsSuite() + .message("Notification message") + .name("Example suite name") + .options(new SyntheticsSuiteOptions()) + .tags(Collections.singletonList("env:production")) + .type(SyntheticsSuiteType.SUITE)) + .type(SyntheticsSuiteTypes.SUITES)); + + try { + SyntheticsSuiteResponse result = apiInstance.createSyntheticsSuite(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SyntheticsApi#createSyntheticsSuite"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/synthetics/DeleteSyntheticsSuites.java b/examples/v2/synthetics/DeleteSyntheticsSuites.java new file mode 100644 index 00000000000..1b4089317bd --- /dev/null +++ b/examples/v2/synthetics/DeleteSyntheticsSuites.java @@ -0,0 +1,38 @@ +// Synthetics: Bulk delete suites returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.SyntheticsApi; +import com.datadog.api.client.v2.model.DeletedSuitesRequestDelete; +import com.datadog.api.client.v2.model.DeletedSuitesRequestDeleteAttributes; +import com.datadog.api.client.v2.model.DeletedSuitesRequestDeleteRequest; +import com.datadog.api.client.v2.model.DeletedSuitesRequestType; +import com.datadog.api.client.v2.model.DeletedSuitesResponse; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + SyntheticsApi apiInstance = new SyntheticsApi(defaultClient); + + DeletedSuitesRequestDeleteRequest body = + new DeletedSuitesRequestDeleteRequest() + .data( + new DeletedSuitesRequestDelete() + .attributes( + new DeletedSuitesRequestDeleteAttributes() + .publicIds(Collections.singletonList(""))) + .type(DeletedSuitesRequestType.DELETE_SUITES_REQUEST)); + + try { + DeletedSuitesResponse result = apiInstance.deleteSyntheticsSuites(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SyntheticsApi#deleteSyntheticsSuites"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/synthetics/EditSyntheticsSuite.java b/examples/v2/synthetics/EditSyntheticsSuite.java new file mode 100644 index 00000000000..857f96ea08f --- /dev/null +++ b/examples/v2/synthetics/EditSyntheticsSuite.java @@ -0,0 +1,52 @@ +// Synthetics: edit a test suite returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.SyntheticsApi; +import com.datadog.api.client.v2.model.SuiteCreateEdit; +import com.datadog.api.client.v2.model.SuiteCreateEditRequest; +import com.datadog.api.client.v2.model.SyntheticsSuite; +import com.datadog.api.client.v2.model.SyntheticsSuiteOptions; +import com.datadog.api.client.v2.model.SyntheticsSuiteResponse; +import com.datadog.api.client.v2.model.SyntheticsSuiteTest; +import com.datadog.api.client.v2.model.SyntheticsSuiteTestAlertingCriticality; +import com.datadog.api.client.v2.model.SyntheticsSuiteType; +import com.datadog.api.client.v2.model.SyntheticsSuiteTypes; +import java.util.Collections; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + SyntheticsApi apiInstance = new SyntheticsApi(defaultClient); + + SuiteCreateEditRequest body = + new SuiteCreateEditRequest() + .data( + new SuiteCreateEdit() + .attributes( + new SyntheticsSuite() + .message("Notification message") + .name("Example suite name") + .options(new SyntheticsSuiteOptions()) + .tags(Collections.singletonList("env:production")) + .tests( + Collections.singletonList( + new SyntheticsSuiteTest() + .alertingCriticality( + SyntheticsSuiteTestAlertingCriticality.CRITICAL) + .publicId(""))) + .type(SyntheticsSuiteType.SUITE)) + .type(SyntheticsSuiteTypes.SUITES)); + + try { + SyntheticsSuiteResponse result = apiInstance.editSyntheticsSuite("public_id", body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SyntheticsApi#editSyntheticsSuite"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/synthetics/GetSyntheticsSuite.java b/examples/v2/synthetics/GetSyntheticsSuite.java new file mode 100644 index 00000000000..f86901b6449 --- /dev/null +++ b/examples/v2/synthetics/GetSyntheticsSuite.java @@ -0,0 +1,24 @@ +// Synthetics: Get a suite returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.SyntheticsApi; +import com.datadog.api.client.v2.model.SyntheticsSuiteResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + SyntheticsApi apiInstance = new SyntheticsApi(defaultClient); + + try { + SyntheticsSuiteResponse result = apiInstance.getSyntheticsSuite("public_id"); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SyntheticsApi#getSyntheticsSuite"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/synthetics/SearchSuites.java b/examples/v2/synthetics/SearchSuites.java new file mode 100644 index 00000000000..60a2bd8f983 --- /dev/null +++ b/examples/v2/synthetics/SearchSuites.java @@ -0,0 +1,24 @@ +// Search Synthetics suites returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.SyntheticsApi; +import com.datadog.api.client.v2.model.SyntheticsSuiteSearchResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + SyntheticsApi apiInstance = new SyntheticsApi(defaultClient); + + try { + SyntheticsSuiteSearchResponse result = apiInstance.searchSuites(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SyntheticsApi#searchSuites"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/src/main/java/com/datadog/api/client/v2/api/DoraMetricsApi.java b/src/main/java/com/datadog/api/client/v2/api/DoraMetricsApi.java index 74172e6088e..4bcd3e5359e 100644 --- a/src/main/java/com/datadog/api/client/v2/api/DoraMetricsApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/DoraMetricsApi.java @@ -4,14 +4,16 @@ import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; +import com.datadog.api.client.v2.model.DORADeploymentFetchResponse; import com.datadog.api.client.v2.model.DORADeploymentRequest; import com.datadog.api.client.v2.model.DORADeploymentResponse; +import com.datadog.api.client.v2.model.DORADeploymentsListResponse; +import com.datadog.api.client.v2.model.DORAFailureFetchResponse; import com.datadog.api.client.v2.model.DORAFailureRequest; import com.datadog.api.client.v2.model.DORAFailureResponse; -import com.datadog.api.client.v2.model.DORAFetchResponse; +import com.datadog.api.client.v2.model.DORAFailuresListResponse; import com.datadog.api.client.v2.model.DORAListDeploymentsRequest; import com.datadog.api.client.v2.model.DORAListFailuresRequest; -import com.datadog.api.client.v2.model.DORAListResponse; import jakarta.ws.rs.client.Invocation; import jakarta.ws.rs.core.GenericType; import java.util.ArrayList; @@ -741,10 +743,10 @@ public CompletableFuture> deleteDORAFailureWithHttpInfoAsync(S *

See {@link #getDORADeploymentWithHttpInfo}. * * @param deploymentId The ID of the deployment event. (required) - * @return DORAFetchResponse + * @return DORADeploymentFetchResponse * @throws ApiException if fails to make API call */ - public DORAFetchResponse getDORADeployment(String deploymentId) throws ApiException { + public DORADeploymentFetchResponse getDORADeployment(String deploymentId) throws ApiException { return getDORADeploymentWithHttpInfo(deploymentId).getData(); } @@ -754,9 +756,10 @@ public DORAFetchResponse getDORADeployment(String deploymentId) throws ApiExcept *

See {@link #getDORADeploymentWithHttpInfoAsync}. * * @param deploymentId The ID of the deployment event. (required) - * @return CompletableFuture<DORAFetchResponse> + * @return CompletableFuture<DORADeploymentFetchResponse> */ - public CompletableFuture getDORADeploymentAsync(String deploymentId) { + public CompletableFuture getDORADeploymentAsync( + String deploymentId) { return getDORADeploymentWithHttpInfoAsync(deploymentId) .thenApply( response -> { @@ -768,7 +771,7 @@ public CompletableFuture getDORADeploymentAsync(String deploy * Use this API endpoint to get a deployment event. * * @param deploymentId The ID of the deployment event. (required) - * @return ApiResponse<DORAFetchResponse> + * @return ApiResponse<DORADeploymentFetchResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -780,7 +783,7 @@ public CompletableFuture getDORADeploymentAsync(String deploy * *
429 Too many requests -
*/ - public ApiResponse getDORADeploymentWithHttpInfo(String deploymentId) + public ApiResponse getDORADeploymentWithHttpInfo(String deploymentId) throws ApiException { Object localVarPostBody = null; @@ -814,7 +817,7 @@ public ApiResponse getDORADeploymentWithHttpInfo(String deplo localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** @@ -823,15 +826,16 @@ public ApiResponse getDORADeploymentWithHttpInfo(String deplo *

See {@link #getDORADeploymentWithHttpInfo}. * * @param deploymentId The ID of the deployment event. (required) - * @return CompletableFuture<ApiResponse<DORAFetchResponse>> + * @return CompletableFuture<ApiResponse<DORADeploymentFetchResponse>> */ - public CompletableFuture> getDORADeploymentWithHttpInfoAsync( - String deploymentId) { + public CompletableFuture> + getDORADeploymentWithHttpInfoAsync(String deploymentId) { Object localVarPostBody = null; // verify the required parameter 'deploymentId' is set if (deploymentId == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, "Missing the required parameter 'deploymentId' when calling getDORADeployment")); @@ -857,7 +861,8 @@ public CompletableFuture> getDORADeploymentWithHt new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -869,7 +874,7 @@ public CompletableFuture> getDORADeploymentWithHt localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** @@ -878,10 +883,10 @@ public CompletableFuture> getDORADeploymentWithHt *

See {@link #getDORAFailureWithHttpInfo}. * * @param failureId The ID of the failure event. (required) - * @return DORAFetchResponse + * @return DORAFailureFetchResponse * @throws ApiException if fails to make API call */ - public DORAFetchResponse getDORAFailure(String failureId) throws ApiException { + public DORAFailureFetchResponse getDORAFailure(String failureId) throws ApiException { return getDORAFailureWithHttpInfo(failureId).getData(); } @@ -891,9 +896,9 @@ public DORAFetchResponse getDORAFailure(String failureId) throws ApiException { *

See {@link #getDORAFailureWithHttpInfoAsync}. * * @param failureId The ID of the failure event. (required) - * @return CompletableFuture<DORAFetchResponse> + * @return CompletableFuture<DORAFailureFetchResponse> */ - public CompletableFuture getDORAFailureAsync(String failureId) { + public CompletableFuture getDORAFailureAsync(String failureId) { return getDORAFailureWithHttpInfoAsync(failureId) .thenApply( response -> { @@ -905,7 +910,7 @@ public CompletableFuture getDORAFailureAsync(String failureId * Use this API endpoint to get a failure event. * * @param failureId The ID of the failure event. (required) - * @return ApiResponse<DORAFetchResponse> + * @return ApiResponse<DORAFailureFetchResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -917,7 +922,7 @@ public CompletableFuture getDORAFailureAsync(String failureId * *
429 Too many requests -
*/ - public ApiResponse getDORAFailureWithHttpInfo(String failureId) + public ApiResponse getDORAFailureWithHttpInfo(String failureId) throws ApiException { Object localVarPostBody = null; @@ -950,7 +955,7 @@ public ApiResponse getDORAFailureWithHttpInfo(String failureI localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** @@ -959,15 +964,15 @@ public ApiResponse getDORAFailureWithHttpInfo(String failureI *

See {@link #getDORAFailureWithHttpInfo}. * * @param failureId The ID of the failure event. (required) - * @return CompletableFuture<ApiResponse<DORAFetchResponse>> + * @return CompletableFuture<ApiResponse<DORAFailureFetchResponse>> */ - public CompletableFuture> getDORAFailureWithHttpInfoAsync( + public CompletableFuture> getDORAFailureWithHttpInfoAsync( String failureId) { Object localVarPostBody = null; // verify the required parameter 'failureId' is set if (failureId == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, "Missing the required parameter 'failureId' when calling getDORAFailure")); @@ -992,7 +997,7 @@ public CompletableFuture> getDORAFailureWithHttpI new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -1004,7 +1009,7 @@ public CompletableFuture> getDORAFailureWithHttpI localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** @@ -1013,10 +1018,11 @@ public CompletableFuture> getDORAFailureWithHttpI *

See {@link #listDORADeploymentsWithHttpInfo}. * * @param body (required) - * @return DORAListResponse + * @return DORADeploymentsListResponse * @throws ApiException if fails to make API call */ - public DORAListResponse listDORADeployments(DORAListDeploymentsRequest body) throws ApiException { + public DORADeploymentsListResponse listDORADeployments(DORAListDeploymentsRequest body) + throws ApiException { return listDORADeploymentsWithHttpInfo(body).getData(); } @@ -1026,9 +1032,9 @@ public DORAListResponse listDORADeployments(DORAListDeploymentsRequest body) thr *

See {@link #listDORADeploymentsWithHttpInfoAsync}. * * @param body (required) - * @return CompletableFuture<DORAListResponse> + * @return CompletableFuture<DORADeploymentsListResponse> */ - public CompletableFuture listDORADeploymentsAsync( + public CompletableFuture listDORADeploymentsAsync( DORAListDeploymentsRequest body) { return listDORADeploymentsWithHttpInfoAsync(body) .thenApply( @@ -1041,7 +1047,7 @@ public CompletableFuture listDORADeploymentsAsync( * Use this API endpoint to get a list of deployment events. * * @param body (required) - * @return ApiResponse<DORAListResponse> + * @return ApiResponse<DORADeploymentsListResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -1053,7 +1059,7 @@ public CompletableFuture listDORADeploymentsAsync( * *
429 Too many requests -
*/ - public ApiResponse listDORADeploymentsWithHttpInfo( + public ApiResponse listDORADeploymentsWithHttpInfo( DORAListDeploymentsRequest body) throws ApiException { Object localVarPostBody = body; @@ -1084,7 +1090,7 @@ public ApiResponse listDORADeploymentsWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** @@ -1093,15 +1099,16 @@ public ApiResponse listDORADeploymentsWithHttpInfo( *

See {@link #listDORADeploymentsWithHttpInfo}. * * @param body (required) - * @return CompletableFuture<ApiResponse<DORAListResponse>> + * @return CompletableFuture<ApiResponse<DORADeploymentsListResponse>> */ - public CompletableFuture> listDORADeploymentsWithHttpInfoAsync( - DORAListDeploymentsRequest body) { + public CompletableFuture> + listDORADeploymentsWithHttpInfoAsync(DORAListDeploymentsRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, "Missing the required parameter 'body' when calling listDORADeployments")); @@ -1124,7 +1131,8 @@ public CompletableFuture> listDORADeploymentsWithH new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -1136,7 +1144,7 @@ public CompletableFuture> listDORADeploymentsWithH localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** @@ -1145,10 +1153,11 @@ public CompletableFuture> listDORADeploymentsWithH *

See {@link #listDORAFailuresWithHttpInfo}. * * @param body (required) - * @return DORAListResponse + * @return DORAFailuresListResponse * @throws ApiException if fails to make API call */ - public DORAListResponse listDORAFailures(DORAListFailuresRequest body) throws ApiException { + public DORAFailuresListResponse listDORAFailures(DORAListFailuresRequest body) + throws ApiException { return listDORAFailuresWithHttpInfo(body).getData(); } @@ -1158,9 +1167,10 @@ public DORAListResponse listDORAFailures(DORAListFailuresRequest body) throws Ap *

See {@link #listDORAFailuresWithHttpInfoAsync}. * * @param body (required) - * @return CompletableFuture<DORAListResponse> + * @return CompletableFuture<DORAFailuresListResponse> */ - public CompletableFuture listDORAFailuresAsync(DORAListFailuresRequest body) { + public CompletableFuture listDORAFailuresAsync( + DORAListFailuresRequest body) { return listDORAFailuresWithHttpInfoAsync(body) .thenApply( response -> { @@ -1172,7 +1182,7 @@ public CompletableFuture listDORAFailuresAsync(DORAListFailure * Use this API endpoint to get a list of failure events. * * @param body (required) - * @return ApiResponse<DORAListResponse> + * @return ApiResponse<DORAFailuresListResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -1184,8 +1194,8 @@ public CompletableFuture listDORAFailuresAsync(DORAListFailure * *
429 Too many requests -
*/ - public ApiResponse listDORAFailuresWithHttpInfo(DORAListFailuresRequest body) - throws ApiException { + public ApiResponse listDORAFailuresWithHttpInfo( + DORAListFailuresRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set @@ -1215,7 +1225,7 @@ public ApiResponse listDORAFailuresWithHttpInfo(DORAListFailur localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** @@ -1224,15 +1234,15 @@ public ApiResponse listDORAFailuresWithHttpInfo(DORAListFailur *

See {@link #listDORAFailuresWithHttpInfo}. * * @param body (required) - * @return CompletableFuture<ApiResponse<DORAListResponse>> + * @return CompletableFuture<ApiResponse<DORAFailuresListResponse>> */ - public CompletableFuture> listDORAFailuresWithHttpInfoAsync( + public CompletableFuture> listDORAFailuresWithHttpInfoAsync( DORAListFailuresRequest body) { Object localVarPostBody = body; // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, "Missing the required parameter 'body' when calling listDORAFailures")); @@ -1255,7 +1265,7 @@ public CompletableFuture> listDORAFailuresWithHttp new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -1267,6 +1277,6 @@ public CompletableFuture> listDORAFailuresWithHttp localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } } diff --git a/src/main/java/com/datadog/api/client/v2/api/SyntheticsApi.java b/src/main/java/com/datadog/api/client/v2/api/SyntheticsApi.java index 22822b322e3..f8415712754 100644 --- a/src/main/java/com/datadog/api/client/v2/api/SyntheticsApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/SyntheticsApi.java @@ -4,12 +4,18 @@ import com.datadog.api.client.ApiException; import com.datadog.api.client.ApiResponse; import com.datadog.api.client.Pair; +import com.datadog.api.client.v2.model.DeletedSuitesRequestDeleteRequest; +import com.datadog.api.client.v2.model.DeletedSuitesResponse; import com.datadog.api.client.v2.model.OnDemandConcurrencyCapAttributes; import com.datadog.api.client.v2.model.OnDemandConcurrencyCapResponse; +import com.datadog.api.client.v2.model.SuiteCreateEditRequest; +import com.datadog.api.client.v2.model.SyntheticsSuiteResponse; +import com.datadog.api.client.v2.model.SyntheticsSuiteSearchResponse; import jakarta.ws.rs.client.Invocation; import jakarta.ws.rs.core.GenericType; import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; import java.util.concurrent.CompletableFuture; @@ -44,6 +50,419 @@ public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } + /** + * Synthetics: Create a test suite. + * + *

See {@link #createSyntheticsSuiteWithHttpInfo}. + * + * @param body (required) + * @return SyntheticsSuiteResponse + * @throws ApiException if fails to make API call + */ + public SyntheticsSuiteResponse createSyntheticsSuite(SuiteCreateEditRequest body) + throws ApiException { + return createSyntheticsSuiteWithHttpInfo(body).getData(); + } + + /** + * Synthetics: Create a test suite. + * + *

See {@link #createSyntheticsSuiteWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<SyntheticsSuiteResponse> + */ + public CompletableFuture createSyntheticsSuiteAsync( + SuiteCreateEditRequest body) { + return createSyntheticsSuiteWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * @param body (required) + * @return ApiResponse<SyntheticsSuiteResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 API error response. -
429 Too many requests -
+ */ + public ApiResponse createSyntheticsSuiteWithHttpInfo( + SuiteCreateEditRequest body) throws ApiException { + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling createSyntheticsSuite"); + } + // create path and map variables + String localVarPath = "/api/v2/synthetics/suites"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.SyntheticsApi.createSyntheticsSuite", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Synthetics: Create a test suite. + * + *

See {@link #createSyntheticsSuiteWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<SyntheticsSuiteResponse>> + */ + public CompletableFuture> + createSyntheticsSuiteWithHttpInfoAsync(SuiteCreateEditRequest body) { + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling createSyntheticsSuite")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/synthetics/suites"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.SyntheticsApi.createSyntheticsSuite", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Synthetics: Bulk delete suites. + * + *

See {@link #deleteSyntheticsSuitesWithHttpInfo}. + * + * @param body (required) + * @return DeletedSuitesResponse + * @throws ApiException if fails to make API call + */ + public DeletedSuitesResponse deleteSyntheticsSuites(DeletedSuitesRequestDeleteRequest body) + throws ApiException { + return deleteSyntheticsSuitesWithHttpInfo(body).getData(); + } + + /** + * Synthetics: Bulk delete suites. + * + *

See {@link #deleteSyntheticsSuitesWithHttpInfoAsync}. + * + * @param body (required) + * @return CompletableFuture<DeletedSuitesResponse> + */ + public CompletableFuture deleteSyntheticsSuitesAsync( + DeletedSuitesRequestDeleteRequest body) { + return deleteSyntheticsSuitesWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * @param body (required) + * @return ApiResponse<DeletedSuitesResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 API error response. -
429 Too many requests -
+ */ + public ApiResponse deleteSyntheticsSuitesWithHttpInfo( + DeletedSuitesRequestDeleteRequest body) throws ApiException { + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling deleteSyntheticsSuites"); + } + // create path and map variables + String localVarPath = "/api/v2/synthetics/suites/bulk-delete"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.SyntheticsApi.deleteSyntheticsSuites", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Synthetics: Bulk delete suites. + * + *

See {@link #deleteSyntheticsSuitesWithHttpInfo}. + * + * @param body (required) + * @return CompletableFuture<ApiResponse<DeletedSuitesResponse>> + */ + public CompletableFuture> + deleteSyntheticsSuitesWithHttpInfoAsync(DeletedSuitesRequestDeleteRequest body) { + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling deleteSyntheticsSuites")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/synthetics/suites/bulk-delete"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.SyntheticsApi.deleteSyntheticsSuites", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Synthetics: edit a test suite. + * + *

See {@link #editSyntheticsSuiteWithHttpInfo}. + * + * @param publicId The public ID of the suite to edit. (required) + * @param body New suite details to be saved. (required) + * @return SyntheticsSuiteResponse + * @throws ApiException if fails to make API call + */ + public SyntheticsSuiteResponse editSyntheticsSuite(String publicId, SuiteCreateEditRequest body) + throws ApiException { + return editSyntheticsSuiteWithHttpInfo(publicId, body).getData(); + } + + /** + * Synthetics: edit a test suite. + * + *

See {@link #editSyntheticsSuiteWithHttpInfoAsync}. + * + * @param publicId The public ID of the suite to edit. (required) + * @param body New suite details to be saved. (required) + * @return CompletableFuture<SyntheticsSuiteResponse> + */ + public CompletableFuture editSyntheticsSuiteAsync( + String publicId, SuiteCreateEditRequest body) { + return editSyntheticsSuiteWithHttpInfoAsync(publicId, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * @param publicId The public ID of the suite to edit. (required) + * @param body New suite details to be saved. (required) + * @return ApiResponse<SyntheticsSuiteResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 API error response. -
429 Too many requests -
+ */ + public ApiResponse editSyntheticsSuiteWithHttpInfo( + String publicId, SuiteCreateEditRequest body) throws ApiException { + Object localVarPostBody = body; + + // verify the required parameter 'publicId' is set + if (publicId == null) { + throw new ApiException( + 400, "Missing the required parameter 'publicId' when calling editSyntheticsSuite"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling editSyntheticsSuite"); + } + // create path and map variables + String localVarPath = + "/api/v2/synthetics/suites/{public_id}" + .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.SyntheticsApi.editSyntheticsSuite", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "PUT", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Synthetics: edit a test suite. + * + *

See {@link #editSyntheticsSuiteWithHttpInfo}. + * + * @param publicId The public ID of the suite to edit. (required) + * @param body New suite details to be saved. (required) + * @return CompletableFuture<ApiResponse<SyntheticsSuiteResponse>> + */ + public CompletableFuture> + editSyntheticsSuiteWithHttpInfoAsync(String publicId, SuiteCreateEditRequest body) { + Object localVarPostBody = body; + + // verify the required parameter 'publicId' is set + if (publicId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'publicId' when calling editSyntheticsSuite")); + return result; + } + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling editSyntheticsSuite")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/synthetics/suites/{public_id}" + .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.SyntheticsApi.editSyntheticsSuite", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "PUT", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + /** * Get the on-demand concurrency cap. * @@ -155,6 +574,373 @@ public ApiResponse getOnDemandConcurrencyCapWith new GenericType() {}); } + /** + * Synthetics: Get a suite. + * + *

See {@link #getSyntheticsSuiteWithHttpInfo}. + * + * @param publicId The public ID of the suite to get details from. (required) + * @return SyntheticsSuiteResponse + * @throws ApiException if fails to make API call + */ + public SyntheticsSuiteResponse getSyntheticsSuite(String publicId) throws ApiException { + return getSyntheticsSuiteWithHttpInfo(publicId).getData(); + } + + /** + * Synthetics: Get a suite. + * + *

See {@link #getSyntheticsSuiteWithHttpInfoAsync}. + * + * @param publicId The public ID of the suite to get details from. (required) + * @return CompletableFuture<SyntheticsSuiteResponse> + */ + public CompletableFuture getSyntheticsSuiteAsync(String publicId) { + return getSyntheticsSuiteWithHttpInfoAsync(publicId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * @param publicId The public ID of the suite to get details from. (required) + * @return ApiResponse<SyntheticsSuiteResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
404 API error response. -
429 Too many requests -
+ */ + public ApiResponse getSyntheticsSuiteWithHttpInfo(String publicId) + throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'publicId' is set + if (publicId == null) { + throw new ApiException( + 400, "Missing the required parameter 'publicId' when calling getSyntheticsSuite"); + } + // create path and map variables + String localVarPath = + "/api/v2/synthetics/suites/{public_id}" + .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.SyntheticsApi.getSyntheticsSuite", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Synthetics: Get a suite. + * + *

See {@link #getSyntheticsSuiteWithHttpInfo}. + * + * @param publicId The public ID of the suite to get details from. (required) + * @return CompletableFuture<ApiResponse<SyntheticsSuiteResponse>> + */ + public CompletableFuture> + getSyntheticsSuiteWithHttpInfoAsync(String publicId) { + Object localVarPostBody = null; + + // verify the required parameter 'publicId' is set + if (publicId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'publicId' when calling getSyntheticsSuite")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/synthetics/suites/{public_id}" + .replaceAll("\\{" + "public_id" + "\\}", apiClient.escapeString(publicId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.SyntheticsApi.getSyntheticsSuite", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to searchSuites. */ + public static class SearchSuitesOptionalParameters { + private String query; + private String sort; + private Boolean facetsOnly; + private Long start; + private Long count; + + /** + * Set query. + * + * @param query The search query. (optional) + * @return SearchSuitesOptionalParameters + */ + public SearchSuitesOptionalParameters query(String query) { + this.query = query; + return this; + } + + /** + * Set sort. + * + * @param sort The sort order for the results (e.g., name,asc or name,desc + * ). (optional, default to "name,asc") + * @return SearchSuitesOptionalParameters + */ + public SearchSuitesOptionalParameters sort(String sort) { + this.sort = sort; + return this; + } + + /** + * Set facetsOnly. + * + * @param facetsOnly If true, return only facets instead of full test details. (optional, + * default to false) + * @return SearchSuitesOptionalParameters + */ + public SearchSuitesOptionalParameters facetsOnly(Boolean facetsOnly) { + this.facetsOnly = facetsOnly; + return this; + } + + /** + * Set start. + * + * @param start The offset from which to start returning results. (optional, default to 0) + * @return SearchSuitesOptionalParameters + */ + public SearchSuitesOptionalParameters start(Long start) { + this.start = start; + return this; + } + + /** + * Set count. + * + * @param count The maximum number of results to return. (optional, default to 50) + * @return SearchSuitesOptionalParameters + */ + public SearchSuitesOptionalParameters count(Long count) { + this.count = count; + return this; + } + } + + /** + * Search Synthetics suites. + * + *

See {@link #searchSuitesWithHttpInfo}. + * + * @return SyntheticsSuiteSearchResponse + * @throws ApiException if fails to make API call + */ + public SyntheticsSuiteSearchResponse searchSuites() throws ApiException { + return searchSuitesWithHttpInfo(new SearchSuitesOptionalParameters()).getData(); + } + + /** + * Search Synthetics suites. + * + *

See {@link #searchSuitesWithHttpInfoAsync}. + * + * @return CompletableFuture<SyntheticsSuiteSearchResponse> + */ + public CompletableFuture searchSuitesAsync() { + return searchSuitesWithHttpInfoAsync(new SearchSuitesOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Search Synthetics suites. + * + *

See {@link #searchSuitesWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return SyntheticsSuiteSearchResponse + * @throws ApiException if fails to make API call + */ + public SyntheticsSuiteSearchResponse searchSuites(SearchSuitesOptionalParameters parameters) + throws ApiException { + return searchSuitesWithHttpInfo(parameters).getData(); + } + + /** + * Search Synthetics suites. + * + *

See {@link #searchSuitesWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<SyntheticsSuiteSearchResponse> + */ + public CompletableFuture searchSuitesAsync( + SearchSuitesOptionalParameters parameters) { + return searchSuitesWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Search for Synthetics suites. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<SyntheticsSuiteSearchResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 API error response. -
429 Too many requests -
+ */ + public ApiResponse searchSuitesWithHttpInfo( + SearchSuitesOptionalParameters parameters) throws ApiException { + Object localVarPostBody = null; + String query = parameters.query; + String sort = parameters.sort; + Boolean facetsOnly = parameters.facetsOnly; + Long start = parameters.start; + Long count = parameters.count; + // create path and map variables + String localVarPath = "/api/v2/synthetics/suites/search"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "facets_only", facetsOnly)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "start", start)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "count", count)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.SyntheticsApi.searchSuites", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Search Synthetics suites. + * + *

See {@link #searchSuitesWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<SyntheticsSuiteSearchResponse>> + */ + public CompletableFuture> + searchSuitesWithHttpInfoAsync(SearchSuitesOptionalParameters parameters) { + Object localVarPostBody = null; + String query = parameters.query; + String sort = parameters.sort; + Boolean facetsOnly = parameters.facetsOnly; + Long start = parameters.start; + Long count = parameters.count; + // create path and map variables + String localVarPath = "/api/v2/synthetics/suites/search"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "facets_only", facetsOnly)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "start", start)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "count", count)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.SyntheticsApi.searchSuites", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + /** * Save new value for on-demand concurrency cap. * diff --git a/src/main/java/com/datadog/api/client/v2/model/DORADeploymentFetchResponse.java b/src/main/java/com/datadog/api/client/v2/model/DORADeploymentFetchResponse.java new file mode 100644 index 00000000000..df8b7be5594 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DORADeploymentFetchResponse.java @@ -0,0 +1,137 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response for fetching a single deployment event. */ +@JsonPropertyOrder({DORADeploymentFetchResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DORADeploymentFetchResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private DORADeploymentObject data; + + public DORADeploymentFetchResponse data(DORADeploymentObject data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * A DORA deployment event. + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DORADeploymentObject getData() { + return data; + } + + public void setData(DORADeploymentObject data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return DORADeploymentFetchResponse + */ + @JsonAnySetter + public DORADeploymentFetchResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this DORADeploymentFetchResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DORADeploymentFetchResponse doraDeploymentFetchResponse = (DORADeploymentFetchResponse) o; + return Objects.equals(this.data, doraDeploymentFetchResponse.data) + && Objects.equals( + this.additionalProperties, doraDeploymentFetchResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DORADeploymentFetchResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DORADeploymentObject.java b/src/main/java/com/datadog/api/client/v2/model/DORADeploymentObject.java new file mode 100644 index 00000000000..eae9d3ebacf --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DORADeploymentObject.java @@ -0,0 +1,196 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A DORA deployment event. */ +@JsonPropertyOrder({ + DORADeploymentObject.JSON_PROPERTY_ATTRIBUTES, + DORADeploymentObject.JSON_PROPERTY_ID, + DORADeploymentObject.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DORADeploymentObject { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private DORADeploymentObjectAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private DORADeploymentType type = DORADeploymentType.DORA_DEPLOYMENT; + + public DORADeploymentObject attributes(DORADeploymentObjectAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * The attributes of the deployment event. + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DORADeploymentObjectAttributes getAttributes() { + return attributes; + } + + public void setAttributes(DORADeploymentObjectAttributes attributes) { + this.attributes = attributes; + } + + public DORADeploymentObject id(String id) { + this.id = id; + return this; + } + + /** + * The ID of the deployment event. + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public DORADeploymentObject type(DORADeploymentType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * JSON:API type for DORA deployment events. + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DORADeploymentType getType() { + return type; + } + + public void setType(DORADeploymentType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return DORADeploymentObject + */ + @JsonAnySetter + public DORADeploymentObject putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this DORADeploymentObject object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DORADeploymentObject doraDeploymentObject = (DORADeploymentObject) o; + return Objects.equals(this.attributes, doraDeploymentObject.attributes) + && Objects.equals(this.id, doraDeploymentObject.id) + && Objects.equals(this.type, doraDeploymentObject.type) + && Objects.equals(this.additionalProperties, doraDeploymentObject.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DORADeploymentObject {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DORADeploymentObjectAttributes.java b/src/main/java/com/datadog/api/client/v2/model/DORADeploymentObjectAttributes.java new file mode 100644 index 00000000000..7ca9d60809e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DORADeploymentObjectAttributes.java @@ -0,0 +1,366 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** The attributes of the deployment event. */ +@JsonPropertyOrder({ + DORADeploymentObjectAttributes.JSON_PROPERTY_CUSTOM_TAGS, + DORADeploymentObjectAttributes.JSON_PROPERTY_ENV, + DORADeploymentObjectAttributes.JSON_PROPERTY_FINISHED_AT, + DORADeploymentObjectAttributes.JSON_PROPERTY_GIT, + DORADeploymentObjectAttributes.JSON_PROPERTY_SERVICE, + DORADeploymentObjectAttributes.JSON_PROPERTY_STARTED_AT, + DORADeploymentObjectAttributes.JSON_PROPERTY_TEAM, + DORADeploymentObjectAttributes.JSON_PROPERTY_VERSION +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DORADeploymentObjectAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CUSTOM_TAGS = "custom_tags"; + private JsonNullable> customTags = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_ENV = "env"; + private String env; + + public static final String JSON_PROPERTY_FINISHED_AT = "finished_at"; + private Long finishedAt; + + public static final String JSON_PROPERTY_GIT = "git"; + private DORAGitInfo git; + + public static final String JSON_PROPERTY_SERVICE = "service"; + private String service; + + public static final String JSON_PROPERTY_STARTED_AT = "started_at"; + private Long startedAt; + + public static final String JSON_PROPERTY_TEAM = "team"; + private String team; + + public static final String JSON_PROPERTY_VERSION = "version"; + private String version; + + public DORADeploymentObjectAttributes() {} + + @JsonCreator + public DORADeploymentObjectAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_FINISHED_AT) Long finishedAt, + @JsonProperty(required = true, value = JSON_PROPERTY_SERVICE) String service, + @JsonProperty(required = true, value = JSON_PROPERTY_STARTED_AT) Long startedAt) { + this.finishedAt = finishedAt; + this.service = service; + this.startedAt = startedAt; + } + + public DORADeploymentObjectAttributes customTags(List customTags) { + this.customTags = JsonNullable.>of(customTags); + return this; + } + + public DORADeploymentObjectAttributes addCustomTagsItem(String customTagsItem) { + if (this.customTags == null || !this.customTags.isPresent()) { + this.customTags = JsonNullable.>of(new ArrayList<>()); + } + try { + this.customTags.get().add(customTagsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * A list of user-defined tags. The tags must follow the key:value pattern. Up to 100 + * may be added per event. + * + * @return customTags + */ + @jakarta.annotation.Nullable + @JsonIgnore + public List getCustomTags() { + return customTags.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CUSTOM_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable> getCustomTags_JsonNullable() { + return customTags; + } + + @JsonProperty(JSON_PROPERTY_CUSTOM_TAGS) + public void setCustomTags_JsonNullable(JsonNullable> customTags) { + this.customTags = customTags; + } + + public void setCustomTags(List customTags) { + this.customTags = JsonNullable.>of(customTags); + } + + public DORADeploymentObjectAttributes env(String env) { + this.env = env; + return this; + } + + /** + * Environment name to where the service was deployed. + * + * @return env + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENV) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEnv() { + return env; + } + + public void setEnv(String env) { + this.env = env; + } + + public DORADeploymentObjectAttributes finishedAt(Long finishedAt) { + this.finishedAt = finishedAt; + return this; + } + + /** + * Unix timestamp when the deployment finished. + * + * @return finishedAt + */ + @JsonProperty(JSON_PROPERTY_FINISHED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getFinishedAt() { + return finishedAt; + } + + public void setFinishedAt(Long finishedAt) { + this.finishedAt = finishedAt; + } + + public DORADeploymentObjectAttributes git(DORAGitInfo git) { + this.git = git; + this.unparsed |= git.unparsed; + return this; + } + + /** + * Git info for DORA Metrics events. + * + * @return git + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DORAGitInfo getGit() { + return git; + } + + public void setGit(DORAGitInfo git) { + this.git = git; + } + + public DORADeploymentObjectAttributes service(String service) { + this.service = service; + return this; + } + + /** + * Service name. + * + * @return service + */ + @JsonProperty(JSON_PROPERTY_SERVICE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getService() { + return service; + } + + public void setService(String service) { + this.service = service; + } + + public DORADeploymentObjectAttributes startedAt(Long startedAt) { + this.startedAt = startedAt; + return this; + } + + /** + * Unix timestamp when the deployment started. + * + * @return startedAt + */ + @JsonProperty(JSON_PROPERTY_STARTED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getStartedAt() { + return startedAt; + } + + public void setStartedAt(Long startedAt) { + this.startedAt = startedAt; + } + + public DORADeploymentObjectAttributes team(String team) { + this.team = team; + return this; + } + + /** + * Name of the team owning the deployed service. + * + * @return team + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEAM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTeam() { + return team; + } + + public void setTeam(String team) { + this.team = team; + } + + public DORADeploymentObjectAttributes version(String version) { + this.version = version; + return this; + } + + /** + * Version to correlate with APM Deployment Tracking. + * + * @return version + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return DORADeploymentObjectAttributes + */ + @JsonAnySetter + public DORADeploymentObjectAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this DORADeploymentObjectAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DORADeploymentObjectAttributes doraDeploymentObjectAttributes = + (DORADeploymentObjectAttributes) o; + return Objects.equals(this.customTags, doraDeploymentObjectAttributes.customTags) + && Objects.equals(this.env, doraDeploymentObjectAttributes.env) + && Objects.equals(this.finishedAt, doraDeploymentObjectAttributes.finishedAt) + && Objects.equals(this.git, doraDeploymentObjectAttributes.git) + && Objects.equals(this.service, doraDeploymentObjectAttributes.service) + && Objects.equals(this.startedAt, doraDeploymentObjectAttributes.startedAt) + && Objects.equals(this.team, doraDeploymentObjectAttributes.team) + && Objects.equals(this.version, doraDeploymentObjectAttributes.version) + && Objects.equals( + this.additionalProperties, doraDeploymentObjectAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + customTags, env, finishedAt, git, service, startedAt, team, version, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DORADeploymentObjectAttributes {\n"); + sb.append(" customTags: ").append(toIndentedString(customTags)).append("\n"); + sb.append(" env: ").append(toIndentedString(env)).append("\n"); + sb.append(" finishedAt: ").append(toIndentedString(finishedAt)).append("\n"); + sb.append(" git: ").append(toIndentedString(git)).append("\n"); + sb.append(" service: ").append(toIndentedString(service)).append("\n"); + sb.append(" startedAt: ").append(toIndentedString(startedAt)).append("\n"); + sb.append(" team: ").append(toIndentedString(team)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DORADeploymentsListResponse.java b/src/main/java/com/datadog/api/client/v2/model/DORADeploymentsListResponse.java new file mode 100644 index 00000000000..eeb731b59ad --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DORADeploymentsListResponse.java @@ -0,0 +1,150 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response for the list deployments endpoint. */ +@JsonPropertyOrder({DORADeploymentsListResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DORADeploymentsListResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = null; + + public DORADeploymentsListResponse data(List data) { + this.data = data; + for (DORADeploymentObject item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public DORADeploymentsListResponse addDataItem(DORADeploymentObject dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * The list of DORA deployment events. + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return DORADeploymentsListResponse + */ + @JsonAnySetter + public DORADeploymentsListResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this DORADeploymentsListResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DORADeploymentsListResponse doraDeploymentsListResponse = (DORADeploymentsListResponse) o; + return Objects.equals(this.data, doraDeploymentsListResponse.data) + && Objects.equals( + this.additionalProperties, doraDeploymentsListResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DORADeploymentsListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DORAFetchResponse.java b/src/main/java/com/datadog/api/client/v2/model/DORAFailureFetchResponse.java similarity index 79% rename from src/main/java/com/datadog/api/client/v2/model/DORAFetchResponse.java rename to src/main/java/com/datadog/api/client/v2/model/DORAFailureFetchResponse.java index b06321fae34..278530d0160 100644 --- a/src/main/java/com/datadog/api/client/v2/model/DORAFetchResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/DORAFailureFetchResponse.java @@ -16,34 +16,34 @@ import java.util.Map; import java.util.Objects; -/** Response for the DORA fetch endpoints. */ -@JsonPropertyOrder({DORAFetchResponse.JSON_PROPERTY_DATA}) +/** Response for fetching a single failure event. */ +@JsonPropertyOrder({DORAFailureFetchResponse.JSON_PROPERTY_DATA}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class DORAFetchResponse { +public class DORAFailureFetchResponse { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; - private DORAEvent data; + private DORAIncidentObject data; - public DORAFetchResponse data(DORAEvent data) { + public DORAFailureFetchResponse data(DORAIncidentObject data) { this.data = data; this.unparsed |= data.unparsed; return this; } /** - * A DORA event. + * A DORA incident event. * * @return data */ @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_DATA) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public DORAEvent getData() { + public DORAIncidentObject getData() { return data; } - public void setData(DORAEvent data) { + public void setData(DORAIncidentObject data) { this.data = data; } @@ -59,10 +59,10 @@ public void setData(DORAEvent data) { * * @param key The arbitrary key to set * @param value The associated value - * @return DORAFetchResponse + * @return DORAFailureFetchResponse */ @JsonAnySetter - public DORAFetchResponse putAdditionalProperty(String key, Object value) { + public DORAFailureFetchResponse putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -93,7 +93,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this DORAFetchResponse object is equal to o. */ + /** Return true if this DORAFailureFetchResponse object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -102,9 +102,9 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - DORAFetchResponse doraFetchResponse = (DORAFetchResponse) o; - return Objects.equals(this.data, doraFetchResponse.data) - && Objects.equals(this.additionalProperties, doraFetchResponse.additionalProperties); + DORAFailureFetchResponse doraFailureFetchResponse = (DORAFailureFetchResponse) o; + return Objects.equals(this.data, doraFailureFetchResponse.data) + && Objects.equals(this.additionalProperties, doraFailureFetchResponse.additionalProperties); } @Override @@ -115,7 +115,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class DORAFetchResponse {\n"); + sb.append("class DORAFailureFetchResponse {\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) diff --git a/src/main/java/com/datadog/api/client/v2/model/DORAFailuresListResponse.java b/src/main/java/com/datadog/api/client/v2/model/DORAFailuresListResponse.java new file mode 100644 index 00000000000..1860de0abf4 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DORAFailuresListResponse.java @@ -0,0 +1,149 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response for the list failures endpoint. */ +@JsonPropertyOrder({DORAFailuresListResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DORAFailuresListResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = null; + + public DORAFailuresListResponse data(List data) { + this.data = data; + for (DORAIncidentObject item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public DORAFailuresListResponse addDataItem(DORAIncidentObject dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * The list of DORA incident events. + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return DORAFailuresListResponse + */ + @JsonAnySetter + public DORAFailuresListResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this DORAFailuresListResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DORAFailuresListResponse doraFailuresListResponse = (DORAFailuresListResponse) o; + return Objects.equals(this.data, doraFailuresListResponse.data) + && Objects.equals(this.additionalProperties, doraFailuresListResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DORAFailuresListResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DORAEvent.java b/src/main/java/com/datadog/api/client/v2/model/DORAIncidentObject.java similarity index 73% rename from src/main/java/com/datadog/api/client/v2/model/DORAEvent.java rename to src/main/java/com/datadog/api/client/v2/model/DORAIncidentObject.java index 16d0764e0f1..31995912458 100644 --- a/src/main/java/com/datadog/api/client/v2/model/DORAEvent.java +++ b/src/main/java/com/datadog/api/client/v2/model/DORAIncidentObject.java @@ -16,53 +16,54 @@ import java.util.Map; import java.util.Objects; -/** A DORA event. */ +/** A DORA incident event. */ @JsonPropertyOrder({ - DORAEvent.JSON_PROPERTY_ATTRIBUTES, - DORAEvent.JSON_PROPERTY_ID, - DORAEvent.JSON_PROPERTY_TYPE + DORAIncidentObject.JSON_PROPERTY_ATTRIBUTES, + DORAIncidentObject.JSON_PROPERTY_ID, + DORAIncidentObject.JSON_PROPERTY_TYPE }) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class DORAEvent { +public class DORAIncidentObject { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; - private Object attributes; + private DORAIncidentObjectAttributes attributes; public static final String JSON_PROPERTY_ID = "id"; private String id; public static final String JSON_PROPERTY_TYPE = "type"; - private String type; + private DORAFailureType type = DORAFailureType.DORA_FAILURE; - public DORAEvent attributes(Object attributes) { + public DORAIncidentObject attributes(DORAIncidentObjectAttributes attributes) { this.attributes = attributes; + this.unparsed |= attributes.unparsed; return this; } /** - * The attributes of the event. + * The attributes of the incident event. * * @return attributes */ @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_ATTRIBUTES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Object getAttributes() { + public DORAIncidentObjectAttributes getAttributes() { return attributes; } - public void setAttributes(Object attributes) { + public void setAttributes(DORAIncidentObjectAttributes attributes) { this.attributes = attributes; } - public DORAEvent id(String id) { + public DORAIncidentObject id(String id) { this.id = id; return this; } /** - * The ID of the event. + * The ID of the incident event. * * @return id */ @@ -77,24 +78,28 @@ public void setId(String id) { this.id = id; } - public DORAEvent type(String type) { + public DORAIncidentObject type(DORAFailureType type) { this.type = type; + this.unparsed |= !type.isValid(); return this; } /** - * The type of the event. + * JSON:API type for DORA failure events. * * @return type */ @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_TYPE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getType() { + public DORAFailureType getType() { return type; } - public void setType(String type) { + public void setType(DORAFailureType type) { + if (!type.isValid()) { + this.unparsed = true; + } this.type = type; } @@ -110,10 +115,10 @@ public void setType(String type) { * * @param key The arbitrary key to set * @param value The associated value - * @return DORAEvent + * @return DORAIncidentObject */ @JsonAnySetter - public DORAEvent putAdditionalProperty(String key, Object value) { + public DORAIncidentObject putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -144,7 +149,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this DORAEvent object is equal to o. */ + /** Return true if this DORAIncidentObject object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -153,11 +158,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - DORAEvent doraEvent = (DORAEvent) o; - return Objects.equals(this.attributes, doraEvent.attributes) - && Objects.equals(this.id, doraEvent.id) - && Objects.equals(this.type, doraEvent.type) - && Objects.equals(this.additionalProperties, doraEvent.additionalProperties); + DORAIncidentObject doraIncidentObject = (DORAIncidentObject) o; + return Objects.equals(this.attributes, doraIncidentObject.attributes) + && Objects.equals(this.id, doraIncidentObject.id) + && Objects.equals(this.type, doraIncidentObject.type) + && Objects.equals(this.additionalProperties, doraIncidentObject.additionalProperties); } @Override @@ -168,7 +173,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class DORAEvent {\n"); + sb.append("class DORAIncidentObject {\n"); sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/DORAIncidentObjectAttributes.java b/src/main/java/com/datadog/api/client/v2/model/DORAIncidentObjectAttributes.java new file mode 100644 index 00000000000..123a70da8ff --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DORAIncidentObjectAttributes.java @@ -0,0 +1,435 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import org.openapitools.jackson.nullable.JsonNullable; + +/** The attributes of the incident event. */ +@JsonPropertyOrder({ + DORAIncidentObjectAttributes.JSON_PROPERTY_CUSTOM_TAGS, + DORAIncidentObjectAttributes.JSON_PROPERTY_ENV, + DORAIncidentObjectAttributes.JSON_PROPERTY_FINISHED_AT, + DORAIncidentObjectAttributes.JSON_PROPERTY_GIT, + DORAIncidentObjectAttributes.JSON_PROPERTY_NAME, + DORAIncidentObjectAttributes.JSON_PROPERTY_SERVICES, + DORAIncidentObjectAttributes.JSON_PROPERTY_SEVERITY, + DORAIncidentObjectAttributes.JSON_PROPERTY_STARTED_AT, + DORAIncidentObjectAttributes.JSON_PROPERTY_TEAM, + DORAIncidentObjectAttributes.JSON_PROPERTY_VERSION +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DORAIncidentObjectAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CUSTOM_TAGS = "custom_tags"; + private JsonNullable> customTags = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_ENV = "env"; + private String env; + + public static final String JSON_PROPERTY_FINISHED_AT = "finished_at"; + private Long finishedAt; + + public static final String JSON_PROPERTY_GIT = "git"; + private DORAGitInfo git; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_SERVICES = "services"; + private List services = null; + + public static final String JSON_PROPERTY_SEVERITY = "severity"; + private String severity; + + public static final String JSON_PROPERTY_STARTED_AT = "started_at"; + private Long startedAt; + + public static final String JSON_PROPERTY_TEAM = "team"; + private String team; + + public static final String JSON_PROPERTY_VERSION = "version"; + private String version; + + public DORAIncidentObjectAttributes() {} + + @JsonCreator + public DORAIncidentObjectAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_STARTED_AT) Long startedAt) { + this.startedAt = startedAt; + } + + public DORAIncidentObjectAttributes customTags(List customTags) { + this.customTags = JsonNullable.>of(customTags); + return this; + } + + public DORAIncidentObjectAttributes addCustomTagsItem(String customTagsItem) { + if (this.customTags == null || !this.customTags.isPresent()) { + this.customTags = JsonNullable.>of(new ArrayList<>()); + } + try { + this.customTags.get().add(customTagsItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * A list of user-defined tags. The tags must follow the key:value pattern. Up to 100 + * may be added per event. + * + * @return customTags + */ + @jakarta.annotation.Nullable + @JsonIgnore + public List getCustomTags() { + return customTags.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_CUSTOM_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public JsonNullable> getCustomTags_JsonNullable() { + return customTags; + } + + @JsonProperty(JSON_PROPERTY_CUSTOM_TAGS) + public void setCustomTags_JsonNullable(JsonNullable> customTags) { + this.customTags = customTags; + } + + public void setCustomTags(List customTags) { + this.customTags = JsonNullable.>of(customTags); + } + + public DORAIncidentObjectAttributes env(String env) { + this.env = env; + return this; + } + + /** + * Environment name that was impacted by the incident. + * + * @return env + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENV) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getEnv() { + return env; + } + + public void setEnv(String env) { + this.env = env; + } + + public DORAIncidentObjectAttributes finishedAt(Long finishedAt) { + this.finishedAt = finishedAt; + return this; + } + + /** + * Unix timestamp when the incident finished. + * + * @return finishedAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FINISHED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getFinishedAt() { + return finishedAt; + } + + public void setFinishedAt(Long finishedAt) { + this.finishedAt = finishedAt; + } + + public DORAIncidentObjectAttributes git(DORAGitInfo git) { + this.git = git; + this.unparsed |= git.unparsed; + return this; + } + + /** + * Git info for DORA Metrics events. + * + * @return git + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_GIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DORAGitInfo getGit() { + return git; + } + + public void setGit(DORAGitInfo git) { + this.git = git; + } + + public DORAIncidentObjectAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Incident name. + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public DORAIncidentObjectAttributes services(List services) { + this.services = services; + return this; + } + + public DORAIncidentObjectAttributes addServicesItem(String servicesItem) { + if (this.services == null) { + this.services = new ArrayList<>(); + } + this.services.add(servicesItem); + return this; + } + + /** + * Service names impacted by the incident. + * + * @return services + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SERVICES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getServices() { + return services; + } + + public void setServices(List services) { + this.services = services; + } + + public DORAIncidentObjectAttributes severity(String severity) { + this.severity = severity; + return this; + } + + /** + * Incident severity. + * + * @return severity + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SEVERITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getSeverity() { + return severity; + } + + public void setSeverity(String severity) { + this.severity = severity; + } + + public DORAIncidentObjectAttributes startedAt(Long startedAt) { + this.startedAt = startedAt; + return this; + } + + /** + * Unix timestamp when the incident started. + * + * @return startedAt + */ + @JsonProperty(JSON_PROPERTY_STARTED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getStartedAt() { + return startedAt; + } + + public void setStartedAt(Long startedAt) { + this.startedAt = startedAt; + } + + public DORAIncidentObjectAttributes team(String team) { + this.team = team; + return this; + } + + /** + * Name of the team owning the services impacted. + * + * @return team + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEAM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTeam() { + return team; + } + + public void setTeam(String team) { + this.team = team; + } + + public DORAIncidentObjectAttributes version(String version) { + this.version = version; + return this; + } + + /** + * Version to correlate with APM Deployment Tracking. + * + * @return version + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return DORAIncidentObjectAttributes + */ + @JsonAnySetter + public DORAIncidentObjectAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this DORAIncidentObjectAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DORAIncidentObjectAttributes doraIncidentObjectAttributes = (DORAIncidentObjectAttributes) o; + return Objects.equals(this.customTags, doraIncidentObjectAttributes.customTags) + && Objects.equals(this.env, doraIncidentObjectAttributes.env) + && Objects.equals(this.finishedAt, doraIncidentObjectAttributes.finishedAt) + && Objects.equals(this.git, doraIncidentObjectAttributes.git) + && Objects.equals(this.name, doraIncidentObjectAttributes.name) + && Objects.equals(this.services, doraIncidentObjectAttributes.services) + && Objects.equals(this.severity, doraIncidentObjectAttributes.severity) + && Objects.equals(this.startedAt, doraIncidentObjectAttributes.startedAt) + && Objects.equals(this.team, doraIncidentObjectAttributes.team) + && Objects.equals(this.version, doraIncidentObjectAttributes.version) + && Objects.equals( + this.additionalProperties, doraIncidentObjectAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + customTags, + env, + finishedAt, + git, + name, + services, + severity, + startedAt, + team, + version, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DORAIncidentObjectAttributes {\n"); + sb.append(" customTags: ").append(toIndentedString(customTags)).append("\n"); + sb.append(" env: ").append(toIndentedString(env)).append("\n"); + sb.append(" finishedAt: ").append(toIndentedString(finishedAt)).append("\n"); + sb.append(" git: ").append(toIndentedString(git)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" services: ").append(toIndentedString(services)).append("\n"); + sb.append(" severity: ").append(toIndentedString(severity)).append("\n"); + sb.append(" startedAt: ").append(toIndentedString(startedAt)).append("\n"); + sb.append(" team: ").append(toIndentedString(team)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DORAListDeploymentsRequestData.java b/src/main/java/com/datadog/api/client/v2/model/DORAListDeploymentsRequestData.java index 91c08451c33..5802c413e6c 100644 --- a/src/main/java/com/datadog/api/client/v2/model/DORAListDeploymentsRequestData.java +++ b/src/main/java/com/datadog/api/client/v2/model/DORAListDeploymentsRequestData.java @@ -30,7 +30,8 @@ public class DORAListDeploymentsRequestData { private DORAListDeploymentsRequestAttributes attributes; public static final String JSON_PROPERTY_TYPE = "type"; - private DORAListDeploymentsRequestDataType type; + private DORAListDeploymentsRequestDataType type = + DORAListDeploymentsRequestDataType.DORA_DEPLOYMENTS_LIST_REQUEST; public DORAListDeploymentsRequestData() {} diff --git a/src/main/java/com/datadog/api/client/v2/model/DORAListFailuresRequestData.java b/src/main/java/com/datadog/api/client/v2/model/DORAListFailuresRequestData.java index 77fd5209e95..8810af50dac 100644 --- a/src/main/java/com/datadog/api/client/v2/model/DORAListFailuresRequestData.java +++ b/src/main/java/com/datadog/api/client/v2/model/DORAListFailuresRequestData.java @@ -30,7 +30,8 @@ public class DORAListFailuresRequestData { private DORAListFailuresRequestAttributes attributes; public static final String JSON_PROPERTY_TYPE = "type"; - private DORAListFailuresRequestDataType type; + private DORAListFailuresRequestDataType type = + DORAListFailuresRequestDataType.DORA_FAILURES_LIST_REQUEST; public DORAListFailuresRequestData() {} diff --git a/src/main/java/com/datadog/api/client/v2/model/DeletedSuiteResponseData.java b/src/main/java/com/datadog/api/client/v2/model/DeletedSuiteResponseData.java new file mode 100644 index 00000000000..ce7bc7dc4ae --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DeletedSuiteResponseData.java @@ -0,0 +1,196 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + DeletedSuiteResponseData.JSON_PROPERTY_ATTRIBUTES, + DeletedSuiteResponseData.JSON_PROPERTY_ID, + DeletedSuiteResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DeletedSuiteResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private DeletedSuiteResponseDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private SyntheticsSuiteTypes type = SyntheticsSuiteTypes.SUITES; + + public DeletedSuiteResponseData attributes(DeletedSuiteResponseDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Getattributes + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DeletedSuiteResponseDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(DeletedSuiteResponseDataAttributes attributes) { + this.attributes = attributes; + } + + public DeletedSuiteResponseData id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public DeletedSuiteResponseData type(SyntheticsSuiteTypes type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Type for the Synthetics suites responses, suites. + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsSuiteTypes getType() { + return type; + } + + public void setType(SyntheticsSuiteTypes type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return DeletedSuiteResponseData + */ + @JsonAnySetter + public DeletedSuiteResponseData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this DeletedSuiteResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeletedSuiteResponseData deletedSuiteResponseData = (DeletedSuiteResponseData) o; + return Objects.equals(this.attributes, deletedSuiteResponseData.attributes) + && Objects.equals(this.id, deletedSuiteResponseData.id) + && Objects.equals(this.type, deletedSuiteResponseData.type) + && Objects.equals(this.additionalProperties, deletedSuiteResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeletedSuiteResponseData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DeletedSuiteResponseDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/DeletedSuiteResponseDataAttributes.java new file mode 100644 index 00000000000..5e99299cc43 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DeletedSuiteResponseDataAttributes.java @@ -0,0 +1,166 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + DeletedSuiteResponseDataAttributes.JSON_PROPERTY_DELETED_AT, + DeletedSuiteResponseDataAttributes.JSON_PROPERTY_PUBLIC_ID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DeletedSuiteResponseDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DELETED_AT = "deleted_at"; + private String deletedAt; + + public static final String JSON_PROPERTY_PUBLIC_ID = "public_id"; + private String publicId; + + public DeletedSuiteResponseDataAttributes deletedAt(String deletedAt) { + this.deletedAt = deletedAt; + return this; + } + + /** + * Deletion timestamp of the Synthetic suite ID. + * + * @return deletedAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DELETED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDeletedAt() { + return deletedAt; + } + + public void setDeletedAt(String deletedAt) { + this.deletedAt = deletedAt; + } + + public DeletedSuiteResponseDataAttributes publicId(String publicId) { + this.publicId = publicId; + return this; + } + + /** + * The Synthetic suite ID deleted. + * + * @return publicId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPublicId() { + return publicId; + } + + public void setPublicId(String publicId) { + this.publicId = publicId; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return DeletedSuiteResponseDataAttributes + */ + @JsonAnySetter + public DeletedSuiteResponseDataAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this DeletedSuiteResponseDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeletedSuiteResponseDataAttributes deletedSuiteResponseDataAttributes = + (DeletedSuiteResponseDataAttributes) o; + return Objects.equals(this.deletedAt, deletedSuiteResponseDataAttributes.deletedAt) + && Objects.equals(this.publicId, deletedSuiteResponseDataAttributes.publicId) + && Objects.equals( + this.additionalProperties, deletedSuiteResponseDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(deletedAt, publicId, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeletedSuiteResponseDataAttributes {\n"); + sb.append(" deletedAt: ").append(toIndentedString(deletedAt)).append("\n"); + sb.append(" publicId: ").append(toIndentedString(publicId)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DeletedSuitesRequestDelete.java b/src/main/java/com/datadog/api/client/v2/model/DeletedSuitesRequestDelete.java new file mode 100644 index 00000000000..75a316e6928 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DeletedSuitesRequestDelete.java @@ -0,0 +1,207 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + DeletedSuitesRequestDelete.JSON_PROPERTY_ATTRIBUTES, + DeletedSuitesRequestDelete.JSON_PROPERTY_ID, + DeletedSuitesRequestDelete.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DeletedSuitesRequestDelete { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private DeletedSuitesRequestDeleteAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private DeletedSuitesRequestType type = DeletedSuitesRequestType.DELETE_SUITES_REQUEST; + + public DeletedSuitesRequestDelete() {} + + @JsonCreator + public DeletedSuitesRequestDelete( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + DeletedSuitesRequestDeleteAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + } + + public DeletedSuitesRequestDelete attributes(DeletedSuitesRequestDeleteAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Getattributes + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DeletedSuitesRequestDeleteAttributes getAttributes() { + return attributes; + } + + public void setAttributes(DeletedSuitesRequestDeleteAttributes attributes) { + this.attributes = attributes; + } + + public DeletedSuitesRequestDelete id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public DeletedSuitesRequestDelete type(DeletedSuitesRequestType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Gettype + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public DeletedSuitesRequestType getType() { + return type; + } + + public void setType(DeletedSuitesRequestType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return DeletedSuitesRequestDelete + */ + @JsonAnySetter + public DeletedSuitesRequestDelete putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this DeletedSuitesRequestDelete object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeletedSuitesRequestDelete deletedSuitesRequestDelete = (DeletedSuitesRequestDelete) o; + return Objects.equals(this.attributes, deletedSuitesRequestDelete.attributes) + && Objects.equals(this.id, deletedSuitesRequestDelete.id) + && Objects.equals(this.type, deletedSuitesRequestDelete.type) + && Objects.equals( + this.additionalProperties, deletedSuitesRequestDelete.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeletedSuitesRequestDelete {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DeletedSuitesRequestDeleteAttributes.java b/src/main/java/com/datadog/api/client/v2/model/DeletedSuitesRequestDeleteAttributes.java new file mode 100644 index 00000000000..779a3f44cde --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DeletedSuitesRequestDeleteAttributes.java @@ -0,0 +1,186 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + DeletedSuitesRequestDeleteAttributes.JSON_PROPERTY_FORCE_DELETE_DEPENDENCIES, + DeletedSuitesRequestDeleteAttributes.JSON_PROPERTY_PUBLIC_IDS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DeletedSuitesRequestDeleteAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_FORCE_DELETE_DEPENDENCIES = "force_delete_dependencies"; + private Boolean forceDeleteDependencies; + + public static final String JSON_PROPERTY_PUBLIC_IDS = "public_ids"; + private List publicIds = new ArrayList<>(); + + public DeletedSuitesRequestDeleteAttributes() {} + + @JsonCreator + public DeletedSuitesRequestDeleteAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_PUBLIC_IDS) List publicIds) { + this.publicIds = publicIds; + } + + public DeletedSuitesRequestDeleteAttributes forceDeleteDependencies( + Boolean forceDeleteDependencies) { + this.forceDeleteDependencies = forceDeleteDependencies; + return this; + } + + /** + * GetforceDeleteDependencies + * + * @return forceDeleteDependencies + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FORCE_DELETE_DEPENDENCIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Boolean getForceDeleteDependencies() { + return forceDeleteDependencies; + } + + public void setForceDeleteDependencies(Boolean forceDeleteDependencies) { + this.forceDeleteDependencies = forceDeleteDependencies; + } + + public DeletedSuitesRequestDeleteAttributes publicIds(List publicIds) { + this.publicIds = publicIds; + return this; + } + + public DeletedSuitesRequestDeleteAttributes addPublicIdsItem(String publicIdsItem) { + this.publicIds.add(publicIdsItem); + return this; + } + + /** + * GetpublicIds + * + * @return publicIds + */ + @JsonProperty(JSON_PROPERTY_PUBLIC_IDS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getPublicIds() { + return publicIds; + } + + public void setPublicIds(List publicIds) { + this.publicIds = publicIds; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return DeletedSuitesRequestDeleteAttributes + */ + @JsonAnySetter + public DeletedSuitesRequestDeleteAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this DeletedSuitesRequestDeleteAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeletedSuitesRequestDeleteAttributes deletedSuitesRequestDeleteAttributes = + (DeletedSuitesRequestDeleteAttributes) o; + return Objects.equals( + this.forceDeleteDependencies, + deletedSuitesRequestDeleteAttributes.forceDeleteDependencies) + && Objects.equals(this.publicIds, deletedSuitesRequestDeleteAttributes.publicIds) + && Objects.equals( + this.additionalProperties, deletedSuitesRequestDeleteAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(forceDeleteDependencies, publicIds, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeletedSuitesRequestDeleteAttributes {\n"); + sb.append(" forceDeleteDependencies: ") + .append(toIndentedString(forceDeleteDependencies)) + .append("\n"); + sb.append(" publicIds: ").append(toIndentedString(publicIds)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DeletedSuitesRequestDeleteRequest.java b/src/main/java/com/datadog/api/client/v2/model/DeletedSuitesRequestDeleteRequest.java new file mode 100644 index 00000000000..331ff9be80d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DeletedSuitesRequestDeleteRequest.java @@ -0,0 +1,147 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({DeletedSuitesRequestDeleteRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class DeletedSuitesRequestDeleteRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private DeletedSuitesRequestDelete data; + + public DeletedSuitesRequestDeleteRequest() {} + + @JsonCreator + public DeletedSuitesRequestDeleteRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) DeletedSuitesRequestDelete data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public DeletedSuitesRequestDeleteRequest data(DeletedSuitesRequestDelete data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public DeletedSuitesRequestDelete getData() { + return data; + } + + public void setData(DeletedSuitesRequestDelete data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return DeletedSuitesRequestDeleteRequest + */ + @JsonAnySetter + public DeletedSuitesRequestDeleteRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this DeletedSuitesRequestDeleteRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeletedSuitesRequestDeleteRequest deletedSuitesRequestDeleteRequest = + (DeletedSuitesRequestDeleteRequest) o; + return Objects.equals(this.data, deletedSuitesRequestDeleteRequest.data) + && Objects.equals( + this.additionalProperties, deletedSuitesRequestDeleteRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeletedSuitesRequestDeleteRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DeletedSuitesRequestType.java b/src/main/java/com/datadog/api/client/v2/model/DeletedSuitesRequestType.java new file mode 100644 index 00000000000..90726e10043 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/DeletedSuitesRequestType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** */ +@JsonSerialize(using = DeletedSuitesRequestType.DeletedSuitesRequestTypeSerializer.class) +public class DeletedSuitesRequestType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("delete_suites_request")); + + public static final DeletedSuitesRequestType DELETE_SUITES_REQUEST = + new DeletedSuitesRequestType("delete_suites_request"); + + DeletedSuitesRequestType(String value) { + super(value, allowedValues); + } + + public static class DeletedSuitesRequestTypeSerializer + extends StdSerializer { + public DeletedSuitesRequestTypeSerializer(Class t) { + super(t); + } + + public DeletedSuitesRequestTypeSerializer() { + this(null); + } + + @Override + public void serialize( + DeletedSuitesRequestType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static DeletedSuitesRequestType fromValue(String value) { + return new DeletedSuitesRequestType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/DORAListResponse.java b/src/main/java/com/datadog/api/client/v2/model/DeletedSuitesResponse.java similarity index 78% rename from src/main/java/com/datadog/api/client/v2/model/DORAListResponse.java rename to src/main/java/com/datadog/api/client/v2/model/DeletedSuitesResponse.java index 3199fd3b3a9..c9d1de3e5ea 100644 --- a/src/main/java/com/datadog/api/client/v2/model/DORAListResponse.java +++ b/src/main/java/com/datadog/api/client/v2/model/DeletedSuitesResponse.java @@ -18,24 +18,24 @@ import java.util.Map; import java.util.Objects; -/** Response for the DORA list endpoints. */ -@JsonPropertyOrder({DORAListResponse.JSON_PROPERTY_DATA}) +/** */ +@JsonPropertyOrder({DeletedSuitesResponse.JSON_PROPERTY_DATA}) @jakarta.annotation.Generated( value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") -public class DORAListResponse { +public class DeletedSuitesResponse { @JsonIgnore public boolean unparsed = false; public static final String JSON_PROPERTY_DATA = "data"; - private List data = null; + private List data = null; - public DORAListResponse data(List data) { + public DeletedSuitesResponse data(List data) { this.data = data; - for (DORAEvent item : data) { + for (DeletedSuiteResponseData item : data) { this.unparsed |= item.unparsed; } return this; } - public DORAListResponse addDataItem(DORAEvent dataItem) { + public DeletedSuitesResponse addDataItem(DeletedSuiteResponseData dataItem) { if (this.data == null) { this.data = new ArrayList<>(); } @@ -45,18 +45,18 @@ public DORAListResponse addDataItem(DORAEvent dataItem) { } /** - * The list of DORA events. + * Getdata * * @return data */ @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_DATA) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getData() { + public List getData() { return data; } - public void setData(List data) { + public void setData(List data) { this.data = data; } @@ -72,10 +72,10 @@ public void setData(List data) { * * @param key The arbitrary key to set * @param value The associated value - * @return DORAListResponse + * @return DeletedSuitesResponse */ @JsonAnySetter - public DORAListResponse putAdditionalProperty(String key, Object value) { + public DeletedSuitesResponse putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -106,7 +106,7 @@ public Object getAdditionalProperty(String key) { return this.additionalProperties.get(key); } - /** Return true if this DORAListResponse object is equal to o. */ + /** Return true if this DeletedSuitesResponse object is equal to o. */ @Override public boolean equals(Object o) { if (this == o) { @@ -115,9 +115,9 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - DORAListResponse doraListResponse = (DORAListResponse) o; - return Objects.equals(this.data, doraListResponse.data) - && Objects.equals(this.additionalProperties, doraListResponse.additionalProperties); + DeletedSuitesResponse deletedSuitesResponse = (DeletedSuitesResponse) o; + return Objects.equals(this.data, deletedSuitesResponse.data) + && Objects.equals(this.additionalProperties, deletedSuitesResponse.additionalProperties); } @Override @@ -128,7 +128,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class DORAListResponse {\n"); + sb.append("class DeletedSuitesResponse {\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) diff --git a/src/main/java/com/datadog/api/client/v2/model/SuiteCreateEdit.java b/src/main/java/com/datadog/api/client/v2/model/SuiteCreateEdit.java new file mode 100644 index 00000000000..6035aeb897e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SuiteCreateEdit.java @@ -0,0 +1,177 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({SuiteCreateEdit.JSON_PROPERTY_ATTRIBUTES, SuiteCreateEdit.JSON_PROPERTY_TYPE}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SuiteCreateEdit { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private SyntheticsSuite attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private SyntheticsSuiteTypes type = SyntheticsSuiteTypes.SUITES; + + public SuiteCreateEdit() {} + + @JsonCreator + public SuiteCreateEdit( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) SyntheticsSuite attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) SyntheticsSuiteTypes type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public SuiteCreateEdit attributes(SyntheticsSuite attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Object containing details about a Synthetic suite. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SyntheticsSuite getAttributes() { + return attributes; + } + + public void setAttributes(SyntheticsSuite attributes) { + this.attributes = attributes; + } + + public SuiteCreateEdit type(SyntheticsSuiteTypes type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Type for the Synthetics suites responses, suites. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SyntheticsSuiteTypes getType() { + return type; + } + + public void setType(SyntheticsSuiteTypes type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SuiteCreateEdit + */ + @JsonAnySetter + public SuiteCreateEdit putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SuiteCreateEdit object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SuiteCreateEdit suiteCreateEdit = (SuiteCreateEdit) o; + return Objects.equals(this.attributes, suiteCreateEdit.attributes) + && Objects.equals(this.type, suiteCreateEdit.type) + && Objects.equals(this.additionalProperties, suiteCreateEdit.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SuiteCreateEdit {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SuiteCreateEditRequest.java b/src/main/java/com/datadog/api/client/v2/model/SuiteCreateEditRequest.java new file mode 100644 index 00000000000..231a5078ee2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SuiteCreateEditRequest.java @@ -0,0 +1,145 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({SuiteCreateEditRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SuiteCreateEditRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private SuiteCreateEdit data; + + public SuiteCreateEditRequest() {} + + @JsonCreator + public SuiteCreateEditRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) SuiteCreateEdit data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public SuiteCreateEditRequest data(SuiteCreateEdit data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SuiteCreateEdit getData() { + return data; + } + + public void setData(SuiteCreateEdit data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SuiteCreateEditRequest + */ + @JsonAnySetter + public SuiteCreateEditRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SuiteCreateEditRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SuiteCreateEditRequest suiteCreateEditRequest = (SuiteCreateEditRequest) o; + return Objects.equals(this.data, suiteCreateEditRequest.data) + && Objects.equals(this.additionalProperties, suiteCreateEditRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SuiteCreateEditRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SuiteSearchResponseType.java b/src/main/java/com/datadog/api/client/v2/model/SuiteSearchResponseType.java new file mode 100644 index 00000000000..f24f8ba8087 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SuiteSearchResponseType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** */ +@JsonSerialize(using = SuiteSearchResponseType.SuiteSearchResponseTypeSerializer.class) +public class SuiteSearchResponseType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("suites_search")); + + public static final SuiteSearchResponseType SUITES_SEARCH = + new SuiteSearchResponseType("suites_search"); + + SuiteSearchResponseType(String value) { + super(value, allowedValues); + } + + public static class SuiteSearchResponseTypeSerializer + extends StdSerializer { + public SuiteSearchResponseTypeSerializer(Class t) { + super(t); + } + + public SuiteSearchResponseTypeSerializer() { + this(null); + } + + @Override + public void serialize( + SuiteSearchResponseType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static SuiteSearchResponseType fromValue(String value) { + return new SuiteSearchResponseType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuite.java b/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuite.java new file mode 100644 index 00000000000..36191ed1e39 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuite.java @@ -0,0 +1,328 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Object containing details about a Synthetic suite. */ +@JsonPropertyOrder({ + SyntheticsSuite.JSON_PROPERTY_MESSAGE, + SyntheticsSuite.JSON_PROPERTY_NAME, + SyntheticsSuite.JSON_PROPERTY_OPTIONS, + SyntheticsSuite.JSON_PROPERTY_PUBLIC_ID, + SyntheticsSuite.JSON_PROPERTY_TAGS, + SyntheticsSuite.JSON_PROPERTY_TESTS, + SyntheticsSuite.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SyntheticsSuite { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_MESSAGE = "message"; + private String message; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_OPTIONS = "options"; + private SyntheticsSuiteOptions options; + + public static final String JSON_PROPERTY_PUBLIC_ID = "public_id"; + private String publicId; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private List tags = null; + + public static final String JSON_PROPERTY_TESTS = "tests"; + private List tests = new ArrayList<>(); + + public static final String JSON_PROPERTY_TYPE = "type"; + private SyntheticsSuiteType type = SyntheticsSuiteType.SUITE; + + public SyntheticsSuite() {} + + @JsonCreator + public SyntheticsSuite( + @JsonProperty(required = true, value = JSON_PROPERTY_MESSAGE) String message, + @JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name, + @JsonProperty(required = true, value = JSON_PROPERTY_OPTIONS) SyntheticsSuiteOptions options, + @JsonProperty(required = true, value = JSON_PROPERTY_TESTS) List tests, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) SyntheticsSuiteType type) { + this.message = message; + this.name = name; + this.options = options; + this.unparsed |= options.unparsed; + this.tests = tests; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public SyntheticsSuite message(String message) { + this.message = message; + return this; + } + + /** + * Notification message associated with the suite. + * + * @return message + */ + @JsonProperty(JSON_PROPERTY_MESSAGE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public SyntheticsSuite name(String name) { + this.name = name; + return this; + } + + /** + * Name of the suite. + * + * @return name + */ + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public SyntheticsSuite options(SyntheticsSuiteOptions options) { + this.options = options; + this.unparsed |= options.unparsed; + return this; + } + + /** + * Object describing the extra options for a Synthetic suite. + * + * @return options + */ + @JsonProperty(JSON_PROPERTY_OPTIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SyntheticsSuiteOptions getOptions() { + return options; + } + + public void setOptions(SyntheticsSuiteOptions options) { + this.options = options; + } + + /** + * The public ID for the test. + * + * @return publicId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPublicId() { + return publicId; + } + + public SyntheticsSuite tags(List tags) { + this.tags = tags; + return this; + } + + public SyntheticsSuite addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Array of tags attached to the suite. + * + * @return tags + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } + + public void setTags(List tags) { + this.tags = tags; + } + + public SyntheticsSuite tests(List tests) { + this.tests = tests; + for (SyntheticsSuiteTest item : tests) { + this.unparsed |= item.unparsed; + } + return this; + } + + public SyntheticsSuite addTestsItem(SyntheticsSuiteTest testsItem) { + this.tests.add(testsItem); + this.unparsed |= testsItem.unparsed; + return this; + } + + /** + * Gettests + * + * @return tests + */ + @JsonProperty(JSON_PROPERTY_TESTS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getTests() { + return tests; + } + + public void setTests(List tests) { + this.tests = tests; + } + + public SyntheticsSuite type(SyntheticsSuiteType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Type of the Synthetic suite, suite. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public SyntheticsSuiteType getType() { + return type; + } + + public void setType(SyntheticsSuiteType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SyntheticsSuite + */ + @JsonAnySetter + public SyntheticsSuite putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SyntheticsSuite object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SyntheticsSuite syntheticsSuite = (SyntheticsSuite) o; + return Objects.equals(this.message, syntheticsSuite.message) + && Objects.equals(this.name, syntheticsSuite.name) + && Objects.equals(this.options, syntheticsSuite.options) + && Objects.equals(this.publicId, syntheticsSuite.publicId) + && Objects.equals(this.tags, syntheticsSuite.tags) + && Objects.equals(this.tests, syntheticsSuite.tests) + && Objects.equals(this.type, syntheticsSuite.type) + && Objects.equals(this.additionalProperties, syntheticsSuite.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(message, name, options, publicId, tags, tests, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SyntheticsSuite {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" options: ").append(toIndentedString(options)).append("\n"); + sb.append(" publicId: ").append(toIndentedString(publicId)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" tests: ").append(toIndentedString(tests)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteOptions.java b/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteOptions.java new file mode 100644 index 00000000000..6c674f3d606 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteOptions.java @@ -0,0 +1,135 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Object describing the extra options for a Synthetic suite. */ +@JsonPropertyOrder({SyntheticsSuiteOptions.JSON_PROPERTY_ALERTING_THRESHOLD}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SyntheticsSuiteOptions { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ALERTING_THRESHOLD = "alerting_threshold"; + private Double alertingThreshold; + + public SyntheticsSuiteOptions alertingThreshold(Double alertingThreshold) { + this.alertingThreshold = alertingThreshold; + return this; + } + + /** + * Percentage of critical tests failure needed for a suite to fail. minimum: 0 maximum: 1 + * + * @return alertingThreshold + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ALERTING_THRESHOLD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Double getAlertingThreshold() { + return alertingThreshold; + } + + public void setAlertingThreshold(Double alertingThreshold) { + this.alertingThreshold = alertingThreshold; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SyntheticsSuiteOptions + */ + @JsonAnySetter + public SyntheticsSuiteOptions putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SyntheticsSuiteOptions object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SyntheticsSuiteOptions syntheticsSuiteOptions = (SyntheticsSuiteOptions) o; + return Objects.equals(this.alertingThreshold, syntheticsSuiteOptions.alertingThreshold) + && Objects.equals(this.additionalProperties, syntheticsSuiteOptions.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(alertingThreshold, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SyntheticsSuiteOptions {\n"); + sb.append(" alertingThreshold: ").append(toIndentedString(alertingThreshold)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteResponse.java b/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteResponse.java new file mode 100644 index 00000000000..ed61b3c73d8 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteResponse.java @@ -0,0 +1,136 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Synthetics suite response */ +@JsonPropertyOrder({SyntheticsSuiteResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SyntheticsSuiteResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private SyntheticsSuiteResponseData data; + + public SyntheticsSuiteResponse data(SyntheticsSuiteResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Synthetics suite response data + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsSuiteResponseData getData() { + return data; + } + + public void setData(SyntheticsSuiteResponseData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SyntheticsSuiteResponse + */ + @JsonAnySetter + public SyntheticsSuiteResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SyntheticsSuiteResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SyntheticsSuiteResponse syntheticsSuiteResponse = (SyntheticsSuiteResponse) o; + return Objects.equals(this.data, syntheticsSuiteResponse.data) + && Objects.equals(this.additionalProperties, syntheticsSuiteResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SyntheticsSuiteResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteResponseData.java b/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteResponseData.java new file mode 100644 index 00000000000..a78947e432f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteResponseData.java @@ -0,0 +1,137 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Synthetics suite response data */ +@JsonPropertyOrder({SyntheticsSuiteResponseData.JSON_PROPERTY_ATTRIBUTES}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SyntheticsSuiteResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private SyntheticsSuite attributes; + + public SyntheticsSuiteResponseData attributes(SyntheticsSuite attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Object containing details about a Synthetic suite. + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsSuite getAttributes() { + return attributes; + } + + public void setAttributes(SyntheticsSuite attributes) { + this.attributes = attributes; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SyntheticsSuiteResponseData + */ + @JsonAnySetter + public SyntheticsSuiteResponseData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SyntheticsSuiteResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SyntheticsSuiteResponseData syntheticsSuiteResponseData = (SyntheticsSuiteResponseData) o; + return Objects.equals(this.attributes, syntheticsSuiteResponseData.attributes) + && Objects.equals( + this.additionalProperties, syntheticsSuiteResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SyntheticsSuiteResponseData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteSearchResponse.java b/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteSearchResponse.java new file mode 100644 index 00000000000..ce2831fec9d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteSearchResponse.java @@ -0,0 +1,137 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Synthetics suite search response */ +@JsonPropertyOrder({SyntheticsSuiteSearchResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SyntheticsSuiteSearchResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private SyntheticsSuiteSearchResponseData data; + + public SyntheticsSuiteSearchResponse data(SyntheticsSuiteSearchResponseData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Synthetics suite search response data + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsSuiteSearchResponseData getData() { + return data; + } + + public void setData(SyntheticsSuiteSearchResponseData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SyntheticsSuiteSearchResponse + */ + @JsonAnySetter + public SyntheticsSuiteSearchResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SyntheticsSuiteSearchResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SyntheticsSuiteSearchResponse syntheticsSuiteSearchResponse = (SyntheticsSuiteSearchResponse) o; + return Objects.equals(this.data, syntheticsSuiteSearchResponse.data) + && Objects.equals( + this.additionalProperties, syntheticsSuiteSearchResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SyntheticsSuiteSearchResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteSearchResponseData.java b/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteSearchResponseData.java new file mode 100644 index 00000000000..09f21537830 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteSearchResponseData.java @@ -0,0 +1,200 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; +import java.util.UUID; + +/** Synthetics suite search response data */ +@JsonPropertyOrder({ + SyntheticsSuiteSearchResponseData.JSON_PROPERTY_ATTRIBUTES, + SyntheticsSuiteSearchResponseData.JSON_PROPERTY_ID, + SyntheticsSuiteSearchResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SyntheticsSuiteSearchResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private SyntheticsSuiteSearchResponseDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private UUID id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private SuiteSearchResponseType type = SuiteSearchResponseType.SUITES_SEARCH; + + public SyntheticsSuiteSearchResponseData attributes( + SyntheticsSuiteSearchResponseDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Synthetics suite search response data attributes + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsSuiteSearchResponseDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(SyntheticsSuiteSearchResponseDataAttributes attributes) { + this.attributes = attributes; + } + + public SyntheticsSuiteSearchResponseData id(UUID id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public UUID getId() { + return id; + } + + public void setId(UUID id) { + this.id = id; + } + + public SyntheticsSuiteSearchResponseData type(SuiteSearchResponseType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Gettype + * + * @return type + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SuiteSearchResponseType getType() { + return type; + } + + public void setType(SuiteSearchResponseType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SyntheticsSuiteSearchResponseData + */ + @JsonAnySetter + public SyntheticsSuiteSearchResponseData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SyntheticsSuiteSearchResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SyntheticsSuiteSearchResponseData syntheticsSuiteSearchResponseData = + (SyntheticsSuiteSearchResponseData) o; + return Objects.equals(this.attributes, syntheticsSuiteSearchResponseData.attributes) + && Objects.equals(this.id, syntheticsSuiteSearchResponseData.id) + && Objects.equals(this.type, syntheticsSuiteSearchResponseData.type) + && Objects.equals( + this.additionalProperties, syntheticsSuiteSearchResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SyntheticsSuiteSearchResponseData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteSearchResponseDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteSearchResponseDataAttributes.java new file mode 100644 index 00000000000..703c5a9a63e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteSearchResponseDataAttributes.java @@ -0,0 +1,182 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Synthetics suite search response data attributes */ +@JsonPropertyOrder({ + SyntheticsSuiteSearchResponseDataAttributes.JSON_PROPERTY_SUITES, + SyntheticsSuiteSearchResponseDataAttributes.JSON_PROPERTY_TOTAL +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SyntheticsSuiteSearchResponseDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_SUITES = "suites"; + private List suites = null; + + public static final String JSON_PROPERTY_TOTAL = "total"; + private Integer total; + + public SyntheticsSuiteSearchResponseDataAttributes suites(List suites) { + this.suites = suites; + for (SyntheticsSuite item : suites) { + this.unparsed |= item.unparsed; + } + return this; + } + + public SyntheticsSuiteSearchResponseDataAttributes addSuitesItem(SyntheticsSuite suitesItem) { + if (this.suites == null) { + this.suites = new ArrayList<>(); + } + this.suites.add(suitesItem); + this.unparsed |= suitesItem.unparsed; + return this; + } + + /** + * Getsuites + * + * @return suites + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUITES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getSuites() { + return suites; + } + + public void setSuites(List suites) { + this.suites = suites; + } + + public SyntheticsSuiteSearchResponseDataAttributes total(Integer total) { + this.total = total; + return this; + } + + /** + * Gettotal maximum: 2147483647 + * + * @return total + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TOTAL) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Integer getTotal() { + return total; + } + + public void setTotal(Integer total) { + this.total = total; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SyntheticsSuiteSearchResponseDataAttributes + */ + @JsonAnySetter + public SyntheticsSuiteSearchResponseDataAttributes putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SyntheticsSuiteSearchResponseDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SyntheticsSuiteSearchResponseDataAttributes syntheticsSuiteSearchResponseDataAttributes = + (SyntheticsSuiteSearchResponseDataAttributes) o; + return Objects.equals(this.suites, syntheticsSuiteSearchResponseDataAttributes.suites) + && Objects.equals(this.total, syntheticsSuiteSearchResponseDataAttributes.total) + && Objects.equals( + this.additionalProperties, + syntheticsSuiteSearchResponseDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(suites, total, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SyntheticsSuiteSearchResponseDataAttributes {\n"); + sb.append(" suites: ").append(toIndentedString(suites)).append("\n"); + sb.append(" total: ").append(toIndentedString(total)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteTest.java b/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteTest.java new file mode 100644 index 00000000000..053da52c187 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteTest.java @@ -0,0 +1,179 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Object containing details about a Synthetic test included in a Synthetic suite. */ +@JsonPropertyOrder({ + SyntheticsSuiteTest.JSON_PROPERTY_ALERTING_CRITICALITY, + SyntheticsSuiteTest.JSON_PROPERTY_PUBLIC_ID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class SyntheticsSuiteTest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ALERTING_CRITICALITY = "alerting_criticality"; + private SyntheticsSuiteTestAlertingCriticality alertingCriticality; + + public static final String JSON_PROPERTY_PUBLIC_ID = "public_id"; + private String publicId; + + public SyntheticsSuiteTest() {} + + @JsonCreator + public SyntheticsSuiteTest( + @JsonProperty(required = true, value = JSON_PROPERTY_PUBLIC_ID) String publicId) { + this.publicId = publicId; + } + + public SyntheticsSuiteTest alertingCriticality( + SyntheticsSuiteTestAlertingCriticality alertingCriticality) { + this.alertingCriticality = alertingCriticality; + this.unparsed |= !alertingCriticality.isValid(); + return this; + } + + /** + * Alerting criticality for each the test. + * + * @return alertingCriticality + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ALERTING_CRITICALITY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public SyntheticsSuiteTestAlertingCriticality getAlertingCriticality() { + return alertingCriticality; + } + + public void setAlertingCriticality(SyntheticsSuiteTestAlertingCriticality alertingCriticality) { + if (!alertingCriticality.isValid()) { + this.unparsed = true; + } + this.alertingCriticality = alertingCriticality; + } + + public SyntheticsSuiteTest publicId(String publicId) { + this.publicId = publicId; + return this; + } + + /** + * GetpublicId + * + * @return publicId + */ + @JsonProperty(JSON_PROPERTY_PUBLIC_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getPublicId() { + return publicId; + } + + public void setPublicId(String publicId) { + this.publicId = publicId; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return SyntheticsSuiteTest + */ + @JsonAnySetter + public SyntheticsSuiteTest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this SyntheticsSuiteTest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SyntheticsSuiteTest syntheticsSuiteTest = (SyntheticsSuiteTest) o; + return Objects.equals(this.alertingCriticality, syntheticsSuiteTest.alertingCriticality) + && Objects.equals(this.publicId, syntheticsSuiteTest.publicId) + && Objects.equals(this.additionalProperties, syntheticsSuiteTest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(alertingCriticality, publicId, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SyntheticsSuiteTest {\n"); + sb.append(" alertingCriticality: ") + .append(toIndentedString(alertingCriticality)) + .append("\n"); + sb.append(" publicId: ").append(toIndentedString(publicId)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteTestAlertingCriticality.java b/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteTestAlertingCriticality.java new file mode 100644 index 00000000000..37788a87fb1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteTestAlertingCriticality.java @@ -0,0 +1,65 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Alerting criticality for each the test. */ +@JsonSerialize( + using = + SyntheticsSuiteTestAlertingCriticality.SyntheticsSuiteTestAlertingCriticalitySerializer + .class) +public class SyntheticsSuiteTestAlertingCriticality extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("ignore", "critical")); + + public static final SyntheticsSuiteTestAlertingCriticality IGNORE = + new SyntheticsSuiteTestAlertingCriticality("ignore"); + public static final SyntheticsSuiteTestAlertingCriticality CRITICAL = + new SyntheticsSuiteTestAlertingCriticality("critical"); + + SyntheticsSuiteTestAlertingCriticality(String value) { + super(value, allowedValues); + } + + public static class SyntheticsSuiteTestAlertingCriticalitySerializer + extends StdSerializer { + public SyntheticsSuiteTestAlertingCriticalitySerializer( + Class t) { + super(t); + } + + public SyntheticsSuiteTestAlertingCriticalitySerializer() { + this(null); + } + + @Override + public void serialize( + SyntheticsSuiteTestAlertingCriticality value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static SyntheticsSuiteTestAlertingCriticality fromValue(String value) { + return new SyntheticsSuiteTestAlertingCriticality(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteType.java b/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteType.java new file mode 100644 index 00000000000..562031e7507 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteType.java @@ -0,0 +1,54 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Type of the Synthetic suite, suite. */ +@JsonSerialize(using = SyntheticsSuiteType.SyntheticsSuiteTypeSerializer.class) +public class SyntheticsSuiteType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("suite")); + + public static final SyntheticsSuiteType SUITE = new SyntheticsSuiteType("suite"); + + SyntheticsSuiteType(String value) { + super(value, allowedValues); + } + + public static class SyntheticsSuiteTypeSerializer extends StdSerializer { + public SyntheticsSuiteTypeSerializer(Class t) { + super(t); + } + + public SyntheticsSuiteTypeSerializer() { + this(null); + } + + @Override + public void serialize( + SyntheticsSuiteType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static SyntheticsSuiteType fromValue(String value) { + return new SyntheticsSuiteType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteTypes.java b/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteTypes.java new file mode 100644 index 00000000000..516e53d5aac --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/SyntheticsSuiteTypes.java @@ -0,0 +1,54 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Type for the Synthetics suites responses, suites. */ +@JsonSerialize(using = SyntheticsSuiteTypes.SyntheticsSuiteTypesSerializer.class) +public class SyntheticsSuiteTypes extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("suites")); + + public static final SyntheticsSuiteTypes SUITES = new SyntheticsSuiteTypes("suites"); + + SyntheticsSuiteTypes(String value) { + super(value, allowedValues); + } + + public static class SyntheticsSuiteTypesSerializer extends StdSerializer { + public SyntheticsSuiteTypesSerializer(Class t) { + super(t); + } + + public SyntheticsSuiteTypesSerializer() { + this(null); + } + + @Override + public void serialize( + SyntheticsSuiteTypes value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static SyntheticsSuiteTypes fromValue(String value) { + return new SyntheticsSuiteTypes(value); + } +} diff --git a/src/test/resources/com/datadog/api/client/v2/api/synthetics.feature b/src/test/resources/com/datadog/api/client/v2/api/synthetics.feature index 73efa73ec29..9f30830eb2e 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/synthetics.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/synthetics.feature @@ -27,3 +27,73 @@ Feature: Synthetics When the request is sent Then the response status is 200 OK And the response "data.attributes.on_demand_concurrency_cap" is equal to 20 + + @generated @skip @team:DataDog/synthetics-managing + Scenario: Search Synthetics suites returns "API error response." response + Given new "SearchSuites" request + When the request is sent + Then the response status is 400 API error response. + + @team:DataDog/synthetics-managing + Scenario: Search Synthetics suites returns "OK" response + Given new "SearchSuites" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/synthetics-managing + Scenario: Synthetics: Bulk delete suites returns "API error response." response + Given new "DeleteSyntheticsSuites" request + And body with value {"data": {"attributes": {"public_ids": [""]}, "type": "delete_suites_request"}} + When the request is sent + Then the response status is 400 API error response. + + @generated @skip @team:DataDog/synthetics-managing + Scenario: Synthetics: Bulk delete suites returns "OK" response + Given new "DeleteSyntheticsSuites" request + And body with value {"data": {"attributes": {"public_ids": [""]}, "type": "delete_suites_request"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/synthetics-managing + Scenario: Synthetics: Create a test suite returns "API error response." response + Given new "CreateSyntheticsSuite" request + And body with value {"data": {"attributes": {"message": "Notification message", "name": "Example suite name", "options": {}, "tags": ["env:production"], "tests": [{"alerting_criticality": "critical", "public_id": ""}], "type": "suite"}, "type": "suites"}} + When the request is sent + Then the response status is 400 API error response. + + @team:DataDog/synthetics-managing + Scenario: Synthetics: Create a test suite returns "OK" response + Given new "CreateSyntheticsSuite" request + And body with value {"data": {"attributes": {"message": "Notification message", "name": "Example suite name", "options": {}, "tags": ["env:production"], "tests": [], "type": "suite"}, "type": "suites"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/synthetics-managing + Scenario: Synthetics: Get a suite returns "API error response." response + Given new "GetSyntheticsSuite" request + And request contains "public_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 API error response. + + @generated @skip @team:DataDog/synthetics-managing + Scenario: Synthetics: Get a suite returns "OK" response + Given new "GetSyntheticsSuite" request + And request contains "public_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/synthetics-managing + Scenario: Synthetics: edit a test suite returns "API error response." response + Given new "EditSyntheticsSuite" request + And request contains "public_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"message": "Notification message", "name": "Example suite name", "options": {}, "tags": ["env:production"], "tests": [{"alerting_criticality": "critical", "public_id": ""}], "type": "suite"}, "type": "suites"}} + When the request is sent + Then the response status is 400 API error response. + + @generated @skip @team:DataDog/synthetics-managing + Scenario: Synthetics: edit a test suite returns "OK" response + Given new "EditSyntheticsSuite" request + And request contains "public_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"message": "Notification message", "name": "Example suite name", "options": {}, "tags": ["env:production"], "tests": [{"alerting_criticality": "critical", "public_id": ""}], "type": "suite"}, "type": "suites"}} + When the request is sent + Then the response status is 200 OK diff --git a/src/test/resources/com/datadog/api/client/v2/api/undo.json b/src/test/resources/com/datadog/api/client/v2/api/undo.json index eb43f26dbec..2db822fc923 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/undo.json +++ b/src/test/resources/com/datadog/api/client/v2/api/undo.json @@ -4522,6 +4522,43 @@ "type": "safe" } }, + "CreateSyntheticsSuite": { + "tag": "Synthetics", + "undo": { + "operationId": "DeleteSyntheticsSuites", + "parameters": [ + { + "name": "body", + "template": "{\"data\": {\"type\": \"delete_suites_request\", \"attributes\": {\"public_ids\": [\"{{ data.attributes.public_id }}\"]}}" + } + ], + "type": "unsafe" + } + }, + "DeleteSyntheticsSuites": { + "tag": "Synthetics", + "undo": { + "type": "idempotent" + } + }, + "SearchSuites": { + "tag": "Synthetics", + "undo": { + "type": "safe" + } + }, + "GetSyntheticsSuite": { + "tag": "Synthetics", + "undo": { + "type": "safe" + } + }, + "EditSyntheticsSuite": { + "tag": "Synthetics", + "undo": { + "type": "idempotent" + } + }, "ListTagPipelinesRulesets": { "tag": "Cloud Cost Management", "undo": {