Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.5",
"regenerated": "2023-09-12 17:52:29.472289",
"spec_repo_commit": "752c972d"
"regenerated": "2023-09-12 20:28:43.501384",
"spec_repo_commit": "bc2ae18f"
},
"v2": {
"apigentools_version": "1.6.5",
"regenerated": "2023-09-12 17:52:29.486653",
"spec_repo_commit": "752c972d"
"regenerated": "2023-09-12 20:28:43.526128",
"spec_repo_commit": "bc2ae18f"
}
}
}
11 changes: 11 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12575,13 +12575,24 @@ components:
target:
description: Value used by the operator.
example: 123456
timingsScope:
$ref: '#/components/schemas/SyntheticsAssertionTimingsScope'
type:
$ref: '#/components/schemas/SyntheticsAssertionType'
required:
- type
- operator
- target
type: object
SyntheticsAssertionTimingsScope:
description: Timings scope for response time assertions.
enum:
- all
- withoutDNS
type: string
x-enum-varnames:
- ALL
- WITHOUT_DNS
SyntheticsAssertionType:
description: Type of the assertion.
enum:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import com.datadog.api.client.v1.model.SyntheticsAssertionJSONPathTargetTarget;
import com.datadog.api.client.v1.model.SyntheticsAssertionOperator;
import com.datadog.api.client.v1.model.SyntheticsAssertionTarget;
import com.datadog.api.client.v1.model.SyntheticsAssertionTimingsScope;
import com.datadog.api.client.v1.model.SyntheticsAssertionType;
import com.datadog.api.client.v1.model.SyntheticsAssertionXPathOperator;
import com.datadog.api.client.v1.model.SyntheticsAssertionXPathTarget;
Expand Down Expand Up @@ -55,7 +56,8 @@ public static void main(String[] args) {
new SyntheticsAssertionTarget()
.operator(SyntheticsAssertionOperator.LESS_THAN)
.target(2000)
.type(SyntheticsAssertionType.RESPONSE_TIME)),
.type(SyntheticsAssertionType.RESPONSE_TIME)
.timingsScope(SyntheticsAssertionTimingsScope.WITHOUT_DNS)),
new SyntheticsAssertion(
new SyntheticsAssertionJSONPathTarget()
.operator(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
SyntheticsAssertionTarget.JSON_PROPERTY_OPERATOR,
SyntheticsAssertionTarget.JSON_PROPERTY_PROPERTY,
SyntheticsAssertionTarget.JSON_PROPERTY_TARGET,
SyntheticsAssertionTarget.JSON_PROPERTY_TIMINGS_SCOPE,
SyntheticsAssertionTarget.JSON_PROPERTY_TYPE
})
@jakarta.annotation.Generated(
Expand All @@ -37,6 +38,9 @@ public class SyntheticsAssertionTarget {
public static final String JSON_PROPERTY_TARGET = "target";
private Object target = new Object();

public static final String JSON_PROPERTY_TIMINGS_SCOPE = "timingsScope";
private SyntheticsAssertionTimingsScope timingsScope;

public static final String JSON_PROPERTY_TYPE = "type";
private SyntheticsAssertionType type;

Expand Down Expand Up @@ -120,6 +124,31 @@ public void setTarget(Object target) {
this.target = target;
}

public SyntheticsAssertionTarget timingsScope(SyntheticsAssertionTimingsScope timingsScope) {
this.timingsScope = timingsScope;
this.unparsed |= !timingsScope.isValid();
return this;
}

/**
* Timings scope for response time assertions.
*
* @return timingsScope
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_TIMINGS_SCOPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public SyntheticsAssertionTimingsScope getTimingsScope() {
return timingsScope;
}

public void setTimingsScope(SyntheticsAssertionTimingsScope timingsScope) {
if (!timingsScope.isValid()) {
this.unparsed = true;
}
this.timingsScope = timingsScope;
}

public SyntheticsAssertionTarget type(SyntheticsAssertionType type) {
this.type = type;
this.unparsed |= !type.isValid();
Expand Down Expand Up @@ -203,14 +232,15 @@ public boolean equals(Object o) {
return Objects.equals(this.operator, syntheticsAssertionTarget.operator)
&& Objects.equals(this.property, syntheticsAssertionTarget.property)
&& Objects.equals(this.target, syntheticsAssertionTarget.target)
&& Objects.equals(this.timingsScope, syntheticsAssertionTarget.timingsScope)
&& Objects.equals(this.type, syntheticsAssertionTarget.type)
&& Objects.equals(
this.additionalProperties, syntheticsAssertionTarget.additionalProperties);
}

@Override
public int hashCode() {
return Objects.hash(operator, property, target, type, additionalProperties);
return Objects.hash(operator, property, target, timingsScope, type, additionalProperties);
}

@Override
Expand All @@ -220,6 +250,7 @@ public String toString() {
sb.append(" operator: ").append(toIndentedString(operator)).append("\n");
sb.append(" property: ").append(toIndentedString(property)).append("\n");
sb.append(" target: ").append(toIndentedString(target)).append("\n");
sb.append(" timingsScope: ").append(toIndentedString(timingsScope)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" additionalProperties: ")
.append(toIndentedString(additionalProperties))
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/*
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
* This product includes software developed at Datadog (https://www.datadoghq.com/).
* Copyright 2019-Present Datadog, Inc.
*/

package com.datadog.api.client.v1.model;

import com.datadog.api.client.ModelEnum;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
import java.io.IOException;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;

/** Timings scope for response time assertions. */
@JsonSerialize(
using = SyntheticsAssertionTimingsScope.SyntheticsAssertionTimingsScopeSerializer.class)
public class SyntheticsAssertionTimingsScope extends ModelEnum<String> {

private static final Set<String> allowedValues =
new HashSet<String>(Arrays.asList("all", "withoutDNS"));

public static final SyntheticsAssertionTimingsScope ALL =
new SyntheticsAssertionTimingsScope("all");
public static final SyntheticsAssertionTimingsScope WITHOUT_DNS =
new SyntheticsAssertionTimingsScope("withoutDNS");

SyntheticsAssertionTimingsScope(String value) {
super(value, allowedValues);
}

public static class SyntheticsAssertionTimingsScopeSerializer
extends StdSerializer<SyntheticsAssertionTimingsScope> {
public SyntheticsAssertionTimingsScopeSerializer(Class<SyntheticsAssertionTimingsScope> t) {
super(t);
}

public SyntheticsAssertionTimingsScopeSerializer() {
this(null);
}

@Override
public void serialize(
SyntheticsAssertionTimingsScope value, JsonGenerator jgen, SerializerProvider provider)
throws IOException, JsonProcessingException {
jgen.writeObject(value.value);
}
}

@JsonCreator
public static SyntheticsAssertionTimingsScope fromValue(String value) {
return new SyntheticsAssertionTimingsScope(value);
}
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2023-08-11T15:25:10.265Z
2023-09-11T14:49:13.966Z
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"httpRequest": {
"body": {
"type": "JSON",
"json": "{\"config\":{\"assertions\":[{\"operator\":\"is\",\"property\":\"{{ PROPERTY }}\",\"target\":\"text/html\",\"type\":\"header\"},{\"operator\":\"lessThan\",\"target\":2000,\"type\":\"responseTime\"},{\"operator\":\"validatesJSONPath\",\"target\":{\"jsonPath\":\"topKey\",\"operator\":\"isNot\",\"targetValue\":\"0\"},\"type\":\"body\"},{\"operator\":\"validatesXPath\",\"target\":{\"operator\":\"contains\",\"targetValue\":\"0\",\"xPath\":\"target-xpath\"},\"type\":\"body\"}],\"configVariables\":[{\"example\":\"content-type\",\"name\":\"PROPERTY\",\"pattern\":\"content-type\",\"type\":\"text\"}],\"request\":{\"basicAuth\":{\"accessTokenUrl\":\"https://datadog-token.com\",\"audience\":\"audience\",\"clientId\":\"client-id\",\"clientSecret\":\"client-secret\",\"resource\":\"resource\",\"scope\":\"yoyo\",\"tokenApiAuthentication\":\"header\",\"type\":\"oauth-client\"},\"certificate\":{\"cert\":{\"content\":\"cert-content\",\"filename\":\"cert-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"},\"key\":{\"content\":\"key-content\",\"filename\":\"key-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"}},\"headers\":{\"unique\":\"testcreateanapihttptestreturnsokreturnsthecreatedtestdetailsresponse1691767510\"},\"method\":\"GET\",\"persistCookies\":true,\"proxy\":{\"headers\":{},\"url\":\"https://datadoghq.com\"},\"timeout\":10,\"url\":\"https://datadoghq.com\"}},\"locations\":[\"aws:us-east-2\"],\"message\":\"BDD test payload: synthetics_api_http_test_payload.json\",\"name\":\"Test-Create_an_API_HTTP_test_returns_OK_Returns_the_created_test_details_response-1691767510\",\"options\":{\"accept_self_signed\":false,\"allow_insecure\":true,\"follow_redirects\":true,\"httpVersion\":\"http2\",\"min_failure_duration\":10,\"min_location_failed\":1,\"monitor_name\":\"Test-Create_an_API_HTTP_test_returns_OK_Returns_the_created_test_details_response-1691767510\",\"monitor_priority\":5,\"retry\":{\"count\":3,\"interval\":10},\"tick_every\":60},\"subtype\":\"http\",\"tags\":[\"testing:api\"],\"type\":\"api\"}"
"json": "{\"config\":{\"assertions\":[{\"operator\":\"is\",\"property\":\"{{ PROPERTY }}\",\"target\":\"text/html\",\"type\":\"header\"},{\"operator\":\"lessThan\",\"target\":2000,\"timingsScope\":\"withoutDNS\",\"type\":\"responseTime\"},{\"operator\":\"validatesJSONPath\",\"target\":{\"jsonPath\":\"topKey\",\"operator\":\"isNot\",\"targetValue\":\"0\"},\"type\":\"body\"},{\"operator\":\"validatesXPath\",\"target\":{\"operator\":\"contains\",\"targetValue\":\"0\",\"xPath\":\"target-xpath\"},\"type\":\"body\"}],\"configVariables\":[{\"example\":\"content-type\",\"name\":\"PROPERTY\",\"pattern\":\"content-type\",\"type\":\"text\"}],\"request\":{\"basicAuth\":{\"accessTokenUrl\":\"https://datadog-token.com\",\"audience\":\"audience\",\"clientId\":\"client-id\",\"clientSecret\":\"client-secret\",\"resource\":\"resource\",\"scope\":\"yoyo\",\"tokenApiAuthentication\":\"header\",\"type\":\"oauth-client\"},\"certificate\":{\"cert\":{\"content\":\"cert-content\",\"filename\":\"cert-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"},\"key\":{\"content\":\"key-content\",\"filename\":\"key-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"}},\"headers\":{\"unique\":\"testcreateanapihttptestreturnsokreturnsthecreatedtestdetailsresponse1694443753\"},\"method\":\"GET\",\"persistCookies\":true,\"proxy\":{\"headers\":{},\"url\":\"https://datadoghq.com\"},\"timeout\":10,\"url\":\"https://datadoghq.com\"}},\"locations\":[\"aws:us-east-2\"],\"message\":\"BDD test payload: synthetics_api_http_test_payload.json\",\"name\":\"Test-Create_an_API_HTTP_test_returns_OK_Returns_the_created_test_details_response-1694443753\",\"options\":{\"accept_self_signed\":false,\"allow_insecure\":true,\"follow_redirects\":true,\"httpVersion\":\"http2\",\"min_failure_duration\":10,\"min_location_failed\":1,\"monitor_name\":\"Test-Create_an_API_HTTP_test_returns_OK_Returns_the_created_test_details_response-1694443753\",\"monitor_priority\":5,\"retry\":{\"count\":3,\"interval\":10},\"tick_every\":60},\"subtype\":\"http\",\"tags\":[\"testing:api\"],\"type\":\"api\"}"
},
"headers": {},
"method": "POST",
Expand All @@ -12,7 +12,7 @@
"secure": true
},
"httpResponse": {
"body": "{\"public_id\":\"p5t-6vv-3xj\",\"name\":\"Test-Create_an_API_HTTP_test_returns_OK_Returns_the_created_test_details_response-1691767510\",\"status\":\"live\",\"type\":\"api\",\"tags\":[\"testing:api\"],\"created_at\":\"2023-08-11T15:25:10.474768+00:00\",\"modified_at\":\"2023-08-11T15:25:10.474768+00:00\",\"config\":{\"assertions\":[{\"operator\":\"is\",\"property\":\"{{ PROPERTY }}\",\"target\":\"text/html\",\"type\":\"header\"},{\"operator\":\"lessThan\",\"target\":2000,\"type\":\"responseTime\"},{\"operator\":\"validatesJSONPath\",\"target\":{\"jsonPath\":\"topKey\",\"operator\":\"isNot\",\"targetValue\":\"0\"},\"type\":\"body\"},{\"operator\":\"validatesXPath\",\"target\":{\"operator\":\"contains\",\"targetValue\":\"0\",\"xPath\":\"target-xpath\"},\"type\":\"body\"}],\"configVariables\":[{\"example\":\"content-type\",\"name\":\"PROPERTY\",\"pattern\":\"content-type\",\"type\":\"text\"}],\"request\":{\"basicAuth\":{\"accessTokenUrl\":\"https://datadog-token.com\",\"audience\":\"audience\",\"clientId\":\"client-id\",\"clientSecret\":\"client-secret\",\"resource\":\"resource\",\"scope\":\"yoyo\",\"tokenApiAuthentication\":\"header\",\"type\":\"oauth-client\"},\"certificate\":{\"cert\":{\"filename\":\"cert-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"},\"key\":{\"filename\":\"key-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"}},\"headers\":{\"unique\":\"testcreateanapihttptestreturnsokreturnsthecreatedtestdetailsresponse1691767510\"},\"method\":\"GET\",\"persistCookies\":true,\"proxy\":{\"headers\":{},\"url\":\"https://datadoghq.com\"},\"timeout\":10,\"url\":\"https://datadoghq.com\"}},\"message\":\"BDD test payload: synthetics_api_http_test_payload.json\",\"options\":{\"accept_self_signed\":false,\"allow_insecure\":true,\"follow_redirects\":true,\"httpVersion\":\"http2\",\"min_failure_duration\":10,\"min_location_failed\":1,\"monitor_name\":\"Test-Create_an_API_HTTP_test_returns_OK_Returns_the_created_test_details_response-1691767510\",\"monitor_priority\":5,\"retry\":{\"count\":3,\"interval\":10},\"tick_every\":60},\"locations\":[\"aws:us-east-2\"],\"subtype\":\"http\",\"created_by\":{\"name\":null,\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\"},\"deleted_at\":null,\"monitor_id\":128997418,\"org_id\":321813,\"modified_by\":{\"name\":null,\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\"}}",
"body": "{\"public_id\":\"459-yrn-6c6\",\"name\":\"Test-Create_an_API_HTTP_test_returns_OK_Returns_the_created_test_details_response-1694443753\",\"status\":\"live\",\"type\":\"api\",\"tags\":[\"testing:api\"],\"created_at\":\"2023-09-11T14:49:14.209609+00:00\",\"modified_at\":\"2023-09-11T14:49:14.209609+00:00\",\"config\":{\"assertions\":[{\"operator\":\"is\",\"property\":\"{{ PROPERTY }}\",\"target\":\"text/html\",\"type\":\"header\"},{\"operator\":\"lessThan\",\"target\":2000,\"timingsScope\":\"withoutDNS\",\"type\":\"responseTime\"},{\"operator\":\"validatesJSONPath\",\"target\":{\"jsonPath\":\"topKey\",\"operator\":\"isNot\",\"targetValue\":\"0\"},\"type\":\"body\"},{\"operator\":\"validatesXPath\",\"target\":{\"operator\":\"contains\",\"targetValue\":\"0\",\"xPath\":\"target-xpath\"},\"type\":\"body\"}],\"configVariables\":[{\"example\":\"content-type\",\"name\":\"PROPERTY\",\"pattern\":\"content-type\",\"type\":\"text\"}],\"request\":{\"basicAuth\":{\"accessTokenUrl\":\"https://datadog-token.com\",\"audience\":\"audience\",\"clientId\":\"client-id\",\"clientSecret\":\"client-secret\",\"resource\":\"resource\",\"scope\":\"yoyo\",\"tokenApiAuthentication\":\"header\",\"type\":\"oauth-client\"},\"certificate\":{\"cert\":{\"filename\":\"cert-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"},\"key\":{\"filename\":\"key-filename\",\"updatedAt\":\"2020-10-16T09:23:24.857Z\"}},\"headers\":{\"unique\":\"testcreateanapihttptestreturnsokreturnsthecreatedtestdetailsresponse1694443753\"},\"method\":\"GET\",\"persistCookies\":true,\"proxy\":{\"headers\":{},\"url\":\"https://datadoghq.com\"},\"timeout\":10,\"url\":\"https://datadoghq.com\"}},\"message\":\"BDD test payload: synthetics_api_http_test_payload.json\",\"options\":{\"accept_self_signed\":false,\"allow_insecure\":true,\"follow_redirects\":true,\"httpVersion\":\"http2\",\"min_failure_duration\":10,\"min_location_failed\":1,\"monitor_name\":\"Test-Create_an_API_HTTP_test_returns_OK_Returns_the_created_test_details_response-1694443753\",\"monitor_priority\":5,\"retry\":{\"count\":3,\"interval\":10},\"tick_every\":60},\"locations\":[\"aws:us-east-2\"],\"subtype\":\"http\",\"created_by\":{\"name\":null,\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\"},\"deleted_at\":null,\"monitor_id\":131183718,\"org_id\":321813,\"modified_by\":{\"name\":null,\"handle\":\"frog@datadoghq.com\",\"email\":\"frog@datadoghq.com\"}}",
"headers": {
"Content-Type": [
"application/json"
Expand All @@ -27,13 +27,13 @@
"timeToLive": {
"unlimited": true
},
"id": "1fdc9975-447f-f41d-6d73-f0f1b22d5624"
"id": "cacc1d85-6fcf-9e85-4bf3-415994be7df3"
},
{
"httpRequest": {
"body": {
"type": "JSON",
"json": "{\"public_ids\":[\"p5t-6vv-3xj\"]}"
"json": "{\"public_ids\":[\"459-yrn-6c6\"]}"
},
"headers": {},
"method": "POST",
Expand All @@ -42,7 +42,7 @@
"secure": true
},
"httpResponse": {
"body": "{\"deleted_tests\":[{\"public_id\":\"p5t-6vv-3xj\",\"deleted_at\":\"2023-08-11T15:25:10.679107+00:00\"}]}\n",
"body": "{\"deleted_tests\":[{\"public_id\":\"459-yrn-6c6\",\"deleted_at\":\"2023-09-11T14:49:16.625763+00:00\"}]}\n",
"headers": {
"Content-Type": [
"application/json"
Expand All @@ -57,6 +57,6 @@
"timeToLive": {
"unlimited": true
},
"id": "c8cbc8b1-1c92-7cd5-0f9e-c0ffc04fcc70"
"id": "c792a392-fcf1-e069-c4ba-1f8c701deedd"
}
]
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2023-08-11T15:25:10.775Z
2023-09-11T14:49:16.770Z
Loading