diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 201e944cd5e3..7ab82fd266b0 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/examples/v2/synthetics/GetSyntheticsBrowserTestResult.rb b/examples/v2/synthetics/GetSyntheticsBrowserTestResult.rb new file mode 100644 index 000000000000..d9a34ab0c812 --- /dev/null +++ b/examples/v2/synthetics/GetSyntheticsBrowserTestResult.rb @@ -0,0 +1,5 @@ +# Get a browser test result returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::SyntheticsAPI.new +p api_instance.get_synthetics_browser_test_result("public_id", "result_id") diff --git a/examples/v2/synthetics/GetSyntheticsTestResult.rb b/examples/v2/synthetics/GetSyntheticsTestResult.rb new file mode 100644 index 000000000000..eb4fc3fd9ebc --- /dev/null +++ b/examples/v2/synthetics/GetSyntheticsTestResult.rb @@ -0,0 +1,5 @@ +# Get a test result returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::SyntheticsAPI.new +p api_instance.get_synthetics_test_result("public_id", "result_id") diff --git a/examples/v2/synthetics/ListSyntheticsBrowserTestLatestResults.rb b/examples/v2/synthetics/ListSyntheticsBrowserTestLatestResults.rb new file mode 100644 index 000000000000..a2f68c529a56 --- /dev/null +++ b/examples/v2/synthetics/ListSyntheticsBrowserTestLatestResults.rb @@ -0,0 +1,5 @@ +# Get a browser test's latest results returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::SyntheticsAPI.new +p api_instance.list_synthetics_browser_test_latest_results("public_id") diff --git a/examples/v2/synthetics/ListSyntheticsTestLatestResults.rb b/examples/v2/synthetics/ListSyntheticsTestLatestResults.rb new file mode 100644 index 000000000000..1079f57956a0 --- /dev/null +++ b/examples/v2/synthetics/ListSyntheticsTestLatestResults.rb @@ -0,0 +1,5 @@ +# Get a test's latest results returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::SyntheticsAPI.new +p api_instance.list_synthetics_test_latest_results("public_id") diff --git a/examples/v2/synthetics/PollSyntheticsTestResults.rb b/examples/v2/synthetics/PollSyntheticsTestResults.rb new file mode 100644 index 000000000000..d7c1117324a8 --- /dev/null +++ b/examples/v2/synthetics/PollSyntheticsTestResults.rb @@ -0,0 +1,5 @@ +# Poll for test results returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V2::SyntheticsAPI.new +p api_instance.poll_synthetics_test_results("result_ids") diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index cc1c17b6bc22..a20c41fd2a55 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -4333,6 +4333,21 @@ "public_id" => "String", "body" => "SuiteJsonPatchRequest", }, + "v2.ListSyntheticsBrowserTestLatestResults" => { + "public_id" => "String", + "from_ts" => "Integer", + "to_ts" => "Integer", + "status" => "SyntheticsTestResultStatus", + "run_type" => "SyntheticsTestResultRunType", + "probe_dc" => "Array", + "device_id" => "Array", + }, + "v2.GetSyntheticsBrowserTestResult" => { + "public_id" => "String", + "result_id" => "String", + "event_id" => "String", + "timestamp" => "Integer", + }, "v2.DeleteSyntheticsTests" => { "body" => "DeletedTestsRequestDeleteRequest", }, @@ -4349,6 +4364,9 @@ "public_id" => "String", "body" => "SyntheticsNetworkTestEditRequest", }, + "v2.PollSyntheticsTestResults" => { + "result_ids" => "String", + }, "v2.GetTestFileDownloadUrl" => { "public_id" => "String", "body" => "SyntheticsTestFileDownloadRequest", @@ -4368,6 +4386,21 @@ "v2.GetTestParentSuites" => { "public_id" => "String", }, + "v2.ListSyntheticsTestLatestResults" => { + "public_id" => "String", + "from_ts" => "Integer", + "to_ts" => "Integer", + "status" => "SyntheticsTestResultStatus", + "run_type" => "SyntheticsTestResultRunType", + "probe_dc" => "Array", + "device_id" => "Array", + }, + "v2.GetSyntheticsTestResult" => { + "public_id" => "String", + "result_id" => "String", + "event_id" => "String", + "timestamp" => "Integer", + }, "v2.ListSyntheticsTestVersions" => { "public_id" => "String", "last_version_number" => "Integer", diff --git a/features/v2/synthetics.feature b/features/v2/synthetics.feature index 33f538109f92..f847bc0e702e 100644 --- a/features/v2/synthetics.feature +++ b/features/v2/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/features/v2/undo.json b/features/v2/undo.json index 484b2541ffbb..71b0e9ba7aff 100644 --- a/features/v2/undo.json +++ b/features/v2/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": { diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index d52fb1a0f6e8..704f53e51da0 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -5630,11 +5630,9 @@ def overrides "v2.synthetics_fast_test_result_attributes" => "SyntheticsFastTestResultAttributes", "v2.synthetics_fast_test_result_data" => "SyntheticsFastTestResultData", "v2.synthetics_fast_test_result_detail" => "SyntheticsFastTestResultDetail", - "v2.synthetics_fast_test_result_device" => "SyntheticsFastTestResultDevice", - "v2.synthetics_fast_test_result_failure" => "SyntheticsFastTestResultFailure", - "v2.synthetics_fast_test_result_location" => "SyntheticsFastTestResultLocation", "v2.synthetics_fast_test_result_type" => "SyntheticsFastTestResultType", "v2.synthetics_fast_test_sub_type" => "SyntheticsFastTestSubType", + "v2.synthetics_fast_test_type" => "SyntheticsFastTestType", "v2.synthetics_global_variable" => "SyntheticsGlobalVariable", "v2.synthetics_global_variable_attributes" => "SyntheticsGlobalVariableAttributes", "v2.synthetics_global_variable_options" => "SyntheticsGlobalVariableOptions", @@ -5665,6 +5663,7 @@ def overrides "v2.synthetics_network_test_response_type" => "SyntheticsNetworkTestResponseType", "v2.synthetics_network_test_sub_type" => "SyntheticsNetworkTestSubType", "v2.synthetics_network_test_type" => "SyntheticsNetworkTestType", + "v2.synthetics_poll_test_results_response" => "SyntheticsPollTestResultsResponse", "v2.synthetics_suite" => "SyntheticsSuite", "v2.synthetics_suite_options" => "SyntheticsSuiteOptions", "v2.synthetics_suite_response" => "SyntheticsSuiteResponse", @@ -5686,6 +5685,7 @@ def overrides "v2.synthetics_test_file_multipart_presigned_urls_request" => "SyntheticsTestFileMultipartPresignedUrlsRequest", "v2.synthetics_test_file_multipart_presigned_urls_request_bucket_key_prefix" => "SyntheticsTestFileMultipartPresignedUrlsRequestBucketKeyPrefix", "v2.synthetics_test_file_multipart_presigned_urls_response" => "SyntheticsTestFileMultipartPresignedUrlsResponse", + "v2.synthetics_test_latest_results_response" => "SyntheticsTestLatestResultsResponse", "v2.synthetics_test_options" => "SyntheticsTestOptions", "v2.synthetics_test_options_monitor_options" => "SyntheticsTestOptionsMonitorOptions", "v2.synthetics_test_options_monitor_options_notification_preset_name" => "SyntheticsTestOptionsMonitorOptionsNotificationPresetName", @@ -5697,6 +5697,85 @@ def overrides "v2.synthetics_test_parent_suites_response" => "SyntheticsTestParentSuitesResponse", "v2.synthetics_test_parent_suite_type" => "SyntheticsTestParentSuiteType", "v2.synthetics_test_pause_status" => "SyntheticsTestPauseStatus", + "v2.synthetics_test_result_assertion_result" => "SyntheticsTestResultAssertionResult", + "v2.synthetics_test_result_attributes" => "SyntheticsTestResultAttributes", + "v2.synthetics_test_result_batch" => "SyntheticsTestResultBatch", + "v2.synthetics_test_result_bounds" => "SyntheticsTestResultBounds", + "v2.synthetics_test_result_browser_error" => "SyntheticsTestResultBrowserError", + "v2.synthetics_test_result_bucket_keys" => "SyntheticsTestResultBucketKeys", + "v2.synthetics_test_result_cdn_cache_status" => "SyntheticsTestResultCdnCacheStatus", + "v2.synthetics_test_result_cdn_provider_info" => "SyntheticsTestResultCdnProviderInfo", + "v2.synthetics_test_result_cdn_resource" => "SyntheticsTestResultCdnResource", + "v2.synthetics_test_result_certificate" => "SyntheticsTestResultCertificate", + "v2.synthetics_test_result_certificate_validity" => "SyntheticsTestResultCertificateValidity", + "v2.synthetics_test_result_ci" => "SyntheticsTestResultCI", + "v2.synthetics_test_result_ci_pipeline" => "SyntheticsTestResultCIPipeline", + "v2.synthetics_test_result_ci_provider" => "SyntheticsTestResultCIProvider", + "v2.synthetics_test_result_ci_stage" => "SyntheticsTestResultCIStage", + "v2.synthetics_test_result_data" => "SyntheticsTestResultData", + "v2.synthetics_test_result_detail" => "SyntheticsTestResultDetail", + "v2.synthetics_test_result_device" => "SyntheticsTestResultDevice", + "v2.synthetics_test_result_device_browser" => "SyntheticsTestResultDeviceBrowser", + "v2.synthetics_test_result_device_platform" => "SyntheticsTestResultDevicePlatform", + "v2.synthetics_test_result_device_resolution" => "SyntheticsTestResultDeviceResolution", + "v2.synthetics_test_result_dns_record" => "SyntheticsTestResultDnsRecord", + "v2.synthetics_test_result_dns_resolution" => "SyntheticsTestResultDnsResolution", + "v2.synthetics_test_result_duration" => "SyntheticsTestResultDuration", + "v2.synthetics_test_result_execution_info" => "SyntheticsTestResultExecutionInfo", + "v2.synthetics_test_result_failure" => "SyntheticsTestResultFailure", + "v2.synthetics_test_result_file_ref" => "SyntheticsTestResultFileRef", + "v2.synthetics_test_result_git" => "SyntheticsTestResultGit", + "v2.synthetics_test_result_git_commit" => "SyntheticsTestResultGitCommit", + "v2.synthetics_test_result_git_user" => "SyntheticsTestResultGitUser", + "v2.synthetics_test_result_handshake" => "SyntheticsTestResultHandshake", + "v2.synthetics_test_result_health_check" => "SyntheticsTestResultHealthCheck", + "v2.synthetics_test_result_included_item" => "SyntheticsTestResultIncludedItem", + "v2.synthetics_test_result_location" => "SyntheticsTestResultLocation", + "v2.synthetics_test_result_netpath" => "SyntheticsTestResultNetpath", + "v2.synthetics_test_result_netpath_destination" => "SyntheticsTestResultNetpathDestination", + "v2.synthetics_test_result_netpath_endpoint" => "SyntheticsTestResultNetpathEndpoint", + "v2.synthetics_test_result_netpath_hop" => "SyntheticsTestResultNetpathHop", + "v2.synthetics_test_result_netstats" => "SyntheticsTestResultNetstats", + "v2.synthetics_test_result_netstats_hops" => "SyntheticsTestResultNetstatsHops", + "v2.synthetics_test_result_network_latency" => "SyntheticsTestResultNetworkLatency", + "v2.synthetics_test_result_ocsp_certificate" => "SyntheticsTestResultOCSPCertificate", + "v2.synthetics_test_result_ocsp_response" => "SyntheticsTestResultOCSPResponse", + "v2.synthetics_test_result_ocsp_updates" => "SyntheticsTestResultOCSPUpdates", + "v2.synthetics_test_result_parent_step" => "SyntheticsTestResultParentStep", + "v2.synthetics_test_result_parent_test" => "SyntheticsTestResultParentTest", + "v2.synthetics_test_result_redirect" => "SyntheticsTestResultRedirect", + "v2.synthetics_test_result_relationships" => "SyntheticsTestResultRelationships", + "v2.synthetics_test_result_relationship_test" => "SyntheticsTestResultRelationshipTest", + "v2.synthetics_test_result_relationship_test_data" => "SyntheticsTestResultRelationshipTestData", + "v2.synthetics_test_result_request_info" => "SyntheticsTestResultRequestInfo", + "v2.synthetics_test_result_response" => "SyntheticsTestResultResponse", + "v2.synthetics_test_result_response_info" => "SyntheticsTestResultResponseInfo", + "v2.synthetics_test_result_router" => "SyntheticsTestResultRouter", + "v2.synthetics_test_result_rum_context" => "SyntheticsTestResultRumContext", + "v2.synthetics_test_result_run_type" => "SyntheticsTestResultRunType", + "v2.synthetics_test_result_status" => "SyntheticsTestResultStatus", + "v2.synthetics_test_result_step" => "SyntheticsTestResultStep", + "v2.synthetics_test_result_step_assertion_result" => "SyntheticsTestResultStepAssertionResult", + "v2.synthetics_test_result_step_element_updates" => "SyntheticsTestResultStepElementUpdates", + "v2.synthetics_test_result_steps_info" => "SyntheticsTestResultStepsInfo", + "v2.synthetics_test_result_sub_step" => "SyntheticsTestResultSubStep", + "v2.synthetics_test_result_sub_test" => "SyntheticsTestResultSubTest", + "v2.synthetics_test_result_summary_attributes" => "SyntheticsTestResultSummaryAttributes", + "v2.synthetics_test_result_summary_data" => "SyntheticsTestResultSummaryData", + "v2.synthetics_test_result_summary_type" => "SyntheticsTestResultSummaryType", + "v2.synthetics_test_result_tab" => "SyntheticsTestResultTab", + "v2.synthetics_test_result_trace" => "SyntheticsTestResultTrace", + "v2.synthetics_test_result_traceroute_hop" => "SyntheticsTestResultTracerouteHop", + "v2.synthetics_test_result_turn" => "SyntheticsTestResultTurn", + "v2.synthetics_test_result_turn_step" => "SyntheticsTestResultTurnStep", + "v2.synthetics_test_result_type" => "SyntheticsTestResultType", + "v2.synthetics_test_result_variable" => "SyntheticsTestResultVariable", + "v2.synthetics_test_result_variables" => "SyntheticsTestResultVariables", + "v2.synthetics_test_result_vitals_metrics" => "SyntheticsTestResultVitalsMetrics", + "v2.synthetics_test_result_warning" => "SyntheticsTestResultWarning", + "v2.synthetics_test_result_web_socket_close" => "SyntheticsTestResultWebSocketClose", + "v2.synthetics_test_sub_type" => "SyntheticsTestSubType", + "v2.synthetics_test_type" => "SyntheticsTestType", "v2.synthetics_test_version_action_metadata" => "SyntheticsTestVersionActionMetadata", "v2.synthetics_test_version_attributes" => "SyntheticsTestVersionAttributes", "v2.synthetics_test_version_author" => "SyntheticsTestVersionAuthor", diff --git a/lib/datadog_api_client/v2/api/synthetics_api.rb b/lib/datadog_api_client/v2/api/synthetics_api.rb index cd5046e1ae2e..3c5d5fb35eb4 100644 --- a/lib/datadog_api_client/v2/api/synthetics_api.rb +++ b/lib/datadog_api_client/v2/api/synthetics_api.rb @@ -686,6 +686,80 @@ def get_on_demand_concurrency_cap_with_http_info(opts = {}) return data, status_code, headers end + # Get a browser test result. + # + # @see #get_synthetics_browser_test_result_with_http_info + def get_synthetics_browser_test_result(public_id, result_id, opts = {}) + data, _status_code, _headers = get_synthetics_browser_test_result_with_http_info(public_id, result_id, opts) + data + end + + # Get a browser test result. + # + # Get a specific full result from a given Synthetic browser test. + # + # @param public_id [String] The public ID of the Synthetic browser test to which the target result belongs. + # @param result_id [String] The ID of the result to get. + # @param opts [Hash] the optional parameters + # @option opts [String] :event_id The event ID used to look up the result in the event store. + # @option opts [Integer] :timestamp Timestamp in seconds to look up the result. + # @return [Array<(SyntheticsTestResultResponse, Integer, Hash)>] SyntheticsTestResultResponse data, response status code and response headers + def get_synthetics_browser_test_result_with_http_info(public_id, result_id, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: SyntheticsAPI.get_synthetics_browser_test_result ...' + end + # verify the required parameter 'public_id' is set + if @api_client.config.client_side_validation && public_id.nil? + fail ArgumentError, "Missing the required parameter 'public_id' when calling SyntheticsAPI.get_synthetics_browser_test_result" + end + # verify the required parameter 'result_id' is set + if @api_client.config.client_side_validation && result_id.nil? + fail ArgumentError, "Missing the required parameter 'result_id' when calling SyntheticsAPI.get_synthetics_browser_test_result" + end + # resource path + local_var_path = '/api/v2/synthetics/tests/browser/{public_id}/results/{result_id}'.sub('{public_id}', CGI.escape(public_id.to_s).gsub('%2F', '/')).sub('{result_id}', CGI.escape(result_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'event_id'] = opts[:'event_id'] if !opts[:'event_id'].nil? + query_params[:'timestamp'] = opts[:'timestamp'] if !opts[:'timestamp'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'SyntheticsTestResultResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :get_synthetics_browser_test_result, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: SyntheticsAPI#get_synthetics_browser_test_result\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get a fast test result. # # @see #get_synthetics_fast_test_result_with_http_info @@ -872,6 +946,80 @@ def get_synthetics_suite_with_http_info(public_id, opts = {}) return data, status_code, headers end + # Get a test result. + # + # @see #get_synthetics_test_result_with_http_info + def get_synthetics_test_result(public_id, result_id, opts = {}) + data, _status_code, _headers = get_synthetics_test_result_with_http_info(public_id, result_id, opts) + data + end + + # Get a test result. + # + # Get a specific full result from a given Synthetic test. + # + # @param public_id [String] The public ID of the Synthetic test to which the target result belongs. + # @param result_id [String] The ID of the result to get. + # @param opts [Hash] the optional parameters + # @option opts [String] :event_id The event ID used to look up the result in the event store. + # @option opts [Integer] :timestamp Timestamp in seconds to look up the result. + # @return [Array<(SyntheticsTestResultResponse, Integer, Hash)>] SyntheticsTestResultResponse data, response status code and response headers + def get_synthetics_test_result_with_http_info(public_id, result_id, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: SyntheticsAPI.get_synthetics_test_result ...' + end + # verify the required parameter 'public_id' is set + if @api_client.config.client_side_validation && public_id.nil? + fail ArgumentError, "Missing the required parameter 'public_id' when calling SyntheticsAPI.get_synthetics_test_result" + end + # verify the required parameter 'result_id' is set + if @api_client.config.client_side_validation && result_id.nil? + fail ArgumentError, "Missing the required parameter 'result_id' when calling SyntheticsAPI.get_synthetics_test_result" + end + # resource path + local_var_path = '/api/v2/synthetics/tests/{public_id}/results/{result_id}'.sub('{public_id}', CGI.escape(public_id.to_s).gsub('%2F', '/')).sub('{result_id}', CGI.escape(result_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'event_id'] = opts[:'event_id'] if !opts[:'event_id'].nil? + query_params[:'timestamp'] = opts[:'timestamp'] if !opts[:'timestamp'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'SyntheticsTestResultResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :get_synthetics_test_result, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: SyntheticsAPI#get_synthetics_test_result\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get a specific version of a test. # # @see #get_synthetics_test_version_with_http_info @@ -1157,6 +1305,178 @@ def get_test_parent_suites_with_http_info(public_id, opts = {}) return data, status_code, headers end + # Get a browser test's latest results. + # + # @see #list_synthetics_browser_test_latest_results_with_http_info + def list_synthetics_browser_test_latest_results(public_id, opts = {}) + data, _status_code, _headers = list_synthetics_browser_test_latest_results_with_http_info(public_id, opts) + data + end + + # Get a browser test's latest results. + # + # Get the latest result summaries for a given Synthetic browser test. + # + # @param public_id [String] The public ID of the Synthetic browser test for which to search results. + # @param opts [Hash] the optional parameters + # @option opts [Integer] :from_ts Timestamp in milliseconds from which to start querying results. + # @option opts [Integer] :to_ts Timestamp in milliseconds up to which to query results. + # @option opts [SyntheticsTestResultStatus] :status Filter results by status. + # @option opts [SyntheticsTestResultRunType] :run_type Filter results by run type. + # @option opts [Array] :probe_dc Locations for which to query results. + # @option opts [Array] :device_id Device IDs for which to query results. + # @return [Array<(SyntheticsTestLatestResultsResponse, Integer, Hash)>] SyntheticsTestLatestResultsResponse data, response status code and response headers + def list_synthetics_browser_test_latest_results_with_http_info(public_id, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: SyntheticsAPI.list_synthetics_browser_test_latest_results ...' + end + # verify the required parameter 'public_id' is set + if @api_client.config.client_side_validation && public_id.nil? + fail ArgumentError, "Missing the required parameter 'public_id' when calling SyntheticsAPI.list_synthetics_browser_test_latest_results" + end + allowable_values = ['passed', 'failed', 'no_data'] + if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status']) + fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}" + end + allowable_values = ['scheduled', 'fast', 'ci', 'triggered'] + if @api_client.config.client_side_validation && opts[:'run_type'] && !allowable_values.include?(opts[:'run_type']) + fail ArgumentError, "invalid value for \"run_type\", must be one of #{allowable_values}" + end + # resource path + local_var_path = '/api/v2/synthetics/tests/browser/{public_id}/results'.sub('{public_id}', CGI.escape(public_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'from_ts'] = opts[:'from_ts'] if !opts[:'from_ts'].nil? + query_params[:'to_ts'] = opts[:'to_ts'] if !opts[:'to_ts'].nil? + query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil? + query_params[:'runType'] = opts[:'run_type'] if !opts[:'run_type'].nil? + query_params[:'probe_dc'] = @api_client.build_collection_param(opts[:'probe_dc'], :multi) if !opts[:'probe_dc'].nil? + query_params[:'device_id'] = @api_client.build_collection_param(opts[:'device_id'], :multi) if !opts[:'device_id'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'SyntheticsTestLatestResultsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :list_synthetics_browser_test_latest_results, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + new_options[:query_string_normalizer] = HTTParty::Request::NON_RAILS_QUERY_STRING_NORMALIZER + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: SyntheticsAPI#list_synthetics_browser_test_latest_results\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get a test's latest results. + # + # @see #list_synthetics_test_latest_results_with_http_info + def list_synthetics_test_latest_results(public_id, opts = {}) + data, _status_code, _headers = list_synthetics_test_latest_results_with_http_info(public_id, opts) + data + end + + # Get a test's latest results. + # + # Get the latest result summaries for a given Synthetic test. + # + # @param public_id [String] The public ID of the Synthetic test for which to search results. + # @param opts [Hash] the optional parameters + # @option opts [Integer] :from_ts Timestamp in milliseconds from which to start querying results. + # @option opts [Integer] :to_ts Timestamp in milliseconds up to which to query results. + # @option opts [SyntheticsTestResultStatus] :status Filter results by status. + # @option opts [SyntheticsTestResultRunType] :run_type Filter results by run type. + # @option opts [Array] :probe_dc Locations for which to query results. + # @option opts [Array] :device_id Device IDs for which to query results. + # @return [Array<(SyntheticsTestLatestResultsResponse, Integer, Hash)>] SyntheticsTestLatestResultsResponse data, response status code and response headers + def list_synthetics_test_latest_results_with_http_info(public_id, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: SyntheticsAPI.list_synthetics_test_latest_results ...' + end + # verify the required parameter 'public_id' is set + if @api_client.config.client_side_validation && public_id.nil? + fail ArgumentError, "Missing the required parameter 'public_id' when calling SyntheticsAPI.list_synthetics_test_latest_results" + end + allowable_values = ['passed', 'failed', 'no_data'] + if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status']) + fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}" + end + allowable_values = ['scheduled', 'fast', 'ci', 'triggered'] + if @api_client.config.client_side_validation && opts[:'run_type'] && !allowable_values.include?(opts[:'run_type']) + fail ArgumentError, "invalid value for \"run_type\", must be one of #{allowable_values}" + end + # resource path + local_var_path = '/api/v2/synthetics/tests/{public_id}/results'.sub('{public_id}', CGI.escape(public_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'from_ts'] = opts[:'from_ts'] if !opts[:'from_ts'].nil? + query_params[:'to_ts'] = opts[:'to_ts'] if !opts[:'to_ts'].nil? + query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil? + query_params[:'runType'] = opts[:'run_type'] if !opts[:'run_type'].nil? + query_params[:'probe_dc'] = @api_client.build_collection_param(opts[:'probe_dc'], :multi) if !opts[:'probe_dc'].nil? + query_params[:'device_id'] = @api_client.build_collection_param(opts[:'device_id'], :multi) if !opts[:'device_id'].nil? + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'SyntheticsTestLatestResultsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :list_synthetics_test_latest_results, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + new_options[:query_string_normalizer] = HTTParty::Request::NON_RAILS_QUERY_STRING_NORMALIZER + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: SyntheticsAPI#list_synthetics_test_latest_results\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Get version history of a test. # # @see #list_synthetics_test_versions_with_http_info @@ -1386,6 +1706,73 @@ def patch_test_suite_with_http_info(public_id, body, opts = {}) return data, status_code, headers end + # Poll for test results. + # + # @see #poll_synthetics_test_results_with_http_info + def poll_synthetics_test_results(result_ids, opts = {}) + data, _status_code, _headers = poll_synthetics_test_results_with_http_info(result_ids, opts) + data + end + + # 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 [String] A JSON-encoded array of result IDs to poll for. + # @param opts [Hash] the optional parameters + # @return [Array<(SyntheticsPollTestResultsResponse, Integer, Hash)>] SyntheticsPollTestResultsResponse data, response status code and response headers + def poll_synthetics_test_results_with_http_info(result_ids, opts = {}) + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: SyntheticsAPI.poll_synthetics_test_results ...' + end + # verify the required parameter 'result_ids' is set + if @api_client.config.client_side_validation && result_ids.nil? + fail ArgumentError, "Missing the required parameter 'result_ids' when calling SyntheticsAPI.poll_synthetics_test_results" + end + # resource path + local_var_path = '/api/v2/synthetics/tests/poll_results' + + # query parameters + query_params = opts[:query_params] || {} + query_params[:'result_ids'] = result_ids + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'SyntheticsPollTestResultsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ] + + new_options = opts.merge( + :operation => :poll_synthetics_test_results, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: SyntheticsAPI#poll_synthetics_test_results\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Search test suites. # # @see #search_suites_with_http_info diff --git a/lib/datadog_api_client/v2/models/synthetics_fast_test_result_attributes.rb b/lib/datadog_api_client/v2/models/synthetics_fast_test_result_attributes.rb index 149f42b84c3e..c0cea0f25699 100644 --- a/lib/datadog_api_client/v2/models/synthetics_fast_test_result_attributes.rb +++ b/lib/datadog_api_client/v2/models/synthetics_fast_test_result_attributes.rb @@ -21,10 +21,10 @@ module DatadogAPIClient::V2 class SyntheticsFastTestResultAttributes include BaseGenericModel - # Device information for browser-based fast tests. + # Device information for the test result (browser and mobile tests). attr_accessor :device - # Location from which the fast test was executed. + # Location information for a Synthetic test result. attr_accessor :location # Detailed result data for the fast test run. The exact shape of nested fields @@ -34,7 +34,7 @@ class SyntheticsFastTestResultAttributes # Subtype of the Synthetic test that produced this result. attr_accessor :test_sub_type - # The type of the Synthetic test that produced this result (for example, `api` or `browser`). + # Type of the Synthetic fast test that produced this result. attr_accessor :test_type # Version of the test at the time the fast test was triggered. @@ -59,11 +59,11 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'device' => :'SyntheticsFastTestResultDevice', - :'location' => :'SyntheticsFastTestResultLocation', + :'device' => :'SyntheticsTestResultDevice', + :'location' => :'SyntheticsTestResultLocation', :'result' => :'SyntheticsFastTestResultDetail', :'test_sub_type' => :'SyntheticsFastTestSubType', - :'test_type' => :'String', + :'test_type' => :'SyntheticsFastTestType', :'test_version' => :'Integer' } end diff --git a/lib/datadog_api_client/v2/models/synthetics_fast_test_result_detail.rb b/lib/datadog_api_client/v2/models/synthetics_fast_test_result_detail.rb index d8e60db5a592..c110c0565462 100644 --- a/lib/datadog_api_client/v2/models/synthetics_fast_test_result_detail.rb +++ b/lib/datadog_api_client/v2/models/synthetics_fast_test_result_detail.rb @@ -28,13 +28,13 @@ class SyntheticsFastTestResultDetail # gRPC call type (for example, `unary`, `healthCheck`, or `reflection`). attr_accessor :call_type - # TLS certificate details, present for SSL tests. + # SSL/TLS certificate information returned from an SSL test. attr_accessor :cert # Total duration of the test in milliseconds. attr_accessor :duration - # Failure details if the fast test did not pass. + # Details about the failure of a Synthetic test. attr_accessor :failure # Unix timestamp (ms) of when the test finished. @@ -46,16 +46,16 @@ class SyntheticsFastTestResultDetail # Whether this result is from an automatic fast retry. attr_accessor :is_fast_retry - # Details of the outgoing request made during the test. + # Details of the outgoing request made during the test execution. attr_accessor :request # IP address resolved for the target host. attr_accessor :resolved_ip - # Details of the response received during the test. + # Details of the response received during the test execution. attr_accessor :response - # Run type indicating how this test was triggered (for example, `fast`). + # The type of run for a Synthetic test result. attr_accessor :run_type # Unix timestamp (ms) of when the test started. @@ -111,23 +111,23 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'assertions' => :'Array>', + :'assertions' => :'Array', :'call_type' => :'String', - :'cert' => :'Hash', + :'cert' => :'SyntheticsTestResultCertificate', :'duration' => :'Float', - :'failure' => :'SyntheticsFastTestResultFailure', + :'failure' => :'SyntheticsTestResultFailure', :'finished_at' => :'Integer', :'id' => :'String', :'is_fast_retry' => :'Boolean', - :'request' => :'Hash', + :'request' => :'SyntheticsTestResultRequestInfo', :'resolved_ip' => :'String', - :'response' => :'Hash', - :'run_type' => :'String', + :'response' => :'SyntheticsTestResultResponseInfo', + :'run_type' => :'SyntheticsTestResultRunType', :'started_at' => :'Integer', :'status' => :'String', - :'steps' => :'Array>', + :'steps' => :'Array', :'timings' => :'Hash', - :'traceroute' => :'Array>', + :'traceroute' => :'Array', :'triggered_at' => :'Integer', :'tunnel' => :'Boolean' } diff --git a/lib/datadog_api_client/v2/models/synthetics_fast_test_type.rb b/lib/datadog_api_client/v2/models/synthetics_fast_test_type.rb new file mode 100644 index 000000000000..3e8f80881508 --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_fast_test_type.rb @@ -0,0 +1,27 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Type of the Synthetic fast test that produced this result. + class SyntheticsFastTestType + include BaseEnumModel + + FAST_API = "fast-api".freeze + FAST_BROWSER = "fast-browser".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_poll_test_results_response.rb b/lib/datadog_api_client/v2/models/synthetics_poll_test_results_response.rb new file mode 100644 index 000000000000..4a781bb3b2ac --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_poll_test_results_response.rb @@ -0,0 +1,119 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response object for polling Synthetic test results. + class SyntheticsPollTestResultsResponse + include BaseGenericModel + + # Array of Synthetic test results. + attr_accessor :data + + # Array of included related resources, such as the test definition. + attr_accessor :included + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data', + :'included' => :'included' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'Array', + :'included' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsPollTestResultsResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + + if attributes.key?(:'included') + if (value = attributes[:'included']).is_a?(Array) + self.included = value + end + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + included == o.included && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, included, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_latest_results_response.rb b/lib/datadog_api_client/v2/models/synthetics_test_latest_results_response.rb new file mode 100644 index 000000000000..05425f2765c0 --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_latest_results_response.rb @@ -0,0 +1,119 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response object for a Synthetic test's latest result summaries. + class SyntheticsTestLatestResultsResponse + include BaseGenericModel + + # Array of Synthetic test result summaries. + attr_accessor :data + + # Array of included related resources, such as the test definition. + attr_accessor :included + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data', + :'included' => :'included' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'Array', + :'included' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestLatestResultsResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + + if attributes.key?(:'included') + if (value = attributes[:'included']).is_a?(Array) + self.included = value + end + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + included == o.included && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, included, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_assertion_result.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_assertion_result.rb new file mode 100644 index 000000000000..78723b22804f --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_assertion_result.rb @@ -0,0 +1,195 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # An individual assertion result from a Synthetic test. + class SyntheticsTestResultAssertionResult + include BaseGenericModel + + # Actual value observed during the test. Its type depends on the assertion type. + attr_accessor :actual + + # Error message if the assertion failed. + attr_accessor :error_message + + # Expected value for the assertion. Its type depends on the assertion type. + attr_accessor :expected + + # Operator used for the assertion (for example, `is`, `contains`). + attr_accessor :operator + + # Property targeted by the assertion, when applicable. + attr_accessor :property + + # Target value for the assertion. Its type depends on the assertion type. + attr_accessor :target + + # JSON path or XPath evaluated for the assertion. + attr_accessor :target_path + + # Operator used for the target path assertion. + attr_accessor :target_path_operator + + # Type of the assertion (for example, `responseTime`, `statusCode`, `body`). + attr_accessor :type + + # Whether the assertion passed. + attr_accessor :valid + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.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' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'actual' => :'Object', + :'error_message' => :'String', + :'expected' => :'Object', + :'operator' => :'String', + :'property' => :'String', + :'target' => :'Object', + :'target_path' => :'String', + :'target_path_operator' => :'String', + :'type' => :'String', + :'valid' => :'Boolean' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultAssertionResult` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'actual') + self.actual = attributes[:'actual'] + end + + if attributes.key?(:'error_message') + self.error_message = attributes[:'error_message'] + end + + if attributes.key?(:'expected') + self.expected = attributes[:'expected'] + end + + if attributes.key?(:'operator') + self.operator = attributes[:'operator'] + end + + if attributes.key?(:'property') + self.property = attributes[:'property'] + end + + if attributes.key?(:'target') + self.target = attributes[:'target'] + end + + if attributes.key?(:'target_path') + self.target_path = attributes[:'target_path'] + end + + if attributes.key?(:'target_path_operator') + self.target_path_operator = attributes[:'target_path_operator'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'valid') + self.valid = attributes[:'valid'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + actual == o.actual && + error_message == o.error_message && + expected == o.expected && + operator == o.operator && + property == o.property && + target == o.target && + target_path == o.target_path && + target_path_operator == o.target_path_operator && + type == o.type && + valid == o.valid && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [actual, error_message, expected, operator, property, target, target_path, target_path_operator, type, valid, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_attributes.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_attributes.rb new file mode 100644 index 000000000000..3436cc1e7e65 --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_attributes.rb @@ -0,0 +1,175 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of a Synthetic test result. + class SyntheticsTestResultAttributes + include BaseGenericModel + + # Batch information for the test result. + attr_accessor :batch + + # CI information associated with the test result. + attr_accessor :ci + + # Device information for the test result (browser and mobile tests). + attr_accessor :device + + # Git information associated with the test result. + attr_accessor :git + + # Location information for a Synthetic test result. + attr_accessor :location + + # Full result details for a Synthetic test execution. + attr_accessor :result + + # Subtype of the Synthetic test that produced this result. + attr_accessor :test_sub_type + + # Type of the Synthetic test that produced this result. + attr_accessor :test_type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'batch' => :'batch', + :'ci' => :'ci', + :'device' => :'device', + :'git' => :'git', + :'location' => :'location', + :'result' => :'result', + :'test_sub_type' => :'test_sub_type', + :'test_type' => :'test_type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'batch' => :'SyntheticsTestResultBatch', + :'ci' => :'SyntheticsTestResultCI', + :'device' => :'SyntheticsTestResultDevice', + :'git' => :'SyntheticsTestResultGit', + :'location' => :'SyntheticsTestResultLocation', + :'result' => :'SyntheticsTestResultDetail', + :'test_sub_type' => :'SyntheticsTestSubType', + :'test_type' => :'SyntheticsTestType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'batch') + self.batch = attributes[:'batch'] + end + + if attributes.key?(:'ci') + self.ci = attributes[:'ci'] + end + + if attributes.key?(:'device') + self.device = attributes[:'device'] + end + + if attributes.key?(:'git') + self.git = attributes[:'git'] + end + + if attributes.key?(:'location') + self.location = attributes[:'location'] + end + + if attributes.key?(:'result') + self.result = attributes[:'result'] + end + + if attributes.key?(:'test_sub_type') + self.test_sub_type = attributes[:'test_sub_type'] + end + + if attributes.key?(:'test_type') + self.test_type = attributes[:'test_type'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + batch == o.batch && + ci == o.ci && + device == o.device && + git == o.git && + location == o.location && + result == o.result && + test_sub_type == o.test_sub_type && + test_type == o.test_type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [batch, ci, device, git, location, result, test_sub_type, test_type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_batch.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_batch.rb new file mode 100644 index 000000000000..cbb9f292158b --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_batch.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Batch information for the test result. + class SyntheticsTestResultBatch + include BaseGenericModel + + # Batch identifier. + attr_accessor :id + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultBatch` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_bounds.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_bounds.rb new file mode 100644 index 000000000000..9a46ed04a032 --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_bounds.rb @@ -0,0 +1,135 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Bounding box of an element on the page. + class SyntheticsTestResultBounds + include BaseGenericModel + + # Height in pixels. + attr_accessor :height + + # Width in pixels. + attr_accessor :width + + # Horizontal position in pixels. + attr_accessor :x + + # Vertical position in pixels. + attr_accessor :y + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'height' => :'height', + :'width' => :'width', + :'x' => :'x', + :'y' => :'y' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'height' => :'Integer', + :'width' => :'Integer', + :'x' => :'Integer', + :'y' => :'Integer' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultBounds` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'height') + self.height = attributes[:'height'] + end + + if attributes.key?(:'width') + self.width = attributes[:'width'] + end + + if attributes.key?(:'x') + self.x = attributes[:'x'] + end + + if attributes.key?(:'y') + self.y = attributes[:'y'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + height == o.height && + width == o.width && + x == o.x && + y == o.y && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [height, width, x, y, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_browser_error.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_browser_error.rb new file mode 100644 index 000000000000..a9147192a24b --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_browser_error.rb @@ -0,0 +1,155 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # A browser error captured during a browser test step. + class SyntheticsTestResultBrowserError + include BaseGenericModel + + # Error description. + attr_accessor :description + + # HTTP method associated with the error (for network errors). + attr_accessor :method + + # Error name. + attr_accessor :name + + # HTTP status code associated with the error (for network errors). + attr_accessor :status + + # Type of the browser error. + attr_accessor :type + + # URL associated with the error. + attr_accessor :url + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'description' => :'description', + :'method' => :'method', + :'name' => :'name', + :'status' => :'status', + :'type' => :'type', + :'url' => :'url' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'description' => :'String', + :'method' => :'String', + :'name' => :'String', + :'status' => :'Integer', + :'type' => :'String', + :'url' => :'Hash' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultBrowserError` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'method') + self.method = attributes[:'method'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'url') + self.url = attributes[:'url'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + description == o.description && + method == o.method && + name == o.name && + status == o.status && + type == o.type && + url == o.url && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [description, method, name, status, type, url, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_bucket_keys.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_bucket_keys.rb new file mode 100644 index 000000000000..602e3987fe2a --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_bucket_keys.rb @@ -0,0 +1,207 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Storage bucket keys for artifacts produced during a step or test. + class SyntheticsTestResultBucketKeys + include BaseGenericModel + + # Key for the screenshot captured after the step (goal-based tests). + attr_accessor :after_step_screenshot + + # Key for the screenshot captured after the turn (goal-based tests). + attr_accessor :after_turn_screenshot + + # Key for miscellaneous artifacts. + attr_accessor :artifacts + + # Key for the screenshot captured before the step (goal-based tests). + attr_accessor :before_step_screenshot + + # Key for the screenshot captured before the turn (goal-based tests). + attr_accessor :before_turn_screenshot + + # Key for a captured crash report. + attr_accessor :crash_report + + # Key for captured device logs. + attr_accessor :device_logs + + # Keys for email message payloads captured by the step. + attr_accessor :email_messages + + # Key for the captured screenshot. + attr_accessor :screenshot + + # Key for the captured DOM snapshot. + attr_accessor :snapshot + + # Key for the page source or element source. + attr_accessor :source + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.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' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'after_step_screenshot' => :'String', + :'after_turn_screenshot' => :'String', + :'artifacts' => :'String', + :'before_step_screenshot' => :'String', + :'before_turn_screenshot' => :'String', + :'crash_report' => :'String', + :'device_logs' => :'String', + :'email_messages' => :'Array', + :'screenshot' => :'String', + :'snapshot' => :'String', + :'source' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultBucketKeys` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'after_step_screenshot') + self.after_step_screenshot = attributes[:'after_step_screenshot'] + end + + if attributes.key?(:'after_turn_screenshot') + self.after_turn_screenshot = attributes[:'after_turn_screenshot'] + end + + if attributes.key?(:'artifacts') + self.artifacts = attributes[:'artifacts'] + end + + if attributes.key?(:'before_step_screenshot') + self.before_step_screenshot = attributes[:'before_step_screenshot'] + end + + if attributes.key?(:'before_turn_screenshot') + self.before_turn_screenshot = attributes[:'before_turn_screenshot'] + end + + if attributes.key?(:'crash_report') + self.crash_report = attributes[:'crash_report'] + end + + if attributes.key?(:'device_logs') + self.device_logs = attributes[:'device_logs'] + end + + if attributes.key?(:'email_messages') + if (value = attributes[:'email_messages']).is_a?(Array) + self.email_messages = value + end + end + + if attributes.key?(:'screenshot') + self.screenshot = attributes[:'screenshot'] + end + + if attributes.key?(:'snapshot') + self.snapshot = attributes[:'snapshot'] + end + + if attributes.key?(:'source') + self.source = attributes[:'source'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + after_step_screenshot == o.after_step_screenshot && + after_turn_screenshot == o.after_turn_screenshot && + artifacts == o.artifacts && + before_step_screenshot == o.before_step_screenshot && + before_turn_screenshot == o.before_turn_screenshot && + crash_report == o.crash_report && + device_logs == o.device_logs && + email_messages == o.email_messages && + screenshot == o.screenshot && + snapshot == o.snapshot && + source == o.source && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [after_step_screenshot, after_turn_screenshot, artifacts, before_step_screenshot, before_turn_screenshot, crash_report, device_logs, email_messages, screenshot, snapshot, source, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_cdn_cache_status.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_cdn_cache_status.rb new file mode 100644 index 000000000000..ffdd9e8c2e13 --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_cdn_cache_status.rb @@ -0,0 +1,115 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Cache status reported by the CDN for the response. + class SyntheticsTestResultCdnCacheStatus + include BaseGenericModel + + # Whether the response was served from the CDN cache. + attr_accessor :cached + + # Raw cache status string reported by the CDN. + attr_accessor :status + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'cached' => :'cached', + :'status' => :'status' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'cached' => :'Boolean', + :'status' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultCdnCacheStatus` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'cached') + self.cached = attributes[:'cached'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + cached == o.cached && + status == o.status && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [cached, status, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_cdn_provider_info.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_cdn_provider_info.rb new file mode 100644 index 000000000000..97505df458b6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_cdn_provider_info.rb @@ -0,0 +1,115 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # CDN provider details inferred from response headers. + class SyntheticsTestResultCdnProviderInfo + include BaseGenericModel + + # Cache status reported by the CDN for the response. + attr_accessor :cache + + # Name of the CDN provider. + attr_accessor :provider + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'cache' => :'cache', + :'provider' => :'provider' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'cache' => :'SyntheticsTestResultCdnCacheStatus', + :'provider' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultCdnProviderInfo` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'cache') + self.cache = attributes[:'cache'] + end + + if attributes.key?(:'provider') + self.provider = attributes[:'provider'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + cache == o.cache && + provider == o.provider && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [cache, provider, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_cdn_resource.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_cdn_resource.rb new file mode 100644 index 000000000000..c12c5f2a53b6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_cdn_resource.rb @@ -0,0 +1,135 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # A CDN resource encountered while executing a browser step. + class SyntheticsTestResultCdnResource + include BaseGenericModel + + # CDN provider details inferred from response headers. + attr_accessor :cdn + + # Resolved IP address for the CDN resource. + attr_accessor :resolved_ip + + # Unix timestamp (ms) of when the resource was fetched. + attr_accessor :timestamp + + # Timing breakdown for fetching the CDN resource. + attr_accessor :timings + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'cdn' => :'cdn', + :'resolved_ip' => :'resolved_ip', + :'timestamp' => :'timestamp', + :'timings' => :'timings' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'cdn' => :'SyntheticsTestResultCdnProviderInfo', + :'resolved_ip' => :'String', + :'timestamp' => :'Integer', + :'timings' => :'Hash' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultCdnResource` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'cdn') + self.cdn = attributes[:'cdn'] + end + + if attributes.key?(:'resolved_ip') + self.resolved_ip = attributes[:'resolved_ip'] + end + + if attributes.key?(:'timestamp') + self.timestamp = attributes[:'timestamp'] + end + + if attributes.key?(:'timings') + self.timings = attributes[:'timings'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + cdn == o.cdn && + resolved_ip == o.resolved_ip && + timestamp == o.timestamp && + timings == o.timings && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [cdn, resolved_ip, timestamp, timings, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_certificate.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_certificate.rb new file mode 100644 index 000000000000..d0a0ef259113 --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_certificate.rb @@ -0,0 +1,217 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # SSL/TLS certificate information returned from an SSL test. + class SyntheticsTestResultCertificate + include BaseGenericModel + + # Cipher used for the TLS connection. + attr_accessor :cipher + + # RSA exponent of the certificate. + attr_accessor :exponent + + # Extended key usage extensions for the certificate. + attr_accessor :ext_key_usage + + # SHA-1 fingerprint of the certificate. + attr_accessor :fingerprint + + # SHA-256 fingerprint of the certificate. + attr_accessor :fingerprint256 + + # Certificate issuer details. + attr_accessor :issuer + + # RSA modulus of the certificate. + attr_accessor :modulus + + # TLS protocol used (for example, `TLSv1.2`). + attr_accessor :protocol + + # Serial number of the certificate. + attr_accessor :serial_number + + # Certificate subject details. + attr_accessor :subject + + # TLS protocol version. + attr_accessor :tls_version + + # Validity window of a certificate. + attr_accessor :valid + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.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' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'cipher' => :'String', + :'exponent' => :'Integer', + :'ext_key_usage' => :'Array', + :'fingerprint' => :'String', + :'fingerprint256' => :'String', + :'issuer' => :'Hash', + :'modulus' => :'String', + :'protocol' => :'String', + :'serial_number' => :'String', + :'subject' => :'Hash', + :'tls_version' => :'Float', + :'valid' => :'SyntheticsTestResultCertificateValidity' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultCertificate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'cipher') + self.cipher = attributes[:'cipher'] + end + + if attributes.key?(:'exponent') + self.exponent = attributes[:'exponent'] + end + + if attributes.key?(:'ext_key_usage') + if (value = attributes[:'ext_key_usage']).is_a?(Array) + self.ext_key_usage = value + end + end + + if attributes.key?(:'fingerprint') + self.fingerprint = attributes[:'fingerprint'] + end + + if attributes.key?(:'fingerprint256') + self.fingerprint256 = attributes[:'fingerprint256'] + end + + if attributes.key?(:'issuer') + self.issuer = attributes[:'issuer'] + end + + if attributes.key?(:'modulus') + self.modulus = attributes[:'modulus'] + end + + if attributes.key?(:'protocol') + self.protocol = attributes[:'protocol'] + end + + if attributes.key?(:'serial_number') + self.serial_number = attributes[:'serial_number'] + end + + if attributes.key?(:'subject') + self.subject = attributes[:'subject'] + end + + if attributes.key?(:'tls_version') + self.tls_version = attributes[:'tls_version'] + end + + if attributes.key?(:'valid') + self.valid = attributes[:'valid'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + cipher == o.cipher && + exponent == o.exponent && + ext_key_usage == o.ext_key_usage && + fingerprint == o.fingerprint && + fingerprint256 == o.fingerprint256 && + issuer == o.issuer && + modulus == o.modulus && + protocol == o.protocol && + serial_number == o.serial_number && + subject == o.subject && + tls_version == o.tls_version && + valid == o.valid && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [cipher, exponent, ext_key_usage, fingerprint, fingerprint256, issuer, modulus, protocol, serial_number, subject, tls_version, valid, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_certificate_validity.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_certificate_validity.rb new file mode 100644 index 000000000000..90540fd98cbc --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_certificate_validity.rb @@ -0,0 +1,115 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Validity window of a certificate. + class SyntheticsTestResultCertificateValidity + include BaseGenericModel + + # Unix timestamp (ms) of when the certificate became valid. + attr_accessor :from + + # Unix timestamp (ms) of when the certificate expires. + attr_accessor :to + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'from' => :'from', + :'to' => :'to' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'from' => :'Integer', + :'to' => :'Integer' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultCertificateValidity` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'from') + self.from = attributes[:'from'] + end + + if attributes.key?(:'to') + self.to = attributes[:'to'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + from == o.from && + to == o.to && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [from, to, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_ci.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_ci.rb new file mode 100644 index 000000000000..6f37f8fdb8fa --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_ci.rb @@ -0,0 +1,135 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # CI information associated with the test result. + class SyntheticsTestResultCI + include BaseGenericModel + + # Details of the CI pipeline. + attr_accessor :pipeline + + # Details of the CI provider. + attr_accessor :provider + + # Details of the CI stage. + attr_accessor :stage + + # Path of the workspace that ran the CI job. + attr_accessor :workspace_path + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'pipeline' => :'pipeline', + :'provider' => :'provider', + :'stage' => :'stage', + :'workspace_path' => :'workspace_path' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'pipeline' => :'SyntheticsTestResultCIPipeline', + :'provider' => :'SyntheticsTestResultCIProvider', + :'stage' => :'SyntheticsTestResultCIStage', + :'workspace_path' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultCI` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'pipeline') + self.pipeline = attributes[:'pipeline'] + end + + if attributes.key?(:'provider') + self.provider = attributes[:'provider'] + end + + if attributes.key?(:'stage') + self.stage = attributes[:'stage'] + end + + if attributes.key?(:'workspace_path') + self.workspace_path = attributes[:'workspace_path'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + pipeline == o.pipeline && + provider == o.provider && + stage == o.stage && + workspace_path == o.workspace_path && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [pipeline, provider, stage, workspace_path, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_ci_pipeline.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_ci_pipeline.rb new file mode 100644 index 000000000000..0a011b0a047f --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_ci_pipeline.rb @@ -0,0 +1,135 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Details of the CI pipeline. + class SyntheticsTestResultCIPipeline + include BaseGenericModel + + # Pipeline identifier. + attr_accessor :id + + # Pipeline name. + attr_accessor :name + + # Pipeline number. + attr_accessor :number + + # Pipeline URL. + attr_accessor :url + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'name' => :'name', + :'number' => :'number', + :'url' => :'url' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'name' => :'String', + :'number' => :'Integer', + :'url' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultCIPipeline` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'number') + self.number = attributes[:'number'] + end + + if attributes.key?(:'url') + self.url = attributes[:'url'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + name == o.name && + number == o.number && + url == o.url && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, name, number, url, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_fast_test_result_device.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_ci_provider.rb similarity index 85% rename from lib/datadog_api_client/v2/models/synthetics_fast_test_result_device.rb rename to lib/datadog_api_client/v2/models/synthetics_test_result_ci_provider.rb index a25820dfaea4..65291b3c5ec4 100644 --- a/lib/datadog_api_client/v2/models/synthetics_fast_test_result_device.rb +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_ci_provider.rb @@ -17,14 +17,11 @@ require 'time' module DatadogAPIClient::V2 - # Device information for browser-based fast tests. - class SyntheticsFastTestResultDevice + # Details of the CI provider. + class SyntheticsTestResultCIProvider include BaseGenericModel - # Device identifier. - attr_accessor :id - - # Display name of the device. + # Provider name. attr_accessor :name attr_accessor :additional_properties @@ -33,7 +30,6 @@ class SyntheticsFastTestResultDevice # @!visibility private def self.attribute_map { - :'id' => :'id', :'name' => :'name' } end @@ -42,7 +38,6 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'id' => :'String', :'name' => :'String' } end @@ -52,7 +47,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsFastTestResultDevice` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultCIProvider` initialize method" end self.additional_properties = {} @@ -65,10 +60,6 @@ def initialize(attributes = {}) end } - if attributes.key?(:'id') - self.id = attributes[:'id'] - end - if attributes.key?(:'name') self.name = attributes[:'name'] end @@ -100,7 +91,6 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && - id == o.id && name == o.name && additional_properties == o.additional_properties end @@ -109,7 +99,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [id, name, additional_properties].hash + [name, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_ci_stage.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_ci_stage.rb new file mode 100644 index 000000000000..9886637bfb4b --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_ci_stage.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Details of the CI stage. + class SyntheticsTestResultCIStage + include BaseGenericModel + + # Stage name. + attr_accessor :name + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'name' => :'name' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'name' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultCIStage` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [name, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_data.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_data.rb new file mode 100644 index 000000000000..78baf6bbebc2 --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_data.rb @@ -0,0 +1,135 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Wrapper object for a Synthetic test result. + class SyntheticsTestResultData + include BaseGenericModel + + # Attributes of a Synthetic test result. + attr_accessor :attributes + + # The result ID. + attr_accessor :id + + # Relationships for a Synthetic test result. + attr_accessor :relationships + + # Type of the Synthetic test result resource, `result`. + attr_accessor :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'relationships' => :'relationships', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'SyntheticsTestResultAttributes', + :'id' => :'String', + :'relationships' => :'SyntheticsTestResultRelationships', + :'type' => :'SyntheticsTestResultType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'relationships') + self.relationships = attributes[:'relationships'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + relationships == o.relationships && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, relationships, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_detail.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_detail.rb new file mode 100644 index 000000000000..8c9003d6c960 --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_detail.rb @@ -0,0 +1,513 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Full result details for a Synthetic test execution. + class SyntheticsTestResultDetail + include BaseGenericModel + + # Assertion results produced by the test. + attr_accessor :assertions + + # Storage bucket keys for artifacts produced during a step or test. + attr_accessor :bucket_keys + + # gRPC call type (for example, `unary`, `healthCheck`, or `reflection`). + attr_accessor :call_type + + # SSL/TLS certificate information returned from an SSL test. + attr_accessor :cert + + # Compressed JSON descriptor for the test (internal format). + attr_accessor :compressed_json_descriptor + + # Compressed representation of the test steps (internal format). + attr_accessor :compressed_steps + + # Outcome of the connection attempt (for example, `established`, `refused`). + attr_accessor :connection_outcome + + # DNS resolution details recorded during the test execution. + attr_accessor :dns_resolution + + # Duration of the test execution (in milliseconds). + attr_accessor :duration + + # Whether the test exited early because a step marked with `exitIfSucceed` passed. + attr_accessor :exited_on_step_success + + # Details about the failure of a Synthetic test. + attr_accessor :failure + + # Timestamp of when the test finished (in milliseconds). + attr_accessor :finished_at + + # Handshake request and response for protocol-level tests. + attr_accessor :handshake + + # The unique identifier for this result. + attr_accessor :id + + # The initial result ID before any retries. + attr_accessor :initial_id + + # Whether this result is from a fast retry. + attr_accessor :is_fast_retry + + # Whether this result is from the last retry. + attr_accessor :is_last_retry + + # Network Path test result capturing the path between source and destination. + attr_accessor :netpath + + # Aggregated network statistics from the test execution. + attr_accessor :netstats + + # OCSP response received while validating a certificate. + attr_accessor :ocsp + + # A network probe result, used for traceroute hops and ping summaries. + attr_accessor :ping + + # Number of emails received during the test (email tests). + attr_accessor :received_email_count + + # Message received from the target (for WebSocket/TCP/UDP tests). + attr_accessor :received_message + + # Details of the outgoing request made during the test execution. + attr_accessor :request + + # IP address resolved for the target host. + attr_accessor :resolved_ip + + # Details of the response received during the test execution. + attr_accessor :response + + # The type of run for a Synthetic test result. + attr_accessor :run_type + + # Message sent to the target (for WebSocket/TCP/UDP tests). + attr_accessor :sent_message + + # Start URL for the test (browser tests). + attr_accessor :start_url + + # Timestamp of when the test started (in milliseconds). + attr_accessor :started_at + + # Status of a Synthetic test result. + attr_accessor :status + + # Step results (for browser, mobile, and multistep API tests). + attr_accessor :steps + + # Time to interactive in milliseconds (browser tests). + attr_accessor :time_to_interactive + + # Timing breakdown of the test request phases (for example, DNS, TCP, TLS, first byte). + attr_accessor :timings + + # Trace identifiers associated with a Synthetic test result. + attr_accessor :trace + + # Traceroute hop results (for network tests). + attr_accessor :traceroute + + # Timestamp of when the test was triggered (in milliseconds). + attr_accessor :triggered_at + + # Whether the test was executed through a tunnel. + attr_accessor :tunnel + + # Turns executed by a goal-based browser test. + attr_accessor :turns + + # Whether the test runner was unhealthy at the time of execution. + attr_accessor :unhealthy + + # Variables captured during a test step. + attr_accessor :variables + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.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' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'assertions' => :'Array', + :'bucket_keys' => :'SyntheticsTestResultBucketKeys', + :'call_type' => :'String', + :'cert' => :'SyntheticsTestResultCertificate', + :'compressed_json_descriptor' => :'String', + :'compressed_steps' => :'String', + :'connection_outcome' => :'String', + :'dns_resolution' => :'SyntheticsTestResultDnsResolution', + :'duration' => :'Float', + :'exited_on_step_success' => :'Boolean', + :'failure' => :'SyntheticsTestResultFailure', + :'finished_at' => :'Integer', + :'handshake' => :'SyntheticsTestResultHandshake', + :'id' => :'String', + :'initial_id' => :'String', + :'is_fast_retry' => :'Boolean', + :'is_last_retry' => :'Boolean', + :'netpath' => :'SyntheticsTestResultNetpath', + :'netstats' => :'SyntheticsTestResultNetstats', + :'ocsp' => :'SyntheticsTestResultOCSPResponse', + :'ping' => :'SyntheticsTestResultTracerouteHop', + :'received_email_count' => :'Integer', + :'received_message' => :'String', + :'request' => :'SyntheticsTestResultRequestInfo', + :'resolved_ip' => :'String', + :'response' => :'SyntheticsTestResultResponseInfo', + :'run_type' => :'SyntheticsTestResultRunType', + :'sent_message' => :'String', + :'start_url' => :'String', + :'started_at' => :'Integer', + :'status' => :'SyntheticsTestResultStatus', + :'steps' => :'Array', + :'time_to_interactive' => :'Integer', + :'timings' => :'Hash', + :'trace' => :'SyntheticsTestResultTrace', + :'traceroute' => :'Array', + :'triggered_at' => :'Integer', + :'tunnel' => :'Boolean', + :'turns' => :'Array', + :'unhealthy' => :'Boolean', + :'variables' => :'SyntheticsTestResultVariables' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultDetail` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'assertions') + if (value = attributes[:'assertions']).is_a?(Array) + self.assertions = value + end + end + + if attributes.key?(:'bucket_keys') + self.bucket_keys = attributes[:'bucket_keys'] + end + + if attributes.key?(:'call_type') + self.call_type = attributes[:'call_type'] + end + + if attributes.key?(:'cert') + self.cert = attributes[:'cert'] + end + + if attributes.key?(:'compressed_json_descriptor') + self.compressed_json_descriptor = attributes[:'compressed_json_descriptor'] + end + + if attributes.key?(:'compressed_steps') + self.compressed_steps = attributes[:'compressed_steps'] + end + + if attributes.key?(:'connection_outcome') + self.connection_outcome = attributes[:'connection_outcome'] + end + + if attributes.key?(:'dns_resolution') + self.dns_resolution = attributes[:'dns_resolution'] + end + + if attributes.key?(:'duration') + self.duration = attributes[:'duration'] + end + + if attributes.key?(:'exited_on_step_success') + self.exited_on_step_success = attributes[:'exited_on_step_success'] + end + + if attributes.key?(:'failure') + self.failure = attributes[:'failure'] + end + + if attributes.key?(:'finished_at') + self.finished_at = attributes[:'finished_at'] + end + + if attributes.key?(:'handshake') + self.handshake = attributes[:'handshake'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'initial_id') + self.initial_id = attributes[:'initial_id'] + end + + if attributes.key?(:'is_fast_retry') + self.is_fast_retry = attributes[:'is_fast_retry'] + end + + if attributes.key?(:'is_last_retry') + self.is_last_retry = attributes[:'is_last_retry'] + end + + if attributes.key?(:'netpath') + self.netpath = attributes[:'netpath'] + end + + if attributes.key?(:'netstats') + self.netstats = attributes[:'netstats'] + end + + if attributes.key?(:'ocsp') + self.ocsp = attributes[:'ocsp'] + end + + if attributes.key?(:'ping') + self.ping = attributes[:'ping'] + end + + if attributes.key?(:'received_email_count') + self.received_email_count = attributes[:'received_email_count'] + end + + if attributes.key?(:'received_message') + self.received_message = attributes[:'received_message'] + end + + if attributes.key?(:'request') + self.request = attributes[:'request'] + end + + if attributes.key?(:'resolved_ip') + self.resolved_ip = attributes[:'resolved_ip'] + end + + if attributes.key?(:'response') + self.response = attributes[:'response'] + end + + if attributes.key?(:'run_type') + self.run_type = attributes[:'run_type'] + end + + if attributes.key?(:'sent_message') + self.sent_message = attributes[:'sent_message'] + end + + if attributes.key?(:'start_url') + self.start_url = attributes[:'start_url'] + end + + if attributes.key?(:'started_at') + self.started_at = attributes[:'started_at'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'steps') + if (value = attributes[:'steps']).is_a?(Array) + self.steps = value + end + end + + if attributes.key?(:'time_to_interactive') + self.time_to_interactive = attributes[:'time_to_interactive'] + end + + if attributes.key?(:'timings') + self.timings = attributes[:'timings'] + end + + if attributes.key?(:'trace') + self.trace = attributes[:'trace'] + end + + if attributes.key?(:'traceroute') + if (value = attributes[:'traceroute']).is_a?(Array) + self.traceroute = value + end + end + + if attributes.key?(:'triggered_at') + self.triggered_at = attributes[:'triggered_at'] + end + + if attributes.key?(:'tunnel') + self.tunnel = attributes[:'tunnel'] + end + + if attributes.key?(:'turns') + if (value = attributes[:'turns']).is_a?(Array) + self.turns = value + end + end + + if attributes.key?(:'unhealthy') + self.unhealthy = attributes[:'unhealthy'] + end + + if attributes.key?(:'variables') + self.variables = attributes[:'variables'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + assertions == o.assertions && + bucket_keys == o.bucket_keys && + call_type == o.call_type && + cert == o.cert && + compressed_json_descriptor == o.compressed_json_descriptor && + compressed_steps == o.compressed_steps && + connection_outcome == o.connection_outcome && + dns_resolution == o.dns_resolution && + duration == o.duration && + exited_on_step_success == o.exited_on_step_success && + failure == o.failure && + finished_at == o.finished_at && + handshake == o.handshake && + id == o.id && + initial_id == o.initial_id && + is_fast_retry == o.is_fast_retry && + is_last_retry == o.is_last_retry && + netpath == o.netpath && + netstats == o.netstats && + ocsp == o.ocsp && + ping == o.ping && + received_email_count == o.received_email_count && + received_message == o.received_message && + request == o.request && + resolved_ip == o.resolved_ip && + response == o.response && + run_type == o.run_type && + sent_message == o.sent_message && + start_url == o.start_url && + started_at == o.started_at && + status == o.status && + steps == o.steps && + time_to_interactive == o.time_to_interactive && + timings == o.timings && + trace == o.trace && + traceroute == o.traceroute && + triggered_at == o.triggered_at && + tunnel == o.tunnel && + turns == o.turns && + unhealthy == o.unhealthy && + variables == o.variables && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [assertions, bucket_keys, call_type, cert, compressed_json_descriptor, compressed_steps, connection_outcome, dns_resolution, duration, exited_on_step_success, failure, finished_at, handshake, id, initial_id, is_fast_retry, is_last_retry, netpath, netstats, ocsp, ping, received_email_count, received_message, request, resolved_ip, response, run_type, sent_message, start_url, started_at, status, steps, time_to_interactive, timings, trace, traceroute, triggered_at, tunnel, turns, unhealthy, variables, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_device.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_device.rb new file mode 100644 index 000000000000..47264001b07a --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_device.rb @@ -0,0 +1,155 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Device information for the test result (browser and mobile tests). + class SyntheticsTestResultDevice + include BaseGenericModel + + # Browser information for the device used to run the test. + attr_accessor :browser + + # Device identifier. + attr_accessor :id + + # Device name. + attr_accessor :name + + # Platform information for the device used to run the test. + attr_accessor :platform + + # Screen resolution of the device used to run the test. + attr_accessor :resolution + + # Device type. + attr_accessor :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'browser' => :'browser', + :'id' => :'id', + :'name' => :'name', + :'platform' => :'platform', + :'resolution' => :'resolution', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'browser' => :'SyntheticsTestResultDeviceBrowser', + :'id' => :'String', + :'name' => :'String', + :'platform' => :'SyntheticsTestResultDevicePlatform', + :'resolution' => :'SyntheticsTestResultDeviceResolution', + :'type' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultDevice` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'browser') + self.browser = attributes[:'browser'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'platform') + self.platform = attributes[:'platform'] + end + + if attributes.key?(:'resolution') + self.resolution = attributes[:'resolution'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + browser == o.browser && + id == o.id && + name == o.name && + platform == o.platform && + resolution == o.resolution && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [browser, id, name, platform, resolution, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_device_browser.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_device_browser.rb new file mode 100644 index 000000000000..c51c3c0ed075 --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_device_browser.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Browser information for the device used to run the test. + class SyntheticsTestResultDeviceBrowser + include BaseGenericModel + + # Browser type (for example, `chrome`, `firefox`). + attr_accessor :type + + # User agent string reported by the browser. + attr_accessor :user_agent + + # Browser version. + attr_accessor :version + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'type' => :'type', + :'user_agent' => :'user_agent', + :'version' => :'version' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'type' => :'String', + :'user_agent' => :'String', + :'version' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultDeviceBrowser` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'user_agent') + self.user_agent = attributes[:'user_agent'] + end + + if attributes.key?(:'version') + self.version = attributes[:'version'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type && + user_agent == o.user_agent && + version == o.version && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [type, user_agent, version, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_device_platform.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_device_platform.rb new file mode 100644 index 000000000000..c640e3eddf3a --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_device_platform.rb @@ -0,0 +1,115 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Platform information for the device used to run the test. + class SyntheticsTestResultDevicePlatform + include BaseGenericModel + + # Platform name (for example, `linux`, `macos`). + attr_accessor :name + + # Platform version. + attr_accessor :version + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'name' => :'name', + :'version' => :'version' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'name' => :'String', + :'version' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultDevicePlatform` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'version') + self.version = attributes[:'version'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + version == o.version && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [name, version, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_device_resolution.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_device_resolution.rb new file mode 100644 index 000000000000..440a7a217e2b --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_device_resolution.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Screen resolution of the device used to run the test. + class SyntheticsTestResultDeviceResolution + include BaseGenericModel + + # Viewport height in pixels. + attr_accessor :height + + # Device pixel ratio. + attr_accessor :pixel_ratio + + # Viewport width in pixels. + attr_accessor :width + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'height' => :'height', + :'pixel_ratio' => :'pixel_ratio', + :'width' => :'width' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'height' => :'Integer', + :'pixel_ratio' => :'Float', + :'width' => :'Integer' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultDeviceResolution` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'height') + self.height = attributes[:'height'] + end + + if attributes.key?(:'pixel_ratio') + self.pixel_ratio = attributes[:'pixel_ratio'] + end + + if attributes.key?(:'width') + self.width = attributes[:'width'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + height == o.height && + pixel_ratio == o.pixel_ratio && + width == o.width && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [height, pixel_ratio, width, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_dns_record.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_dns_record.rb new file mode 100644 index 000000000000..340c262a4392 --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_dns_record.rb @@ -0,0 +1,117 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # A DNS record returned in a DNS test response. + class SyntheticsTestResultDnsRecord + include BaseGenericModel + + # DNS record type (for example, `A`, `AAAA`, `CNAME`). + attr_accessor :type + + # Values associated with the DNS record. + attr_accessor :values + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'type' => :'type', + :'values' => :'values' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'type' => :'String', + :'values' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultDnsRecord` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'values') + if (value = attributes[:'values']).is_a?(Array) + self.values = value + end + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type && + values == o.values && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [type, values, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_dns_resolution.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_dns_resolution.rb new file mode 100644 index 000000000000..92383842f817 --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_dns_resolution.rb @@ -0,0 +1,137 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # DNS resolution details recorded during the test execution. + class SyntheticsTestResultDnsResolution + include BaseGenericModel + + # DNS resolution attempts made during the test. + attr_accessor :attempts + + # Resolved IP address for the target host. + attr_accessor :resolved_ip + + # Resolved port for the target service. + attr_accessor :resolved_port + + # DNS server used for the resolution. + attr_accessor :server + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attempts' => :'attempts', + :'resolved_ip' => :'resolved_ip', + :'resolved_port' => :'resolved_port', + :'server' => :'server' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attempts' => :'Array>', + :'resolved_ip' => :'String', + :'resolved_port' => :'String', + :'server' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultDnsResolution` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attempts') + if (value = attributes[:'attempts']).is_a?(Array) + self.attempts = value + end + end + + if attributes.key?(:'resolved_ip') + self.resolved_ip = attributes[:'resolved_ip'] + end + + if attributes.key?(:'resolved_port') + self.resolved_port = attributes[:'resolved_port'] + end + + if attributes.key?(:'server') + self.server = attributes[:'server'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attempts == o.attempts && + resolved_ip == o.resolved_ip && + resolved_port == o.resolved_port && + server == o.server && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attempts, resolved_ip, resolved_port, server, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_duration.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_duration.rb new file mode 100644 index 000000000000..d370d02af1b4 --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_duration.rb @@ -0,0 +1,115 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Total duration of a Synthetic test execution. + class SyntheticsTestResultDuration + include BaseGenericModel + + # Whether a duration was recorded for this execution. + attr_accessor :has_duration + + # Duration value in milliseconds. + attr_accessor :value + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'has_duration' => :'has_duration', + :'value' => :'value' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'has_duration' => :'Boolean', + :'value' => :'Integer' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultDuration` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'has_duration') + self.has_duration = attributes[:'has_duration'] + end + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + has_duration == o.has_duration && + value == o.value && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [has_duration, value, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_execution_info.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_execution_info.rb new file mode 100644 index 000000000000..9611f55e1afa --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_execution_info.rb @@ -0,0 +1,155 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Execution details for a Synthetic test result. + class SyntheticsTestResultExecutionInfo + include BaseGenericModel + + # Total duration of a Synthetic test execution. + attr_accessor :duration + + # Error message if the execution encountered an issue. + attr_accessor :error_message + + # Whether this result is from a fast retry. + attr_accessor :is_fast_retry + + # Timing breakdown of the test execution in milliseconds. + attr_accessor :timings + + # Whether the test was executed through a tunnel. + attr_accessor :tunnel + + # Whether the location was unhealthy during execution. + attr_accessor :unhealthy + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'duration' => :'duration', + :'error_message' => :'error_message', + :'is_fast_retry' => :'is_fast_retry', + :'timings' => :'timings', + :'tunnel' => :'tunnel', + :'unhealthy' => :'unhealthy' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'duration' => :'SyntheticsTestResultDuration', + :'error_message' => :'String', + :'is_fast_retry' => :'Boolean', + :'timings' => :'Hash', + :'tunnel' => :'Boolean', + :'unhealthy' => :'Boolean' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultExecutionInfo` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'duration') + self.duration = attributes[:'duration'] + end + + if attributes.key?(:'error_message') + self.error_message = attributes[:'error_message'] + end + + if attributes.key?(:'is_fast_retry') + self.is_fast_retry = attributes[:'is_fast_retry'] + end + + if attributes.key?(:'timings') + self.timings = attributes[:'timings'] + end + + if attributes.key?(:'tunnel') + self.tunnel = attributes[:'tunnel'] + end + + if attributes.key?(:'unhealthy') + self.unhealthy = attributes[:'unhealthy'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + duration == o.duration && + error_message == o.error_message && + is_fast_retry == o.is_fast_retry && + timings == o.timings && + tunnel == o.tunnel && + unhealthy == o.unhealthy && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [duration, error_message, is_fast_retry, timings, tunnel, unhealthy, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_failure.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_failure.rb new file mode 100644 index 000000000000..f1174d9e455f --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_failure.rb @@ -0,0 +1,135 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Details about the failure of a Synthetic test. + class SyntheticsTestResultFailure + include BaseGenericModel + + # Error code for the failure. + attr_accessor :code + + # Internal error code used for debugging. + attr_accessor :internal_code + + # Internal error message used for debugging. + attr_accessor :internal_message + + # Error message for the failure. + attr_accessor :message + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'code' => :'code', + :'internal_code' => :'internal_code', + :'internal_message' => :'internal_message', + :'message' => :'message' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'code' => :'String', + :'internal_code' => :'String', + :'internal_message' => :'String', + :'message' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultFailure` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'code') + self.code = attributes[:'code'] + end + + if attributes.key?(:'internal_code') + self.internal_code = attributes[:'internal_code'] + end + + if attributes.key?(:'internal_message') + self.internal_message = attributes[:'internal_message'] + end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + code == o.code && + internal_code == o.internal_code && + internal_message == o.internal_message && + message == o.message && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [code, internal_code, internal_message, message, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_file_ref.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_file_ref.rb new file mode 100644 index 000000000000..51fc8874cc13 --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_file_ref.rb @@ -0,0 +1,145 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Reference to a file attached to a Synthetic test request. + class SyntheticsTestResultFileRef + include BaseGenericModel + + # Storage bucket key where the file is stored. + attr_accessor :bucket_key + + # Encoding of the file contents. + attr_accessor :encoding + + # File name. + attr_accessor :name + + # File size in bytes. + attr_accessor :size + + # File MIME type. + attr_accessor :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'bucket_key' => :'bucket_key', + :'encoding' => :'encoding', + :'name' => :'name', + :'size' => :'size', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'bucket_key' => :'String', + :'encoding' => :'String', + :'name' => :'String', + :'size' => :'Integer', + :'type' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultFileRef` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'bucket_key') + self.bucket_key = attributes[:'bucket_key'] + end + + if attributes.key?(:'encoding') + self.encoding = attributes[:'encoding'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'size') + self.size = attributes[:'size'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + bucket_key == o.bucket_key && + encoding == o.encoding && + name == o.name && + size == o.size && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [bucket_key, encoding, name, size, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_git.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_git.rb new file mode 100644 index 000000000000..a7247f9157d2 --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_git.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Git information associated with the test result. + class SyntheticsTestResultGit + include BaseGenericModel + + # Git branch name. + attr_accessor :branch + + # Details of the Git commit associated with the test result. + attr_accessor :commit + + # Git repository URL. + attr_accessor :repository_url + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'branch' => :'branch', + :'commit' => :'commit', + :'repository_url' => :'repository_url' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'branch' => :'String', + :'commit' => :'SyntheticsTestResultGitCommit', + :'repository_url' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultGit` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'branch') + self.branch = attributes[:'branch'] + end + + if attributes.key?(:'commit') + self.commit = attributes[:'commit'] + end + + if attributes.key?(:'repository_url') + self.repository_url = attributes[:'repository_url'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + branch == o.branch && + commit == o.commit && + repository_url == o.repository_url && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [branch, commit, repository_url, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_git_commit.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_git_commit.rb new file mode 100644 index 000000000000..4f177bfebda3 --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_git_commit.rb @@ -0,0 +1,145 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Details of the Git commit associated with the test result. + class SyntheticsTestResultGitCommit + include BaseGenericModel + + # A Git user (author or committer). + attr_accessor :author + + # A Git user (author or committer). + attr_accessor :committer + + # Commit message. + attr_accessor :message + + # Commit SHA. + attr_accessor :sha + + # URL of the commit. + attr_accessor :url + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'author' => :'author', + :'committer' => :'committer', + :'message' => :'message', + :'sha' => :'sha', + :'url' => :'url' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'author' => :'SyntheticsTestResultGitUser', + :'committer' => :'SyntheticsTestResultGitUser', + :'message' => :'String', + :'sha' => :'String', + :'url' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultGitCommit` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'author') + self.author = attributes[:'author'] + end + + if attributes.key?(:'committer') + self.committer = attributes[:'committer'] + end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.key?(:'sha') + self.sha = attributes[:'sha'] + end + + if attributes.key?(:'url') + self.url = attributes[:'url'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + author == o.author && + committer == o.committer && + message == o.message && + sha == o.sha && + url == o.url && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [author, committer, message, sha, url, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_git_user.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_git_user.rb new file mode 100644 index 000000000000..abc027e39d45 --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_git_user.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # A Git user (author or committer). + class SyntheticsTestResultGitUser + include BaseGenericModel + + # Timestamp of the commit action for this user. + attr_accessor :date + + # Email address of the Git user. + attr_accessor :email + + # Name of the Git user. + attr_accessor :name + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'date' => :'date', + :'email' => :'email', + :'name' => :'name' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'date' => :'String', + :'email' => :'String', + :'name' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultGitUser` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'date') + self.date = attributes[:'date'] + end + + if attributes.key?(:'email') + self.email = attributes[:'email'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + date == o.date && + email == o.email && + name == o.name && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [date, email, name, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_handshake.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_handshake.rb new file mode 100644 index 000000000000..ddb92a960370 --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_handshake.rb @@ -0,0 +1,115 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Handshake request and response for protocol-level tests. + class SyntheticsTestResultHandshake + include BaseGenericModel + + # Details of the outgoing request made during the test execution. + attr_accessor :request + + # Details of the response received during the test execution. + attr_accessor :response + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'request' => :'request', + :'response' => :'response' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'request' => :'SyntheticsTestResultRequestInfo', + :'response' => :'SyntheticsTestResultResponseInfo' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultHandshake` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'request') + self.request = attributes[:'request'] + end + + if attributes.key?(:'response') + self.response = attributes[:'response'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + request == o.request && + response == o.response && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [request, response, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_fast_test_result_failure.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_health_check.rb similarity index 81% rename from lib/datadog_api_client/v2/models/synthetics_fast_test_result_failure.rb rename to lib/datadog_api_client/v2/models/synthetics_test_result_health_check.rb index a7ffb0a28f1c..f93aa6c5db4f 100644 --- a/lib/datadog_api_client/v2/models/synthetics_fast_test_result_failure.rb +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_health_check.rb @@ -17,24 +17,24 @@ require 'time' module DatadogAPIClient::V2 - # Failure details if the fast test did not pass. - class SyntheticsFastTestResultFailure + # Health check information returned from a gRPC health check call. + class SyntheticsTestResultHealthCheck include BaseGenericModel - # Error code identifying the failure type. - attr_accessor :code - - # Human-readable description of the failure. + # Raw health check message payload. attr_accessor :message + # Health check status code. + attr_accessor :status + attr_accessor :additional_properties # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map { - :'code' => :'code', - :'message' => :'message' + :'message' => :'message', + :'status' => :'status' } end @@ -42,8 +42,8 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'code' => :'String', - :'message' => :'String' + :'message' => :'Hash', + :'status' => :'Integer' } end @@ -52,7 +52,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsFastTestResultFailure` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultHealthCheck` initialize method" end self.additional_properties = {} @@ -65,13 +65,13 @@ def initialize(attributes = {}) end } - if attributes.key?(:'code') - self.code = attributes[:'code'] - end - if attributes.key?(:'message') self.message = attributes[:'message'] end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end end # Returns the object in the form of hash, with additionalProperties support. @@ -100,8 +100,8 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && - code == o.code && message == o.message && + status == o.status && additional_properties == o.additional_properties end @@ -109,7 +109,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [code, message, additional_properties].hash + [message, status, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_included_item.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_included_item.rb new file mode 100644 index 000000000000..4e6e476657ce --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_included_item.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # An included related resource. + class SyntheticsTestResultIncludedItem + include BaseGenericModel + + # Attributes of the included resource. + attr_accessor :attributes + + # ID of the included resource. + attr_accessor :id + + # Type of the included resource. + attr_accessor :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'Hash', + :'id' => :'String', + :'type' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultIncludedItem` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_fast_test_result_location.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_location.rb similarity index 92% rename from lib/datadog_api_client/v2/models/synthetics_fast_test_result_location.rb rename to lib/datadog_api_client/v2/models/synthetics_test_result_location.rb index a955a8278156..e0ddf60fecbc 100644 --- a/lib/datadog_api_client/v2/models/synthetics_fast_test_result_location.rb +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_location.rb @@ -17,17 +17,17 @@ require 'time' module DatadogAPIClient::V2 - # Location from which the fast test was executed. - class SyntheticsFastTestResultLocation + # Location information for a Synthetic test result. + class SyntheticsTestResultLocation include BaseGenericModel - # ID of the location. + # Identifier of the location. attr_accessor :id - # Display name of the location. + # Human-readable name of the location. attr_accessor :name - # Agent version running at this location. + # Version of the worker that ran the test. attr_accessor :version # Identifier of the specific worker that ran the test. @@ -62,7 +62,7 @@ def self.openapi_types # @!visibility private def initialize(attributes = {}) if (!attributes.is_a?(Hash)) - fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsFastTestResultLocation` initialize method" + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultLocation` initialize method" end self.additional_properties = {} diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_netpath.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_netpath.rb new file mode 100644 index 000000000000..dff054156c65 --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_netpath.rb @@ -0,0 +1,179 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Network Path test result capturing the path between source and destination. + class SyntheticsTestResultNetpath + include BaseGenericModel + + # Destination endpoint of a network path measurement. + attr_accessor :destination + + # Hops along the network path. + attr_accessor :hops + + # Origin of the network path (for example, probe source). + attr_accessor :origin + + # Identifier of the path trace. + attr_accessor :pathtrace_id + + # Protocol used for the path trace (for example, `tcp`, `udp`, `icmp`). + attr_accessor :protocol + + # Source endpoint of a network path measurement. + attr_accessor :source + + # Tags associated with the network path measurement. + attr_accessor :tags + + # Unix timestamp (ms) of the network path measurement. + attr_accessor :timestamp + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'destination' => :'destination', + :'hops' => :'hops', + :'origin' => :'origin', + :'pathtrace_id' => :'pathtrace_id', + :'protocol' => :'protocol', + :'source' => :'source', + :'tags' => :'tags', + :'timestamp' => :'timestamp' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'destination' => :'SyntheticsTestResultNetpathDestination', + :'hops' => :'Array', + :'origin' => :'String', + :'pathtrace_id' => :'String', + :'protocol' => :'String', + :'source' => :'SyntheticsTestResultNetpathEndpoint', + :'tags' => :'Array', + :'timestamp' => :'Integer' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultNetpath` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'destination') + self.destination = attributes[:'destination'] + end + + if attributes.key?(:'hops') + if (value = attributes[:'hops']).is_a?(Array) + self.hops = value + end + end + + if attributes.key?(:'origin') + self.origin = attributes[:'origin'] + end + + if attributes.key?(:'pathtrace_id') + self.pathtrace_id = attributes[:'pathtrace_id'] + end + + if attributes.key?(:'protocol') + self.protocol = attributes[:'protocol'] + end + + if attributes.key?(:'source') + self.source = attributes[:'source'] + end + + if attributes.key?(:'tags') + if (value = attributes[:'tags']).is_a?(Array) + self.tags = value + end + end + + if attributes.key?(:'timestamp') + self.timestamp = attributes[:'timestamp'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + destination == o.destination && + hops == o.hops && + origin == o.origin && + pathtrace_id == o.pathtrace_id && + protocol == o.protocol && + source == o.source && + tags == o.tags && + timestamp == o.timestamp && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [destination, hops, origin, pathtrace_id, protocol, source, tags, timestamp, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_netpath_destination.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_netpath_destination.rb new file mode 100644 index 000000000000..add86dfcda97 --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_netpath_destination.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Destination endpoint of a network path measurement. + class SyntheticsTestResultNetpathDestination + include BaseGenericModel + + # Hostname of the destination. + attr_accessor :hostname + + # IP address of the destination. + attr_accessor :ip_address + + # Port of the destination service. + attr_accessor :port + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'hostname' => :'hostname', + :'ip_address' => :'ip_address', + :'port' => :'port' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'hostname' => :'String', + :'ip_address' => :'String', + :'port' => :'Integer' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultNetpathDestination` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'hostname') + self.hostname = attributes[:'hostname'] + end + + if attributes.key?(:'ip_address') + self.ip_address = attributes[:'ip_address'] + end + + if attributes.key?(:'port') + self.port = attributes[:'port'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + hostname == o.hostname && + ip_address == o.ip_address && + port == o.port && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [hostname, ip_address, port, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_netpath_endpoint.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_netpath_endpoint.rb new file mode 100644 index 000000000000..e3cfe5ede364 --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_netpath_endpoint.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Source endpoint of a network path measurement. + class SyntheticsTestResultNetpathEndpoint + include BaseGenericModel + + # Hostname of the endpoint. + attr_accessor :hostname + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'hostname' => :'hostname' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'hostname' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultNetpathEndpoint` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'hostname') + self.hostname = attributes[:'hostname'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + hostname == o.hostname && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [hostname, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_netpath_hop.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_netpath_hop.rb new file mode 100644 index 000000000000..1e50a4d86f5e --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_netpath_hop.rb @@ -0,0 +1,145 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # A single hop along a network path. + class SyntheticsTestResultNetpathHop + include BaseGenericModel + + # Resolved hostname of the hop. + attr_accessor :hostname + + # IP address of the hop. + attr_accessor :ip_address + + # Whether this hop was reachable. + attr_accessor :reachable + + # Round-trip time to this hop in milliseconds. + attr_accessor :rtt + + # Time-to-live value of the probe packet at this hop. + attr_accessor :ttl + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'hostname' => :'hostname', + :'ip_address' => :'ip_address', + :'reachable' => :'reachable', + :'rtt' => :'rtt', + :'ttl' => :'ttl' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'hostname' => :'String', + :'ip_address' => :'String', + :'reachable' => :'Boolean', + :'rtt' => :'Float', + :'ttl' => :'Integer' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultNetpathHop` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'hostname') + self.hostname = attributes[:'hostname'] + end + + if attributes.key?(:'ip_address') + self.ip_address = attributes[:'ip_address'] + end + + if attributes.key?(:'reachable') + self.reachable = attributes[:'reachable'] + end + + if attributes.key?(:'rtt') + self.rtt = attributes[:'rtt'] + end + + if attributes.key?(:'ttl') + self.ttl = attributes[:'ttl'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + hostname == o.hostname && + ip_address == o.ip_address && + reachable == o.reachable && + rtt == o.rtt && + ttl == o.ttl && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [hostname, ip_address, reachable, rtt, ttl, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_netstats.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_netstats.rb new file mode 100644 index 000000000000..dbd009066597 --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_netstats.rb @@ -0,0 +1,155 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Aggregated network statistics from the test execution. + class SyntheticsTestResultNetstats + include BaseGenericModel + + # Statistics about the number of hops for a network test. + attr_accessor :hops + + # Network jitter in milliseconds. + attr_accessor :jitter + + # Latency statistics for a network probe. + attr_accessor :latency + + # Percentage of probe packets lost. + attr_accessor :packet_loss_percentage + + # Number of probe packets received. + attr_accessor :packets_received + + # Number of probe packets sent. + attr_accessor :packets_sent + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'hops' => :'hops', + :'jitter' => :'jitter', + :'latency' => :'latency', + :'packet_loss_percentage' => :'packet_loss_percentage', + :'packets_received' => :'packets_received', + :'packets_sent' => :'packets_sent' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'hops' => :'SyntheticsTestResultNetstatsHops', + :'jitter' => :'Float', + :'latency' => :'SyntheticsTestResultNetworkLatency', + :'packet_loss_percentage' => :'Float', + :'packets_received' => :'Integer', + :'packets_sent' => :'Integer' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultNetstats` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'hops') + self.hops = attributes[:'hops'] + end + + if attributes.key?(:'jitter') + self.jitter = attributes[:'jitter'] + end + + if attributes.key?(:'latency') + self.latency = attributes[:'latency'] + end + + if attributes.key?(:'packet_loss_percentage') + self.packet_loss_percentage = attributes[:'packet_loss_percentage'] + end + + if attributes.key?(:'packets_received') + self.packets_received = attributes[:'packets_received'] + end + + if attributes.key?(:'packets_sent') + self.packets_sent = attributes[:'packets_sent'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + hops == o.hops && + jitter == o.jitter && + latency == o.latency && + packet_loss_percentage == o.packet_loss_percentage && + packets_received == o.packets_received && + packets_sent == o.packets_sent && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [hops, jitter, latency, packet_loss_percentage, packets_received, packets_sent, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_netstats_hops.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_netstats_hops.rb new file mode 100644 index 000000000000..4d4546fc178f --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_netstats_hops.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Statistics about the number of hops for a network test. + class SyntheticsTestResultNetstatsHops + include BaseGenericModel + + # Average number of hops. + attr_accessor :avg + + # Maximum number of hops. + attr_accessor :max + + # Minimum number of hops. + attr_accessor :min + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'avg' => :'avg', + :'max' => :'max', + :'min' => :'min' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'avg' => :'Float', + :'max' => :'Integer', + :'min' => :'Integer' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultNetstatsHops` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'avg') + self.avg = attributes[:'avg'] + end + + if attributes.key?(:'max') + self.max = attributes[:'max'] + end + + if attributes.key?(:'min') + self.min = attributes[:'min'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + avg == o.avg && + max == o.max && + min == o.min && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [avg, max, min, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_network_latency.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_network_latency.rb new file mode 100644 index 000000000000..64d15dc0e86e --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_network_latency.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Latency statistics for a network probe. + class SyntheticsTestResultNetworkLatency + include BaseGenericModel + + # Average latency in milliseconds. + attr_accessor :avg + + # Maximum latency in milliseconds. + attr_accessor :max + + # Minimum latency in milliseconds. + attr_accessor :min + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'avg' => :'avg', + :'max' => :'max', + :'min' => :'min' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'avg' => :'Float', + :'max' => :'Float', + :'min' => :'Float' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultNetworkLatency` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'avg') + self.avg = attributes[:'avg'] + end + + if attributes.key?(:'max') + self.max = attributes[:'max'] + end + + if attributes.key?(:'min') + self.min = attributes[:'min'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + avg == o.avg && + max == o.max && + min == o.min && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [avg, max, min, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_ocsp_certificate.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_ocsp_certificate.rb new file mode 100644 index 000000000000..6b4544cfd506 --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_ocsp_certificate.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Certificate details returned in an OCSP response. + class SyntheticsTestResultOCSPCertificate + include BaseGenericModel + + # Reason code for the revocation, when applicable. + attr_accessor :revocation_reason + + # Unix timestamp (ms) of the revocation. + attr_accessor :revocation_time + + # Serial number of the certificate. + attr_accessor :serial_number + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'revocation_reason' => :'revocation_reason', + :'revocation_time' => :'revocation_time', + :'serial_number' => :'serial_number' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'revocation_reason' => :'String', + :'revocation_time' => :'Integer', + :'serial_number' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultOCSPCertificate` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'revocation_reason') + self.revocation_reason = attributes[:'revocation_reason'] + end + + if attributes.key?(:'revocation_time') + self.revocation_time = attributes[:'revocation_time'] + end + + if attributes.key?(:'serial_number') + self.serial_number = attributes[:'serial_number'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + revocation_reason == o.revocation_reason && + revocation_time == o.revocation_time && + serial_number == o.serial_number && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [revocation_reason, revocation_time, serial_number, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_ocsp_response.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_ocsp_response.rb new file mode 100644 index 000000000000..b02621fc3d7e --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_ocsp_response.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # OCSP response received while validating a certificate. + class SyntheticsTestResultOCSPResponse + include BaseGenericModel + + # Certificate details returned in an OCSP response. + attr_accessor :certificate + + # OCSP response status (for example, `good`, `revoked`, `unknown`). + attr_accessor :status + + # OCSP response update timestamps. + attr_accessor :updates + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'certificate' => :'certificate', + :'status' => :'status', + :'updates' => :'updates' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'certificate' => :'SyntheticsTestResultOCSPCertificate', + :'status' => :'String', + :'updates' => :'SyntheticsTestResultOCSPUpdates' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultOCSPResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'certificate') + self.certificate = attributes[:'certificate'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'updates') + self.updates = attributes[:'updates'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + certificate == o.certificate && + status == o.status && + updates == o.updates && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [certificate, status, updates, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_ocsp_updates.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_ocsp_updates.rb new file mode 100644 index 000000000000..f2a4f9e297bb --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_ocsp_updates.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # OCSP response update timestamps. + class SyntheticsTestResultOCSPUpdates + include BaseGenericModel + + # Unix timestamp (ms) of the next expected OCSP update. + attr_accessor :next_update + + # Unix timestamp (ms) of when the OCSP response was produced. + attr_accessor :produced_at + + # Unix timestamp (ms) of this OCSP update. + attr_accessor :this_update + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'next_update' => :'next_update', + :'produced_at' => :'produced_at', + :'this_update' => :'this_update' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'next_update' => :'Integer', + :'produced_at' => :'Integer', + :'this_update' => :'Integer' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultOCSPUpdates` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'next_update') + self.next_update = attributes[:'next_update'] + end + + if attributes.key?(:'produced_at') + self.produced_at = attributes[:'produced_at'] + end + + if attributes.key?(:'this_update') + self.this_update = attributes[:'this_update'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + next_update == o.next_update && + produced_at == o.produced_at && + this_update == o.this_update && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [next_update, produced_at, this_update, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_parent_step.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_parent_step.rb new file mode 100644 index 000000000000..43097cf09e2b --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_parent_step.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Reference to the parent step of a sub-step. + class SyntheticsTestResultParentStep + include BaseGenericModel + + # Identifier of the parent step. + attr_accessor :id + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultParentStep` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_parent_test.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_parent_test.rb new file mode 100644 index 000000000000..2de9829c554e --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_parent_test.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Reference to the parent test of a sub-step. + class SyntheticsTestResultParentTest + include BaseGenericModel + + # Identifier of the parent test. + attr_accessor :id + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultParentTest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_redirect.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_redirect.rb new file mode 100644 index 000000000000..1125ab398782 --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_redirect.rb @@ -0,0 +1,115 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # A redirect hop encountered while performing the request. + class SyntheticsTestResultRedirect + include BaseGenericModel + + # Target location of the redirect. + attr_accessor :location + + # HTTP status code of the redirect response. + attr_accessor :status_code + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'location' => :'location', + :'status_code' => :'status_code' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'location' => :'String', + :'status_code' => :'Integer' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultRedirect` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'location') + self.location = attributes[:'location'] + end + + if attributes.key?(:'status_code') + self.status_code = attributes[:'status_code'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + location == o.location && + status_code == o.status_code && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [location, status_code, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_relationship_test.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_relationship_test.rb new file mode 100644 index 000000000000..4552a63a7d57 --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_relationship_test.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Relationship to the Synthetic test. + class SyntheticsTestResultRelationshipTest + include BaseGenericModel + + # Data for the test relationship. + attr_accessor :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'SyntheticsTestResultRelationshipTestData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultRelationshipTest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_relationship_test_data.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_relationship_test_data.rb new file mode 100644 index 000000000000..d67f839b54a8 --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_relationship_test_data.rb @@ -0,0 +1,115 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data for the test relationship. + class SyntheticsTestResultRelationshipTestData + include BaseGenericModel + + # The public ID of the test. + attr_accessor :id + + # Type of the related resource. + attr_accessor :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'type' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultRelationshipTestData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_relationships.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_relationships.rb new file mode 100644 index 000000000000..28fa2c3a7e9a --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_relationships.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Relationships for a Synthetic test result. + class SyntheticsTestResultRelationships + include BaseGenericModel + + # Relationship to the Synthetic test. + attr_accessor :test + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'test' => :'test' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'test' => :'SyntheticsTestResultRelationshipTest' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultRelationships` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'test') + self.test = attributes[:'test'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + test == o.test && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [test, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_request_info.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_request_info.rb new file mode 100644 index 000000000000..1ba82abcd1d9 --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_request_info.rb @@ -0,0 +1,307 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Details of the outgoing request made during the test execution. + class SyntheticsTestResultRequestInfo + include BaseGenericModel + + # Whether insecure certificates are allowed for this request. + attr_accessor :allow_insecure + + # Body sent with the request. + attr_accessor :body + + # gRPC call type (for example, `unary`, `healthCheck`, or `reflection`). + attr_accessor :call_type + + # Destination service for a Network Path test. + attr_accessor :destination_service + + # DNS server used to resolve the target host. + attr_accessor :dns_server + + # Port of the DNS server used for resolution. + attr_accessor :dns_server_port + + # Number of end-to-end probe queries issued. + attr_accessor :e2e_queries + + # Files attached to the request. + attr_accessor :files + + # Headers sent with the request. + attr_accessor :headers + + # Host targeted by the request. + attr_accessor :host + + # Maximum TTL for network probe packets. + attr_accessor :max_ttl + + # Message sent with the request (for WebSocket/TCP/UDP tests). + attr_accessor :message + + # HTTP method used for the request. + attr_accessor :method + + # Whether the response body was not saved. + attr_accessor :no_saving_response_body + + # Port targeted by the request. Can be a number or a string variable reference. + attr_accessor :port + + # Service name targeted by the request (for gRPC tests). + attr_accessor :service + + # Source service for a Network Path test. + attr_accessor :source_service + + # Request timeout in milliseconds. + attr_accessor :timeout + + # Name of the MCP tool called (MCP tests only). + attr_accessor :tool_name + + # Number of traceroute probe queries issued. + attr_accessor :traceroute_queries + + # URL targeted by the request. + attr_accessor :url + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.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' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'allow_insecure' => :'Boolean', + :'body' => :'String', + :'call_type' => :'String', + :'destination_service' => :'String', + :'dns_server' => :'String', + :'dns_server_port' => :'Integer', + :'e2e_queries' => :'Integer', + :'files' => :'Array', + :'headers' => :'Hash', + :'host' => :'String', + :'max_ttl' => :'Integer', + :'message' => :'String', + :'method' => :'String', + :'no_saving_response_body' => :'Boolean', + :'port' => :'Object', + :'service' => :'String', + :'source_service' => :'String', + :'timeout' => :'Integer', + :'tool_name' => :'String', + :'traceroute_queries' => :'Integer', + :'url' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultRequestInfo` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'allow_insecure') + self.allow_insecure = attributes[:'allow_insecure'] + end + + if attributes.key?(:'body') + self.body = attributes[:'body'] + end + + if attributes.key?(:'call_type') + self.call_type = attributes[:'call_type'] + end + + if attributes.key?(:'destination_service') + self.destination_service = attributes[:'destination_service'] + end + + if attributes.key?(:'dns_server') + self.dns_server = attributes[:'dns_server'] + end + + if attributes.key?(:'dns_server_port') + self.dns_server_port = attributes[:'dns_server_port'] + end + + if attributes.key?(:'e2e_queries') + self.e2e_queries = attributes[:'e2e_queries'] + end + + if attributes.key?(:'files') + if (value = attributes[:'files']).is_a?(Array) + self.files = value + end + end + + if attributes.key?(:'headers') + self.headers = attributes[:'headers'] + end + + if attributes.key?(:'host') + self.host = attributes[:'host'] + end + + if attributes.key?(:'max_ttl') + self.max_ttl = attributes[:'max_ttl'] + end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.key?(:'method') + self.method = attributes[:'method'] + end + + if attributes.key?(:'no_saving_response_body') + self.no_saving_response_body = attributes[:'no_saving_response_body'] + end + + if attributes.key?(:'port') + self.port = attributes[:'port'] + end + + if attributes.key?(:'service') + self.service = attributes[:'service'] + end + + if attributes.key?(:'source_service') + self.source_service = attributes[:'source_service'] + end + + if attributes.key?(:'timeout') + self.timeout = attributes[:'timeout'] + end + + if attributes.key?(:'tool_name') + self.tool_name = attributes[:'tool_name'] + end + + if attributes.key?(:'traceroute_queries') + self.traceroute_queries = attributes[:'traceroute_queries'] + end + + if attributes.key?(:'url') + self.url = attributes[:'url'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + allow_insecure == o.allow_insecure && + body == o.body && + call_type == o.call_type && + destination_service == o.destination_service && + dns_server == o.dns_server && + dns_server_port == o.dns_server_port && + e2e_queries == o.e2e_queries && + files == o.files && + headers == o.headers && + host == o.host && + max_ttl == o.max_ttl && + message == o.message && + method == o.method && + no_saving_response_body == o.no_saving_response_body && + port == o.port && + service == o.service && + source_service == o.source_service && + timeout == o.timeout && + tool_name == o.tool_name && + traceroute_queries == o.traceroute_queries && + url == o.url && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [allow_insecure, body, call_type, destination_service, dns_server, dns_server_port, e2e_queries, files, headers, host, max_ttl, message, method, no_saving_response_body, port, service, source_service, timeout, tool_name, traceroute_queries, url, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_response.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_response.rb new file mode 100644 index 000000000000..e7b7d42b235f --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_response.rb @@ -0,0 +1,117 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response object for a Synthetic test result. + class SyntheticsTestResultResponse + include BaseGenericModel + + # Wrapper object for a Synthetic test result. + attr_accessor :data + + # Array of included related resources, such as the test definition. + attr_accessor :included + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data', + :'included' => :'included' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'SyntheticsTestResultData', + :'included' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + + if attributes.key?(:'included') + if (value = attributes[:'included']).is_a?(Array) + self.included = value + end + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + included == o.included && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, included, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_response_info.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_response_info.rb new file mode 100644 index 000000000000..56e5993bd9c8 --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_response_info.rb @@ -0,0 +1,279 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Details of the response received during the test execution. + class SyntheticsTestResultResponseInfo + include BaseGenericModel + + # Body of the response. + attr_accessor :body + + # Compressed representation of the response body. + attr_accessor :body_compressed + + # Hashes computed over the response body. + attr_accessor :body_hashes + + # Size of the response body in bytes. + attr_accessor :body_size + + # Cache-related response headers. + attr_accessor :cache_headers + + # CDN provider details inferred from response headers. + attr_accessor :cdn + + # WebSocket close frame information for WebSocket test responses. + attr_accessor :close + + # Compressed representation of the response message. + attr_accessor :compressed_message + + # Response headers. + attr_accessor :headers + + # Health check information returned from a gRPC health check call. + attr_accessor :healthcheck + + # HTTP version of the response. + attr_accessor :http_version + + # Whether the response body was truncated. + attr_accessor :is_body_truncated + + # Whether the response message was truncated. + attr_accessor :is_message_truncated + + # Message received in the response (for WebSocket/TCP/UDP tests). + attr_accessor :message + + # Additional metadata returned with the response. + attr_accessor :metadata + + # DNS records returned in the response (DNS tests only). + attr_accessor :records + + # Redirect hops encountered while performing the request. + attr_accessor :redirects + + # HTTP status code of the response. + attr_accessor :status_code + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.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' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'body' => :'String', + :'body_compressed' => :'String', + :'body_hashes' => :'String', + :'body_size' => :'Integer', + :'cache_headers' => :'Hash', + :'cdn' => :'SyntheticsTestResultCdnProviderInfo', + :'close' => :'SyntheticsTestResultWebSocketClose', + :'compressed_message' => :'String', + :'headers' => :'Hash', + :'healthcheck' => :'SyntheticsTestResultHealthCheck', + :'http_version' => :'String', + :'is_body_truncated' => :'Boolean', + :'is_message_truncated' => :'Boolean', + :'message' => :'String', + :'metadata' => :'Hash', + :'records' => :'Array', + :'redirects' => :'Array', + :'status_code' => :'Integer' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultResponseInfo` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'body') + self.body = attributes[:'body'] + end + + if attributes.key?(:'body_compressed') + self.body_compressed = attributes[:'body_compressed'] + end + + if attributes.key?(:'body_hashes') + self.body_hashes = attributes[:'body_hashes'] + end + + if attributes.key?(:'body_size') + self.body_size = attributes[:'body_size'] + end + + if attributes.key?(:'cache_headers') + self.cache_headers = attributes[:'cache_headers'] + end + + if attributes.key?(:'cdn') + self.cdn = attributes[:'cdn'] + end + + if attributes.key?(:'close') + self.close = attributes[:'close'] + end + + if attributes.key?(:'compressed_message') + self.compressed_message = attributes[:'compressed_message'] + end + + if attributes.key?(:'headers') + self.headers = attributes[:'headers'] + end + + if attributes.key?(:'healthcheck') + self.healthcheck = attributes[:'healthcheck'] + end + + if attributes.key?(:'http_version') + self.http_version = attributes[:'http_version'] + end + + if attributes.key?(:'is_body_truncated') + self.is_body_truncated = attributes[:'is_body_truncated'] + end + + if attributes.key?(:'is_message_truncated') + self.is_message_truncated = attributes[:'is_message_truncated'] + end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.key?(:'metadata') + self.metadata = attributes[:'metadata'] + end + + if attributes.key?(:'records') + if (value = attributes[:'records']).is_a?(Array) + self.records = value + end + end + + if attributes.key?(:'redirects') + if (value = attributes[:'redirects']).is_a?(Array) + self.redirects = value + end + end + + if attributes.key?(:'status_code') + self.status_code = attributes[:'status_code'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + body == o.body && + body_compressed == o.body_compressed && + body_hashes == o.body_hashes && + body_size == o.body_size && + cache_headers == o.cache_headers && + cdn == o.cdn && + close == o.close && + compressed_message == o.compressed_message && + headers == o.headers && + healthcheck == o.healthcheck && + http_version == o.http_version && + is_body_truncated == o.is_body_truncated && + is_message_truncated == o.is_message_truncated && + message == o.message && + metadata == o.metadata && + records == o.records && + redirects == o.redirects && + status_code == o.status_code && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [body, body_compressed, body_hashes, body_size, cache_headers, cdn, close, compressed_message, headers, healthcheck, http_version, is_body_truncated, is_message_truncated, message, metadata, records, redirects, status_code, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_router.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_router.rb new file mode 100644 index 000000000000..958a7e4394ad --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_router.rb @@ -0,0 +1,115 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # A router along the traceroute path. + class SyntheticsTestResultRouter + include BaseGenericModel + + # IP address of the router. + attr_accessor :ip + + # Resolved hostname of the router. + attr_accessor :resolved_host + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'ip' => :'ip', + :'resolved_host' => :'resolved_host' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'ip' => :'String', + :'resolved_host' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultRouter` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'ip') + self.ip = attributes[:'ip'] + end + + if attributes.key?(:'resolved_host') + self.resolved_host = attributes[:'resolved_host'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + ip == o.ip && + resolved_host == o.resolved_host && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [ip, resolved_host, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_rum_context.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_rum_context.rb new file mode 100644 index 000000000000..5f3533d05fce --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_rum_context.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # RUM application context associated with a step or sub-test. + class SyntheticsTestResultRumContext + include BaseGenericModel + + # RUM application identifier. + attr_accessor :application_id + + # RUM session identifier. + attr_accessor :session_id + + # RUM view identifier. + attr_accessor :view_id + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'application_id' => :'application_id', + :'session_id' => :'session_id', + :'view_id' => :'view_id' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'application_id' => :'String', + :'session_id' => :'String', + :'view_id' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultRumContext` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'application_id') + self.application_id = attributes[:'application_id'] + end + + if attributes.key?(:'session_id') + self.session_id = attributes[:'session_id'] + end + + if attributes.key?(:'view_id') + self.view_id = attributes[:'view_id'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + application_id == o.application_id && + session_id == o.session_id && + view_id == o.view_id && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [application_id, session_id, view_id, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_run_type.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_run_type.rb new file mode 100644 index 000000000000..368891d7e2b2 --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_run_type.rb @@ -0,0 +1,29 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The type of run for a Synthetic test result. + class SyntheticsTestResultRunType + include BaseEnumModel + + SCHEDULED = "scheduled".freeze + FAST = "fast".freeze + CI = "ci".freeze + TRIGGERED = "triggered".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_status.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_status.rb new file mode 100644 index 000000000000..fc901457609c --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_status.rb @@ -0,0 +1,28 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Status of a Synthetic test result. + class SyntheticsTestResultStatus + include BaseEnumModel + + PASSED = "passed".freeze + FAILED = "failed".freeze + NO_DATA = "no_data".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_step.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_step.rb new file mode 100644 index 000000000000..2a34e1f82654 --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_step.rb @@ -0,0 +1,543 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # A step result from a browser, mobile, or multistep API test. + class SyntheticsTestResultStep + include BaseGenericModel + + # Whether the test continues when this step fails. + attr_accessor :allow_failure + + # Inner API test definition for browser `runApiTest` steps. + attr_accessor :api_test + + # Assertion result for a browser or mobile step. + attr_accessor :assertion_result + + # Assertion results produced by the step. + attr_accessor :assertions + + # URLs of requests blocked during the step. + attr_accessor :blocked_requests_urls + + # Bounding box of an element on the page. + attr_accessor :bounds + + # Browser errors captured during the step. + attr_accessor :browser_errors + + # Storage bucket keys for artifacts produced during a step or test. + attr_accessor :bucket_keys + + # CDN resources encountered during the step. + attr_accessor :cdn_resources + + # Click type performed in a browser step. + attr_accessor :click_type + + # Compressed JSON descriptor for the step (internal format). + attr_accessor :compressed_json_descriptor + + # Request configuration executed by this step (API test steps). + attr_accessor :config + + # Human-readable description of the step. + attr_accessor :description + + # Duration of the step in milliseconds. + attr_accessor :duration + + # Description of the element interacted with by the step. + attr_accessor :element_description + + # Element locator updates produced during a step. + attr_accessor :element_updates + + # A variable used or extracted during a test. + attr_accessor :extracted_value + + # Details about the failure of a Synthetic test. + attr_accessor :failure + + # HTTP results produced by an MCP step. + attr_accessor :http_results + + # Identifier of the step. + attr_accessor :id + + # Whether this step is critical for the test outcome. + attr_accessor :is_critical + + # Whether the step uses a custom JavaScript assertion. + attr_accessor :javascript_custom_assertion_code + + # Time taken to locate the element in milliseconds. + attr_accessor :locate_element_duration + + # Name of the step. + attr_accessor :name + + # Details of the outgoing request made during the test execution. + attr_accessor :request + + # Details of the response received during the test execution. + attr_accessor :response + + # Retry results for the step. + attr_accessor :retries + + # Number of times this step was retried. + attr_accessor :retry_count + + # RUM application context associated with a step or sub-test. + attr_accessor :rum_context + + # Unix timestamp (ms) of when the step started. + attr_accessor :started_at + + # Status of the step (for example, `passed`, `failed`). + attr_accessor :status + + # Information about a sub-step in a nested test execution. + attr_accessor :sub_step + + # Information about a sub-test played from a parent browser test. + attr_accessor :sub_test + + # Subtype of the step. + attr_accessor :subtype + + # Browser tabs involved in the step. + attr_accessor :tabs + + # Timing breakdown of the step execution. + attr_accessor :timings + + # Whether the step was executed through a Synthetics tunnel. + attr_accessor :tunnel + + # Type of the step (for example, `click`, `assertElementContent`, `runApiTest`). + attr_accessor :type + + # URL associated with the step (for navigation steps). + attr_accessor :url + + # Step value. Its type depends on the step type. + attr_accessor :value + + # Variables captured during a test step. + attr_accessor :variables + + # Web vitals metrics captured during the step. + attr_accessor :vitals_metrics + + # Warnings emitted during the step. + attr_accessor :warnings + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.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' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'allow_failure' => :'Boolean', + :'api_test' => :'Hash', + :'assertion_result' => :'SyntheticsTestResultStepAssertionResult', + :'assertions' => :'Array', + :'blocked_requests_urls' => :'Array', + :'bounds' => :'SyntheticsTestResultBounds', + :'browser_errors' => :'Array', + :'bucket_keys' => :'SyntheticsTestResultBucketKeys', + :'cdn_resources' => :'Array', + :'click_type' => :'String', + :'compressed_json_descriptor' => :'String', + :'config' => :'Hash', + :'description' => :'String', + :'duration' => :'Float', + :'element_description' => :'String', + :'element_updates' => :'SyntheticsTestResultStepElementUpdates', + :'extracted_value' => :'SyntheticsTestResultVariable', + :'failure' => :'SyntheticsTestResultFailure', + :'http_results' => :'Array', + :'id' => :'String', + :'is_critical' => :'Boolean', + :'javascript_custom_assertion_code' => :'Boolean', + :'locate_element_duration' => :'Float', + :'name' => :'String', + :'request' => :'SyntheticsTestResultRequestInfo', + :'response' => :'SyntheticsTestResultResponseInfo', + :'retries' => :'Array', + :'retry_count' => :'Integer', + :'rum_context' => :'SyntheticsTestResultRumContext', + :'started_at' => :'Integer', + :'status' => :'String', + :'sub_step' => :'SyntheticsTestResultSubStep', + :'sub_test' => :'SyntheticsTestResultSubTest', + :'subtype' => :'String', + :'tabs' => :'Array', + :'timings' => :'Hash', + :'tunnel' => :'Boolean', + :'type' => :'String', + :'url' => :'String', + :'value' => :'Object', + :'variables' => :'SyntheticsTestResultVariables', + :'vitals_metrics' => :'Array', + :'warnings' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultStep` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'allow_failure') + self.allow_failure = attributes[:'allow_failure'] + end + + if attributes.key?(:'api_test') + self.api_test = attributes[:'api_test'] + end + + if attributes.key?(:'assertion_result') + self.assertion_result = attributes[:'assertion_result'] + end + + if attributes.key?(:'assertions') + if (value = attributes[:'assertions']).is_a?(Array) + self.assertions = value + end + end + + if attributes.key?(:'blocked_requests_urls') + if (value = attributes[:'blocked_requests_urls']).is_a?(Array) + self.blocked_requests_urls = value + end + end + + if attributes.key?(:'bounds') + self.bounds = attributes[:'bounds'] + end + + if attributes.key?(:'browser_errors') + if (value = attributes[:'browser_errors']).is_a?(Array) + self.browser_errors = value + end + end + + if attributes.key?(:'bucket_keys') + self.bucket_keys = attributes[:'bucket_keys'] + end + + if attributes.key?(:'cdn_resources') + if (value = attributes[:'cdn_resources']).is_a?(Array) + self.cdn_resources = value + end + end + + if attributes.key?(:'click_type') + self.click_type = attributes[:'click_type'] + end + + if attributes.key?(:'compressed_json_descriptor') + self.compressed_json_descriptor = attributes[:'compressed_json_descriptor'] + end + + if attributes.key?(:'config') + self.config = attributes[:'config'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'duration') + self.duration = attributes[:'duration'] + end + + if attributes.key?(:'element_description') + self.element_description = attributes[:'element_description'] + end + + if attributes.key?(:'element_updates') + self.element_updates = attributes[:'element_updates'] + end + + if attributes.key?(:'extracted_value') + self.extracted_value = attributes[:'extracted_value'] + end + + if attributes.key?(:'failure') + self.failure = attributes[:'failure'] + end + + if attributes.key?(:'http_results') + if (value = attributes[:'http_results']).is_a?(Array) + self.http_results = value + end + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'is_critical') + self.is_critical = attributes[:'is_critical'] + end + + if attributes.key?(:'javascript_custom_assertion_code') + self.javascript_custom_assertion_code = attributes[:'javascript_custom_assertion_code'] + end + + if attributes.key?(:'locate_element_duration') + self.locate_element_duration = attributes[:'locate_element_duration'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'request') + self.request = attributes[:'request'] + end + + if attributes.key?(:'response') + self.response = attributes[:'response'] + end + + if attributes.key?(:'retries') + if (value = attributes[:'retries']).is_a?(Array) + self.retries = value + end + end + + if attributes.key?(:'retry_count') + self.retry_count = attributes[:'retry_count'] + end + + if attributes.key?(:'rum_context') + self.rum_context = attributes[:'rum_context'] + end + + if attributes.key?(:'started_at') + self.started_at = attributes[:'started_at'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'sub_step') + self.sub_step = attributes[:'sub_step'] + end + + if attributes.key?(:'sub_test') + self.sub_test = attributes[:'sub_test'] + end + + if attributes.key?(:'subtype') + self.subtype = attributes[:'subtype'] + end + + if attributes.key?(:'tabs') + if (value = attributes[:'tabs']).is_a?(Array) + self.tabs = value + end + end + + if attributes.key?(:'timings') + self.timings = attributes[:'timings'] + end + + if attributes.key?(:'tunnel') + self.tunnel = attributes[:'tunnel'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'url') + self.url = attributes[:'url'] + end + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + + if attributes.key?(:'variables') + self.variables = attributes[:'variables'] + end + + if attributes.key?(:'vitals_metrics') + if (value = attributes[:'vitals_metrics']).is_a?(Array) + self.vitals_metrics = value + end + end + + if attributes.key?(:'warnings') + if (value = attributes[:'warnings']).is_a?(Array) + self.warnings = value + end + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + allow_failure == o.allow_failure && + api_test == o.api_test && + assertion_result == o.assertion_result && + assertions == o.assertions && + blocked_requests_urls == o.blocked_requests_urls && + bounds == o.bounds && + browser_errors == o.browser_errors && + bucket_keys == o.bucket_keys && + cdn_resources == o.cdn_resources && + click_type == o.click_type && + compressed_json_descriptor == o.compressed_json_descriptor && + config == o.config && + description == o.description && + duration == o.duration && + element_description == o.element_description && + element_updates == o.element_updates && + extracted_value == o.extracted_value && + failure == o.failure && + http_results == o.http_results && + id == o.id && + is_critical == o.is_critical && + javascript_custom_assertion_code == o.javascript_custom_assertion_code && + locate_element_duration == o.locate_element_duration && + name == o.name && + request == o.request && + response == o.response && + retries == o.retries && + retry_count == o.retry_count && + rum_context == o.rum_context && + started_at == o.started_at && + status == o.status && + sub_step == o.sub_step && + sub_test == o.sub_test && + subtype == o.subtype && + tabs == o.tabs && + timings == o.timings && + tunnel == o.tunnel && + type == o.type && + url == o.url && + value == o.value && + variables == o.variables && + vitals_metrics == o.vitals_metrics && + warnings == o.warnings && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [allow_failure, api_test, assertion_result, assertions, blocked_requests_urls, bounds, browser_errors, bucket_keys, cdn_resources, click_type, compressed_json_descriptor, config, description, duration, element_description, element_updates, extracted_value, failure, http_results, id, is_critical, javascript_custom_assertion_code, locate_element_duration, name, request, response, retries, retry_count, rum_context, started_at, status, sub_step, sub_test, subtype, tabs, timings, tunnel, type, url, value, variables, vitals_metrics, warnings, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_step_assertion_result.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_step_assertion_result.rb new file mode 100644 index 000000000000..9ed0e8e5d81a --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_step_assertion_result.rb @@ -0,0 +1,135 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Assertion result for a browser or mobile step. + class SyntheticsTestResultStepAssertionResult + include BaseGenericModel + + # Actual value observed during the step assertion. Its type depends on the check type. + attr_accessor :actual + + # Type of the step assertion check. + attr_accessor :check_type + + # Expected value for the step assertion. Its type depends on the check type. + attr_accessor :expected + + # Whether the assertion involves secure variables. + attr_accessor :has_secure_variables + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'actual' => :'actual', + :'check_type' => :'check_type', + :'expected' => :'expected', + :'has_secure_variables' => :'has_secure_variables' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'actual' => :'Object', + :'check_type' => :'String', + :'expected' => :'Object', + :'has_secure_variables' => :'Boolean' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultStepAssertionResult` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'actual') + self.actual = attributes[:'actual'] + end + + if attributes.key?(:'check_type') + self.check_type = attributes[:'check_type'] + end + + if attributes.key?(:'expected') + self.expected = attributes[:'expected'] + end + + if attributes.key?(:'has_secure_variables') + self.has_secure_variables = attributes[:'has_secure_variables'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + actual == o.actual && + check_type == o.check_type && + expected == o.expected && + has_secure_variables == o.has_secure_variables && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [actual, check_type, expected, has_secure_variables, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_step_element_updates.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_step_element_updates.rb new file mode 100644 index 000000000000..b3da5191fda7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_step_element_updates.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Element locator updates produced during a step. + class SyntheticsTestResultStepElementUpdates + include BaseGenericModel + + # Updated multi-locator definition. + attr_accessor :multi_locator + + # Updated outer HTML of the targeted element. + attr_accessor :target_outer_html + + # Version of the element locator definition. + attr_accessor :version + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'multi_locator' => :'multi_locator', + :'target_outer_html' => :'target_outer_html', + :'version' => :'version' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'multi_locator' => :'Hash', + :'target_outer_html' => :'String', + :'version' => :'Integer' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultStepElementUpdates` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'multi_locator') + self.multi_locator = attributes[:'multi_locator'] + end + + if attributes.key?(:'target_outer_html') + self.target_outer_html = attributes[:'target_outer_html'] + end + + if attributes.key?(:'version') + self.version = attributes[:'version'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + multi_locator == o.multi_locator && + target_outer_html == o.target_outer_html && + version == o.version && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [multi_locator, target_outer_html, version, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_steps_info.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_steps_info.rb new file mode 100644 index 000000000000..eb0e3599b4a7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_steps_info.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Step execution summary for a Synthetic test result. + class SyntheticsTestResultStepsInfo + include BaseGenericModel + + # Number of completed steps. + attr_accessor :completed + + # Number of steps with errors. + attr_accessor :errors + + # Total number of steps. + attr_accessor :total + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'completed' => :'completed', + :'errors' => :'errors', + :'total' => :'total' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'completed' => :'Integer', + :'errors' => :'Integer', + :'total' => :'Integer' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultStepsInfo` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'completed') + self.completed = attributes[:'completed'] + end + + if attributes.key?(:'errors') + self.errors = attributes[:'errors'] + end + + if attributes.key?(:'total') + self.total = attributes[:'total'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + completed == o.completed && + errors == o.errors && + total == o.total && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [completed, errors, total, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_sub_step.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_sub_step.rb new file mode 100644 index 000000000000..7fb34de1327a --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_sub_step.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Information about a sub-step in a nested test execution. + class SyntheticsTestResultSubStep + include BaseGenericModel + + # Depth of the sub-step in the execution tree. + attr_accessor :level + + # Reference to the parent step of a sub-step. + attr_accessor :parent_step + + # Reference to the parent test of a sub-step. + attr_accessor :parent_test + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'level' => :'level', + :'parent_step' => :'parent_step', + :'parent_test' => :'parent_test' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'level' => :'Integer', + :'parent_step' => :'SyntheticsTestResultParentStep', + :'parent_test' => :'SyntheticsTestResultParentTest' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultSubStep` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'level') + self.level = attributes[:'level'] + end + + if attributes.key?(:'parent_step') + self.parent_step = attributes[:'parent_step'] + end + + if attributes.key?(:'parent_test') + self.parent_test = attributes[:'parent_test'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + level == o.level && + parent_step == o.parent_step && + parent_test == o.parent_test && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [level, parent_step, parent_test, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_sub_test.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_sub_test.rb new file mode 100644 index 000000000000..cf86320527fc --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_sub_test.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Information about a sub-test played from a parent browser test. + class SyntheticsTestResultSubTest + include BaseGenericModel + + # Identifier of the sub-test. + attr_accessor :id + + # Index of the browser tab playing the sub-test. + attr_accessor :playing_tab + + # RUM application context associated with a step or sub-test. + attr_accessor :rum_context + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'playing_tab' => :'playing_tab', + :'rum_context' => :'rum_context' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'playing_tab' => :'Integer', + :'rum_context' => :'SyntheticsTestResultRumContext' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultSubTest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'playing_tab') + self.playing_tab = attributes[:'playing_tab'] + end + + if attributes.key?(:'rum_context') + self.rum_context = attributes[:'rum_context'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + playing_tab == o.playing_tab && + rum_context == o.rum_context && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, playing_tab, rum_context, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_summary_attributes.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_summary_attributes.rb new file mode 100644 index 000000000000..7542f20b8a04 --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_summary_attributes.rb @@ -0,0 +1,195 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of a Synthetic test result summary. + class SyntheticsTestResultSummaryAttributes + include BaseGenericModel + + # Device information for the test result (browser and mobile tests). + attr_accessor :device + + # Execution details for a Synthetic test result. + attr_accessor :execution_info + + # Timestamp of when the test finished (in milliseconds). + attr_accessor :finished_at + + # Location information for a Synthetic test result. + attr_accessor :location + + # The type of run for a Synthetic test result. + attr_accessor :run_type + + # Timestamp of when the test started (in milliseconds). + attr_accessor :started_at + + # Status of a Synthetic test result. + attr_accessor :status + + # Step execution summary for a Synthetic test result. + attr_accessor :steps_info + + # Subtype of the Synthetic test that produced this result. + attr_accessor :test_sub_type + + # Type of the Synthetic test that produced this result. + attr_accessor :test_type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.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' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'device' => :'SyntheticsTestResultDevice', + :'execution_info' => :'SyntheticsTestResultExecutionInfo', + :'finished_at' => :'Integer', + :'location' => :'SyntheticsTestResultLocation', + :'run_type' => :'SyntheticsTestResultRunType', + :'started_at' => :'Integer', + :'status' => :'SyntheticsTestResultStatus', + :'steps_info' => :'SyntheticsTestResultStepsInfo', + :'test_sub_type' => :'SyntheticsTestSubType', + :'test_type' => :'SyntheticsTestType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultSummaryAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'device') + self.device = attributes[:'device'] + end + + if attributes.key?(:'execution_info') + self.execution_info = attributes[:'execution_info'] + end + + if attributes.key?(:'finished_at') + self.finished_at = attributes[:'finished_at'] + end + + if attributes.key?(:'location') + self.location = attributes[:'location'] + end + + if attributes.key?(:'run_type') + self.run_type = attributes[:'run_type'] + end + + if attributes.key?(:'started_at') + self.started_at = attributes[:'started_at'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'steps_info') + self.steps_info = attributes[:'steps_info'] + end + + if attributes.key?(:'test_sub_type') + self.test_sub_type = attributes[:'test_sub_type'] + end + + if attributes.key?(:'test_type') + self.test_type = attributes[:'test_type'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + device == o.device && + execution_info == o.execution_info && + finished_at == o.finished_at && + location == o.location && + run_type == o.run_type && + started_at == o.started_at && + status == o.status && + steps_info == o.steps_info && + test_sub_type == o.test_sub_type && + test_type == o.test_type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [device, execution_info, finished_at, location, run_type, started_at, status, steps_info, test_sub_type, test_type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_summary_data.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_summary_data.rb new file mode 100644 index 000000000000..045efd4c91b0 --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_summary_data.rb @@ -0,0 +1,135 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Wrapper object for a Synthetic test result summary. + class SyntheticsTestResultSummaryData + include BaseGenericModel + + # Attributes of a Synthetic test result summary. + attr_accessor :attributes + + # The result ID. + attr_accessor :id + + # Relationships for a Synthetic test result. + attr_accessor :relationships + + # Type of the Synthetic test result summary resource, `result_summary`. + attr_accessor :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'relationships' => :'relationships', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'SyntheticsTestResultSummaryAttributes', + :'id' => :'String', + :'relationships' => :'SyntheticsTestResultRelationships', + :'type' => :'SyntheticsTestResultSummaryType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultSummaryData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'relationships') + self.relationships = attributes[:'relationships'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + relationships == o.relationships && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, relationships, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_summary_type.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_summary_type.rb new file mode 100644 index 000000000000..f920b45d062a --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_summary_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Type of the Synthetic test result summary resource, `result_summary`. + class SyntheticsTestResultSummaryType + include BaseEnumModel + + RESULT_SUMMARY = "result_summary".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_tab.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_tab.rb new file mode 100644 index 000000000000..4dca2e5a18f9 --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_tab.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Information about a browser tab involved in a step. + class SyntheticsTestResultTab + include BaseGenericModel + + # Whether the tab was focused during the step. + attr_accessor :focused + + # Title of the tab. + attr_accessor :title + + # URL loaded in the tab. + attr_accessor :url + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'focused' => :'focused', + :'title' => :'title', + :'url' => :'url' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'focused' => :'Boolean', + :'title' => :'String', + :'url' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultTab` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'focused') + self.focused = attributes[:'focused'] + end + + if attributes.key?(:'title') + self.title = attributes[:'title'] + end + + if attributes.key?(:'url') + self.url = attributes[:'url'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + focused == o.focused && + title == o.title && + url == o.url && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [focused, title, url, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_trace.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_trace.rb new file mode 100644 index 000000000000..8acc630b389c --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_trace.rb @@ -0,0 +1,115 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Trace identifiers associated with a Synthetic test result. + class SyntheticsTestResultTrace + include BaseGenericModel + + # Datadog APM trace identifier. + attr_accessor :id + + # OpenTelemetry trace identifier. + attr_accessor :otel_id + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'id' => :'id', + :'otel_id' => :'otel_id' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'id' => :'String', + :'otel_id' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultTrace` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'otel_id') + self.otel_id = attributes[:'otel_id'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + otel_id == o.otel_id && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [id, otel_id, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_traceroute_hop.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_traceroute_hop.rb new file mode 100644 index 000000000000..d6dbc7bb2262 --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_traceroute_hop.rb @@ -0,0 +1,177 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # A network probe result, used for traceroute hops and ping summaries. + class SyntheticsTestResultTracerouteHop + include BaseGenericModel + + # Target hostname. + attr_accessor :host + + # Latency statistics for a network probe. + attr_accessor :latency + + # Percentage of probe packets lost. + attr_accessor :packet_loss_percentage + + # Size of each probe packet in bytes. + attr_accessor :packet_size + + # Number of probe packets received. + attr_accessor :packets_received + + # Number of probe packets sent. + attr_accessor :packets_sent + + # Resolved IP address for the target. + attr_accessor :resolved_ip + + # List of intermediate routers for the traceroute. + attr_accessor :routers + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.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' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'host' => :'String', + :'latency' => :'SyntheticsTestResultNetworkLatency', + :'packet_loss_percentage' => :'Float', + :'packet_size' => :'Integer', + :'packets_received' => :'Integer', + :'packets_sent' => :'Integer', + :'resolved_ip' => :'String', + :'routers' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultTracerouteHop` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'host') + self.host = attributes[:'host'] + end + + if attributes.key?(:'latency') + self.latency = attributes[:'latency'] + end + + if attributes.key?(:'packet_loss_percentage') + self.packet_loss_percentage = attributes[:'packet_loss_percentage'] + end + + if attributes.key?(:'packet_size') + self.packet_size = attributes[:'packet_size'] + end + + if attributes.key?(:'packets_received') + self.packets_received = attributes[:'packets_received'] + end + + if attributes.key?(:'packets_sent') + self.packets_sent = attributes[:'packets_sent'] + end + + if attributes.key?(:'resolved_ip') + self.resolved_ip = attributes[:'resolved_ip'] + end + + if attributes.key?(:'routers') + if (value = attributes[:'routers']).is_a?(Array) + self.routers = value + end + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + host == o.host && + latency == o.latency && + packet_loss_percentage == o.packet_loss_percentage && + packet_size == o.packet_size && + packets_received == o.packets_received && + packets_sent == o.packets_sent && + resolved_ip == o.resolved_ip && + routers == o.routers && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [host, latency, packet_loss_percentage, packet_size, packets_received, packets_sent, resolved_ip, routers, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_turn.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_turn.rb new file mode 100644 index 000000000000..2219dec0837b --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_turn.rb @@ -0,0 +1,167 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # A turn in a goal-based browser test, grouping steps and reasoning. + class SyntheticsTestResultTurn + include BaseGenericModel + + # Storage bucket keys for artifacts produced during a step or test. + attr_accessor :bucket_keys + + # Name of the turn. + attr_accessor :name + + # Agent reasoning produced for this turn. + attr_accessor :reasoning + + # Status of the turn (for example, `passed`, `failed`). + attr_accessor :status + + # Steps executed during the turn. + attr_accessor :steps + + # Unix timestamp (ms) of when the turn finished. + attr_accessor :turn_finished_at + + # Unix timestamp (ms) of when the turn started. + attr_accessor :turn_started_at + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.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' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'bucket_keys' => :'SyntheticsTestResultBucketKeys', + :'name' => :'String', + :'reasoning' => :'String', + :'status' => :'String', + :'steps' => :'Array', + :'turn_finished_at' => :'Integer', + :'turn_started_at' => :'Integer' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultTurn` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'bucket_keys') + self.bucket_keys = attributes[:'bucket_keys'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'reasoning') + self.reasoning = attributes[:'reasoning'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'steps') + if (value = attributes[:'steps']).is_a?(Array) + self.steps = value + end + end + + if attributes.key?(:'turn_finished_at') + self.turn_finished_at = attributes[:'turn_finished_at'] + end + + if attributes.key?(:'turn_started_at') + self.turn_started_at = attributes[:'turn_started_at'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + bucket_keys == o.bucket_keys && + name == o.name && + reasoning == o.reasoning && + status == o.status && + steps == o.steps && + turn_finished_at == o.turn_finished_at && + turn_started_at == o.turn_started_at && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [bucket_keys, name, reasoning, status, steps, turn_finished_at, turn_started_at, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_turn_step.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_turn_step.rb new file mode 100644 index 000000000000..dddcb283b94a --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_turn_step.rb @@ -0,0 +1,115 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # A step executed during a goal-based browser test turn. + class SyntheticsTestResultTurnStep + include BaseGenericModel + + # Storage bucket keys for artifacts produced during a step or test. + attr_accessor :bucket_keys + + # Browser step configuration for this turn step. + attr_accessor :config + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'bucket_keys' => :'bucket_keys', + :'config' => :'config' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'bucket_keys' => :'SyntheticsTestResultBucketKeys', + :'config' => :'Hash' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultTurnStep` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'bucket_keys') + self.bucket_keys = attributes[:'bucket_keys'] + end + + if attributes.key?(:'config') + self.config = attributes[:'config'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + bucket_keys == o.bucket_keys && + config == o.config && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [bucket_keys, config, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_type.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_type.rb new file mode 100644 index 000000000000..f31036fdae31 --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Type of the Synthetic test result resource, `result`. + class SyntheticsTestResultType + include BaseEnumModel + + RESULT = "result".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_variable.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_variable.rb new file mode 100644 index 000000000000..d670f8137908 --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_variable.rb @@ -0,0 +1,195 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # A variable used or extracted during a test. + class SyntheticsTestResultVariable + include BaseGenericModel + + # Error encountered when evaluating the variable. + attr_accessor :err + + # Human-readable error message for variable evaluation. + attr_accessor :error_message + + # Example value for the variable. + attr_accessor :example + + # Variable identifier. + attr_accessor :id + + # Variable name. + attr_accessor :name + + # Pattern used to extract the variable. + attr_accessor :pattern + + # Whether the variable holds a secure value. + attr_accessor :secure + + # Variable type. + attr_accessor :type + + # Evaluated value of the variable. + attr_accessor :val + + # Current value of the variable. + attr_accessor :value + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'err' => :'err', + :'error_message' => :'error_message', + :'example' => :'example', + :'id' => :'id', + :'name' => :'name', + :'pattern' => :'pattern', + :'secure' => :'secure', + :'type' => :'type', + :'val' => :'val', + :'value' => :'value' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'err' => :'String', + :'error_message' => :'String', + :'example' => :'String', + :'id' => :'String', + :'name' => :'String', + :'pattern' => :'String', + :'secure' => :'Boolean', + :'type' => :'String', + :'val' => :'String', + :'value' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultVariable` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'err') + self.err = attributes[:'err'] + end + + if attributes.key?(:'error_message') + self.error_message = attributes[:'error_message'] + end + + if attributes.key?(:'example') + self.example = attributes[:'example'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'pattern') + self.pattern = attributes[:'pattern'] + end + + if attributes.key?(:'secure') + self.secure = attributes[:'secure'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'val') + self.val = attributes[:'val'] + end + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + err == o.err && + error_message == o.error_message && + example == o.example && + id == o.id && + name == o.name && + pattern == o.pattern && + secure == o.secure && + type == o.type && + val == o.val && + value == o.value && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [err, error_message, example, id, name, pattern, secure, type, val, value, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_variables.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_variables.rb new file mode 100644 index 000000000000..60eae0f3bf0b --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_variables.rb @@ -0,0 +1,119 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Variables captured during a test step. + class SyntheticsTestResultVariables + include BaseGenericModel + + # Variables defined in the test configuration. + attr_accessor :config + + # Variables extracted during the test execution. + attr_accessor :extracted + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'config' => :'config', + :'extracted' => :'extracted' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'config' => :'Array', + :'extracted' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultVariables` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'config') + if (value = attributes[:'config']).is_a?(Array) + self.config = value + end + end + + if attributes.key?(:'extracted') + if (value = attributes[:'extracted']).is_a?(Array) + self.extracted = value + end + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + config == o.config && + extracted == o.extracted && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [config, extracted, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_vitals_metrics.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_vitals_metrics.rb new file mode 100644 index 000000000000..bc601827d696 --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_vitals_metrics.rb @@ -0,0 +1,155 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Web vitals metrics captured during a browser test step. + class SyntheticsTestResultVitalsMetrics + include BaseGenericModel + + # Cumulative Layout Shift score. + attr_accessor :cls + + # First Contentful Paint in milliseconds. + attr_accessor :fcp + + # Interaction to Next Paint in milliseconds. + attr_accessor :inp + + # Largest Contentful Paint in milliseconds. + attr_accessor :lcp + + # Time To First Byte in milliseconds. + attr_accessor :ttfb + + # URL that produced the metrics. + attr_accessor :url + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'cls' => :'cls', + :'fcp' => :'fcp', + :'inp' => :'inp', + :'lcp' => :'lcp', + :'ttfb' => :'ttfb', + :'url' => :'url' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'cls' => :'Float', + :'fcp' => :'Float', + :'inp' => :'Float', + :'lcp' => :'Float', + :'ttfb' => :'Float', + :'url' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultVitalsMetrics` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'cls') + self.cls = attributes[:'cls'] + end + + if attributes.key?(:'fcp') + self.fcp = attributes[:'fcp'] + end + + if attributes.key?(:'inp') + self.inp = attributes[:'inp'] + end + + if attributes.key?(:'lcp') + self.lcp = attributes[:'lcp'] + end + + if attributes.key?(:'ttfb') + self.ttfb = attributes[:'ttfb'] + end + + if attributes.key?(:'url') + self.url = attributes[:'url'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + cls == o.cls && + fcp == o.fcp && + inp == o.inp && + lcp == o.lcp && + ttfb == o.ttfb && + url == o.url && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [cls, fcp, inp, lcp, ttfb, url, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_warning.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_warning.rb new file mode 100644 index 000000000000..926f8b2771b6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_warning.rb @@ -0,0 +1,127 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # A warning captured during a browser test step. + class SyntheticsTestResultWarning + include BaseGenericModel + + # Bounds of elements related to the warning. + attr_accessor :element_bounds + + # Warning message. + attr_accessor :message + + # Type of the warning. + attr_accessor :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'element_bounds' => :'element_bounds', + :'message' => :'message', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'element_bounds' => :'Array', + :'message' => :'String', + :'type' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultWarning` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'element_bounds') + if (value = attributes[:'element_bounds']).is_a?(Array) + self.element_bounds = value + end + end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + element_bounds == o.element_bounds && + message == o.message && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [element_bounds, message, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_result_web_socket_close.rb b/lib/datadog_api_client/v2/models/synthetics_test_result_web_socket_close.rb new file mode 100644 index 000000000000..e1b7348d8b1b --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_result_web_socket_close.rb @@ -0,0 +1,115 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # WebSocket close frame information for WebSocket test responses. + class SyntheticsTestResultWebSocketClose + include BaseGenericModel + + # Reason string received in the close frame. + attr_accessor :reason + + # Status code received in the close frame. + attr_accessor :status_code + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'reason' => :'reason', + :'status_code' => :'status_code' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'reason' => :'String', + :'status_code' => :'Integer' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::SyntheticsTestResultWebSocketClose` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'reason') + self.reason = attributes[:'reason'] + end + + if attributes.key?(:'status_code') + self.status_code = attributes[:'status_code'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + reason == o.reason && + status_code == o.status_code && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [reason, status_code, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_sub_type.rb b/lib/datadog_api_client/v2/models/synthetics_test_sub_type.rb new file mode 100644 index 000000000000..d6f801ec7267 --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_sub_type.rb @@ -0,0 +1,35 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Subtype of the Synthetic test that produced this result. + class SyntheticsTestSubType + include BaseEnumModel + + DNS = "dns".freeze + GRPC = "grpc".freeze + HTTP = "http".freeze + ICMP = "icmp".freeze + MCP = "mcp".freeze + MULTI = "multi".freeze + SSL = "ssl".freeze + TCP = "tcp".freeze + UDP = "udp".freeze + WEBSOCKET = "websocket".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/synthetics_test_type.rb b/lib/datadog_api_client/v2/models/synthetics_test_type.rb new file mode 100644 index 000000000000..0a515748d7bb --- /dev/null +++ b/lib/datadog_api_client/v2/models/synthetics_test_type.rb @@ -0,0 +1,29 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Type of the Synthetic test that produced this result. + class SyntheticsTestType + include BaseEnumModel + + API = "api".freeze + BROWSER = "browser".freeze + MOBILE = "mobile".freeze + NETWORK = "network".freeze + end +end