From 3af87709772c9527f48c90e46d6167f8e968fc57 Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Fri, 16 Aug 2024 15:30:35 +0000 Subject: [PATCH] Add `is_totp` and `is_fido` to Synthetic global variables (#1910) Co-authored-by: ci.datadog-api-spec --- .apigentools-info | 8 +- .generator/schemas/v1/openapi.yaml | 57 ++++- ...global-variable-returns-OK-response.frozen | 1 + ...DO-global-variable-returns-OK-response.yml | 96 ++++++++ ...global-variable-returns-OK-response.frozen | 1 + ...TP-global-variable-returns-OK-response.yml | 96 ++++++++ ...iable-from-test-returns-OK-response.frozen | 2 +- ...variable-from-test-returns-OK-response.yml | 30 ++- ...global-variable-returns-OK-response.frozen | 1 + ...-a-global-variable-returns-OK-response.yml | 96 ++++++++ .../v1/synthetics/CreateGlobalVariable.rb | 2 +- .../CreateGlobalVariable_1068962881.rb | 10 +- .../CreateGlobalVariable_3298562511.rb | 12 + .../CreateGlobalVariable_3397718516.rb | 22 ++ examples/v1/synthetics/EditGlobalVariable.rb | 2 +- features/scenarios_model_mapping.rb | 4 +- features/v1/given.json | 2 +- features/v1/synthetics.feature | 22 +- ...nthetics_global_variable_fido_payload.json | 6 + ...ics_global_variable_from_test_payload.json | 14 ++ .../synthetics_global_variable_payload.json | 13 +- ...nthetics_global_variable_totp_payload.json | 16 ++ lib/datadog_api_client/inflector.rb | 1 + .../v1/api/synthetics_api.rb | 4 +- .../v1/models/synthetics_global_variable.rb | 22 +- .../synthetics_global_variable_request.rb | 212 ++++++++++++++++++ 26 files changed, 699 insertions(+), 53 deletions(-) create mode 100644 cassettes/features/v1/synthetics/Create-a-FIDO-global-variable-returns-OK-response.frozen create mode 100644 cassettes/features/v1/synthetics/Create-a-FIDO-global-variable-returns-OK-response.yml create mode 100644 cassettes/features/v1/synthetics/Create-a-TOTP-global-variable-returns-OK-response.frozen create mode 100644 cassettes/features/v1/synthetics/Create-a-TOTP-global-variable-returns-OK-response.yml create mode 100644 cassettes/features/v1/synthetics/Create-a-global-variable-returns-OK-response.frozen create mode 100644 cassettes/features/v1/synthetics/Create-a-global-variable-returns-OK-response.yml create mode 100644 examples/v1/synthetics/CreateGlobalVariable_3298562511.rb create mode 100644 examples/v1/synthetics/CreateGlobalVariable_3397718516.rb create mode 100644 features/v1/synthetics_global_variable_fido_payload.json create mode 100644 features/v1/synthetics_global_variable_from_test_payload.json create mode 100644 features/v1/synthetics_global_variable_totp_payload.json create mode 100644 lib/datadog_api_client/v1/models/synthetics_global_variable_request.rb diff --git a/.apigentools-info b/.apigentools-info index 99bc78cc59ae..ade856266e3c 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2024-08-14 22:32:07.515779", - "spec_repo_commit": "07d72513" + "regenerated": "2024-08-16 13:40:32.441500", + "spec_repo_commit": "1b56c3ba" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2024-08-14 22:32:07.533818", - "spec_repo_commit": "07d72513" + "regenerated": "2024-08-16 13:40:32.459608", + "spec_repo_commit": "1b56c3ba" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index fa88d84aaa04..86182be530e5 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -15143,6 +15143,12 @@ components: description: Unique identifier of the global variable. readOnly: true type: string + is_fido: + description: Determines if the global variable is a FIDO variable. + type: boolean + is_totp: + description: Determines if the global variable is a TOTP/MFA variable. + type: boolean name: description: Name of the global variable. Unique across Synthetic global variables. @@ -15233,6 +15239,53 @@ components: - JSON_PATH - REGEX - X_PATH + SyntheticsGlobalVariableRequest: + description: Details of the global variable to create. + properties: + attributes: + $ref: '#/components/schemas/SyntheticsGlobalVariableAttributes' + description: + description: Description of the global variable. + example: Example description + type: string + id: + description: Unique identifier of the global variable. + readOnly: true + type: string + is_fido: + description: Determines if the global variable is a FIDO variable. + type: boolean + is_totp: + description: Determines if the global variable is a TOTP/MFA variable. + type: boolean + name: + description: Name of the global variable. Unique across Synthetic global + variables. + example: MY_VARIABLE + type: string + parse_test_options: + $ref: '#/components/schemas/SyntheticsGlobalVariableParseTestOptions' + parse_test_public_id: + description: A Synthetic test ID to use as a test to generate the variable + value. + example: abc-def-123 + type: string + tags: + description: Tags of the global variable. + example: + - team:front + - test:workflow-1 + items: + description: Tag name. + type: string + type: array + value: + $ref: '#/components/schemas/SyntheticsGlobalVariableValue' + required: + - description + - name + - tags + type: object SyntheticsGlobalVariableTOTPParameters: description: Parameters for the TOTP/MFA variable properties: @@ -31194,7 +31247,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SyntheticsGlobalVariable' + $ref: '#/components/schemas/SyntheticsGlobalVariableRequest' description: Details of the global variable to create. required: true responses: @@ -31328,7 +31381,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/SyntheticsGlobalVariable' + $ref: '#/components/schemas/SyntheticsGlobalVariableRequest' description: Details of the global variable to update. required: true responses: diff --git a/cassettes/features/v1/synthetics/Create-a-FIDO-global-variable-returns-OK-response.frozen b/cassettes/features/v1/synthetics/Create-a-FIDO-global-variable-returns-OK-response.frozen new file mode 100644 index 000000000000..abe886f07861 --- /dev/null +++ b/cassettes/features/v1/synthetics/Create-a-FIDO-global-variable-returns-OK-response.frozen @@ -0,0 +1 @@ +2024-08-14T08:58:43.057Z \ No newline at end of file diff --git a/cassettes/features/v1/synthetics/Create-a-FIDO-global-variable-returns-OK-response.yml b/cassettes/features/v1/synthetics/Create-a-FIDO-global-variable-returns-OK-response.yml new file mode 100644 index 000000000000..f62128ffb739 --- /dev/null +++ b/cassettes/features/v1/synthetics/Create-a-FIDO-global-variable-returns-OK-response.yml @@ -0,0 +1,96 @@ +http_interactions: +- recorded_at: Wed, 14 Aug 2024 08:58:43 GMT + request: + body: + encoding: UTF-8 + string: '{"config":{"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"steps":[{"allowFailure":true,"assertions":[{"operator":"is","target":200,"type":"statusCode"}],"extractedValues":[{"field":"server","name":"EXTRACTED_VALUE","parser":{"type":"raw"},"secure":true,"type":"http_header"}],"isCritical":true,"name":"request + is sent","request":{"httpVersion":"http2","method":"GET","timeout":10,"url":"https://datadoghq.com"},"retry":{"count":5,"interval":1000},"subtype":"http"},{"name":"Wait","subtype":"wait","value":1},{"allowFailure":false,"assertions":[{"operator":"lessThan","target":1000,"type":"responseTime"}],"extractedValues":[],"isCritical":true,"name":"GRPC + CALL","request":{"callType":"unary","compressedJsonDescriptor":"eJy1lU1z2yAQhv+Lzj74I3ETH506bQ7OZOSm1w4Wa4epBARQppqM/3v5koCJJdvtxCdW77vPssCO3zMKUgHOFu/ZXvBiS6hZho/f8qe7pftYgXphWJrlA8XwxywEvNba+6PhkC2yVcVVswYp0R6ykRYlZ1SCV21SDrxsssPIeS9FJKqGfK2rqnmmSBwhWa2XlKgtaQPiDcRGCUDVfwGD2sKUqKEtc1cSoOrsMlaMOec1sySYCCgUYRSVLv2zSva2u+FQkB0pVkIw8bFuIudOOn3pOaKYVT3Iy97Pd0AYhOx5QcMsnxvRHlnuLf8ETDd3CNtrv2nejkDpRnANCmGkkFn/hsYzpBKE7jVbufgnKnV9HRM9zRPDDKPttYT61n0TdWkAAjggk9AhuxIeaXd69CYTcsGw7cBTakLVbNpRzGEgyWjkSOpMbZXkhGL6oX30R49qt3GoHrap7i0XdD41WQ+2icCNm5p1hmFqnHNlcla0riKmDZ183crDxChjbnurtxHPRE784sVhWvDfGP+SsTKibU3o5NtWHuZFGZOxP6P5VXqIOvaOSec4eYohyd7NslHuJbd1bewds85xYrNxkr2d+5IhFWF3NvaO684xjE2S5ulY+tu64Pna0fCPJgzw6vF5/WucLcYjt5xoq19O3UDptOg/OamJQRaCcPPnMTQ2QDFn+uhPvUfnCrMc99upyQY4Ui9Dlc/YoG3R/v4Cs9YE+g==","host":"grpcbin.test.k6.io","message":"{}","metadata":{},"method":"Index","port":9000,"service":"grpcbin.GRPCBin"},"retry":{"count":0,"interval":300},"subtype":"grpc"}]},"locations":["aws:us-east-2"],"message":"BDD + test payload: synthetics_api_test_multi_step_payload.json","name":"Test-Create_a_FIDO_global_variable_returns_OK_response-1723625923","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Create_a_FIDO_global_variable_returns_OK_response-1723625923","monitor_priority":5,"retry":{"count":3,"interval":1000},"tick_every":60},"subtype":"multi","tags":["testing:api"],"type":"api"}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v1/synthetics/tests/api + response: + body: + encoding: UTF-8 + string: '{"public_id":"ntf-3e2-mti","name":"Test-Create_a_FIDO_global_variable_returns_OK_response-1723625923","status":"live","type":"api","tags":["testing:api"],"created_at":"2024-08-14T08:58:43.764902+00:00","modified_at":"2024-08-14T08:58:43.764902+00:00","config":{"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"steps":[{"allowFailure":true,"assertions":[{"operator":"is","target":200,"type":"statusCode"}],"extractedValues":[{"field":"server","name":"EXTRACTED_VALUE","parser":{"type":"raw"},"secure":true,"type":"http_header"}],"isCritical":true,"name":"request + is sent","request":{"httpVersion":"http2","method":"GET","timeout":10,"url":"https://datadoghq.com"},"retry":{"count":5,"interval":1000},"subtype":"http","id":"tj8-4ij-ddd"},{"name":"Wait","subtype":"wait","value":1,"id":"w3m-csm-75k"},{"allowFailure":false,"assertions":[{"operator":"lessThan","target":1000,"type":"responseTime"}],"extractedValues":[],"isCritical":true,"name":"GRPC + CALL","request":{"callType":"unary","compressedJsonDescriptor":"eJy1lU1z2yAQhv+Lzj74I3ETH506bQ7OZOSm1w4Wa4epBARQppqM/3v5koCJJdvtxCdW77vPssCO3zMKUgHOFu/ZXvBiS6hZho/f8qe7pftYgXphWJrlA8XwxywEvNba+6PhkC2yVcVVswYp0R6ykRYlZ1SCV21SDrxsssPIeS9FJKqGfK2rqnmmSBwhWa2XlKgtaQPiDcRGCUDVfwGD2sKUqKEtc1cSoOrsMlaMOec1sySYCCgUYRSVLv2zSva2u+FQkB0pVkIw8bFuIudOOn3pOaKYVT3Iy97Pd0AYhOx5QcMsnxvRHlnuLf8ETDd3CNtrv2nejkDpRnANCmGkkFn/hsYzpBKE7jVbufgnKnV9HRM9zRPDDKPttYT61n0TdWkAAjggk9AhuxIeaXd69CYTcsGw7cBTakLVbNpRzGEgyWjkSOpMbZXkhGL6oX30R49qt3GoHrap7i0XdD41WQ+2icCNm5p1hmFqnHNlcla0riKmDZ183crDxChjbnurtxHPRE784sVhWvDfGP+SsTKibU3o5NtWHuZFGZOxP6P5VXqIOvaOSec4eYohyd7NslHuJbd1bewds85xYrNxkr2d+5IhFWF3NvaO684xjE2S5ulY+tu64Pna0fCPJgzw6vF5/WucLcYjt5xoq19O3UDptOg/OamJQRaCcPPnMTQ2QDFn+uhPvUfnCrMc99upyQY4Ui9Dlc/YoG3R/v4Cs9YE+g==","host":"grpcbin.test.k6.io","message":"{}","metadata":{},"method":"Index","port":9000,"service":"grpcbin.GRPCBin"},"retry":{"count":0,"interval":300},"subtype":"grpc","id":"h3x-7i4-rcp"}]},"message":"BDD + test payload: synthetics_api_test_multi_step_payload.json","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Create_a_FIDO_global_variable_returns_OK_response-1723625923","monitor_priority":5,"retry":{"count":3,"interval":1000},"tick_every":60},"locations":["aws:us-east-2"],"subtype":"multi","created_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"},"deleted_at":null,"monitor_id":151290037,"org_id":321813,"modified_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- recorded_at: Wed, 14 Aug 2024 08:58:43 GMT + request: + body: + encoding: UTF-8 + string: '{"description":"","is_fido":true,"name":"GLOBAL_VARIABLE_FIDO_PAYLOAD_TESTCREATEAFIDOGLOBALVARIABLERETURNSOKRESPONSE1723625923","tags":[]}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v1/synthetics/variables + response: + body: + encoding: UTF-8 + string: '{"id":"bf2cc5f0-2529-433c-b892-84e83e13a759","name":"GLOBAL_VARIABLE_FIDO_PAYLOAD_TESTCREATEAFIDOGLOBALVARIABLERETURNSOKRESPONSE1723625923","description":"","type":"variable","tags":[],"last_error":null,"is_fido":true,"value":{"secure":true}} + + ' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- recorded_at: Wed, 14 Aug 2024 08:58:43 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v1/synthetics/variables/bf2cc5f0-2529-433c-b892-84e83e13a759 + response: + body: + encoding: UTF-8 + string: '' + headers: + Content-Type: + - text/html; charset=utf-8 + status: + code: 200 + message: OK +- recorded_at: Wed, 14 Aug 2024 08:58:43 GMT + request: + body: + encoding: UTF-8 + string: '{"public_ids":["ntf-3e2-mti"]}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v1/synthetics/tests/delete + response: + body: + encoding: UTF-8 + string: '{"deleted_tests":[{"public_id":"ntf-3e2-mti","deleted_at":"2024-08-14T08:58:45.504158+00:00"}]} + + ' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v1/synthetics/Create-a-TOTP-global-variable-returns-OK-response.frozen b/cassettes/features/v1/synthetics/Create-a-TOTP-global-variable-returns-OK-response.frozen new file mode 100644 index 000000000000..df91f7fd41fc --- /dev/null +++ b/cassettes/features/v1/synthetics/Create-a-TOTP-global-variable-returns-OK-response.frozen @@ -0,0 +1 @@ +2024-08-14T08:58:58.240Z \ No newline at end of file diff --git a/cassettes/features/v1/synthetics/Create-a-TOTP-global-variable-returns-OK-response.yml b/cassettes/features/v1/synthetics/Create-a-TOTP-global-variable-returns-OK-response.yml new file mode 100644 index 000000000000..c9310c0869c1 --- /dev/null +++ b/cassettes/features/v1/synthetics/Create-a-TOTP-global-variable-returns-OK-response.yml @@ -0,0 +1,96 @@ +http_interactions: +- recorded_at: Wed, 14 Aug 2024 08:58:58 GMT + request: + body: + encoding: UTF-8 + string: '{"config":{"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"steps":[{"allowFailure":true,"assertions":[{"operator":"is","target":200,"type":"statusCode"}],"extractedValues":[{"field":"server","name":"EXTRACTED_VALUE","parser":{"type":"raw"},"secure":true,"type":"http_header"}],"isCritical":true,"name":"request + is sent","request":{"httpVersion":"http2","method":"GET","timeout":10,"url":"https://datadoghq.com"},"retry":{"count":5,"interval":1000},"subtype":"http"},{"name":"Wait","subtype":"wait","value":1},{"allowFailure":false,"assertions":[{"operator":"lessThan","target":1000,"type":"responseTime"}],"extractedValues":[],"isCritical":true,"name":"GRPC + CALL","request":{"callType":"unary","compressedJsonDescriptor":"eJy1lU1z2yAQhv+Lzj74I3ETH506bQ7OZOSm1w4Wa4epBARQppqM/3v5koCJJdvtxCdW77vPssCO3zMKUgHOFu/ZXvBiS6hZho/f8qe7pftYgXphWJrlA8XwxywEvNba+6PhkC2yVcVVswYp0R6ykRYlZ1SCV21SDrxsssPIeS9FJKqGfK2rqnmmSBwhWa2XlKgtaQPiDcRGCUDVfwGD2sKUqKEtc1cSoOrsMlaMOec1sySYCCgUYRSVLv2zSva2u+FQkB0pVkIw8bFuIudOOn3pOaKYVT3Iy97Pd0AYhOx5QcMsnxvRHlnuLf8ETDd3CNtrv2nejkDpRnANCmGkkFn/hsYzpBKE7jVbufgnKnV9HRM9zRPDDKPttYT61n0TdWkAAjggk9AhuxIeaXd69CYTcsGw7cBTakLVbNpRzGEgyWjkSOpMbZXkhGL6oX30R49qt3GoHrap7i0XdD41WQ+2icCNm5p1hmFqnHNlcla0riKmDZ183crDxChjbnurtxHPRE784sVhWvDfGP+SsTKibU3o5NtWHuZFGZOxP6P5VXqIOvaOSec4eYohyd7NslHuJbd1bewds85xYrNxkr2d+5IhFWF3NvaO684xjE2S5ulY+tu64Pna0fCPJgzw6vF5/WucLcYjt5xoq19O3UDptOg/OamJQRaCcPPnMTQ2QDFn+uhPvUfnCrMc99upyQY4Ui9Dlc/YoG3R/v4Cs9YE+g==","host":"grpcbin.test.k6.io","message":"{}","metadata":{},"method":"Index","port":9000,"service":"grpcbin.GRPCBin"},"retry":{"count":0,"interval":300},"subtype":"grpc"}]},"locations":["aws:us-east-2"],"message":"BDD + test payload: synthetics_api_test_multi_step_payload.json","name":"Test-Create_a_TOTP_global_variable_returns_OK_response-1723625938","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Create_a_TOTP_global_variable_returns_OK_response-1723625938","monitor_priority":5,"retry":{"count":3,"interval":1000},"tick_every":60},"subtype":"multi","tags":["testing:api"],"type":"api"}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v1/synthetics/tests/api + response: + body: + encoding: UTF-8 + string: '{"public_id":"uep-ivi-qsc","name":"Test-Create_a_TOTP_global_variable_returns_OK_response-1723625938","status":"live","type":"api","tags":["testing:api"],"created_at":"2024-08-14T08:58:59.026725+00:00","modified_at":"2024-08-14T08:58:59.026725+00:00","config":{"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"steps":[{"allowFailure":true,"assertions":[{"operator":"is","target":200,"type":"statusCode"}],"extractedValues":[{"field":"server","name":"EXTRACTED_VALUE","parser":{"type":"raw"},"secure":true,"type":"http_header"}],"isCritical":true,"name":"request + is sent","request":{"httpVersion":"http2","method":"GET","timeout":10,"url":"https://datadoghq.com"},"retry":{"count":5,"interval":1000},"subtype":"http","id":"6w9-n8y-wna"},{"name":"Wait","subtype":"wait","value":1,"id":"2z7-bqf-2t8"},{"allowFailure":false,"assertions":[{"operator":"lessThan","target":1000,"type":"responseTime"}],"extractedValues":[],"isCritical":true,"name":"GRPC + CALL","request":{"callType":"unary","compressedJsonDescriptor":"eJy1lU1z2yAQhv+Lzj74I3ETH506bQ7OZOSm1w4Wa4epBARQppqM/3v5koCJJdvtxCdW77vPssCO3zMKUgHOFu/ZXvBiS6hZho/f8qe7pftYgXphWJrlA8XwxywEvNba+6PhkC2yVcVVswYp0R6ykRYlZ1SCV21SDrxsssPIeS9FJKqGfK2rqnmmSBwhWa2XlKgtaQPiDcRGCUDVfwGD2sKUqKEtc1cSoOrsMlaMOec1sySYCCgUYRSVLv2zSva2u+FQkB0pVkIw8bFuIudOOn3pOaKYVT3Iy97Pd0AYhOx5QcMsnxvRHlnuLf8ETDd3CNtrv2nejkDpRnANCmGkkFn/hsYzpBKE7jVbufgnKnV9HRM9zRPDDKPttYT61n0TdWkAAjggk9AhuxIeaXd69CYTcsGw7cBTakLVbNpRzGEgyWjkSOpMbZXkhGL6oX30R49qt3GoHrap7i0XdD41WQ+2icCNm5p1hmFqnHNlcla0riKmDZ183crDxChjbnurtxHPRE784sVhWvDfGP+SsTKibU3o5NtWHuZFGZOxP6P5VXqIOvaOSec4eYohyd7NslHuJbd1bewds85xYrNxkr2d+5IhFWF3NvaO684xjE2S5ulY+tu64Pna0fCPJgzw6vF5/WucLcYjt5xoq19O3UDptOg/OamJQRaCcPPnMTQ2QDFn+uhPvUfnCrMc99upyQY4Ui9Dlc/YoG3R/v4Cs9YE+g==","host":"grpcbin.test.k6.io","message":"{}","metadata":{},"method":"Index","port":9000,"service":"grpcbin.GRPCBin"},"retry":{"count":0,"interval":300},"subtype":"grpc","id":"hrd-xww-bnz"}]},"message":"BDD + test payload: synthetics_api_test_multi_step_payload.json","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Create_a_TOTP_global_variable_returns_OK_response-1723625938","monitor_priority":5,"retry":{"count":3,"interval":1000},"tick_every":60},"locations":["aws:us-east-2"],"subtype":"multi","created_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"},"deleted_at":null,"monitor_id":151290053,"org_id":321813,"modified_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- recorded_at: Wed, 14 Aug 2024 08:58:58 GMT + request: + body: + encoding: UTF-8 + string: '{"description":"","is_totp":true,"name":"GLOBAL_VARIABLE_TOTP_PAYLOAD_TESTCREATEATOTPGLOBALVARIABLERETURNSOKRESPONSE1723625938","tags":[],"value":{"options":{"totp_parameters":{"digits":6,"refresh_interval":30}},"secure":false,"value":""}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v1/synthetics/variables + response: + body: + encoding: UTF-8 + string: '{"id":"325f2bc2-4d84-4207-84f9-56ec35e784ae","name":"GLOBAL_VARIABLE_TOTP_PAYLOAD_TESTCREATEATOTPGLOBALVARIABLERETURNSOKRESPONSE1723625938","description":"","type":"variable","tags":[],"last_error":null,"is_totp":true,"value":{"options":{"totp_parameters":{"digits":6,"refresh_interval":30}},"secure":false,"value":""}} + + ' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- recorded_at: Wed, 14 Aug 2024 08:58:58 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v1/synthetics/variables/325f2bc2-4d84-4207-84f9-56ec35e784ae + response: + body: + encoding: UTF-8 + string: '' + headers: + Content-Type: + - text/html; charset=utf-8 + status: + code: 200 + message: OK +- recorded_at: Wed, 14 Aug 2024 08:58:58 GMT + request: + body: + encoding: UTF-8 + string: '{"public_ids":["uep-ivi-qsc"]}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v1/synthetics/tests/delete + response: + body: + encoding: UTF-8 + string: '{"deleted_tests":[{"public_id":"uep-ivi-qsc","deleted_at":"2024-08-14T08:59:00.747670+00:00"}]} + + ' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/cassettes/features/v1/synthetics/Create-a-global-variable-from-test-returns-OK-response.frozen b/cassettes/features/v1/synthetics/Create-a-global-variable-from-test-returns-OK-response.frozen index b492ef293e39..72c812269363 100644 --- a/cassettes/features/v1/synthetics/Create-a-global-variable-from-test-returns-OK-response.frozen +++ b/cassettes/features/v1/synthetics/Create-a-global-variable-from-test-returns-OK-response.frozen @@ -1 +1 @@ -2024-06-25T09:44:03.099Z \ No newline at end of file +2024-08-01T17:00:57.470Z \ No newline at end of file diff --git a/cassettes/features/v1/synthetics/Create-a-global-variable-from-test-returns-OK-response.yml b/cassettes/features/v1/synthetics/Create-a-global-variable-from-test-returns-OK-response.yml index 363e9b125e5e..962442752524 100644 --- a/cassettes/features/v1/synthetics/Create-a-global-variable-from-test-returns-OK-response.yml +++ b/cassettes/features/v1/synthetics/Create-a-global-variable-from-test-returns-OK-response.yml @@ -1,12 +1,12 @@ http_interactions: -- recorded_at: Tue, 25 Jun 2024 09:44:03 GMT +- recorded_at: Thu, 01 Aug 2024 17:00:57 GMT request: body: encoding: UTF-8 string: '{"config":{"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"steps":[{"allowFailure":true,"assertions":[{"operator":"is","target":200,"type":"statusCode"}],"extractedValues":[{"field":"server","name":"EXTRACTED_VALUE","parser":{"type":"raw"},"secure":true,"type":"http_header"}],"isCritical":true,"name":"request is sent","request":{"httpVersion":"http2","method":"GET","timeout":10,"url":"https://datadoghq.com"},"retry":{"count":5,"interval":1000},"subtype":"http"},{"name":"Wait","subtype":"wait","value":1},{"allowFailure":false,"assertions":[{"operator":"lessThan","target":1000,"type":"responseTime"}],"extractedValues":[],"isCritical":true,"name":"GRPC CALL","request":{"callType":"unary","compressedJsonDescriptor":"eJy1lU1z2yAQhv+Lzj74I3ETH506bQ7OZOSm1w4Wa4epBARQppqM/3v5koCJJdvtxCdW77vPssCO3zMKUgHOFu/ZXvBiS6hZho/f8qe7pftYgXphWJrlA8XwxywEvNba+6PhkC2yVcVVswYp0R6ykRYlZ1SCV21SDrxsssPIeS9FJKqGfK2rqnmmSBwhWa2XlKgtaQPiDcRGCUDVfwGD2sKUqKEtc1cSoOrsMlaMOec1sySYCCgUYRSVLv2zSva2u+FQkB0pVkIw8bFuIudOOn3pOaKYVT3Iy97Pd0AYhOx5QcMsnxvRHlnuLf8ETDd3CNtrv2nejkDpRnANCmGkkFn/hsYzpBKE7jVbufgnKnV9HRM9zRPDDKPttYT61n0TdWkAAjggk9AhuxIeaXd69CYTcsGw7cBTakLVbNpRzGEgyWjkSOpMbZXkhGL6oX30R49qt3GoHrap7i0XdD41WQ+2icCNm5p1hmFqnHNlcla0riKmDZ183crDxChjbnurtxHPRE784sVhWvDfGP+SsTKibU3o5NtWHuZFGZOxP6P5VXqIOvaOSec4eYohyd7NslHuJbd1bewds85xYrNxkr2d+5IhFWF3NvaO684xjE2S5ulY+tu64Pna0fCPJgzw6vF5/WucLcYjt5xoq19O3UDptOg/OamJQRaCcPPnMTQ2QDFn+uhPvUfnCrMc99upyQY4Ui9Dlc/YoG3R/v4Cs9YE+g==","host":"grpcbin.test.k6.io","message":"{}","metadata":{},"method":"Index","port":9000,"service":"grpcbin.GRPCBin"},"retry":{"count":0,"interval":300},"subtype":"grpc"}]},"locations":["aws:us-east-2"],"message":"BDD - test payload: synthetics_api_test_multi_step_payload.json","name":"Test-Create_a_global_variable_from_test_returns_OK_response-1719308643","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Create_a_global_variable_from_test_returns_OK_response-1719308643","monitor_priority":5,"retry":{"count":3,"interval":1000},"tick_every":60},"subtype":"multi","tags":["testing:api"],"type":"api"}' + test payload: synthetics_api_test_multi_step_payload.json","name":"Test-Create_a_global_variable_from_test_returns_OK_response-1722531657","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Create_a_global_variable_from_test_returns_OK_response-1722531657","monitor_priority":5,"retry":{"count":3,"interval":1000},"tick_every":60},"subtype":"multi","tags":["testing:api"],"type":"api"}' headers: Accept: - application/json @@ -17,23 +17,21 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"public_id":"wrp-rdu-dxf","name":"Test-Create_a_global_variable_from_test_returns_OK_response-1719308643","status":"live","type":"api","tags":["testing:api"],"created_at":"2024-06-25T09:44:03.406642+00:00","modified_at":"2024-06-25T09:44:03.406642+00:00","config":{"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"steps":[{"allowFailure":true,"assertions":[{"operator":"is","target":200,"type":"statusCode"}],"extractedValues":[{"field":"server","name":"EXTRACTED_VALUE","parser":{"type":"raw"},"secure":true,"type":"http_header"}],"isCritical":true,"name":"request - is sent","request":{"httpVersion":"http2","method":"GET","timeout":10,"url":"https://datadoghq.com"},"retry":{"count":5,"interval":1000},"subtype":"http","id":"qmy-pb4-vgr"},{"name":"Wait","subtype":"wait","value":1,"id":"jvf-pch-ag2"},{"allowFailure":false,"assertions":[{"operator":"lessThan","target":1000,"type":"responseTime"}],"extractedValues":[],"isCritical":true,"name":"GRPC - CALL","request":{"callType":"unary","compressedJsonDescriptor":"eJy1lU1z2yAQhv+Lzj74I3ETH506bQ7OZOSm1w4Wa4epBARQppqM/3v5koCJJdvtxCdW77vPssCO3zMKUgHOFu/ZXvBiS6hZho/f8qe7pftYgXphWJrlA8XwxywEvNba+6PhkC2yVcVVswYp0R6ykRYlZ1SCV21SDrxsssPIeS9FJKqGfK2rqnmmSBwhWa2XlKgtaQPiDcRGCUDVfwGD2sKUqKEtc1cSoOrsMlaMOec1sySYCCgUYRSVLv2zSva2u+FQkB0pVkIw8bFuIudOOn3pOaKYVT3Iy97Pd0AYhOx5QcMsnxvRHlnuLf8ETDd3CNtrv2nejkDpRnANCmGkkFn/hsYzpBKE7jVbufgnKnV9HRM9zRPDDKPttYT61n0TdWkAAjggk9AhuxIeaXd69CYTcsGw7cBTakLVbNpRzGEgyWjkSOpMbZXkhGL6oX30R49qt3GoHrap7i0XdD41WQ+2icCNm5p1hmFqnHNlcla0riKmDZ183crDxChjbnurtxHPRE784sVhWvDfGP+SsTKibU3o5NtWHuZFGZOxP6P5VXqIOvaOSec4eYohyd7NslHuJbd1bewds85xYrNxkr2d+5IhFWF3NvaO684xjE2S5ulY+tu64Pna0fCPJgzw6vF5/WucLcYjt5xoq19O3UDptOg/OamJQRaCcPPnMTQ2QDFn+uhPvUfnCrMc99upyQY4Ui9Dlc/YoG3R/v4Cs9YE+g==","host":"grpcbin.test.k6.io","message":"{}","metadata":{},"method":"Index","port":9000,"service":"grpcbin.GRPCBin"},"retry":{"count":0,"interval":300},"subtype":"grpc","id":"fik-npx-cmb"}]},"message":"BDD - test payload: synthetics_api_test_multi_step_payload.json","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Create_a_global_variable_from_test_returns_OK_response-1719308643","monitor_priority":5,"retry":{"count":3,"interval":1000},"tick_every":60},"locations":["aws:us-east-2"],"subtype":"multi","created_by":{"name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","email":"team-intg-tools-libs-spam@datadoghq.com"},"deleted_at":null,"monitor_id":147863645,"org_id":321813,"modified_by":{"name":"CI - Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","email":"team-intg-tools-libs-spam@datadoghq.com"}}' + string: '{"public_id":"n8z-9e5-k8t","name":"Test-Create_a_global_variable_from_test_returns_OK_response-1722531657","status":"live","type":"api","tags":["testing:api"],"created_at":"2024-08-01T17:00:58.378853+00:00","modified_at":"2024-08-01T17:00:58.378853+00:00","config":{"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"steps":[{"allowFailure":true,"assertions":[{"operator":"is","target":200,"type":"statusCode"}],"extractedValues":[{"field":"server","name":"EXTRACTED_VALUE","parser":{"type":"raw"},"secure":true,"type":"http_header"}],"isCritical":true,"name":"request + is sent","request":{"httpVersion":"http2","method":"GET","timeout":10,"url":"https://datadoghq.com"},"retry":{"count":5,"interval":1000},"subtype":"http","id":"2uj-jze-98z"},{"name":"Wait","subtype":"wait","value":1,"id":"xrn-muv-bv5"},{"allowFailure":false,"assertions":[{"operator":"lessThan","target":1000,"type":"responseTime"}],"extractedValues":[],"isCritical":true,"name":"GRPC + CALL","request":{"callType":"unary","compressedJsonDescriptor":"eJy1lU1z2yAQhv+Lzj74I3ETH506bQ7OZOSm1w4Wa4epBARQppqM/3v5koCJJdvtxCdW77vPssCO3zMKUgHOFu/ZXvBiS6hZho/f8qe7pftYgXphWJrlA8XwxywEvNba+6PhkC2yVcVVswYp0R6ykRYlZ1SCV21SDrxsssPIeS9FJKqGfK2rqnmmSBwhWa2XlKgtaQPiDcRGCUDVfwGD2sKUqKEtc1cSoOrsMlaMOec1sySYCCgUYRSVLv2zSva2u+FQkB0pVkIw8bFuIudOOn3pOaKYVT3Iy97Pd0AYhOx5QcMsnxvRHlnuLf8ETDd3CNtrv2nejkDpRnANCmGkkFn/hsYzpBKE7jVbufgnKnV9HRM9zRPDDKPttYT61n0TdWkAAjggk9AhuxIeaXd69CYTcsGw7cBTakLVbNpRzGEgyWjkSOpMbZXkhGL6oX30R49qt3GoHrap7i0XdD41WQ+2icCNm5p1hmFqnHNlcla0riKmDZ183crDxChjbnurtxHPRE784sVhWvDfGP+SsTKibU3o5NtWHuZFGZOxP6P5VXqIOvaOSec4eYohyd7NslHuJbd1bewds85xYrNxkr2d+5IhFWF3NvaO684xjE2S5ulY+tu64Pna0fCPJgzw6vF5/WucLcYjt5xoq19O3UDptOg/OamJQRaCcPPnMTQ2QDFn+uhPvUfnCrMc99upyQY4Ui9Dlc/YoG3R/v4Cs9YE+g==","host":"grpcbin.test.k6.io","message":"{}","metadata":{},"method":"Index","port":9000,"service":"grpcbin.GRPCBin"},"retry":{"count":0,"interval":300},"subtype":"grpc","id":"zx8-xwp-iii"}]},"message":"BDD + test payload: synthetics_api_test_multi_step_payload.json","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Create_a_global_variable_from_test_returns_OK_response-1722531657","monitor_priority":5,"retry":{"count":3,"interval":1000},"tick_every":60},"locations":["aws:us-east-2"],"subtype":"multi","created_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"},"deleted_at":null,"monitor_id":150358100,"org_id":321813,"modified_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}}' headers: Content-Type: - application/json status: code: 200 message: OK -- recorded_at: Tue, 25 Jun 2024 09:44:03 GMT +- recorded_at: Thu, 01 Aug 2024 17:00:57 GMT request: body: encoding: UTF-8 - string: '{"description":"","name":"GLOBAL_VARIABLE_PAYLOAD_TESTCREATEAGLOBALVARIABLEFROMTESTRETURNSOKRESPONSE1719308643","parse_test_options":{"localVariableName":"EXTRACTED_VALUE","type":"local_variable"},"parse_test_public_id":"wrp-rdu-dxf","tags":[],"value":{"options":{"totp_parameters":{"digits":6,"refresh_interval":30}},"secure":false,"value":""}}' + string: '{"description":"","name":"GLOBAL_VARIABLE_FROM_TEST_PAYLOAD_TESTCREATEAGLOBALVARIABLEFROMTESTRETURNSOKRESPONSE1722531657","parse_test_options":{"localVariableName":"EXTRACTED_VALUE","type":"local_variable"},"parse_test_public_id":"n8z-9e5-k8t","tags":[],"value":{"secure":false,"value":""}}' headers: Accept: - application/json @@ -44,7 +42,7 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"id":"4a3f0e26-1295-416c-be89-9490168fd92e","name":"GLOBAL_VARIABLE_PAYLOAD_TESTCREATEAGLOBALVARIABLEFROMTESTRETURNSOKRESPONSE1719308643","description":"","type":"variable","tags":[],"parse_test_public_id":"wrp-rdu-dxf","parse_test_name":null,"parse_test_options":{"localVariableName":"EXTRACTED_VALUE","type":"local_variable"},"parse_test_extracted_at":null,"is_totp":null,"is_fido":null,"last_error":null,"value":{"options":{"totp_parameters":{"digits":6,"refresh_interval":30}},"secure":false,"value":""}} + string: '{"id":"74f56d5c-49d3-4432-b4c2-39258b1b55d5","name":"GLOBAL_VARIABLE_FROM_TEST_PAYLOAD_TESTCREATEAGLOBALVARIABLEFROMTESTRETURNSOKRESPONSE1722531657","description":"","type":"variable","tags":[],"parse_test_public_id":"n8z-9e5-k8t","parse_test_name":null,"parse_test_options":{"localVariableName":"EXTRACTED_VALUE","type":"local_variable"},"parse_test_extracted_at":null,"last_error":null,"value":{"secure":false,"value":""}} ' headers: @@ -53,14 +51,14 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Tue, 25 Jun 2024 09:44:03 GMT +- recorded_at: Thu, 01 Aug 2024 17:00:57 GMT request: body: null headers: Accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v1/synthetics/variables/4a3f0e26-1295-416c-be89-9490168fd92e + uri: https://api.datadoghq.com/api/v1/synthetics/variables/74f56d5c-49d3-4432-b4c2-39258b1b55d5 response: body: encoding: UTF-8 @@ -71,11 +69,11 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Tue, 25 Jun 2024 09:44:03 GMT +- recorded_at: Thu, 01 Aug 2024 17:00:57 GMT request: body: encoding: UTF-8 - string: '{"public_ids":["wrp-rdu-dxf"]}' + string: '{"public_ids":["n8z-9e5-k8t"]}' headers: Accept: - application/json @@ -86,7 +84,7 @@ http_interactions: response: body: encoding: UTF-8 - string: '{"deleted_tests":[{"public_id":"wrp-rdu-dxf","deleted_at":"2024-06-25T09:44:05.300069+00:00"}]} + string: '{"deleted_tests":[{"public_id":"n8z-9e5-k8t","deleted_at":"2024-08-01T17:01:00.291321+00:00"}]} ' headers: diff --git a/cassettes/features/v1/synthetics/Create-a-global-variable-returns-OK-response.frozen b/cassettes/features/v1/synthetics/Create-a-global-variable-returns-OK-response.frozen new file mode 100644 index 000000000000..d474439b0cf1 --- /dev/null +++ b/cassettes/features/v1/synthetics/Create-a-global-variable-returns-OK-response.frozen @@ -0,0 +1 @@ +2024-07-17T14:14:31.128Z \ No newline at end of file diff --git a/cassettes/features/v1/synthetics/Create-a-global-variable-returns-OK-response.yml b/cassettes/features/v1/synthetics/Create-a-global-variable-returns-OK-response.yml new file mode 100644 index 000000000000..3674e33a8d23 --- /dev/null +++ b/cassettes/features/v1/synthetics/Create-a-global-variable-returns-OK-response.yml @@ -0,0 +1,96 @@ +http_interactions: +- recorded_at: Wed, 17 Jul 2024 14:14:31 GMT + request: + body: + encoding: UTF-8 + string: '{"config":{"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"steps":[{"allowFailure":true,"assertions":[{"operator":"is","target":200,"type":"statusCode"}],"extractedValues":[{"field":"server","name":"EXTRACTED_VALUE","parser":{"type":"raw"},"secure":true,"type":"http_header"}],"isCritical":true,"name":"request + is sent","request":{"httpVersion":"http2","method":"GET","timeout":10,"url":"https://datadoghq.com"},"retry":{"count":5,"interval":1000},"subtype":"http"},{"name":"Wait","subtype":"wait","value":1},{"allowFailure":false,"assertions":[{"operator":"lessThan","target":1000,"type":"responseTime"}],"extractedValues":[],"isCritical":true,"name":"GRPC + CALL","request":{"callType":"unary","compressedJsonDescriptor":"eJy1lU1z2yAQhv+Lzj74I3ETH506bQ7OZOSm1w4Wa4epBARQppqM/3v5koCJJdvtxCdW77vPssCO3zMKUgHOFu/ZXvBiS6hZho/f8qe7pftYgXphWJrlA8XwxywEvNba+6PhkC2yVcVVswYp0R6ykRYlZ1SCV21SDrxsssPIeS9FJKqGfK2rqnmmSBwhWa2XlKgtaQPiDcRGCUDVfwGD2sKUqKEtc1cSoOrsMlaMOec1sySYCCgUYRSVLv2zSva2u+FQkB0pVkIw8bFuIudOOn3pOaKYVT3Iy97Pd0AYhOx5QcMsnxvRHlnuLf8ETDd3CNtrv2nejkDpRnANCmGkkFn/hsYzpBKE7jVbufgnKnV9HRM9zRPDDKPttYT61n0TdWkAAjggk9AhuxIeaXd69CYTcsGw7cBTakLVbNpRzGEgyWjkSOpMbZXkhGL6oX30R49qt3GoHrap7i0XdD41WQ+2icCNm5p1hmFqnHNlcla0riKmDZ183crDxChjbnurtxHPRE784sVhWvDfGP+SsTKibU3o5NtWHuZFGZOxP6P5VXqIOvaOSec4eYohyd7NslHuJbd1bewds85xYrNxkr2d+5IhFWF3NvaO684xjE2S5ulY+tu64Pna0fCPJgzw6vF5/WucLcYjt5xoq19O3UDptOg/OamJQRaCcPPnMTQ2QDFn+uhPvUfnCrMc99upyQY4Ui9Dlc/YoG3R/v4Cs9YE+g==","host":"grpcbin.test.k6.io","message":"{}","metadata":{},"method":"Index","port":9000,"service":"grpcbin.GRPCBin"},"retry":{"count":0,"interval":300},"subtype":"grpc"}]},"locations":["aws:us-east-2"],"message":"BDD + test payload: synthetics_api_test_multi_step_payload.json","name":"Test-Create_a_global_variable_returns_OK_response-1721225671","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Create_a_global_variable_returns_OK_response-1721225671","monitor_priority":5,"retry":{"count":3,"interval":1000},"tick_every":60},"subtype":"multi","tags":["testing:api"],"type":"api"}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v1/synthetics/tests/api + response: + body: + encoding: UTF-8 + string: '{"public_id":"6ha-935-dj6","name":"Test-Create_a_global_variable_returns_OK_response-1721225671","status":"live","type":"api","tags":["testing:api"],"created_at":"2024-07-17T14:14:31.733698+00:00","modified_at":"2024-07-17T14:14:31.733698+00:00","config":{"configVariables":[{"example":"content-type","name":"PROPERTY","pattern":"content-type","type":"text"}],"steps":[{"allowFailure":true,"assertions":[{"operator":"is","target":200,"type":"statusCode"}],"extractedValues":[{"field":"server","name":"EXTRACTED_VALUE","parser":{"type":"raw"},"secure":true,"type":"http_header"}],"isCritical":true,"name":"request + is sent","request":{"httpVersion":"http2","method":"GET","timeout":10,"url":"https://datadoghq.com"},"retry":{"count":5,"interval":1000},"subtype":"http","id":"uf6-x35-nyf"},{"name":"Wait","subtype":"wait","value":1,"id":"sna-i2d-ag9"},{"allowFailure":false,"assertions":[{"operator":"lessThan","target":1000,"type":"responseTime"}],"extractedValues":[],"isCritical":true,"name":"GRPC + CALL","request":{"callType":"unary","compressedJsonDescriptor":"eJy1lU1z2yAQhv+Lzj74I3ETH506bQ7OZOSm1w4Wa4epBARQppqM/3v5koCJJdvtxCdW77vPssCO3zMKUgHOFu/ZXvBiS6hZho/f8qe7pftYgXphWJrlA8XwxywEvNba+6PhkC2yVcVVswYp0R6ykRYlZ1SCV21SDrxsssPIeS9FJKqGfK2rqnmmSBwhWa2XlKgtaQPiDcRGCUDVfwGD2sKUqKEtc1cSoOrsMlaMOec1sySYCCgUYRSVLv2zSva2u+FQkB0pVkIw8bFuIudOOn3pOaKYVT3Iy97Pd0AYhOx5QcMsnxvRHlnuLf8ETDd3CNtrv2nejkDpRnANCmGkkFn/hsYzpBKE7jVbufgnKnV9HRM9zRPDDKPttYT61n0TdWkAAjggk9AhuxIeaXd69CYTcsGw7cBTakLVbNpRzGEgyWjkSOpMbZXkhGL6oX30R49qt3GoHrap7i0XdD41WQ+2icCNm5p1hmFqnHNlcla0riKmDZ183crDxChjbnurtxHPRE784sVhWvDfGP+SsTKibU3o5NtWHuZFGZOxP6P5VXqIOvaOSec4eYohyd7NslHuJbd1bewds85xYrNxkr2d+5IhFWF3NvaO684xjE2S5ulY+tu64Pna0fCPJgzw6vF5/WucLcYjt5xoq19O3UDptOg/OamJQRaCcPPnMTQ2QDFn+uhPvUfnCrMc99upyQY4Ui9Dlc/YoG3R/v4Cs9YE+g==","host":"grpcbin.test.k6.io","message":"{}","metadata":{},"method":"Index","port":9000,"service":"grpcbin.GRPCBin"},"retry":{"count":0,"interval":300},"subtype":"grpc","id":"mzj-ekf-jxv"}]},"message":"BDD + test payload: synthetics_api_test_multi_step_payload.json","options":{"accept_self_signed":false,"allow_insecure":true,"follow_redirects":true,"min_failure_duration":10,"min_location_failed":1,"monitor_name":"Test-Create_a_global_variable_returns_OK_response-1721225671","monitor_priority":5,"retry":{"count":3,"interval":1000},"tick_every":60},"locations":["aws:us-east-2"],"subtype":"multi","created_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"},"deleted_at":null,"monitor_id":149461336,"org_id":321813,"modified_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}}' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- recorded_at: Wed, 17 Jul 2024 14:14:31 GMT + request: + body: + encoding: UTF-8 + string: '{"description":"","name":"GLOBAL_VARIABLE_PAYLOAD_TESTCREATEAGLOBALVARIABLERETURNSOKRESPONSE1721225671","tags":[],"value":{"secure":false,"value":""}}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v1/synthetics/variables + response: + body: + encoding: UTF-8 + string: '{"id":"288ffd6c-6322-43c4-b18b-3bf30db834ab","name":"GLOBAL_VARIABLE_PAYLOAD_TESTCREATEAGLOBALVARIABLERETURNSOKRESPONSE1721225671","description":"","type":"variable","tags":[],"parse_test_public_id":null,"parse_test_name":null,"parse_test_options":null,"parse_test_extracted_at":null,"is_totp":null,"is_fido":null,"last_error":null,"value":{"secure":false,"value":""}} + + ' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +- recorded_at: Wed, 17 Jul 2024 14:14:31 GMT + request: + body: null + headers: + Accept: + - '*/*' + method: DELETE + uri: https://api.datadoghq.com/api/v1/synthetics/variables/288ffd6c-6322-43c4-b18b-3bf30db834ab + response: + body: + encoding: UTF-8 + string: '' + headers: + Content-Type: + - text/html; charset=utf-8 + status: + code: 200 + message: OK +- recorded_at: Wed, 17 Jul 2024 14:14:31 GMT + request: + body: + encoding: UTF-8 + string: '{"public_ids":["6ha-935-dj6"]}' + headers: + Accept: + - application/json + Content-Type: + - application/json + method: POST + uri: https://api.datadoghq.com/api/v1/synthetics/tests/delete + response: + body: + encoding: UTF-8 + string: '{"deleted_tests":[{"public_id":"6ha-935-dj6","deleted_at":"2024-07-17T14:14:34.062860+00:00"}]} + + ' + headers: + Content-Type: + - application/json + status: + code: 200 + message: OK +recorded_with: VCR 6.0.0 diff --git a/examples/v1/synthetics/CreateGlobalVariable.rb b/examples/v1/synthetics/CreateGlobalVariable.rb index 49e02cb41dec..6aaed94fd15f 100644 --- a/examples/v1/synthetics/CreateGlobalVariable.rb +++ b/examples/v1/synthetics/CreateGlobalVariable.rb @@ -3,7 +3,7 @@ require "datadog_api_client" api_instance = DatadogAPIClient::V1::SyntheticsAPI.new -body = DatadogAPIClient::V1::SyntheticsGlobalVariable.new({ +body = DatadogAPIClient::V1::SyntheticsGlobalVariableRequest.new({ attributes: DatadogAPIClient::V1::SyntheticsGlobalVariableAttributes.new({ restricted_roles: [ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", diff --git a/examples/v1/synthetics/CreateGlobalVariable_1068962881.rb b/examples/v1/synthetics/CreateGlobalVariable_1068962881.rb index 14cfa843cbd4..86ae18f1034a 100644 --- a/examples/v1/synthetics/CreateGlobalVariable_1068962881.rb +++ b/examples/v1/synthetics/CreateGlobalVariable_1068962881.rb @@ -6,19 +6,13 @@ # there is a valid "synthetics_api_test_multi_step" in the system SYNTHETICS_API_TEST_MULTI_STEP_PUBLIC_ID = ENV["SYNTHETICS_API_TEST_MULTI_STEP_PUBLIC_ID"] -body = DatadogAPIClient::V1::SyntheticsGlobalVariable.new({ +body = DatadogAPIClient::V1::SyntheticsGlobalVariableRequest.new({ description: "", - name: "GLOBAL_VARIABLE_PAYLOAD_EXAMPLESYNTHETIC", + name: "GLOBAL_VARIABLE_FROM_TEST_PAYLOAD_EXAMPLESYNTHETIC", tags: [], value: DatadogAPIClient::V1::SyntheticsGlobalVariableValue.new({ secure: false, value: "", - options: DatadogAPIClient::V1::SyntheticsGlobalVariableOptions.new({ - totp_parameters: DatadogAPIClient::V1::SyntheticsGlobalVariableTOTPParameters.new({ - digits: 6, - refresh_interval: 30, - }), - }), }), parse_test_public_id: SYNTHETICS_API_TEST_MULTI_STEP_PUBLIC_ID, parse_test_options: DatadogAPIClient::V1::SyntheticsGlobalVariableParseTestOptions.new({ diff --git a/examples/v1/synthetics/CreateGlobalVariable_3298562511.rb b/examples/v1/synthetics/CreateGlobalVariable_3298562511.rb new file mode 100644 index 000000000000..a04e877cfdbb --- /dev/null +++ b/examples/v1/synthetics/CreateGlobalVariable_3298562511.rb @@ -0,0 +1,12 @@ +# Create a FIDO global variable returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V1::SyntheticsAPI.new + +body = DatadogAPIClient::V1::SyntheticsGlobalVariableRequest.new({ + description: "", + is_fido: true, + name: "GLOBAL_VARIABLE_FIDO_PAYLOAD_EXAMPLESYNTHETIC", + tags: [], +}) +p api_instance.create_global_variable(body) diff --git a/examples/v1/synthetics/CreateGlobalVariable_3397718516.rb b/examples/v1/synthetics/CreateGlobalVariable_3397718516.rb new file mode 100644 index 000000000000..ffa1f77c9eaa --- /dev/null +++ b/examples/v1/synthetics/CreateGlobalVariable_3397718516.rb @@ -0,0 +1,22 @@ +# Create a TOTP global variable returns "OK" response + +require "datadog_api_client" +api_instance = DatadogAPIClient::V1::SyntheticsAPI.new + +body = DatadogAPIClient::V1::SyntheticsGlobalVariableRequest.new({ + description: "", + is_totp: true, + name: "GLOBAL_VARIABLE_TOTP_PAYLOAD_EXAMPLESYNTHETIC", + tags: [], + value: DatadogAPIClient::V1::SyntheticsGlobalVariableValue.new({ + secure: false, + value: "", + options: DatadogAPIClient::V1::SyntheticsGlobalVariableOptions.new({ + totp_parameters: DatadogAPIClient::V1::SyntheticsGlobalVariableTOTPParameters.new({ + digits: 6, + refresh_interval: 30, + }), + }), + }), +}) +p api_instance.create_global_variable(body) diff --git a/examples/v1/synthetics/EditGlobalVariable.rb b/examples/v1/synthetics/EditGlobalVariable.rb index 05650f3ab065..21bdb847e697 100644 --- a/examples/v1/synthetics/EditGlobalVariable.rb +++ b/examples/v1/synthetics/EditGlobalVariable.rb @@ -3,7 +3,7 @@ require "datadog_api_client" api_instance = DatadogAPIClient::V1::SyntheticsAPI.new -body = DatadogAPIClient::V1::SyntheticsGlobalVariable.new({ +body = DatadogAPIClient::V1::SyntheticsGlobalVariableRequest.new({ attributes: DatadogAPIClient::V1::SyntheticsGlobalVariableAttributes.new({ restricted_roles: [ "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index 05f50b6e6eb2..7c29e3bdadcf 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -768,7 +768,7 @@ "body" => "SyntheticsUpdateTestPauseStatusPayload", }, "v1.CreateGlobalVariable" => { - "body" => "SyntheticsGlobalVariable", + "body" => "SyntheticsGlobalVariableRequest", }, "v1.DeleteGlobalVariable" => { "variable_id" => "String", @@ -778,7 +778,7 @@ }, "v1.EditGlobalVariable" => { "variable_id" => "String", - "body" => "SyntheticsGlobalVariable", + "body" => "SyntheticsGlobalVariableRequest", }, "v1.ListHostTags" => { "source" => "String", diff --git a/features/v1/given.json b/features/v1/given.json index 3338b856b0f2..5d9b53b8696d 100644 --- a/features/v1/given.json +++ b/features/v1/given.json @@ -286,7 +286,7 @@ "parameters": [ { "name": "body", - "value": "{\n \"description\": \"\",\n \"name\": \"GLOBAL_VARIABLE_PAYLOAD_{{ unique_upper_alnum }}\",\n \"tags\": [],\n \"value\": {\n \"secure\": false,\n \"value\": \"\",\n \"options\": {\n \"totp_parameters\": {\n \"digits\": 6,\n \"refresh_interval\": 30\n }\n }\n },\n \"parse_test_public_id\": \"{{ synthetics_api_test_multi_step.public_id }}\",\n \"parse_test_options\": {\n \"type\": \"local_variable\",\n \"localVariableName\": \"EXTRACTED_VALUE\"\n }\n}\n" + "value": "{\n \"description\": \"\",\n \"name\": \"GLOBAL_VARIABLE_PAYLOAD_{{ unique_upper_alnum }}\",\n \"tags\": [],\n \"value\": {\n \"secure\": false,\n \"value\": \"\"\n }\n}\n" } ], "step": "there is a valid \"synthetics_global_variable\" in the system", diff --git a/features/v1/synthetics.feature b/features/v1/synthetics.feature index 5fcb5d73e8d3..217e58337782 100644 --- a/features/v1/synthetics.feature +++ b/features/v1/synthetics.feature @@ -31,6 +31,24 @@ Feature: Synthetics And the response "tests[3].type" is equal to "A non existent test type" And the response "tests[4].config.request.method" is equal to "A non existent method" + @team:DataDog/synthetics-ct + Scenario: Create a FIDO global variable returns "OK" response + Given there is a valid "synthetics_api_test_multi_step" in the system + And new "CreateGlobalVariable" request + And body from file "synthetics_global_variable_fido_payload.json" + When the request is sent + Then the response status is 200 OK + And the response "name" is equal to "GLOBAL_VARIABLE_FIDO_PAYLOAD_{{ unique_upper_alnum }}" + + @team:DataDog/synthetics-ct + Scenario: Create a TOTP global variable returns "OK" response + Given there is a valid "synthetics_api_test_multi_step" in the system + And new "CreateGlobalVariable" request + And body from file "synthetics_global_variable_totp_payload.json" + When the request is sent + Then the response status is 200 OK + And the response "name" is equal to "GLOBAL_VARIABLE_TOTP_PAYLOAD_{{ unique_upper_alnum }}" + @generated @skip @team:DataDog/synthetics-ct Scenario: Create a browser test returns "- JSON format is wrong" response Given new "CreateSyntheticsBrowserTest" request @@ -81,10 +99,10 @@ Feature: Synthetics Scenario: Create a global variable from test returns "OK" response Given there is a valid "synthetics_api_test_multi_step" in the system And new "CreateGlobalVariable" request - And body from file "synthetics_global_variable_payload.json" + And body from file "synthetics_global_variable_from_test_payload.json" When the request is sent Then the response status is 200 OK - And the response "name" is equal to "GLOBAL_VARIABLE_PAYLOAD_{{ unique_upper_alnum }}" + And the response "name" is equal to "GLOBAL_VARIABLE_FROM_TEST_PAYLOAD_{{ unique_upper_alnum }}" @generated @skip @team:DataDog/synthetics-ct Scenario: Create a global variable returns "Conflict" response diff --git a/features/v1/synthetics_global_variable_fido_payload.json b/features/v1/synthetics_global_variable_fido_payload.json new file mode 100644 index 000000000000..178a92ecfa07 --- /dev/null +++ b/features/v1/synthetics_global_variable_fido_payload.json @@ -0,0 +1,6 @@ +{ + "description": "", + "is_fido": true, + "name": "GLOBAL_VARIABLE_FIDO_PAYLOAD_{{ unique_upper_alnum }}", + "tags": [] +} diff --git a/features/v1/synthetics_global_variable_from_test_payload.json b/features/v1/synthetics_global_variable_from_test_payload.json new file mode 100644 index 000000000000..7dd784d84fc6 --- /dev/null +++ b/features/v1/synthetics_global_variable_from_test_payload.json @@ -0,0 +1,14 @@ +{ + "description": "", + "name": "GLOBAL_VARIABLE_FROM_TEST_PAYLOAD_{{ unique_upper_alnum }}", + "tags": [], + "value": { + "secure": false, + "value": "" + }, + "parse_test_public_id": "{{ synthetics_api_test_multi_step.public_id }}", + "parse_test_options": { + "type": "local_variable", + "localVariableName": "EXTRACTED_VALUE" + } +} diff --git a/features/v1/synthetics_global_variable_payload.json b/features/v1/synthetics_global_variable_payload.json index f9ff937abc1e..46fc52c7145c 100644 --- a/features/v1/synthetics_global_variable_payload.json +++ b/features/v1/synthetics_global_variable_payload.json @@ -4,17 +4,6 @@ "tags": [], "value": { "secure": false, - "value": "", - "options": { - "totp_parameters": { - "digits": 6, - "refresh_interval": 30 - } - } - }, - "parse_test_public_id": "{{ synthetics_api_test_multi_step.public_id }}", - "parse_test_options": { - "type": "local_variable", - "localVariableName": "EXTRACTED_VALUE" + "value": "" } } diff --git a/features/v1/synthetics_global_variable_totp_payload.json b/features/v1/synthetics_global_variable_totp_payload.json new file mode 100644 index 000000000000..b1d5e7f0eea2 --- /dev/null +++ b/features/v1/synthetics_global_variable_totp_payload.json @@ -0,0 +1,16 @@ +{ + "description": "", + "is_totp": true, + "name": "GLOBAL_VARIABLE_TOTP_PAYLOAD_{{ unique_upper_alnum }}", + "tags": [], + "value": { + "secure": false, + "value": "", + "options": { + "totp_parameters": { + "digits": 6, + "refresh_interval": 30 + } + } + } +} diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index f2e67ccd77ef..ef633a023899 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -625,6 +625,7 @@ def overrides "v1.synthetics_global_variable_parser_type" => "SyntheticsGlobalVariableParserType", "v1.synthetics_global_variable_parse_test_options" => "SyntheticsGlobalVariableParseTestOptions", "v1.synthetics_global_variable_parse_test_options_type" => "SyntheticsGlobalVariableParseTestOptionsType", + "v1.synthetics_global_variable_request" => "SyntheticsGlobalVariableRequest", "v1.synthetics_global_variable_totp_parameters" => "SyntheticsGlobalVariableTOTPParameters", "v1.synthetics_global_variable_value" => "SyntheticsGlobalVariableValue", "v1.synthetics_list_global_variables_response" => "SyntheticsListGlobalVariablesResponse", diff --git a/lib/datadog_api_client/v1/api/synthetics_api.rb b/lib/datadog_api_client/v1/api/synthetics_api.rb index 3f7cb691ae75..d77deee0e8ac 100644 --- a/lib/datadog_api_client/v1/api/synthetics_api.rb +++ b/lib/datadog_api_client/v1/api/synthetics_api.rb @@ -35,7 +35,7 @@ def create_global_variable(body, opts = {}) # # Create a Synthetic global variable. # - # @param body [SyntheticsGlobalVariable] Details of the global variable to create. + # @param body [SyntheticsGlobalVariableRequest] Details of the global variable to create. # @param opts [Hash] the optional parameters # @return [Array<(SyntheticsGlobalVariable, Integer, Hash)>] SyntheticsGlobalVariable data, response status code and response headers def create_global_variable_with_http_info(body, opts = {}) @@ -501,7 +501,7 @@ def edit_global_variable(variable_id, body, opts = {}) # Edit a Synthetic global variable. # # @param variable_id [String] The ID of the global variable. - # @param body [SyntheticsGlobalVariable] Details of the global variable to update. + # @param body [SyntheticsGlobalVariableRequest] Details of the global variable to update. # @param opts [Hash] the optional parameters # @return [Array<(SyntheticsGlobalVariable, Integer, Hash)>] SyntheticsGlobalVariable data, response status code and response headers def edit_global_variable_with_http_info(variable_id, body, opts = {}) diff --git a/lib/datadog_api_client/v1/models/synthetics_global_variable.rb b/lib/datadog_api_client/v1/models/synthetics_global_variable.rb index 59cc1e17fe77..59fe1f46d5cf 100644 --- a/lib/datadog_api_client/v1/models/synthetics_global_variable.rb +++ b/lib/datadog_api_client/v1/models/synthetics_global_variable.rb @@ -30,6 +30,12 @@ class SyntheticsGlobalVariable # Unique identifier of the global variable. attr_accessor :id + # Determines if the global variable is a FIDO variable. + attr_accessor :is_fido + + # Determines if the global variable is a TOTP/MFA variable. + attr_accessor :is_totp + # Name of the global variable. Unique across Synthetic global variables. attr_reader :name @@ -52,6 +58,8 @@ def self.attribute_map :'attributes' => :'attributes', :'description' => :'description', :'id' => :'id', + :'is_fido' => :'is_fido', + :'is_totp' => :'is_totp', :'name' => :'name', :'parse_test_options' => :'parse_test_options', :'parse_test_public_id' => :'parse_test_public_id', @@ -67,6 +75,8 @@ def self.openapi_types :'attributes' => :'SyntheticsGlobalVariableAttributes', :'description' => :'String', :'id' => :'String', + :'is_fido' => :'Boolean', + :'is_totp' => :'Boolean', :'name' => :'String', :'parse_test_options' => :'SyntheticsGlobalVariableParseTestOptions', :'parse_test_public_id' => :'String', @@ -103,6 +113,14 @@ def initialize(attributes = {}) self.id = attributes[:'id'] end + if attributes.key?(:'is_fido') + self.is_fido = attributes[:'is_fido'] + end + + if attributes.key?(:'is_totp') + self.is_totp = attributes[:'is_totp'] + end + if attributes.key?(:'name') self.name = attributes[:'name'] end @@ -186,6 +204,8 @@ def ==(o) attributes == o.attributes && description == o.description && id == o.id && + is_fido == o.is_fido && + is_totp == o.is_totp && name == o.name && parse_test_options == o.parse_test_options && parse_test_public_id == o.parse_test_public_id && @@ -197,7 +217,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [attributes, description, id, name, parse_test_options, parse_test_public_id, tags, value].hash + [attributes, description, id, is_fido, is_totp, name, parse_test_options, parse_test_public_id, tags, value].hash end end end diff --git a/lib/datadog_api_client/v1/models/synthetics_global_variable_request.rb b/lib/datadog_api_client/v1/models/synthetics_global_variable_request.rb new file mode 100644 index 000000000000..e3c35aecfef6 --- /dev/null +++ b/lib/datadog_api_client/v1/models/synthetics_global_variable_request.rb @@ -0,0 +1,212 @@ +=begin +#Datadog API V1 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::V1 + # Details of the global variable to create. + class SyntheticsGlobalVariableRequest + include BaseGenericModel + + # Attributes of the global variable. + attr_accessor :attributes + + # Description of the global variable. + attr_reader :description + + # Unique identifier of the global variable. + attr_accessor :id + + # Determines if the global variable is a FIDO variable. + attr_accessor :is_fido + + # Determines if the global variable is a TOTP/MFA variable. + attr_accessor :is_totp + + # Name of the global variable. Unique across Synthetic global variables. + attr_reader :name + + # Parser options to use for retrieving a Synthetic global variable from a Synthetic test. Used in conjunction with `parse_test_public_id`. + attr_accessor :parse_test_options + + # A Synthetic test ID to use as a test to generate the variable value. + attr_accessor :parse_test_public_id + + # Tags of the global variable. + attr_reader :tags + + # Value of the global variable. + attr_accessor :value + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'description' => :'description', + :'id' => :'id', + :'is_fido' => :'is_fido', + :'is_totp' => :'is_totp', + :'name' => :'name', + :'parse_test_options' => :'parse_test_options', + :'parse_test_public_id' => :'parse_test_public_id', + :'tags' => :'tags', + :'value' => :'value' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'SyntheticsGlobalVariableAttributes', + :'description' => :'String', + :'id' => :'String', + :'is_fido' => :'Boolean', + :'is_totp' => :'Boolean', + :'name' => :'String', + :'parse_test_options' => :'SyntheticsGlobalVariableParseTestOptions', + :'parse_test_public_id' => :'String', + :'tags' => :'Array', + :'value' => :'SyntheticsGlobalVariableValue' + } + 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::V1::SyntheticsGlobalVariableRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::SyntheticsGlobalVariableRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'is_fido') + self.is_fido = attributes[:'is_fido'] + end + + if attributes.key?(:'is_totp') + self.is_totp = attributes[:'is_totp'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'parse_test_options') + self.parse_test_options = attributes[:'parse_test_options'] + end + + if attributes.key?(:'parse_test_public_id') + self.parse_test_public_id = attributes[:'parse_test_public_id'] + end + + if attributes.key?(:'tags') + if (value = attributes[:'tags']).is_a?(Array) + self.tags = value + end + end + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @description.nil? + return false if @name.nil? + return false if @tags.nil? + true + end + + # Custom attribute writer method with validation + # @param description [Object] Object to be assigned + # @!visibility private + def description=(description) + if description.nil? + fail ArgumentError, 'invalid value for "description", description cannot be nil.' + end + @description = description + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Custom attribute writer method with validation + # @param tags [Object] Object to be assigned + # @!visibility private + def tags=(tags) + if tags.nil? + fail ArgumentError, 'invalid value for "tags", tags cannot be nil.' + end + @tags = tags + 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 && + description == o.description && + id == o.id && + is_fido == o.is_fido && + is_totp == o.is_totp && + name == o.name && + parse_test_options == o.parse_test_options && + parse_test_public_id == o.parse_test_public_id && + tags == o.tags && + value == o.value + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, description, id, is_fido, is_totp, name, parse_test_options, parse_test_public_id, tags, value].hash + end + end +end