From 0b0da64d5d1f0f3dee022aa4c9237434556edf90 Mon Sep 17 00:00:00 2001
From: "ci.datadog-api-spec" <packages@datadoghq.com>
Date: Fri, 18 Jun 2021 14:28:16 +0000
Subject: [PATCH] Regenerate client from commit 8327a94 of spec repo

---
 .apigentools-info                                   |  8 ++++----
 api/v1/datadog/api/openapi.yaml                     |  7 ++++---
 .../docs/SyntheticsAssertionJSONPathTargetTarget.md | 10 ++++++++++
 ..._synthetics_assertion_json_path_target_target.go | 13 +++++++------
 tests/api/v1/datadog/features/synthetics.feature    |  3 +--
 tests/api/v1/datadog/features/undo.json             |  9 +++++++--
 6 files changed, 33 insertions(+), 17 deletions(-)

diff --git a/.apigentools-info b/.apigentools-info
index 13e531a5825..852d83d3729 100644
--- a/.apigentools-info
+++ b/.apigentools-info
@@ -4,13 +4,13 @@
     "spec_versions": {
         "v1": {
             "apigentools_version": "1.4.1.dev8",
-            "regenerated": "2021-06-17 15:08:44.608594",
-            "spec_repo_commit": "7f25c3e"
+            "regenerated": "2021-06-18 14:27:49.509331",
+            "spec_repo_commit": "8327a94"
         },
         "v2": {
             "apigentools_version": "1.4.1.dev8",
-            "regenerated": "2021-06-17 15:09:20.119232",
-            "spec_repo_commit": "7f25c3e"
+            "regenerated": "2021-06-18 14:28:14.735591",
+            "spec_repo_commit": "8327a94"
         }
     }
 }
\ No newline at end of file
diff --git a/api/v1/datadog/api/openapi.yaml b/api/v1/datadog/api/openapi.yaml
index 2dc79c118ec..1bebf24e36b 100644
--- a/api/v1/datadog/api/openapi.yaml
+++ b/api/v1/datadog/api/openapi.yaml
@@ -6786,8 +6786,10 @@ paths:
       x-codegen-request-body-name: body
       x-menu-order: 1
       x-undo:
-        operationId: TODO
-        parameters: []
+        operationId: DeleteTests
+        parameters:
+        - name: body
+          template: '{"public_ids": ["{{ public_id }}"]}'
         type: unsafe
   /api/v1/synthetics/tests/api/{public_id}:
     get:
@@ -29338,7 +29340,6 @@ components:
           type: string
         targetValue:
           description: The path target value to compare to.
-          type: object
       type: object
     SyntheticsBrowserTestResultFull_check:
       description: Object describing the browser test configuration.
diff --git a/api/v1/datadog/docs/SyntheticsAssertionJSONPathTargetTarget.md b/api/v1/datadog/docs/SyntheticsAssertionJSONPathTargetTarget.md
index c5bd3cb9153..e8e8ced5362 100644
--- a/api/v1/datadog/docs/SyntheticsAssertionJSONPathTargetTarget.md
+++ b/api/v1/datadog/docs/SyntheticsAssertionJSONPathTargetTarget.md
@@ -102,6 +102,16 @@ SetTargetValue sets TargetValue field to given value.
 
 HasTargetValue returns a boolean if a field has been set.
 
