From 0dac25eff1791a728805aff38ed9a2e410e983ef Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Fri, 24 Apr 2026 16:37:43 +0000 Subject: [PATCH] Regenerate client from commit c8905f8 of spec repo --- .generator/schemas/v2/openapi.yaml | 2531 ++++++++++++++++- docs/datadog_api_client.v2.model.rst | 615 +++- .../GetSyntheticsBrowserTestResult.py | 16 + .../v2/synthetics/GetSyntheticsTestResult.py | 16 + .../ListSyntheticsBrowserTestLatestResults.py | 15 + .../ListSyntheticsTestLatestResults.py | 15 + .../synthetics/PollSyntheticsTestResults.py | 15 + .../v2/api/synthetics_api.py | 414 ++- .../synthetics_fast_test_result_attributes.py | 34 +- .../synthetics_fast_test_result_detail.py | 129 +- .../synthetics_fast_test_result_failure.py | 43 - .../model/synthetics_fast_test_step_result.py | 17 - .../synthetics_fast_test_traceroute_hop.py | 17 - .../v2/model/synthetics_fast_test_type.py | 38 + .../synthetics_poll_test_results_response.py | 56 + ...synthetics_test_latest_results_response.py | 56 + ...synthetics_test_result_assertion_result.py | 149 + .../synthetics_test_result_attributes.py | 116 + .../v2/model/synthetics_test_result_batch.py | 36 + .../v2/model/synthetics_test_result_bounds.py | 64 + .../synthetics_test_result_browser_error.py | 99 + .../synthetics_test_result_bucket_keys.py | 120 + ...synthetics_test_result_cdn_cache_status.py | 43 + ...ynthetics_test_result_cdn_provider_info.py | 56 + .../synthetics_test_result_cdn_resource.py | 91 + .../synthetics_test_result_certificate.py | 138 + ...hetics_test_result_certificate_validity.py | 43 + .../v2/model/synthetics_test_result_ci.py | 74 + .../synthetics_test_result_ci_pipeline.py | 64 + .../synthetics_test_result_ci_provider.py | 36 + .../model/synthetics_test_result_ci_stage.py | 36 + .../v2/model/synthetics_test_result_data.py | 74 + .../v2/model/synthetics_test_result_detail.py | 421 +++ .../v2/model/synthetics_test_result_device.py | 96 + .../synthetics_test_result_device_browser.py | 56 + .../synthetics_test_result_device_platform.py | 43 + ...ynthetics_test_result_device_resolution.py | 56 + .../synthetics_test_result_dns_record.py | 43 + .../synthetics_test_result_dns_resolution.py | 74 + ...ics_test_result_dns_resolution_attempt.py} | 9 +- .../model/synthetics_test_result_duration.py | 43 + .../synthetics_test_result_execution_info.py | 105 + .../model/synthetics_test_result_failure.py | 64 + .../model/synthetics_test_result_file_ref.py | 72 + .../v2/model/synthetics_test_result_git.py | 62 + .../synthetics_test_result_git_commit.py | 78 + .../model/synthetics_test_result_git_user.py | 56 + .../model/synthetics_test_result_handshake.py | 56 + .../synthetics_test_result_health_check.py | 45 + .../synthetics_test_result_included_item.py | 75 + ....py => synthetics_test_result_location.py} | 10 +- .../model/synthetics_test_result_netpath.py | 112 + ...thetics_test_result_netpath_destination.py | 56 + ...synthetics_test_result_netpath_endpoint.py | 36 + .../synthetics_test_result_netpath_hop.py | 72 + .../model/synthetics_test_result_netstats.py | 90 + .../synthetics_test_result_netstats_hops.py | 56 + .../synthetics_test_result_network_latency.py | 56 + ...synthetics_test_result_ocsp_certificate.py | 56 + .../synthetics_test_result_ocsp_response.py | 66 + .../synthetics_test_result_ocsp_updates.py | 56 + .../synthetics_test_result_parent_step.py | 36 + .../synthetics_test_result_parent_test.py | 36 + .../model/synthetics_test_result_redirect.py | 43 + ...ynthetics_test_result_relationship_test.py | 46 + ...ics_test_result_relationship_test_data.py} | 20 +- .../synthetics_test_result_relationships.py | 46 + .../synthetics_test_result_request_info.py | 236 ++ .../model/synthetics_test_result_response.py | 56 + .../synthetics_test_result_response_info.py | 213 ++ .../v2/model/synthetics_test_result_router.py | 43 + .../synthetics_test_result_rum_context.py | 56 + .../model/synthetics_test_result_run_type.py | 44 + .../v2/model/synthetics_test_result_status.py | 41 + .../v2/model/synthetics_test_result_step.py | 486 ++++ ...etics_test_result_step_assertion_result.py | 90 + ...hetics_test_result_step_element_updates.py | 56 + .../synthetics_test_result_steps_info.py | 56 + .../model/synthetics_test_result_sub_step.py | 64 + .../model/synthetics_test_result_sub_test.py | 62 + ...nthetics_test_result_summary_attributes.py | 132 + .../synthetics_test_result_summary_data.py | 78 + .../synthetics_test_result_summary_type.py | 35 + .../v2/model/synthetics_test_result_tab.py | 56 + .../v2/model/synthetics_test_result_trace.py | 43 + .../synthetics_test_result_traceroute_hop.py | 106 + .../v2/model/synthetics_test_result_turn.py | 96 + .../model/synthetics_test_result_turn_step.py | 73 + .../v2/model/synthetics_test_result_type.py | 35 + .../model/synthetics_test_result_variable.py | 112 + .../model/synthetics_test_result_variables.py | 54 + .../synthetics_test_result_vitals_metrics.py | 80 + .../model/synthetics_test_result_warning.py | 62 + ...synthetics_test_result_web_socket_close.py | 43 + .../v2/model/synthetics_test_sub_type.py | 62 + .../v2/model/synthetics_test_type.py | 44 + src/datadog_api_client/v2/models/__init__.py | 190 +- tests/v2/features/synthetics.feature | 74 + tests/v2/features/undo.json | 30 + 99 files changed, 10204 insertions(+), 317 deletions(-) create mode 100644 examples/v2/synthetics/GetSyntheticsBrowserTestResult.py create mode 100644 examples/v2/synthetics/GetSyntheticsTestResult.py create mode 100644 examples/v2/synthetics/ListSyntheticsBrowserTestLatestResults.py create mode 100644 examples/v2/synthetics/ListSyntheticsTestLatestResults.py create mode 100644 examples/v2/synthetics/PollSyntheticsTestResults.py delete mode 100644 src/datadog_api_client/v2/model/synthetics_fast_test_result_failure.py delete mode 100644 src/datadog_api_client/v2/model/synthetics_fast_test_step_result.py delete mode 100644 src/datadog_api_client/v2/model/synthetics_fast_test_traceroute_hop.py create mode 100644 src/datadog_api_client/v2/model/synthetics_fast_test_type.py create mode 100644 src/datadog_api_client/v2/model/synthetics_poll_test_results_response.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_latest_results_response.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_assertion_result.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_attributes.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_batch.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_bounds.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_browser_error.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_bucket_keys.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_cdn_cache_status.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_cdn_provider_info.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_cdn_resource.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_certificate.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_certificate_validity.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_ci.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_ci_pipeline.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_ci_provider.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_ci_stage.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_data.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_detail.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_device.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_device_browser.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_device_platform.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_device_resolution.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_dns_record.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_dns_resolution.py rename src/datadog_api_client/v2/model/{synthetics_fast_test_assertion_result.py => synthetics_test_result_dns_resolution_attempt.py} (63%) create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_duration.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_execution_info.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_failure.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_file_ref.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_git.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_git_commit.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_git_user.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_handshake.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_health_check.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_included_item.py rename src/datadog_api_client/v2/model/{synthetics_fast_test_result_location.py => synthetics_test_result_location.py} (84%) create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_netpath.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_netpath_destination.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_netpath_endpoint.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_netpath_hop.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_netstats.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_netstats_hops.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_network_latency.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_ocsp_certificate.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_ocsp_response.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_ocsp_updates.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_parent_step.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_parent_test.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_redirect.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_relationship_test.py rename src/datadog_api_client/v2/model/{synthetics_fast_test_result_device.py => synthetics_test_result_relationship_test_data.py} (64%) create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_relationships.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_request_info.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_response.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_response_info.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_router.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_rum_context.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_run_type.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_status.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_step.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_step_assertion_result.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_step_element_updates.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_steps_info.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_sub_step.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_sub_test.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_summary_attributes.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_summary_data.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_summary_type.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_tab.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_trace.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_traceroute_hop.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_turn.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_turn_step.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_type.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_variable.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_variables.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_vitals_metrics.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_warning.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_result_web_socket_close.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_sub_type.py create mode 100644 src/datadog_api_client/v2/model/synthetics_test_type.py diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 201e944cd5..7ab82fd266 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -71412,10 +71412,6 @@ components: $ref: "#/components/schemas/SyntheticsApiMultistepSubtestData" type: array type: object - SyntheticsFastTestAssertionResult: - additionalProperties: {} - description: Result of a single assertion evaluated during a fast test run. - type: object SyntheticsFastTestResult: description: |- Fast test result response. Returns `null` if the result is not yet available @@ -71429,19 +71425,18 @@ components: description: Attributes of the fast test result. properties: device: - $ref: "#/components/schemas/SyntheticsFastTestResultDevice" + $ref: "#/components/schemas/SyntheticsTestResultDevice" location: - $ref: "#/components/schemas/SyntheticsFastTestResultLocation" + $ref: "#/components/schemas/SyntheticsTestResultLocation" result: $ref: "#/components/schemas/SyntheticsFastTestResultDetail" test_sub_type: $ref: "#/components/schemas/SyntheticsFastTestSubType" test_type: - description: The type of the Synthetic test that produced this result (for example, `api` or `browser`). - example: api - type: string + $ref: "#/components/schemas/SyntheticsFastTestType" test_version: description: Version of the test at the time the fast test was triggered. + example: 1 format: int64 type: integer type: object @@ -71465,48 +71460,47 @@ components: assertions: description: Results of each assertion evaluated during the test. items: - $ref: "#/components/schemas/SyntheticsFastTestAssertionResult" + $ref: "#/components/schemas/SyntheticsTestResultAssertionResult" type: array call_type: description: gRPC call type (for example, `unary`, `healthCheck`, or `reflection`). + example: unary type: string cert: - additionalProperties: {} - description: TLS certificate details, present for SSL tests. - type: object + $ref: "#/components/schemas/SyntheticsTestResultCertificate" duration: description: Total duration of the test in milliseconds. + example: 150.5 format: double type: number failure: - $ref: "#/components/schemas/SyntheticsFastTestResultFailure" + $ref: "#/components/schemas/SyntheticsTestResultFailure" finished_at: description: Unix timestamp (ms) of when the test finished. + example: 1679328001000 format: int64 type: integer id: description: The result ID. Set to the fast test UUID because no persistent result ID exists for fast tests. + example: abc12345-1234-1234-1234-abc123456789 type: string is_fast_retry: description: Whether this result is from an automatic fast retry. + example: false type: boolean request: - additionalProperties: {} - description: Details of the outgoing request made during the test. - type: object + $ref: "#/components/schemas/SyntheticsTestResultRequestInfo" resolved_ip: description: IP address resolved for the target host. example: "1.2.3.4" type: string response: - additionalProperties: {} - description: Details of the response received during the test. - type: object + $ref: "#/components/schemas/SyntheticsTestResultResponseInfo" run_type: - description: Run type indicating how this test was triggered (for example, `fast`). - type: string + $ref: "#/components/schemas/SyntheticsTestResultRunType" started_at: description: Unix timestamp (ms) of when the test started. + example: 1679328000000 format: int64 type: integer status: @@ -71516,67 +71510,34 @@ components: steps: description: Step results for multistep API tests. items: - $ref: "#/components/schemas/SyntheticsFastTestStepResult" + $ref: "#/components/schemas/SyntheticsTestResultStep" type: array timings: additionalProperties: {} description: Timing breakdown of the test request phases (for example, DNS, TCP, TLS, first byte). + example: + dns: 2.9 + download: 2.1 + firstByte: 95.2 + ssl: 187.9 + tcp: 92.6 + total: 380.7 type: object traceroute: description: Traceroute hop results, present for ICMP and TCP tests. items: - $ref: "#/components/schemas/SyntheticsFastTestTracerouteHop" + $ref: "#/components/schemas/SyntheticsTestResultTracerouteHop" type: array triggered_at: description: Unix timestamp (ms) of when the test was triggered. + example: 1679327999000 format: int64 type: integer tunnel: description: Whether the test was run through a Synthetics tunnel. + example: false type: boolean type: object - SyntheticsFastTestResultDevice: - description: Device information for browser-based fast tests. - properties: - id: - description: Device identifier. - example: chrome.laptop_large - type: string - name: - description: Display name of the device. - example: Laptop Large - type: string - type: object - SyntheticsFastTestResultFailure: - description: Failure details if the fast test did not pass. - properties: - code: - description: Error code identifying the failure type. - example: TIMEOUT - type: string - message: - description: Human-readable description of the failure. - example: Connection timed out - type: string - type: object - SyntheticsFastTestResultLocation: - description: Location from which the fast test was executed. - properties: - id: - description: ID of the location. - example: aws:us-east-1 - type: string - name: - description: Display name of the location. - example: N. Virginia (AWS) - type: string - version: - description: Agent version running at this location. - type: string - worker_id: - description: Identifier of the specific worker that ran the test. - type: string - type: object SyntheticsFastTestResultType: default: result description: JSON:API type for a fast test result. @@ -71586,10 +71547,6 @@ components: type: string x-enum-varnames: - RESULT - SyntheticsFastTestStepResult: - additionalProperties: {} - description: Result of a single step in a multistep fast test run. - type: object SyntheticsFastTestSubType: description: Subtype of the Synthetic test that produced this result. enum: @@ -71616,10 +71573,16 @@ components: - TCP - UDP - WEBSOCKET - SyntheticsFastTestTracerouteHop: - additionalProperties: {} - description: A single traceroute hop result from a fast test run. - type: object + SyntheticsFastTestType: + description: Type of the Synthetic fast test that produced this result. + enum: + - fast-api + - fast-browser + example: fast-api + type: string + x-enum-varnames: + - FAST_API + - FAST_BROWSER SyntheticsGlobalVariable: description: Synthetic global variable. properties: @@ -72104,6 +72067,20 @@ components: type: string x-enum-varnames: - NETWORK + SyntheticsPollTestResultsResponse: + description: Response object for polling Synthetic test results. + properties: + data: + description: Array of Synthetic test results. + items: + $ref: "#/components/schemas/SyntheticsTestResultData" + type: array + included: + description: Array of included related resources, such as the test definition. + items: + $ref: "#/components/schemas/SyntheticsTestResultIncludedItem" + type: array + type: object SyntheticsRestrictedRoles: deprecated: true description: A list of role identifiers that can be pulled from the Roles API, for restricting read and write access. This field is deprecated. Use the restriction policies API to manage permissions. @@ -72401,6 +72378,20 @@ components: multipart_presigned_urls_params: $ref: "#/components/schemas/SyntheticsTestFileMultipartPresignedUrlsParams" type: object + SyntheticsTestLatestResultsResponse: + description: Response object for a Synthetic test's latest result summaries. + properties: + data: + description: Array of Synthetic test result summaries. + items: + $ref: "#/components/schemas/SyntheticsTestResultSummaryData" + type: array + included: + description: Array of included related resources, such as the test definition. + items: + $ref: "#/components/schemas/SyntheticsTestResultIncludedItem" + type: array + type: object SyntheticsTestOptions: description: Object describing the extra options for a Synthetic test. properties: @@ -72611,6 +72602,1910 @@ components: x-enum-varnames: - LIVE - PAUSED + SyntheticsTestResultAssertionResult: + description: An individual assertion result from a Synthetic test. + properties: + actual: + description: Actual value observed during the test. Its type depends on the assertion type. + example: 200 + error_message: + description: Error message if the assertion failed. + example: "Assertion failed: expected 200 but got 500" + type: string + expected: + description: Expected value for the assertion. Its type depends on the assertion type. + example: "200" + operator: + description: Operator used for the assertion (for example, `is`, `contains`). + example: is + type: string + property: + description: Property targeted by the assertion, when applicable. + example: content-type + type: string + target: + description: Target value for the assertion. Its type depends on the assertion type. + example: 200 + target_path: + description: JSON path or XPath evaluated for the assertion. + example: $.url + type: string + target_path_operator: + description: Operator used for the target path assertion. + example: contains + type: string + type: + description: Type of the assertion (for example, `responseTime`, `statusCode`, `body`). + example: statusCode + type: string + valid: + description: Whether the assertion passed. + example: true + type: boolean + type: object + SyntheticsTestResultAttributes: + description: Attributes of a Synthetic test result. + properties: + batch: + $ref: "#/components/schemas/SyntheticsTestResultBatch" + ci: + $ref: "#/components/schemas/SyntheticsTestResultCI" + device: + $ref: "#/components/schemas/SyntheticsTestResultDevice" + git: + $ref: "#/components/schemas/SyntheticsTestResultGit" + location: + $ref: "#/components/schemas/SyntheticsTestResultLocation" + result: + $ref: "#/components/schemas/SyntheticsTestResultDetail" + test_sub_type: + $ref: "#/components/schemas/SyntheticsTestSubType" + test_type: + $ref: "#/components/schemas/SyntheticsTestType" + type: object + SyntheticsTestResultBatch: + description: Batch information for the test result. + properties: + id: + description: Batch identifier. + example: batch-abc-123 + type: string + type: object + SyntheticsTestResultBounds: + description: Bounding box of an element on the page. + properties: + height: + description: Height in pixels. + example: 37 + format: int64 + type: integer + width: + description: Width in pixels. + example: 343 + format: int64 + type: integer + x: + description: Horizontal position in pixels. + example: 16 + format: int64 + type: integer + y: + description: Vertical position in pixels. + example: 140 + format: int64 + type: integer + type: object + SyntheticsTestResultBrowserError: + description: A browser error captured during a browser test step. + properties: + description: + description: Error description. + example: Failed to fetch resource + type: string + method: + description: HTTP method associated with the error (for network errors). + example: GET + type: string + name: + description: Error name. + example: NetworkError + type: string + status: + description: HTTP status code associated with the error (for network errors). + example: 500 + format: int64 + type: integer + type: + description: Type of the browser error. + example: network + type: string + url: + additionalProperties: {} + description: URL associated with the error. + type: object + type: object + SyntheticsTestResultBucketKeys: + description: Storage bucket keys for artifacts produced during a step or test. + properties: + after_step_screenshot: + description: Key for the screenshot captured after the step (goal-based tests). + example: screenshots/after-step-1-1.png + type: string + after_turn_screenshot: + description: Key for the screenshot captured after the turn (goal-based tests). + example: screenshots/after-turn-1.png + type: string + artifacts: + description: Key for miscellaneous artifacts. + example: 2/e2e-tests/equ-jku-twc/results/6989498452827932222/edge.laptop_large/artifacts__1724521416257.json + type: string + before_step_screenshot: + description: Key for the screenshot captured before the step (goal-based tests). + example: screenshots/before-step-1-1.png + type: string + before_turn_screenshot: + description: Key for the screenshot captured before the turn (goal-based tests). + example: screenshots/before-turn-1.png + type: string + crash_report: + description: Key for a captured crash report. + example: 2/e2e-tests/d2z-32s-iax/results/1340718101990858549/synthetics:mobile:device:iphone_se_2020_ios_14/crash_report.log + type: string + device_logs: + description: Key for captured device logs. + example: 2/e2e-tests/d2z-32s-iax/results/1340718101990858549/synthetics:mobile:device:iphone_se_2020_ios_14/d2z-32s-iax_1340718101990858549_device_logs.log + type: string + email_messages: + description: Keys for email message payloads captured by the step. + items: + description: Storage bucket key for a captured email message. + type: string + type: array + screenshot: + description: Key for the captured screenshot. + example: 2/e2e-tests/equ-jku-twc/results/6989498452827932222/edge.laptop_large/step-0__1724521416269.jpeg + type: string + snapshot: + description: Key for the captured DOM snapshot. + example: 2/e2e-tests/equ-jku-twc/results/6989498452827932222/edge.laptop_large/snapshot.html + type: string + source: + description: Key for the page source or element source. + example: 2/e2e-tests/d2z-32s-iax/results/1340718101990858549/synthetics:mobile:device:iphone_se_2020_ios_14/step-0__1724445301832.xml + type: string + type: object + SyntheticsTestResultCI: + description: CI information associated with the test result. + properties: + pipeline: + $ref: "#/components/schemas/SyntheticsTestResultCIPipeline" + provider: + $ref: "#/components/schemas/SyntheticsTestResultCIProvider" + stage: + $ref: "#/components/schemas/SyntheticsTestResultCIStage" + workspace_path: + description: Path of the workspace that ran the CI job. + example: /home/runner/work/example + type: string + type: object + SyntheticsTestResultCIPipeline: + description: Details of the CI pipeline. + properties: + id: + description: Pipeline identifier. + example: pipeline-abc-123 + type: string + name: + description: Pipeline name. + example: build-and-test + type: string + number: + description: Pipeline number. + example: 42 + format: int64 + type: integer + url: + description: Pipeline URL. + example: https://github.com/DataDog/example/actions/runs/42 + type: string + type: object + SyntheticsTestResultCIProvider: + description: Details of the CI provider. + properties: + name: + description: Provider name. + example: github + type: string + type: object + SyntheticsTestResultCIStage: + description: Details of the CI stage. + properties: + name: + description: Stage name. + example: test + type: string + type: object + SyntheticsTestResultCdnCacheStatus: + description: Cache status reported by the CDN for the response. + properties: + cached: + description: Whether the response was served from the CDN cache. + example: true + type: boolean + status: + description: Raw cache status string reported by the CDN. + example: HIT + type: string + type: object + SyntheticsTestResultCdnProviderInfo: + description: CDN provider details inferred from response headers. + properties: + cache: + $ref: "#/components/schemas/SyntheticsTestResultCdnCacheStatus" + provider: + description: Name of the CDN provider. + example: google_cloud + type: string + type: object + SyntheticsTestResultCdnResource: + description: A CDN resource encountered while executing a browser step. + properties: + cdn: + $ref: "#/components/schemas/SyntheticsTestResultCdnProviderInfo" + resolved_ip: + description: Resolved IP address for the CDN resource. + example: 34.95.79.70 + type: string + timestamp: + description: Unix timestamp (ms) of when the resource was fetched. + example: 1724521406576 + format: int64 + type: integer + timings: + additionalProperties: {} + description: Timing breakdown for fetching the CDN resource. + example: + firstByte: 99.7 + tcp: 0.9 + type: object + type: object + SyntheticsTestResultCertificate: + description: SSL/TLS certificate information returned from an SSL test. + properties: + cipher: + description: Cipher used for the TLS connection. + example: TLS_AES_256_GCM_SHA384 + type: string + exponent: + description: RSA exponent of the certificate. + example: 65537 + format: int64 + type: integer + ext_key_usage: + description: Extended key usage extensions for the certificate. + example: + - 1.3.6.1.5.5.7.3.1 + items: + description: Extended key usage value. + type: string + type: array + fingerprint: + description: SHA-1 fingerprint of the certificate. + example: D6:03:5A:9F:93:E1:B7:28:EC:90:C5:9F:72:30:55:7C:74:5F:53:92 + type: string + fingerprint256: + description: SHA-256 fingerprint of the certificate. + example: 04:45:93:A9:4C:14:70:47:DB:3C:FC:05:F9:5A:50:4E:DA:DB:A1:C6:37:3D:15:C0:B2:7E:5D:93:5F:A2:02:C7 + type: string + issuer: + additionalProperties: + type: string + description: Certificate issuer details. + example: + C: US + CN: WE2 + O: Google Trust Services + type: object + modulus: + description: RSA modulus of the certificate. + example: C0FCE9F9... + type: string + protocol: + description: TLS protocol used (for example, `TLSv1.2`). + example: TLSv1.3 + type: string + serial_number: + description: Serial number of the certificate. + example: 7B584A1A6670A1EB0941A9A121569D60 + type: string + subject: + additionalProperties: + type: string + description: Certificate subject details. + example: + CN: "*.google.fr" + altName: "DNS:*.google.fr, DNS:google.fr" + type: object + tls_version: + description: TLS protocol version. + example: 1.3 + format: double + type: number + valid: + $ref: "#/components/schemas/SyntheticsTestResultCertificateValidity" + type: object + SyntheticsTestResultCertificateValidity: + description: Validity window of a certificate. + properties: + from: + description: Unix timestamp (ms) of when the certificate became valid. + example: 1742469686000 + format: int64 + type: integer + to: + description: Unix timestamp (ms) of when the certificate expires. + example: 1749727285000 + format: int64 + type: integer + type: object + SyntheticsTestResultData: + description: Wrapper object for a Synthetic test result. + properties: + attributes: + $ref: "#/components/schemas/SyntheticsTestResultAttributes" + id: + description: The result ID. + example: "5158904793181869365" + type: string + relationships: + $ref: "#/components/schemas/SyntheticsTestResultRelationships" + type: + $ref: "#/components/schemas/SyntheticsTestResultType" + type: object + SyntheticsTestResultDetail: + description: Full result details for a Synthetic test execution. + properties: + assertions: + description: Assertion results produced by the test. + items: + $ref: "#/components/schemas/SyntheticsTestResultAssertionResult" + type: array + bucket_keys: + $ref: "#/components/schemas/SyntheticsTestResultBucketKeys" + call_type: + description: gRPC call type (for example, `unary`, `healthCheck`, or `reflection`). + example: unary + type: string + cert: + $ref: "#/components/schemas/SyntheticsTestResultCertificate" + compressed_json_descriptor: + description: Compressed JSON descriptor for the test (internal format). + example: compressedJsonDescriptorValue + type: string + compressed_steps: + description: Compressed representation of the test steps (internal format). + example: eJzLSM3JyQcABiwCFQ== + type: string + connection_outcome: + description: Outcome of the connection attempt (for example, `established`, `refused`). + example: established + type: string + dns_resolution: + $ref: "#/components/schemas/SyntheticsTestResultDnsResolution" + duration: + description: Duration of the test execution (in milliseconds). + example: 380.7 + format: double + type: number + exited_on_step_success: + description: Whether the test exited early because a step marked with `exitIfSucceed` passed. + example: false + type: boolean + failure: + $ref: "#/components/schemas/SyntheticsTestResultFailure" + finished_at: + description: Timestamp of when the test finished (in milliseconds). + example: 1723782422760 + format: int64 + type: integer + handshake: + $ref: "#/components/schemas/SyntheticsTestResultHandshake" + id: + description: The unique identifier for this result. + example: "5158904793181869365" + type: string + initial_id: + description: The initial result ID before any retries. + example: "5158904793181869365" + type: string + is_fast_retry: + description: Whether this result is from a fast retry. + example: true + type: boolean + is_last_retry: + description: Whether this result is from the last retry. + example: true + type: boolean + netpath: + $ref: "#/components/schemas/SyntheticsTestResultNetpath" + netstats: + $ref: "#/components/schemas/SyntheticsTestResultNetstats" + ocsp: + $ref: "#/components/schemas/SyntheticsTestResultOCSPResponse" + ping: + $ref: "#/components/schemas/SyntheticsTestResultTracerouteHop" + received_email_count: + description: Number of emails received during the test (email tests). + example: 1 + format: int64 + type: integer + received_message: + description: Message received from the target (for WebSocket/TCP/UDP tests). + example: "UDP echo: b'Test message'" + type: string + request: + $ref: "#/components/schemas/SyntheticsTestResultRequestInfo" + resolved_ip: + description: IP address resolved for the target host. + example: "54.243.255.141" + type: string + response: + $ref: "#/components/schemas/SyntheticsTestResultResponseInfo" + run_type: + $ref: "#/components/schemas/SyntheticsTestResultRunType" + sent_message: + description: Message sent to the target (for WebSocket/TCP/UDP tests). + example: udp mess + type: string + start_url: + description: Start URL for the test (browser tests). + example: http://34.95.79.70/prototype + type: string + started_at: + description: Timestamp of when the test started (in milliseconds). + example: 1723782422750 + format: int64 + type: integer + status: + $ref: "#/components/schemas/SyntheticsTestResultStatus" + steps: + description: Step results (for browser, mobile, and multistep API tests). + items: + $ref: "#/components/schemas/SyntheticsTestResultStep" + type: array + time_to_interactive: + description: Time to interactive in milliseconds (browser tests). + example: 183 + format: int64 + type: integer + timings: + additionalProperties: {} + description: Timing breakdown of the test request phases (for example, DNS, TCP, TLS, first byte). + example: + dns: 2.9 + download: 2.1 + firstByte: 95.2 + ssl: 187.9 + tcp: 92.6 + total: 380.7 + type: object + trace: + $ref: "#/components/schemas/SyntheticsTestResultTrace" + traceroute: + description: Traceroute hop results (for network tests). + items: + $ref: "#/components/schemas/SyntheticsTestResultTracerouteHop" + type: array + triggered_at: + description: Timestamp of when the test was triggered (in milliseconds). + example: 1723782422715 + format: int64 + type: integer + tunnel: + description: Whether the test was executed through a tunnel. + example: false + type: boolean + turns: + description: Turns executed by a goal-based browser test. + items: + $ref: "#/components/schemas/SyntheticsTestResultTurn" + type: array + unhealthy: + description: Whether the test runner was unhealthy at the time of execution. + example: false + type: boolean + variables: + $ref: "#/components/schemas/SyntheticsTestResultVariables" + type: object + SyntheticsTestResultDevice: + description: Device information for the test result (browser and mobile tests). + properties: + browser: + $ref: "#/components/schemas/SyntheticsTestResultDeviceBrowser" + id: + description: Device identifier. + example: chrome.laptop_large + type: string + name: + description: Device name. + example: "Chrome - Laptop Large" + type: string + platform: + $ref: "#/components/schemas/SyntheticsTestResultDevicePlatform" + resolution: + $ref: "#/components/schemas/SyntheticsTestResultDeviceResolution" + type: + description: Device type. + example: browser + type: string + type: object + SyntheticsTestResultDeviceBrowser: + description: Browser information for the device used to run the test. + properties: + type: + description: Browser type (for example, `chrome`, `firefox`). + example: edge + type: string + user_agent: + description: User agent string reported by the browser. + example: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36 Edg/127.0.2651.105 DatadogSynthetics + type: string + version: + description: Browser version. + example: 127.0.2651.105 + type: string + type: object + SyntheticsTestResultDevicePlatform: + description: Platform information for the device used to run the test. + properties: + name: + description: Platform name (for example, `linux`, `macos`). + example: ios + type: string + version: + description: Platform version. + example: "14.8" + type: string + type: object + SyntheticsTestResultDeviceResolution: + description: Screen resolution of the device used to run the test. + properties: + height: + description: Viewport height in pixels. + example: 1100 + format: int64 + type: integer + pixel_ratio: + description: Device pixel ratio. + example: 2 + format: double + type: number + width: + description: Viewport width in pixels. + example: 1440 + format: int64 + type: integer + type: object + SyntheticsTestResultDnsRecord: + description: A DNS record returned in a DNS test response. + properties: + type: + description: DNS record type (for example, `A`, `AAAA`, `CNAME`). + example: A + type: string + values: + description: Values associated with the DNS record. + example: + - 213.186.33.19 + items: + description: DNS record value. + type: string + type: array + type: object + SyntheticsTestResultDnsResolution: + description: DNS resolution details recorded during the test execution. + properties: + attempts: + description: DNS resolution attempts made during the test. + items: + $ref: "#/components/schemas/SyntheticsTestResultDnsResolutionAttempt" + type: array + resolved_ip: + description: Resolved IP address for the target host. + example: 54.243.255.141 + type: string + resolved_port: + description: Resolved port for the target service. + example: "443" + type: string + server: + description: DNS server used for the resolution. + example: 8.8.4.4 + type: string + type: object + SyntheticsTestResultDnsResolutionAttempt: + additionalProperties: + type: string + description: A single DNS resolution attempt. Keys are provider-specific attempt fields. + type: object + SyntheticsTestResultDuration: + description: Total duration of a Synthetic test execution. + properties: + has_duration: + description: Whether a duration was recorded for this execution. + example: true + type: boolean + value: + description: Duration value in milliseconds. + example: 380 + format: int64 + type: integer + type: object + SyntheticsTestResultExecutionInfo: + description: Execution details for a Synthetic test result. + properties: + duration: + $ref: "#/components/schemas/SyntheticsTestResultDuration" + error_message: + description: Error message if the execution encountered an issue. + example: Connection timed out + type: string + is_fast_retry: + description: Whether this result is from a fast retry. + example: true + type: boolean + timings: + additionalProperties: {} + description: Timing breakdown of the test execution in milliseconds. + example: + dns: 2.9 + download: 2.1 + firstByte: 95.2 + ssl: 187.9 + tcp: 92.6 + total: 380.7 + type: object + tunnel: + description: Whether the test was executed through a tunnel. + example: false + type: boolean + unhealthy: + description: Whether the location was unhealthy during execution. + example: false + type: boolean + type: object + SyntheticsTestResultFailure: + description: Details about the failure of a Synthetic test. + properties: + code: + description: Error code for the failure. + example: TIMEOUT + type: string + internal_code: + description: Internal error code used for debugging. + example: INCORRECT_ASSERTION + type: string + internal_message: + description: Internal error message used for debugging. + example: Assertion failed on step 2 + type: string + message: + description: Error message for the failure. + example: Connection timed out + type: string + type: object + SyntheticsTestResultFileRef: + description: Reference to a file attached to a Synthetic test request. + properties: + bucket_key: + description: Storage bucket key where the file is stored. + example: api-upload-file/s3v-msw-tp3/2024-08-20T12:18:27.628081_f433c953-a58a-4296-834b-0669e32ba55f.json + type: string + encoding: + description: Encoding of the file contents. + example: base64 + type: string + name: + description: File name. + example: dd_logo_h_rgb.jpg + type: string + size: + description: File size in bytes. + example: 30294 + format: int64 + type: integer + type: + description: File MIME type. + example: image/jpeg + type: string + type: object + SyntheticsTestResultGit: + description: Git information associated with the test result. + properties: + branch: + description: Git branch name. + example: main + type: string + commit: + $ref: "#/components/schemas/SyntheticsTestResultGitCommit" + repository_url: + description: Git repository URL. + example: https://github.com/DataDog/example + type: string + type: object + SyntheticsTestResultGitCommit: + description: Details of the Git commit associated with the test result. + properties: + author: + $ref: "#/components/schemas/SyntheticsTestResultGitUser" + committer: + $ref: "#/components/schemas/SyntheticsTestResultGitUser" + message: + description: Commit message. + example: Fix bug in login flow + type: string + sha: + description: Commit SHA. + example: 9e107d9d372bb6826bd81d3542a419d6f0e1de56 + type: string + url: + description: URL of the commit. + example: https://github.com/DataDog/example/commit/9e107d9d372bb6826bd81d3542a419d6f0e1de56 + type: string + type: object + SyntheticsTestResultGitUser: + description: A Git user (author or committer). + properties: + date: + description: Timestamp of the commit action for this user. + example: "2024-08-15T14:23:00Z" + type: string + email: + description: Email address of the Git user. + example: jane.doe@example.com + type: string + name: + description: Name of the Git user. + example: Jane Doe + type: string + type: object + SyntheticsTestResultHandshake: + description: Handshake request and response for protocol-level tests. + properties: + request: + $ref: "#/components/schemas/SyntheticsTestResultRequestInfo" + response: + $ref: "#/components/schemas/SyntheticsTestResultResponseInfo" + type: object + SyntheticsTestResultHealthCheck: + description: Health check information returned from a gRPC health check call. + properties: + message: + additionalProperties: + type: string + description: Raw health check message payload. + type: object + status: + description: Health check status code. + example: 1 + format: int64 + type: integer + type: object + SyntheticsTestResultIncludedItem: + description: An included related resource. + properties: + attributes: + additionalProperties: {} + description: Attributes of the included resource. + type: object + id: + description: ID of the included resource. + example: abc-def-123 + type: string + type: + description: Type of the included resource. + example: test + type: string + type: object + SyntheticsTestResultLocation: + description: Location information for a Synthetic test result. + properties: + id: + description: Identifier of the location. + example: aws:us-east-1 + type: string + name: + description: Human-readable name of the location. + example: "N. Virginia (AWS)" + type: string + version: + description: Version of the worker that ran the test. + example: 1.0.0 + type: string + worker_id: + description: Identifier of the specific worker that ran the test. + example: worker-abc-123 + type: string + type: object + SyntheticsTestResultNetpath: + description: Network Path test result capturing the path between source and destination. + properties: + destination: + $ref: "#/components/schemas/SyntheticsTestResultNetpathDestination" + hops: + description: Hops along the network path. + items: + $ref: "#/components/schemas/SyntheticsTestResultNetpathHop" + type: array + origin: + description: Origin of the network path (for example, probe source). + example: synthetics + type: string + pathtrace_id: + description: Identifier of the path trace. + example: 5d3cb978-533b-41ce-85a4-3661c8dd6a0b + type: string + protocol: + description: Protocol used for the path trace (for example, `tcp`, `udp`, `icmp`). + example: TCP + type: string + source: + $ref: "#/components/schemas/SyntheticsTestResultNetpathEndpoint" + tags: + description: Tags associated with the network path measurement. + example: + - synthetics.test_id:nja-epx-mg8 + items: + description: Tag associated with the network path measurement. + type: string + type: array + timestamp: + description: Unix timestamp (ms) of the network path measurement. + example: 1744117822266 + format: int64 + type: integer + type: object + SyntheticsTestResultNetpathDestination: + description: Destination endpoint of a network path measurement. + properties: + hostname: + description: Hostname of the destination. + example: 34.95.79.70 + type: string + ip_address: + description: IP address of the destination. + example: 34.95.79.70 + type: string + port: + description: Port of the destination service. + example: 80 + format: int64 + type: integer + type: object + SyntheticsTestResultNetpathEndpoint: + description: Source endpoint of a network path measurement. + properties: + hostname: + description: Hostname of the endpoint. + example: edge-eu1.staging.dog + type: string + type: object + SyntheticsTestResultNetpathHop: + description: A single hop along a network path. + properties: + hostname: + description: Resolved hostname of the hop. + example: 70.79.95.34.bc.googleusercontent.com + type: string + ip_address: + description: IP address of the hop. + example: 10.240.134.15 + type: string + reachable: + description: Whether this hop was reachable. + example: true + type: boolean + rtt: + description: Round-trip time to this hop in milliseconds. + example: 0.000346599 + format: double + type: number + ttl: + description: Time-to-live value of the probe packet at this hop. + example: 2 + format: int64 + type: integer + type: object + SyntheticsTestResultNetstats: + description: Aggregated network statistics from the test execution. + properties: + hops: + $ref: "#/components/schemas/SyntheticsTestResultNetstatsHops" + jitter: + description: Network jitter in milliseconds. + example: 0.08 + format: double + type: number + latency: + $ref: "#/components/schemas/SyntheticsTestResultNetworkLatency" + packet_loss_percentage: + description: Percentage of probe packets lost. + example: 0.0 + format: double + type: number + packets_received: + description: Number of probe packets received. + example: 4 + format: int64 + type: integer + packets_sent: + description: Number of probe packets sent. + example: 4 + format: int64 + type: integer + type: object + SyntheticsTestResultNetstatsHops: + description: Statistics about the number of hops for a network test. + properties: + avg: + description: Average number of hops. + example: 11.0 + format: double + type: number + max: + description: Maximum number of hops. + example: 11 + format: int64 + type: integer + min: + description: Minimum number of hops. + example: 11 + format: int64 + type: integer + type: object + SyntheticsTestResultNetworkLatency: + description: Latency statistics for a network probe. + properties: + avg: + description: Average latency in milliseconds. + example: 1.8805 + format: double + type: number + max: + description: Maximum latency in milliseconds. + example: 1.97 + format: double + type: number + min: + description: Minimum latency in milliseconds. + example: 1.76 + format: double + type: number + type: object + SyntheticsTestResultOCSPCertificate: + description: Certificate details returned in an OCSP response. + properties: + revocation_reason: + description: Reason code for the revocation, when applicable. + example: unspecified + type: string + revocation_time: + description: Unix timestamp (ms) of the revocation. + example: 1749727285000 + format: int64 + type: integer + serial_number: + description: Serial number of the certificate. + example: 7B584A1A6670A1EB0941A9A121569D60 + type: string + type: object + SyntheticsTestResultOCSPResponse: + description: OCSP response received while validating a certificate. + properties: + certificate: + $ref: "#/components/schemas/SyntheticsTestResultOCSPCertificate" + status: + description: OCSP response status (for example, `good`, `revoked`, `unknown`). + example: good + type: string + updates: + $ref: "#/components/schemas/SyntheticsTestResultOCSPUpdates" + type: object + SyntheticsTestResultOCSPUpdates: + description: OCSP response update timestamps. + properties: + next_update: + description: Unix timestamp (ms) of the next expected OCSP update. + example: 1743074486000 + format: int64 + type: integer + produced_at: + description: Unix timestamp (ms) of when the OCSP response was produced. + example: 1742469686000 + format: int64 + type: integer + this_update: + description: Unix timestamp (ms) of this OCSP update. + example: 1742469686000 + format: int64 + type: integer + type: object + SyntheticsTestResultParentStep: + description: Reference to the parent step of a sub-step. + properties: + id: + description: Identifier of the parent step. + example: fkk-j2a-gmw + type: string + type: object + SyntheticsTestResultParentTest: + description: Reference to the parent test of a sub-step. + properties: + id: + description: Identifier of the parent test. + example: abc-def-123 + type: string + type: object + SyntheticsTestResultRedirect: + description: A redirect hop encountered while performing the request. + properties: + location: + description: Target location of the redirect. + example: https://example.com/new-location + type: string + status_code: + description: HTTP status code of the redirect response. + example: 301 + format: int64 + type: integer + type: object + SyntheticsTestResultRelationshipTest: + description: Relationship to the Synthetic test. + properties: + data: + $ref: "#/components/schemas/SyntheticsTestResultRelationshipTestData" + type: object + SyntheticsTestResultRelationshipTestData: + description: Data for the test relationship. + properties: + id: + description: The public ID of the test. + example: abc-def-123 + type: string + type: + description: Type of the related resource. + example: test + type: string + type: object + SyntheticsTestResultRelationships: + description: Relationships for a Synthetic test result. + properties: + test: + $ref: "#/components/schemas/SyntheticsTestResultRelationshipTest" + type: object + SyntheticsTestResultRequestInfo: + description: Details of the outgoing request made during the test execution. + properties: + allow_insecure: + description: Whether insecure certificates are allowed for this request. + example: false + type: boolean + body: + description: Body sent with the request. + example: '{"key":"value"}' + type: string + call_type: + description: gRPC call type (for example, `unary`, `healthCheck`, or `reflection`). + example: unary + type: string + destination_service: + description: Destination service for a Network Path test. + example: my-service + type: string + dns_server: + description: DNS server used to resolve the target host. + example: 8.8.8.8 + type: string + dns_server_port: + description: Port of the DNS server used for resolution. + example: 53 + format: int64 + type: integer + e2e_queries: + description: Number of end-to-end probe queries issued. + example: 4 + format: int64 + type: integer + files: + description: Files attached to the request. + items: + $ref: "#/components/schemas/SyntheticsTestResultFileRef" + type: array + headers: + additionalProperties: {} + description: Headers sent with the request. + example: + content-type: application/json + type: object + host: + description: Host targeted by the request. + example: grpcbin.test.k6.io + type: string + max_ttl: + description: Maximum TTL for network probe packets. + example: 64 + format: int64 + type: integer + message: + description: Message sent with the request (for WebSocket/TCP/UDP tests). + example: My message + type: string + method: + description: HTTP method used for the request. + example: GET + type: string + no_saving_response_body: + description: Whether the response body was not saved. + example: true + type: boolean + port: + description: Port targeted by the request. Can be a number or a string variable reference. + example: 9000 + service: + description: Service name targeted by the request (for gRPC tests). + example: addsvc.Add + type: string + source_service: + description: Source service for a Network Path test. + example: synthetics + type: string + timeout: + description: Request timeout in milliseconds. + example: 60 + format: int64 + type: integer + tool_name: + description: Name of the MCP tool called (MCP tests only). + example: search + type: string + traceroute_queries: + description: Number of traceroute probe queries issued. + example: 2 + format: int64 + type: integer + url: + description: URL targeted by the request. + example: https://httpbin.org/anything/lol valuehugo + type: string + type: object + SyntheticsTestResultResponse: + description: Response object for a Synthetic test result. + properties: + data: + $ref: "#/components/schemas/SyntheticsTestResultData" + included: + description: Array of included related resources, such as the test definition. + items: + $ref: "#/components/schemas/SyntheticsTestResultIncludedItem" + type: array + type: object + SyntheticsTestResultResponseInfo: + description: Details of the response received during the test execution. + properties: + body: + description: Body of the response. + example: '{"status":"ok"}' + type: string + body_compressed: + description: Compressed representation of the response body. + example: eJzLSM3JyQcABiwCFQ== + type: string + body_hashes: + description: Hashes computed over the response body. + example: 9e107d9d372bb6826bd81d3542a419d6 + type: string + body_size: + description: Size of the response body in bytes. + example: 793 + format: int64 + type: integer + cache_headers: + additionalProperties: + type: string + description: Cache-related response headers. + example: + server: gunicorn/19.9.0 + type: object + cdn: + $ref: "#/components/schemas/SyntheticsTestResultCdnProviderInfo" + close: + $ref: "#/components/schemas/SyntheticsTestResultWebSocketClose" + compressed_message: + description: Compressed representation of the response message. + example: eJzLSM3JyQcABiwCFQ== + type: string + headers: + additionalProperties: {} + description: Response headers. + example: + content-type: application/json + type: object + healthcheck: + $ref: "#/components/schemas/SyntheticsTestResultHealthCheck" + http_version: + description: HTTP version of the response. + example: "2.0" + type: string + is_body_truncated: + description: Whether the response body was truncated. + example: false + type: boolean + is_message_truncated: + description: Whether the response message was truncated. + example: false + type: boolean + message: + description: Message received in the response (for WebSocket/TCP/UDP tests). + example: '{"f_string":"concat-STATIC_HIDDEN_VALUE"}' + type: string + metadata: + additionalProperties: + type: string + description: Additional metadata returned with the response. + type: object + records: + description: DNS records returned in the response (DNS tests only). + items: + $ref: "#/components/schemas/SyntheticsTestResultDnsRecord" + type: array + redirects: + description: Redirect hops encountered while performing the request. + items: + $ref: "#/components/schemas/SyntheticsTestResultRedirect" + type: array + status_code: + description: HTTP status code of the response. + example: 200 + format: int64 + type: integer + type: object + SyntheticsTestResultRouter: + description: A router along the traceroute path. + properties: + ip: + description: IP address of the router. + example: 34.95.79.70 + type: string + resolved_host: + description: Resolved hostname of the router. + example: 70.79.95.34.bc.googleusercontent.com + type: string + type: object + SyntheticsTestResultRumContext: + description: RUM application context associated with a step or sub-test. + properties: + application_id: + description: RUM application identifier. + example: 00000000-0000-0000-0000-000000000000 + type: string + session_id: + description: RUM session identifier. + example: 11111111-1111-1111-1111-111111111111 + type: string + view_id: + description: RUM view identifier. + example: 22222222-2222-2222-2222-222222222222 + type: string + type: object + SyntheticsTestResultRunType: + description: The type of run for a Synthetic test result. + enum: + - scheduled + - fast + - ci + - triggered + example: scheduled + type: string + x-enum-varnames: + - SCHEDULED + - FAST + - CI + - TRIGGERED + SyntheticsTestResultStatus: + description: Status of a Synthetic test result. + enum: + - passed + - failed + - no_data + example: passed + type: string + x-enum-varnames: + - PASSED + - FAILED + - NO_DATA + SyntheticsTestResultStep: + description: A step result from a browser, mobile, or multistep API test. + properties: + allow_failure: + description: Whether the test continues when this step fails. + example: false + type: boolean + api_test: + additionalProperties: {} + description: Inner API test definition for browser `runApiTest` steps. + type: object + assertion_result: + $ref: "#/components/schemas/SyntheticsTestResultStepAssertionResult" + assertions: + description: Assertion results produced by the step. + items: + $ref: "#/components/schemas/SyntheticsTestResultAssertionResult" + type: array + blocked_requests_urls: + description: URLs of requests blocked during the step. + items: + description: Blocked request URL. + type: string + type: array + bounds: + $ref: "#/components/schemas/SyntheticsTestResultBounds" + browser_errors: + description: Browser errors captured during the step. + items: + $ref: "#/components/schemas/SyntheticsTestResultBrowserError" + type: array + bucket_keys: + $ref: "#/components/schemas/SyntheticsTestResultBucketKeys" + cdn_resources: + description: CDN resources encountered during the step. + items: + $ref: "#/components/schemas/SyntheticsTestResultCdnResource" + type: array + click_type: + description: Click type performed in a browser step. + example: primary + type: string + compressed_json_descriptor: + description: Compressed JSON descriptor for the step (internal format). + example: compressedJsonDescriptorValue + type: string + config: + additionalProperties: {} + description: Request configuration executed by this step (API test steps). + type: object + description: + description: Human-readable description of the step. + example: Navigate to start URL + type: string + duration: + description: Duration of the step in milliseconds. + example: 1015.0 + format: double + type: number + element_description: + description: Description of the element interacted with by the step. + example: '' + type: string + element_updates: + $ref: "#/components/schemas/SyntheticsTestResultStepElementUpdates" + extracted_value: + $ref: "#/components/schemas/SyntheticsTestResultVariable" + failure: + $ref: "#/components/schemas/SyntheticsTestResultFailure" + http_results: + description: HTTP results produced by an MCP step. + items: + $ref: "#/components/schemas/SyntheticsTestResultAssertionResult" + type: array + id: + description: Identifier of the step. + example: fkk-j2a-gmw + type: string + is_critical: + description: Whether this step is critical for the test outcome. + example: true + type: boolean + javascript_custom_assertion_code: + description: Whether the step uses a custom JavaScript assertion. + example: false + type: boolean + locate_element_duration: + description: Time taken to locate the element in milliseconds. + example: 845.0 + format: double + type: number + name: + description: Name of the step. + example: Extract variable from body + type: string + request: + $ref: "#/components/schemas/SyntheticsTestResultRequestInfo" + response: + $ref: "#/components/schemas/SyntheticsTestResultResponseInfo" + retries: + description: Retry results for the step. + items: + $ref: "#/components/schemas/SyntheticsTestResultStep" + type: array + retry_count: + description: Number of times this step was retried. + example: 0 + format: int64 + type: integer + rum_context: + $ref: "#/components/schemas/SyntheticsTestResultRumContext" + started_at: + description: Unix timestamp (ms) of when the step started. + example: 1724445283308 + format: int64 + type: integer + status: + description: Status of the step (for example, `passed`, `failed`). + example: passed + type: string + sub_step: + $ref: "#/components/schemas/SyntheticsTestResultSubStep" + sub_test: + $ref: "#/components/schemas/SyntheticsTestResultSubTest" + subtype: + description: Subtype of the step. + example: http + type: string + tabs: + description: Browser tabs involved in the step. + items: + $ref: "#/components/schemas/SyntheticsTestResultTab" + type: array + timings: + additionalProperties: {} + description: Timing breakdown of the step execution. + type: object + tunnel: + description: Whether the step was executed through a Synthetics tunnel. + example: false + type: boolean + type: + description: Type of the step (for example, `click`, `assertElementContent`, `runApiTest`). + example: click + type: string + url: + description: URL associated with the step (for navigation steps). + example: http://34.95.79.70/prototype + type: string + value: + description: Step value. Its type depends on the step type. + example: http://34.95.79.70/prototype + variables: + $ref: "#/components/schemas/SyntheticsTestResultVariables" + vitals_metrics: + description: Web vitals metrics captured during the step. + items: + $ref: "#/components/schemas/SyntheticsTestResultVitalsMetrics" + type: array + warnings: + description: Warnings emitted during the step. + items: + $ref: "#/components/schemas/SyntheticsTestResultWarning" + type: array + type: object + SyntheticsTestResultStepAssertionResult: + description: Assertion result for a browser or mobile step. + properties: + actual: + description: Actual value observed during the step assertion. Its type depends on the check type. + example: "True\ngood\ngood\ngood\ngood\nTrue" + check_type: + description: Type of the step assertion check. + example: contains + type: string + expected: + description: Expected value for the step assertion. Its type depends on the check type. + example: True good good good good True + has_secure_variables: + description: Whether the assertion involves secure variables. + example: false + type: boolean + type: object + SyntheticsTestResultStepElementUpdates: + description: Element locator updates produced during a step. + properties: + multi_locator: + additionalProperties: + type: string + description: Updated multi-locator definition. + type: object + target_outer_html: + description: Updated outer HTML of the targeted element. + example:

