Skip to content

Commit c02706b

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
and
ci.datadog-api-spec
authored
Remove mobile device ids and make all device ids simple string (#2576)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 3da74bc commit c02706b

15 files changed

+39
-175
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-11-19 21:12:12.431997",
8-
"spec_repo_commit": "2e48953d"
7+
"regenerated": "2024-11-20 20:14:20.566230",
8+
"spec_repo_commit": "ebf27b5e"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-11-19 21:12:12.451025",
13-
"spec_repo_commit": "2e48953d"
12+
"regenerated": "2024-11-20 20:14:20.584628",
13+
"spec_repo_commit": "ebf27b5e"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

+2-32
Original file line numberDiff line numberDiff line change
@@ -15178,34 +15178,8 @@ components:
1517815178
type: object
1517915179
SyntheticsDeviceID:
1518015180
description: The device ID.
15181-
enum:
15182-
- laptop_large
15183-
- tablet
15184-
- mobile_small
15185-
- chrome.laptop_large
15186-
- chrome.tablet
15187-
- chrome.mobile_small
15188-
- firefox.laptop_large
15189-
- firefox.tablet
15190-
- firefox.mobile_small
15191-
- edge.laptop_large
15192-
- edge.tablet
15193-
- edge.mobile_small
1519415181
example: chrome.laptop_large
1519515182
type: string
15196-
x-enum-varnames:
15197-
- LAPTOP_LARGE
15198-
- TABLET
15199-
- MOBILE_SMALL
15200-
- CHROME_LAPTOP_LARGE
15201-
- CHROME_TABLET
15202-
- CHROME_MOBILE_SMALL
15203-
- FIREFOX_LAPTOP_LARGE
15204-
- FIREFOX_TABLET
15205-
- FIREFOX_MOBILE_SMALL
15206-
- EDGE_LAPTOP_LARGE
15207-
- EDGE_TABLET
15208-
- EDGE_MOBILE_SMALL
1520915183
SyntheticsFetchUptimesPayload:
1521015184
description: Object containing IDs of Synthetic tests and a timeframe.
1521115185
properties:
@@ -15508,10 +15482,6 @@ components:
1550815482
$ref: '#/components/schemas/SyntheticsLocation'
1550915483
type: array
1551015484
type: object
15511-
SyntheticsMobileDeviceID:
15512-
description: The device ID.
15513-
example: synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16
15514-
type: string
1551515485
SyntheticsMobileStep:
1551615486
description: The steps used in a Synthetic mobile test.
1551715487
properties:
@@ -15787,7 +15757,7 @@ components:
1578715757
device_ids:
1578815758
description: Array with the different device IDs used to run the test.
1578915759
items:
15790-
$ref: '#/components/schemas/SyntheticsMobileDeviceID'
15760+
$ref: '#/components/schemas/SyntheticsDeviceID'
1579115761
type: array
1579215762
message:
1579315763
description: Notification message associated with the test.
@@ -15876,7 +15846,7 @@ components:
1587615846
example:
1587715847
- synthetics:mobile:device:apple_ipad_10th_gen_2022_ios_16
1587815848
items:
15879-
$ref: '#/components/schemas/SyntheticsMobileDeviceID'
15849+
$ref: '#/components/schemas/SyntheticsDeviceID'
1588015850
type: array
1588115851
disableAutoAcceptAlert:
1588215852
description: A boolean to disable auto accepting alerts.

examples/v1/synthetics/CreateSyntheticsAPITest.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
import com.datadog.api.client.v1.model.SyntheticsAssertionTarget;
1212
import com.datadog.api.client.v1.model.SyntheticsAssertionType;
1313
import com.datadog.api.client.v1.model.SyntheticsBrowserTestRumSettings;
14-
import com.datadog.api.client.v1.model.SyntheticsDeviceID;
1514
import com.datadog.api.client.v1.model.SyntheticsTestCiOptions;
1615
import com.datadog.api.client.v1.model.SyntheticsTestDetailsSubType;
1716
import com.datadog.api.client.v1.model.SyntheticsTestExecutionRule;
@@ -52,7 +51,7 @@ public static void main(String[] args) {
5251
.ci(
5352
new SyntheticsTestCiOptions()
5453
.executionRule(SyntheticsTestExecutionRule.BLOCKING))
55-
.deviceIds(Collections.singletonList(SyntheticsDeviceID.CHROME_LAPTOP_LARGE))
54+
.deviceIds(Collections.singletonList("chrome.laptop_large"))
5655
.httpVersion(SyntheticsTestOptionsHTTPVersion.HTTP1)
5756
.monitorOptions(
5857
new SyntheticsTestOptionsMonitorOptions()

examples/v1/synthetics/CreateSyntheticsBrowserTest.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import com.datadog.api.client.v1.model.SyntheticsBrowserVariableType;
1111
import com.datadog.api.client.v1.model.SyntheticsConfigVariable;
1212
import com.datadog.api.client.v1.model.SyntheticsConfigVariableType;
13-
import com.datadog.api.client.v1.model.SyntheticsDeviceID;
1413
import com.datadog.api.client.v1.model.SyntheticsStep;
1514
import com.datadog.api.client.v1.model.SyntheticsStepType;
1615
import com.datadog.api.client.v1.model.SyntheticsTestOptions;
@@ -52,7 +51,7 @@ public static void main(String[] args) {
5251
new SyntheticsTestOptions()
5352
.acceptSelfSigned(false)
5453
.allowInsecure(true)
55-
.deviceIds(Collections.singletonList(SyntheticsDeviceID.CHROME_LAPTOP_LARGE))
54+
.deviceIds(Collections.singletonList("chrome.laptop_large"))
5655
.disableCors(true)
5756
.followRedirects(true)
5857
.minFailureDuration(10L)

examples/v1/synthetics/CreateSyntheticsBrowserTest_2932742688.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import com.datadog.api.client.v1.model.SyntheticsBrowserTestType;
1010
import com.datadog.api.client.v1.model.SyntheticsConfigVariable;
1111
import com.datadog.api.client.v1.model.SyntheticsConfigVariableType;
12-
import com.datadog.api.client.v1.model.SyntheticsDeviceID;
1312
import com.datadog.api.client.v1.model.SyntheticsStep;
1413
import com.datadog.api.client.v1.model.SyntheticsStepType;
1514
import com.datadog.api.client.v1.model.SyntheticsTestCiOptions;
@@ -48,7 +47,7 @@ public static void main(String[] args) {
4847
new SyntheticsTestOptions()
4948
.acceptSelfSigned(false)
5049
.allowInsecure(true)
51-
.deviceIds(Collections.singletonList(SyntheticsDeviceID.TABLET))
50+
.deviceIds(Collections.singletonList("tablet"))
5251
.disableCors(true)
5352
.followRedirects(true)
5453
.minFailureDuration(10L)

examples/v1/synthetics/CreateSyntheticsBrowserTest_397420811.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import com.datadog.api.client.v1.model.SyntheticsBrowserTestType;
1010
import com.datadog.api.client.v1.model.SyntheticsConfigVariable;
1111
import com.datadog.api.client.v1.model.SyntheticsConfigVariableType;
12-
import com.datadog.api.client.v1.model.SyntheticsDeviceID;
1312
import com.datadog.api.client.v1.model.SyntheticsStep;
1413
import com.datadog.api.client.v1.model.SyntheticsStepType;
1514
import com.datadog.api.client.v1.model.SyntheticsTestOptions;
@@ -45,7 +44,7 @@ public static void main(String[] args) {
4544
new SyntheticsTestOptions()
4645
.acceptSelfSigned(false)
4746
.allowInsecure(true)
48-
.deviceIds(Collections.singletonList(SyntheticsDeviceID.TABLET))
47+
.deviceIds(Collections.singletonList("tablet"))
4948
.disableCors(true)
5049
.followRedirects(true)
5150
.minFailureDuration(10L)

examples/v1/synthetics/TriggerCITests.java

+1-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import com.datadog.api.client.v1.model.SyntheticsCIBatchMetadataProvider;
1414
import com.datadog.api.client.v1.model.SyntheticsCITest;
1515
import com.datadog.api.client.v1.model.SyntheticsCITestBody;
16-
import com.datadog.api.client.v1.model.SyntheticsDeviceID;
1716
import com.datadog.api.client.v1.model.SyntheticsTestOptionsRetry;
1817
import com.datadog.api.client.v1.model.SyntheticsTriggerCITestsResponse;
1918
import java.util.Collections;
@@ -34,8 +33,7 @@ public static void main(String[] args) {
3433
.password("PaSSw0RD!")
3534
.type(SyntheticsBasicAuthWebType.WEB)
3635
.username("my_username")))
37-
.deviceIds(
38-
Collections.singletonList(SyntheticsDeviceID.CHROME_LAPTOP_LARGE))
36+
.deviceIds(Collections.singletonList("chrome.laptop_large"))
3937
.locations(Collections.singletonList("aws:eu-west-3"))
4038
.metadata(
4139
new SyntheticsCIBatchMetadata()

examples/v1/synthetics/UpdateBrowserTest.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import com.datadog.api.client.v1.model.SyntheticsBrowserVariableType;
1515
import com.datadog.api.client.v1.model.SyntheticsConfigVariable;
1616
import com.datadog.api.client.v1.model.SyntheticsConfigVariableType;
17-
import com.datadog.api.client.v1.model.SyntheticsDeviceID;
1817
import com.datadog.api.client.v1.model.SyntheticsStep;
1918
import com.datadog.api.client.v1.model.SyntheticsStepType;
2019
import com.datadog.api.client.v1.model.SyntheticsTestCallType;
@@ -84,7 +83,7 @@ public static void main(String[] args) {
8483
.ci(
8584
new SyntheticsTestCiOptions()
8685
.executionRule(SyntheticsTestExecutionRule.BLOCKING))
87-
.deviceIds(Collections.singletonList(SyntheticsDeviceID.CHROME_LAPTOP_LARGE))
86+
.deviceIds(Collections.singletonList("chrome.laptop_large"))
8887
.httpVersion(SyntheticsTestOptionsHTTPVersion.HTTP1)
8988
.monitorOptions(
9089
new SyntheticsTestOptionsMonitorOptions()

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

+4-8
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
public class SyntheticsBatchResult {
3535
@JsonIgnore public boolean unparsed = false;
3636
public static final String JSON_PROPERTY_DEVICE = "device";
37-
private SyntheticsDeviceID device;
37+
private String device;
3838

3939
public static final String JSON_PROPERTY_DURATION = "duration";
4040
private Double duration;
@@ -63,9 +63,8 @@ public class SyntheticsBatchResult {
6363
public static final String JSON_PROPERTY_TEST_TYPE = "test_type";
6464
private SyntheticsTestDetailsType testType;
6565

66-
public SyntheticsBatchResult device(SyntheticsDeviceID device) {
66+
public SyntheticsBatchResult device(String device) {
6767
this.device = device;
68-
this.unparsed |= !device.isValid();
6968
return this;
7069
}
7170

@@ -77,14 +76,11 @@ public SyntheticsBatchResult device(SyntheticsDeviceID device) {
7776
@jakarta.annotation.Nullable
7877
@JsonProperty(JSON_PROPERTY_DEVICE)
7978
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
80-
public SyntheticsDeviceID getDevice() {
79+
public String getDevice() {
8180
return device;
8281
}
8382

84-
public void setDevice(SyntheticsDeviceID device) {
85-
if (!device.isValid()) {
86-
this.unparsed = true;
87-
}
83+
public void setDevice(String device) {
8884
this.device = device;
8985
}
9086

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

+5-6
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public class SyntheticsCITest {
5757
private String cookies;
5858

5959
public static final String JSON_PROPERTY_DEVICE_IDS = "deviceIds";
60-
private List<SyntheticsDeviceID> deviceIds = null;
60+
private List<String> deviceIds = null;
6161

6262
public static final String JSON_PROPERTY_FOLLOW_REDIRECTS = "followRedirects";
6363
private Boolean followRedirects;
@@ -197,17 +197,16 @@ public void setCookies(String cookies) {
197197
this.cookies = cookies;
198198
}
199199

200-
public SyntheticsCITest deviceIds(List<SyntheticsDeviceID> deviceIds) {
200+
public SyntheticsCITest deviceIds(List<String> deviceIds) {
201201
this.deviceIds = deviceIds;
202202
return this;
203203
}
204204

205-
public SyntheticsCITest addDeviceIdsItem(SyntheticsDeviceID deviceIdsItem) {
205+
public SyntheticsCITest addDeviceIdsItem(String deviceIdsItem) {
206206
if (this.deviceIds == null) {
207207
this.deviceIds = new ArrayList<>();
208208
}
209209
this.deviceIds.add(deviceIdsItem);
210-
this.unparsed |= !deviceIdsItem.isValid();
211210
return this;
212211
}
213212

@@ -219,11 +218,11 @@ public SyntheticsCITest addDeviceIdsItem(SyntheticsDeviceID deviceIdsItem) {
219218
@jakarta.annotation.Nullable
220219
@JsonProperty(JSON_PROPERTY_DEVICE_IDS)
221220
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
222-
public List<SyntheticsDeviceID> getDeviceIds() {
221+
public List<String> getDeviceIds() {
223222
return deviceIds;
224223
}
225224

226-
public void setDeviceIds(List<SyntheticsDeviceID> deviceIds) {
225+
public void setDeviceIds(List<String> deviceIds) {
227226
this.deviceIds = deviceIds;
228227
}
229228

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

+5-10
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public class SyntheticsDevice {
3333
private Long height;
3434

3535
public static final String JSON_PROPERTY_ID = "id";
36-
private SyntheticsDeviceID id;
36+
private String id;
3737

3838
public static final String JSON_PROPERTY_IS_MOBILE = "isMobile";
3939
private Boolean isMobile;
@@ -49,12 +49,11 @@ public SyntheticsDevice() {}
4949
@JsonCreator
5050
public SyntheticsDevice(
5151
@JsonProperty(required = true, value = JSON_PROPERTY_HEIGHT) Long height,
52-
@JsonProperty(required = true, value = JSON_PROPERTY_ID) SyntheticsDeviceID id,
52+
@JsonProperty(required = true, value = JSON_PROPERTY_ID) String id,
5353
@JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name,
5454
@JsonProperty(required = true, value = JSON_PROPERTY_WIDTH) Long width) {
5555
this.height = height;
5656
this.id = id;
57-
this.unparsed |= !id.isValid();
5857
this.name = name;
5958
this.width = width;
6059
}
@@ -79,9 +78,8 @@ public void setHeight(Long height) {
7978
this.height = height;
8079
}
8180

82-
public SyntheticsDevice id(SyntheticsDeviceID id) {
81+
public SyntheticsDevice id(String id) {
8382
this.id = id;
84-
this.unparsed |= !id.isValid();
8583
return this;
8684
}
8785

@@ -92,14 +90,11 @@ public SyntheticsDevice id(SyntheticsDeviceID id) {
9290
*/
9391
@JsonProperty(JSON_PROPERTY_ID)
9492
@JsonInclude(value = JsonInclude.Include.ALWAYS)
95-
public SyntheticsDeviceID getId() {
93+
public String getId() {
9694
return id;
9795
}
9896

99-
public void setId(SyntheticsDeviceID id) {
100-
if (!id.isValid()) {
101-
this.unparsed = true;
102-
}
97+
public void setId(String id) {
10398
this.id = id;
10499
}
105100

0 commit comments

Comments
 (0)