@@ -55,7 +55,7 @@ public void setApiClient(ApiClient apiClient) {
5555 }
5656
5757
58- private ApiResponse <SyntheticsTestDetails > createTestWithHttpInfo (SyntheticsTestDetails body , String fromTestId ) throws ApiException {
58+ private ApiResponse <SyntheticsTestDetails > createTestWithHttpInfo (SyntheticsTestDetails body ) throws ApiException {
5959 Object localVarPostBody = body ;
6060
6161 // verify the required parameter 'body' is set
@@ -72,7 +72,6 @@ private ApiResponse<SyntheticsTestDetails> createTestWithHttpInfo(SyntheticsTest
7272 Map <String , String > localVarCookieParams = new HashMap <String , String >();
7373 Map <String , Object > localVarFormParams = new HashMap <String , Object >();
7474
75- localVarQueryParams .addAll (apiClient .parameterToPairs ("" , "from_test_id" , fromTestId ));
7675
7776 // Set Operation-ID header for telemetry
7877 localVarHeaderParams .put ("DD-OPERATION-ID" , "createTest" );
@@ -101,7 +100,6 @@ private ApiResponse<SyntheticsTestDetails> createTestWithHttpInfo(SyntheticsTest
101100
102101 public class APIcreateTestRequest {
103102 private SyntheticsTestDetails body ;
104- private String fromTestId ;
105103
106104 private APIcreateTestRequest () {
107105 }
@@ -116,16 +114,6 @@ public APIcreateTestRequest body(SyntheticsTestDetails body) {
116114 return this ;
117115 }
118116
119- /**
120- * Set fromTestId
121- * @param fromTestId Public ID of the test to clone, undefined if the test is newly created. (optional)
122- * @return APIcreateTestRequest
123- */
124- public APIcreateTestRequest fromTestId (String fromTestId ) {
125- this .fromTestId = fromTestId ;
126- return this ;
127- }
128-
129117 /**
130118 * Execute createTest request
131119 * @return SyntheticsTestDetails
@@ -160,7 +148,7 @@ public SyntheticsTestDetails execute() throws ApiException {
160148
161149 */
162150 public ApiResponse <SyntheticsTestDetails > executeWithHttpInfo () throws ApiException {
163- return createTestWithHttpInfo (body , fromTestId );
151+ return createTestWithHttpInfo (body );
164152 }
165153 }
166154
@@ -530,6 +518,106 @@ public APIgetAPITestResultRequest getAPITestResult(String publicId, String resul
530518 return new APIgetAPITestResultRequest (publicId , resultId );
531519 }
532520
521+ private ApiResponse <SyntheticsTestDetails > getBrowserTestWithHttpInfo (String publicId ) throws ApiException {
522+ Object localVarPostBody = null ;
523+
524+ // verify the required parameter 'publicId' is set
525+ if (publicId == null ) {
526+ throw new ApiException (400 , "Missing the required parameter 'publicId' when calling getBrowserTest" );
527+ }
528+
529+ // create path and map variables
530+ String localVarPath = "/api/v1/synthetics/tests/browser/{public_id}"
531+ .replaceAll ("\\ {" + "public_id" + "\\ }" , apiClient .escapeString (publicId .toString ()));
532+
533+ // query params
534+ List <Pair > localVarQueryParams = new ArrayList <Pair >();
535+ Map <String , String > localVarHeaderParams = new HashMap <String , String >();
536+ Map <String , String > localVarCookieParams = new HashMap <String , String >();
537+ Map <String , Object > localVarFormParams = new HashMap <String , Object >();
538+
539+
540+ // Set Operation-ID header for telemetry
541+ localVarHeaderParams .put ("DD-OPERATION-ID" , "getBrowserTest" );
542+
543+
544+
545+
546+ final String [] localVarAccepts = {
547+ "application/json"
548+ };
549+ final String localVarAccept = apiClient .selectHeaderAccept (localVarAccepts );
550+
551+ final String [] localVarContentTypes = {
552+
553+ };
554+ final String localVarContentType = apiClient .selectHeaderContentType (localVarContentTypes );
555+
556+ String [] localVarAuthNames = new String [] { "apiKeyAuth" , "appKeyAuth" };
557+
558+ GenericType <SyntheticsTestDetails > localVarReturnType = new GenericType <SyntheticsTestDetails >() {};
559+
560+ return apiClient .invokeAPI ("SyntheticsApi.getBrowserTest" , localVarPath , "GET" , localVarQueryParams , localVarPostBody ,
561+ localVarHeaderParams , localVarCookieParams , localVarFormParams , localVarAccept , localVarContentType ,
562+ localVarAuthNames , localVarReturnType , null );
563+ }
564+
565+ public class APIgetBrowserTestRequest {
566+ private String publicId ;
567+
568+ private APIgetBrowserTestRequest (String publicId ) {
569+ this .publicId = publicId ;
570+ }
571+
572+ /**
573+ * Execute getBrowserTest request
574+ * @return SyntheticsTestDetails
575+ * @throws ApiException if fails to make API call
576+ * @http.response.details
577+ <table summary="Response Details" border="1">
578+ <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
579+ <tr><td> 200 </td><td> OK </td><td> - </td></tr>
580+ <tr><td> 403 </td><td> Forbidden </td><td> - </td></tr>
581+ <tr><td> 404 </td><td> - Synthetic is not activated for the user - Test is not owned by the user </td><td> - </td></tr>
582+ </table>
583+
584+ */
585+
586+ public SyntheticsTestDetails execute () throws ApiException {
587+ return this .executeWithHttpInfo ().getData ();
588+ }
589+
590+ /**
591+ * Execute getBrowserTest request with HTTP info returned
592+ * @return ApiResponse<SyntheticsTestDetails>
593+ * @throws ApiException if fails to make API call
594+ * @http.response.details
595+ <table summary="Response Details" border="1">
596+ <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
597+ <tr><td> 200 </td><td> OK </td><td> - </td></tr>
598+ <tr><td> 403 </td><td> Forbidden </td><td> - </td></tr>
599+ <tr><td> 404 </td><td> - Synthetic is not activated for the user - Test is not owned by the user </td><td> - </td></tr>
600+ </table>
601+
602+ */
603+ public ApiResponse <SyntheticsTestDetails > executeWithHttpInfo () throws ApiException {
604+ return getBrowserTestWithHttpInfo (publicId );
605+ }
606+ }
607+
608+ /**
609+ * Get a browser test configuration
610+ * Get the detailed configuration (including steps) associated with a Synthetics browser test.
611+ * @param publicId The public ID of the test to get details from. (required)
612+ * @return getBrowserTestRequest
613+ * @throws ApiException if fails to make API call
614+
615+
616+ */
617+ public APIgetBrowserTestRequest getBrowserTest (String publicId ) throws ApiException {
618+ return new APIgetBrowserTestRequest (publicId );
619+ }
620+
533621private ApiResponse <SyntheticsGetBrowserTestLatestResultsResponse > getBrowserTestLatestResultsWithHttpInfo (String publicId , Long fromTs , Long toTs , List <String > probeDc ) throws ApiException {
534622 Object localVarPostBody = null ;
535623
0 commit comments