My website - v4

+ type: string + version: + description: Version of the element locator definition. + example: 3 + format: int64 + type: integer + type: object + SyntheticsTestResultStepsInfo: + description: Step execution summary for a Synthetic test result. + properties: + completed: + description: Number of completed steps. + example: 6 + format: int64 + type: integer + errors: + description: Number of steps with errors. + example: 0 + format: int64 + type: integer + total: + description: Total number of steps. + example: 6 + format: int64 + type: integer + type: object + SyntheticsTestResultSubStep: + description: Information about a sub-step in a nested test execution. + properties: + level: + description: Depth of the sub-step in the execution tree. + example: 1 + format: int64 + type: integer + parent_step: + $ref: "#/components/schemas/SyntheticsTestResultParentStep" + parent_test: + $ref: "#/components/schemas/SyntheticsTestResultParentTest" + type: object + SyntheticsTestResultSubTest: + description: Information about a sub-test played from a parent browser test. + properties: + id: + description: Identifier of the sub-test. + example: abc-def-123 + type: string + playing_tab: + description: Index of the browser tab playing the sub-test. + example: 0 + format: int64 + type: integer + rum_context: + $ref: "#/components/schemas/SyntheticsTestResultRumContext" + type: object + SyntheticsTestResultSummaryAttributes: + description: Attributes of a Synthetic test result summary. + properties: + device: + $ref: "#/components/schemas/SyntheticsTestResultDevice" + execution_info: + $ref: "#/components/schemas/SyntheticsTestResultExecutionInfo" + finished_at: + description: Timestamp of when the test finished (in milliseconds). + format: int64 + type: integer + location: + $ref: "#/components/schemas/SyntheticsTestResultLocation" + run_type: + $ref: "#/components/schemas/SyntheticsTestResultRunType" + started_at: + description: Timestamp of when the test started (in milliseconds). + format: int64 + type: integer + status: + $ref: "#/components/schemas/SyntheticsTestResultStatus" + steps_info: + $ref: "#/components/schemas/SyntheticsTestResultStepsInfo" + test_sub_type: + $ref: "#/components/schemas/SyntheticsTestSubType" + test_type: + $ref: "#/components/schemas/SyntheticsTestType" + type: object + SyntheticsTestResultSummaryData: + description: Wrapper object for a Synthetic test result summary. + properties: + attributes: + $ref: "#/components/schemas/SyntheticsTestResultSummaryAttributes" + id: + description: The result ID. + example: "5158904793181869365" + type: string + relationships: + $ref: "#/components/schemas/SyntheticsTestResultRelationships" + type: + $ref: "#/components/schemas/SyntheticsTestResultSummaryType" + type: object + SyntheticsTestResultSummaryType: + default: "result_summary" + description: Type of the Synthetic test result summary resource, `result_summary`. + enum: + - result_summary + example: result_summary + type: string + x-enum-varnames: + - RESULT_SUMMARY + SyntheticsTestResultTab: + description: Information about a browser tab involved in a step. + properties: + focused: + description: Whether the tab was focused during the step. + example: true + type: boolean + title: + description: Title of the tab. + example: Team Browser mini-websites + type: string + url: + description: URL loaded in the tab. + example: http://34.95.79.70/prototype + type: string + type: object + SyntheticsTestResultTrace: + description: Trace identifiers associated with a Synthetic test result. + properties: + id: + description: Datadog APM trace identifier. + example: "5513046492231128177" + type: string + otel_id: + description: OpenTelemetry trace identifier. + example: d8ba00eb1507bdba8643ba8e7a1c022c + type: string + type: object + SyntheticsTestResultTracerouteHop: + description: A network probe result, used for traceroute hops and ping summaries. + properties: + host: + description: Target hostname. + example: 34.95.79.70 + type: string + latency: + $ref: "#/components/schemas/SyntheticsTestResultNetworkLatency" + packet_loss_percentage: + description: Percentage of probe packets lost. + example: 0.0 + format: double + type: number + packet_size: + description: Size of each probe packet in bytes. + example: 56 + format: int64 + type: integer + packets_received: + description: Number of probe packets received. + example: 4 + format: int64 + type: integer + packets_sent: + description: Number of probe packets sent. + example: 4 + format: int64 + type: integer + resolved_ip: + description: Resolved IP address for the target. + example: 34.95.79.70 + type: string + routers: + description: List of intermediate routers for the traceroute. + items: + $ref: "#/components/schemas/SyntheticsTestResultRouter" + type: array + type: object + SyntheticsTestResultTurn: + description: A turn in a goal-based browser test, grouping steps and reasoning. + properties: + bucket_keys: + $ref: "#/components/schemas/SyntheticsTestResultBucketKeys" + name: + description: Name of the turn. + example: Turn 1 + type: string + reasoning: + description: Agent reasoning produced for this turn. + example: I need to navigate to the chairs section + type: string + status: + description: Status of the turn (for example, `passed`, `failed`). + example: passed + type: string + steps: + description: Steps executed during the turn. + items: + $ref: "#/components/schemas/SyntheticsTestResultTurnStep" + type: array + turn_finished_at: + description: Unix timestamp (ms) of when the turn finished. + example: 1724521438800 + format: int64 + type: integer + turn_started_at: + description: Unix timestamp (ms) of when the turn started. + example: 1724521436800 + format: int64 + type: integer + type: object + SyntheticsTestResultTurnStep: + description: A step executed during a goal-based browser test turn. + properties: + bucket_keys: + $ref: "#/components/schemas/SyntheticsTestResultBucketKeys" + config: + additionalProperties: {} + description: Browser step configuration for this turn step. + example: + id: step-1 + name: Click on div "Chairs" + type: click + type: object + type: object + SyntheticsTestResultType: + default: "result" + description: Type of the Synthetic test result resource, `result`. + enum: + - result + example: result + type: string + x-enum-varnames: + - RESULT + SyntheticsTestResultVariable: + description: A variable used or extracted during a test. + properties: + err: + description: Error encountered when evaluating the variable. + example: LOCAL_VARIABLE_UNKNOWN + type: string + error_message: + description: Human-readable error message for variable evaluation. + example: Unknown variable name undefined. + type: string + example: + description: Example value for the variable. + example: lol value + type: string + id: + description: Variable identifier. + example: c896702c-1e34-4e62-a67b-432e8092d062 + type: string + name: + description: Variable name. + example: HEADER_VALUE + type: string + pattern: + description: Pattern used to extract the variable. + example: lol value + type: string + secure: + description: Whether the variable holds a secure value. + example: false + type: boolean + type: + description: Variable type. + example: text + type: string + val: + description: Evaluated value of the variable. + example: value-to-extract + type: string + value: + description: Current value of the variable. + example: lol value + type: string + type: object + SyntheticsTestResultVariables: + description: Variables captured during a test step. + properties: + config: + description: Variables defined in the test configuration. + items: + $ref: "#/components/schemas/SyntheticsTestResultVariable" + type: array + extracted: + description: Variables extracted during the test execution. + items: + $ref: "#/components/schemas/SyntheticsTestResultVariable" + type: array + type: object + SyntheticsTestResultVitalsMetrics: + description: Web vitals metrics captured during a browser test step. + properties: + cls: + description: Cumulative Layout Shift score. + example: 0.0 + format: double + type: number + fcp: + description: First Contentful Paint in milliseconds. + example: 120.3 + format: double + type: number + inp: + description: Interaction to Next Paint in milliseconds. + example: 85.0 + format: double + type: number + lcp: + description: Largest Contentful Paint in milliseconds. + example: 210.5 + format: double + type: number + ttfb: + description: Time To First Byte in milliseconds. + example: 95.2 + format: double + type: number + url: + description: URL that produced the metrics. + example: http://34.95.79.70/prototype + type: string + type: object + SyntheticsTestResultWarning: + description: A warning captured during a browser test step. + properties: + element_bounds: + description: Bounds of elements related to the warning. + items: + $ref: "#/components/schemas/SyntheticsTestResultBounds" + type: array + message: + description: Warning message. + example: Element is not visible in the viewport + type: string + type: + description: Type of the warning. + example: visibility + type: string + type: object + SyntheticsTestResultWebSocketClose: + description: WebSocket close frame information for WebSocket test responses. + properties: + reason: + description: Reason string received in the close frame. + example: Normal closure + type: string + status_code: + description: Status code received in the close frame. + example: 1000 + format: int64 + type: integer + type: object + SyntheticsTestSubType: + description: Subtype of the Synthetic test that produced this result. + enum: + - dns + - grpc + - http + - icmp + - mcp + - multi + - ssl + - tcp + - udp + - websocket + example: http + type: string + x-enum-varnames: + - DNS + - GRPC + - HTTP + - ICMP + - MCP + - MULTI + - SSL + - TCP + - UDP + - WEBSOCKET + SyntheticsTestType: + description: Type of the Synthetic test that produced this result. + enum: + - api + - browser + - mobile + - network + example: api + type: string + x-enum-varnames: + - API + - BROWSER + - MOBILE + - NETWORK SyntheticsTestVersionActionMetadata: description: Object containing metadata about a change action. properties: @@ -125380,6 +127275,207 @@ paths: permissions: - synthetics_write - synthetics_create_edit_trigger + /api/v2/synthetics/tests/browser/{public_id}/results: + get: + description: Get the latest result summaries for a given Synthetic browser test. + operationId: ListSyntheticsBrowserTestLatestResults + parameters: + - description: The public ID of the Synthetic browser test for which to search results. + in: path + name: public_id + required: true + schema: + type: string + - description: Timestamp in milliseconds from which to start querying results. + in: query + name: from_ts + required: false + schema: + format: int64 + type: integer + - description: Timestamp in milliseconds up to which to query results. + in: query + name: to_ts + required: false + schema: + format: int64 + type: integer + - description: Filter results by status. + in: query + name: status + required: false + schema: + $ref: "#/components/schemas/SyntheticsTestResultStatus" + - description: Filter results by run type. + in: query + name: runType + required: false + schema: + $ref: "#/components/schemas/SyntheticsTestResultRunType" + - description: Locations for which to query results. + in: query + name: probe_dc + required: false + schema: + items: + type: string + type: array + - description: Device IDs for which to query results. + in: query + name: device_id + required: false + schema: + items: + type: string + type: array + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + device: + id: chrome.laptop_large + name: "Chrome - Laptop Large" + type: browser + finished_at: 1679328005200 + location: + id: aws:eu-west-1 + name: "Ireland (AWS)" + run_type: scheduled + started_at: 1679328000000 + status: passed + test_type: browser + test_version: 2 + id: "7291038456723891045" + relationships: + test: + data: + id: xyz-abc-789 + type: test + type: result_summary + schema: + $ref: "#/components/schemas/SyntheticsTestLatestResultsResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: API error response. + "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: Get a browser test's latest results + tags: + - Synthetics + x-permission: + operator: OR + permissions: + - synthetics_read + /api/v2/synthetics/tests/browser/{public_id}/results/{result_id}: + get: + description: Get a specific full result from a given Synthetic browser test. + operationId: GetSyntheticsBrowserTestResult + parameters: + - description: The public ID of the Synthetic browser test to which the target result belongs. + in: path + name: public_id + required: true + schema: + type: string + - description: The ID of the result to get. + in: path + name: result_id + required: true + schema: + type: string + - description: The event ID used to look up the result in the event store. + in: query + name: event_id + required: false + schema: + type: string + - description: Timestamp in seconds to look up the result. + in: query + name: timestamp + required: false + schema: + format: int64 + type: integer + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + device: + id: chrome.laptop_large + name: "Chrome - Laptop Large" + type: browser + location: + id: aws:eu-west-1 + name: "Ireland (AWS)" + result: + duration: 5200.0 + finished_at: 1679328005200 + id: "7291038456723891045" + started_at: 1679328000000 + status: passed + test_type: browser + test_version: 2 + id: "7291038456723891045" + relationships: + test: + data: + id: xyz-abc-789 + type: test + type: result + schema: + $ref: "#/components/schemas/SyntheticsTestResultResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: API error response. + "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: Get a browser test result + tags: + - Synthetics + x-permission: + operator: OR + permissions: + - synthetics_read /api/v2/synthetics/tests/bulk-delete: post: operationId: DeleteSyntheticsTests @@ -125446,6 +127542,27 @@ paths: "200": content: application/json: + examples: + default: + value: + data: + attributes: + location: + id: aws:us-east-1 + name: "N. Virginia (AWS)" + result: + duration: 150.5 + finished_at: 1679328001000 + id: abc12345-1234-1234-1234-abc123456789 + resolved_ip: "1.2.3.4" + run_type: fast + started_at: 1679328000000 + status: passed + test_sub_type: http + test_type: api + test_version: 1 + id: abc12345-1234-1234-1234-abc123456789 + type: result schema: $ref: "#/components/schemas/SyntheticsFastTestResult" description: OK @@ -125691,6 +127808,77 @@ paths: permissions: - synthetics_write - synthetics_create_edit_trigger + /api/v2/synthetics/tests/poll_results: + get: + description: |- + Poll for test results given a list of result IDs. This is typically used after + triggering tests with CI/CD to retrieve results once they are available. + operationId: PollSyntheticsTestResults + parameters: + - description: A JSON-encoded array of result IDs to poll for. + example: '["id1","id2","id3"]' + in: query + name: result_ids + required: true + schema: + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + location: + id: aws:us-east-1 + name: "N. Virginia (AWS)" + result: + duration: 150.5 + finished_at: 1679328001000 + id: "5158904793181869365" + started_at: 1679328000000 + status: passed + test_sub_type: http + test_type: api + test_version: 3 + id: "5158904793181869365" + relationships: + test: + data: + id: abc-def-123 + type: test + type: result + schema: + $ref: "#/components/schemas/SyntheticsPollTestResultsResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: API error response. + "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: Poll for test results + tags: + - Synthetics + x-permission: + operator: OR + permissions: + - synthetics_read /api/v2/synthetics/tests/{public_id}/files/download: post: description: |- @@ -125984,6 +128172,201 @@ paths: operator: OR permissions: - synthetics_read + /api/v2/synthetics/tests/{public_id}/results: + get: + description: Get the latest result summaries for a given Synthetic test. + operationId: ListSyntheticsTestLatestResults + parameters: + - description: The public ID of the Synthetic test for which to search results. + in: path + name: public_id + required: true + schema: + type: string + - description: Timestamp in milliseconds from which to start querying results. + in: query + name: from_ts + required: false + schema: + format: int64 + type: integer + - description: Timestamp in milliseconds up to which to query results. + in: query + name: to_ts + required: false + schema: + format: int64 + type: integer + - description: Filter results by status. + in: query + name: status + required: false + schema: + $ref: "#/components/schemas/SyntheticsTestResultStatus" + - description: Filter results by run type. + in: query + name: runType + required: false + schema: + $ref: "#/components/schemas/SyntheticsTestResultRunType" + - description: Locations for which to query results. + in: query + name: probe_dc + required: false + schema: + items: + type: string + type: array + - description: Device IDs for which to query results. + in: query + name: device_id + required: false + schema: + items: + type: string + type: array + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + finished_at: 1679328001000 + location: + id: aws:us-east-1 + name: "N. Virginia (AWS)" + run_type: scheduled + started_at: 1679328000000 + status: passed + test_sub_type: http + test_type: api + test_version: 3 + id: "5158904793181869365" + relationships: + test: + data: + id: abc-def-123 + type: test + type: result_summary + schema: + $ref: "#/components/schemas/SyntheticsTestLatestResultsResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: API error response. + "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: Get a test's latest results + tags: + - Synthetics + x-permission: + operator: OR + permissions: + - synthetics_read + /api/v2/synthetics/tests/{public_id}/results/{result_id}: + get: + description: Get a specific full result from a given Synthetic test. + operationId: GetSyntheticsTestResult + parameters: + - description: The public ID of the Synthetic test to which the target result belongs. + in: path + name: public_id + required: true + schema: + type: string + - description: The ID of the result to get. + in: path + name: result_id + required: true + schema: + type: string + - description: The event ID used to look up the result in the event store. + in: query + name: event_id + required: false + schema: + type: string + - description: Timestamp in seconds to look up the result. + in: query + name: timestamp + required: false + schema: + format: int64 + type: integer + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + location: + id: aws:us-east-1 + name: "N. Virginia (AWS)" + result: + duration: 150.5 + finished_at: 1679328001000 + id: "5158904793181869365" + started_at: 1679328000000 + status: passed + test_sub_type: http + test_type: api + test_version: 3 + id: "5158904793181869365" + relationships: + test: + data: + id: abc-def-123 + type: test + type: result + schema: + $ref: "#/components/schemas/SyntheticsTestResultResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/APIErrorResponse" + description: API error response. + "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: Get a test result + tags: + - Synthetics + x-permission: + operator: OR + permissions: + - synthetics_read /api/v2/synthetics/tests/{public_id}/version_history: get: description: Get the paginated version history for a Synthetic test. diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index c1c92b4f50..8881ab2d99 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -31868,13 +31868,6 @@ datadog\_api\_client.v2.model.synthetics\_api\_multistep\_subtests\_response mod :members: :show-inheritance: -datadog\_api\_client.v2.model.synthetics\_fast\_test\_assertion\_result module ------------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.synthetics_fast_test_assertion_result - :members: - :show-inheritance: - datadog\_api\_client.v2.model.synthetics\_fast\_test\_result module ------------------------------------------------------------------- @@ -31903,27 +31896,6 @@ datadog\_api\_client.v2.model.synthetics\_fast\_test\_result\_detail module :members: :show-inheritance: -datadog\_api\_client.v2.model.synthetics\_fast\_test\_result\_device module ---------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.synthetics_fast_test_result_device - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.synthetics\_fast\_test\_result\_failure module ----------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.synthetics_fast_test_result_failure - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.synthetics\_fast\_test\_result\_location module ------------------------------------------------------------------------------ - -.. automodule:: datadog_api_client.v2.model.synthetics_fast_test_result_location - :members: - :show-inheritance: - datadog\_api\_client.v2.model.synthetics\_fast\_test\_result\_type module ------------------------------------------------------------------------- @@ -31931,13 +31903,6 @@ datadog\_api\_client.v2.model.synthetics\_fast\_test\_result\_type module :members: :show-inheritance: -datadog\_api\_client.v2.model.synthetics\_fast\_test\_step\_result module -------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.synthetics_fast_test_step_result - :members: - :show-inheritance: - datadog\_api\_client.v2.model.synthetics\_fast\_test\_sub\_type module ---------------------------------------------------------------------- @@ -31945,10 +31910,10 @@ datadog\_api\_client.v2.model.synthetics\_fast\_test\_sub\_type module :members: :show-inheritance: -datadog\_api\_client.v2.model.synthetics\_fast\_test\_traceroute\_hop module ----------------------------------------------------------------------------- +datadog\_api\_client.v2.model.synthetics\_fast\_test\_type module +----------------------------------------------------------------- -.. automodule:: datadog_api_client.v2.model.synthetics_fast_test_traceroute_hop +.. automodule:: datadog_api_client.v2.model.synthetics_fast_test_type :members: :show-inheritance: @@ -32162,6 +32127,13 @@ datadog\_api\_client.v2.model.synthetics\_network\_test\_type module :members: :show-inheritance: +datadog\_api\_client.v2.model.synthetics\_poll\_test\_results\_response module +------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.synthetics_poll_test_results_response + :members: + :show-inheritance: + datadog\_api\_client.v2.model.synthetics\_suite module ------------------------------------------------------ @@ -32309,6 +32281,13 @@ datadog\_api\_client.v2.model.synthetics\_test\_file\_multipart\_presigned\_urls :members: :show-inheritance: +datadog\_api\_client.v2.model.synthetics\_test\_latest\_results\_response module +-------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_latest_results_response + :members: + :show-inheritance: + datadog\_api\_client.v2.model.synthetics\_test\_options module -------------------------------------------------------------- @@ -32386,6 +32365,566 @@ datadog\_api\_client.v2.model.synthetics\_test\_pause\_status module :members: :show-inheritance: +datadog\_api\_client.v2.model.synthetics\_test\_result\_assertion\_result module +-------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_assertion_result + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_attributes module +------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_batch module +-------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_batch + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_bounds module +--------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_bounds + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_browser\_error module +----------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_browser_error + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_bucket\_keys module +--------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_bucket_keys + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_cdn\_cache\_status module +--------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_cdn_cache_status + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_cdn\_provider\_info module +---------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_cdn_provider_info + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_cdn\_resource module +---------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_cdn_resource + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_certificate module +-------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_certificate + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_certificate\_validity module +------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_certificate_validity + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_ci module +----------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_ci + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_ci\_pipeline module +--------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_ci_pipeline + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_ci\_provider module +--------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_ci_provider + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_ci\_stage module +------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_ci_stage + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_data module +------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_detail module +--------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_detail + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_device module +--------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_device + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_device\_browser module +------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_device_browser + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_device\_platform module +------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_device_platform + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_device\_resolution module +--------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_device_resolution + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_dns\_record module +-------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_dns_record + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_dns\_resolution module +------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_dns_resolution + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_dns\_resolution\_attempt module +--------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_dns_resolution_attempt + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_duration module +----------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_duration + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_execution\_info module +------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_execution_info + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_failure module +---------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_failure + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_file\_ref module +------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_file_ref + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_git module +------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_git + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_git\_commit module +-------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_git_commit + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_git\_user module +------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_git_user + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_handshake module +------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_handshake + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_health\_check module +---------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_health_check + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_included\_item module +----------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_included_item + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_location module +----------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_location + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_netpath module +---------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_netpath + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_netpath\_destination module +----------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_netpath_destination + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_netpath\_endpoint module +-------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_netpath_endpoint + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_netpath\_hop module +--------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_netpath_hop + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_netstats module +----------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_netstats + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_netstats\_hops module +----------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_netstats_hops + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_network\_latency module +------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_network_latency + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_ocsp\_certificate module +-------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_ocsp_certificate + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_ocsp\_response module +----------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_ocsp_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_ocsp\_updates module +---------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_ocsp_updates + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_parent\_step module +--------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_parent_step + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_parent\_test module +--------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_parent_test + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_redirect module +----------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_redirect + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_relationship\_test module +--------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_relationship_test + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_relationship\_test\_data module +--------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_relationship_test_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_relationships module +---------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_relationships + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_request\_info module +---------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_request_info + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_response module +----------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_response\_info module +----------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_response_info + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_router module +--------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_router + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_rum\_context module +--------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_rum_context + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_run\_type module +------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_run_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_status module +--------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_status + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_step module +------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_step + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_step\_assertion\_result module +-------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_step_assertion_result + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_step\_element\_updates module +------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_step_element_updates + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_steps\_info module +-------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_steps_info + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_sub\_step module +------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_sub_step + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_sub\_test module +------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_sub_test + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_summary\_attributes module +---------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_summary_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_summary\_data module +---------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_summary_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_summary\_type module +---------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_summary_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_tab module +------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_tab + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_trace module +-------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_trace + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_traceroute\_hop module +------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_traceroute_hop + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_turn module +------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_turn + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_turn\_step module +------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_turn_step + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_type module +------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_variable module +----------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_variable + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_variables module +------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_variables + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_vitals\_metrics module +------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_vitals_metrics + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_warning module +---------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_warning + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_result\_web\_socket\_close module +--------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_result_web_socket_close + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_sub\_type module +---------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_sub_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.synthetics\_test\_type module +----------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.synthetics_test_type + :members: + :show-inheritance: + datadog\_api\_client.v2.model.synthetics\_test\_version\_action\_metadata module -------------------------------------------------------------------------------- diff --git a/examples/v2/synthetics/GetSyntheticsBrowserTestResult.py b/examples/v2/synthetics/GetSyntheticsBrowserTestResult.py new file mode 100644 index 0000000000..850442adcd --- /dev/null +++ b/examples/v2/synthetics/GetSyntheticsBrowserTestResult.py @@ -0,0 +1,16 @@ +""" +Get a browser test result returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.synthetics_api import SyntheticsApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = SyntheticsApi(api_client) + response = api_instance.get_synthetics_browser_test_result( + public_id="public_id", + result_id="result_id", + ) + + print(response) diff --git a/examples/v2/synthetics/GetSyntheticsTestResult.py b/examples/v2/synthetics/GetSyntheticsTestResult.py new file mode 100644 index 0000000000..bdda734d2b --- /dev/null +++ b/examples/v2/synthetics/GetSyntheticsTestResult.py @@ -0,0 +1,16 @@ +""" +Get a test result returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.synthetics_api import SyntheticsApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = SyntheticsApi(api_client) + response = api_instance.get_synthetics_test_result( + public_id="public_id", + result_id="result_id", + ) + + print(response) diff --git a/examples/v2/synthetics/ListSyntheticsBrowserTestLatestResults.py b/examples/v2/synthetics/ListSyntheticsBrowserTestLatestResults.py new file mode 100644 index 0000000000..68ecd7e1ef --- /dev/null +++ b/examples/v2/synthetics/ListSyntheticsBrowserTestLatestResults.py @@ -0,0 +1,15 @@ +""" +Get a browser test's latest results returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.synthetics_api import SyntheticsApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = SyntheticsApi(api_client) + response = api_instance.list_synthetics_browser_test_latest_results( + public_id="public_id", + ) + + print(response) diff --git a/examples/v2/synthetics/ListSyntheticsTestLatestResults.py b/examples/v2/synthetics/ListSyntheticsTestLatestResults.py new file mode 100644 index 0000000000..df45a3496c --- /dev/null +++ b/examples/v2/synthetics/ListSyntheticsTestLatestResults.py @@ -0,0 +1,15 @@ +""" +Get a test's latest results returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.synthetics_api import SyntheticsApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = SyntheticsApi(api_client) + response = api_instance.list_synthetics_test_latest_results( + public_id="public_id", + ) + + print(response) diff --git a/examples/v2/synthetics/PollSyntheticsTestResults.py b/examples/v2/synthetics/PollSyntheticsTestResults.py new file mode 100644 index 0000000000..a766a0438e --- /dev/null +++ b/examples/v2/synthetics/PollSyntheticsTestResults.py @@ -0,0 +1,15 @@ +""" +Poll for test results returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.synthetics_api import SyntheticsApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = SyntheticsApi(api_client) + response = api_instance.poll_synthetics_test_results( + result_ids="result_ids", + ) + + print(response) diff --git a/src/datadog_api_client/v2/api/synthetics_api.py b/src/datadog_api_client/v2/api/synthetics_api.py index ef02b17a4d..a75ed0ee34 100644 --- a/src/datadog_api_client/v2/api/synthetics_api.py +++ b/src/datadog_api_client/v2/api/synthetics_api.py @@ -3,7 +3,7 @@ # Copyright 2019-Present Datadog, Inc. from __future__ import annotations -from typing import Any, Dict, Union +from typing import Any, Dict, List, Union from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint from datadog_api_client.configuration import Configuration @@ -25,11 +25,16 @@ from datadog_api_client.v2.model.deleted_suites_request_delete_request import DeletedSuitesRequestDeleteRequest from datadog_api_client.v2.model.synthetics_suite_search_response import SyntheticsSuiteSearchResponse from datadog_api_client.v2.model.suite_json_patch_request import SuiteJsonPatchRequest +from datadog_api_client.v2.model.synthetics_test_latest_results_response import SyntheticsTestLatestResultsResponse +from datadog_api_client.v2.model.synthetics_test_result_status import SyntheticsTestResultStatus +from datadog_api_client.v2.model.synthetics_test_result_run_type import SyntheticsTestResultRunType +from datadog_api_client.v2.model.synthetics_test_result_response import SyntheticsTestResultResponse from datadog_api_client.v2.model.deleted_tests_response import DeletedTestsResponse from datadog_api_client.v2.model.deleted_tests_request_delete_request import DeletedTestsRequestDeleteRequest from datadog_api_client.v2.model.synthetics_fast_test_result import SyntheticsFastTestResult from datadog_api_client.v2.model.synthetics_network_test_response import SyntheticsNetworkTestResponse from datadog_api_client.v2.model.synthetics_network_test_edit_request import SyntheticsNetworkTestEditRequest +from datadog_api_client.v2.model.synthetics_poll_test_results_response import SyntheticsPollTestResultsResponse from datadog_api_client.v2.model.synthetics_test_file_download_response import SyntheticsTestFileDownloadResponse from datadog_api_client.v2.model.synthetics_test_file_download_request import SyntheticsTestFileDownloadRequest from datadog_api_client.v2.model.synthetics_test_file_multipart_presigned_urls_response import ( @@ -288,6 +293,45 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._get_synthetics_browser_test_result_endpoint = _Endpoint( + settings={ + "response_type": (SyntheticsTestResultResponse,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/synthetics/tests/browser/{public_id}/results/{result_id}", + "operation_id": "get_synthetics_browser_test_result", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "public_id": { + "required": True, + "openapi_types": (str,), + "attribute": "public_id", + "location": "path", + }, + "result_id": { + "required": True, + "openapi_types": (str,), + "attribute": "result_id", + "location": "path", + }, + "event_id": { + "openapi_types": (str,), + "attribute": "event_id", + "location": "query", + }, + "timestamp": { + "openapi_types": (int,), + "attribute": "timestamp", + "location": "query", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + self._get_synthetics_fast_test_result_endpoint = _Endpoint( settings={ "response_type": (SyntheticsFastTestResult,), @@ -357,6 +401,45 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._get_synthetics_test_result_endpoint = _Endpoint( + settings={ + "response_type": (SyntheticsTestResultResponse,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/synthetics/tests/{public_id}/results/{result_id}", + "operation_id": "get_synthetics_test_result", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "public_id": { + "required": True, + "openapi_types": (str,), + "attribute": "public_id", + "location": "path", + }, + "result_id": { + "required": True, + "openapi_types": (str,), + "attribute": "result_id", + "location": "path", + }, + "event_id": { + "openapi_types": (str,), + "attribute": "event_id", + "location": "query", + }, + "timestamp": { + "openapi_types": (int,), + "attribute": "timestamp", + "location": "query", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + self._get_synthetics_test_version_endpoint = _Endpoint( settings={ "response_type": (SyntheticsTestVersionResponse,), @@ -471,6 +554,116 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._list_synthetics_browser_test_latest_results_endpoint = _Endpoint( + settings={ + "response_type": (SyntheticsTestLatestResultsResponse,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/synthetics/tests/browser/{public_id}/results", + "operation_id": "list_synthetics_browser_test_latest_results", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "public_id": { + "required": True, + "openapi_types": (str,), + "attribute": "public_id", + "location": "path", + }, + "from_ts": { + "openapi_types": (int,), + "attribute": "from_ts", + "location": "query", + }, + "to_ts": { + "openapi_types": (int,), + "attribute": "to_ts", + "location": "query", + }, + "status": { + "openapi_types": (SyntheticsTestResultStatus,), + "attribute": "status", + "location": "query", + }, + "run_type": { + "openapi_types": (SyntheticsTestResultRunType,), + "attribute": "runType", + "location": "query", + }, + "probe_dc": { + "openapi_types": ([str],), + "attribute": "probe_dc", + "location": "query", + "collection_format": "multi", + }, + "device_id": { + "openapi_types": ([str],), + "attribute": "device_id", + "location": "query", + "collection_format": "multi", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + self._list_synthetics_test_latest_results_endpoint = _Endpoint( + settings={ + "response_type": (SyntheticsTestLatestResultsResponse,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/synthetics/tests/{public_id}/results", + "operation_id": "list_synthetics_test_latest_results", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "public_id": { + "required": True, + "openapi_types": (str,), + "attribute": "public_id", + "location": "path", + }, + "from_ts": { + "openapi_types": (int,), + "attribute": "from_ts", + "location": "query", + }, + "to_ts": { + "openapi_types": (int,), + "attribute": "to_ts", + "location": "query", + }, + "status": { + "openapi_types": (SyntheticsTestResultStatus,), + "attribute": "status", + "location": "query", + }, + "run_type": { + "openapi_types": (SyntheticsTestResultRunType,), + "attribute": "runType", + "location": "query", + }, + "probe_dc": { + "openapi_types": ([str],), + "attribute": "probe_dc", + "location": "query", + "collection_format": "multi", + }, + "device_id": { + "openapi_types": ([str],), + "attribute": "device_id", + "location": "query", + "collection_format": "multi", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + self._list_synthetics_test_versions_endpoint = _Endpoint( settings={ "response_type": (SyntheticsTestVersionHistoryResponse,), @@ -559,6 +752,29 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._poll_synthetics_test_results_endpoint = _Endpoint( + settings={ + "response_type": (SyntheticsPollTestResultsResponse,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/synthetics/tests/poll_results", + "operation_id": "poll_synthetics_test_results", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "result_ids": { + "required": True, + "openapi_types": (str,), + "attribute": "result_ids", + "location": "query", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + self._search_suites_endpoint = _Endpoint( settings={ "response_type": (SyntheticsSuiteSearchResponse,), @@ -815,6 +1031,41 @@ def get_on_demand_concurrency_cap( kwargs: Dict[str, Any] = {} return self._get_on_demand_concurrency_cap_endpoint.call_with_http_info(**kwargs) + def get_synthetics_browser_test_result( + self, + public_id: str, + result_id: str, + *, + event_id: Union[str, UnsetType] = unset, + timestamp: Union[int, UnsetType] = unset, + ) -> SyntheticsTestResultResponse: + """Get a browser test result. + + Get a specific full result from a given Synthetic browser test. + + :param public_id: The public ID of the Synthetic browser test to which the target result belongs. + :type public_id: str + :param result_id: The ID of the result to get. + :type result_id: str + :param event_id: The event ID used to look up the result in the event store. + :type event_id: str, optional + :param timestamp: Timestamp in seconds to look up the result. + :type timestamp: int, optional + :rtype: SyntheticsTestResultResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["public_id"] = public_id + + kwargs["result_id"] = result_id + + if event_id is not unset: + kwargs["event_id"] = event_id + + if timestamp is not unset: + kwargs["timestamp"] = timestamp + + return self._get_synthetics_browser_test_result_endpoint.call_with_http_info(**kwargs) + def get_synthetics_fast_test_result( self, id: str, @@ -860,6 +1111,41 @@ def get_synthetics_suite( return self._get_synthetics_suite_endpoint.call_with_http_info(**kwargs) + def get_synthetics_test_result( + self, + public_id: str, + result_id: str, + *, + event_id: Union[str, UnsetType] = unset, + timestamp: Union[int, UnsetType] = unset, + ) -> SyntheticsTestResultResponse: + """Get a test result. + + Get a specific full result from a given Synthetic test. + + :param public_id: The public ID of the Synthetic test to which the target result belongs. + :type public_id: str + :param result_id: The ID of the result to get. + :type result_id: str + :param event_id: The event ID used to look up the result in the event store. + :type event_id: str, optional + :param timestamp: Timestamp in seconds to look up the result. + :type timestamp: int, optional + :rtype: SyntheticsTestResultResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["public_id"] = public_id + + kwargs["result_id"] = result_id + + if event_id is not unset: + kwargs["event_id"] = event_id + + if timestamp is not unset: + kwargs["timestamp"] = timestamp + + return self._get_synthetics_test_result_endpoint.call_with_http_info(**kwargs) + def get_synthetics_test_version( self, public_id: str, @@ -957,6 +1243,114 @@ def get_test_parent_suites( return self._get_test_parent_suites_endpoint.call_with_http_info(**kwargs) + def list_synthetics_browser_test_latest_results( + self, + public_id: str, + *, + from_ts: Union[int, UnsetType] = unset, + to_ts: Union[int, UnsetType] = unset, + status: Union[SyntheticsTestResultStatus, UnsetType] = unset, + run_type: Union[SyntheticsTestResultRunType, UnsetType] = unset, + probe_dc: Union[List[str], UnsetType] = unset, + device_id: Union[List[str], UnsetType] = unset, + ) -> SyntheticsTestLatestResultsResponse: + """Get a browser test's latest results. + + Get the latest result summaries for a given Synthetic browser test. + + :param public_id: The public ID of the Synthetic browser test for which to search results. + :type public_id: str + :param from_ts: Timestamp in milliseconds from which to start querying results. + :type from_ts: int, optional + :param to_ts: Timestamp in milliseconds up to which to query results. + :type to_ts: int, optional + :param status: Filter results by status. + :type status: SyntheticsTestResultStatus, optional + :param run_type: Filter results by run type. + :type run_type: SyntheticsTestResultRunType, optional + :param probe_dc: Locations for which to query results. + :type probe_dc: [str], optional + :param device_id: Device IDs for which to query results. + :type device_id: [str], optional + :rtype: SyntheticsTestLatestResultsResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["public_id"] = public_id + + if from_ts is not unset: + kwargs["from_ts"] = from_ts + + if to_ts is not unset: + kwargs["to_ts"] = to_ts + + if status is not unset: + kwargs["status"] = status + + if run_type is not unset: + kwargs["run_type"] = run_type + + if probe_dc is not unset: + kwargs["probe_dc"] = probe_dc + + if device_id is not unset: + kwargs["device_id"] = device_id + + return self._list_synthetics_browser_test_latest_results_endpoint.call_with_http_info(**kwargs) + + def list_synthetics_test_latest_results( + self, + public_id: str, + *, + from_ts: Union[int, UnsetType] = unset, + to_ts: Union[int, UnsetType] = unset, + status: Union[SyntheticsTestResultStatus, UnsetType] = unset, + run_type: Union[SyntheticsTestResultRunType, UnsetType] = unset, + probe_dc: Union[List[str], UnsetType] = unset, + device_id: Union[List[str], UnsetType] = unset, + ) -> SyntheticsTestLatestResultsResponse: + """Get a test's latest results. + + Get the latest result summaries for a given Synthetic test. + + :param public_id: The public ID of the Synthetic test for which to search results. + :type public_id: str + :param from_ts: Timestamp in milliseconds from which to start querying results. + :type from_ts: int, optional + :param to_ts: Timestamp in milliseconds up to which to query results. + :type to_ts: int, optional + :param status: Filter results by status. + :type status: SyntheticsTestResultStatus, optional + :param run_type: Filter results by run type. + :type run_type: SyntheticsTestResultRunType, optional + :param probe_dc: Locations for which to query results. + :type probe_dc: [str], optional + :param device_id: Device IDs for which to query results. + :type device_id: [str], optional + :rtype: SyntheticsTestLatestResultsResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["public_id"] = public_id + + if from_ts is not unset: + kwargs["from_ts"] = from_ts + + if to_ts is not unset: + kwargs["to_ts"] = to_ts + + if status is not unset: + kwargs["status"] = status + + if run_type is not unset: + kwargs["run_type"] = run_type + + if probe_dc is not unset: + kwargs["probe_dc"] = probe_dc + + if device_id is not unset: + kwargs["device_id"] = device_id + + return self._list_synthetics_test_latest_results_endpoint.call_with_http_info(**kwargs) + def list_synthetics_test_versions( self, public_id: str, @@ -1046,6 +1440,24 @@ def patch_test_suite( return self._patch_test_suite_endpoint.call_with_http_info(**kwargs) + def poll_synthetics_test_results( + self, + result_ids: str, + ) -> SyntheticsPollTestResultsResponse: + """Poll for test results. + + Poll for test results given a list of result IDs. This is typically used after + triggering tests with CI/CD to retrieve results once they are available. + + :param result_ids: A JSON-encoded array of result IDs to poll for. + :type result_ids: str + :rtype: SyntheticsPollTestResultsResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["result_ids"] = result_ids + + return self._poll_synthetics_test_results_endpoint.call_with_http_info(**kwargs) + def search_suites( self, *, diff --git a/src/datadog_api_client/v2/model/synthetics_fast_test_result_attributes.py b/src/datadog_api_client/v2/model/synthetics_fast_test_result_attributes.py index 6af799efd1..67fde831c6 100644 --- a/src/datadog_api_client/v2/model/synthetics_fast_test_result_attributes.py +++ b/src/datadog_api_client/v2/model/synthetics_fast_test_result_attributes.py @@ -14,26 +14,28 @@ if TYPE_CHECKING: - from datadog_api_client.v2.model.synthetics_fast_test_result_device import SyntheticsFastTestResultDevice - from datadog_api_client.v2.model.synthetics_fast_test_result_location import SyntheticsFastTestResultLocation + from datadog_api_client.v2.model.synthetics_test_result_device import SyntheticsTestResultDevice + from datadog_api_client.v2.model.synthetics_test_result_location import SyntheticsTestResultLocation from datadog_api_client.v2.model.synthetics_fast_test_result_detail import SyntheticsFastTestResultDetail from datadog_api_client.v2.model.synthetics_fast_test_sub_type import SyntheticsFastTestSubType + from datadog_api_client.v2.model.synthetics_fast_test_type import SyntheticsFastTestType class SyntheticsFastTestResultAttributes(ModelNormal): @cached_property def openapi_types(_): - from datadog_api_client.v2.model.synthetics_fast_test_result_device import SyntheticsFastTestResultDevice - from datadog_api_client.v2.model.synthetics_fast_test_result_location import SyntheticsFastTestResultLocation + from datadog_api_client.v2.model.synthetics_test_result_device import SyntheticsTestResultDevice + from datadog_api_client.v2.model.synthetics_test_result_location import SyntheticsTestResultLocation from datadog_api_client.v2.model.synthetics_fast_test_result_detail import SyntheticsFastTestResultDetail from datadog_api_client.v2.model.synthetics_fast_test_sub_type import SyntheticsFastTestSubType + from datadog_api_client.v2.model.synthetics_fast_test_type import SyntheticsFastTestType return { - "device": (SyntheticsFastTestResultDevice,), - "location": (SyntheticsFastTestResultLocation,), + "device": (SyntheticsTestResultDevice,), + "location": (SyntheticsTestResultLocation,), "result": (SyntheticsFastTestResultDetail,), "test_sub_type": (SyntheticsFastTestSubType,), - "test_type": (str,), + "test_type": (SyntheticsFastTestType,), "test_version": (int,), } @@ -48,22 +50,22 @@ def openapi_types(_): def __init__( self_, - device: Union[SyntheticsFastTestResultDevice, UnsetType] = unset, - location: Union[SyntheticsFastTestResultLocation, UnsetType] = unset, + device: Union[SyntheticsTestResultDevice, UnsetType] = unset, + location: Union[SyntheticsTestResultLocation, UnsetType] = unset, result: Union[SyntheticsFastTestResultDetail, UnsetType] = unset, test_sub_type: Union[SyntheticsFastTestSubType, UnsetType] = unset, - test_type: Union[str, UnsetType] = unset, + test_type: Union[SyntheticsFastTestType, UnsetType] = unset, test_version: Union[int, UnsetType] = unset, **kwargs, ): """ Attributes of the fast test result. - :param device: Device information for browser-based fast tests. - :type device: SyntheticsFastTestResultDevice, optional + :param device: Device information for the test result (browser and mobile tests). + :type device: SyntheticsTestResultDevice, optional - :param location: Location from which the fast test was executed. - :type location: SyntheticsFastTestResultLocation, optional + :param location: Location information for a Synthetic test result. + :type location: SyntheticsTestResultLocation, optional :param result: Detailed result data for the fast test run. The exact shape of nested fields ( ``request`` , ``response`` , ``assertions`` , etc.) depends on the test subtype. @@ -72,8 +74,8 @@ def __init__( :param test_sub_type: Subtype of the Synthetic test that produced this result. :type test_sub_type: SyntheticsFastTestSubType, optional - :param test_type: The type of the Synthetic test that produced this result (for example, ``api`` or ``browser`` ). - :type test_type: str, optional + :param test_type: Type of the Synthetic fast test that produced this result. + :type test_type: SyntheticsFastTestType, optional :param test_version: Version of the test at the time the fast test was triggered. :type test_version: int, optional diff --git a/src/datadog_api_client/v2/model/synthetics_fast_test_result_detail.py b/src/datadog_api_client/v2/model/synthetics_fast_test_result_detail.py index 2563ad83c2..c62b9ebf31 100644 --- a/src/datadog_api_client/v2/model/synthetics_fast_test_result_detail.py +++ b/src/datadog_api_client/v2/model/synthetics_fast_test_result_detail.py @@ -18,81 +18,46 @@ if TYPE_CHECKING: - from datadog_api_client.v2.model.synthetics_fast_test_assertion_result import SyntheticsFastTestAssertionResult - from datadog_api_client.v2.model.synthetics_fast_test_result_failure import SyntheticsFastTestResultFailure - from datadog_api_client.v2.model.synthetics_fast_test_step_result import SyntheticsFastTestStepResult - from datadog_api_client.v2.model.synthetics_fast_test_traceroute_hop import SyntheticsFastTestTracerouteHop + from datadog_api_client.v2.model.synthetics_test_result_assertion_result import SyntheticsTestResultAssertionResult + from datadog_api_client.v2.model.synthetics_test_result_certificate import SyntheticsTestResultCertificate + from datadog_api_client.v2.model.synthetics_test_result_failure import SyntheticsTestResultFailure + from datadog_api_client.v2.model.synthetics_test_result_request_info import SyntheticsTestResultRequestInfo + from datadog_api_client.v2.model.synthetics_test_result_response_info import SyntheticsTestResultResponseInfo + from datadog_api_client.v2.model.synthetics_test_result_run_type import SyntheticsTestResultRunType + from datadog_api_client.v2.model.synthetics_test_result_step import SyntheticsTestResultStep + from datadog_api_client.v2.model.synthetics_test_result_traceroute_hop import SyntheticsTestResultTracerouteHop class SyntheticsFastTestResultDetail(ModelNormal): @cached_property def openapi_types(_): - from datadog_api_client.v2.model.synthetics_fast_test_assertion_result import SyntheticsFastTestAssertionResult - from datadog_api_client.v2.model.synthetics_fast_test_result_failure import SyntheticsFastTestResultFailure - from datadog_api_client.v2.model.synthetics_fast_test_step_result import SyntheticsFastTestStepResult - from datadog_api_client.v2.model.synthetics_fast_test_traceroute_hop import SyntheticsFastTestTracerouteHop + from datadog_api_client.v2.model.synthetics_test_result_assertion_result import ( + SyntheticsTestResultAssertionResult, + ) + from datadog_api_client.v2.model.synthetics_test_result_certificate import SyntheticsTestResultCertificate + from datadog_api_client.v2.model.synthetics_test_result_failure import SyntheticsTestResultFailure + from datadog_api_client.v2.model.synthetics_test_result_request_info import SyntheticsTestResultRequestInfo + from datadog_api_client.v2.model.synthetics_test_result_response_info import SyntheticsTestResultResponseInfo + from datadog_api_client.v2.model.synthetics_test_result_run_type import SyntheticsTestResultRunType + from datadog_api_client.v2.model.synthetics_test_result_step import SyntheticsTestResultStep + from datadog_api_client.v2.model.synthetics_test_result_traceroute_hop import SyntheticsTestResultTracerouteHop return { - "assertions": ([SyntheticsFastTestAssertionResult],), + "assertions": ([SyntheticsTestResultAssertionResult],), "call_type": (str,), - "cert": ( - { - str: ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - UUID, - none_type, - ) - }, - ), + "cert": (SyntheticsTestResultCertificate,), "duration": (float,), - "failure": (SyntheticsFastTestResultFailure,), + "failure": (SyntheticsTestResultFailure,), "finished_at": (int,), "id": (str,), "is_fast_retry": (bool,), - "request": ( - { - str: ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - UUID, - none_type, - ) - }, - ), + "request": (SyntheticsTestResultRequestInfo,), "resolved_ip": (str,), - "response": ( - { - str: ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - UUID, - none_type, - ) - }, - ), - "run_type": (str,), + "response": (SyntheticsTestResultResponseInfo,), + "run_type": (SyntheticsTestResultRunType,), "started_at": (int,), "status": (str,), - "steps": ([SyntheticsFastTestStepResult],), + "steps": ([SyntheticsTestResultStep],), "timings": ( { str: ( @@ -109,7 +74,7 @@ def openapi_types(_): ) }, ), - "traceroute": ([SyntheticsFastTestTracerouteHop],), + "traceroute": ([SyntheticsTestResultTracerouteHop],), "triggered_at": (int,), "tunnel": (bool,), } @@ -138,23 +103,23 @@ def openapi_types(_): def __init__( self_, - assertions: Union[List[SyntheticsFastTestAssertionResult], UnsetType] = unset, + assertions: Union[List[SyntheticsTestResultAssertionResult], UnsetType] = unset, call_type: Union[str, UnsetType] = unset, - cert: Union[Dict[str, Any], UnsetType] = unset, + cert: Union[SyntheticsTestResultCertificate, UnsetType] = unset, duration: Union[float, UnsetType] = unset, - failure: Union[SyntheticsFastTestResultFailure, UnsetType] = unset, + failure: Union[SyntheticsTestResultFailure, UnsetType] = unset, finished_at: Union[int, UnsetType] = unset, id: Union[str, UnsetType] = unset, is_fast_retry: Union[bool, UnsetType] = unset, - request: Union[Dict[str, Any], UnsetType] = unset, + request: Union[SyntheticsTestResultRequestInfo, UnsetType] = unset, resolved_ip: Union[str, UnsetType] = unset, - response: Union[Dict[str, Any], UnsetType] = unset, - run_type: Union[str, UnsetType] = unset, + response: Union[SyntheticsTestResultResponseInfo, UnsetType] = unset, + run_type: Union[SyntheticsTestResultRunType, UnsetType] = unset, started_at: Union[int, UnsetType] = unset, status: Union[str, UnsetType] = unset, - steps: Union[List[SyntheticsFastTestStepResult], UnsetType] = unset, + steps: Union[List[SyntheticsTestResultStep], UnsetType] = unset, timings: Union[Dict[str, Any], UnsetType] = unset, - traceroute: Union[List[SyntheticsFastTestTracerouteHop], UnsetType] = unset, + traceroute: Union[List[SyntheticsTestResultTracerouteHop], UnsetType] = unset, triggered_at: Union[int, UnsetType] = unset, tunnel: Union[bool, UnsetType] = unset, **kwargs, @@ -164,19 +129,19 @@ def __init__( ( ``request`` , ``response`` , ``assertions`` , etc.) depends on the test subtype. :param assertions: Results of each assertion evaluated during the test. - :type assertions: [SyntheticsFastTestAssertionResult], optional + :type assertions: [SyntheticsTestResultAssertionResult], optional :param call_type: gRPC call type (for example, ``unary`` , ``healthCheck`` , or ``reflection`` ). :type call_type: str, optional - :param cert: TLS certificate details, present for SSL tests. - :type cert: {str: (bool, date, datetime, dict, float, int, list, str, UUID, none_type,)}, optional + :param cert: SSL/TLS certificate information returned from an SSL test. + :type cert: SyntheticsTestResultCertificate, optional :param duration: Total duration of the test in milliseconds. :type duration: float, optional - :param failure: Failure details if the fast test did not pass. - :type failure: SyntheticsFastTestResultFailure, optional + :param failure: Details about the failure of a Synthetic test. + :type failure: SyntheticsTestResultFailure, optional :param finished_at: Unix timestamp (ms) of when the test finished. :type finished_at: int, optional @@ -187,17 +152,17 @@ def __init__( :param is_fast_retry: Whether this result is from an automatic fast retry. :type is_fast_retry: bool, optional - :param request: Details of the outgoing request made during the test. - :type request: {str: (bool, date, datetime, dict, float, int, list, str, UUID, none_type,)}, optional + :param request: Details of the outgoing request made during the test execution. + :type request: SyntheticsTestResultRequestInfo, optional :param resolved_ip: IP address resolved for the target host. :type resolved_ip: str, optional - :param response: Details of the response received during the test. - :type response: {str: (bool, date, datetime, dict, float, int, list, str, UUID, none_type,)}, optional + :param response: Details of the response received during the test execution. + :type response: SyntheticsTestResultResponseInfo, optional - :param run_type: Run type indicating how this test was triggered (for example, ``fast`` ). - :type run_type: str, optional + :param run_type: The type of run for a Synthetic test result. + :type run_type: SyntheticsTestResultRunType, optional :param started_at: Unix timestamp (ms) of when the test started. :type started_at: int, optional @@ -206,13 +171,13 @@ def __init__( :type status: str, optional :param steps: Step results for multistep API tests. - :type steps: [SyntheticsFastTestStepResult], optional + :type steps: [SyntheticsTestResultStep], optional :param timings: Timing breakdown of the test request phases (for example, DNS, TCP, TLS, first byte). :type timings: {str: (bool, date, datetime, dict, float, int, list, str, UUID, none_type,)}, optional :param traceroute: Traceroute hop results, present for ICMP and TCP tests. - :type traceroute: [SyntheticsFastTestTracerouteHop], optional + :type traceroute: [SyntheticsTestResultTracerouteHop], optional :param triggered_at: Unix timestamp (ms) of when the test was triggered. :type triggered_at: int, optional diff --git a/src/datadog_api_client/v2/model/synthetics_fast_test_result_failure.py b/src/datadog_api_client/v2/model/synthetics_fast_test_result_failure.py deleted file mode 100644 index 083850bc8d..0000000000 --- a/src/datadog_api_client/v2/model/synthetics_fast_test_result_failure.py +++ /dev/null @@ -1,43 +0,0 @@ -# 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. -from __future__ import annotations - -from typing import Union - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, - unset, - UnsetType, -) - - -class SyntheticsFastTestResultFailure(ModelNormal): - @cached_property - def openapi_types(_): - return { - "code": (str,), - "message": (str,), - } - - attribute_map = { - "code": "code", - "message": "message", - } - - def __init__(self_, code: Union[str, UnsetType] = unset, message: Union[str, UnsetType] = unset, **kwargs): - """ - Failure details if the fast test did not pass. - - :param code: Error code identifying the failure type. - :type code: str, optional - - :param message: Human-readable description of the failure. - :type message: str, optional - """ - if code is not unset: - kwargs["code"] = code - if message is not unset: - kwargs["message"] = message - super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_fast_test_step_result.py b/src/datadog_api_client/v2/model/synthetics_fast_test_step_result.py deleted file mode 100644 index c9ed69077b..0000000000 --- a/src/datadog_api_client/v2/model/synthetics_fast_test_step_result.py +++ /dev/null @@ -1,17 +0,0 @@ -# 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. -from __future__ import annotations - - -from datadog_api_client.model_utils import ( - ModelNormal, -) - - -class SyntheticsFastTestStepResult(ModelNormal): - def __init__(self_, **kwargs): - """ - Result of a single step in a multistep fast test run. - """ - super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_fast_test_traceroute_hop.py b/src/datadog_api_client/v2/model/synthetics_fast_test_traceroute_hop.py deleted file mode 100644 index fa2882fdca..0000000000 --- a/src/datadog_api_client/v2/model/synthetics_fast_test_traceroute_hop.py +++ /dev/null @@ -1,17 +0,0 @@ -# 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. -from __future__ import annotations - - -from datadog_api_client.model_utils import ( - ModelNormal, -) - - -class SyntheticsFastTestTracerouteHop(ModelNormal): - def __init__(self_, **kwargs): - """ - A single traceroute hop result from a fast test run. - """ - super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_fast_test_type.py b/src/datadog_api_client/v2/model/synthetics_fast_test_type.py new file mode 100644 index 0000000000..b8da7852ce --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_fast_test_type.py @@ -0,0 +1,38 @@ +# 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. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class SyntheticsFastTestType(ModelSimple): + """ + Type of the Synthetic fast test that produced this result. + + :param value: Must be one of ["fast-api", "fast-browser"]. + :type value: str + """ + + allowed_values = { + "fast-api", + "fast-browser", + } + FAST_API: ClassVar["SyntheticsFastTestType"] + FAST_BROWSER: ClassVar["SyntheticsFastTestType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +SyntheticsFastTestType.FAST_API = SyntheticsFastTestType("fast-api") +SyntheticsFastTestType.FAST_BROWSER = SyntheticsFastTestType("fast-browser") diff --git a/src/datadog_api_client/v2/model/synthetics_poll_test_results_response.py b/src/datadog_api_client/v2/model/synthetics_poll_test_results_response.py new file mode 100644 index 0000000000..6cfb8cbefa --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_poll_test_results_response.py @@ -0,0 +1,56 @@ +# 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. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_test_result_data import SyntheticsTestResultData + from datadog_api_client.v2.model.synthetics_test_result_included_item import SyntheticsTestResultIncludedItem + + +class SyntheticsPollTestResultsResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_test_result_data import SyntheticsTestResultData + from datadog_api_client.v2.model.synthetics_test_result_included_item import SyntheticsTestResultIncludedItem + + return { + "data": ([SyntheticsTestResultData],), + "included": ([SyntheticsTestResultIncludedItem],), + } + + attribute_map = { + "data": "data", + "included": "included", + } + + def __init__( + self_, + data: Union[List[SyntheticsTestResultData], UnsetType] = unset, + included: Union[List[SyntheticsTestResultIncludedItem], UnsetType] = unset, + **kwargs, + ): + """ + Response object for polling Synthetic test results. + + :param data: Array of Synthetic test results. + :type data: [SyntheticsTestResultData], optional + + :param included: Array of included related resources, such as the test definition. + :type included: [SyntheticsTestResultIncludedItem], optional + """ + if data is not unset: + kwargs["data"] = data + if included is not unset: + kwargs["included"] = included + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_latest_results_response.py b/src/datadog_api_client/v2/model/synthetics_test_latest_results_response.py new file mode 100644 index 0000000000..185d2ca4f5 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_latest_results_response.py @@ -0,0 +1,56 @@ +# 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. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_test_result_summary_data import SyntheticsTestResultSummaryData + from datadog_api_client.v2.model.synthetics_test_result_included_item import SyntheticsTestResultIncludedItem + + +class SyntheticsTestLatestResultsResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_test_result_summary_data import SyntheticsTestResultSummaryData + from datadog_api_client.v2.model.synthetics_test_result_included_item import SyntheticsTestResultIncludedItem + + return { + "data": ([SyntheticsTestResultSummaryData],), + "included": ([SyntheticsTestResultIncludedItem],), + } + + attribute_map = { + "data": "data", + "included": "included", + } + + def __init__( + self_, + data: Union[List[SyntheticsTestResultSummaryData], UnsetType] = unset, + included: Union[List[SyntheticsTestResultIncludedItem], UnsetType] = unset, + **kwargs, + ): + """ + Response object for a Synthetic test's latest result summaries. + + :param data: Array of Synthetic test result summaries. + :type data: [SyntheticsTestResultSummaryData], optional + + :param included: Array of included related resources, such as the test definition. + :type included: [SyntheticsTestResultIncludedItem], optional + """ + if data is not unset: + kwargs["data"] = data + if included is not unset: + kwargs["included"] = included + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_assertion_result.py b/src/datadog_api_client/v2/model/synthetics_test_result_assertion_result.py new file mode 100644 index 0000000000..2d1cfeb0b9 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_assertion_result.py @@ -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. +from __future__ import annotations + +from typing import Any, Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + date, + datetime, + none_type, + unset, + UnsetType, + UUID, +) + + +class SyntheticsTestResultAssertionResult(ModelNormal): + @cached_property + def openapi_types(_): + return { + "actual": ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + UUID, + none_type, + ), + "error_message": (str,), + "expected": ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + UUID, + none_type, + ), + "operator": (str,), + "_property": (str,), + "target": ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + UUID, + none_type, + ), + "target_path": (str,), + "target_path_operator": (str,), + "type": (str,), + "valid": (bool,), + } + + attribute_map = { + "actual": "actual", + "error_message": "error_message", + "expected": "expected", + "operator": "operator", + "_property": "property", + "target": "target", + "target_path": "target_path", + "target_path_operator": "target_path_operator", + "type": "type", + "valid": "valid", + } + + def __init__( + self_, + actual: Union[Any, UnsetType] = unset, + error_message: Union[str, UnsetType] = unset, + expected: Union[Any, UnsetType] = unset, + operator: Union[str, UnsetType] = unset, + _property: Union[str, UnsetType] = unset, + target: Union[Any, UnsetType] = unset, + target_path: Union[str, UnsetType] = unset, + target_path_operator: Union[str, UnsetType] = unset, + type: Union[str, UnsetType] = unset, + valid: Union[bool, UnsetType] = unset, + **kwargs, + ): + """ + An individual assertion result from a Synthetic test. + + :param actual: Actual value observed during the test. Its type depends on the assertion type. + :type actual: bool, date, datetime, dict, float, int, list, str, UUID, none_type, optional + + :param error_message: Error message if the assertion failed. + :type error_message: str, optional + + :param expected: Expected value for the assertion. Its type depends on the assertion type. + :type expected: bool, date, datetime, dict, float, int, list, str, UUID, none_type, optional + + :param operator: Operator used for the assertion (for example, ``is`` , ``contains`` ). + :type operator: str, optional + + :param _property: Property targeted by the assertion, when applicable. + :type _property: str, optional + + :param target: Target value for the assertion. Its type depends on the assertion type. + :type target: bool, date, datetime, dict, float, int, list, str, UUID, none_type, optional + + :param target_path: JSON path or XPath evaluated for the assertion. + :type target_path: str, optional + + :param target_path_operator: Operator used for the target path assertion. + :type target_path_operator: str, optional + + :param type: Type of the assertion (for example, ``responseTime`` , ``statusCode`` , ``body`` ). + :type type: str, optional + + :param valid: Whether the assertion passed. + :type valid: bool, optional + """ + if actual is not unset: + kwargs["actual"] = actual + if error_message is not unset: + kwargs["error_message"] = error_message + if expected is not unset: + kwargs["expected"] = expected + if operator is not unset: + kwargs["operator"] = operator + if _property is not unset: + kwargs["_property"] = _property + if target is not unset: + kwargs["target"] = target + if target_path is not unset: + kwargs["target_path"] = target_path + if target_path_operator is not unset: + kwargs["target_path_operator"] = target_path_operator + if type is not unset: + kwargs["type"] = type + if valid is not unset: + kwargs["valid"] = valid + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_attributes.py b/src/datadog_api_client/v2/model/synthetics_test_result_attributes.py new file mode 100644 index 0000000000..516a518c5d --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_attributes.py @@ -0,0 +1,116 @@ +# 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. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_test_result_batch import SyntheticsTestResultBatch + from datadog_api_client.v2.model.synthetics_test_result_ci import SyntheticsTestResultCI + from datadog_api_client.v2.model.synthetics_test_result_device import SyntheticsTestResultDevice + from datadog_api_client.v2.model.synthetics_test_result_git import SyntheticsTestResultGit + from datadog_api_client.v2.model.synthetics_test_result_location import SyntheticsTestResultLocation + from datadog_api_client.v2.model.synthetics_test_result_detail import SyntheticsTestResultDetail + from datadog_api_client.v2.model.synthetics_test_sub_type import SyntheticsTestSubType + from datadog_api_client.v2.model.synthetics_test_type import SyntheticsTestType + + +class SyntheticsTestResultAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_test_result_batch import SyntheticsTestResultBatch + from datadog_api_client.v2.model.synthetics_test_result_ci import SyntheticsTestResultCI + from datadog_api_client.v2.model.synthetics_test_result_device import SyntheticsTestResultDevice + from datadog_api_client.v2.model.synthetics_test_result_git import SyntheticsTestResultGit + from datadog_api_client.v2.model.synthetics_test_result_location import SyntheticsTestResultLocation + from datadog_api_client.v2.model.synthetics_test_result_detail import SyntheticsTestResultDetail + from datadog_api_client.v2.model.synthetics_test_sub_type import SyntheticsTestSubType + from datadog_api_client.v2.model.synthetics_test_type import SyntheticsTestType + + return { + "batch": (SyntheticsTestResultBatch,), + "ci": (SyntheticsTestResultCI,), + "device": (SyntheticsTestResultDevice,), + "git": (SyntheticsTestResultGit,), + "location": (SyntheticsTestResultLocation,), + "result": (SyntheticsTestResultDetail,), + "test_sub_type": (SyntheticsTestSubType,), + "test_type": (SyntheticsTestType,), + } + + attribute_map = { + "batch": "batch", + "ci": "ci", + "device": "device", + "git": "git", + "location": "location", + "result": "result", + "test_sub_type": "test_sub_type", + "test_type": "test_type", + } + + def __init__( + self_, + batch: Union[SyntheticsTestResultBatch, UnsetType] = unset, + ci: Union[SyntheticsTestResultCI, UnsetType] = unset, + device: Union[SyntheticsTestResultDevice, UnsetType] = unset, + git: Union[SyntheticsTestResultGit, UnsetType] = unset, + location: Union[SyntheticsTestResultLocation, UnsetType] = unset, + result: Union[SyntheticsTestResultDetail, UnsetType] = unset, + test_sub_type: Union[SyntheticsTestSubType, UnsetType] = unset, + test_type: Union[SyntheticsTestType, UnsetType] = unset, + **kwargs, + ): + """ + Attributes of a Synthetic test result. + + :param batch: Batch information for the test result. + :type batch: SyntheticsTestResultBatch, optional + + :param ci: CI information associated with the test result. + :type ci: SyntheticsTestResultCI, optional + + :param device: Device information for the test result (browser and mobile tests). + :type device: SyntheticsTestResultDevice, optional + + :param git: Git information associated with the test result. + :type git: SyntheticsTestResultGit, optional + + :param location: Location information for a Synthetic test result. + :type location: SyntheticsTestResultLocation, optional + + :param result: Full result details for a Synthetic test execution. + :type result: SyntheticsTestResultDetail, optional + + :param test_sub_type: Subtype of the Synthetic test that produced this result. + :type test_sub_type: SyntheticsTestSubType, optional + + :param test_type: Type of the Synthetic test that produced this result. + :type test_type: SyntheticsTestType, optional + """ + if batch is not unset: + kwargs["batch"] = batch + if ci is not unset: + kwargs["ci"] = ci + if device is not unset: + kwargs["device"] = device + if git is not unset: + kwargs["git"] = git + if location is not unset: + kwargs["location"] = location + if result is not unset: + kwargs["result"] = result + if test_sub_type is not unset: + kwargs["test_sub_type"] = test_sub_type + if test_type is not unset: + kwargs["test_type"] = test_type + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_batch.py b/src/datadog_api_client/v2/model/synthetics_test_result_batch.py new file mode 100644 index 0000000000..411454cbda --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_batch.py @@ -0,0 +1,36 @@ +# 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. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class SyntheticsTestResultBatch(ModelNormal): + @cached_property + def openapi_types(_): + return { + "id": (str,), + } + + attribute_map = { + "id": "id", + } + + def __init__(self_, id: Union[str, UnsetType] = unset, **kwargs): + """ + Batch information for the test result. + + :param id: Batch identifier. + :type id: str, optional + """ + if id is not unset: + kwargs["id"] = id + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_bounds.py b/src/datadog_api_client/v2/model/synthetics_test_result_bounds.py new file mode 100644 index 0000000000..5270ee46a0 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_bounds.py @@ -0,0 +1,64 @@ +# 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. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class SyntheticsTestResultBounds(ModelNormal): + @cached_property + def openapi_types(_): + return { + "height": (int,), + "width": (int,), + "x": (int,), + "y": (int,), + } + + attribute_map = { + "height": "height", + "width": "width", + "x": "x", + "y": "y", + } + + def __init__( + self_, + height: Union[int, UnsetType] = unset, + width: Union[int, UnsetType] = unset, + x: Union[int, UnsetType] = unset, + y: Union[int, UnsetType] = unset, + **kwargs, + ): + """ + Bounding box of an element on the page. + + :param height: Height in pixels. + :type height: int, optional + + :param width: Width in pixels. + :type width: int, optional + + :param x: Horizontal position in pixels. + :type x: int, optional + + :param y: Vertical position in pixels. + :type y: int, optional + """ + if height is not unset: + kwargs["height"] = height + if width is not unset: + kwargs["width"] = width + if x is not unset: + kwargs["x"] = x + if y is not unset: + kwargs["y"] = y + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_browser_error.py b/src/datadog_api_client/v2/model/synthetics_test_result_browser_error.py new file mode 100644 index 0000000000..0c04173d8c --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_browser_error.py @@ -0,0 +1,99 @@ +# 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. +from __future__ import annotations + +from typing import Any, Dict, Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + date, + datetime, + none_type, + unset, + UnsetType, + UUID, +) + + +class SyntheticsTestResultBrowserError(ModelNormal): + @cached_property + def openapi_types(_): + return { + "description": (str,), + "method": (str,), + "name": (str,), + "status": (int,), + "type": (str,), + "url": ( + { + str: ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + UUID, + none_type, + ) + }, + ), + } + + attribute_map = { + "description": "description", + "method": "method", + "name": "name", + "status": "status", + "type": "type", + "url": "url", + } + + def __init__( + self_, + description: Union[str, UnsetType] = unset, + method: Union[str, UnsetType] = unset, + name: Union[str, UnsetType] = unset, + status: Union[int, UnsetType] = unset, + type: Union[str, UnsetType] = unset, + url: Union[Dict[str, Any], UnsetType] = unset, + **kwargs, + ): + """ + A browser error captured during a browser test step. + + :param description: Error description. + :type description: str, optional + + :param method: HTTP method associated with the error (for network errors). + :type method: str, optional + + :param name: Error name. + :type name: str, optional + + :param status: HTTP status code associated with the error (for network errors). + :type status: int, optional + + :param type: Type of the browser error. + :type type: str, optional + + :param url: URL associated with the error. + :type url: {str: (bool, date, datetime, dict, float, int, list, str, UUID, none_type,)}, optional + """ + if description is not unset: + kwargs["description"] = description + if method is not unset: + kwargs["method"] = method + if name is not unset: + kwargs["name"] = name + if status is not unset: + kwargs["status"] = status + if type is not unset: + kwargs["type"] = type + if url is not unset: + kwargs["url"] = url + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_bucket_keys.py b/src/datadog_api_client/v2/model/synthetics_test_result_bucket_keys.py new file mode 100644 index 0000000000..0eaf228da9 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_bucket_keys.py @@ -0,0 +1,120 @@ +# 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. +from __future__ import annotations + +from typing import List, Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class SyntheticsTestResultBucketKeys(ModelNormal): + @cached_property + def openapi_types(_): + return { + "after_step_screenshot": (str,), + "after_turn_screenshot": (str,), + "artifacts": (str,), + "before_step_screenshot": (str,), + "before_turn_screenshot": (str,), + "crash_report": (str,), + "device_logs": (str,), + "email_messages": ([str],), + "screenshot": (str,), + "snapshot": (str,), + "source": (str,), + } + + attribute_map = { + "after_step_screenshot": "after_step_screenshot", + "after_turn_screenshot": "after_turn_screenshot", + "artifacts": "artifacts", + "before_step_screenshot": "before_step_screenshot", + "before_turn_screenshot": "before_turn_screenshot", + "crash_report": "crash_report", + "device_logs": "device_logs", + "email_messages": "email_messages", + "screenshot": "screenshot", + "snapshot": "snapshot", + "source": "source", + } + + def __init__( + self_, + after_step_screenshot: Union[str, UnsetType] = unset, + after_turn_screenshot: Union[str, UnsetType] = unset, + artifacts: Union[str, UnsetType] = unset, + before_step_screenshot: Union[str, UnsetType] = unset, + before_turn_screenshot: Union[str, UnsetType] = unset, + crash_report: Union[str, UnsetType] = unset, + device_logs: Union[str, UnsetType] = unset, + email_messages: Union[List[str], UnsetType] = unset, + screenshot: Union[str, UnsetType] = unset, + snapshot: Union[str, UnsetType] = unset, + source: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Storage bucket keys for artifacts produced during a step or test. + + :param after_step_screenshot: Key for the screenshot captured after the step (goal-based tests). + :type after_step_screenshot: str, optional + + :param after_turn_screenshot: Key for the screenshot captured after the turn (goal-based tests). + :type after_turn_screenshot: str, optional + + :param artifacts: Key for miscellaneous artifacts. + :type artifacts: str, optional + + :param before_step_screenshot: Key for the screenshot captured before the step (goal-based tests). + :type before_step_screenshot: str, optional + + :param before_turn_screenshot: Key for the screenshot captured before the turn (goal-based tests). + :type before_turn_screenshot: str, optional + + :param crash_report: Key for a captured crash report. + :type crash_report: str, optional + + :param device_logs: Key for captured device logs. + :type device_logs: str, optional + + :param email_messages: Keys for email message payloads captured by the step. + :type email_messages: [str], optional + + :param screenshot: Key for the captured screenshot. + :type screenshot: str, optional + + :param snapshot: Key for the captured DOM snapshot. + :type snapshot: str, optional + + :param source: Key for the page source or element source. + :type source: str, optional + """ + if after_step_screenshot is not unset: + kwargs["after_step_screenshot"] = after_step_screenshot + if after_turn_screenshot is not unset: + kwargs["after_turn_screenshot"] = after_turn_screenshot + if artifacts is not unset: + kwargs["artifacts"] = artifacts + if before_step_screenshot is not unset: + kwargs["before_step_screenshot"] = before_step_screenshot + if before_turn_screenshot is not unset: + kwargs["before_turn_screenshot"] = before_turn_screenshot + if crash_report is not unset: + kwargs["crash_report"] = crash_report + if device_logs is not unset: + kwargs["device_logs"] = device_logs + if email_messages is not unset: + kwargs["email_messages"] = email_messages + if screenshot is not unset: + kwargs["screenshot"] = screenshot + if snapshot is not unset: + kwargs["snapshot"] = snapshot + if source is not unset: + kwargs["source"] = source + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_cdn_cache_status.py b/src/datadog_api_client/v2/model/synthetics_test_result_cdn_cache_status.py new file mode 100644 index 0000000000..4eec281e0e --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_cdn_cache_status.py @@ -0,0 +1,43 @@ +# 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. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class SyntheticsTestResultCdnCacheStatus(ModelNormal): + @cached_property + def openapi_types(_): + return { + "cached": (bool,), + "status": (str,), + } + + attribute_map = { + "cached": "cached", + "status": "status", + } + + def __init__(self_, cached: Union[bool, UnsetType] = unset, status: Union[str, UnsetType] = unset, **kwargs): + """ + Cache status reported by the CDN for the response. + + :param cached: Whether the response was served from the CDN cache. + :type cached: bool, optional + + :param status: Raw cache status string reported by the CDN. + :type status: str, optional + """ + if cached is not unset: + kwargs["cached"] = cached + if status is not unset: + kwargs["status"] = status + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_cdn_provider_info.py b/src/datadog_api_client/v2/model/synthetics_test_result_cdn_provider_info.py new file mode 100644 index 0000000000..9432edd276 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_cdn_provider_info.py @@ -0,0 +1,56 @@ +# 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. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_test_result_cdn_cache_status import SyntheticsTestResultCdnCacheStatus + + +class SyntheticsTestResultCdnProviderInfo(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_test_result_cdn_cache_status import ( + SyntheticsTestResultCdnCacheStatus, + ) + + return { + "cache": (SyntheticsTestResultCdnCacheStatus,), + "provider": (str,), + } + + attribute_map = { + "cache": "cache", + "provider": "provider", + } + + def __init__( + self_, + cache: Union[SyntheticsTestResultCdnCacheStatus, UnsetType] = unset, + provider: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + CDN provider details inferred from response headers. + + :param cache: Cache status reported by the CDN for the response. + :type cache: SyntheticsTestResultCdnCacheStatus, optional + + :param provider: Name of the CDN provider. + :type provider: str, optional + """ + if cache is not unset: + kwargs["cache"] = cache + if provider is not unset: + kwargs["provider"] = provider + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_cdn_resource.py b/src/datadog_api_client/v2/model/synthetics_test_result_cdn_resource.py new file mode 100644 index 0000000000..0d662e329a --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_cdn_resource.py @@ -0,0 +1,91 @@ +# 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. +from __future__ import annotations + +from typing import Any, Dict, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + date, + datetime, + none_type, + unset, + UnsetType, + UUID, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_test_result_cdn_provider_info import SyntheticsTestResultCdnProviderInfo + + +class SyntheticsTestResultCdnResource(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_test_result_cdn_provider_info import ( + SyntheticsTestResultCdnProviderInfo, + ) + + return { + "cdn": (SyntheticsTestResultCdnProviderInfo,), + "resolved_ip": (str,), + "timestamp": (int,), + "timings": ( + { + str: ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + UUID, + none_type, + ) + }, + ), + } + + attribute_map = { + "cdn": "cdn", + "resolved_ip": "resolved_ip", + "timestamp": "timestamp", + "timings": "timings", + } + + def __init__( + self_, + cdn: Union[SyntheticsTestResultCdnProviderInfo, UnsetType] = unset, + resolved_ip: Union[str, UnsetType] = unset, + timestamp: Union[int, UnsetType] = unset, + timings: Union[Dict[str, Any], UnsetType] = unset, + **kwargs, + ): + """ + A CDN resource encountered while executing a browser step. + + :param cdn: CDN provider details inferred from response headers. + :type cdn: SyntheticsTestResultCdnProviderInfo, optional + + :param resolved_ip: Resolved IP address for the CDN resource. + :type resolved_ip: str, optional + + :param timestamp: Unix timestamp (ms) of when the resource was fetched. + :type timestamp: int, optional + + :param timings: Timing breakdown for fetching the CDN resource. + :type timings: {str: (bool, date, datetime, dict, float, int, list, str, UUID, none_type,)}, optional + """ + if cdn is not unset: + kwargs["cdn"] = cdn + if resolved_ip is not unset: + kwargs["resolved_ip"] = resolved_ip + if timestamp is not unset: + kwargs["timestamp"] = timestamp + if timings is not unset: + kwargs["timings"] = timings + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_certificate.py b/src/datadog_api_client/v2/model/synthetics_test_result_certificate.py new file mode 100644 index 0000000000..d24aa7b703 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_certificate.py @@ -0,0 +1,138 @@ +# 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. +from __future__ import annotations + +from typing import Dict, List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_test_result_certificate_validity import ( + SyntheticsTestResultCertificateValidity, + ) + + +class SyntheticsTestResultCertificate(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_test_result_certificate_validity import ( + SyntheticsTestResultCertificateValidity, + ) + + return { + "cipher": (str,), + "exponent": (int,), + "ext_key_usage": ([str],), + "fingerprint": (str,), + "fingerprint256": (str,), + "issuer": ({str: (str,)},), + "modulus": (str,), + "protocol": (str,), + "serial_number": (str,), + "subject": ({str: (str,)},), + "tls_version": (float,), + "valid": (SyntheticsTestResultCertificateValidity,), + } + + attribute_map = { + "cipher": "cipher", + "exponent": "exponent", + "ext_key_usage": "ext_key_usage", + "fingerprint": "fingerprint", + "fingerprint256": "fingerprint256", + "issuer": "issuer", + "modulus": "modulus", + "protocol": "protocol", + "serial_number": "serial_number", + "subject": "subject", + "tls_version": "tls_version", + "valid": "valid", + } + + def __init__( + self_, + cipher: Union[str, UnsetType] = unset, + exponent: Union[int, UnsetType] = unset, + ext_key_usage: Union[List[str], UnsetType] = unset, + fingerprint: Union[str, UnsetType] = unset, + fingerprint256: Union[str, UnsetType] = unset, + issuer: Union[Dict[str, str], UnsetType] = unset, + modulus: Union[str, UnsetType] = unset, + protocol: Union[str, UnsetType] = unset, + serial_number: Union[str, UnsetType] = unset, + subject: Union[Dict[str, str], UnsetType] = unset, + tls_version: Union[float, UnsetType] = unset, + valid: Union[SyntheticsTestResultCertificateValidity, UnsetType] = unset, + **kwargs, + ): + """ + SSL/TLS certificate information returned from an SSL test. + + :param cipher: Cipher used for the TLS connection. + :type cipher: str, optional + + :param exponent: RSA exponent of the certificate. + :type exponent: int, optional + + :param ext_key_usage: Extended key usage extensions for the certificate. + :type ext_key_usage: [str], optional + + :param fingerprint: SHA-1 fingerprint of the certificate. + :type fingerprint: str, optional + + :param fingerprint256: SHA-256 fingerprint of the certificate. + :type fingerprint256: str, optional + + :param issuer: Certificate issuer details. + :type issuer: {str: (str,)}, optional + + :param modulus: RSA modulus of the certificate. + :type modulus: str, optional + + :param protocol: TLS protocol used (for example, ``TLSv1.2`` ). + :type protocol: str, optional + + :param serial_number: Serial number of the certificate. + :type serial_number: str, optional + + :param subject: Certificate subject details. + :type subject: {str: (str,)}, optional + + :param tls_version: TLS protocol version. + :type tls_version: float, optional + + :param valid: Validity window of a certificate. + :type valid: SyntheticsTestResultCertificateValidity, optional + """ + if cipher is not unset: + kwargs["cipher"] = cipher + if exponent is not unset: + kwargs["exponent"] = exponent + if ext_key_usage is not unset: + kwargs["ext_key_usage"] = ext_key_usage + if fingerprint is not unset: + kwargs["fingerprint"] = fingerprint + if fingerprint256 is not unset: + kwargs["fingerprint256"] = fingerprint256 + if issuer is not unset: + kwargs["issuer"] = issuer + if modulus is not unset: + kwargs["modulus"] = modulus + if protocol is not unset: + kwargs["protocol"] = protocol + if serial_number is not unset: + kwargs["serial_number"] = serial_number + if subject is not unset: + kwargs["subject"] = subject + if tls_version is not unset: + kwargs["tls_version"] = tls_version + if valid is not unset: + kwargs["valid"] = valid + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_certificate_validity.py b/src/datadog_api_client/v2/model/synthetics_test_result_certificate_validity.py new file mode 100644 index 0000000000..b83f67a624 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_certificate_validity.py @@ -0,0 +1,43 @@ +# 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. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class SyntheticsTestResultCertificateValidity(ModelNormal): + @cached_property + def openapi_types(_): + return { + "_from": (int,), + "to": (int,), + } + + attribute_map = { + "_from": "from", + "to": "to", + } + + def __init__(self_, _from: Union[int, UnsetType] = unset, to: Union[int, UnsetType] = unset, **kwargs): + """ + Validity window of a certificate. + + :param _from: Unix timestamp (ms) of when the certificate became valid. + :type _from: int, optional + + :param to: Unix timestamp (ms) of when the certificate expires. + :type to: int, optional + """ + if _from is not unset: + kwargs["_from"] = _from + if to is not unset: + kwargs["to"] = to + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_ci.py b/src/datadog_api_client/v2/model/synthetics_test_result_ci.py new file mode 100644 index 0000000000..f1a3234b0b --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_ci.py @@ -0,0 +1,74 @@ +# 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. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_test_result_ci_pipeline import SyntheticsTestResultCIPipeline + from datadog_api_client.v2.model.synthetics_test_result_ci_provider import SyntheticsTestResultCIProvider + from datadog_api_client.v2.model.synthetics_test_result_ci_stage import SyntheticsTestResultCIStage + + +class SyntheticsTestResultCI(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_test_result_ci_pipeline import SyntheticsTestResultCIPipeline + from datadog_api_client.v2.model.synthetics_test_result_ci_provider import SyntheticsTestResultCIProvider + from datadog_api_client.v2.model.synthetics_test_result_ci_stage import SyntheticsTestResultCIStage + + return { + "pipeline": (SyntheticsTestResultCIPipeline,), + "provider": (SyntheticsTestResultCIProvider,), + "stage": (SyntheticsTestResultCIStage,), + "workspace_path": (str,), + } + + attribute_map = { + "pipeline": "pipeline", + "provider": "provider", + "stage": "stage", + "workspace_path": "workspace_path", + } + + def __init__( + self_, + pipeline: Union[SyntheticsTestResultCIPipeline, UnsetType] = unset, + provider: Union[SyntheticsTestResultCIProvider, UnsetType] = unset, + stage: Union[SyntheticsTestResultCIStage, UnsetType] = unset, + workspace_path: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + CI information associated with the test result. + + :param pipeline: Details of the CI pipeline. + :type pipeline: SyntheticsTestResultCIPipeline, optional + + :param provider: Details of the CI provider. + :type provider: SyntheticsTestResultCIProvider, optional + + :param stage: Details of the CI stage. + :type stage: SyntheticsTestResultCIStage, optional + + :param workspace_path: Path of the workspace that ran the CI job. + :type workspace_path: str, optional + """ + if pipeline is not unset: + kwargs["pipeline"] = pipeline + if provider is not unset: + kwargs["provider"] = provider + if stage is not unset: + kwargs["stage"] = stage + if workspace_path is not unset: + kwargs["workspace_path"] = workspace_path + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_ci_pipeline.py b/src/datadog_api_client/v2/model/synthetics_test_result_ci_pipeline.py new file mode 100644 index 0000000000..f38c5b0781 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_ci_pipeline.py @@ -0,0 +1,64 @@ +# 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. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class SyntheticsTestResultCIPipeline(ModelNormal): + @cached_property + def openapi_types(_): + return { + "id": (str,), + "name": (str,), + "number": (int,), + "url": (str,), + } + + attribute_map = { + "id": "id", + "name": "name", + "number": "number", + "url": "url", + } + + def __init__( + self_, + id: Union[str, UnsetType] = unset, + name: Union[str, UnsetType] = unset, + number: Union[int, UnsetType] = unset, + url: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Details of the CI pipeline. + + :param id: Pipeline identifier. + :type id: str, optional + + :param name: Pipeline name. + :type name: str, optional + + :param number: Pipeline number. + :type number: int, optional + + :param url: Pipeline URL. + :type url: str, optional + """ + if id is not unset: + kwargs["id"] = id + if name is not unset: + kwargs["name"] = name + if number is not unset: + kwargs["number"] = number + if url is not unset: + kwargs["url"] = url + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_ci_provider.py b/src/datadog_api_client/v2/model/synthetics_test_result_ci_provider.py new file mode 100644 index 0000000000..2cdf65f61d --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_ci_provider.py @@ -0,0 +1,36 @@ +# 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. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class SyntheticsTestResultCIProvider(ModelNormal): + @cached_property + def openapi_types(_): + return { + "name": (str,), + } + + attribute_map = { + "name": "name", + } + + def __init__(self_, name: Union[str, UnsetType] = unset, **kwargs): + """ + Details of the CI provider. + + :param name: Provider name. + :type name: str, optional + """ + if name is not unset: + kwargs["name"] = name + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_ci_stage.py b/src/datadog_api_client/v2/model/synthetics_test_result_ci_stage.py new file mode 100644 index 0000000000..5916cf9eec --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_ci_stage.py @@ -0,0 +1,36 @@ +# 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. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class SyntheticsTestResultCIStage(ModelNormal): + @cached_property + def openapi_types(_): + return { + "name": (str,), + } + + attribute_map = { + "name": "name", + } + + def __init__(self_, name: Union[str, UnsetType] = unset, **kwargs): + """ + Details of the CI stage. + + :param name: Stage name. + :type name: str, optional + """ + if name is not unset: + kwargs["name"] = name + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_data.py b/src/datadog_api_client/v2/model/synthetics_test_result_data.py new file mode 100644 index 0000000000..58501fae1e --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_data.py @@ -0,0 +1,74 @@ +# 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. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_test_result_attributes import SyntheticsTestResultAttributes + from datadog_api_client.v2.model.synthetics_test_result_relationships import SyntheticsTestResultRelationships + from datadog_api_client.v2.model.synthetics_test_result_type import SyntheticsTestResultType + + +class SyntheticsTestResultData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_test_result_attributes import SyntheticsTestResultAttributes + from datadog_api_client.v2.model.synthetics_test_result_relationships import SyntheticsTestResultRelationships + from datadog_api_client.v2.model.synthetics_test_result_type import SyntheticsTestResultType + + return { + "attributes": (SyntheticsTestResultAttributes,), + "id": (str,), + "relationships": (SyntheticsTestResultRelationships,), + "type": (SyntheticsTestResultType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "relationships": "relationships", + "type": "type", + } + + def __init__( + self_, + attributes: Union[SyntheticsTestResultAttributes, UnsetType] = unset, + id: Union[str, UnsetType] = unset, + relationships: Union[SyntheticsTestResultRelationships, UnsetType] = unset, + type: Union[SyntheticsTestResultType, UnsetType] = unset, + **kwargs, + ): + """ + Wrapper object for a Synthetic test result. + + :param attributes: Attributes of a Synthetic test result. + :type attributes: SyntheticsTestResultAttributes, optional + + :param id: The result ID. + :type id: str, optional + + :param relationships: Relationships for a Synthetic test result. + :type relationships: SyntheticsTestResultRelationships, optional + + :param type: Type of the Synthetic test result resource, ``result``. + :type type: SyntheticsTestResultType, optional + """ + if attributes is not unset: + kwargs["attributes"] = attributes + if id is not unset: + kwargs["id"] = id + if relationships is not unset: + kwargs["relationships"] = relationships + if type is not unset: + kwargs["type"] = type + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_detail.py b/src/datadog_api_client/v2/model/synthetics_test_result_detail.py new file mode 100644 index 0000000000..2ee2bd0a4b --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_detail.py @@ -0,0 +1,421 @@ +# 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. +from __future__ import annotations + +from typing import Any, Dict, List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + date, + datetime, + none_type, + unset, + UnsetType, + UUID, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_test_result_assertion_result import SyntheticsTestResultAssertionResult + from datadog_api_client.v2.model.synthetics_test_result_bucket_keys import SyntheticsTestResultBucketKeys + from datadog_api_client.v2.model.synthetics_test_result_certificate import SyntheticsTestResultCertificate + from datadog_api_client.v2.model.synthetics_test_result_dns_resolution import SyntheticsTestResultDnsResolution + from datadog_api_client.v2.model.synthetics_test_result_failure import SyntheticsTestResultFailure + from datadog_api_client.v2.model.synthetics_test_result_handshake import SyntheticsTestResultHandshake + from datadog_api_client.v2.model.synthetics_test_result_netpath import SyntheticsTestResultNetpath + from datadog_api_client.v2.model.synthetics_test_result_netstats import SyntheticsTestResultNetstats + from datadog_api_client.v2.model.synthetics_test_result_ocsp_response import SyntheticsTestResultOCSPResponse + from datadog_api_client.v2.model.synthetics_test_result_traceroute_hop import SyntheticsTestResultTracerouteHop + from datadog_api_client.v2.model.synthetics_test_result_request_info import SyntheticsTestResultRequestInfo + from datadog_api_client.v2.model.synthetics_test_result_response_info import SyntheticsTestResultResponseInfo + from datadog_api_client.v2.model.synthetics_test_result_run_type import SyntheticsTestResultRunType + from datadog_api_client.v2.model.synthetics_test_result_status import SyntheticsTestResultStatus + from datadog_api_client.v2.model.synthetics_test_result_step import SyntheticsTestResultStep + from datadog_api_client.v2.model.synthetics_test_result_trace import SyntheticsTestResultTrace + from datadog_api_client.v2.model.synthetics_test_result_turn import SyntheticsTestResultTurn + from datadog_api_client.v2.model.synthetics_test_result_variables import SyntheticsTestResultVariables + + +class SyntheticsTestResultDetail(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_test_result_assertion_result import ( + SyntheticsTestResultAssertionResult, + ) + from datadog_api_client.v2.model.synthetics_test_result_bucket_keys import SyntheticsTestResultBucketKeys + from datadog_api_client.v2.model.synthetics_test_result_certificate import SyntheticsTestResultCertificate + from datadog_api_client.v2.model.synthetics_test_result_dns_resolution import SyntheticsTestResultDnsResolution + from datadog_api_client.v2.model.synthetics_test_result_failure import SyntheticsTestResultFailure + from datadog_api_client.v2.model.synthetics_test_result_handshake import SyntheticsTestResultHandshake + from datadog_api_client.v2.model.synthetics_test_result_netpath import SyntheticsTestResultNetpath + from datadog_api_client.v2.model.synthetics_test_result_netstats import SyntheticsTestResultNetstats + from datadog_api_client.v2.model.synthetics_test_result_ocsp_response import SyntheticsTestResultOCSPResponse + from datadog_api_client.v2.model.synthetics_test_result_traceroute_hop import SyntheticsTestResultTracerouteHop + from datadog_api_client.v2.model.synthetics_test_result_request_info import SyntheticsTestResultRequestInfo + from datadog_api_client.v2.model.synthetics_test_result_response_info import SyntheticsTestResultResponseInfo + from datadog_api_client.v2.model.synthetics_test_result_run_type import SyntheticsTestResultRunType + from datadog_api_client.v2.model.synthetics_test_result_status import SyntheticsTestResultStatus + from datadog_api_client.v2.model.synthetics_test_result_step import SyntheticsTestResultStep + from datadog_api_client.v2.model.synthetics_test_result_trace import SyntheticsTestResultTrace + from datadog_api_client.v2.model.synthetics_test_result_turn import SyntheticsTestResultTurn + from datadog_api_client.v2.model.synthetics_test_result_variables import SyntheticsTestResultVariables + + return { + "assertions": ([SyntheticsTestResultAssertionResult],), + "bucket_keys": (SyntheticsTestResultBucketKeys,), + "call_type": (str,), + "cert": (SyntheticsTestResultCertificate,), + "compressed_json_descriptor": (str,), + "compressed_steps": (str,), + "connection_outcome": (str,), + "dns_resolution": (SyntheticsTestResultDnsResolution,), + "duration": (float,), + "exited_on_step_success": (bool,), + "failure": (SyntheticsTestResultFailure,), + "finished_at": (int,), + "handshake": (SyntheticsTestResultHandshake,), + "id": (str,), + "initial_id": (str,), + "is_fast_retry": (bool,), + "is_last_retry": (bool,), + "netpath": (SyntheticsTestResultNetpath,), + "netstats": (SyntheticsTestResultNetstats,), + "ocsp": (SyntheticsTestResultOCSPResponse,), + "ping": (SyntheticsTestResultTracerouteHop,), + "received_email_count": (int,), + "received_message": (str,), + "request": (SyntheticsTestResultRequestInfo,), + "resolved_ip": (str,), + "response": (SyntheticsTestResultResponseInfo,), + "run_type": (SyntheticsTestResultRunType,), + "sent_message": (str,), + "start_url": (str,), + "started_at": (int,), + "status": (SyntheticsTestResultStatus,), + "steps": ([SyntheticsTestResultStep],), + "time_to_interactive": (int,), + "timings": ( + { + str: ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + UUID, + none_type, + ) + }, + ), + "trace": (SyntheticsTestResultTrace,), + "traceroute": ([SyntheticsTestResultTracerouteHop],), + "triggered_at": (int,), + "tunnel": (bool,), + "turns": ([SyntheticsTestResultTurn],), + "unhealthy": (bool,), + "variables": (SyntheticsTestResultVariables,), + } + + attribute_map = { + "assertions": "assertions", + "bucket_keys": "bucket_keys", + "call_type": "call_type", + "cert": "cert", + "compressed_json_descriptor": "compressed_json_descriptor", + "compressed_steps": "compressed_steps", + "connection_outcome": "connection_outcome", + "dns_resolution": "dns_resolution", + "duration": "duration", + "exited_on_step_success": "exited_on_step_success", + "failure": "failure", + "finished_at": "finished_at", + "handshake": "handshake", + "id": "id", + "initial_id": "initial_id", + "is_fast_retry": "is_fast_retry", + "is_last_retry": "is_last_retry", + "netpath": "netpath", + "netstats": "netstats", + "ocsp": "ocsp", + "ping": "ping", + "received_email_count": "received_email_count", + "received_message": "received_message", + "request": "request", + "resolved_ip": "resolved_ip", + "response": "response", + "run_type": "run_type", + "sent_message": "sent_message", + "start_url": "start_url", + "started_at": "started_at", + "status": "status", + "steps": "steps", + "time_to_interactive": "time_to_interactive", + "timings": "timings", + "trace": "trace", + "traceroute": "traceroute", + "triggered_at": "triggered_at", + "tunnel": "tunnel", + "turns": "turns", + "unhealthy": "unhealthy", + "variables": "variables", + } + + def __init__( + self_, + assertions: Union[List[SyntheticsTestResultAssertionResult], UnsetType] = unset, + bucket_keys: Union[SyntheticsTestResultBucketKeys, UnsetType] = unset, + call_type: Union[str, UnsetType] = unset, + cert: Union[SyntheticsTestResultCertificate, UnsetType] = unset, + compressed_json_descriptor: Union[str, UnsetType] = unset, + compressed_steps: Union[str, UnsetType] = unset, + connection_outcome: Union[str, UnsetType] = unset, + dns_resolution: Union[SyntheticsTestResultDnsResolution, UnsetType] = unset, + duration: Union[float, UnsetType] = unset, + exited_on_step_success: Union[bool, UnsetType] = unset, + failure: Union[SyntheticsTestResultFailure, UnsetType] = unset, + finished_at: Union[int, UnsetType] = unset, + handshake: Union[SyntheticsTestResultHandshake, UnsetType] = unset, + id: Union[str, UnsetType] = unset, + initial_id: Union[str, UnsetType] = unset, + is_fast_retry: Union[bool, UnsetType] = unset, + is_last_retry: Union[bool, UnsetType] = unset, + netpath: Union[SyntheticsTestResultNetpath, UnsetType] = unset, + netstats: Union[SyntheticsTestResultNetstats, UnsetType] = unset, + ocsp: Union[SyntheticsTestResultOCSPResponse, UnsetType] = unset, + ping: Union[SyntheticsTestResultTracerouteHop, UnsetType] = unset, + received_email_count: Union[int, UnsetType] = unset, + received_message: Union[str, UnsetType] = unset, + request: Union[SyntheticsTestResultRequestInfo, UnsetType] = unset, + resolved_ip: Union[str, UnsetType] = unset, + response: Union[SyntheticsTestResultResponseInfo, UnsetType] = unset, + run_type: Union[SyntheticsTestResultRunType, UnsetType] = unset, + sent_message: Union[str, UnsetType] = unset, + start_url: Union[str, UnsetType] = unset, + started_at: Union[int, UnsetType] = unset, + status: Union[SyntheticsTestResultStatus, UnsetType] = unset, + steps: Union[List[SyntheticsTestResultStep], UnsetType] = unset, + time_to_interactive: Union[int, UnsetType] = unset, + timings: Union[Dict[str, Any], UnsetType] = unset, + trace: Union[SyntheticsTestResultTrace, UnsetType] = unset, + traceroute: Union[List[SyntheticsTestResultTracerouteHop], UnsetType] = unset, + triggered_at: Union[int, UnsetType] = unset, + tunnel: Union[bool, UnsetType] = unset, + turns: Union[List[SyntheticsTestResultTurn], UnsetType] = unset, + unhealthy: Union[bool, UnsetType] = unset, + variables: Union[SyntheticsTestResultVariables, UnsetType] = unset, + **kwargs, + ): + """ + Full result details for a Synthetic test execution. + + :param assertions: Assertion results produced by the test. + :type assertions: [SyntheticsTestResultAssertionResult], optional + + :param bucket_keys: Storage bucket keys for artifacts produced during a step or test. + :type bucket_keys: SyntheticsTestResultBucketKeys, optional + + :param call_type: gRPC call type (for example, ``unary`` , ``healthCheck`` , or ``reflection`` ). + :type call_type: str, optional + + :param cert: SSL/TLS certificate information returned from an SSL test. + :type cert: SyntheticsTestResultCertificate, optional + + :param compressed_json_descriptor: Compressed JSON descriptor for the test (internal format). + :type compressed_json_descriptor: str, optional + + :param compressed_steps: Compressed representation of the test steps (internal format). + :type compressed_steps: str, optional + + :param connection_outcome: Outcome of the connection attempt (for example, ``established`` , ``refused`` ). + :type connection_outcome: str, optional + + :param dns_resolution: DNS resolution details recorded during the test execution. + :type dns_resolution: SyntheticsTestResultDnsResolution, optional + + :param duration: Duration of the test execution (in milliseconds). + :type duration: float, optional + + :param exited_on_step_success: Whether the test exited early because a step marked with ``exitIfSucceed`` passed. + :type exited_on_step_success: bool, optional + + :param failure: Details about the failure of a Synthetic test. + :type failure: SyntheticsTestResultFailure, optional + + :param finished_at: Timestamp of when the test finished (in milliseconds). + :type finished_at: int, optional + + :param handshake: Handshake request and response for protocol-level tests. + :type handshake: SyntheticsTestResultHandshake, optional + + :param id: The unique identifier for this result. + :type id: str, optional + + :param initial_id: The initial result ID before any retries. + :type initial_id: str, optional + + :param is_fast_retry: Whether this result is from a fast retry. + :type is_fast_retry: bool, optional + + :param is_last_retry: Whether this result is from the last retry. + :type is_last_retry: bool, optional + + :param netpath: Network Path test result capturing the path between source and destination. + :type netpath: SyntheticsTestResultNetpath, optional + + :param netstats: Aggregated network statistics from the test execution. + :type netstats: SyntheticsTestResultNetstats, optional + + :param ocsp: OCSP response received while validating a certificate. + :type ocsp: SyntheticsTestResultOCSPResponse, optional + + :param ping: A network probe result, used for traceroute hops and ping summaries. + :type ping: SyntheticsTestResultTracerouteHop, optional + + :param received_email_count: Number of emails received during the test (email tests). + :type received_email_count: int, optional + + :param received_message: Message received from the target (for WebSocket/TCP/UDP tests). + :type received_message: str, optional + + :param request: Details of the outgoing request made during the test execution. + :type request: SyntheticsTestResultRequestInfo, optional + + :param resolved_ip: IP address resolved for the target host. + :type resolved_ip: str, optional + + :param response: Details of the response received during the test execution. + :type response: SyntheticsTestResultResponseInfo, optional + + :param run_type: The type of run for a Synthetic test result. + :type run_type: SyntheticsTestResultRunType, optional + + :param sent_message: Message sent to the target (for WebSocket/TCP/UDP tests). + :type sent_message: str, optional + + :param start_url: Start URL for the test (browser tests). + :type start_url: str, optional + + :param started_at: Timestamp of when the test started (in milliseconds). + :type started_at: int, optional + + :param status: Status of a Synthetic test result. + :type status: SyntheticsTestResultStatus, optional + + :param steps: Step results (for browser, mobile, and multistep API tests). + :type steps: [SyntheticsTestResultStep], optional + + :param time_to_interactive: Time to interactive in milliseconds (browser tests). + :type time_to_interactive: int, optional + + :param timings: Timing breakdown of the test request phases (for example, DNS, TCP, TLS, first byte). + :type timings: {str: (bool, date, datetime, dict, float, int, list, str, UUID, none_type,)}, optional + + :param trace: Trace identifiers associated with a Synthetic test result. + :type trace: SyntheticsTestResultTrace, optional + + :param traceroute: Traceroute hop results (for network tests). + :type traceroute: [SyntheticsTestResultTracerouteHop], optional + + :param triggered_at: Timestamp of when the test was triggered (in milliseconds). + :type triggered_at: int, optional + + :param tunnel: Whether the test was executed through a tunnel. + :type tunnel: bool, optional + + :param turns: Turns executed by a goal-based browser test. + :type turns: [SyntheticsTestResultTurn], optional + + :param unhealthy: Whether the test runner was unhealthy at the time of execution. + :type unhealthy: bool, optional + + :param variables: Variables captured during a test step. + :type variables: SyntheticsTestResultVariables, optional + """ + if assertions is not unset: + kwargs["assertions"] = assertions + if bucket_keys is not unset: + kwargs["bucket_keys"] = bucket_keys + if call_type is not unset: + kwargs["call_type"] = call_type + if cert is not unset: + kwargs["cert"] = cert + if compressed_json_descriptor is not unset: + kwargs["compressed_json_descriptor"] = compressed_json_descriptor + if compressed_steps is not unset: + kwargs["compressed_steps"] = compressed_steps + if connection_outcome is not unset: + kwargs["connection_outcome"] = connection_outcome + if dns_resolution is not unset: + kwargs["dns_resolution"] = dns_resolution + if duration is not unset: + kwargs["duration"] = duration + if exited_on_step_success is not unset: + kwargs["exited_on_step_success"] = exited_on_step_success + if failure is not unset: + kwargs["failure"] = failure + if finished_at is not unset: + kwargs["finished_at"] = finished_at + if handshake is not unset: + kwargs["handshake"] = handshake + if id is not unset: + kwargs["id"] = id + if initial_id is not unset: + kwargs["initial_id"] = initial_id + if is_fast_retry is not unset: + kwargs["is_fast_retry"] = is_fast_retry + if is_last_retry is not unset: + kwargs["is_last_retry"] = is_last_retry + if netpath is not unset: + kwargs["netpath"] = netpath + if netstats is not unset: + kwargs["netstats"] = netstats + if ocsp is not unset: + kwargs["ocsp"] = ocsp + if ping is not unset: + kwargs["ping"] = ping + if received_email_count is not unset: + kwargs["received_email_count"] = received_email_count + if received_message is not unset: + kwargs["received_message"] = received_message + if request is not unset: + kwargs["request"] = request + if resolved_ip is not unset: + kwargs["resolved_ip"] = resolved_ip + if response is not unset: + kwargs["response"] = response + if run_type is not unset: + kwargs["run_type"] = run_type + if sent_message is not unset: + kwargs["sent_message"] = sent_message + if start_url is not unset: + kwargs["start_url"] = start_url + if started_at is not unset: + kwargs["started_at"] = started_at + if status is not unset: + kwargs["status"] = status + if steps is not unset: + kwargs["steps"] = steps + if time_to_interactive is not unset: + kwargs["time_to_interactive"] = time_to_interactive + if timings is not unset: + kwargs["timings"] = timings + if trace is not unset: + kwargs["trace"] = trace + if traceroute is not unset: + kwargs["traceroute"] = traceroute + if triggered_at is not unset: + kwargs["triggered_at"] = triggered_at + if tunnel is not unset: + kwargs["tunnel"] = tunnel + if turns is not unset: + kwargs["turns"] = turns + if unhealthy is not unset: + kwargs["unhealthy"] = unhealthy + if variables is not unset: + kwargs["variables"] = variables + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_device.py b/src/datadog_api_client/v2/model/synthetics_test_result_device.py new file mode 100644 index 0000000000..94433483fe --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_device.py @@ -0,0 +1,96 @@ +# 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. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_test_result_device_browser import SyntheticsTestResultDeviceBrowser + from datadog_api_client.v2.model.synthetics_test_result_device_platform import SyntheticsTestResultDevicePlatform + from datadog_api_client.v2.model.synthetics_test_result_device_resolution import ( + SyntheticsTestResultDeviceResolution, + ) + + +class SyntheticsTestResultDevice(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_test_result_device_browser import SyntheticsTestResultDeviceBrowser + from datadog_api_client.v2.model.synthetics_test_result_device_platform import ( + SyntheticsTestResultDevicePlatform, + ) + from datadog_api_client.v2.model.synthetics_test_result_device_resolution import ( + SyntheticsTestResultDeviceResolution, + ) + + return { + "browser": (SyntheticsTestResultDeviceBrowser,), + "id": (str,), + "name": (str,), + "platform": (SyntheticsTestResultDevicePlatform,), + "resolution": (SyntheticsTestResultDeviceResolution,), + "type": (str,), + } + + attribute_map = { + "browser": "browser", + "id": "id", + "name": "name", + "platform": "platform", + "resolution": "resolution", + "type": "type", + } + + def __init__( + self_, + browser: Union[SyntheticsTestResultDeviceBrowser, UnsetType] = unset, + id: Union[str, UnsetType] = unset, + name: Union[str, UnsetType] = unset, + platform: Union[SyntheticsTestResultDevicePlatform, UnsetType] = unset, + resolution: Union[SyntheticsTestResultDeviceResolution, UnsetType] = unset, + type: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Device information for the test result (browser and mobile tests). + + :param browser: Browser information for the device used to run the test. + :type browser: SyntheticsTestResultDeviceBrowser, optional + + :param id: Device identifier. + :type id: str, optional + + :param name: Device name. + :type name: str, optional + + :param platform: Platform information for the device used to run the test. + :type platform: SyntheticsTestResultDevicePlatform, optional + + :param resolution: Screen resolution of the device used to run the test. + :type resolution: SyntheticsTestResultDeviceResolution, optional + + :param type: Device type. + :type type: str, optional + """ + if browser is not unset: + kwargs["browser"] = browser + if id is not unset: + kwargs["id"] = id + if name is not unset: + kwargs["name"] = name + if platform is not unset: + kwargs["platform"] = platform + if resolution is not unset: + kwargs["resolution"] = resolution + if type is not unset: + kwargs["type"] = type + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_device_browser.py b/src/datadog_api_client/v2/model/synthetics_test_result_device_browser.py new file mode 100644 index 0000000000..83836c1071 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_device_browser.py @@ -0,0 +1,56 @@ +# 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. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class SyntheticsTestResultDeviceBrowser(ModelNormal): + @cached_property + def openapi_types(_): + return { + "type": (str,), + "user_agent": (str,), + "version": (str,), + } + + attribute_map = { + "type": "type", + "user_agent": "user_agent", + "version": "version", + } + + def __init__( + self_, + type: Union[str, UnsetType] = unset, + user_agent: Union[str, UnsetType] = unset, + version: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Browser information for the device used to run the test. + + :param type: Browser type (for example, ``chrome`` , ``firefox`` ). + :type type: str, optional + + :param user_agent: User agent string reported by the browser. + :type user_agent: str, optional + + :param version: Browser version. + :type version: str, optional + """ + if type is not unset: + kwargs["type"] = type + if user_agent is not unset: + kwargs["user_agent"] = user_agent + if version is not unset: + kwargs["version"] = version + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_device_platform.py b/src/datadog_api_client/v2/model/synthetics_test_result_device_platform.py new file mode 100644 index 0000000000..3637b3b69d --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_device_platform.py @@ -0,0 +1,43 @@ +# 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. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class SyntheticsTestResultDevicePlatform(ModelNormal): + @cached_property + def openapi_types(_): + return { + "name": (str,), + "version": (str,), + } + + attribute_map = { + "name": "name", + "version": "version", + } + + def __init__(self_, name: Union[str, UnsetType] = unset, version: Union[str, UnsetType] = unset, **kwargs): + """ + Platform information for the device used to run the test. + + :param name: Platform name (for example, ``linux`` , ``macos`` ). + :type name: str, optional + + :param version: Platform version. + :type version: str, optional + """ + if name is not unset: + kwargs["name"] = name + if version is not unset: + kwargs["version"] = version + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_device_resolution.py b/src/datadog_api_client/v2/model/synthetics_test_result_device_resolution.py new file mode 100644 index 0000000000..7f7806d369 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_device_resolution.py @@ -0,0 +1,56 @@ +# 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. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class SyntheticsTestResultDeviceResolution(ModelNormal): + @cached_property + def openapi_types(_): + return { + "height": (int,), + "pixel_ratio": (float,), + "width": (int,), + } + + attribute_map = { + "height": "height", + "pixel_ratio": "pixel_ratio", + "width": "width", + } + + def __init__( + self_, + height: Union[int, UnsetType] = unset, + pixel_ratio: Union[float, UnsetType] = unset, + width: Union[int, UnsetType] = unset, + **kwargs, + ): + """ + Screen resolution of the device used to run the test. + + :param height: Viewport height in pixels. + :type height: int, optional + + :param pixel_ratio: Device pixel ratio. + :type pixel_ratio: float, optional + + :param width: Viewport width in pixels. + :type width: int, optional + """ + if height is not unset: + kwargs["height"] = height + if pixel_ratio is not unset: + kwargs["pixel_ratio"] = pixel_ratio + if width is not unset: + kwargs["width"] = width + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_dns_record.py b/src/datadog_api_client/v2/model/synthetics_test_result_dns_record.py new file mode 100644 index 0000000000..f95598403e --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_dns_record.py @@ -0,0 +1,43 @@ +# 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. +from __future__ import annotations + +from typing import List, Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class SyntheticsTestResultDnsRecord(ModelNormal): + @cached_property + def openapi_types(_): + return { + "type": (str,), + "values": ([str],), + } + + attribute_map = { + "type": "type", + "values": "values", + } + + def __init__(self_, type: Union[str, UnsetType] = unset, values: Union[List[str], UnsetType] = unset, **kwargs): + """ + A DNS record returned in a DNS test response. + + :param type: DNS record type (for example, ``A`` , ``AAAA`` , ``CNAME`` ). + :type type: str, optional + + :param values: Values associated with the DNS record. + :type values: [str], optional + """ + if type is not unset: + kwargs["type"] = type + if values is not unset: + kwargs["values"] = values + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_dns_resolution.py b/src/datadog_api_client/v2/model/synthetics_test_result_dns_resolution.py new file mode 100644 index 0000000000..88e5165be2 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_dns_resolution.py @@ -0,0 +1,74 @@ +# 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. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_test_result_dns_resolution_attempt import ( + SyntheticsTestResultDnsResolutionAttempt, + ) + + +class SyntheticsTestResultDnsResolution(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_test_result_dns_resolution_attempt import ( + SyntheticsTestResultDnsResolutionAttempt, + ) + + return { + "attempts": ([SyntheticsTestResultDnsResolutionAttempt],), + "resolved_ip": (str,), + "resolved_port": (str,), + "server": (str,), + } + + attribute_map = { + "attempts": "attempts", + "resolved_ip": "resolved_ip", + "resolved_port": "resolved_port", + "server": "server", + } + + def __init__( + self_, + attempts: Union[List[SyntheticsTestResultDnsResolutionAttempt], UnsetType] = unset, + resolved_ip: Union[str, UnsetType] = unset, + resolved_port: Union[str, UnsetType] = unset, + server: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + DNS resolution details recorded during the test execution. + + :param attempts: DNS resolution attempts made during the test. + :type attempts: [SyntheticsTestResultDnsResolutionAttempt], optional + + :param resolved_ip: Resolved IP address for the target host. + :type resolved_ip: str, optional + + :param resolved_port: Resolved port for the target service. + :type resolved_port: str, optional + + :param server: DNS server used for the resolution. + :type server: str, optional + """ + if attempts is not unset: + kwargs["attempts"] = attempts + if resolved_ip is not unset: + kwargs["resolved_ip"] = resolved_ip + if resolved_port is not unset: + kwargs["resolved_port"] = resolved_port + if server is not unset: + kwargs["server"] = server + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_fast_test_assertion_result.py b/src/datadog_api_client/v2/model/synthetics_test_result_dns_resolution_attempt.py similarity index 63% rename from src/datadog_api_client/v2/model/synthetics_fast_test_assertion_result.py rename to src/datadog_api_client/v2/model/synthetics_test_result_dns_resolution_attempt.py index 262883c01c..446ea3a559 100644 --- a/src/datadog_api_client/v2/model/synthetics_fast_test_assertion_result.py +++ b/src/datadog_api_client/v2/model/synthetics_test_result_dns_resolution_attempt.py @@ -6,12 +6,17 @@ from datadog_api_client.model_utils import ( ModelNormal, + cached_property, ) -class SyntheticsFastTestAssertionResult(ModelNormal): +class SyntheticsTestResultDnsResolutionAttempt(ModelNormal): + @cached_property + def additional_properties_type(_): + return (str,) + def __init__(self_, **kwargs): """ - Result of a single assertion evaluated during a fast test run. + A single DNS resolution attempt. Keys are provider-specific attempt fields. """ super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_duration.py b/src/datadog_api_client/v2/model/synthetics_test_result_duration.py new file mode 100644 index 0000000000..1573502a49 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_duration.py @@ -0,0 +1,43 @@ +# 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. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class SyntheticsTestResultDuration(ModelNormal): + @cached_property + def openapi_types(_): + return { + "has_duration": (bool,), + "value": (int,), + } + + attribute_map = { + "has_duration": "has_duration", + "value": "value", + } + + def __init__(self_, has_duration: Union[bool, UnsetType] = unset, value: Union[int, UnsetType] = unset, **kwargs): + """ + Total duration of a Synthetic test execution. + + :param has_duration: Whether a duration was recorded for this execution. + :type has_duration: bool, optional + + :param value: Duration value in milliseconds. + :type value: int, optional + """ + if has_duration is not unset: + kwargs["has_duration"] = has_duration + if value is not unset: + kwargs["value"] = value + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_execution_info.py b/src/datadog_api_client/v2/model/synthetics_test_result_execution_info.py new file mode 100644 index 0000000000..2056c6e344 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_execution_info.py @@ -0,0 +1,105 @@ +# 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. +from __future__ import annotations + +from typing import Any, Dict, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + date, + datetime, + none_type, + unset, + UnsetType, + UUID, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_test_result_duration import SyntheticsTestResultDuration + + +class SyntheticsTestResultExecutionInfo(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_test_result_duration import SyntheticsTestResultDuration + + return { + "duration": (SyntheticsTestResultDuration,), + "error_message": (str,), + "is_fast_retry": (bool,), + "timings": ( + { + str: ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + UUID, + none_type, + ) + }, + ), + "tunnel": (bool,), + "unhealthy": (bool,), + } + + attribute_map = { + "duration": "duration", + "error_message": "error_message", + "is_fast_retry": "is_fast_retry", + "timings": "timings", + "tunnel": "tunnel", + "unhealthy": "unhealthy", + } + + def __init__( + self_, + duration: Union[SyntheticsTestResultDuration, UnsetType] = unset, + error_message: Union[str, UnsetType] = unset, + is_fast_retry: Union[bool, UnsetType] = unset, + timings: Union[Dict[str, Any], UnsetType] = unset, + tunnel: Union[bool, UnsetType] = unset, + unhealthy: Union[bool, UnsetType] = unset, + **kwargs, + ): + """ + Execution details for a Synthetic test result. + + :param duration: Total duration of a Synthetic test execution. + :type duration: SyntheticsTestResultDuration, optional + + :param error_message: Error message if the execution encountered an issue. + :type error_message: str, optional + + :param is_fast_retry: Whether this result is from a fast retry. + :type is_fast_retry: bool, optional + + :param timings: Timing breakdown of the test execution in milliseconds. + :type timings: {str: (bool, date, datetime, dict, float, int, list, str, UUID, none_type,)}, optional + + :param tunnel: Whether the test was executed through a tunnel. + :type tunnel: bool, optional + + :param unhealthy: Whether the location was unhealthy during execution. + :type unhealthy: bool, optional + """ + if duration is not unset: + kwargs["duration"] = duration + if error_message is not unset: + kwargs["error_message"] = error_message + if is_fast_retry is not unset: + kwargs["is_fast_retry"] = is_fast_retry + if timings is not unset: + kwargs["timings"] = timings + if tunnel is not unset: + kwargs["tunnel"] = tunnel + if unhealthy is not unset: + kwargs["unhealthy"] = unhealthy + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_failure.py b/src/datadog_api_client/v2/model/synthetics_test_result_failure.py new file mode 100644 index 0000000000..0490984ac4 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_failure.py @@ -0,0 +1,64 @@ +# 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. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class SyntheticsTestResultFailure(ModelNormal): + @cached_property + def openapi_types(_): + return { + "code": (str,), + "internal_code": (str,), + "internal_message": (str,), + "message": (str,), + } + + attribute_map = { + "code": "code", + "internal_code": "internal_code", + "internal_message": "internal_message", + "message": "message", + } + + def __init__( + self_, + code: Union[str, UnsetType] = unset, + internal_code: Union[str, UnsetType] = unset, + internal_message: Union[str, UnsetType] = unset, + message: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Details about the failure of a Synthetic test. + + :param code: Error code for the failure. + :type code: str, optional + + :param internal_code: Internal error code used for debugging. + :type internal_code: str, optional + + :param internal_message: Internal error message used for debugging. + :type internal_message: str, optional + + :param message: Error message for the failure. + :type message: str, optional + """ + if code is not unset: + kwargs["code"] = code + if internal_code is not unset: + kwargs["internal_code"] = internal_code + if internal_message is not unset: + kwargs["internal_message"] = internal_message + if message is not unset: + kwargs["message"] = message + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_file_ref.py b/src/datadog_api_client/v2/model/synthetics_test_result_file_ref.py new file mode 100644 index 0000000000..1312015ecc --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_file_ref.py @@ -0,0 +1,72 @@ +# 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. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class SyntheticsTestResultFileRef(ModelNormal): + @cached_property + def openapi_types(_): + return { + "bucket_key": (str,), + "encoding": (str,), + "name": (str,), + "size": (int,), + "type": (str,), + } + + attribute_map = { + "bucket_key": "bucket_key", + "encoding": "encoding", + "name": "name", + "size": "size", + "type": "type", + } + + def __init__( + self_, + bucket_key: Union[str, UnsetType] = unset, + encoding: Union[str, UnsetType] = unset, + name: Union[str, UnsetType] = unset, + size: Union[int, UnsetType] = unset, + type: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Reference to a file attached to a Synthetic test request. + + :param bucket_key: Storage bucket key where the file is stored. + :type bucket_key: str, optional + + :param encoding: Encoding of the file contents. + :type encoding: str, optional + + :param name: File name. + :type name: str, optional + + :param size: File size in bytes. + :type size: int, optional + + :param type: File MIME type. + :type type: str, optional + """ + if bucket_key is not unset: + kwargs["bucket_key"] = bucket_key + if encoding is not unset: + kwargs["encoding"] = encoding + if name is not unset: + kwargs["name"] = name + if size is not unset: + kwargs["size"] = size + if type is not unset: + kwargs["type"] = type + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_git.py b/src/datadog_api_client/v2/model/synthetics_test_result_git.py new file mode 100644 index 0000000000..f7739c325e --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_git.py @@ -0,0 +1,62 @@ +# 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. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_test_result_git_commit import SyntheticsTestResultGitCommit + + +class SyntheticsTestResultGit(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_test_result_git_commit import SyntheticsTestResultGitCommit + + return { + "branch": (str,), + "commit": (SyntheticsTestResultGitCommit,), + "repository_url": (str,), + } + + attribute_map = { + "branch": "branch", + "commit": "commit", + "repository_url": "repository_url", + } + + def __init__( + self_, + branch: Union[str, UnsetType] = unset, + commit: Union[SyntheticsTestResultGitCommit, UnsetType] = unset, + repository_url: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Git information associated with the test result. + + :param branch: Git branch name. + :type branch: str, optional + + :param commit: Details of the Git commit associated with the test result. + :type commit: SyntheticsTestResultGitCommit, optional + + :param repository_url: Git repository URL. + :type repository_url: str, optional + """ + if branch is not unset: + kwargs["branch"] = branch + if commit is not unset: + kwargs["commit"] = commit + if repository_url is not unset: + kwargs["repository_url"] = repository_url + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_git_commit.py b/src/datadog_api_client/v2/model/synthetics_test_result_git_commit.py new file mode 100644 index 0000000000..211e340b6e --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_git_commit.py @@ -0,0 +1,78 @@ +# 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. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_test_result_git_user import SyntheticsTestResultGitUser + + +class SyntheticsTestResultGitCommit(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_test_result_git_user import SyntheticsTestResultGitUser + + return { + "author": (SyntheticsTestResultGitUser,), + "committer": (SyntheticsTestResultGitUser,), + "message": (str,), + "sha": (str,), + "url": (str,), + } + + attribute_map = { + "author": "author", + "committer": "committer", + "message": "message", + "sha": "sha", + "url": "url", + } + + def __init__( + self_, + author: Union[SyntheticsTestResultGitUser, UnsetType] = unset, + committer: Union[SyntheticsTestResultGitUser, UnsetType] = unset, + message: Union[str, UnsetType] = unset, + sha: Union[str, UnsetType] = unset, + url: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Details of the Git commit associated with the test result. + + :param author: A Git user (author or committer). + :type author: SyntheticsTestResultGitUser, optional + + :param committer: A Git user (author or committer). + :type committer: SyntheticsTestResultGitUser, optional + + :param message: Commit message. + :type message: str, optional + + :param sha: Commit SHA. + :type sha: str, optional + + :param url: URL of the commit. + :type url: str, optional + """ + if author is not unset: + kwargs["author"] = author + if committer is not unset: + kwargs["committer"] = committer + if message is not unset: + kwargs["message"] = message + if sha is not unset: + kwargs["sha"] = sha + if url is not unset: + kwargs["url"] = url + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_git_user.py b/src/datadog_api_client/v2/model/synthetics_test_result_git_user.py new file mode 100644 index 0000000000..b27dee3a57 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_git_user.py @@ -0,0 +1,56 @@ +# 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. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class SyntheticsTestResultGitUser(ModelNormal): + @cached_property + def openapi_types(_): + return { + "date": (str,), + "email": (str,), + "name": (str,), + } + + attribute_map = { + "date": "date", + "email": "email", + "name": "name", + } + + def __init__( + self_, + date: Union[str, UnsetType] = unset, + email: Union[str, UnsetType] = unset, + name: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + A Git user (author or committer). + + :param date: Timestamp of the commit action for this user. + :type date: str, optional + + :param email: Email address of the Git user. + :type email: str, optional + + :param name: Name of the Git user. + :type name: str, optional + """ + if date is not unset: + kwargs["date"] = date + if email is not unset: + kwargs["email"] = email + if name is not unset: + kwargs["name"] = name + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_handshake.py b/src/datadog_api_client/v2/model/synthetics_test_result_handshake.py new file mode 100644 index 0000000000..26361a95c7 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_handshake.py @@ -0,0 +1,56 @@ +# 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. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_test_result_request_info import SyntheticsTestResultRequestInfo + from datadog_api_client.v2.model.synthetics_test_result_response_info import SyntheticsTestResultResponseInfo + + +class SyntheticsTestResultHandshake(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_test_result_request_info import SyntheticsTestResultRequestInfo + from datadog_api_client.v2.model.synthetics_test_result_response_info import SyntheticsTestResultResponseInfo + + return { + "request": (SyntheticsTestResultRequestInfo,), + "response": (SyntheticsTestResultResponseInfo,), + } + + attribute_map = { + "request": "request", + "response": "response", + } + + def __init__( + self_, + request: Union[SyntheticsTestResultRequestInfo, UnsetType] = unset, + response: Union[SyntheticsTestResultResponseInfo, UnsetType] = unset, + **kwargs, + ): + """ + Handshake request and response for protocol-level tests. + + :param request: Details of the outgoing request made during the test execution. + :type request: SyntheticsTestResultRequestInfo, optional + + :param response: Details of the response received during the test execution. + :type response: SyntheticsTestResultResponseInfo, optional + """ + if request is not unset: + kwargs["request"] = request + if response is not unset: + kwargs["response"] = response + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_health_check.py b/src/datadog_api_client/v2/model/synthetics_test_result_health_check.py new file mode 100644 index 0000000000..1722890088 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_health_check.py @@ -0,0 +1,45 @@ +# 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. +from __future__ import annotations + +from typing import Dict, Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class SyntheticsTestResultHealthCheck(ModelNormal): + @cached_property + def openapi_types(_): + return { + "message": ({str: (str,)},), + "status": (int,), + } + + attribute_map = { + "message": "message", + "status": "status", + } + + def __init__( + self_, message: Union[Dict[str, str], UnsetType] = unset, status: Union[int, UnsetType] = unset, **kwargs + ): + """ + Health check information returned from a gRPC health check call. + + :param message: Raw health check message payload. + :type message: {str: (str,)}, optional + + :param status: Health check status code. + :type status: int, optional + """ + if message is not unset: + kwargs["message"] = message + if status is not unset: + kwargs["status"] = status + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_included_item.py b/src/datadog_api_client/v2/model/synthetics_test_result_included_item.py new file mode 100644 index 0000000000..506391675f --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_included_item.py @@ -0,0 +1,75 @@ +# 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. +from __future__ import annotations + +from typing import Any, Dict, Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + date, + datetime, + none_type, + unset, + UnsetType, + UUID, +) + + +class SyntheticsTestResultIncludedItem(ModelNormal): + @cached_property + def openapi_types(_): + return { + "attributes": ( + { + str: ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + UUID, + none_type, + ) + }, + ), + "id": (str,), + "type": (str,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + attributes: Union[Dict[str, Any], UnsetType] = unset, + id: Union[str, UnsetType] = unset, + type: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + An included related resource. + + :param attributes: Attributes of the included resource. + :type attributes: {str: (bool, date, datetime, dict, float, int, list, str, UUID, none_type,)}, optional + + :param id: ID of the included resource. + :type id: str, optional + + :param type: Type of the included resource. + :type type: str, optional + """ + if attributes is not unset: + kwargs["attributes"] = attributes + if id is not unset: + kwargs["id"] = id + if type is not unset: + kwargs["type"] = type + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_fast_test_result_location.py b/src/datadog_api_client/v2/model/synthetics_test_result_location.py similarity index 84% rename from src/datadog_api_client/v2/model/synthetics_fast_test_result_location.py rename to src/datadog_api_client/v2/model/synthetics_test_result_location.py index db2a1a5db2..0e25f5627e 100644 --- a/src/datadog_api_client/v2/model/synthetics_fast_test_result_location.py +++ b/src/datadog_api_client/v2/model/synthetics_test_result_location.py @@ -13,7 +13,7 @@ ) -class SyntheticsFastTestResultLocation(ModelNormal): +class SyntheticsTestResultLocation(ModelNormal): @cached_property def openapi_types(_): return { @@ -39,15 +39,15 @@ def __init__( **kwargs, ): """ - Location from which the fast test was executed. + Location information for a Synthetic test result. - :param id: ID of the location. + :param id: Identifier of the location. :type id: str, optional - :param name: Display name of the location. + :param name: Human-readable name of the location. :type name: str, optional - :param version: Agent version running at this location. + :param version: Version of the worker that ran the test. :type version: str, optional :param worker_id: Identifier of the specific worker that ran the test. diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_netpath.py b/src/datadog_api_client/v2/model/synthetics_test_result_netpath.py new file mode 100644 index 0000000000..73cd76dde3 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_netpath.py @@ -0,0 +1,112 @@ +# 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. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_test_result_netpath_destination import ( + SyntheticsTestResultNetpathDestination, + ) + from datadog_api_client.v2.model.synthetics_test_result_netpath_hop import SyntheticsTestResultNetpathHop + from datadog_api_client.v2.model.synthetics_test_result_netpath_endpoint import SyntheticsTestResultNetpathEndpoint + + +class SyntheticsTestResultNetpath(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_test_result_netpath_destination import ( + SyntheticsTestResultNetpathDestination, + ) + from datadog_api_client.v2.model.synthetics_test_result_netpath_hop import SyntheticsTestResultNetpathHop + from datadog_api_client.v2.model.synthetics_test_result_netpath_endpoint import ( + SyntheticsTestResultNetpathEndpoint, + ) + + return { + "destination": (SyntheticsTestResultNetpathDestination,), + "hops": ([SyntheticsTestResultNetpathHop],), + "origin": (str,), + "pathtrace_id": (str,), + "protocol": (str,), + "source": (SyntheticsTestResultNetpathEndpoint,), + "tags": ([str],), + "timestamp": (int,), + } + + attribute_map = { + "destination": "destination", + "hops": "hops", + "origin": "origin", + "pathtrace_id": "pathtrace_id", + "protocol": "protocol", + "source": "source", + "tags": "tags", + "timestamp": "timestamp", + } + + def __init__( + self_, + destination: Union[SyntheticsTestResultNetpathDestination, UnsetType] = unset, + hops: Union[List[SyntheticsTestResultNetpathHop], UnsetType] = unset, + origin: Union[str, UnsetType] = unset, + pathtrace_id: Union[str, UnsetType] = unset, + protocol: Union[str, UnsetType] = unset, + source: Union[SyntheticsTestResultNetpathEndpoint, UnsetType] = unset, + tags: Union[List[str], UnsetType] = unset, + timestamp: Union[int, UnsetType] = unset, + **kwargs, + ): + """ + Network Path test result capturing the path between source and destination. + + :param destination: Destination endpoint of a network path measurement. + :type destination: SyntheticsTestResultNetpathDestination, optional + + :param hops: Hops along the network path. + :type hops: [SyntheticsTestResultNetpathHop], optional + + :param origin: Origin of the network path (for example, probe source). + :type origin: str, optional + + :param pathtrace_id: Identifier of the path trace. + :type pathtrace_id: str, optional + + :param protocol: Protocol used for the path trace (for example, ``tcp`` , ``udp`` , ``icmp`` ). + :type protocol: str, optional + + :param source: Source endpoint of a network path measurement. + :type source: SyntheticsTestResultNetpathEndpoint, optional + + :param tags: Tags associated with the network path measurement. + :type tags: [str], optional + + :param timestamp: Unix timestamp (ms) of the network path measurement. + :type timestamp: int, optional + """ + if destination is not unset: + kwargs["destination"] = destination + if hops is not unset: + kwargs["hops"] = hops + if origin is not unset: + kwargs["origin"] = origin + if pathtrace_id is not unset: + kwargs["pathtrace_id"] = pathtrace_id + if protocol is not unset: + kwargs["protocol"] = protocol + if source is not unset: + kwargs["source"] = source + if tags is not unset: + kwargs["tags"] = tags + if timestamp is not unset: + kwargs["timestamp"] = timestamp + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_netpath_destination.py b/src/datadog_api_client/v2/model/synthetics_test_result_netpath_destination.py new file mode 100644 index 0000000000..895672da7b --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_netpath_destination.py @@ -0,0 +1,56 @@ +# 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. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class SyntheticsTestResultNetpathDestination(ModelNormal): + @cached_property + def openapi_types(_): + return { + "hostname": (str,), + "ip_address": (str,), + "port": (int,), + } + + attribute_map = { + "hostname": "hostname", + "ip_address": "ip_address", + "port": "port", + } + + def __init__( + self_, + hostname: Union[str, UnsetType] = unset, + ip_address: Union[str, UnsetType] = unset, + port: Union[int, UnsetType] = unset, + **kwargs, + ): + """ + Destination endpoint of a network path measurement. + + :param hostname: Hostname of the destination. + :type hostname: str, optional + + :param ip_address: IP address of the destination. + :type ip_address: str, optional + + :param port: Port of the destination service. + :type port: int, optional + """ + if hostname is not unset: + kwargs["hostname"] = hostname + if ip_address is not unset: + kwargs["ip_address"] = ip_address + if port is not unset: + kwargs["port"] = port + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_netpath_endpoint.py b/src/datadog_api_client/v2/model/synthetics_test_result_netpath_endpoint.py new file mode 100644 index 0000000000..20a5f06d95 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_netpath_endpoint.py @@ -0,0 +1,36 @@ +# 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. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class SyntheticsTestResultNetpathEndpoint(ModelNormal): + @cached_property + def openapi_types(_): + return { + "hostname": (str,), + } + + attribute_map = { + "hostname": "hostname", + } + + def __init__(self_, hostname: Union[str, UnsetType] = unset, **kwargs): + """ + Source endpoint of a network path measurement. + + :param hostname: Hostname of the endpoint. + :type hostname: str, optional + """ + if hostname is not unset: + kwargs["hostname"] = hostname + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_netpath_hop.py b/src/datadog_api_client/v2/model/synthetics_test_result_netpath_hop.py new file mode 100644 index 0000000000..ba1bed5099 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_netpath_hop.py @@ -0,0 +1,72 @@ +# 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. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class SyntheticsTestResultNetpathHop(ModelNormal): + @cached_property + def openapi_types(_): + return { + "hostname": (str,), + "ip_address": (str,), + "reachable": (bool,), + "rtt": (float,), + "ttl": (int,), + } + + attribute_map = { + "hostname": "hostname", + "ip_address": "ip_address", + "reachable": "reachable", + "rtt": "rtt", + "ttl": "ttl", + } + + def __init__( + self_, + hostname: Union[str, UnsetType] = unset, + ip_address: Union[str, UnsetType] = unset, + reachable: Union[bool, UnsetType] = unset, + rtt: Union[float, UnsetType] = unset, + ttl: Union[int, UnsetType] = unset, + **kwargs, + ): + """ + A single hop along a network path. + + :param hostname: Resolved hostname of the hop. + :type hostname: str, optional + + :param ip_address: IP address of the hop. + :type ip_address: str, optional + + :param reachable: Whether this hop was reachable. + :type reachable: bool, optional + + :param rtt: Round-trip time to this hop in milliseconds. + :type rtt: float, optional + + :param ttl: Time-to-live value of the probe packet at this hop. + :type ttl: int, optional + """ + if hostname is not unset: + kwargs["hostname"] = hostname + if ip_address is not unset: + kwargs["ip_address"] = ip_address + if reachable is not unset: + kwargs["reachable"] = reachable + if rtt is not unset: + kwargs["rtt"] = rtt + if ttl is not unset: + kwargs["ttl"] = ttl + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_netstats.py b/src/datadog_api_client/v2/model/synthetics_test_result_netstats.py new file mode 100644 index 0000000000..fe2142086c --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_netstats.py @@ -0,0 +1,90 @@ +# 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. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_test_result_netstats_hops import SyntheticsTestResultNetstatsHops + from datadog_api_client.v2.model.synthetics_test_result_network_latency import SyntheticsTestResultNetworkLatency + + +class SyntheticsTestResultNetstats(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_test_result_netstats_hops import SyntheticsTestResultNetstatsHops + from datadog_api_client.v2.model.synthetics_test_result_network_latency import ( + SyntheticsTestResultNetworkLatency, + ) + + return { + "hops": (SyntheticsTestResultNetstatsHops,), + "jitter": (float,), + "latency": (SyntheticsTestResultNetworkLatency,), + "packet_loss_percentage": (float,), + "packets_received": (int,), + "packets_sent": (int,), + } + + attribute_map = { + "hops": "hops", + "jitter": "jitter", + "latency": "latency", + "packet_loss_percentage": "packet_loss_percentage", + "packets_received": "packets_received", + "packets_sent": "packets_sent", + } + + def __init__( + self_, + hops: Union[SyntheticsTestResultNetstatsHops, UnsetType] = unset, + jitter: Union[float, UnsetType] = unset, + latency: Union[SyntheticsTestResultNetworkLatency, UnsetType] = unset, + packet_loss_percentage: Union[float, UnsetType] = unset, + packets_received: Union[int, UnsetType] = unset, + packets_sent: Union[int, UnsetType] = unset, + **kwargs, + ): + """ + Aggregated network statistics from the test execution. + + :param hops: Statistics about the number of hops for a network test. + :type hops: SyntheticsTestResultNetstatsHops, optional + + :param jitter: Network jitter in milliseconds. + :type jitter: float, optional + + :param latency: Latency statistics for a network probe. + :type latency: SyntheticsTestResultNetworkLatency, optional + + :param packet_loss_percentage: Percentage of probe packets lost. + :type packet_loss_percentage: float, optional + + :param packets_received: Number of probe packets received. + :type packets_received: int, optional + + :param packets_sent: Number of probe packets sent. + :type packets_sent: int, optional + """ + if hops is not unset: + kwargs["hops"] = hops + if jitter is not unset: + kwargs["jitter"] = jitter + if latency is not unset: + kwargs["latency"] = latency + if packet_loss_percentage is not unset: + kwargs["packet_loss_percentage"] = packet_loss_percentage + if packets_received is not unset: + kwargs["packets_received"] = packets_received + if packets_sent is not unset: + kwargs["packets_sent"] = packets_sent + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_netstats_hops.py b/src/datadog_api_client/v2/model/synthetics_test_result_netstats_hops.py new file mode 100644 index 0000000000..55c4feb124 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_netstats_hops.py @@ -0,0 +1,56 @@ +# 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. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class SyntheticsTestResultNetstatsHops(ModelNormal): + @cached_property + def openapi_types(_): + return { + "avg": (float,), + "max": (int,), + "min": (int,), + } + + attribute_map = { + "avg": "avg", + "max": "max", + "min": "min", + } + + def __init__( + self_, + avg: Union[float, UnsetType] = unset, + max: Union[int, UnsetType] = unset, + min: Union[int, UnsetType] = unset, + **kwargs, + ): + """ + Statistics about the number of hops for a network test. + + :param avg: Average number of hops. + :type avg: float, optional + + :param max: Maximum number of hops. + :type max: int, optional + + :param min: Minimum number of hops. + :type min: int, optional + """ + if avg is not unset: + kwargs["avg"] = avg + if max is not unset: + kwargs["max"] = max + if min is not unset: + kwargs["min"] = min + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_network_latency.py b/src/datadog_api_client/v2/model/synthetics_test_result_network_latency.py new file mode 100644 index 0000000000..5778c68b71 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_network_latency.py @@ -0,0 +1,56 @@ +# 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. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class SyntheticsTestResultNetworkLatency(ModelNormal): + @cached_property + def openapi_types(_): + return { + "avg": (float,), + "max": (float,), + "min": (float,), + } + + attribute_map = { + "avg": "avg", + "max": "max", + "min": "min", + } + + def __init__( + self_, + avg: Union[float, UnsetType] = unset, + max: Union[float, UnsetType] = unset, + min: Union[float, UnsetType] = unset, + **kwargs, + ): + """ + Latency statistics for a network probe. + + :param avg: Average latency in milliseconds. + :type avg: float, optional + + :param max: Maximum latency in milliseconds. + :type max: float, optional + + :param min: Minimum latency in milliseconds. + :type min: float, optional + """ + if avg is not unset: + kwargs["avg"] = avg + if max is not unset: + kwargs["max"] = max + if min is not unset: + kwargs["min"] = min + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_ocsp_certificate.py b/src/datadog_api_client/v2/model/synthetics_test_result_ocsp_certificate.py new file mode 100644 index 0000000000..0ead96a55b --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_ocsp_certificate.py @@ -0,0 +1,56 @@ +# 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. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class SyntheticsTestResultOCSPCertificate(ModelNormal): + @cached_property + def openapi_types(_): + return { + "revocation_reason": (str,), + "revocation_time": (int,), + "serial_number": (str,), + } + + attribute_map = { + "revocation_reason": "revocation_reason", + "revocation_time": "revocation_time", + "serial_number": "serial_number", + } + + def __init__( + self_, + revocation_reason: Union[str, UnsetType] = unset, + revocation_time: Union[int, UnsetType] = unset, + serial_number: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Certificate details returned in an OCSP response. + + :param revocation_reason: Reason code for the revocation, when applicable. + :type revocation_reason: str, optional + + :param revocation_time: Unix timestamp (ms) of the revocation. + :type revocation_time: int, optional + + :param serial_number: Serial number of the certificate. + :type serial_number: str, optional + """ + if revocation_reason is not unset: + kwargs["revocation_reason"] = revocation_reason + if revocation_time is not unset: + kwargs["revocation_time"] = revocation_time + if serial_number is not unset: + kwargs["serial_number"] = serial_number + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_ocsp_response.py b/src/datadog_api_client/v2/model/synthetics_test_result_ocsp_response.py new file mode 100644 index 0000000000..cee1d6a13f --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_ocsp_response.py @@ -0,0 +1,66 @@ +# 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. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_test_result_ocsp_certificate import SyntheticsTestResultOCSPCertificate + from datadog_api_client.v2.model.synthetics_test_result_ocsp_updates import SyntheticsTestResultOCSPUpdates + + +class SyntheticsTestResultOCSPResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_test_result_ocsp_certificate import ( + SyntheticsTestResultOCSPCertificate, + ) + from datadog_api_client.v2.model.synthetics_test_result_ocsp_updates import SyntheticsTestResultOCSPUpdates + + return { + "certificate": (SyntheticsTestResultOCSPCertificate,), + "status": (str,), + "updates": (SyntheticsTestResultOCSPUpdates,), + } + + attribute_map = { + "certificate": "certificate", + "status": "status", + "updates": "updates", + } + + def __init__( + self_, + certificate: Union[SyntheticsTestResultOCSPCertificate, UnsetType] = unset, + status: Union[str, UnsetType] = unset, + updates: Union[SyntheticsTestResultOCSPUpdates, UnsetType] = unset, + **kwargs, + ): + """ + OCSP response received while validating a certificate. + + :param certificate: Certificate details returned in an OCSP response. + :type certificate: SyntheticsTestResultOCSPCertificate, optional + + :param status: OCSP response status (for example, ``good`` , ``revoked`` , ``unknown`` ). + :type status: str, optional + + :param updates: OCSP response update timestamps. + :type updates: SyntheticsTestResultOCSPUpdates, optional + """ + if certificate is not unset: + kwargs["certificate"] = certificate + if status is not unset: + kwargs["status"] = status + if updates is not unset: + kwargs["updates"] = updates + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_ocsp_updates.py b/src/datadog_api_client/v2/model/synthetics_test_result_ocsp_updates.py new file mode 100644 index 0000000000..dd48d09b0d --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_ocsp_updates.py @@ -0,0 +1,56 @@ +# 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. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class SyntheticsTestResultOCSPUpdates(ModelNormal): + @cached_property + def openapi_types(_): + return { + "next_update": (int,), + "produced_at": (int,), + "this_update": (int,), + } + + attribute_map = { + "next_update": "next_update", + "produced_at": "produced_at", + "this_update": "this_update", + } + + def __init__( + self_, + next_update: Union[int, UnsetType] = unset, + produced_at: Union[int, UnsetType] = unset, + this_update: Union[int, UnsetType] = unset, + **kwargs, + ): + """ + OCSP response update timestamps. + + :param next_update: Unix timestamp (ms) of the next expected OCSP update. + :type next_update: int, optional + + :param produced_at: Unix timestamp (ms) of when the OCSP response was produced. + :type produced_at: int, optional + + :param this_update: Unix timestamp (ms) of this OCSP update. + :type this_update: int, optional + """ + if next_update is not unset: + kwargs["next_update"] = next_update + if produced_at is not unset: + kwargs["produced_at"] = produced_at + if this_update is not unset: + kwargs["this_update"] = this_update + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_parent_step.py b/src/datadog_api_client/v2/model/synthetics_test_result_parent_step.py new file mode 100644 index 0000000000..2643adf5e6 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_parent_step.py @@ -0,0 +1,36 @@ +# 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. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class SyntheticsTestResultParentStep(ModelNormal): + @cached_property + def openapi_types(_): + return { + "id": (str,), + } + + attribute_map = { + "id": "id", + } + + def __init__(self_, id: Union[str, UnsetType] = unset, **kwargs): + """ + Reference to the parent step of a sub-step. + + :param id: Identifier of the parent step. + :type id: str, optional + """ + if id is not unset: + kwargs["id"] = id + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_parent_test.py b/src/datadog_api_client/v2/model/synthetics_test_result_parent_test.py new file mode 100644 index 0000000000..b9f52f5a70 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_parent_test.py @@ -0,0 +1,36 @@ +# 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. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class SyntheticsTestResultParentTest(ModelNormal): + @cached_property + def openapi_types(_): + return { + "id": (str,), + } + + attribute_map = { + "id": "id", + } + + def __init__(self_, id: Union[str, UnsetType] = unset, **kwargs): + """ + Reference to the parent test of a sub-step. + + :param id: Identifier of the parent test. + :type id: str, optional + """ + if id is not unset: + kwargs["id"] = id + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_redirect.py b/src/datadog_api_client/v2/model/synthetics_test_result_redirect.py new file mode 100644 index 0000000000..3644ddff9b --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_redirect.py @@ -0,0 +1,43 @@ +# 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. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class SyntheticsTestResultRedirect(ModelNormal): + @cached_property + def openapi_types(_): + return { + "location": (str,), + "status_code": (int,), + } + + attribute_map = { + "location": "location", + "status_code": "status_code", + } + + def __init__(self_, location: Union[str, UnsetType] = unset, status_code: Union[int, UnsetType] = unset, **kwargs): + """ + A redirect hop encountered while performing the request. + + :param location: Target location of the redirect. + :type location: str, optional + + :param status_code: HTTP status code of the redirect response. + :type status_code: int, optional + """ + if location is not unset: + kwargs["location"] = location + if status_code is not unset: + kwargs["status_code"] = status_code + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_relationship_test.py b/src/datadog_api_client/v2/model/synthetics_test_result_relationship_test.py new file mode 100644 index 0000000000..a05d900f1c --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_relationship_test.py @@ -0,0 +1,46 @@ +# 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. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_test_result_relationship_test_data import ( + SyntheticsTestResultRelationshipTestData, + ) + + +class SyntheticsTestResultRelationshipTest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_test_result_relationship_test_data import ( + SyntheticsTestResultRelationshipTestData, + ) + + return { + "data": (SyntheticsTestResultRelationshipTestData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: Union[SyntheticsTestResultRelationshipTestData, UnsetType] = unset, **kwargs): + """ + Relationship to the Synthetic test. + + :param data: Data for the test relationship. + :type data: SyntheticsTestResultRelationshipTestData, optional + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_fast_test_result_device.py b/src/datadog_api_client/v2/model/synthetics_test_result_relationship_test_data.py similarity index 64% rename from src/datadog_api_client/v2/model/synthetics_fast_test_result_device.py rename to src/datadog_api_client/v2/model/synthetics_test_result_relationship_test_data.py index 68dc67e9f0..7f68c0892c 100644 --- a/src/datadog_api_client/v2/model/synthetics_fast_test_result_device.py +++ b/src/datadog_api_client/v2/model/synthetics_test_result_relationship_test_data.py @@ -13,31 +13,31 @@ ) -class SyntheticsFastTestResultDevice(ModelNormal): +class SyntheticsTestResultRelationshipTestData(ModelNormal): @cached_property def openapi_types(_): return { "id": (str,), - "name": (str,), + "type": (str,), } attribute_map = { "id": "id", - "name": "name", + "type": "type", } - def __init__(self_, id: Union[str, UnsetType] = unset, name: Union[str, UnsetType] = unset, **kwargs): + def __init__(self_, id: Union[str, UnsetType] = unset, type: Union[str, UnsetType] = unset, **kwargs): """ - Device information for browser-based fast tests. + Data for the test relationship. - :param id: Device identifier. + :param id: The public ID of the test. :type id: str, optional - :param name: Display name of the device. - :type name: str, optional + :param type: Type of the related resource. + :type type: str, optional """ if id is not unset: kwargs["id"] = id - if name is not unset: - kwargs["name"] = name + if type is not unset: + kwargs["type"] = type super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_relationships.py b/src/datadog_api_client/v2/model/synthetics_test_result_relationships.py new file mode 100644 index 0000000000..c3eec2d059 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_relationships.py @@ -0,0 +1,46 @@ +# 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. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_test_result_relationship_test import ( + SyntheticsTestResultRelationshipTest, + ) + + +class SyntheticsTestResultRelationships(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_test_result_relationship_test import ( + SyntheticsTestResultRelationshipTest, + ) + + return { + "test": (SyntheticsTestResultRelationshipTest,), + } + + attribute_map = { + "test": "test", + } + + def __init__(self_, test: Union[SyntheticsTestResultRelationshipTest, UnsetType] = unset, **kwargs): + """ + Relationships for a Synthetic test result. + + :param test: Relationship to the Synthetic test. + :type test: SyntheticsTestResultRelationshipTest, optional + """ + if test is not unset: + kwargs["test"] = test + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_request_info.py b/src/datadog_api_client/v2/model/synthetics_test_result_request_info.py new file mode 100644 index 0000000000..a4a166fbac --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_request_info.py @@ -0,0 +1,236 @@ +# 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. +from __future__ import annotations + +from typing import Any, Dict, List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + date, + datetime, + none_type, + unset, + UnsetType, + UUID, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_test_result_file_ref import SyntheticsTestResultFileRef + + +class SyntheticsTestResultRequestInfo(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_test_result_file_ref import SyntheticsTestResultFileRef + + return { + "allow_insecure": (bool,), + "body": (str,), + "call_type": (str,), + "destination_service": (str,), + "dns_server": (str,), + "dns_server_port": (int,), + "e2e_queries": (int,), + "files": ([SyntheticsTestResultFileRef],), + "headers": ( + { + str: ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + UUID, + none_type, + ) + }, + ), + "host": (str,), + "max_ttl": (int,), + "message": (str,), + "method": (str,), + "no_saving_response_body": (bool,), + "port": ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + UUID, + none_type, + ), + "service": (str,), + "source_service": (str,), + "timeout": (int,), + "tool_name": (str,), + "traceroute_queries": (int,), + "url": (str,), + } + + attribute_map = { + "allow_insecure": "allow_insecure", + "body": "body", + "call_type": "call_type", + "destination_service": "destination_service", + "dns_server": "dns_server", + "dns_server_port": "dns_server_port", + "e2e_queries": "e2e_queries", + "files": "files", + "headers": "headers", + "host": "host", + "max_ttl": "max_ttl", + "message": "message", + "method": "method", + "no_saving_response_body": "no_saving_response_body", + "port": "port", + "service": "service", + "source_service": "source_service", + "timeout": "timeout", + "tool_name": "tool_name", + "traceroute_queries": "traceroute_queries", + "url": "url", + } + + def __init__( + self_, + allow_insecure: Union[bool, UnsetType] = unset, + body: Union[str, UnsetType] = unset, + call_type: Union[str, UnsetType] = unset, + destination_service: Union[str, UnsetType] = unset, + dns_server: Union[str, UnsetType] = unset, + dns_server_port: Union[int, UnsetType] = unset, + e2e_queries: Union[int, UnsetType] = unset, + files: Union[List[SyntheticsTestResultFileRef], UnsetType] = unset, + headers: Union[Dict[str, Any], UnsetType] = unset, + host: Union[str, UnsetType] = unset, + max_ttl: Union[int, UnsetType] = unset, + message: Union[str, UnsetType] = unset, + method: Union[str, UnsetType] = unset, + no_saving_response_body: Union[bool, UnsetType] = unset, + port: Union[Any, UnsetType] = unset, + service: Union[str, UnsetType] = unset, + source_service: Union[str, UnsetType] = unset, + timeout: Union[int, UnsetType] = unset, + tool_name: Union[str, UnsetType] = unset, + traceroute_queries: Union[int, UnsetType] = unset, + url: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Details of the outgoing request made during the test execution. + + :param allow_insecure: Whether insecure certificates are allowed for this request. + :type allow_insecure: bool, optional + + :param body: Body sent with the request. + :type body: str, optional + + :param call_type: gRPC call type (for example, ``unary`` , ``healthCheck`` , or ``reflection`` ). + :type call_type: str, optional + + :param destination_service: Destination service for a Network Path test. + :type destination_service: str, optional + + :param dns_server: DNS server used to resolve the target host. + :type dns_server: str, optional + + :param dns_server_port: Port of the DNS server used for resolution. + :type dns_server_port: int, optional + + :param e2e_queries: Number of end-to-end probe queries issued. + :type e2e_queries: int, optional + + :param files: Files attached to the request. + :type files: [SyntheticsTestResultFileRef], optional + + :param headers: Headers sent with the request. + :type headers: {str: (bool, date, datetime, dict, float, int, list, str, UUID, none_type,)}, optional + + :param host: Host targeted by the request. + :type host: str, optional + + :param max_ttl: Maximum TTL for network probe packets. + :type max_ttl: int, optional + + :param message: Message sent with the request (for WebSocket/TCP/UDP tests). + :type message: str, optional + + :param method: HTTP method used for the request. + :type method: str, optional + + :param no_saving_response_body: Whether the response body was not saved. + :type no_saving_response_body: bool, optional + + :param port: Port targeted by the request. Can be a number or a string variable reference. + :type port: bool, date, datetime, dict, float, int, list, str, UUID, none_type, optional + + :param service: Service name targeted by the request (for gRPC tests). + :type service: str, optional + + :param source_service: Source service for a Network Path test. + :type source_service: str, optional + + :param timeout: Request timeout in milliseconds. + :type timeout: int, optional + + :param tool_name: Name of the MCP tool called (MCP tests only). + :type tool_name: str, optional + + :param traceroute_queries: Number of traceroute probe queries issued. + :type traceroute_queries: int, optional + + :param url: URL targeted by the request. + :type url: str, optional + """ + if allow_insecure is not unset: + kwargs["allow_insecure"] = allow_insecure + if body is not unset: + kwargs["body"] = body + if call_type is not unset: + kwargs["call_type"] = call_type + if destination_service is not unset: + kwargs["destination_service"] = destination_service + if dns_server is not unset: + kwargs["dns_server"] = dns_server + if dns_server_port is not unset: + kwargs["dns_server_port"] = dns_server_port + if e2e_queries is not unset: + kwargs["e2e_queries"] = e2e_queries + if files is not unset: + kwargs["files"] = files + if headers is not unset: + kwargs["headers"] = headers + if host is not unset: + kwargs["host"] = host + if max_ttl is not unset: + kwargs["max_ttl"] = max_ttl + if message is not unset: + kwargs["message"] = message + if method is not unset: + kwargs["method"] = method + if no_saving_response_body is not unset: + kwargs["no_saving_response_body"] = no_saving_response_body + if port is not unset: + kwargs["port"] = port + if service is not unset: + kwargs["service"] = service + if source_service is not unset: + kwargs["source_service"] = source_service + if timeout is not unset: + kwargs["timeout"] = timeout + if tool_name is not unset: + kwargs["tool_name"] = tool_name + if traceroute_queries is not unset: + kwargs["traceroute_queries"] = traceroute_queries + if url is not unset: + kwargs["url"] = url + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_response.py b/src/datadog_api_client/v2/model/synthetics_test_result_response.py new file mode 100644 index 0000000000..922105880d --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_response.py @@ -0,0 +1,56 @@ +# 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. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_test_result_data import SyntheticsTestResultData + from datadog_api_client.v2.model.synthetics_test_result_included_item import SyntheticsTestResultIncludedItem + + +class SyntheticsTestResultResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_test_result_data import SyntheticsTestResultData + from datadog_api_client.v2.model.synthetics_test_result_included_item import SyntheticsTestResultIncludedItem + + return { + "data": (SyntheticsTestResultData,), + "included": ([SyntheticsTestResultIncludedItem],), + } + + attribute_map = { + "data": "data", + "included": "included", + } + + def __init__( + self_, + data: Union[SyntheticsTestResultData, UnsetType] = unset, + included: Union[List[SyntheticsTestResultIncludedItem], UnsetType] = unset, + **kwargs, + ): + """ + Response object for a Synthetic test result. + + :param data: Wrapper object for a Synthetic test result. + :type data: SyntheticsTestResultData, optional + + :param included: Array of included related resources, such as the test definition. + :type included: [SyntheticsTestResultIncludedItem], optional + """ + if data is not unset: + kwargs["data"] = data + if included is not unset: + kwargs["included"] = included + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_response_info.py b/src/datadog_api_client/v2/model/synthetics_test_result_response_info.py new file mode 100644 index 0000000000..046c6d7834 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_response_info.py @@ -0,0 +1,213 @@ +# 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. +from __future__ import annotations + +from typing import Any, Dict, List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + date, + datetime, + none_type, + unset, + UnsetType, + UUID, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_test_result_cdn_provider_info import SyntheticsTestResultCdnProviderInfo + from datadog_api_client.v2.model.synthetics_test_result_web_socket_close import SyntheticsTestResultWebSocketClose + from datadog_api_client.v2.model.synthetics_test_result_health_check import SyntheticsTestResultHealthCheck + from datadog_api_client.v2.model.synthetics_test_result_dns_record import SyntheticsTestResultDnsRecord + from datadog_api_client.v2.model.synthetics_test_result_redirect import SyntheticsTestResultRedirect + + +class SyntheticsTestResultResponseInfo(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_test_result_cdn_provider_info import ( + SyntheticsTestResultCdnProviderInfo, + ) + from datadog_api_client.v2.model.synthetics_test_result_web_socket_close import ( + SyntheticsTestResultWebSocketClose, + ) + from datadog_api_client.v2.model.synthetics_test_result_health_check import SyntheticsTestResultHealthCheck + from datadog_api_client.v2.model.synthetics_test_result_dns_record import SyntheticsTestResultDnsRecord + from datadog_api_client.v2.model.synthetics_test_result_redirect import SyntheticsTestResultRedirect + + return { + "body": (str,), + "body_compressed": (str,), + "body_hashes": (str,), + "body_size": (int,), + "cache_headers": ({str: (str,)},), + "cdn": (SyntheticsTestResultCdnProviderInfo,), + "close": (SyntheticsTestResultWebSocketClose,), + "compressed_message": (str,), + "headers": ( + { + str: ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + UUID, + none_type, + ) + }, + ), + "healthcheck": (SyntheticsTestResultHealthCheck,), + "http_version": (str,), + "is_body_truncated": (bool,), + "is_message_truncated": (bool,), + "message": (str,), + "metadata": ({str: (str,)},), + "records": ([SyntheticsTestResultDnsRecord],), + "redirects": ([SyntheticsTestResultRedirect],), + "status_code": (int,), + } + + attribute_map = { + "body": "body", + "body_compressed": "body_compressed", + "body_hashes": "body_hashes", + "body_size": "body_size", + "cache_headers": "cache_headers", + "cdn": "cdn", + "close": "close", + "compressed_message": "compressed_message", + "headers": "headers", + "healthcheck": "healthcheck", + "http_version": "http_version", + "is_body_truncated": "is_body_truncated", + "is_message_truncated": "is_message_truncated", + "message": "message", + "metadata": "metadata", + "records": "records", + "redirects": "redirects", + "status_code": "status_code", + } + + def __init__( + self_, + body: Union[str, UnsetType] = unset, + body_compressed: Union[str, UnsetType] = unset, + body_hashes: Union[str, UnsetType] = unset, + body_size: Union[int, UnsetType] = unset, + cache_headers: Union[Dict[str, str], UnsetType] = unset, + cdn: Union[SyntheticsTestResultCdnProviderInfo, UnsetType] = unset, + close: Union[SyntheticsTestResultWebSocketClose, UnsetType] = unset, + compressed_message: Union[str, UnsetType] = unset, + headers: Union[Dict[str, Any], UnsetType] = unset, + healthcheck: Union[SyntheticsTestResultHealthCheck, UnsetType] = unset, + http_version: Union[str, UnsetType] = unset, + is_body_truncated: Union[bool, UnsetType] = unset, + is_message_truncated: Union[bool, UnsetType] = unset, + message: Union[str, UnsetType] = unset, + metadata: Union[Dict[str, str], UnsetType] = unset, + records: Union[List[SyntheticsTestResultDnsRecord], UnsetType] = unset, + redirects: Union[List[SyntheticsTestResultRedirect], UnsetType] = unset, + status_code: Union[int, UnsetType] = unset, + **kwargs, + ): + """ + Details of the response received during the test execution. + + :param body: Body of the response. + :type body: str, optional + + :param body_compressed: Compressed representation of the response body. + :type body_compressed: str, optional + + :param body_hashes: Hashes computed over the response body. + :type body_hashes: str, optional + + :param body_size: Size of the response body in bytes. + :type body_size: int, optional + + :param cache_headers: Cache-related response headers. + :type cache_headers: {str: (str,)}, optional + + :param cdn: CDN provider details inferred from response headers. + :type cdn: SyntheticsTestResultCdnProviderInfo, optional + + :param close: WebSocket close frame information for WebSocket test responses. + :type close: SyntheticsTestResultWebSocketClose, optional + + :param compressed_message: Compressed representation of the response message. + :type compressed_message: str, optional + + :param headers: Response headers. + :type headers: {str: (bool, date, datetime, dict, float, int, list, str, UUID, none_type,)}, optional + + :param healthcheck: Health check information returned from a gRPC health check call. + :type healthcheck: SyntheticsTestResultHealthCheck, optional + + :param http_version: HTTP version of the response. + :type http_version: str, optional + + :param is_body_truncated: Whether the response body was truncated. + :type is_body_truncated: bool, optional + + :param is_message_truncated: Whether the response message was truncated. + :type is_message_truncated: bool, optional + + :param message: Message received in the response (for WebSocket/TCP/UDP tests). + :type message: str, optional + + :param metadata: Additional metadata returned with the response. + :type metadata: {str: (str,)}, optional + + :param records: DNS records returned in the response (DNS tests only). + :type records: [SyntheticsTestResultDnsRecord], optional + + :param redirects: Redirect hops encountered while performing the request. + :type redirects: [SyntheticsTestResultRedirect], optional + + :param status_code: HTTP status code of the response. + :type status_code: int, optional + """ + if body is not unset: + kwargs["body"] = body + if body_compressed is not unset: + kwargs["body_compressed"] = body_compressed + if body_hashes is not unset: + kwargs["body_hashes"] = body_hashes + if body_size is not unset: + kwargs["body_size"] = body_size + if cache_headers is not unset: + kwargs["cache_headers"] = cache_headers + if cdn is not unset: + kwargs["cdn"] = cdn + if close is not unset: + kwargs["close"] = close + if compressed_message is not unset: + kwargs["compressed_message"] = compressed_message + if headers is not unset: + kwargs["headers"] = headers + if healthcheck is not unset: + kwargs["healthcheck"] = healthcheck + if http_version is not unset: + kwargs["http_version"] = http_version + if is_body_truncated is not unset: + kwargs["is_body_truncated"] = is_body_truncated + if is_message_truncated is not unset: + kwargs["is_message_truncated"] = is_message_truncated + if message is not unset: + kwargs["message"] = message + if metadata is not unset: + kwargs["metadata"] = metadata + if records is not unset: + kwargs["records"] = records + if redirects is not unset: + kwargs["redirects"] = redirects + if status_code is not unset: + kwargs["status_code"] = status_code + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_router.py b/src/datadog_api_client/v2/model/synthetics_test_result_router.py new file mode 100644 index 0000000000..43f8ea0a71 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_router.py @@ -0,0 +1,43 @@ +# 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. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class SyntheticsTestResultRouter(ModelNormal): + @cached_property + def openapi_types(_): + return { + "ip": (str,), + "resolved_host": (str,), + } + + attribute_map = { + "ip": "ip", + "resolved_host": "resolved_host", + } + + def __init__(self_, ip: Union[str, UnsetType] = unset, resolved_host: Union[str, UnsetType] = unset, **kwargs): + """ + A router along the traceroute path. + + :param ip: IP address of the router. + :type ip: str, optional + + :param resolved_host: Resolved hostname of the router. + :type resolved_host: str, optional + """ + if ip is not unset: + kwargs["ip"] = ip + if resolved_host is not unset: + kwargs["resolved_host"] = resolved_host + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_rum_context.py b/src/datadog_api_client/v2/model/synthetics_test_result_rum_context.py new file mode 100644 index 0000000000..187d5388f9 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_rum_context.py @@ -0,0 +1,56 @@ +# 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. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class SyntheticsTestResultRumContext(ModelNormal): + @cached_property + def openapi_types(_): + return { + "application_id": (str,), + "session_id": (str,), + "view_id": (str,), + } + + attribute_map = { + "application_id": "application_id", + "session_id": "session_id", + "view_id": "view_id", + } + + def __init__( + self_, + application_id: Union[str, UnsetType] = unset, + session_id: Union[str, UnsetType] = unset, + view_id: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + RUM application context associated with a step or sub-test. + + :param application_id: RUM application identifier. + :type application_id: str, optional + + :param session_id: RUM session identifier. + :type session_id: str, optional + + :param view_id: RUM view identifier. + :type view_id: str, optional + """ + if application_id is not unset: + kwargs["application_id"] = application_id + if session_id is not unset: + kwargs["session_id"] = session_id + if view_id is not unset: + kwargs["view_id"] = view_id + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_run_type.py b/src/datadog_api_client/v2/model/synthetics_test_result_run_type.py new file mode 100644 index 0000000000..46fca38727 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_run_type.py @@ -0,0 +1,44 @@ +# 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. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class SyntheticsTestResultRunType(ModelSimple): + """ + The type of run for a Synthetic test result. + + :param value: Must be one of ["scheduled", "fast", "ci", "triggered"]. + :type value: str + """ + + allowed_values = { + "scheduled", + "fast", + "ci", + "triggered", + } + SCHEDULED: ClassVar["SyntheticsTestResultRunType"] + FAST: ClassVar["SyntheticsTestResultRunType"] + CI: ClassVar["SyntheticsTestResultRunType"] + TRIGGERED: ClassVar["SyntheticsTestResultRunType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +SyntheticsTestResultRunType.SCHEDULED = SyntheticsTestResultRunType("scheduled") +SyntheticsTestResultRunType.FAST = SyntheticsTestResultRunType("fast") +SyntheticsTestResultRunType.CI = SyntheticsTestResultRunType("ci") +SyntheticsTestResultRunType.TRIGGERED = SyntheticsTestResultRunType("triggered") diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_status.py b/src/datadog_api_client/v2/model/synthetics_test_result_status.py new file mode 100644 index 0000000000..b2d2dabb27 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_status.py @@ -0,0 +1,41 @@ +# 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. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class SyntheticsTestResultStatus(ModelSimple): + """ + Status of a Synthetic test result. + + :param value: Must be one of ["passed", "failed", "no_data"]. + :type value: str + """ + + allowed_values = { + "passed", + "failed", + "no_data", + } + PASSED: ClassVar["SyntheticsTestResultStatus"] + FAILED: ClassVar["SyntheticsTestResultStatus"] + NO_DATA: ClassVar["SyntheticsTestResultStatus"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +SyntheticsTestResultStatus.PASSED = SyntheticsTestResultStatus("passed") +SyntheticsTestResultStatus.FAILED = SyntheticsTestResultStatus("failed") +SyntheticsTestResultStatus.NO_DATA = SyntheticsTestResultStatus("no_data") diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_step.py b/src/datadog_api_client/v2/model/synthetics_test_result_step.py new file mode 100644 index 0000000000..76301240a1 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_step.py @@ -0,0 +1,486 @@ +# 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. +from __future__ import annotations + +from typing import Any, Dict, List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + date, + datetime, + none_type, + unset, + UnsetType, + UUID, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_test_result_step_assertion_result import ( + SyntheticsTestResultStepAssertionResult, + ) + from datadog_api_client.v2.model.synthetics_test_result_assertion_result import SyntheticsTestResultAssertionResult + from datadog_api_client.v2.model.synthetics_test_result_bounds import SyntheticsTestResultBounds + from datadog_api_client.v2.model.synthetics_test_result_browser_error import SyntheticsTestResultBrowserError + from datadog_api_client.v2.model.synthetics_test_result_bucket_keys import SyntheticsTestResultBucketKeys + from datadog_api_client.v2.model.synthetics_test_result_cdn_resource import SyntheticsTestResultCdnResource + from datadog_api_client.v2.model.synthetics_test_result_step_element_updates import ( + SyntheticsTestResultStepElementUpdates, + ) + from datadog_api_client.v2.model.synthetics_test_result_variable import SyntheticsTestResultVariable + from datadog_api_client.v2.model.synthetics_test_result_failure import SyntheticsTestResultFailure + from datadog_api_client.v2.model.synthetics_test_result_request_info import SyntheticsTestResultRequestInfo + from datadog_api_client.v2.model.synthetics_test_result_response_info import SyntheticsTestResultResponseInfo + from datadog_api_client.v2.model.synthetics_test_result_rum_context import SyntheticsTestResultRumContext + from datadog_api_client.v2.model.synthetics_test_result_sub_step import SyntheticsTestResultSubStep + from datadog_api_client.v2.model.synthetics_test_result_sub_test import SyntheticsTestResultSubTest + from datadog_api_client.v2.model.synthetics_test_result_tab import SyntheticsTestResultTab + from datadog_api_client.v2.model.synthetics_test_result_variables import SyntheticsTestResultVariables + from datadog_api_client.v2.model.synthetics_test_result_vitals_metrics import SyntheticsTestResultVitalsMetrics + from datadog_api_client.v2.model.synthetics_test_result_warning import SyntheticsTestResultWarning + + +class SyntheticsTestResultStep(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_test_result_step_assertion_result import ( + SyntheticsTestResultStepAssertionResult, + ) + from datadog_api_client.v2.model.synthetics_test_result_assertion_result import ( + SyntheticsTestResultAssertionResult, + ) + from datadog_api_client.v2.model.synthetics_test_result_bounds import SyntheticsTestResultBounds + from datadog_api_client.v2.model.synthetics_test_result_browser_error import SyntheticsTestResultBrowserError + from datadog_api_client.v2.model.synthetics_test_result_bucket_keys import SyntheticsTestResultBucketKeys + from datadog_api_client.v2.model.synthetics_test_result_cdn_resource import SyntheticsTestResultCdnResource + from datadog_api_client.v2.model.synthetics_test_result_step_element_updates import ( + SyntheticsTestResultStepElementUpdates, + ) + from datadog_api_client.v2.model.synthetics_test_result_variable import SyntheticsTestResultVariable + from datadog_api_client.v2.model.synthetics_test_result_failure import SyntheticsTestResultFailure + from datadog_api_client.v2.model.synthetics_test_result_request_info import SyntheticsTestResultRequestInfo + from datadog_api_client.v2.model.synthetics_test_result_response_info import SyntheticsTestResultResponseInfo + from datadog_api_client.v2.model.synthetics_test_result_rum_context import SyntheticsTestResultRumContext + from datadog_api_client.v2.model.synthetics_test_result_sub_step import SyntheticsTestResultSubStep + from datadog_api_client.v2.model.synthetics_test_result_sub_test import SyntheticsTestResultSubTest + from datadog_api_client.v2.model.synthetics_test_result_tab import SyntheticsTestResultTab + from datadog_api_client.v2.model.synthetics_test_result_variables import SyntheticsTestResultVariables + from datadog_api_client.v2.model.synthetics_test_result_vitals_metrics import SyntheticsTestResultVitalsMetrics + from datadog_api_client.v2.model.synthetics_test_result_warning import SyntheticsTestResultWarning + + return { + "allow_failure": (bool,), + "api_test": ( + { + str: ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + UUID, + none_type, + ) + }, + ), + "assertion_result": (SyntheticsTestResultStepAssertionResult,), + "assertions": ([SyntheticsTestResultAssertionResult],), + "blocked_requests_urls": ([str],), + "bounds": (SyntheticsTestResultBounds,), + "browser_errors": ([SyntheticsTestResultBrowserError],), + "bucket_keys": (SyntheticsTestResultBucketKeys,), + "cdn_resources": ([SyntheticsTestResultCdnResource],), + "click_type": (str,), + "compressed_json_descriptor": (str,), + "config": ( + { + str: ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + UUID, + none_type, + ) + }, + ), + "description": (str,), + "duration": (float,), + "element_description": (str,), + "element_updates": (SyntheticsTestResultStepElementUpdates,), + "extracted_value": (SyntheticsTestResultVariable,), + "failure": (SyntheticsTestResultFailure,), + "http_results": ([SyntheticsTestResultAssertionResult],), + "id": (str,), + "is_critical": (bool,), + "javascript_custom_assertion_code": (bool,), + "locate_element_duration": (float,), + "name": (str,), + "request": (SyntheticsTestResultRequestInfo,), + "response": (SyntheticsTestResultResponseInfo,), + "retries": ([SyntheticsTestResultStep],), + "retry_count": (int,), + "rum_context": (SyntheticsTestResultRumContext,), + "started_at": (int,), + "status": (str,), + "sub_step": (SyntheticsTestResultSubStep,), + "sub_test": (SyntheticsTestResultSubTest,), + "subtype": (str,), + "tabs": ([SyntheticsTestResultTab],), + "timings": ( + { + str: ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + UUID, + none_type, + ) + }, + ), + "tunnel": (bool,), + "type": (str,), + "url": (str,), + "value": ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + UUID, + none_type, + ), + "variables": (SyntheticsTestResultVariables,), + "vitals_metrics": ([SyntheticsTestResultVitalsMetrics],), + "warnings": ([SyntheticsTestResultWarning],), + } + + attribute_map = { + "allow_failure": "allow_failure", + "api_test": "api_test", + "assertion_result": "assertion_result", + "assertions": "assertions", + "blocked_requests_urls": "blocked_requests_urls", + "bounds": "bounds", + "browser_errors": "browser_errors", + "bucket_keys": "bucket_keys", + "cdn_resources": "cdn_resources", + "click_type": "click_type", + "compressed_json_descriptor": "compressed_json_descriptor", + "config": "config", + "description": "description", + "duration": "duration", + "element_description": "element_description", + "element_updates": "element_updates", + "extracted_value": "extracted_value", + "failure": "failure", + "http_results": "http_results", + "id": "id", + "is_critical": "is_critical", + "javascript_custom_assertion_code": "javascript_custom_assertion_code", + "locate_element_duration": "locate_element_duration", + "name": "name", + "request": "request", + "response": "response", + "retries": "retries", + "retry_count": "retry_count", + "rum_context": "rum_context", + "started_at": "started_at", + "status": "status", + "sub_step": "sub_step", + "sub_test": "sub_test", + "subtype": "subtype", + "tabs": "tabs", + "timings": "timings", + "tunnel": "tunnel", + "type": "type", + "url": "url", + "value": "value", + "variables": "variables", + "vitals_metrics": "vitals_metrics", + "warnings": "warnings", + } + + def __init__( + self_, + allow_failure: Union[bool, UnsetType] = unset, + api_test: Union[Dict[str, Any], UnsetType] = unset, + assertion_result: Union[SyntheticsTestResultStepAssertionResult, UnsetType] = unset, + assertions: Union[List[SyntheticsTestResultAssertionResult], UnsetType] = unset, + blocked_requests_urls: Union[List[str], UnsetType] = unset, + bounds: Union[SyntheticsTestResultBounds, UnsetType] = unset, + browser_errors: Union[List[SyntheticsTestResultBrowserError], UnsetType] = unset, + bucket_keys: Union[SyntheticsTestResultBucketKeys, UnsetType] = unset, + cdn_resources: Union[List[SyntheticsTestResultCdnResource], UnsetType] = unset, + click_type: Union[str, UnsetType] = unset, + compressed_json_descriptor: Union[str, UnsetType] = unset, + config: Union[Dict[str, Any], UnsetType] = unset, + description: Union[str, UnsetType] = unset, + duration: Union[float, UnsetType] = unset, + element_description: Union[str, UnsetType] = unset, + element_updates: Union[SyntheticsTestResultStepElementUpdates, UnsetType] = unset, + extracted_value: Union[SyntheticsTestResultVariable, UnsetType] = unset, + failure: Union[SyntheticsTestResultFailure, UnsetType] = unset, + http_results: Union[List[SyntheticsTestResultAssertionResult], UnsetType] = unset, + id: Union[str, UnsetType] = unset, + is_critical: Union[bool, UnsetType] = unset, + javascript_custom_assertion_code: Union[bool, UnsetType] = unset, + locate_element_duration: Union[float, UnsetType] = unset, + name: Union[str, UnsetType] = unset, + request: Union[SyntheticsTestResultRequestInfo, UnsetType] = unset, + response: Union[SyntheticsTestResultResponseInfo, UnsetType] = unset, + retries: Union[List[SyntheticsTestResultStep], UnsetType] = unset, + retry_count: Union[int, UnsetType] = unset, + rum_context: Union[SyntheticsTestResultRumContext, UnsetType] = unset, + started_at: Union[int, UnsetType] = unset, + status: Union[str, UnsetType] = unset, + sub_step: Union[SyntheticsTestResultSubStep, UnsetType] = unset, + sub_test: Union[SyntheticsTestResultSubTest, UnsetType] = unset, + subtype: Union[str, UnsetType] = unset, + tabs: Union[List[SyntheticsTestResultTab], UnsetType] = unset, + timings: Union[Dict[str, Any], UnsetType] = unset, + tunnel: Union[bool, UnsetType] = unset, + type: Union[str, UnsetType] = unset, + url: Union[str, UnsetType] = unset, + value: Union[Any, UnsetType] = unset, + variables: Union[SyntheticsTestResultVariables, UnsetType] = unset, + vitals_metrics: Union[List[SyntheticsTestResultVitalsMetrics], UnsetType] = unset, + warnings: Union[List[SyntheticsTestResultWarning], UnsetType] = unset, + **kwargs, + ): + """ + A step result from a browser, mobile, or multistep API test. + + :param allow_failure: Whether the test continues when this step fails. + :type allow_failure: bool, optional + + :param api_test: Inner API test definition for browser ``runApiTest`` steps. + :type api_test: {str: (bool, date, datetime, dict, float, int, list, str, UUID, none_type,)}, optional + + :param assertion_result: Assertion result for a browser or mobile step. + :type assertion_result: SyntheticsTestResultStepAssertionResult, optional + + :param assertions: Assertion results produced by the step. + :type assertions: [SyntheticsTestResultAssertionResult], optional + + :param blocked_requests_urls: URLs of requests blocked during the step. + :type blocked_requests_urls: [str], optional + + :param bounds: Bounding box of an element on the page. + :type bounds: SyntheticsTestResultBounds, optional + + :param browser_errors: Browser errors captured during the step. + :type browser_errors: [SyntheticsTestResultBrowserError], optional + + :param bucket_keys: Storage bucket keys for artifacts produced during a step or test. + :type bucket_keys: SyntheticsTestResultBucketKeys, optional + + :param cdn_resources: CDN resources encountered during the step. + :type cdn_resources: [SyntheticsTestResultCdnResource], optional + + :param click_type: Click type performed in a browser step. + :type click_type: str, optional + + :param compressed_json_descriptor: Compressed JSON descriptor for the step (internal format). + :type compressed_json_descriptor: str, optional + + :param config: Request configuration executed by this step (API test steps). + :type config: {str: (bool, date, datetime, dict, float, int, list, str, UUID, none_type,)}, optional + + :param description: Human-readable description of the step. + :type description: str, optional + + :param duration: Duration of the step in milliseconds. + :type duration: float, optional + + :param element_description: Description of the element interacted with by the step. + :type element_description: str, optional + + :param element_updates: Element locator updates produced during a step. + :type element_updates: SyntheticsTestResultStepElementUpdates, optional + + :param extracted_value: A variable used or extracted during a test. + :type extracted_value: SyntheticsTestResultVariable, optional + + :param failure: Details about the failure of a Synthetic test. + :type failure: SyntheticsTestResultFailure, optional + + :param http_results: HTTP results produced by an MCP step. + :type http_results: [SyntheticsTestResultAssertionResult], optional + + :param id: Identifier of the step. + :type id: str, optional + + :param is_critical: Whether this step is critical for the test outcome. + :type is_critical: bool, optional + + :param javascript_custom_assertion_code: Whether the step uses a custom JavaScript assertion. + :type javascript_custom_assertion_code: bool, optional + + :param locate_element_duration: Time taken to locate the element in milliseconds. + :type locate_element_duration: float, optional + + :param name: Name of the step. + :type name: str, optional + + :param request: Details of the outgoing request made during the test execution. + :type request: SyntheticsTestResultRequestInfo, optional + + :param response: Details of the response received during the test execution. + :type response: SyntheticsTestResultResponseInfo, optional + + :param retries: Retry results for the step. + :type retries: [SyntheticsTestResultStep], optional + + :param retry_count: Number of times this step was retried. + :type retry_count: int, optional + + :param rum_context: RUM application context associated with a step or sub-test. + :type rum_context: SyntheticsTestResultRumContext, optional + + :param started_at: Unix timestamp (ms) of when the step started. + :type started_at: int, optional + + :param status: Status of the step (for example, ``passed`` , ``failed`` ). + :type status: str, optional + + :param sub_step: Information about a sub-step in a nested test execution. + :type sub_step: SyntheticsTestResultSubStep, optional + + :param sub_test: Information about a sub-test played from a parent browser test. + :type sub_test: SyntheticsTestResultSubTest, optional + + :param subtype: Subtype of the step. + :type subtype: str, optional + + :param tabs: Browser tabs involved in the step. + :type tabs: [SyntheticsTestResultTab], optional + + :param timings: Timing breakdown of the step execution. + :type timings: {str: (bool, date, datetime, dict, float, int, list, str, UUID, none_type,)}, optional + + :param tunnel: Whether the step was executed through a Synthetics tunnel. + :type tunnel: bool, optional + + :param type: Type of the step (for example, ``click`` , ``assertElementContent`` , ``runApiTest`` ). + :type type: str, optional + + :param url: URL associated with the step (for navigation steps). + :type url: str, optional + + :param value: Step value. Its type depends on the step type. + :type value: bool, date, datetime, dict, float, int, list, str, UUID, none_type, optional + + :param variables: Variables captured during a test step. + :type variables: SyntheticsTestResultVariables, optional + + :param vitals_metrics: Web vitals metrics captured during the step. + :type vitals_metrics: [SyntheticsTestResultVitalsMetrics], optional + + :param warnings: Warnings emitted during the step. + :type warnings: [SyntheticsTestResultWarning], optional + """ + if allow_failure is not unset: + kwargs["allow_failure"] = allow_failure + if api_test is not unset: + kwargs["api_test"] = api_test + if assertion_result is not unset: + kwargs["assertion_result"] = assertion_result + if assertions is not unset: + kwargs["assertions"] = assertions + if blocked_requests_urls is not unset: + kwargs["blocked_requests_urls"] = blocked_requests_urls + if bounds is not unset: + kwargs["bounds"] = bounds + if browser_errors is not unset: + kwargs["browser_errors"] = browser_errors + if bucket_keys is not unset: + kwargs["bucket_keys"] = bucket_keys + if cdn_resources is not unset: + kwargs["cdn_resources"] = cdn_resources + if click_type is not unset: + kwargs["click_type"] = click_type + if compressed_json_descriptor is not unset: + kwargs["compressed_json_descriptor"] = compressed_json_descriptor + if config is not unset: + kwargs["config"] = config + if description is not unset: + kwargs["description"] = description + if duration is not unset: + kwargs["duration"] = duration + if element_description is not unset: + kwargs["element_description"] = element_description + if element_updates is not unset: + kwargs["element_updates"] = element_updates + if extracted_value is not unset: + kwargs["extracted_value"] = extracted_value + if failure is not unset: + kwargs["failure"] = failure + if http_results is not unset: + kwargs["http_results"] = http_results + if id is not unset: + kwargs["id"] = id + if is_critical is not unset: + kwargs["is_critical"] = is_critical + if javascript_custom_assertion_code is not unset: + kwargs["javascript_custom_assertion_code"] = javascript_custom_assertion_code + if locate_element_duration is not unset: + kwargs["locate_element_duration"] = locate_element_duration + if name is not unset: + kwargs["name"] = name + if request is not unset: + kwargs["request"] = request + if response is not unset: + kwargs["response"] = response + if retries is not unset: + kwargs["retries"] = retries + if retry_count is not unset: + kwargs["retry_count"] = retry_count + if rum_context is not unset: + kwargs["rum_context"] = rum_context + if started_at is not unset: + kwargs["started_at"] = started_at + if status is not unset: + kwargs["status"] = status + if sub_step is not unset: + kwargs["sub_step"] = sub_step + if sub_test is not unset: + kwargs["sub_test"] = sub_test + if subtype is not unset: + kwargs["subtype"] = subtype + if tabs is not unset: + kwargs["tabs"] = tabs + if timings is not unset: + kwargs["timings"] = timings + if tunnel is not unset: + kwargs["tunnel"] = tunnel + if type is not unset: + kwargs["type"] = type + if url is not unset: + kwargs["url"] = url + if value is not unset: + kwargs["value"] = value + if variables is not unset: + kwargs["variables"] = variables + if vitals_metrics is not unset: + kwargs["vitals_metrics"] = vitals_metrics + if warnings is not unset: + kwargs["warnings"] = warnings + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_step_assertion_result.py b/src/datadog_api_client/v2/model/synthetics_test_result_step_assertion_result.py new file mode 100644 index 0000000000..db753810ed --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_step_assertion_result.py @@ -0,0 +1,90 @@ +# 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. +from __future__ import annotations + +from typing import Any, Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + date, + datetime, + none_type, + unset, + UnsetType, + UUID, +) + + +class SyntheticsTestResultStepAssertionResult(ModelNormal): + @cached_property + def openapi_types(_): + return { + "actual": ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + UUID, + none_type, + ), + "check_type": (str,), + "expected": ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + UUID, + none_type, + ), + "has_secure_variables": (bool,), + } + + attribute_map = { + "actual": "actual", + "check_type": "check_type", + "expected": "expected", + "has_secure_variables": "has_secure_variables", + } + + def __init__( + self_, + actual: Union[Any, UnsetType] = unset, + check_type: Union[str, UnsetType] = unset, + expected: Union[Any, UnsetType] = unset, + has_secure_variables: Union[bool, UnsetType] = unset, + **kwargs, + ): + """ + Assertion result for a browser or mobile step. + + :param actual: Actual value observed during the step assertion. Its type depends on the check type. + :type actual: bool, date, datetime, dict, float, int, list, str, UUID, none_type, optional + + :param check_type: Type of the step assertion check. + :type check_type: str, optional + + :param expected: Expected value for the step assertion. Its type depends on the check type. + :type expected: bool, date, datetime, dict, float, int, list, str, UUID, none_type, optional + + :param has_secure_variables: Whether the assertion involves secure variables. + :type has_secure_variables: bool, optional + """ + if actual is not unset: + kwargs["actual"] = actual + if check_type is not unset: + kwargs["check_type"] = check_type + if expected is not unset: + kwargs["expected"] = expected + if has_secure_variables is not unset: + kwargs["has_secure_variables"] = has_secure_variables + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_step_element_updates.py b/src/datadog_api_client/v2/model/synthetics_test_result_step_element_updates.py new file mode 100644 index 0000000000..706fbef6ca --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_step_element_updates.py @@ -0,0 +1,56 @@ +# 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. +from __future__ import annotations + +from typing import Dict, Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class SyntheticsTestResultStepElementUpdates(ModelNormal): + @cached_property + def openapi_types(_): + return { + "multi_locator": ({str: (str,)},), + "target_outer_html": (str,), + "version": (int,), + } + + attribute_map = { + "multi_locator": "multi_locator", + "target_outer_html": "target_outer_html", + "version": "version", + } + + def __init__( + self_, + multi_locator: Union[Dict[str, str], UnsetType] = unset, + target_outer_html: Union[str, UnsetType] = unset, + version: Union[int, UnsetType] = unset, + **kwargs, + ): + """ + Element locator updates produced during a step. + + :param multi_locator: Updated multi-locator definition. + :type multi_locator: {str: (str,)}, optional + + :param target_outer_html: Updated outer HTML of the targeted element. + :type target_outer_html: str, optional + + :param version: Version of the element locator definition. + :type version: int, optional + """ + if multi_locator is not unset: + kwargs["multi_locator"] = multi_locator + if target_outer_html is not unset: + kwargs["target_outer_html"] = target_outer_html + if version is not unset: + kwargs["version"] = version + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_steps_info.py b/src/datadog_api_client/v2/model/synthetics_test_result_steps_info.py new file mode 100644 index 0000000000..ab6d249fff --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_steps_info.py @@ -0,0 +1,56 @@ +# 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. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class SyntheticsTestResultStepsInfo(ModelNormal): + @cached_property + def openapi_types(_): + return { + "completed": (int,), + "errors": (int,), + "total": (int,), + } + + attribute_map = { + "completed": "completed", + "errors": "errors", + "total": "total", + } + + def __init__( + self_, + completed: Union[int, UnsetType] = unset, + errors: Union[int, UnsetType] = unset, + total: Union[int, UnsetType] = unset, + **kwargs, + ): + """ + Step execution summary for a Synthetic test result. + + :param completed: Number of completed steps. + :type completed: int, optional + + :param errors: Number of steps with errors. + :type errors: int, optional + + :param total: Total number of steps. + :type total: int, optional + """ + if completed is not unset: + kwargs["completed"] = completed + if errors is not unset: + kwargs["errors"] = errors + if total is not unset: + kwargs["total"] = total + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_sub_step.py b/src/datadog_api_client/v2/model/synthetics_test_result_sub_step.py new file mode 100644 index 0000000000..8f8c470f83 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_sub_step.py @@ -0,0 +1,64 @@ +# 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. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_test_result_parent_step import SyntheticsTestResultParentStep + from datadog_api_client.v2.model.synthetics_test_result_parent_test import SyntheticsTestResultParentTest + + +class SyntheticsTestResultSubStep(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_test_result_parent_step import SyntheticsTestResultParentStep + from datadog_api_client.v2.model.synthetics_test_result_parent_test import SyntheticsTestResultParentTest + + return { + "level": (int,), + "parent_step": (SyntheticsTestResultParentStep,), + "parent_test": (SyntheticsTestResultParentTest,), + } + + attribute_map = { + "level": "level", + "parent_step": "parent_step", + "parent_test": "parent_test", + } + + def __init__( + self_, + level: Union[int, UnsetType] = unset, + parent_step: Union[SyntheticsTestResultParentStep, UnsetType] = unset, + parent_test: Union[SyntheticsTestResultParentTest, UnsetType] = unset, + **kwargs, + ): + """ + Information about a sub-step in a nested test execution. + + :param level: Depth of the sub-step in the execution tree. + :type level: int, optional + + :param parent_step: Reference to the parent step of a sub-step. + :type parent_step: SyntheticsTestResultParentStep, optional + + :param parent_test: Reference to the parent test of a sub-step. + :type parent_test: SyntheticsTestResultParentTest, optional + """ + if level is not unset: + kwargs["level"] = level + if parent_step is not unset: + kwargs["parent_step"] = parent_step + if parent_test is not unset: + kwargs["parent_test"] = parent_test + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_sub_test.py b/src/datadog_api_client/v2/model/synthetics_test_result_sub_test.py new file mode 100644 index 0000000000..9db8c37d4d --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_sub_test.py @@ -0,0 +1,62 @@ +# 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. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_test_result_rum_context import SyntheticsTestResultRumContext + + +class SyntheticsTestResultSubTest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_test_result_rum_context import SyntheticsTestResultRumContext + + return { + "id": (str,), + "playing_tab": (int,), + "rum_context": (SyntheticsTestResultRumContext,), + } + + attribute_map = { + "id": "id", + "playing_tab": "playing_tab", + "rum_context": "rum_context", + } + + def __init__( + self_, + id: Union[str, UnsetType] = unset, + playing_tab: Union[int, UnsetType] = unset, + rum_context: Union[SyntheticsTestResultRumContext, UnsetType] = unset, + **kwargs, + ): + """ + Information about a sub-test played from a parent browser test. + + :param id: Identifier of the sub-test. + :type id: str, optional + + :param playing_tab: Index of the browser tab playing the sub-test. + :type playing_tab: int, optional + + :param rum_context: RUM application context associated with a step or sub-test. + :type rum_context: SyntheticsTestResultRumContext, optional + """ + if id is not unset: + kwargs["id"] = id + if playing_tab is not unset: + kwargs["playing_tab"] = playing_tab + if rum_context is not unset: + kwargs["rum_context"] = rum_context + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_summary_attributes.py b/src/datadog_api_client/v2/model/synthetics_test_result_summary_attributes.py new file mode 100644 index 0000000000..307478809c --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_summary_attributes.py @@ -0,0 +1,132 @@ +# 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. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_test_result_device import SyntheticsTestResultDevice + from datadog_api_client.v2.model.synthetics_test_result_execution_info import SyntheticsTestResultExecutionInfo + from datadog_api_client.v2.model.synthetics_test_result_location import SyntheticsTestResultLocation + from datadog_api_client.v2.model.synthetics_test_result_run_type import SyntheticsTestResultRunType + from datadog_api_client.v2.model.synthetics_test_result_status import SyntheticsTestResultStatus + from datadog_api_client.v2.model.synthetics_test_result_steps_info import SyntheticsTestResultStepsInfo + from datadog_api_client.v2.model.synthetics_test_sub_type import SyntheticsTestSubType + from datadog_api_client.v2.model.synthetics_test_type import SyntheticsTestType + + +class SyntheticsTestResultSummaryAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_test_result_device import SyntheticsTestResultDevice + from datadog_api_client.v2.model.synthetics_test_result_execution_info import SyntheticsTestResultExecutionInfo + from datadog_api_client.v2.model.synthetics_test_result_location import SyntheticsTestResultLocation + from datadog_api_client.v2.model.synthetics_test_result_run_type import SyntheticsTestResultRunType + from datadog_api_client.v2.model.synthetics_test_result_status import SyntheticsTestResultStatus + from datadog_api_client.v2.model.synthetics_test_result_steps_info import SyntheticsTestResultStepsInfo + from datadog_api_client.v2.model.synthetics_test_sub_type import SyntheticsTestSubType + from datadog_api_client.v2.model.synthetics_test_type import SyntheticsTestType + + return { + "device": (SyntheticsTestResultDevice,), + "execution_info": (SyntheticsTestResultExecutionInfo,), + "finished_at": (int,), + "location": (SyntheticsTestResultLocation,), + "run_type": (SyntheticsTestResultRunType,), + "started_at": (int,), + "status": (SyntheticsTestResultStatus,), + "steps_info": (SyntheticsTestResultStepsInfo,), + "test_sub_type": (SyntheticsTestSubType,), + "test_type": (SyntheticsTestType,), + } + + attribute_map = { + "device": "device", + "execution_info": "execution_info", + "finished_at": "finished_at", + "location": "location", + "run_type": "run_type", + "started_at": "started_at", + "status": "status", + "steps_info": "steps_info", + "test_sub_type": "test_sub_type", + "test_type": "test_type", + } + + def __init__( + self_, + device: Union[SyntheticsTestResultDevice, UnsetType] = unset, + execution_info: Union[SyntheticsTestResultExecutionInfo, UnsetType] = unset, + finished_at: Union[int, UnsetType] = unset, + location: Union[SyntheticsTestResultLocation, UnsetType] = unset, + run_type: Union[SyntheticsTestResultRunType, UnsetType] = unset, + started_at: Union[int, UnsetType] = unset, + status: Union[SyntheticsTestResultStatus, UnsetType] = unset, + steps_info: Union[SyntheticsTestResultStepsInfo, UnsetType] = unset, + test_sub_type: Union[SyntheticsTestSubType, UnsetType] = unset, + test_type: Union[SyntheticsTestType, UnsetType] = unset, + **kwargs, + ): + """ + Attributes of a Synthetic test result summary. + + :param device: Device information for the test result (browser and mobile tests). + :type device: SyntheticsTestResultDevice, optional + + :param execution_info: Execution details for a Synthetic test result. + :type execution_info: SyntheticsTestResultExecutionInfo, optional + + :param finished_at: Timestamp of when the test finished (in milliseconds). + :type finished_at: int, optional + + :param location: Location information for a Synthetic test result. + :type location: SyntheticsTestResultLocation, optional + + :param run_type: The type of run for a Synthetic test result. + :type run_type: SyntheticsTestResultRunType, optional + + :param started_at: Timestamp of when the test started (in milliseconds). + :type started_at: int, optional + + :param status: Status of a Synthetic test result. + :type status: SyntheticsTestResultStatus, optional + + :param steps_info: Step execution summary for a Synthetic test result. + :type steps_info: SyntheticsTestResultStepsInfo, optional + + :param test_sub_type: Subtype of the Synthetic test that produced this result. + :type test_sub_type: SyntheticsTestSubType, optional + + :param test_type: Type of the Synthetic test that produced this result. + :type test_type: SyntheticsTestType, optional + """ + if device is not unset: + kwargs["device"] = device + if execution_info is not unset: + kwargs["execution_info"] = execution_info + if finished_at is not unset: + kwargs["finished_at"] = finished_at + if location is not unset: + kwargs["location"] = location + if run_type is not unset: + kwargs["run_type"] = run_type + if started_at is not unset: + kwargs["started_at"] = started_at + if status is not unset: + kwargs["status"] = status + if steps_info is not unset: + kwargs["steps_info"] = steps_info + if test_sub_type is not unset: + kwargs["test_sub_type"] = test_sub_type + if test_type is not unset: + kwargs["test_type"] = test_type + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_summary_data.py b/src/datadog_api_client/v2/model/synthetics_test_result_summary_data.py new file mode 100644 index 0000000000..104988f4f8 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_summary_data.py @@ -0,0 +1,78 @@ +# 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. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_test_result_summary_attributes import ( + SyntheticsTestResultSummaryAttributes, + ) + from datadog_api_client.v2.model.synthetics_test_result_relationships import SyntheticsTestResultRelationships + from datadog_api_client.v2.model.synthetics_test_result_summary_type import SyntheticsTestResultSummaryType + + +class SyntheticsTestResultSummaryData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_test_result_summary_attributes import ( + SyntheticsTestResultSummaryAttributes, + ) + from datadog_api_client.v2.model.synthetics_test_result_relationships import SyntheticsTestResultRelationships + from datadog_api_client.v2.model.synthetics_test_result_summary_type import SyntheticsTestResultSummaryType + + return { + "attributes": (SyntheticsTestResultSummaryAttributes,), + "id": (str,), + "relationships": (SyntheticsTestResultRelationships,), + "type": (SyntheticsTestResultSummaryType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "relationships": "relationships", + "type": "type", + } + + def __init__( + self_, + attributes: Union[SyntheticsTestResultSummaryAttributes, UnsetType] = unset, + id: Union[str, UnsetType] = unset, + relationships: Union[SyntheticsTestResultRelationships, UnsetType] = unset, + type: Union[SyntheticsTestResultSummaryType, UnsetType] = unset, + **kwargs, + ): + """ + Wrapper object for a Synthetic test result summary. + + :param attributes: Attributes of a Synthetic test result summary. + :type attributes: SyntheticsTestResultSummaryAttributes, optional + + :param id: The result ID. + :type id: str, optional + + :param relationships: Relationships for a Synthetic test result. + :type relationships: SyntheticsTestResultRelationships, optional + + :param type: Type of the Synthetic test result summary resource, ``result_summary``. + :type type: SyntheticsTestResultSummaryType, optional + """ + if attributes is not unset: + kwargs["attributes"] = attributes + if id is not unset: + kwargs["id"] = id + if relationships is not unset: + kwargs["relationships"] = relationships + if type is not unset: + kwargs["type"] = type + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_summary_type.py b/src/datadog_api_client/v2/model/synthetics_test_result_summary_type.py new file mode 100644 index 0000000000..0cab3bc476 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_summary_type.py @@ -0,0 +1,35 @@ +# 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. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class SyntheticsTestResultSummaryType(ModelSimple): + """ + Type of the Synthetic test result summary resource, `result_summary`. + + :param value: If omitted defaults to "result_summary". Must be one of ["result_summary"]. + :type value: str + """ + + allowed_values = { + "result_summary", + } + RESULT_SUMMARY: ClassVar["SyntheticsTestResultSummaryType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +SyntheticsTestResultSummaryType.RESULT_SUMMARY = SyntheticsTestResultSummaryType("result_summary") diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_tab.py b/src/datadog_api_client/v2/model/synthetics_test_result_tab.py new file mode 100644 index 0000000000..1ac54399e3 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_tab.py @@ -0,0 +1,56 @@ +# 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. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class SyntheticsTestResultTab(ModelNormal): + @cached_property + def openapi_types(_): + return { + "focused": (bool,), + "title": (str,), + "url": (str,), + } + + attribute_map = { + "focused": "focused", + "title": "title", + "url": "url", + } + + def __init__( + self_, + focused: Union[bool, UnsetType] = unset, + title: Union[str, UnsetType] = unset, + url: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Information about a browser tab involved in a step. + + :param focused: Whether the tab was focused during the step. + :type focused: bool, optional + + :param title: Title of the tab. + :type title: str, optional + + :param url: URL loaded in the tab. + :type url: str, optional + """ + if focused is not unset: + kwargs["focused"] = focused + if title is not unset: + kwargs["title"] = title + if url is not unset: + kwargs["url"] = url + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_trace.py b/src/datadog_api_client/v2/model/synthetics_test_result_trace.py new file mode 100644 index 0000000000..0867a12708 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_trace.py @@ -0,0 +1,43 @@ +# 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. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class SyntheticsTestResultTrace(ModelNormal): + @cached_property + def openapi_types(_): + return { + "id": (str,), + "otel_id": (str,), + } + + attribute_map = { + "id": "id", + "otel_id": "otel_id", + } + + def __init__(self_, id: Union[str, UnsetType] = unset, otel_id: Union[str, UnsetType] = unset, **kwargs): + """ + Trace identifiers associated with a Synthetic test result. + + :param id: Datadog APM trace identifier. + :type id: str, optional + + :param otel_id: OpenTelemetry trace identifier. + :type otel_id: str, optional + """ + if id is not unset: + kwargs["id"] = id + if otel_id is not unset: + kwargs["otel_id"] = otel_id + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_traceroute_hop.py b/src/datadog_api_client/v2/model/synthetics_test_result_traceroute_hop.py new file mode 100644 index 0000000000..a17791bf8e --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_traceroute_hop.py @@ -0,0 +1,106 @@ +# 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. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_test_result_network_latency import SyntheticsTestResultNetworkLatency + from datadog_api_client.v2.model.synthetics_test_result_router import SyntheticsTestResultRouter + + +class SyntheticsTestResultTracerouteHop(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_test_result_network_latency import ( + SyntheticsTestResultNetworkLatency, + ) + from datadog_api_client.v2.model.synthetics_test_result_router import SyntheticsTestResultRouter + + return { + "host": (str,), + "latency": (SyntheticsTestResultNetworkLatency,), + "packet_loss_percentage": (float,), + "packet_size": (int,), + "packets_received": (int,), + "packets_sent": (int,), + "resolved_ip": (str,), + "routers": ([SyntheticsTestResultRouter],), + } + + attribute_map = { + "host": "host", + "latency": "latency", + "packet_loss_percentage": "packet_loss_percentage", + "packet_size": "packet_size", + "packets_received": "packets_received", + "packets_sent": "packets_sent", + "resolved_ip": "resolved_ip", + "routers": "routers", + } + + def __init__( + self_, + host: Union[str, UnsetType] = unset, + latency: Union[SyntheticsTestResultNetworkLatency, UnsetType] = unset, + packet_loss_percentage: Union[float, UnsetType] = unset, + packet_size: Union[int, UnsetType] = unset, + packets_received: Union[int, UnsetType] = unset, + packets_sent: Union[int, UnsetType] = unset, + resolved_ip: Union[str, UnsetType] = unset, + routers: Union[List[SyntheticsTestResultRouter], UnsetType] = unset, + **kwargs, + ): + """ + A network probe result, used for traceroute hops and ping summaries. + + :param host: Target hostname. + :type host: str, optional + + :param latency: Latency statistics for a network probe. + :type latency: SyntheticsTestResultNetworkLatency, optional + + :param packet_loss_percentage: Percentage of probe packets lost. + :type packet_loss_percentage: float, optional + + :param packet_size: Size of each probe packet in bytes. + :type packet_size: int, optional + + :param packets_received: Number of probe packets received. + :type packets_received: int, optional + + :param packets_sent: Number of probe packets sent. + :type packets_sent: int, optional + + :param resolved_ip: Resolved IP address for the target. + :type resolved_ip: str, optional + + :param routers: List of intermediate routers for the traceroute. + :type routers: [SyntheticsTestResultRouter], optional + """ + if host is not unset: + kwargs["host"] = host + if latency is not unset: + kwargs["latency"] = latency + if packet_loss_percentage is not unset: + kwargs["packet_loss_percentage"] = packet_loss_percentage + if packet_size is not unset: + kwargs["packet_size"] = packet_size + if packets_received is not unset: + kwargs["packets_received"] = packets_received + if packets_sent is not unset: + kwargs["packets_sent"] = packets_sent + if resolved_ip is not unset: + kwargs["resolved_ip"] = resolved_ip + if routers is not unset: + kwargs["routers"] = routers + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_turn.py b/src/datadog_api_client/v2/model/synthetics_test_result_turn.py new file mode 100644 index 0000000000..81422f0878 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_turn.py @@ -0,0 +1,96 @@ +# 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. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_test_result_bucket_keys import SyntheticsTestResultBucketKeys + from datadog_api_client.v2.model.synthetics_test_result_turn_step import SyntheticsTestResultTurnStep + + +class SyntheticsTestResultTurn(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_test_result_bucket_keys import SyntheticsTestResultBucketKeys + from datadog_api_client.v2.model.synthetics_test_result_turn_step import SyntheticsTestResultTurnStep + + return { + "bucket_keys": (SyntheticsTestResultBucketKeys,), + "name": (str,), + "reasoning": (str,), + "status": (str,), + "steps": ([SyntheticsTestResultTurnStep],), + "turn_finished_at": (int,), + "turn_started_at": (int,), + } + + attribute_map = { + "bucket_keys": "bucket_keys", + "name": "name", + "reasoning": "reasoning", + "status": "status", + "steps": "steps", + "turn_finished_at": "turn_finished_at", + "turn_started_at": "turn_started_at", + } + + def __init__( + self_, + bucket_keys: Union[SyntheticsTestResultBucketKeys, UnsetType] = unset, + name: Union[str, UnsetType] = unset, + reasoning: Union[str, UnsetType] = unset, + status: Union[str, UnsetType] = unset, + steps: Union[List[SyntheticsTestResultTurnStep], UnsetType] = unset, + turn_finished_at: Union[int, UnsetType] = unset, + turn_started_at: Union[int, UnsetType] = unset, + **kwargs, + ): + """ + A turn in a goal-based browser test, grouping steps and reasoning. + + :param bucket_keys: Storage bucket keys for artifacts produced during a step or test. + :type bucket_keys: SyntheticsTestResultBucketKeys, optional + + :param name: Name of the turn. + :type name: str, optional + + :param reasoning: Agent reasoning produced for this turn. + :type reasoning: str, optional + + :param status: Status of the turn (for example, ``passed`` , ``failed`` ). + :type status: str, optional + + :param steps: Steps executed during the turn. + :type steps: [SyntheticsTestResultTurnStep], optional + + :param turn_finished_at: Unix timestamp (ms) of when the turn finished. + :type turn_finished_at: int, optional + + :param turn_started_at: Unix timestamp (ms) of when the turn started. + :type turn_started_at: int, optional + """ + if bucket_keys is not unset: + kwargs["bucket_keys"] = bucket_keys + if name is not unset: + kwargs["name"] = name + if reasoning is not unset: + kwargs["reasoning"] = reasoning + if status is not unset: + kwargs["status"] = status + if steps is not unset: + kwargs["steps"] = steps + if turn_finished_at is not unset: + kwargs["turn_finished_at"] = turn_finished_at + if turn_started_at is not unset: + kwargs["turn_started_at"] = turn_started_at + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_turn_step.py b/src/datadog_api_client/v2/model/synthetics_test_result_turn_step.py new file mode 100644 index 0000000000..ac9754a263 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_turn_step.py @@ -0,0 +1,73 @@ +# 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. +from __future__ import annotations + +from typing import Any, Dict, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + date, + datetime, + none_type, + unset, + UnsetType, + UUID, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_test_result_bucket_keys import SyntheticsTestResultBucketKeys + + +class SyntheticsTestResultTurnStep(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_test_result_bucket_keys import SyntheticsTestResultBucketKeys + + return { + "bucket_keys": (SyntheticsTestResultBucketKeys,), + "config": ( + { + str: ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + UUID, + none_type, + ) + }, + ), + } + + attribute_map = { + "bucket_keys": "bucket_keys", + "config": "config", + } + + def __init__( + self_, + bucket_keys: Union[SyntheticsTestResultBucketKeys, UnsetType] = unset, + config: Union[Dict[str, Any], UnsetType] = unset, + **kwargs, + ): + """ + A step executed during a goal-based browser test turn. + + :param bucket_keys: Storage bucket keys for artifacts produced during a step or test. + :type bucket_keys: SyntheticsTestResultBucketKeys, optional + + :param config: Browser step configuration for this turn step. + :type config: {str: (bool, date, datetime, dict, float, int, list, str, UUID, none_type,)}, optional + """ + if bucket_keys is not unset: + kwargs["bucket_keys"] = bucket_keys + if config is not unset: + kwargs["config"] = config + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_type.py b/src/datadog_api_client/v2/model/synthetics_test_result_type.py new file mode 100644 index 0000000000..f4fbdb0c44 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_type.py @@ -0,0 +1,35 @@ +# 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. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class SyntheticsTestResultType(ModelSimple): + """ + Type of the Synthetic test result resource, `result`. + + :param value: If omitted defaults to "result". Must be one of ["result"]. + :type value: str + """ + + allowed_values = { + "result", + } + RESULT: ClassVar["SyntheticsTestResultType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +SyntheticsTestResultType.RESULT = SyntheticsTestResultType("result") diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_variable.py b/src/datadog_api_client/v2/model/synthetics_test_result_variable.py new file mode 100644 index 0000000000..bd18a1ea24 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_variable.py @@ -0,0 +1,112 @@ +# 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. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class SyntheticsTestResultVariable(ModelNormal): + @cached_property + def openapi_types(_): + return { + "err": (str,), + "error_message": (str,), + "example": (str,), + "id": (str,), + "name": (str,), + "pattern": (str,), + "secure": (bool,), + "type": (str,), + "val": (str,), + "value": (str,), + } + + attribute_map = { + "err": "err", + "error_message": "error_message", + "example": "example", + "id": "id", + "name": "name", + "pattern": "pattern", + "secure": "secure", + "type": "type", + "val": "val", + "value": "value", + } + + def __init__( + self_, + err: Union[str, UnsetType] = unset, + error_message: Union[str, UnsetType] = unset, + example: Union[str, UnsetType] = unset, + id: Union[str, UnsetType] = unset, + name: Union[str, UnsetType] = unset, + pattern: Union[str, UnsetType] = unset, + secure: Union[bool, UnsetType] = unset, + type: Union[str, UnsetType] = unset, + val: Union[str, UnsetType] = unset, + value: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + A variable used or extracted during a test. + + :param err: Error encountered when evaluating the variable. + :type err: str, optional + + :param error_message: Human-readable error message for variable evaluation. + :type error_message: str, optional + + :param example: Example value for the variable. + :type example: str, optional + + :param id: Variable identifier. + :type id: str, optional + + :param name: Variable name. + :type name: str, optional + + :param pattern: Pattern used to extract the variable. + :type pattern: str, optional + + :param secure: Whether the variable holds a secure value. + :type secure: bool, optional + + :param type: Variable type. + :type type: str, optional + + :param val: Evaluated value of the variable. + :type val: str, optional + + :param value: Current value of the variable. + :type value: str, optional + """ + if err is not unset: + kwargs["err"] = err + if error_message is not unset: + kwargs["error_message"] = error_message + if example is not unset: + kwargs["example"] = example + if id is not unset: + kwargs["id"] = id + if name is not unset: + kwargs["name"] = name + if pattern is not unset: + kwargs["pattern"] = pattern + if secure is not unset: + kwargs["secure"] = secure + if type is not unset: + kwargs["type"] = type + if val is not unset: + kwargs["val"] = val + if value is not unset: + kwargs["value"] = value + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_variables.py b/src/datadog_api_client/v2/model/synthetics_test_result_variables.py new file mode 100644 index 0000000000..7a2fa26580 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_variables.py @@ -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. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_test_result_variable import SyntheticsTestResultVariable + + +class SyntheticsTestResultVariables(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_test_result_variable import SyntheticsTestResultVariable + + return { + "config": ([SyntheticsTestResultVariable],), + "extracted": ([SyntheticsTestResultVariable],), + } + + attribute_map = { + "config": "config", + "extracted": "extracted", + } + + def __init__( + self_, + config: Union[List[SyntheticsTestResultVariable], UnsetType] = unset, + extracted: Union[List[SyntheticsTestResultVariable], UnsetType] = unset, + **kwargs, + ): + """ + Variables captured during a test step. + + :param config: Variables defined in the test configuration. + :type config: [SyntheticsTestResultVariable], optional + + :param extracted: Variables extracted during the test execution. + :type extracted: [SyntheticsTestResultVariable], optional + """ + if config is not unset: + kwargs["config"] = config + if extracted is not unset: + kwargs["extracted"] = extracted + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_vitals_metrics.py b/src/datadog_api_client/v2/model/synthetics_test_result_vitals_metrics.py new file mode 100644 index 0000000000..737922d51b --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_vitals_metrics.py @@ -0,0 +1,80 @@ +# 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. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class SyntheticsTestResultVitalsMetrics(ModelNormal): + @cached_property + def openapi_types(_): + return { + "_cls": (float,), + "fcp": (float,), + "inp": (float,), + "lcp": (float,), + "ttfb": (float,), + "url": (str,), + } + + attribute_map = { + "_cls": "cls", + "fcp": "fcp", + "inp": "inp", + "lcp": "lcp", + "ttfb": "ttfb", + "url": "url", + } + + def __init__( + self_, + _cls: Union[float, UnsetType] = unset, + fcp: Union[float, UnsetType] = unset, + inp: Union[float, UnsetType] = unset, + lcp: Union[float, UnsetType] = unset, + ttfb: Union[float, UnsetType] = unset, + url: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Web vitals metrics captured during a browser test step. + + :param _cls: Cumulative Layout Shift score. + :type _cls: float, optional + + :param fcp: First Contentful Paint in milliseconds. + :type fcp: float, optional + + :param inp: Interaction to Next Paint in milliseconds. + :type inp: float, optional + + :param lcp: Largest Contentful Paint in milliseconds. + :type lcp: float, optional + + :param ttfb: Time To First Byte in milliseconds. + :type ttfb: float, optional + + :param url: URL that produced the metrics. + :type url: str, optional + """ + if _cls is not unset: + kwargs["_cls"] = _cls + if fcp is not unset: + kwargs["fcp"] = fcp + if inp is not unset: + kwargs["inp"] = inp + if lcp is not unset: + kwargs["lcp"] = lcp + if ttfb is not unset: + kwargs["ttfb"] = ttfb + if url is not unset: + kwargs["url"] = url + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_warning.py b/src/datadog_api_client/v2/model/synthetics_test_result_warning.py new file mode 100644 index 0000000000..ef998280f4 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_warning.py @@ -0,0 +1,62 @@ +# 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. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.synthetics_test_result_bounds import SyntheticsTestResultBounds + + +class SyntheticsTestResultWarning(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.synthetics_test_result_bounds import SyntheticsTestResultBounds + + return { + "element_bounds": ([SyntheticsTestResultBounds],), + "message": (str,), + "type": (str,), + } + + attribute_map = { + "element_bounds": "element_bounds", + "message": "message", + "type": "type", + } + + def __init__( + self_, + element_bounds: Union[List[SyntheticsTestResultBounds], UnsetType] = unset, + message: Union[str, UnsetType] = unset, + type: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + A warning captured during a browser test step. + + :param element_bounds: Bounds of elements related to the warning. + :type element_bounds: [SyntheticsTestResultBounds], optional + + :param message: Warning message. + :type message: str, optional + + :param type: Type of the warning. + :type type: str, optional + """ + if element_bounds is not unset: + kwargs["element_bounds"] = element_bounds + if message is not unset: + kwargs["message"] = message + if type is not unset: + kwargs["type"] = type + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_result_web_socket_close.py b/src/datadog_api_client/v2/model/synthetics_test_result_web_socket_close.py new file mode 100644 index 0000000000..47bb996563 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_result_web_socket_close.py @@ -0,0 +1,43 @@ +# 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. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class SyntheticsTestResultWebSocketClose(ModelNormal): + @cached_property + def openapi_types(_): + return { + "reason": (str,), + "status_code": (int,), + } + + attribute_map = { + "reason": "reason", + "status_code": "status_code", + } + + def __init__(self_, reason: Union[str, UnsetType] = unset, status_code: Union[int, UnsetType] = unset, **kwargs): + """ + WebSocket close frame information for WebSocket test responses. + + :param reason: Reason string received in the close frame. + :type reason: str, optional + + :param status_code: Status code received in the close frame. + :type status_code: int, optional + """ + if reason is not unset: + kwargs["reason"] = reason + if status_code is not unset: + kwargs["status_code"] = status_code + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/synthetics_test_sub_type.py b/src/datadog_api_client/v2/model/synthetics_test_sub_type.py new file mode 100644 index 0000000000..c7d7606a15 --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_sub_type.py @@ -0,0 +1,62 @@ +# 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. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class SyntheticsTestSubType(ModelSimple): + """ + Subtype of the Synthetic test that produced this result. + + :param value: Must be one of ["dns", "grpc", "http", "icmp", "mcp", "multi", "ssl", "tcp", "udp", "websocket"]. + :type value: str + """ + + allowed_values = { + "dns", + "grpc", + "http", + "icmp", + "mcp", + "multi", + "ssl", + "tcp", + "udp", + "websocket", + } + DNS: ClassVar["SyntheticsTestSubType"] + GRPC: ClassVar["SyntheticsTestSubType"] + HTTP: ClassVar["SyntheticsTestSubType"] + ICMP: ClassVar["SyntheticsTestSubType"] + MCP: ClassVar["SyntheticsTestSubType"] + MULTI: ClassVar["SyntheticsTestSubType"] + SSL: ClassVar["SyntheticsTestSubType"] + TCP: ClassVar["SyntheticsTestSubType"] + UDP: ClassVar["SyntheticsTestSubType"] + WEBSOCKET: ClassVar["SyntheticsTestSubType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +SyntheticsTestSubType.DNS = SyntheticsTestSubType("dns") +SyntheticsTestSubType.GRPC = SyntheticsTestSubType("grpc") +SyntheticsTestSubType.HTTP = SyntheticsTestSubType("http") +SyntheticsTestSubType.ICMP = SyntheticsTestSubType("icmp") +SyntheticsTestSubType.MCP = SyntheticsTestSubType("mcp") +SyntheticsTestSubType.MULTI = SyntheticsTestSubType("multi") +SyntheticsTestSubType.SSL = SyntheticsTestSubType("ssl") +SyntheticsTestSubType.TCP = SyntheticsTestSubType("tcp") +SyntheticsTestSubType.UDP = SyntheticsTestSubType("udp") +SyntheticsTestSubType.WEBSOCKET = SyntheticsTestSubType("websocket") diff --git a/src/datadog_api_client/v2/model/synthetics_test_type.py b/src/datadog_api_client/v2/model/synthetics_test_type.py new file mode 100644 index 0000000000..7380c8460d --- /dev/null +++ b/src/datadog_api_client/v2/model/synthetics_test_type.py @@ -0,0 +1,44 @@ +# 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. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class SyntheticsTestType(ModelSimple): + """ + Type of the Synthetic test that produced this result. + + :param value: Must be one of ["api", "browser", "mobile", "network"]. + :type value: str + """ + + allowed_values = { + "api", + "browser", + "mobile", + "network", + } + API: ClassVar["SyntheticsTestType"] + BROWSER: ClassVar["SyntheticsTestType"] + MOBILE: ClassVar["SyntheticsTestType"] + NETWORK: ClassVar["SyntheticsTestType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +SyntheticsTestType.API = SyntheticsTestType("api") +SyntheticsTestType.BROWSER = SyntheticsTestType("browser") +SyntheticsTestType.MOBILE = SyntheticsTestType("mobile") +SyntheticsTestType.NETWORK = SyntheticsTestType("network") diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 438d9b8f88..2eb9447a65 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -6503,18 +6503,13 @@ from datadog_api_client.v2.model.synthetics_api_multistep_subtests_response import ( SyntheticsApiMultistepSubtestsResponse, ) -from datadog_api_client.v2.model.synthetics_fast_test_assertion_result import SyntheticsFastTestAssertionResult from datadog_api_client.v2.model.synthetics_fast_test_result import SyntheticsFastTestResult from datadog_api_client.v2.model.synthetics_fast_test_result_attributes import SyntheticsFastTestResultAttributes from datadog_api_client.v2.model.synthetics_fast_test_result_data import SyntheticsFastTestResultData from datadog_api_client.v2.model.synthetics_fast_test_result_detail import SyntheticsFastTestResultDetail -from datadog_api_client.v2.model.synthetics_fast_test_result_device import SyntheticsFastTestResultDevice -from datadog_api_client.v2.model.synthetics_fast_test_result_failure import SyntheticsFastTestResultFailure -from datadog_api_client.v2.model.synthetics_fast_test_result_location import SyntheticsFastTestResultLocation from datadog_api_client.v2.model.synthetics_fast_test_result_type import SyntheticsFastTestResultType -from datadog_api_client.v2.model.synthetics_fast_test_step_result import SyntheticsFastTestStepResult from datadog_api_client.v2.model.synthetics_fast_test_sub_type import SyntheticsFastTestSubType -from datadog_api_client.v2.model.synthetics_fast_test_traceroute_hop import SyntheticsFastTestTracerouteHop +from datadog_api_client.v2.model.synthetics_fast_test_type import SyntheticsFastTestType from datadog_api_client.v2.model.synthetics_global_variable import SyntheticsGlobalVariable from datadog_api_client.v2.model.synthetics_global_variable_attributes import SyntheticsGlobalVariableAttributes from datadog_api_client.v2.model.synthetics_global_variable_options import SyntheticsGlobalVariableOptions @@ -6559,6 +6554,7 @@ from datadog_api_client.v2.model.synthetics_network_test_response_type import SyntheticsNetworkTestResponseType from datadog_api_client.v2.model.synthetics_network_test_sub_type import SyntheticsNetworkTestSubType from datadog_api_client.v2.model.synthetics_network_test_type import SyntheticsNetworkTestType +from datadog_api_client.v2.model.synthetics_poll_test_results_response import SyntheticsPollTestResultsResponse from datadog_api_client.v2.model.synthetics_suite import SyntheticsSuite from datadog_api_client.v2.model.synthetics_suite_options import SyntheticsSuiteOptions from datadog_api_client.v2.model.synthetics_suite_response import SyntheticsSuiteResponse @@ -6600,6 +6596,7 @@ from datadog_api_client.v2.model.synthetics_test_file_multipart_presigned_urls_response import ( SyntheticsTestFileMultipartPresignedUrlsResponse, ) +from datadog_api_client.v2.model.synthetics_test_latest_results_response import SyntheticsTestLatestResultsResponse from datadog_api_client.v2.model.synthetics_test_options import SyntheticsTestOptions from datadog_api_client.v2.model.synthetics_test_options_monitor_options import SyntheticsTestOptionsMonitorOptions from datadog_api_client.v2.model.synthetics_test_options_monitor_options_notification_preset_name import ( @@ -6615,6 +6612,98 @@ from datadog_api_client.v2.model.synthetics_test_parent_suite_type import SyntheticsTestParentSuiteType from datadog_api_client.v2.model.synthetics_test_parent_suites_response import SyntheticsTestParentSuitesResponse from datadog_api_client.v2.model.synthetics_test_pause_status import SyntheticsTestPauseStatus +from datadog_api_client.v2.model.synthetics_test_result_assertion_result import SyntheticsTestResultAssertionResult +from datadog_api_client.v2.model.synthetics_test_result_attributes import SyntheticsTestResultAttributes +from datadog_api_client.v2.model.synthetics_test_result_batch import SyntheticsTestResultBatch +from datadog_api_client.v2.model.synthetics_test_result_bounds import SyntheticsTestResultBounds +from datadog_api_client.v2.model.synthetics_test_result_browser_error import SyntheticsTestResultBrowserError +from datadog_api_client.v2.model.synthetics_test_result_bucket_keys import SyntheticsTestResultBucketKeys +from datadog_api_client.v2.model.synthetics_test_result_ci import SyntheticsTestResultCI +from datadog_api_client.v2.model.synthetics_test_result_ci_pipeline import SyntheticsTestResultCIPipeline +from datadog_api_client.v2.model.synthetics_test_result_ci_provider import SyntheticsTestResultCIProvider +from datadog_api_client.v2.model.synthetics_test_result_ci_stage import SyntheticsTestResultCIStage +from datadog_api_client.v2.model.synthetics_test_result_cdn_cache_status import SyntheticsTestResultCdnCacheStatus +from datadog_api_client.v2.model.synthetics_test_result_cdn_provider_info import SyntheticsTestResultCdnProviderInfo +from datadog_api_client.v2.model.synthetics_test_result_cdn_resource import SyntheticsTestResultCdnResource +from datadog_api_client.v2.model.synthetics_test_result_certificate import SyntheticsTestResultCertificate +from datadog_api_client.v2.model.synthetics_test_result_certificate_validity import ( + SyntheticsTestResultCertificateValidity, +) +from datadog_api_client.v2.model.synthetics_test_result_data import SyntheticsTestResultData +from datadog_api_client.v2.model.synthetics_test_result_detail import SyntheticsTestResultDetail +from datadog_api_client.v2.model.synthetics_test_result_device import SyntheticsTestResultDevice +from datadog_api_client.v2.model.synthetics_test_result_device_browser import SyntheticsTestResultDeviceBrowser +from datadog_api_client.v2.model.synthetics_test_result_device_platform import SyntheticsTestResultDevicePlatform +from datadog_api_client.v2.model.synthetics_test_result_device_resolution import SyntheticsTestResultDeviceResolution +from datadog_api_client.v2.model.synthetics_test_result_dns_record import SyntheticsTestResultDnsRecord +from datadog_api_client.v2.model.synthetics_test_result_dns_resolution import SyntheticsTestResultDnsResolution +from datadog_api_client.v2.model.synthetics_test_result_dns_resolution_attempt import ( + SyntheticsTestResultDnsResolutionAttempt, +) +from datadog_api_client.v2.model.synthetics_test_result_duration import SyntheticsTestResultDuration +from datadog_api_client.v2.model.synthetics_test_result_execution_info import SyntheticsTestResultExecutionInfo +from datadog_api_client.v2.model.synthetics_test_result_failure import SyntheticsTestResultFailure +from datadog_api_client.v2.model.synthetics_test_result_file_ref import SyntheticsTestResultFileRef +from datadog_api_client.v2.model.synthetics_test_result_git import SyntheticsTestResultGit +from datadog_api_client.v2.model.synthetics_test_result_git_commit import SyntheticsTestResultGitCommit +from datadog_api_client.v2.model.synthetics_test_result_git_user import SyntheticsTestResultGitUser +from datadog_api_client.v2.model.synthetics_test_result_handshake import SyntheticsTestResultHandshake +from datadog_api_client.v2.model.synthetics_test_result_health_check import SyntheticsTestResultHealthCheck +from datadog_api_client.v2.model.synthetics_test_result_included_item import SyntheticsTestResultIncludedItem +from datadog_api_client.v2.model.synthetics_test_result_location import SyntheticsTestResultLocation +from datadog_api_client.v2.model.synthetics_test_result_netpath import SyntheticsTestResultNetpath +from datadog_api_client.v2.model.synthetics_test_result_netpath_destination import ( + SyntheticsTestResultNetpathDestination, +) +from datadog_api_client.v2.model.synthetics_test_result_netpath_endpoint import SyntheticsTestResultNetpathEndpoint +from datadog_api_client.v2.model.synthetics_test_result_netpath_hop import SyntheticsTestResultNetpathHop +from datadog_api_client.v2.model.synthetics_test_result_netstats import SyntheticsTestResultNetstats +from datadog_api_client.v2.model.synthetics_test_result_netstats_hops import SyntheticsTestResultNetstatsHops +from datadog_api_client.v2.model.synthetics_test_result_network_latency import SyntheticsTestResultNetworkLatency +from datadog_api_client.v2.model.synthetics_test_result_ocsp_certificate import SyntheticsTestResultOCSPCertificate +from datadog_api_client.v2.model.synthetics_test_result_ocsp_response import SyntheticsTestResultOCSPResponse +from datadog_api_client.v2.model.synthetics_test_result_ocsp_updates import SyntheticsTestResultOCSPUpdates +from datadog_api_client.v2.model.synthetics_test_result_parent_step import SyntheticsTestResultParentStep +from datadog_api_client.v2.model.synthetics_test_result_parent_test import SyntheticsTestResultParentTest +from datadog_api_client.v2.model.synthetics_test_result_redirect import SyntheticsTestResultRedirect +from datadog_api_client.v2.model.synthetics_test_result_relationship_test import SyntheticsTestResultRelationshipTest +from datadog_api_client.v2.model.synthetics_test_result_relationship_test_data import ( + SyntheticsTestResultRelationshipTestData, +) +from datadog_api_client.v2.model.synthetics_test_result_relationships import SyntheticsTestResultRelationships +from datadog_api_client.v2.model.synthetics_test_result_request_info import SyntheticsTestResultRequestInfo +from datadog_api_client.v2.model.synthetics_test_result_response import SyntheticsTestResultResponse +from datadog_api_client.v2.model.synthetics_test_result_response_info import SyntheticsTestResultResponseInfo +from datadog_api_client.v2.model.synthetics_test_result_router import SyntheticsTestResultRouter +from datadog_api_client.v2.model.synthetics_test_result_rum_context import SyntheticsTestResultRumContext +from datadog_api_client.v2.model.synthetics_test_result_run_type import SyntheticsTestResultRunType +from datadog_api_client.v2.model.synthetics_test_result_status import SyntheticsTestResultStatus +from datadog_api_client.v2.model.synthetics_test_result_step import SyntheticsTestResultStep +from datadog_api_client.v2.model.synthetics_test_result_step_assertion_result import ( + SyntheticsTestResultStepAssertionResult, +) +from datadog_api_client.v2.model.synthetics_test_result_step_element_updates import ( + SyntheticsTestResultStepElementUpdates, +) +from datadog_api_client.v2.model.synthetics_test_result_steps_info import SyntheticsTestResultStepsInfo +from datadog_api_client.v2.model.synthetics_test_result_sub_step import SyntheticsTestResultSubStep +from datadog_api_client.v2.model.synthetics_test_result_sub_test import SyntheticsTestResultSubTest +from datadog_api_client.v2.model.synthetics_test_result_summary_attributes import SyntheticsTestResultSummaryAttributes +from datadog_api_client.v2.model.synthetics_test_result_summary_data import SyntheticsTestResultSummaryData +from datadog_api_client.v2.model.synthetics_test_result_summary_type import SyntheticsTestResultSummaryType +from datadog_api_client.v2.model.synthetics_test_result_tab import SyntheticsTestResultTab +from datadog_api_client.v2.model.synthetics_test_result_trace import SyntheticsTestResultTrace +from datadog_api_client.v2.model.synthetics_test_result_traceroute_hop import SyntheticsTestResultTracerouteHop +from datadog_api_client.v2.model.synthetics_test_result_turn import SyntheticsTestResultTurn +from datadog_api_client.v2.model.synthetics_test_result_turn_step import SyntheticsTestResultTurnStep +from datadog_api_client.v2.model.synthetics_test_result_type import SyntheticsTestResultType +from datadog_api_client.v2.model.synthetics_test_result_variable import SyntheticsTestResultVariable +from datadog_api_client.v2.model.synthetics_test_result_variables import SyntheticsTestResultVariables +from datadog_api_client.v2.model.synthetics_test_result_vitals_metrics import SyntheticsTestResultVitalsMetrics +from datadog_api_client.v2.model.synthetics_test_result_warning import SyntheticsTestResultWarning +from datadog_api_client.v2.model.synthetics_test_result_web_socket_close import SyntheticsTestResultWebSocketClose +from datadog_api_client.v2.model.synthetics_test_sub_type import SyntheticsTestSubType +from datadog_api_client.v2.model.synthetics_test_type import SyntheticsTestType from datadog_api_client.v2.model.synthetics_test_version_action_metadata import SyntheticsTestVersionActionMetadata from datadog_api_client.v2.model.synthetics_test_version_attributes import SyntheticsTestVersionAttributes from datadog_api_client.v2.model.synthetics_test_version_author import SyntheticsTestVersionAuthor @@ -11857,18 +11946,13 @@ "SyntheticsApiMultistepSubtestData", "SyntheticsApiMultistepSubtestType", "SyntheticsApiMultistepSubtestsResponse", - "SyntheticsFastTestAssertionResult", "SyntheticsFastTestResult", "SyntheticsFastTestResultAttributes", "SyntheticsFastTestResultData", "SyntheticsFastTestResultDetail", - "SyntheticsFastTestResultDevice", - "SyntheticsFastTestResultFailure", - "SyntheticsFastTestResultLocation", "SyntheticsFastTestResultType", - "SyntheticsFastTestStepResult", "SyntheticsFastTestSubType", - "SyntheticsFastTestTracerouteHop", + "SyntheticsFastTestType", "SyntheticsGlobalVariable", "SyntheticsGlobalVariableAttributes", "SyntheticsGlobalVariableOptions", @@ -11899,6 +11983,7 @@ "SyntheticsNetworkTestResponseType", "SyntheticsNetworkTestSubType", "SyntheticsNetworkTestType", + "SyntheticsPollTestResultsResponse", "SyntheticsSuite", "SyntheticsSuiteOptions", "SyntheticsSuiteResponse", @@ -11920,6 +12005,7 @@ "SyntheticsTestFileMultipartPresignedUrlsRequest", "SyntheticsTestFileMultipartPresignedUrlsRequestBucketKeyPrefix", "SyntheticsTestFileMultipartPresignedUrlsResponse", + "SyntheticsTestLatestResultsResponse", "SyntheticsTestOptions", "SyntheticsTestOptionsMonitorOptions", "SyntheticsTestOptionsMonitorOptionsNotificationPresetName", @@ -11931,6 +12017,86 @@ "SyntheticsTestParentSuiteType", "SyntheticsTestParentSuitesResponse", "SyntheticsTestPauseStatus", + "SyntheticsTestResultAssertionResult", + "SyntheticsTestResultAttributes", + "SyntheticsTestResultBatch", + "SyntheticsTestResultBounds", + "SyntheticsTestResultBrowserError", + "SyntheticsTestResultBucketKeys", + "SyntheticsTestResultCI", + "SyntheticsTestResultCIPipeline", + "SyntheticsTestResultCIProvider", + "SyntheticsTestResultCIStage", + "SyntheticsTestResultCdnCacheStatus", + "SyntheticsTestResultCdnProviderInfo", + "SyntheticsTestResultCdnResource", + "SyntheticsTestResultCertificate", + "SyntheticsTestResultCertificateValidity", + "SyntheticsTestResultData", + "SyntheticsTestResultDetail", + "SyntheticsTestResultDevice", + "SyntheticsTestResultDeviceBrowser", + "SyntheticsTestResultDevicePlatform", + "SyntheticsTestResultDeviceResolution", + "SyntheticsTestResultDnsRecord", + "SyntheticsTestResultDnsResolution", + "SyntheticsTestResultDnsResolutionAttempt", + "SyntheticsTestResultDuration", + "SyntheticsTestResultExecutionInfo", + "SyntheticsTestResultFailure", + "SyntheticsTestResultFileRef", + "SyntheticsTestResultGit", + "SyntheticsTestResultGitCommit", + "SyntheticsTestResultGitUser", + "SyntheticsTestResultHandshake", + "SyntheticsTestResultHealthCheck", + "SyntheticsTestResultIncludedItem", + "SyntheticsTestResultLocation", + "SyntheticsTestResultNetpath", + "SyntheticsTestResultNetpathDestination", + "SyntheticsTestResultNetpathEndpoint", + "SyntheticsTestResultNetpathHop", + "SyntheticsTestResultNetstats", + "SyntheticsTestResultNetstatsHops", + "SyntheticsTestResultNetworkLatency", + "SyntheticsTestResultOCSPCertificate", + "SyntheticsTestResultOCSPResponse", + "SyntheticsTestResultOCSPUpdates", + "SyntheticsTestResultParentStep", + "SyntheticsTestResultParentTest", + "SyntheticsTestResultRedirect", + "SyntheticsTestResultRelationshipTest", + "SyntheticsTestResultRelationshipTestData", + "SyntheticsTestResultRelationships", + "SyntheticsTestResultRequestInfo", + "SyntheticsTestResultResponse", + "SyntheticsTestResultResponseInfo", + "SyntheticsTestResultRouter", + "SyntheticsTestResultRumContext", + "SyntheticsTestResultRunType", + "SyntheticsTestResultStatus", + "SyntheticsTestResultStep", + "SyntheticsTestResultStepAssertionResult", + "SyntheticsTestResultStepElementUpdates", + "SyntheticsTestResultStepsInfo", + "SyntheticsTestResultSubStep", + "SyntheticsTestResultSubTest", + "SyntheticsTestResultSummaryAttributes", + "SyntheticsTestResultSummaryData", + "SyntheticsTestResultSummaryType", + "SyntheticsTestResultTab", + "SyntheticsTestResultTrace", + "SyntheticsTestResultTracerouteHop", + "SyntheticsTestResultTurn", + "SyntheticsTestResultTurnStep", + "SyntheticsTestResultType", + "SyntheticsTestResultVariable", + "SyntheticsTestResultVariables", + "SyntheticsTestResultVitalsMetrics", + "SyntheticsTestResultWarning", + "SyntheticsTestResultWebSocketClose", + "SyntheticsTestSubType", + "SyntheticsTestType", "SyntheticsTestVersionActionMetadata", "SyntheticsTestVersionAttributes", "SyntheticsTestVersionAuthor", diff --git a/tests/v2/features/synthetics.feature b/tests/v2/features/synthetics.feature index 33f538109f..f847bc0e70 100644 --- a/tests/v2/features/synthetics.feature +++ b/tests/v2/features/synthetics.feature @@ -151,6 +151,36 @@ Feature: Synthetics When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/synthetics-orchestrating-managing + Scenario: Get a browser test result returns "API error response." response + Given new "GetSyntheticsBrowserTestResult" request + And request contains "public_id" parameter from "REPLACE.ME" + And request contains "result_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 API error response. + + @generated @skip @team:DataDog/synthetics-orchestrating-managing + Scenario: Get a browser test result returns "OK" response + Given new "GetSyntheticsBrowserTestResult" request + And request contains "public_id" parameter from "REPLACE.ME" + And request contains "result_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/synthetics-orchestrating-managing + Scenario: Get a browser test's latest results returns "API error response." response + Given new "ListSyntheticsBrowserTestLatestResults" 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-orchestrating-managing + Scenario: Get a browser test's latest results returns "OK" response + Given new "ListSyntheticsBrowserTestLatestResults" 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-orchestrating-managing Scenario: Get a fast test result returns "API error response." response Given new "GetSyntheticsFastTestResult" request @@ -211,6 +241,36 @@ Feature: Synthetics When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/synthetics-orchestrating-managing + Scenario: Get a test result returns "API error response." response + Given new "GetSyntheticsTestResult" request + And request contains "public_id" parameter from "REPLACE.ME" + And request contains "result_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 API error response. + + @generated @skip @team:DataDog/synthetics-orchestrating-managing + Scenario: Get a test result returns "OK" response + Given new "GetSyntheticsTestResult" request + And request contains "public_id" parameter from "REPLACE.ME" + And request contains "result_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/synthetics-orchestrating-managing + Scenario: Get a test's latest results returns "API error response." response + Given new "ListSyntheticsTestLatestResults" 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-orchestrating-managing + Scenario: Get a test's latest results returns "OK" response + Given new "ListSyntheticsTestLatestResults" 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-orchestrating-managing Scenario: Get available subtests for a multistep test returns "OK" response Given new "GetApiMultistepSubtests" request @@ -322,6 +382,20 @@ Feature: Synthetics When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/synthetics-orchestrating-managing + Scenario: Poll for test results returns "API error response." response + Given new "PollSyntheticsTestResults" request + And request contains "result_ids" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 API error response. + + @generated @skip @team:DataDog/synthetics-orchestrating-managing + Scenario: Poll for test results returns "OK" response + Given new "PollSyntheticsTestResults" request + And request contains "result_ids" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @team:DataDog/synthetics-orchestrating-managing Scenario: Save new value for on-demand concurrency cap returns "OK" response Given new "SetOnDemandConcurrencyCap" request diff --git a/tests/v2/features/undo.json b/tests/v2/features/undo.json index 484b2541ff..71b0e9ba7a 100644 --- a/tests/v2/features/undo.json +++ b/tests/v2/features/undo.json @@ -6459,6 +6459,18 @@ "type": "idempotent" } }, + "ListSyntheticsBrowserTestLatestResults": { + "tag": "Synthetics", + "undo": { + "type": "safe" + } + }, + "GetSyntheticsBrowserTestResult": { + "tag": "Synthetics", + "undo": { + "type": "safe" + } + }, "DeleteSyntheticsTests": { "tag": "Synthetics", "undo": { @@ -6496,6 +6508,12 @@ "type": "idempotent" } }, + "PollSyntheticsTestResults": { + "tag": "Synthetics", + "undo": { + "type": "safe" + } + }, "GetTestFileDownloadUrl": { "tag": "Synthetics", "undo": { @@ -6526,6 +6544,18 @@ "type": "safe" } }, + "ListSyntheticsTestLatestResults": { + "tag": "Synthetics", + "undo": { + "type": "safe" + } + }, + "GetSyntheticsTestResult": { + "tag": "Synthetics", + "undo": { + "type": "safe" + } + }, "ListSyntheticsTestVersions": { "tag": "Synthetics", "undo": {