+### SetTargetValueNil
+
+`func (o *SyntheticsAssertionJSONPathTargetTarget) SetTargetValueNil(b bool)`
+
+ SetTargetValueNil sets the value for TargetValue to be an explicit nil
+
+### UnsetTargetValue
+`func (o *SyntheticsAssertionJSONPathTargetTarget) UnsetTargetValue()`
+
+UnsetTargetValue ensures that no value is present for TargetValue, not even an explicit nil
 
 [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
 
diff --git a/api/v1/datadog/model_synthetics_assertion_json_path_target_target.go b/api/v1/datadog/model_synthetics_assertion_json_path_target_target.go
index 6d45019958c..6e3bcd987aa 100644
--- a/api/v1/datadog/model_synthetics_assertion_json_path_target_target.go
+++ b/api/v1/datadog/model_synthetics_assertion_json_path_target_target.go
@@ -19,7 +19,7 @@ type SyntheticsAssertionJSONPathTargetTarget struct {
 	// The specific operator to use on the path.
 	Operator *string `json:"operator,omitempty"`
 	// The path target value to compare to.
-	TargetValue *interface{} `json:"targetValue,omitempty"`
+	TargetValue interface{} `json:"targetValue,omitempty"`
 }
 
 // NewSyntheticsAssertionJSONPathTargetTarget instantiates a new SyntheticsAssertionJSONPathTargetTarget object
@@ -103,22 +103,23 @@ func (o *SyntheticsAssertionJSONPathTargetTarget) SetOperator(v string) {
 	o.Operator = &v
 }
 
-// GetTargetValue returns the TargetValue field value if set, zero value otherwise.
+// GetTargetValue returns the TargetValue field value if set, zero value otherwise (both if not set or set to explicit null).
 func (o *SyntheticsAssertionJSONPathTargetTarget) GetTargetValue() interface{} {
-	if o == nil || o.TargetValue == nil {
+	if o == nil {
 		var ret interface{}
 		return ret
 	}
-	return *o.TargetValue
+	return o.TargetValue
 }
 
 // GetTargetValueOk returns a tuple with the TargetValue field value if set, nil otherwise
 // and a boolean to check if the value has been set.
+// NOTE: If the value is an explicit nil, `nil, true` will be returned
 func (o *SyntheticsAssertionJSONPathTargetTarget) GetTargetValueOk() (*interface{}, bool) {
 	if o == nil || o.TargetValue == nil {
 		return nil, false
 	}
-	return o.TargetValue, true
+	return &o.TargetValue, true
 }
 
 // HasTargetValue returns a boolean if a field has been set.
@@ -132,7 +133,7 @@ func (o *SyntheticsAssertionJSONPathTargetTarget) HasTargetValue() bool {
 
 // SetTargetValue gets a reference to the given interface{} and assigns it to the TargetValue field.
 func (o *SyntheticsAssertionJSONPathTargetTarget) SetTargetValue(v interface{}) {
-	o.TargetValue = &v
+	o.TargetValue = v
 }
 
 func (o SyntheticsAssertionJSONPathTargetTarget) MarshalJSON() ([]byte, error) {
diff --git a/tests/api/v1/datadog/features/synthetics.feature b/tests/api/v1/datadog/features/synthetics.feature
index b0a3d391cbc..1d0646e7d18 100644
--- a/tests/api/v1/datadog/features/synthetics.feature
+++ b/tests/api/v1/datadog/features/synthetics.feature
@@ -78,10 +78,9 @@ Feature: Synthetics
     When the request is sent
     Then the response status is 400 - JSON format is wrong
 
-  @generated @skip
   Scenario: Create an API test returns "OK - Returns the created test details." response
     Given new "CreateSyntheticsAPITest" request
-    And body with value {"config": {"assertions": [], "configVariables": [{"example": null, "id": null, "name": "VARIABLE_NAME", "pattern": null, "type": "global"}], "request": {"basicAuth": {"password": "", "username": ""}, "body": null, "certificate": {"cert": {"content": null, "filename": null, "updatedAt": null}, "key": {"content": null, "filename": null, "updatedAt": null}}, "dnsServer": null, "dnsServerPort": null, "headers": null, "host": null, "method": "GET", "noSavingResponseBody": null, "numberOfPackets": null, "port": null, "query": null, "shouldTrackHops": null, "timeout": null, "url": null}, "steps": [{"allowFailure": null, "assertions": [], "extractedValues": [{"field": "content-type", "name": null, "parser": {"type": "regex", "value": ".*"}, "type": "http_body"}], "isCritical": null, "name": null, "request": {"basicAuth": {"password": "", "username": ""}, "body": null, "certificate": {"cert": {"content": null, "filename": null, "updatedAt": null}, "key": {"content": null, "filename": null, "updatedAt": null}}, "dnsServer": null, "dnsServerPort": null, "headers": null, "host": null, "method": "GET", "noSavingResponseBody": null, "numberOfPackets": null, "port": null, "query": null, "shouldTrackHops": null, "timeout": null, "url": null}, "subtype": "http"}]}, "locations": [null], "message": null, "name": null, "options": {"accept_self_signed": null, "allow_insecure": null, "device_ids": ["laptop_large"], "disableCors": null, "follow_redirects": null, "min_failure_duration": null, "min_location_failed": null, "monitor_name": null, "monitor_options": {"renotify_interval": null}, "monitor_priority": null, "noScreenshot": null, "retry": {"count": null, "interval": null}, "tick_every": 30}, "status": "live", "subtype": "http", "tags": [null], "type": "api"}
+    And body with value {"config":{"assertions":[{"operator":"contains","property":"content-type","target":"application/json","type":"header"},{"operator":"is","target":200,"type":"statusCode"},{"operator":"validatesJSONPath","target":{"jsonPath":"topKey","operator":"isNot","targetValue":"0"},"type":"body"},{"operator":"validatesJSONPath","target":{"jsonPath":"something","operator":"moreThan","targetValue":5},"type":"body"},{"operator":"isNot","target":200,"type":"statusCode"},{"operator":"matches","target":"20[04]","type":"statusCode"},{"operator":"doesNotMatch","target":"20[04]","type":"statusCode"}],"configVariables":[],"request":{"basicAuth":{"password":"secret","username":"admin"},"body":"this is a body","headers":{"Accept":"application/json"},"method":"GET","query":{"foo":"bar"},"timeout":30,"url":"https://www.datadoghq.com"}},"locations":["aws:eu-central-1"],"message":"Notify @datadog.user","name":"{{ unique }}","options":{"follow_redirects":true,"min_location_failed":1,"monitor_options":{"renotify_interval":100},"tick_every":60},"status":"paused","subtype":"http","tags":["foo:bar","baz"],"type":"api"}
     When the request is sent
     Then the response status is 200 OK - Returns the created test details.
 
diff --git a/tests/api/v1/datadog/features/undo.json b/tests/api/v1/datadog/features/undo.json
index d04b5a22a18..215091e7aef 100644
--- a/tests/api/v1/datadog/features/undo.json
+++ b/tests/api/v1/datadog/features/undo.json
@@ -894,8 +894,13 @@
   "CreateSyntheticsAPITest": {
     "tag": "Synthetics",
     "undo": {
-      "operationId": "TODO",
-      "parameters": [],
+      "operationId": "DeleteTests",
+      "parameters": [
+        {
+          "name": "body",
+          "template": "{\"public_ids\": [\"{{ public_id }}\"]}"
+        }
+      ],
       "type": "unsafe"
     }
   },