Skip to content

Commit ace5edf

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit fc469c89 of spec repo
1 parent fb200f7 commit ace5edf

7 files changed

+116
-21
lines changed

.apigentools-info

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2024-08-16 13:40:34.107043",
8-
"spec_repo_commit": "1b56c3ba"
7+
"regenerated": "2024-08-16 18:57:12.317764",
8+
"spec_repo_commit": "fc469c89"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-08-16 13:40:34.125185",
13-
"spec_repo_commit": "1b56c3ba"
12+
"regenerated": "2024-08-16 18:57:12.336118",
13+
"spec_repo_commit": "fc469c89"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

+24-6
Original file line numberDiff line numberDiff line change
@@ -15212,17 +15212,18 @@ components:
1521215212
- type
1521315213
type: object
1521415214
SyntheticsGlobalVariableParseTestOptionsType:
15215-
description: Property of the Synthetic Test Response to use for a Synthetic
15216-
global variable.
15215+
description: Type of value to extract from a test for a Synthetic global variable.
1521715216
enum:
1521815217
- http_body
1521915218
- http_header
15219+
- http_status_code
1522015220
- local_variable
1522115221
example: http_body
1522215222
type: string
1522315223
x-enum-varnames:
1522415224
- HTTP_BODY
1522515225
- HTTP_HEADER
15226+
- HTTP_STATUS_CODE
1522615227
- LOCAL_VARIABLE
1522715228
SyntheticsGlobalVariableParserType:
1522815229
description: Type of parser for a Synthetic global variable from a synthetics
@@ -15341,6 +15342,23 @@ components:
1534115342
$ref: '#/components/schemas/SyntheticsTestDetails'
1534215343
type: array
1534315344
type: object
15345+
SyntheticsLocalVariableParsingOptionsType:
15346+
description: Property of the Synthetic Test Response to extract into a local
15347+
variable.
15348+
enum:
15349+
- grpc_message
15350+
- grpc_metadata
15351+
- http_body
15352+
- http_header
15353+
- http_status_code
15354+
example: http_body
15355+
type: string
15356+
x-enum-varnames:
15357+
- GRPC_MESSAGE
15358+
- GRPC_METADATA
15359+
- HTTP_BODY
15360+
- HTTP_HEADER
15361+
- HTTP_STATUS_CODE
1534415362
SyntheticsLocation:
1534515363
description: 'Synthetic location that can be used when creating or editing a
1534615364

@@ -15367,8 +15385,8 @@ components:
1536715385
example: {}
1536815386
properties:
1536915387
field:
15370-
description: When type is `http_header`, name of the header to use to extract
15371-
the value.
15388+
description: When type is `http_header` or `grpc_metadata`, name of the
15389+
header or metadatum to extract.
1537215390
example: content-type
1537315391
type: string
1537415392
name:
@@ -15380,7 +15398,7 @@ components:
1538015398
description: Determines whether or not the extracted value will be obfuscated.
1538115399
type: boolean
1538215400
type:
15383-
$ref: '#/components/schemas/SyntheticsGlobalVariableParseTestOptionsType'
15401+
$ref: '#/components/schemas/SyntheticsLocalVariableParsingOptionsType'
1538415402
type: object
1538515403
SyntheticsPatchTestBody:
1538615404
description: Wrapper around an array of [JSON Patch](https://jsonpatch.com)
@@ -15955,7 +15973,7 @@ components:
1595515973
type: object
1595615974
SyntheticsTestMetadata:
1595715975
additionalProperties:
15958-
description: A single Metadatum.
15976+
description: A single metadatum.
1595915977
type: string
1596015978
description: Metadata to include when performing the gRPC test.
1596115979
type: object

examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
import com.datadog.api.client.v1.model.SyntheticsAssertionType;
1818
import com.datadog.api.client.v1.model.SyntheticsConfigVariable;
1919
import com.datadog.api.client.v1.model.SyntheticsConfigVariableType;
20-
import com.datadog.api.client.v1.model.SyntheticsGlobalVariableParseTestOptionsType;
2120
import com.datadog.api.client.v1.model.SyntheticsGlobalVariableParserType;
21+
import com.datadog.api.client.v1.model.SyntheticsLocalVariableParsingOptionsType;
2222
import com.datadog.api.client.v1.model.SyntheticsParsingOptions;
2323
import com.datadog.api.client.v1.model.SyntheticsTestCallType;
2424
import com.datadog.api.client.v1.model.SyntheticsTestDetailsSubType;
@@ -69,7 +69,7 @@ public static void main(String[] args) {
6969
.type(
7070
SyntheticsGlobalVariableParserType.RAW))
7171
.type(
72-
SyntheticsGlobalVariableParseTestOptionsType
72+
SyntheticsLocalVariableParsingOptionsType
7373
.HTTP_HEADER)
7474
.secure(true)))
7575
.isCritical(true)

