Skip to content

Commit f5283cf

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit dacc144 of spec repo
1 parent 7983bca commit f5283cf

42 files changed

Lines changed: 898 additions & 67 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

examples/v2/app-builder/ListAppVersions.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,16 @@ public static void main(String[] args) {
1111
ApiClient defaultClient = ApiClient.getDefaultApiClient();
1212
AppBuilderApi apiInstance = new AppBuilderApi(defaultClient);
1313

14+
// there is a valid "app" in the system
15+
UUID APP_DATA_ID = null;
1416
try {
15-
ListAppVersionsResponse result =
16-
apiInstance.listAppVersions(UUID.fromString("65bb1f25-52e1-4510-9f8d-22d1516ed693"));
17+
APP_DATA_ID = UUID.fromString(System.getenv("APP_DATA_ID"));
18+
} catch (IllegalArgumentException e) {
19+
System.err.println("Error parsing UUID: " + e.getMessage());
20+
}
21+
22+
try {
23+
ListAppVersionsResponse result = apiInstance.listAppVersions(APP_DATA_ID);
1724
System.out.println(result);
1825
} catch (ApiException e) {
1926
System.err.println("Exception when calling AppBuilderApi#listAppVersions");

examples/v2/app-builder/UpdateAppFavorite.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ public static void main(String[] args) {
1414
ApiClient defaultClient = ApiClient.getDefaultApiClient();
1515
AppBuilderApi apiInstance = new AppBuilderApi(defaultClient);
1616

17+
// there is a valid "app" in the system
18+
UUID APP_DATA_ID = null;
19+
try {
20+
APP_DATA_ID = UUID.fromString(System.getenv("APP_DATA_ID"));
21+
} catch (IllegalArgumentException e) {
22+
System.err.println("Error parsing UUID: " + e.getMessage());
23+
}
24+
1725
UpdateAppFavoriteRequest body =
1826
new UpdateAppFavoriteRequest()
1927
.data(
@@ -22,7 +30,7 @@ public static void main(String[] args) {
2230
.type(AppFavoriteType.FAVORITES));
2331

2432
try {
25-
apiInstance.updateAppFavorite(UUID.fromString("65bb1f25-52e1-4510-9f8d-22d1516ed693"), body);
33+
apiInstance.updateAppFavorite(APP_DATA_ID, body);
2634
} catch (ApiException e) {
2735
System.err.println("Exception when calling AppBuilderApi#updateAppFavorite");
2836
System.err.println("Status code: " + e.getCode());

examples/v2/app-builder/UpdateAppSelfService.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ public static void main(String[] args) {
1414
ApiClient defaultClient = ApiClient.getDefaultApiClient();
1515
AppBuilderApi apiInstance = new AppBuilderApi(defaultClient);
1616

17+
// there is a valid "app" in the system
18+
UUID APP_DATA_ID = null;
19+
try {
20+
APP_DATA_ID = UUID.fromString(System.getenv("APP_DATA_ID"));
21+
} catch (IllegalArgumentException e) {
22+
System.err.println("Error parsing UUID: " + e.getMessage());
23+
}
24+
1725
UpdateAppSelfServiceRequest body =
1826
new UpdateAppSelfServiceRequest()
1927
.data(
@@ -22,8 +30,7 @@ public static void main(String[] args) {
2230
.type(AppSelfServiceType.SELFSERVICE));
2331

2432
try {
25-
apiInstance.updateAppSelfService(
26-
UUID.fromString("65bb1f25-52e1-4510-9f8d-22d1516ed693"), body);
33+
apiInstance.updateAppSelfService(APP_DATA_ID, body);
2734
} catch (ApiException e) {
2835
System.err.println("Exception when calling AppBuilderApi#updateAppSelfService");
2936
System.err.println("Status code: " + e.getCode());

examples/v2/app-builder/UpdateAppTags.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ public static void main(String[] args) {
1515
ApiClient defaultClient = ApiClient.getDefaultApiClient();
1616
AppBuilderApi apiInstance = new AppBuilderApi(defaultClient);
1717

18+
// there is a valid "app" in the system
19+
UUID APP_DATA_ID = null;
20+
try {
21+
APP_DATA_ID = UUID.fromString(System.getenv("APP_DATA_ID"));
22+
} catch (IllegalArgumentException e) {
23+
System.err.println("Error parsing UUID: " + e.getMessage());
24+
}
25+
1826
UpdateAppTagsRequest body =
1927
new UpdateAppTagsRequest()
2028
.data(
@@ -25,7 +33,7 @@ public static void main(String[] args) {
2533
.type(AppTagsType.TAGS));
2634

2735
try {
28-
apiInstance.updateAppTags(UUID.fromString("65bb1f25-52e1-4510-9f8d-22d1516ed693"), body);
36+
apiInstance.updateAppTags(APP_DATA_ID, body);
2937
} catch (ApiException e) {
3038
System.err.println("Exception when calling AppBuilderApi#updateAppTags");
3139
System.err.println("Status code: " + e.getCode());

examples/v2/app-builder/UpdateAppVersionName.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ public static void main(String[] args) {
1414
ApiClient defaultClient = ApiClient.getDefaultApiClient();
1515
AppBuilderApi apiInstance = new AppBuilderApi(defaultClient);
1616

17+
// there is a valid "app" in the system
18+
UUID APP_DATA_ID = null;
19+
try {
20+
APP_DATA_ID = UUID.fromString(System.getenv("APP_DATA_ID"));
21+
} catch (IllegalArgumentException e) {
22+
System.err.println("Error parsing UUID: " + e.getMessage());
23+
}
24+
1725
UpdateAppVersionNameRequest body =
1826
new UpdateAppVersionNameRequest()
1927
.data(
@@ -24,8 +32,7 @@ public static void main(String[] args) {
2432
.type(AppVersionNameType.VERSIONNAMES));
2533

2634
try {
27-
apiInstance.updateAppVersionName(
28-
UUID.fromString("65bb1f25-52e1-4510-9f8d-22d1516ed693"), "3", body);
35+
apiInstance.updateAppVersionName(APP_DATA_ID, "latest", body);
2936
} catch (ApiException e) {
3037
System.err.println("Exception when calling AppBuilderApi#updateAppVersionName");
3138
System.err.println("Status code: " + e.getCode());

examples/v2/app-builder/UpdateProtectionLevel.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@ public static void main(String[] args) {
1616
ApiClient defaultClient = ApiClient.getDefaultApiClient();
1717
AppBuilderApi apiInstance = new AppBuilderApi(defaultClient);
1818

19+
// there is a valid "app" in the system
20+
UUID APP_DATA_ID = null;
21+
try {
22+
APP_DATA_ID = UUID.fromString(System.getenv("APP_DATA_ID"));
23+
} catch (IllegalArgumentException e) {
24+
System.err.println("Error parsing UUID: " + e.getMessage());
25+
}
26+
1927
UpdateAppProtectionLevelRequest body =
2028
new UpdateAppProtectionLevelRequest()
2129
.data(
@@ -26,9 +34,7 @@ public static void main(String[] args) {
2634
.type(AppProtectionLevelType.PROTECTIONLEVEL));
2735

2836
try {
29-
UpdateAppResponse result =
30-
apiInstance.updateProtectionLevel(
31-
UUID.fromString("65bb1f25-52e1-4510-9f8d-22d1516ed693"), body);
37+
UpdateAppResponse result = apiInstance.updateProtectionLevel(APP_DATA_ID, body);
3238
System.out.println(result);
3339
} catch (ApiException e) {
3440
System.err.println("Exception when calling AppBuilderApi#updateProtectionLevel");

src/test/resources/cassettes/features/v2/Create_App_returns_Created_response.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"timeToLive": {
2828
"unlimited": true
2929
},
30-
"id": "c782b1f3-1b03-d50f-8fcd-12e51226c511"
30+
"id": "c782b1f3-1b03-d50f-8fcd-12e51226c514"
3131
},
3232
{
3333
"httpRequest": {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2026-05-18T19:51:47.462Z
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
[
2+
{
3+
"httpRequest": {
4+
"body": {
5+
"type": "JSON",
6+
"json": "{\"data\":{\"attributes\":{\"description\":\"Adds new dashboard widgets and a few bug fixes.\",\"title\":\"Release v1.2 to production\"},\"type\":\"publishRequest\"}}"
7+
},
8+
"headers": {},
9+
"method": "POST",
10+
"path": "/api/v2/app-builder/apps/7addb29b-f935-472c-ae79-d1963979a23e/publish-request",
11+
"keepAlive": false,
12+
"secure": true
13+
},
14+
"httpResponse": {
15+
"body": "{\"errors\":[{\"status\":\"404\",\"id\":\"c9247d40-2291-4860-90ac-9c2441ff23db\",\"title\":\"app not found\",\"detail\":\"app with id 7addb29b-f935-472c-ae79-d1963979a23e not found\"}]}",
16+
"headers": {
17+
"Content-Type": [
18+
"application/vnd.api+json"
19+
]
20+
},
21+
"statusCode": 404,
22+
"reasonPhrase": "Not Found"
23+
},
24+
"times": {
25+
"remainingTimes": 1
26+
},
27+
"timeToLive": {
28+
"unlimited": true
29+
},
30+
"id": "508a80cf-3313-3708-bdc3-428c09046235"
31+
}
32+
]

src/test/resources/cassettes/features/v2/Delete_App_returns_OK_response.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"timeToLive": {
2828
"unlimited": true
2929
},
30-
"id": "c782b1f3-1b03-d50f-8fcd-12e51226c50e"
30+
"id": "c782b1f3-1b03-d50f-8fcd-12e51226c510"
3131
},
3232
{
3333
"httpRequest": {

0 commit comments

Comments
 (0)