src/main/java/com/datadog/api/client/v1/model/SyntheticsGlobalVariableParseTestOptions.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public SyntheticsGlobalVariableParseTestOptions type(
126126
}
127127

128128
/**
129-
* Property of the Synthetic Test Response to use for a Synthetic global variable.
129+
* Type of value to extract from a test for a Synthetic global variable.
130130
*
131131
* @return type
132132
*/

src/main/java/com/datadog/api/client/v1/model/SyntheticsGlobalVariableParseTestOptionsType.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,23 @@
1818
import java.util.HashSet;
1919
import java.util.Set;
2020

21-
/** Property of the Synthetic Test Response to use for a Synthetic global variable. */
21+
/** Type of value to extract from a test for a Synthetic global variable. */
2222
@JsonSerialize(
2323
using =
2424
SyntheticsGlobalVariableParseTestOptionsType
2525
.SyntheticsGlobalVariableParseTestOptionsTypeSerializer.class)
2626
public class SyntheticsGlobalVariableParseTestOptionsType extends ModelEnum<String> {
2727

2828
private static final Set<String> allowedValues =
29-
new HashSet<String>(Arrays.asList("http_body", "http_header", "local_variable"));
29+
new HashSet<String>(
30+
Arrays.asList("http_body", "http_header", "http_status_code", "local_variable"));
3031

3132
public static final SyntheticsGlobalVariableParseTestOptionsType HTTP_BODY =
3233
new SyntheticsGlobalVariableParseTestOptionsType("http_body");
3334
public static final SyntheticsGlobalVariableParseTestOptionsType HTTP_HEADER =
3435
new SyntheticsGlobalVariableParseTestOptionsType("http_header");
36+
public static final SyntheticsGlobalVariableParseTestOptionsType HTTP_STATUS_CODE =
37+
new SyntheticsGlobalVariableParseTestOptionsType("http_status_code");
3538
public static final SyntheticsGlobalVariableParseTestOptionsType LOCAL_VARIABLE =
3639
new SyntheticsGlobalVariableParseTestOptionsType("local_variable");
3740

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
/*
2+
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
3+
* This product includes software developed at Datadog (https://www.datadoghq.com/).
4+
* Copyright 2019-Present Datadog, Inc.
5+
*/
6+
7+
package com.datadog.api.client.v1.model;
8+
9+
import com.datadog.api.client.ModelEnum;
10+
import com.fasterxml.jackson.annotation.JsonCreator;
11+
import com.fasterxml.jackson.core.JsonGenerator;
12+
import com.fasterxml.jackson.core.JsonProcessingException;
13+
import com.fasterxml.jackson.databind.SerializerProvider;
14+
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
15+
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
16+
import java.io.IOException;
17+
import java.util.Arrays;
18+
import java.util.HashSet;
19+
import java.util.Set;
20+
21+
/** Property of the Synthetic Test Response to extract into a local variable. */
22+
@JsonSerialize(
23+
using =
24+
SyntheticsLocalVariableParsingOptionsType
25+
.SyntheticsLocalVariableParsingOptionsTypeSerializer.class)
26+
public class SyntheticsLocalVariableParsingOptionsType extends ModelEnum<String> {
27+
28+
private static final Set<String> allowedValues =
29+
new HashSet<String>(
30+
Arrays.asList(
31+
"grpc_message", "grpc_metadata", "http_body", "http_header", "http_status_code"));
32+
33+
public static final SyntheticsLocalVariableParsingOptionsType GRPC_MESSAGE =
34+
new SyntheticsLocalVariableParsingOptionsType("grpc_message");
35+
public static final SyntheticsLocalVariableParsingOptionsType GRPC_METADATA =
36+
new SyntheticsLocalVariableParsingOptionsType("grpc_metadata");
37+
public static final SyntheticsLocalVariableParsingOptionsType HTTP_BODY =
38+
new SyntheticsLocalVariableParsingOptionsType("http_body");
39+
public static final SyntheticsLocalVariableParsingOptionsType HTTP_HEADER =
40+
new SyntheticsLocalVariableParsingOptionsType("http_header");
41+
public static final SyntheticsLocalVariableParsingOptionsType HTTP_STATUS_CODE =
42+
new SyntheticsLocalVariableParsingOptionsType("http_status_code");
43+
44+
SyntheticsLocalVariableParsingOptionsType(String value) {
45+
super(value, allowedValues);
46+
}
47+
48+
public static class SyntheticsLocalVariableParsingOptionsTypeSerializer
49+
extends StdSerializer<SyntheticsLocalVariableParsingOptionsType> {
50+
public SyntheticsLocalVariableParsingOptionsTypeSerializer(
51+
Class<SyntheticsLocalVariableParsingOptionsType> t) {
52+
super(t);
53+
}
54+
55+
public SyntheticsLocalVariableParsingOptionsTypeSerializer() {
56+
this(null);
57+
}
58+
59+
@Override
60+
public void serialize(
61+
SyntheticsLocalVariableParsingOptionsType value,
62+
JsonGenerator jgen,
63+
SerializerProvider provider)
64+
throws IOException, JsonProcessingException {
65+
jgen.writeObject(value.value);
66+
}
67+
}
68+
69+
@JsonCreator
70+
public static SyntheticsLocalVariableParsingOptionsType fromValue(String value) {
71+
return new SyntheticsLocalVariableParsingOptionsType(value);
72+
}
73+
}

src/main/java/com/datadog/api/client/v1/model/SyntheticsParsingOptions.java

+7-6
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,16 @@ public class SyntheticsParsingOptions {
4141
private Boolean secure;
4242

4343
public static final String JSON_PROPERTY_TYPE = "type";
44-
private SyntheticsGlobalVariableParseTestOptionsType type;
44+
private SyntheticsLocalVariableParsingOptionsType type;
4545

4646
public SyntheticsParsingOptions field(String field) {
4747
this.field = field;
4848
return this;
4949
}
5050

5151
/**
52-
* When type is <code>http_header</code>, name of the header to use to extract the value.
52+
* When type is <code>http_header</code> or <code>grpc_metadata</code>, name of the header or
53+
* metadatum to extract.
5354
*
5455
* @return field
5556
*/
@@ -128,25 +129,25 @@ public void setSecure(Boolean secure) {
128129
this.secure = secure;
129130
}
130131

131-
public SyntheticsParsingOptions type(SyntheticsGlobalVariableParseTestOptionsType type) {
132+
public SyntheticsParsingOptions type(SyntheticsLocalVariableParsingOptionsType type) {
132133
this.type = type;
133134
this.unparsed |= !type.isValid();
134135
return this;
135136
}
136137

137138
/**
138-
* Property of the Synthetic Test Response to use for a Synthetic global variable.
139+
* Property of the Synthetic Test Response to extract into a local variable.
139140
*
140141
* @return type
141142
*/
142143
@jakarta.annotation.Nullable
143144
@JsonProperty(JSON_PROPERTY_TYPE)
144145
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
145-
public SyntheticsGlobalVariableParseTestOptionsType getType() {
146+
public SyntheticsLocalVariableParsingOptionsType getType() {
146147
return type;
147148
}
148149

149-
public void setType(SyntheticsGlobalVariableParseTestOptionsType type) {
150+
public void setType(SyntheticsLocalVariableParsingOptionsType type) {
150151
if (!type.isValid()) {
151152
this.unparsed = true;
152153
}

0 commit comments

Comments
 (0)