From ce036691b453941228d481c8e418cb3a0bbb4114 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 8 May 2023 20:49:17 +0000 Subject: [PATCH] CodeGen from PR 23864 in Azure/azure-rest-api-specs Merge 04c795aa0bddd7ae0a145be3e2c034304b1f7da7 into 1cbf4e6f3385fe2680d819bc3ac40fc3078cd8f8 --- .../LoadTestAdministrationAsyncClient.java | 148 +- .../LoadTestAdministrationClient.java | 195 +- .../LoadTestAdministrationClientBuilder.java | 65 +- .../loadtesting/LoadTestRunAsyncClient.java | 206 +- .../loadtesting/LoadTestRunClient.java | 294 +- .../loadtesting/LoadTestRunClientBuilder.java | 64 +- .../LoadTestingServiceVersion.java | 1 + .../LoadTestAdministrationsImpl.java | 2148 +++++------ .../implementation/LoadTestRunsImpl.java | 3238 ++++++----------- .../src/main/java/module-info.java | 4 + .../swagger/README.md | 24 +- 11 files changed, 2480 insertions(+), 3907 deletions(-) diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestAdministrationAsyncClient.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestAdministrationAsyncClient.java index 94fe6b5d7a1d..3f5b0d409d53 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestAdministrationAsyncClient.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestAdministrationAsyncClient.java @@ -194,17 +194,12 @@ public PollerFlux beginUploadTestFile( * *
{@code
      * {
-     *     value (Required): [
-     *          (Required){
-     *             url: String (Optional)
-     *             fileName: String (Optional)
-     *             fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
-     *             expireDateTime: OffsetDateTime (Optional)
-     *             validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
-     *             validationFailureDetails: String (Optional)
-     *         }
-     *     ]
-     *     nextLink: String (Optional)
+     *     url: String (Optional)
+     *     fileName: String (Optional)
+     *     fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
+     *     expireDateTime: OffsetDateTime (Optional)
+     *     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
+     *     validationFailureDetails: String (Optional)
      * }
      * }
* @@ -517,76 +512,71 @@ public Mono> getTestWithResponse(String testId, RequestOpti * *
{@code
      * {
-     *     value (Required): [
-     *          (Required){
-     *             passFailCriteria (Optional): {
-     *                 passFailMetrics (Optional): {
-     *                     String (Optional): {
-     *                         clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
-     *                         aggregate: String(count/percentage/avg/p50/p90/p95/p99/min/max) (Optional)
-     *                         condition: String (Optional)
-     *                         requestName: String (Optional)
-     *                         value: Double (Optional)
-     *                         action: String(continue/stop) (Optional)
-     *                         actualValue: Double (Optional)
-     *                         result: String(passed/undetermined/failed) (Optional)
-     *                     }
-     *                 }
-     *             }
-     *             secrets (Optional): {
-     *                 String (Optional): {
-     *                     value: String (Optional)
-     *                     type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
-     *                 }
-     *             }
-     *             certificate (Optional): {
-     *                 value: String (Optional)
-     *                 type: String(AKV_CERT_URI) (Optional)
-     *                 name: String (Optional)
-     *             }
-     *             environmentVariables (Optional): {
-     *                 String: String (Optional)
-     *             }
-     *             loadTestConfiguration (Optional): {
-     *                 engineInstances: Integer (Optional)
-     *                 splitAllCSVs: Boolean (Optional)
-     *                 quickStartTest: Boolean (Optional)
-     *                 optionalLoadTestConfig (Optional): {
-     *                     endpointUrl: String (Optional)
-     *                     virtualUsers: Integer (Optional)
-     *                     rampUpTime: Integer (Optional)
-     *                     duration: Integer (Optional)
-     *                 }
-     *             }
-     *             inputArtifacts (Optional): {
-     *                 configFileInfo (Optional): {
-     *                     url: String (Optional)
-     *                     fileName: String (Optional)
-     *                     fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
-     *                     expireDateTime: OffsetDateTime (Optional)
-     *                     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
-     *                     validationFailureDetails: String (Optional)
-     *                 }
-     *                 testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
-     *                 userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
-     *                 inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
-     *                 additionalFileInfo (Optional): [
-     *                     (recursive schema, see above)
-     *                 ]
+     *     passFailCriteria (Optional): {
+     *         passFailMetrics (Optional): {
+     *             String (Optional): {
+     *                 clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
+     *                 aggregate: String(count/percentage/avg/p50/p90/p95/p99/min/max) (Optional)
+     *                 condition: String (Optional)
+     *                 requestName: String (Optional)
+     *                 value: Double (Optional)
+     *                 action: String(continue/stop) (Optional)
+     *                 actualValue: Double (Optional)
+     *                 result: String(passed/undetermined/failed) (Optional)
      *             }
-     *             testId: String (Optional)
-     *             description: String (Optional)
-     *             displayName: String (Optional)
-     *             subnetId: String (Optional)
-     *             keyvaultReferenceIdentityType: String (Optional)
-     *             keyvaultReferenceIdentityId: String (Optional)
-     *             createdDateTime: OffsetDateTime (Optional)
-     *             createdBy: String (Optional)
-     *             lastModifiedDateTime: OffsetDateTime (Optional)
-     *             lastModifiedBy: String (Optional)
      *         }
-     *     ]
-     *     nextLink: String (Optional)
+     *     }
+     *     secrets (Optional): {
+     *         String (Optional): {
+     *             value: String (Optional)
+     *             type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
+     *         }
+     *     }
+     *     certificate (Optional): {
+     *         value: String (Optional)
+     *         type: String(AKV_CERT_URI) (Optional)
+     *         name: String (Optional)
+     *     }
+     *     environmentVariables (Optional): {
+     *         String: String (Optional)
+     *     }
+     *     loadTestConfiguration (Optional): {
+     *         engineInstances: Integer (Optional)
+     *         splitAllCSVs: Boolean (Optional)
+     *         quickStartTest: Boolean (Optional)
+     *         optionalLoadTestConfig (Optional): {
+     *             endpointUrl: String (Optional)
+     *             virtualUsers: Integer (Optional)
+     *             rampUpTime: Integer (Optional)
+     *             duration: Integer (Optional)
+     *         }
+     *     }
+     *     inputArtifacts (Optional): {
+     *         configFileInfo (Optional): {
+     *             url: String (Optional)
+     *             fileName: String (Optional)
+     *             fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
+     *             expireDateTime: OffsetDateTime (Optional)
+     *             validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
+     *             validationFailureDetails: String (Optional)
+     *         }
+     *         testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
+     *         userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
+     *         inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
+     *         additionalFileInfo (Optional): [
+     *             (recursive schema, see above)
+     *         ]
+     *     }
+     *     testId: String (Optional)
+     *     description: String (Optional)
+     *     displayName: String (Optional)
+     *     subnetId: String (Optional)
+     *     keyvaultReferenceIdentityType: String (Optional)
+     *     keyvaultReferenceIdentityId: String (Optional)
+     *     createdDateTime: OffsetDateTime (Optional)
+     *     createdBy: String (Optional)
+     *     lastModifiedDateTime: OffsetDateTime (Optional)
+     *     lastModifiedBy: String (Optional)
      * }
      * }
* diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestAdministrationClient.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestAdministrationClient.java index 60044440f1e4..0a704984f50a 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestAdministrationClient.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestAdministrationClient.java @@ -17,23 +17,12 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; +import com.azure.developer.loadtesting.implementation.LoadTestAdministrationsImpl; /** Initializes a new instance of the synchronous LoadTestingClient type. */ @ServiceClient(builder = LoadTestAdministrationClientBuilder.class) public final class LoadTestAdministrationClient { - @Generated private final LoadTestAdministrationAsyncClient client; - - /** - * Initializes an instance of LoadTestAdministrationClient class. - * - * @param client the async client. - */ - @Generated - LoadTestAdministrationClient(LoadTestAdministrationAsyncClient client) { - this.client = client; - } - /** * Configure server metrics for a test. * @@ -99,7 +88,7 @@ public final class LoadTestAdministrationClient { @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrUpdateServerMetricsConfigWithResponse( String testId, BinaryData body, RequestOptions requestOptions) { - return this.client.createOrUpdateServerMetricsConfigWithResponse(testId, body, requestOptions).block(); + return this.serviceClient.createOrUpdateServerMetricsConfigWithResponse(testId, body, requestOptions); } /** @@ -128,17 +117,12 @@ public SyncPoller beginUploadTestFile( * *
{@code
      * {
-     *     value (Required): [
-     *          (Required){
-     *             url: String (Optional)
-     *             fileName: String (Optional)
-     *             fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
-     *             expireDateTime: OffsetDateTime (Optional)
-     *             validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
-     *             validationFailureDetails: String (Optional)
-     *         }
-     *     ]
-     *     nextLink: String (Optional)
+     *     url: String (Optional)
+     *     fileName: String (Optional)
+     *     fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
+     *     expireDateTime: OffsetDateTime (Optional)
+     *     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
+     *     validationFailureDetails: String (Optional)
      * }
      * }
* @@ -154,7 +138,7 @@ public SyncPoller beginUploadTestFile( @Generated @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listTestFiles(String testId, RequestOptions requestOptions) { - return new PagedIterable<>(this.client.listTestFiles(testId, requestOptions)); + return this.serviceClient.listTestFiles(testId, requestOptions); } /** @@ -318,7 +302,7 @@ public PagedIterable listTestFiles(String testId, RequestOptions req @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrUpdateTestWithResponse( String testId, BinaryData body, RequestOptions requestOptions) { - return this.client.createOrUpdateTestWithResponse(testId, body, requestOptions).block(); + return this.serviceClient.createOrUpdateTestWithResponse(testId, body, requestOptions); } /** @@ -336,7 +320,7 @@ public Response createOrUpdateTestWithResponse( @Generated @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteTestWithResponse(String testId, RequestOptions requestOptions) { - return this.client.deleteTestWithResponse(testId, requestOptions).block(); + return this.serviceClient.deleteTestWithResponse(testId, requestOptions); } /** @@ -426,7 +410,7 @@ public Response deleteTestWithResponse(String testId, RequestOptions reque @Generated @ServiceMethod(returns = ReturnType.SINGLE) public Response getTestWithResponse(String testId, RequestOptions requestOptions) { - return this.client.getTestWithResponse(testId, requestOptions).block(); + return this.serviceClient.getTestWithResponse(testId, requestOptions); } /** @@ -451,76 +435,71 @@ public Response getTestWithResponse(String testId, RequestOptions re * *
{@code
      * {
-     *     value (Required): [
-     *          (Required){
-     *             passFailCriteria (Optional): {
-     *                 passFailMetrics (Optional): {
-     *                     String (Optional): {
-     *                         clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
-     *                         aggregate: String(count/percentage/avg/p50/p90/p95/p99/min/max) (Optional)
-     *                         condition: String (Optional)
-     *                         requestName: String (Optional)
-     *                         value: Double (Optional)
-     *                         action: String(continue/stop) (Optional)
-     *                         actualValue: Double (Optional)
-     *                         result: String(passed/undetermined/failed) (Optional)
-     *                     }
-     *                 }
-     *             }
-     *             secrets (Optional): {
-     *                 String (Optional): {
-     *                     value: String (Optional)
-     *                     type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
-     *                 }
-     *             }
-     *             certificate (Optional): {
-     *                 value: String (Optional)
-     *                 type: String(AKV_CERT_URI) (Optional)
-     *                 name: String (Optional)
-     *             }
-     *             environmentVariables (Optional): {
-     *                 String: String (Optional)
-     *             }
-     *             loadTestConfiguration (Optional): {
-     *                 engineInstances: Integer (Optional)
-     *                 splitAllCSVs: Boolean (Optional)
-     *                 quickStartTest: Boolean (Optional)
-     *                 optionalLoadTestConfig (Optional): {
-     *                     endpointUrl: String (Optional)
-     *                     virtualUsers: Integer (Optional)
-     *                     rampUpTime: Integer (Optional)
-     *                     duration: Integer (Optional)
-     *                 }
-     *             }
-     *             inputArtifacts (Optional): {
-     *                 configFileInfo (Optional): {
-     *                     url: String (Optional)
-     *                     fileName: String (Optional)
-     *                     fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
-     *                     expireDateTime: OffsetDateTime (Optional)
-     *                     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
-     *                     validationFailureDetails: String (Optional)
-     *                 }
-     *                 testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
-     *                 userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
-     *                 inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
-     *                 additionalFileInfo (Optional): [
-     *                     (recursive schema, see above)
-     *                 ]
+     *     passFailCriteria (Optional): {
+     *         passFailMetrics (Optional): {
+     *             String (Optional): {
+     *                 clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
+     *                 aggregate: String(count/percentage/avg/p50/p90/p95/p99/min/max) (Optional)
+     *                 condition: String (Optional)
+     *                 requestName: String (Optional)
+     *                 value: Double (Optional)
+     *                 action: String(continue/stop) (Optional)
+     *                 actualValue: Double (Optional)
+     *                 result: String(passed/undetermined/failed) (Optional)
      *             }
-     *             testId: String (Optional)
-     *             description: String (Optional)
-     *             displayName: String (Optional)
-     *             subnetId: String (Optional)
-     *             keyvaultReferenceIdentityType: String (Optional)
-     *             keyvaultReferenceIdentityId: String (Optional)
-     *             createdDateTime: OffsetDateTime (Optional)
-     *             createdBy: String (Optional)
-     *             lastModifiedDateTime: OffsetDateTime (Optional)
-     *             lastModifiedBy: String (Optional)
      *         }
-     *     ]
-     *     nextLink: String (Optional)
+     *     }
+     *     secrets (Optional): {
+     *         String (Optional): {
+     *             value: String (Optional)
+     *             type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
+     *         }
+     *     }
+     *     certificate (Optional): {
+     *         value: String (Optional)
+     *         type: String(AKV_CERT_URI) (Optional)
+     *         name: String (Optional)
+     *     }
+     *     environmentVariables (Optional): {
+     *         String: String (Optional)
+     *     }
+     *     loadTestConfiguration (Optional): {
+     *         engineInstances: Integer (Optional)
+     *         splitAllCSVs: Boolean (Optional)
+     *         quickStartTest: Boolean (Optional)
+     *         optionalLoadTestConfig (Optional): {
+     *             endpointUrl: String (Optional)
+     *             virtualUsers: Integer (Optional)
+     *             rampUpTime: Integer (Optional)
+     *             duration: Integer (Optional)
+     *         }
+     *     }
+     *     inputArtifacts (Optional): {
+     *         configFileInfo (Optional): {
+     *             url: String (Optional)
+     *             fileName: String (Optional)
+     *             fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
+     *             expireDateTime: OffsetDateTime (Optional)
+     *             validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
+     *             validationFailureDetails: String (Optional)
+     *         }
+     *         testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
+     *         userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
+     *         inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
+     *         additionalFileInfo (Optional): [
+     *             (recursive schema, see above)
+     *         ]
+     *     }
+     *     testId: String (Optional)
+     *     description: String (Optional)
+     *     displayName: String (Optional)
+     *     subnetId: String (Optional)
+     *     keyvaultReferenceIdentityType: String (Optional)
+     *     keyvaultReferenceIdentityId: String (Optional)
+     *     createdDateTime: OffsetDateTime (Optional)
+     *     createdBy: String (Optional)
+     *     lastModifiedDateTime: OffsetDateTime (Optional)
+     *     lastModifiedBy: String (Optional)
      * }
      * }
* @@ -536,7 +515,7 @@ public Response getTestWithResponse(String testId, RequestOptions re @Generated @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listTests(RequestOptions requestOptions) { - return new PagedIterable<>(this.client.listTests(requestOptions)); + return this.serviceClient.listTests(requestOptions); } /** @@ -618,7 +597,7 @@ Response uploadTestFileWithResponse( @Generated @ServiceMethod(returns = ReturnType.SINGLE) public Response getTestFileWithResponse(String testId, String fileName, RequestOptions requestOptions) { - return this.client.getTestFileWithResponse(testId, fileName, requestOptions).block(); + return this.serviceClient.getTestFileWithResponse(testId, fileName, requestOptions); } /** @@ -637,7 +616,7 @@ public Response getTestFileWithResponse(String testId, String fileNa @Generated @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteTestFileWithResponse(String testId, String fileName, RequestOptions requestOptions) { - return this.client.deleteTestFileWithResponse(testId, fileName, requestOptions).block(); + return this.serviceClient.deleteTestFileWithResponse(testId, fileName, requestOptions); } /** @@ -703,7 +682,7 @@ public Response deleteTestFileWithResponse(String testId, String fileName, @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrUpdateAppComponentsWithResponse( String testId, BinaryData body, RequestOptions requestOptions) { - return this.client.createOrUpdateAppComponentsWithResponse(testId, body, requestOptions).block(); + return this.serviceClient.createOrUpdateAppComponentsWithResponse(testId, body, requestOptions); } /** @@ -744,7 +723,7 @@ public Response createOrUpdateAppComponentsWithResponse( @Generated @ServiceMethod(returns = ReturnType.SINGLE) public Response getAppComponentsWithResponse(String testId, RequestOptions requestOptions) { - return this.client.getAppComponentsWithResponse(testId, requestOptions).block(); + return this.serviceClient.getAppComponentsWithResponse(testId, requestOptions); } /** @@ -786,6 +765,18 @@ public Response getAppComponentsWithResponse(String testId, RequestO @Generated @ServiceMethod(returns = ReturnType.SINGLE) public Response getServerMetricsConfigWithResponse(String testId, RequestOptions requestOptions) { - return this.client.getServerMetricsConfigWithResponse(testId, requestOptions).block(); + return this.serviceClient.getServerMetricsConfigWithResponse(testId, requestOptions); + } + + @Generated private final LoadTestAdministrationsImpl serviceClient; + + /** + * Initializes an instance of LoadTestAdministrationClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + LoadTestAdministrationClient(LoadTestAdministrationsImpl serviceClient) { + this.serviceClient = serviceClient; } } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestAdministrationClientBuilder.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestAdministrationClientBuilder.java index eb3f3fab51ca..a4fc82f052ac 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestAdministrationClientBuilder.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestAdministrationClientBuilder.java @@ -37,7 +37,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; -import java.util.stream.Collectors; +import java.util.Objects; /** A builder for creating a new instance of the LoadTestAdministrationClient type. */ @ServiceClientBuilder(serviceClients = {LoadTestAdministrationClient.class, LoadTestAdministrationAsyncClient.class}) @@ -54,9 +54,6 @@ public final class LoadTestAdministrationClientBuilder @Generated private static final String[] DEFAULT_SCOPES = new String[] {"https://cnt-prod.loadtesting.azure.com/.default"}; - @Generated - private final Map properties = CoreUtils.getProperties("azure-developer-loadtesting.properties"); - @Generated private final List pipelinePolicies; /** Create an instance of the LoadTestAdministrationClientBuilder. */ @@ -105,8 +102,7 @@ public LoadTestAdministrationClientBuilder httpLogOptions(HttpLogOptions httpLog } /* - * The client options such as application ID and custom headers to set on a - * request. + * The client options such as application ID and custom headers to set on a request. */ @Generated private ClientOptions clientOptions; @@ -135,13 +131,13 @@ public LoadTestAdministrationClientBuilder retryOptions(RetryOptions retryOption @Generated @Override public LoadTestAdministrationClientBuilder addPolicy(HttpPipelinePolicy customPolicy) { + Objects.requireNonNull(customPolicy, "'customPolicy' cannot be null."); pipelinePolicies.add(customPolicy); return this; } /* - * The configuration store that is used during construction of the service - * client. + * The configuration store that is used during construction of the service client. */ @Generated private Configuration configuration; @@ -197,8 +193,7 @@ public LoadTestAdministrationClientBuilder serviceVersion(LoadTestingServiceVers } /* - * The retry policy that will attempt to retry failed requests, if - * applicable. + * The retry policy that will attempt to retry failed requests, if applicable. */ @Generated private RetryPolicy retryPolicy; @@ -221,15 +216,12 @@ public LoadTestAdministrationClientBuilder retryPolicy(RetryPolicy retryPolicy) */ @Generated private LoadTestingClientImpl buildInnerClient() { - if (pipeline == null) { - this.pipeline = createHttpPipeline(); - } - if (serviceVersion == null) { - this.serviceVersion = LoadTestingServiceVersion.getLatest(); - } + HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); + LoadTestingServiceVersion localServiceVersion = + (serviceVersion != null) ? serviceVersion : LoadTestingServiceVersion.getLatest(); LoadTestingClientImpl client = new LoadTestingClientImpl( - pipeline, JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion); + localPipeline, JacksonAdapter.createDefaultSerializerAdapter(), endpoint, localServiceVersion); return client; } @@ -237,28 +229,23 @@ private LoadTestingClientImpl buildInnerClient() { private HttpPipeline createHttpPipeline() { Configuration buildConfiguration = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration; - if (httpLogOptions == null) { - httpLogOptions = new HttpLogOptions(); - } - if (clientOptions == null) { - clientOptions = new ClientOptions(); - } + HttpLogOptions localHttpLogOptions = this.httpLogOptions == null ? new HttpLogOptions() : this.httpLogOptions; + ClientOptions localClientOptions = this.clientOptions == null ? new ClientOptions() : this.clientOptions; List policies = new ArrayList<>(); - String clientName = properties.getOrDefault(SDK_NAME, "UnknownName"); - String clientVersion = properties.getOrDefault(SDK_VERSION, "UnknownVersion"); - String applicationId = CoreUtils.getApplicationId(clientOptions, httpLogOptions); + String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + String applicationId = CoreUtils.getApplicationId(localClientOptions, localHttpLogOptions); policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); policies.add(new RequestIdPolicy()); policies.add(new AddHeadersFromContextPolicy()); HttpHeaders headers = new HttpHeaders(); - clientOptions.getHeaders().forEach(header -> headers.set(header.getName(), header.getValue())); + localClientOptions.getHeaders().forEach(header -> headers.set(header.getName(), header.getValue())); if (headers.getSize() > 0) { policies.add(new AddHeadersPolicy(headers)); } - policies.addAll( - this.pipelinePolicies.stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) - .collect(Collectors.toList())); + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .forEach(p -> policies.add(p)); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions, new RetryPolicy())); policies.add(new AddDatePolicy()); @@ -266,17 +253,16 @@ private HttpPipeline createHttpPipeline() { if (tokenCredential != null) { policies.add(new BearerTokenAuthenticationPolicy(tokenCredential, DEFAULT_SCOPES)); } - policies.addAll( - this.pipelinePolicies.stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) - .collect(Collectors.toList())); + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .forEach(p -> policies.add(p)); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); HttpPipeline httpPipeline = new HttpPipelineBuilder() .policies(policies.toArray(new HttpPipelinePolicy[0])) .httpClient(httpClient) - .clientOptions(clientOptions) + .clientOptions(localClientOptions) .build(); return httpPipeline; } @@ -298,7 +284,10 @@ public LoadTestAdministrationAsyncClient buildAsyncClient() { */ @Generated public LoadTestAdministrationClient buildClient() { - return new LoadTestAdministrationClient( - new LoadTestAdministrationAsyncClient(buildInnerClient().getLoadTestAdministrations())); + return new LoadTestAdministrationClient(buildInnerClient().getLoadTestAdministrations()); } + + @Generated + private static final Map PROPERTIES = + CoreUtils.getProperties("azure-developer-loadtesting.properties"); } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestRunAsyncClient.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestRunAsyncClient.java index d2bd4b727cac..a2cfb02907ec 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestRunAsyncClient.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestRunAsyncClient.java @@ -343,12 +343,7 @@ public PagedFlux listMetrics( *

Response Body Schema * *

{@code
-     * {
-     *     value (Optional): [
-     *         String (Optional)
-     *     ]
-     *     nextLink: String (Optional)
-     * }
+     * String
      * }
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore @@ -909,112 +904,107 @@ public Mono> getTestRunFileWithResponse( * *
{@code
      * {
-     *     value (Required): [
-     *          (Required){
-     *             passFailCriteria (Optional): {
-     *                 passFailMetrics (Optional): {
-     *                     String (Optional): {
-     *                         clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
-     *                         aggregate: String(count/percentage/avg/p50/p90/p95/p99/min/max) (Optional)
-     *                         condition: String (Optional)
-     *                         requestName: String (Optional)
-     *                         value: Double (Optional)
-     *                         action: String(continue/stop) (Optional)
-     *                         actualValue: Double (Optional)
-     *                         result: String(passed/undetermined/failed) (Optional)
-     *                     }
-     *                 }
-     *             }
-     *             secrets (Optional): {
-     *                 String (Optional): {
-     *                     value: String (Optional)
-     *                     type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
-     *                 }
-     *             }
-     *             certificate (Optional): {
-     *                 value: String (Optional)
-     *                 type: String(AKV_CERT_URI) (Optional)
-     *                 name: String (Optional)
+     *     passFailCriteria (Optional): {
+     *         passFailMetrics (Optional): {
+     *             String (Optional): {
+     *                 clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
+     *                 aggregate: String(count/percentage/avg/p50/p90/p95/p99/min/max) (Optional)
+     *                 condition: String (Optional)
+     *                 requestName: String (Optional)
+     *                 value: Double (Optional)
+     *                 action: String(continue/stop) (Optional)
+     *                 actualValue: Double (Optional)
+     *                 result: String(passed/undetermined/failed) (Optional)
      *             }
-     *             environmentVariables (Optional): {
-     *                 String: String (Optional)
+     *         }
+     *     }
+     *     secrets (Optional): {
+     *         String (Optional): {
+     *             value: String (Optional)
+     *             type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
+     *         }
+     *     }
+     *     certificate (Optional): {
+     *         value: String (Optional)
+     *         type: String(AKV_CERT_URI) (Optional)
+     *         name: String (Optional)
+     *     }
+     *     environmentVariables (Optional): {
+     *         String: String (Optional)
+     *     }
+     *     errorDetails (Optional): [
+     *          (Optional){
+     *             message: String (Optional)
+     *         }
+     *     ]
+     *     testRunStatistics (Optional): {
+     *         String (Optional): {
+     *             transaction: String (Optional)
+     *             sampleCount: Double (Optional)
+     *             errorCount: Double (Optional)
+     *             errorPct: Double (Optional)
+     *             meanResTime: Double (Optional)
+     *             medianResTime: Double (Optional)
+     *             maxResTime: Double (Optional)
+     *             minResTime: Double (Optional)
+     *             pct1ResTime: Double (Optional)
+     *             pct2ResTime: Double (Optional)
+     *             pct3ResTime: Double (Optional)
+     *             throughput: Double (Optional)
+     *             receivedKBytesPerSec: Double (Optional)
+     *             sentKBytesPerSec: Double (Optional)
+     *         }
+     *     }
+     *     loadTestConfiguration (Optional): {
+     *         engineInstances: Integer (Optional)
+     *         splitAllCSVs: Boolean (Optional)
+     *         quickStartTest: Boolean (Optional)
+     *         optionalLoadTestConfig (Optional): {
+     *             endpointUrl: String (Optional)
+     *             virtualUsers: Integer (Optional)
+     *             rampUpTime: Integer (Optional)
+     *             duration: Integer (Optional)
+     *         }
+     *     }
+     *     testArtifacts (Optional): {
+     *         inputArtifacts (Optional): {
+     *             configFileInfo (Optional): {
+     *                 url: String (Optional)
+     *                 fileName: String (Optional)
+     *                 fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
+     *                 expireDateTime: OffsetDateTime (Optional)
+     *                 validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
+     *                 validationFailureDetails: String (Optional)
      *             }
-     *             errorDetails (Optional): [
-     *                  (Optional){
-     *                     message: String (Optional)
-     *                 }
+     *             testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
+     *             userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
+     *             inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
+     *             additionalFileInfo (Optional): [
+     *                 (recursive schema, see above)
      *             ]
-     *             testRunStatistics (Optional): {
-     *                 String (Optional): {
-     *                     transaction: String (Optional)
-     *                     sampleCount: Double (Optional)
-     *                     errorCount: Double (Optional)
-     *                     errorPct: Double (Optional)
-     *                     meanResTime: Double (Optional)
-     *                     medianResTime: Double (Optional)
-     *                     maxResTime: Double (Optional)
-     *                     minResTime: Double (Optional)
-     *                     pct1ResTime: Double (Optional)
-     *                     pct2ResTime: Double (Optional)
-     *                     pct3ResTime: Double (Optional)
-     *                     throughput: Double (Optional)
-     *                     receivedKBytesPerSec: Double (Optional)
-     *                     sentKBytesPerSec: Double (Optional)
-     *                 }
-     *             }
-     *             loadTestConfiguration (Optional): {
-     *                 engineInstances: Integer (Optional)
-     *                 splitAllCSVs: Boolean (Optional)
-     *                 quickStartTest: Boolean (Optional)
-     *                 optionalLoadTestConfig (Optional): {
-     *                     endpointUrl: String (Optional)
-     *                     virtualUsers: Integer (Optional)
-     *                     rampUpTime: Integer (Optional)
-     *                     duration: Integer (Optional)
-     *                 }
-     *             }
-     *             testArtifacts (Optional): {
-     *                 inputArtifacts (Optional): {
-     *                     configFileInfo (Optional): {
-     *                         url: String (Optional)
-     *                         fileName: String (Optional)
-     *                         fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
-     *                         expireDateTime: OffsetDateTime (Optional)
-     *                         validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
-     *                         validationFailureDetails: String (Optional)
-     *                     }
-     *                     testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
-     *                     userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
-     *                     inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
-     *                     additionalFileInfo (Optional): [
-     *                         (recursive schema, see above)
-     *                     ]
-     *                 }
-     *                 outputArtifacts (Optional): {
-     *                     resultFileInfo (Optional): (recursive schema, see resultFileInfo above)
-     *                     logsFileInfo (Optional): (recursive schema, see logsFileInfo above)
-     *                 }
-     *             }
-     *             testResult: String(PASSED/NOT_APPLICABLE/FAILED) (Optional)
-     *             virtualUsers: Integer (Optional)
-     *             testRunId: String (Optional)
-     *             displayName: String (Optional)
-     *             testId: String (Optional)
-     *             description: String (Optional)
-     *             status: String(ACCEPTED/NOTSTARTED/PROVISIONING/PROVISIONED/CONFIGURING/CONFIGURED/EXECUTING/EXECUTED/DEPROVISIONING/DEPROVISIONED/DONE/CANCELLING/CANCELLED/FAILED/VALIDATION_SUCCESS/VALIDATION_FAILURE) (Optional)
-     *             startDateTime: OffsetDateTime (Optional)
-     *             endDateTime: OffsetDateTime (Optional)
-     *             executedDateTime: OffsetDateTime (Optional)
-     *             portalUrl: String (Optional)
-     *             duration: Long (Optional)
-     *             subnetId: String (Optional)
-     *             createdDateTime: OffsetDateTime (Optional)
-     *             createdBy: String (Optional)
-     *             lastModifiedDateTime: OffsetDateTime (Optional)
-     *             lastModifiedBy: String (Optional)
      *         }
-     *     ]
-     *     nextLink: String (Optional)
+     *         outputArtifacts (Optional): {
+     *             resultFileInfo (Optional): (recursive schema, see resultFileInfo above)
+     *             logsFileInfo (Optional): (recursive schema, see logsFileInfo above)
+     *         }
+     *     }
+     *     testResult: String(PASSED/NOT_APPLICABLE/FAILED) (Optional)
+     *     virtualUsers: Integer (Optional)
+     *     testRunId: String (Optional)
+     *     displayName: String (Optional)
+     *     testId: String (Optional)
+     *     description: String (Optional)
+     *     status: String(ACCEPTED/NOTSTARTED/PROVISIONING/PROVISIONED/CONFIGURING/CONFIGURED/EXECUTING/EXECUTED/DEPROVISIONING/DEPROVISIONED/DONE/CANCELLING/CANCELLED/FAILED/VALIDATION_SUCCESS/VALIDATION_FAILURE) (Optional)
+     *     startDateTime: OffsetDateTime (Optional)
+     *     endDateTime: OffsetDateTime (Optional)
+     *     executedDateTime: OffsetDateTime (Optional)
+     *     portalUrl: String (Optional)
+     *     duration: Long (Optional)
+     *     subnetId: String (Optional)
+     *     createdDateTime: OffsetDateTime (Optional)
+     *     createdBy: String (Optional)
+     *     lastModifiedDateTime: OffsetDateTime (Optional)
+     *     lastModifiedBy: String (Optional)
      * }
      * }
* diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestRunClient.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestRunClient.java index e547dc498660..b1e52c908cfe 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestRunClient.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestRunClient.java @@ -17,23 +17,12 @@ import com.azure.core.util.BinaryData; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; +import com.azure.developer.loadtesting.implementation.LoadTestRunsImpl; /** Initializes a new instance of the synchronous LoadTestingClient type. */ @ServiceClient(builder = LoadTestRunClientBuilder.class) public final class LoadTestRunClient { - @Generated private final LoadTestRunAsyncClient client; - - /** - * Initializes an instance of LoadTestRunClient class. - * - * @param client the async client. - */ - @Generated - LoadTestRunClient(LoadTestRunAsyncClient client) { - this.client = client; - } - /** * Configure server metrics for a test run. * @@ -99,7 +88,7 @@ public final class LoadTestRunClient { @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrUpdateServerMetricsConfigWithResponse( String testRunId, BinaryData body, RequestOptions requestOptions) { - return this.client.createOrUpdateServerMetricsConfigWithResponse(testRunId, body, requestOptions).block(); + return this.serviceClient.createOrUpdateServerMetricsConfigWithResponse(testRunId, body, requestOptions); } /** @@ -184,7 +173,7 @@ public SyncPoller beginTestRun( @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrUpdateAppComponentsWithResponse( String testRunId, BinaryData body, RequestOptions requestOptions) { - return this.client.createOrUpdateAppComponentsWithResponse(testRunId, body, requestOptions).block(); + return this.serviceClient.createOrUpdateAppComponentsWithResponse(testRunId, body, requestOptions); } /** @@ -201,6 +190,16 @@ public Response createOrUpdateAppComponentsWithResponse( * * You can add these to a request with {@link RequestOptions#addQueryParam} * + *

Header Parameters + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: "application/json".
+ * + * You can add these to a request with {@link RequestOptions#addHeader} + * *

Request Body Schema * *

{@code
@@ -220,23 +219,18 @@ public Response createOrUpdateAppComponentsWithResponse(
      *
      * 
{@code
      * {
-     *     value (Optional): [
+     *     data (Optional): [
      *          (Optional){
-     *             data (Optional): [
-     *                  (Optional){
-     *                     timestamp: String (Optional)
-     *                     value: Double (Optional)
-     *                 }
-     *             ]
-     *             dimensionValues (Optional): [
-     *                  (Optional){
-     *                     name: String (Optional)
-     *                     value: String (Optional)
-     *                 }
-     *             ]
+     *             timestamp: String (Optional)
+     *             value: Double (Optional)
+     *         }
+     *     ]
+     *     dimensionValues (Optional): [
+     *          (Optional){
+     *             name: String (Optional)
+     *             value: String (Optional)
      *         }
      *     ]
-     *     nextLink: String (Optional)
      * }
      * }
* @@ -261,8 +255,7 @@ public PagedIterable listMetrics( String metricNamespace, String timespan, RequestOptions requestOptions) { - return new PagedIterable<>( - this.client.listMetrics(testRunId, metricName, metricNamespace, timespan, requestOptions)); + return this.serviceClient.listMetrics(testRunId, metricName, metricNamespace, timespan, requestOptions); } /** @@ -281,12 +274,7 @@ public PagedIterable listMetrics( *

Response Body Schema * *

{@code
-     * {
-     *     value (Optional): [
-     *         String (Optional)
-     *     ]
-     *     nextLink: String (Optional)
-     * }
+     * String
      * }
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore @@ -312,9 +300,8 @@ public PagedIterable listMetricDimensionValues( String metricNamespace, String timespan, RequestOptions requestOptions) { - return new PagedIterable<>( - this.client.listMetricDimensionValues( - testRunId, name, metricName, metricNamespace, timespan, requestOptions)); + return this.serviceClient.listMetricDimensionValues( + testRunId, name, metricName, metricNamespace, timespan, requestOptions); } /** @@ -356,7 +343,7 @@ public PagedIterable listMetricDimensionValues( @Generated @ServiceMethod(returns = ReturnType.SINGLE) public Response getAppComponentsWithResponse(String testRunId, RequestOptions requestOptions) { - return this.client.getAppComponentsWithResponse(testRunId, requestOptions).block(); + return this.serviceClient.getAppComponentsWithResponse(testRunId, requestOptions); } /** @@ -398,7 +385,7 @@ public Response getAppComponentsWithResponse(String testRunId, Reque @Generated @ServiceMethod(returns = ReturnType.SINGLE) public Response getServerMetricsConfigWithResponse(String testRunId, RequestOptions requestOptions) { - return this.client.getServerMetricsConfigWithResponse(testRunId, requestOptions).block(); + return this.serviceClient.getServerMetricsConfigWithResponse(testRunId, requestOptions); } /** @@ -769,7 +756,7 @@ Response createOrUpdateTestRunWithResponse( @Generated @ServiceMethod(returns = ReturnType.SINGLE) public Response getTestRunWithResponse(String testRunId, RequestOptions requestOptions) { - return this.client.getTestRunWithResponse(testRunId, requestOptions).block(); + return this.serviceClient.getTestRunWithResponse(testRunId, requestOptions); } /** @@ -787,7 +774,7 @@ public Response getTestRunWithResponse(String testRunId, RequestOpti @Generated @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteTestRunWithResponse(String testRunId, RequestOptions requestOptions) { - return this.client.deleteTestRunWithResponse(testRunId, requestOptions).block(); + return this.serviceClient.deleteTestRunWithResponse(testRunId, requestOptions); } /** @@ -820,7 +807,7 @@ public Response deleteTestRunWithResponse(String testRunId, RequestOptions @ServiceMethod(returns = ReturnType.SINGLE) public Response getTestRunFileWithResponse( String testRunId, String fileName, RequestOptions requestOptions) { - return this.client.getTestRunFileWithResponse(testRunId, fileName, requestOptions).block(); + return this.serviceClient.getTestRunFileWithResponse(testRunId, fileName, requestOptions); } /** @@ -846,112 +833,107 @@ public Response getTestRunFileWithResponse( * *
{@code
      * {
-     *     value (Required): [
-     *          (Required){
-     *             passFailCriteria (Optional): {
-     *                 passFailMetrics (Optional): {
-     *                     String (Optional): {
-     *                         clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
-     *                         aggregate: String(count/percentage/avg/p50/p90/p95/p99/min/max) (Optional)
-     *                         condition: String (Optional)
-     *                         requestName: String (Optional)
-     *                         value: Double (Optional)
-     *                         action: String(continue/stop) (Optional)
-     *                         actualValue: Double (Optional)
-     *                         result: String(passed/undetermined/failed) (Optional)
-     *                     }
-     *                 }
-     *             }
-     *             secrets (Optional): {
-     *                 String (Optional): {
-     *                     value: String (Optional)
-     *                     type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
-     *                 }
-     *             }
-     *             certificate (Optional): {
-     *                 value: String (Optional)
-     *                 type: String(AKV_CERT_URI) (Optional)
-     *                 name: String (Optional)
+     *     passFailCriteria (Optional): {
+     *         passFailMetrics (Optional): {
+     *             String (Optional): {
+     *                 clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
+     *                 aggregate: String(count/percentage/avg/p50/p90/p95/p99/min/max) (Optional)
+     *                 condition: String (Optional)
+     *                 requestName: String (Optional)
+     *                 value: Double (Optional)
+     *                 action: String(continue/stop) (Optional)
+     *                 actualValue: Double (Optional)
+     *                 result: String(passed/undetermined/failed) (Optional)
      *             }
-     *             environmentVariables (Optional): {
-     *                 String: String (Optional)
+     *         }
+     *     }
+     *     secrets (Optional): {
+     *         String (Optional): {
+     *             value: String (Optional)
+     *             type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
+     *         }
+     *     }
+     *     certificate (Optional): {
+     *         value: String (Optional)
+     *         type: String(AKV_CERT_URI) (Optional)
+     *         name: String (Optional)
+     *     }
+     *     environmentVariables (Optional): {
+     *         String: String (Optional)
+     *     }
+     *     errorDetails (Optional): [
+     *          (Optional){
+     *             message: String (Optional)
+     *         }
+     *     ]
+     *     testRunStatistics (Optional): {
+     *         String (Optional): {
+     *             transaction: String (Optional)
+     *             sampleCount: Double (Optional)
+     *             errorCount: Double (Optional)
+     *             errorPct: Double (Optional)
+     *             meanResTime: Double (Optional)
+     *             medianResTime: Double (Optional)
+     *             maxResTime: Double (Optional)
+     *             minResTime: Double (Optional)
+     *             pct1ResTime: Double (Optional)
+     *             pct2ResTime: Double (Optional)
+     *             pct3ResTime: Double (Optional)
+     *             throughput: Double (Optional)
+     *             receivedKBytesPerSec: Double (Optional)
+     *             sentKBytesPerSec: Double (Optional)
+     *         }
+     *     }
+     *     loadTestConfiguration (Optional): {
+     *         engineInstances: Integer (Optional)
+     *         splitAllCSVs: Boolean (Optional)
+     *         quickStartTest: Boolean (Optional)
+     *         optionalLoadTestConfig (Optional): {
+     *             endpointUrl: String (Optional)
+     *             virtualUsers: Integer (Optional)
+     *             rampUpTime: Integer (Optional)
+     *             duration: Integer (Optional)
+     *         }
+     *     }
+     *     testArtifacts (Optional): {
+     *         inputArtifacts (Optional): {
+     *             configFileInfo (Optional): {
+     *                 url: String (Optional)
+     *                 fileName: String (Optional)
+     *                 fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
+     *                 expireDateTime: OffsetDateTime (Optional)
+     *                 validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
+     *                 validationFailureDetails: String (Optional)
      *             }
-     *             errorDetails (Optional): [
-     *                  (Optional){
-     *                     message: String (Optional)
-     *                 }
+     *             testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
+     *             userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
+     *             inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
+     *             additionalFileInfo (Optional): [
+     *                 (recursive schema, see above)
      *             ]
-     *             testRunStatistics (Optional): {
-     *                 String (Optional): {
-     *                     transaction: String (Optional)
-     *                     sampleCount: Double (Optional)
-     *                     errorCount: Double (Optional)
-     *                     errorPct: Double (Optional)
-     *                     meanResTime: Double (Optional)
-     *                     medianResTime: Double (Optional)
-     *                     maxResTime: Double (Optional)
-     *                     minResTime: Double (Optional)
-     *                     pct1ResTime: Double (Optional)
-     *                     pct2ResTime: Double (Optional)
-     *                     pct3ResTime: Double (Optional)
-     *                     throughput: Double (Optional)
-     *                     receivedKBytesPerSec: Double (Optional)
-     *                     sentKBytesPerSec: Double (Optional)
-     *                 }
-     *             }
-     *             loadTestConfiguration (Optional): {
-     *                 engineInstances: Integer (Optional)
-     *                 splitAllCSVs: Boolean (Optional)
-     *                 quickStartTest: Boolean (Optional)
-     *                 optionalLoadTestConfig (Optional): {
-     *                     endpointUrl: String (Optional)
-     *                     virtualUsers: Integer (Optional)
-     *                     rampUpTime: Integer (Optional)
-     *                     duration: Integer (Optional)
-     *                 }
-     *             }
-     *             testArtifacts (Optional): {
-     *                 inputArtifacts (Optional): {
-     *                     configFileInfo (Optional): {
-     *                         url: String (Optional)
-     *                         fileName: String (Optional)
-     *                         fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
-     *                         expireDateTime: OffsetDateTime (Optional)
-     *                         validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
-     *                         validationFailureDetails: String (Optional)
-     *                     }
-     *                     testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
-     *                     userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
-     *                     inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
-     *                     additionalFileInfo (Optional): [
-     *                         (recursive schema, see above)
-     *                     ]
-     *                 }
-     *                 outputArtifacts (Optional): {
-     *                     resultFileInfo (Optional): (recursive schema, see resultFileInfo above)
-     *                     logsFileInfo (Optional): (recursive schema, see logsFileInfo above)
-     *                 }
-     *             }
-     *             testResult: String(PASSED/NOT_APPLICABLE/FAILED) (Optional)
-     *             virtualUsers: Integer (Optional)
-     *             testRunId: String (Optional)
-     *             displayName: String (Optional)
-     *             testId: String (Optional)
-     *             description: String (Optional)
-     *             status: String(ACCEPTED/NOTSTARTED/PROVISIONING/PROVISIONED/CONFIGURING/CONFIGURED/EXECUTING/EXECUTED/DEPROVISIONING/DEPROVISIONED/DONE/CANCELLING/CANCELLED/FAILED/VALIDATION_SUCCESS/VALIDATION_FAILURE) (Optional)
-     *             startDateTime: OffsetDateTime (Optional)
-     *             endDateTime: OffsetDateTime (Optional)
-     *             executedDateTime: OffsetDateTime (Optional)
-     *             portalUrl: String (Optional)
-     *             duration: Long (Optional)
-     *             subnetId: String (Optional)
-     *             createdDateTime: OffsetDateTime (Optional)
-     *             createdBy: String (Optional)
-     *             lastModifiedDateTime: OffsetDateTime (Optional)
-     *             lastModifiedBy: String (Optional)
      *         }
-     *     ]
-     *     nextLink: String (Optional)
+     *         outputArtifacts (Optional): {
+     *             resultFileInfo (Optional): (recursive schema, see resultFileInfo above)
+     *             logsFileInfo (Optional): (recursive schema, see logsFileInfo above)
+     *         }
+     *     }
+     *     testResult: String(PASSED/NOT_APPLICABLE/FAILED) (Optional)
+     *     virtualUsers: Integer (Optional)
+     *     testRunId: String (Optional)
+     *     displayName: String (Optional)
+     *     testId: String (Optional)
+     *     description: String (Optional)
+     *     status: String(ACCEPTED/NOTSTARTED/PROVISIONING/PROVISIONED/CONFIGURING/CONFIGURED/EXECUTING/EXECUTED/DEPROVISIONING/DEPROVISIONED/DONE/CANCELLING/CANCELLED/FAILED/VALIDATION_SUCCESS/VALIDATION_FAILURE) (Optional)
+     *     startDateTime: OffsetDateTime (Optional)
+     *     endDateTime: OffsetDateTime (Optional)
+     *     executedDateTime: OffsetDateTime (Optional)
+     *     portalUrl: String (Optional)
+     *     duration: Long (Optional)
+     *     subnetId: String (Optional)
+     *     createdDateTime: OffsetDateTime (Optional)
+     *     createdBy: String (Optional)
+     *     lastModifiedDateTime: OffsetDateTime (Optional)
+     *     lastModifiedBy: String (Optional)
      * }
      * }
* @@ -965,7 +947,7 @@ public Response getTestRunFileWithResponse( @Generated @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listTestRuns(RequestOptions requestOptions) { - return new PagedIterable<>(this.client.listTestRuns(requestOptions)); + return this.serviceClient.listTestRuns(requestOptions); } /** @@ -1091,7 +1073,7 @@ public PagedIterable listTestRuns(RequestOptions requestOptions) { @Generated @ServiceMethod(returns = ReturnType.SINGLE) public Response stopTestRunWithResponse(String testRunId, RequestOptions requestOptions) { - return this.client.stopTestRunWithResponse(testRunId, requestOptions).block(); + return this.serviceClient.stopTestRunWithResponse(testRunId, requestOptions); } /** @@ -1122,7 +1104,7 @@ public Response stopTestRunWithResponse(String testRunId, RequestOpt @Generated @ServiceMethod(returns = ReturnType.SINGLE) public Response getMetricNamespacesWithResponse(String testRunId, RequestOptions requestOptions) { - return this.client.getMetricNamespacesWithResponse(testRunId, requestOptions).block(); + return this.serviceClient.getMetricNamespacesWithResponse(testRunId, requestOptions); } /** @@ -1172,6 +1154,18 @@ public Response getMetricNamespacesWithResponse(String testRunId, Re @ServiceMethod(returns = ReturnType.SINGLE) public Response getMetricDefinitionsWithResponse( String testRunId, String metricNamespace, RequestOptions requestOptions) { - return this.client.getMetricDefinitionsWithResponse(testRunId, metricNamespace, requestOptions).block(); + return this.serviceClient.getMetricDefinitionsWithResponse(testRunId, metricNamespace, requestOptions); + } + + @Generated private final LoadTestRunsImpl serviceClient; + + /** + * Initializes an instance of LoadTestRunClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + LoadTestRunClient(LoadTestRunsImpl serviceClient) { + this.serviceClient = serviceClient; } } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestRunClientBuilder.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestRunClientBuilder.java index 93fb55186a50..bc38c0e605f9 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestRunClientBuilder.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestRunClientBuilder.java @@ -37,7 +37,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; -import java.util.stream.Collectors; +import java.util.Objects; /** A builder for creating a new instance of the LoadTestRunClient type. */ @ServiceClientBuilder(serviceClients = {LoadTestRunClient.class, LoadTestRunAsyncClient.class}) @@ -54,9 +54,6 @@ public final class LoadTestRunClientBuilder @Generated private static final String[] DEFAULT_SCOPES = new String[] {"https://cnt-prod.loadtesting.azure.com/.default"}; - @Generated - private final Map properties = CoreUtils.getProperties("azure-developer-loadtesting.properties"); - @Generated private final List pipelinePolicies; /** Create an instance of the LoadTestRunClientBuilder. */ @@ -105,8 +102,7 @@ public LoadTestRunClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) { } /* - * The client options such as application ID and custom headers to set on a - * request. + * The client options such as application ID and custom headers to set on a request. */ @Generated private ClientOptions clientOptions; @@ -135,13 +131,13 @@ public LoadTestRunClientBuilder retryOptions(RetryOptions retryOptions) { @Generated @Override public LoadTestRunClientBuilder addPolicy(HttpPipelinePolicy customPolicy) { + Objects.requireNonNull(customPolicy, "'customPolicy' cannot be null."); pipelinePolicies.add(customPolicy); return this; } /* - * The configuration store that is used during construction of the service - * client. + * The configuration store that is used during construction of the service client. */ @Generated private Configuration configuration; @@ -197,8 +193,7 @@ public LoadTestRunClientBuilder serviceVersion(LoadTestingServiceVersion service } /* - * The retry policy that will attempt to retry failed requests, if - * applicable. + * The retry policy that will attempt to retry failed requests, if applicable. */ @Generated private RetryPolicy retryPolicy; @@ -221,15 +216,12 @@ public LoadTestRunClientBuilder retryPolicy(RetryPolicy retryPolicy) { */ @Generated private LoadTestingClientImpl buildInnerClient() { - if (pipeline == null) { - this.pipeline = createHttpPipeline(); - } - if (serviceVersion == null) { - this.serviceVersion = LoadTestingServiceVersion.getLatest(); - } + HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); + LoadTestingServiceVersion localServiceVersion = + (serviceVersion != null) ? serviceVersion : LoadTestingServiceVersion.getLatest(); LoadTestingClientImpl client = new LoadTestingClientImpl( - pipeline, JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion); + localPipeline, JacksonAdapter.createDefaultSerializerAdapter(), endpoint, localServiceVersion); return client; } @@ -237,28 +229,23 @@ private LoadTestingClientImpl buildInnerClient() { private HttpPipeline createHttpPipeline() { Configuration buildConfiguration = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration; - if (httpLogOptions == null) { - httpLogOptions = new HttpLogOptions(); - } - if (clientOptions == null) { - clientOptions = new ClientOptions(); - } + HttpLogOptions localHttpLogOptions = this.httpLogOptions == null ? new HttpLogOptions() : this.httpLogOptions; + ClientOptions localClientOptions = this.clientOptions == null ? new ClientOptions() : this.clientOptions; List policies = new ArrayList<>(); - String clientName = properties.getOrDefault(SDK_NAME, "UnknownName"); - String clientVersion = properties.getOrDefault(SDK_VERSION, "UnknownVersion"); - String applicationId = CoreUtils.getApplicationId(clientOptions, httpLogOptions); + String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + String applicationId = CoreUtils.getApplicationId(localClientOptions, localHttpLogOptions); policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); policies.add(new RequestIdPolicy()); policies.add(new AddHeadersFromContextPolicy()); HttpHeaders headers = new HttpHeaders(); - clientOptions.getHeaders().forEach(header -> headers.set(header.getName(), header.getValue())); + localClientOptions.getHeaders().forEach(header -> headers.set(header.getName(), header.getValue())); if (headers.getSize() > 0) { policies.add(new AddHeadersPolicy(headers)); } - policies.addAll( - this.pipelinePolicies.stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) - .collect(Collectors.toList())); + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .forEach(p -> policies.add(p)); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions, new RetryPolicy())); policies.add(new AddDatePolicy()); @@ -266,17 +253,16 @@ private HttpPipeline createHttpPipeline() { if (tokenCredential != null) { policies.add(new BearerTokenAuthenticationPolicy(tokenCredential, DEFAULT_SCOPES)); } - policies.addAll( - this.pipelinePolicies.stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) - .collect(Collectors.toList())); + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .forEach(p -> policies.add(p)); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); HttpPipeline httpPipeline = new HttpPipelineBuilder() .policies(policies.toArray(new HttpPipelinePolicy[0])) .httpClient(httpClient) - .clientOptions(clientOptions) + .clientOptions(localClientOptions) .build(); return httpPipeline; } @@ -298,6 +284,10 @@ public LoadTestRunAsyncClient buildAsyncClient() { */ @Generated public LoadTestRunClient buildClient() { - return new LoadTestRunClient(new LoadTestRunAsyncClient(buildInnerClient().getLoadTestRuns())); + return new LoadTestRunClient(buildInnerClient().getLoadTestRuns()); } + + @Generated + private static final Map PROPERTIES = + CoreUtils.getProperties("azure-developer-loadtesting.properties"); } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestingServiceVersion.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestingServiceVersion.java index d52d31a275f4..a0f4d423449e 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestingServiceVersion.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestingServiceVersion.java @@ -17,6 +17,7 @@ public enum LoadTestingServiceVersion implements ServiceVersion { this.version = version; } + /** {@inheritDoc} */ @Override public String getVersion() { return this.version; diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/implementation/LoadTestAdministrationsImpl.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/implementation/LoadTestAdministrationsImpl.java index 8defcce4dbf7..4b5349389536 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/implementation/LoadTestAdministrationsImpl.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/implementation/LoadTestAdministrationsImpl.java @@ -64,7 +64,7 @@ public final class LoadTestAdministrationsImpl { */ @Host("https://{Endpoint}") @ServiceInterface(name = "LoadTestingClientLoa") - private interface LoadTestAdministrationsService { + public interface LoadTestAdministrationsService { @Patch("/tests/{testId}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType( @@ -86,6 +86,27 @@ Mono> createOrUpdateTest( RequestOptions requestOptions, Context context); + @Patch("/tests/{testId}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType( + value = ClientAuthenticationException.class, + code = {401}) + @UnexpectedResponseExceptionType( + value = ResourceNotFoundException.class, + code = {404}) + @UnexpectedResponseExceptionType( + value = ResourceModifiedException.class, + code = {409}) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response createOrUpdateTestSync( + @HostParam("Endpoint") String endpoint, + @PathParam("testId") String testId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/merge-patch+json") BinaryData body, + @HeaderParam("Accept") String accept, + RequestOptions requestOptions, + Context context); + @Delete("/tests/{testId}") @ExpectedResponses({204}) @UnexpectedResponseExceptionType( @@ -106,6 +127,26 @@ Mono> deleteTest( RequestOptions requestOptions, Context context); + @Delete("/tests/{testId}") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType( + value = ClientAuthenticationException.class, + code = {401}) + @UnexpectedResponseExceptionType( + value = ResourceNotFoundException.class, + code = {404}) + @UnexpectedResponseExceptionType( + value = ResourceModifiedException.class, + code = {409}) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response deleteTestSync( + @HostParam("Endpoint") String endpoint, + @PathParam("testId") String testId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + RequestOptions requestOptions, + Context context); + @Get("/tests/{testId}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType( @@ -126,6 +167,26 @@ Mono> getTest( RequestOptions requestOptions, Context context); + @Get("/tests/{testId}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType( + value = ClientAuthenticationException.class, + code = {401}) + @UnexpectedResponseExceptionType( + value = ResourceNotFoundException.class, + code = {404}) + @UnexpectedResponseExceptionType( + value = ResourceModifiedException.class, + code = {409}) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getTestSync( + @HostParam("Endpoint") String endpoint, + @PathParam("testId") String testId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + RequestOptions requestOptions, + Context context); + @Get("/tests") @ExpectedResponses({200}) @UnexpectedResponseExceptionType( @@ -145,6 +206,25 @@ Mono> listTests( RequestOptions requestOptions, Context context); + @Get("/tests") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType( + value = ClientAuthenticationException.class, + code = {401}) + @UnexpectedResponseExceptionType( + value = ResourceNotFoundException.class, + code = {404}) + @UnexpectedResponseExceptionType( + value = ResourceModifiedException.class, + code = {409}) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listTestsSync( + @HostParam("Endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + RequestOptions requestOptions, + Context context); + @Put("/tests/{testId}/files/{fileName}") @ExpectedResponses({201}) @UnexpectedResponseExceptionType( @@ -167,6 +247,28 @@ Mono> uploadTestFile( RequestOptions requestOptions, Context context); + @Put("/tests/{testId}/files/{fileName}") + @ExpectedResponses({201}) + @UnexpectedResponseExceptionType( + value = ClientAuthenticationException.class, + code = {401}) + @UnexpectedResponseExceptionType( + value = ResourceNotFoundException.class, + code = {404}) + @UnexpectedResponseExceptionType( + value = ResourceModifiedException.class, + code = {409}) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response uploadTestFileSync( + @HostParam("Endpoint") String endpoint, + @PathParam("testId") String testId, + @PathParam("fileName") String fileName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/octet-stream") BinaryData body, + @HeaderParam("Accept") String accept, + RequestOptions requestOptions, + Context context); + @Get("/tests/{testId}/files/{fileName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType( @@ -188,6 +290,27 @@ Mono> getTestFile( RequestOptions requestOptions, Context context); + @Get("/tests/{testId}/files/{fileName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType( + value = ClientAuthenticationException.class, + code = {401}) + @UnexpectedResponseExceptionType( + value = ResourceNotFoundException.class, + code = {404}) + @UnexpectedResponseExceptionType( + value = ResourceModifiedException.class, + code = {409}) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getTestFileSync( + @HostParam("Endpoint") String endpoint, + @PathParam("testId") String testId, + @PathParam("fileName") String fileName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + RequestOptions requestOptions, + Context context); + @Delete("/tests/{testId}/files/{fileName}") @ExpectedResponses({204}) @UnexpectedResponseExceptionType( @@ -209,6 +332,27 @@ Mono> deleteTestFile( RequestOptions requestOptions, Context context); + @Delete("/tests/{testId}/files/{fileName}") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType( + value = ClientAuthenticationException.class, + code = {401}) + @UnexpectedResponseExceptionType( + value = ResourceNotFoundException.class, + code = {404}) + @UnexpectedResponseExceptionType( + value = ResourceModifiedException.class, + code = {409}) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response deleteTestFileSync( + @HostParam("Endpoint") String endpoint, + @PathParam("testId") String testId, + @PathParam("fileName") String fileName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + RequestOptions requestOptions, + Context context); + @Get("/tests/{testId}/files") @ExpectedResponses({200}) @UnexpectedResponseExceptionType( @@ -229,6 +373,26 @@ Mono> listTestFiles( RequestOptions requestOptions, Context context); + @Get("/tests/{testId}/files") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType( + value = ClientAuthenticationException.class, + code = {401}) + @UnexpectedResponseExceptionType( + value = ResourceNotFoundException.class, + code = {404}) + @UnexpectedResponseExceptionType( + value = ResourceModifiedException.class, + code = {409}) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listTestFilesSync( + @HostParam("Endpoint") String endpoint, + @PathParam("testId") String testId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + RequestOptions requestOptions, + Context context); + @Patch("/tests/{testId}/app-components") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType( @@ -250,6 +414,27 @@ Mono> createOrUpdateAppComponents( RequestOptions requestOptions, Context context); + @Patch("/tests/{testId}/app-components") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType( + value = ClientAuthenticationException.class, + code = {401}) + @UnexpectedResponseExceptionType( + value = ResourceNotFoundException.class, + code = {404}) + @UnexpectedResponseExceptionType( + value = ResourceModifiedException.class, + code = {409}) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response createOrUpdateAppComponentsSync( + @HostParam("Endpoint") String endpoint, + @PathParam("testId") String testId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/merge-patch+json") BinaryData body, + @HeaderParam("Accept") String accept, + RequestOptions requestOptions, + Context context); + @Get("/tests/{testId}/app-components") @ExpectedResponses({200}) @UnexpectedResponseExceptionType( @@ -270,6 +455,26 @@ Mono> getAppComponents( RequestOptions requestOptions, Context context); + @Get("/tests/{testId}/app-components") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType( + value = ClientAuthenticationException.class, + code = {401}) + @UnexpectedResponseExceptionType( + value = ResourceNotFoundException.class, + code = {404}) + @UnexpectedResponseExceptionType( + value = ResourceModifiedException.class, + code = {409}) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getAppComponentsSync( + @HostParam("Endpoint") String endpoint, + @PathParam("testId") String testId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + RequestOptions requestOptions, + Context context); + @Patch("/tests/{testId}/server-metrics-config") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType( @@ -291,6 +496,27 @@ Mono> createOrUpdateServerMetricsConfig( RequestOptions requestOptions, Context context); + @Patch("/tests/{testId}/server-metrics-config") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType( + value = ClientAuthenticationException.class, + code = {401}) + @UnexpectedResponseExceptionType( + value = ResourceNotFoundException.class, + code = {404}) + @UnexpectedResponseExceptionType( + value = ResourceModifiedException.class, + code = {409}) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response createOrUpdateServerMetricsConfigSync( + @HostParam("Endpoint") String endpoint, + @PathParam("testId") String testId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/merge-patch+json") BinaryData body, + @HeaderParam("Accept") String accept, + RequestOptions requestOptions, + Context context); + @Get("/tests/{testId}/server-metrics-config") @ExpectedResponses({200}) @UnexpectedResponseExceptionType( @@ -311,6 +537,26 @@ Mono> getServerMetricsConfig( RequestOptions requestOptions, Context context); + @Get("/tests/{testId}/server-metrics-config") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType( + value = ClientAuthenticationException.class, + code = {401}) + @UnexpectedResponseExceptionType( + value = ResourceNotFoundException.class, + code = {404}) + @UnexpectedResponseExceptionType( + value = ResourceModifiedException.class, + code = {409}) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getServerMetricsConfigSync( + @HostParam("Endpoint") String endpoint, + @PathParam("testId") String testId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + RequestOptions requestOptions, + Context context); + @Get("{nextLink}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType( @@ -330,6 +576,25 @@ Mono> listTestsNext( RequestOptions requestOptions, Context context); + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType( + value = ClientAuthenticationException.class, + code = {401}) + @UnexpectedResponseExceptionType( + value = ResourceNotFoundException.class, + code = {404}) + @UnexpectedResponseExceptionType( + value = ResourceModifiedException.class, + code = {409}) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listTestsNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("Endpoint") String endpoint, + @HeaderParam("Accept") String accept, + RequestOptions requestOptions, + Context context); + @Get("{nextLink}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType( @@ -348,11 +613,30 @@ Mono> listTestFilesNext( @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); - } - /** - * Create a new test or update an existing test. - * + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType( + value = ClientAuthenticationException.class, + code = {401}) + @UnexpectedResponseExceptionType( + value = ResourceNotFoundException.class, + code = {404}) + @UnexpectedResponseExceptionType( + value = ResourceModifiedException.class, + code = {409}) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listTestFilesNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("Endpoint") String endpoint, + @HeaderParam("Accept") String accept, + RequestOptions requestOptions, + Context context); + } + + /** + * Create a new test or update an existing test. + * *

Request Body Schema * *

{@code
@@ -674,188 +958,24 @@ public Mono> createOrUpdateTestWithResponseAsync(
      *     hyphen characters.
      * @param body Load test model.
      * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
-     * @param context The context to associate with this operation.
      * @throws HttpResponseException thrown if the request is rejected by server.
      * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
      * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
      * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
-     * @return load test model along with {@link Response} on successful completion of {@link Mono}.
+     * @return load test model along with {@link Response}.
      */
     @ServiceMethod(returns = ReturnType.SINGLE)
-    public Mono> createOrUpdateTestWithResponseAsync(
-            String testId, BinaryData body, RequestOptions requestOptions, Context context) {
+    public Response createOrUpdateTestWithResponse(
+            String testId, BinaryData body, RequestOptions requestOptions) {
         final String accept = "application/json";
-        return service.createOrUpdateTest(
+        return service.createOrUpdateTestSync(
                 this.client.getEndpoint(),
                 testId,
                 this.client.getServiceVersion().getVersion(),
                 body,
                 accept,
                 requestOptions,
-                context);
-    }
-
-    /**
-     * Create a new test or update an existing test.
-     *
-     * 

Request Body Schema - * - *

{@code
-     * {
-     *     passFailCriteria (Optional): {
-     *         passFailMetrics (Optional): {
-     *             String (Optional): {
-     *                 clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
-     *                 aggregate: String(count/percentage/avg/p50/p90/p95/p99/min/max) (Optional)
-     *                 condition: String (Optional)
-     *                 requestName: String (Optional)
-     *                 value: Double (Optional)
-     *                 action: String(continue/stop) (Optional)
-     *                 actualValue: Double (Optional)
-     *                 result: String(passed/undetermined/failed) (Optional)
-     *             }
-     *         }
-     *     }
-     *     secrets (Optional): {
-     *         String (Optional): {
-     *             value: String (Optional)
-     *             type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
-     *         }
-     *     }
-     *     certificate (Optional): {
-     *         value: String (Optional)
-     *         type: String(AKV_CERT_URI) (Optional)
-     *         name: String (Optional)
-     *     }
-     *     environmentVariables (Optional): {
-     *         String: String (Optional)
-     *     }
-     *     loadTestConfiguration (Optional): {
-     *         engineInstances: Integer (Optional)
-     *         splitAllCSVs: Boolean (Optional)
-     *         quickStartTest: Boolean (Optional)
-     *         optionalLoadTestConfig (Optional): {
-     *             endpointUrl: String (Optional)
-     *             virtualUsers: Integer (Optional)
-     *             rampUpTime: Integer (Optional)
-     *             duration: Integer (Optional)
-     *         }
-     *     }
-     *     inputArtifacts (Optional): {
-     *         configFileInfo (Optional): {
-     *             url: String (Optional)
-     *             fileName: String (Optional)
-     *             fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
-     *             expireDateTime: OffsetDateTime (Optional)
-     *             validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
-     *             validationFailureDetails: String (Optional)
-     *         }
-     *         testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
-     *         userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
-     *         inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
-     *         additionalFileInfo (Optional): [
-     *             (recursive schema, see above)
-     *         ]
-     *     }
-     *     testId: String (Optional)
-     *     description: String (Optional)
-     *     displayName: String (Optional)
-     *     subnetId: String (Optional)
-     *     keyvaultReferenceIdentityType: String (Optional)
-     *     keyvaultReferenceIdentityId: String (Optional)
-     *     createdDateTime: OffsetDateTime (Optional)
-     *     createdBy: String (Optional)
-     *     lastModifiedDateTime: OffsetDateTime (Optional)
-     *     lastModifiedBy: String (Optional)
-     * }
-     * }
- * - *

Response Body Schema - * - *

{@code
-     * {
-     *     passFailCriteria (Optional): {
-     *         passFailMetrics (Optional): {
-     *             String (Optional): {
-     *                 clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
-     *                 aggregate: String(count/percentage/avg/p50/p90/p95/p99/min/max) (Optional)
-     *                 condition: String (Optional)
-     *                 requestName: String (Optional)
-     *                 value: Double (Optional)
-     *                 action: String(continue/stop) (Optional)
-     *                 actualValue: Double (Optional)
-     *                 result: String(passed/undetermined/failed) (Optional)
-     *             }
-     *         }
-     *     }
-     *     secrets (Optional): {
-     *         String (Optional): {
-     *             value: String (Optional)
-     *             type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
-     *         }
-     *     }
-     *     certificate (Optional): {
-     *         value: String (Optional)
-     *         type: String(AKV_CERT_URI) (Optional)
-     *         name: String (Optional)
-     *     }
-     *     environmentVariables (Optional): {
-     *         String: String (Optional)
-     *     }
-     *     loadTestConfiguration (Optional): {
-     *         engineInstances: Integer (Optional)
-     *         splitAllCSVs: Boolean (Optional)
-     *         quickStartTest: Boolean (Optional)
-     *         optionalLoadTestConfig (Optional): {
-     *             endpointUrl: String (Optional)
-     *             virtualUsers: Integer (Optional)
-     *             rampUpTime: Integer (Optional)
-     *             duration: Integer (Optional)
-     *         }
-     *     }
-     *     inputArtifacts (Optional): {
-     *         configFileInfo (Optional): {
-     *             url: String (Optional)
-     *             fileName: String (Optional)
-     *             fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
-     *             expireDateTime: OffsetDateTime (Optional)
-     *             validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
-     *             validationFailureDetails: String (Optional)
-     *         }
-     *         testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
-     *         userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
-     *         inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
-     *         additionalFileInfo (Optional): [
-     *             (recursive schema, see above)
-     *         ]
-     *     }
-     *     testId: String (Optional)
-     *     description: String (Optional)
-     *     displayName: String (Optional)
-     *     subnetId: String (Optional)
-     *     keyvaultReferenceIdentityType: String (Optional)
-     *     keyvaultReferenceIdentityId: String (Optional)
-     *     createdDateTime: OffsetDateTime (Optional)
-     *     createdBy: String (Optional)
-     *     lastModifiedDateTime: OffsetDateTime (Optional)
-     *     lastModifiedBy: String (Optional)
-     * }
-     * }
- * - * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or - * hyphen characters. - * @param body Load test model. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return load test model along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateTestWithResponse( - String testId, BinaryData body, RequestOptions requestOptions) { - return createOrUpdateTestWithResponseAsync(testId, body, requestOptions).block(); + Context.NONE); } /** @@ -890,41 +1010,22 @@ public Mono> deleteTestWithResponseAsync(String testId, RequestOp * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or * hyphen characters. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @param context The context to associate with this operation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteTestWithResponseAsync( - String testId, RequestOptions requestOptions, Context context) { + public Response deleteTestWithResponse(String testId, RequestOptions requestOptions) { final String accept = "application/json"; - return service.deleteTest( + return service.deleteTestSync( this.client.getEndpoint(), testId, this.client.getServiceVersion().getVersion(), accept, requestOptions, - context); - } - - /** - * Delete a test by its name. - * - * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or - * hyphen characters. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteTestWithResponse(String testId, RequestOptions requestOptions) { - return deleteTestWithResponseAsync(testId, requestOptions).block(); + Context.NONE); } /** @@ -1103,28 +1204,41 @@ public Mono> getTestWithResponseAsync(String testId, Reques * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or * hyphen characters. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @param context The context to associate with this operation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return load test details by test name along with {@link Response} on successful completion of {@link Mono}. + * @return load test details by test name along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getTestWithResponseAsync( - String testId, RequestOptions requestOptions, Context context) { + public Response getTestWithResponse(String testId, RequestOptions requestOptions) { final String accept = "application/json"; - return service.getTest( + return service.getTestSync( this.client.getEndpoint(), testId, this.client.getServiceVersion().getVersion(), accept, requestOptions, - context); + Context.NONE); } /** - * Get load test details by test name. + * Get all load tests by the fully qualified resource Id e.g + * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}. + * + *

Query Parameters + * + * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
orderbyStringNoSort on the supported fields in (field asc/desc) format. eg: lastModifiedDateTime asc. Supported fields - lastModifiedDateTime
searchStringNoPrefix based, case sensitive search on searchable fields - displayName, createdBy. For example, to search for a test, with display name is Login Test, the search parameter can be Login.
lastModifiedStartTimeOffsetDateTimeNoStart DateTime(ISO 8601 literal format) of the last updated time range to filter tests.
lastModifiedEndTimeOffsetDateTimeNoEnd DateTime(ISO 8601 literal format) of the last updated time range to filter tests.
maxpagesizeIntegerNoNumber of results in response.
+ * + * You can add these to a request with {@link RequestOptions#addQueryParam} * *

Response Body Schema * @@ -1198,115 +1312,6 @@ public Mono> getTestWithResponseAsync( * } * }

* - * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or - * hyphen characters. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return load test details by test name along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getTestWithResponse(String testId, RequestOptions requestOptions) { - return getTestWithResponseAsync(testId, requestOptions).block(); - } - - /** - * Get all load tests by the fully qualified resource Id e.g - * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}. - * - *

Query Parameters - * - * - * - * - * - * - * - * - * - *
Query Parameters
NameTypeRequiredDescription
orderbyStringNoSort on the supported fields in (field asc/desc) format. eg: lastModifiedDateTime asc. Supported fields - lastModifiedDateTime
searchStringNoPrefix based, case sensitive search on searchable fields - displayName, createdBy. For example, to search for a test, with display name is Login Test, the search parameter can be Login.
lastModifiedStartTimeOffsetDateTimeNoStart DateTime(ISO 8601 literal format) of the last updated time range to filter tests.
lastModifiedEndTimeOffsetDateTimeNoEnd DateTime(ISO 8601 literal format) of the last updated time range to filter tests.
maxpagesizeIntegerNoNumber of results in response.
- * - * You can add these to a request with {@link RequestOptions#addQueryParam} - * - *

Response Body Schema - * - *

{@code
-     * {
-     *     value (Required): [
-     *          (Required){
-     *             passFailCriteria (Optional): {
-     *                 passFailMetrics (Optional): {
-     *                     String (Optional): {
-     *                         clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
-     *                         aggregate: String(count/percentage/avg/p50/p90/p95/p99/min/max) (Optional)
-     *                         condition: String (Optional)
-     *                         requestName: String (Optional)
-     *                         value: Double (Optional)
-     *                         action: String(continue/stop) (Optional)
-     *                         actualValue: Double (Optional)
-     *                         result: String(passed/undetermined/failed) (Optional)
-     *                     }
-     *                 }
-     *             }
-     *             secrets (Optional): {
-     *                 String (Optional): {
-     *                     value: String (Optional)
-     *                     type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
-     *                 }
-     *             }
-     *             certificate (Optional): {
-     *                 value: String (Optional)
-     *                 type: String(AKV_CERT_URI) (Optional)
-     *                 name: String (Optional)
-     *             }
-     *             environmentVariables (Optional): {
-     *                 String: String (Optional)
-     *             }
-     *             loadTestConfiguration (Optional): {
-     *                 engineInstances: Integer (Optional)
-     *                 splitAllCSVs: Boolean (Optional)
-     *                 quickStartTest: Boolean (Optional)
-     *                 optionalLoadTestConfig (Optional): {
-     *                     endpointUrl: String (Optional)
-     *                     virtualUsers: Integer (Optional)
-     *                     rampUpTime: Integer (Optional)
-     *                     duration: Integer (Optional)
-     *                 }
-     *             }
-     *             inputArtifacts (Optional): {
-     *                 configFileInfo (Optional): {
-     *                     url: String (Optional)
-     *                     fileName: String (Optional)
-     *                     fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
-     *                     expireDateTime: OffsetDateTime (Optional)
-     *                     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
-     *                     validationFailureDetails: String (Optional)
-     *                 }
-     *                 testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
-     *                 userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
-     *                 inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
-     *                 additionalFileInfo (Optional): [
-     *                     (recursive schema, see above)
-     *                 ]
-     *             }
-     *             testId: String (Optional)
-     *             description: String (Optional)
-     *             displayName: String (Optional)
-     *             subnetId: String (Optional)
-     *             keyvaultReferenceIdentityType: String (Optional)
-     *             keyvaultReferenceIdentityId: String (Optional)
-     *             createdDateTime: OffsetDateTime (Optional)
-     *             createdBy: String (Optional)
-     *             lastModifiedDateTime: OffsetDateTime (Optional)
-     *             lastModifiedBy: String (Optional)
-     *         }
-     *     ]
-     *     nextLink: String (Optional)
-     * }
-     * }
- * * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -1317,7 +1322,7 @@ public Response getTestWithResponse(String testId, RequestOptions re * {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listTestsSinglePageAsync(RequestOptions requestOptions) { + private Mono> listTestsSinglePageAsync(RequestOptions requestOptions) { final String accept = "application/json"; return FluxUtil.withContext( context -> @@ -1360,201 +1365,71 @@ public Mono> listTestsSinglePageAsync(RequestOptions r * *
{@code
      * {
-     *     value (Required): [
-     *          (Required){
-     *             passFailCriteria (Optional): {
-     *                 passFailMetrics (Optional): {
-     *                     String (Optional): {
-     *                         clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
-     *                         aggregate: String(count/percentage/avg/p50/p90/p95/p99/min/max) (Optional)
-     *                         condition: String (Optional)
-     *                         requestName: String (Optional)
-     *                         value: Double (Optional)
-     *                         action: String(continue/stop) (Optional)
-     *                         actualValue: Double (Optional)
-     *                         result: String(passed/undetermined/failed) (Optional)
-     *                     }
-     *                 }
-     *             }
-     *             secrets (Optional): {
-     *                 String (Optional): {
-     *                     value: String (Optional)
-     *                     type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
-     *                 }
-     *             }
-     *             certificate (Optional): {
-     *                 value: String (Optional)
-     *                 type: String(AKV_CERT_URI) (Optional)
-     *                 name: String (Optional)
-     *             }
-     *             environmentVariables (Optional): {
-     *                 String: String (Optional)
-     *             }
-     *             loadTestConfiguration (Optional): {
-     *                 engineInstances: Integer (Optional)
-     *                 splitAllCSVs: Boolean (Optional)
-     *                 quickStartTest: Boolean (Optional)
-     *                 optionalLoadTestConfig (Optional): {
-     *                     endpointUrl: String (Optional)
-     *                     virtualUsers: Integer (Optional)
-     *                     rampUpTime: Integer (Optional)
-     *                     duration: Integer (Optional)
-     *                 }
-     *             }
-     *             inputArtifacts (Optional): {
-     *                 configFileInfo (Optional): {
-     *                     url: String (Optional)
-     *                     fileName: String (Optional)
-     *                     fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
-     *                     expireDateTime: OffsetDateTime (Optional)
-     *                     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
-     *                     validationFailureDetails: String (Optional)
-     *                 }
-     *                 testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
-     *                 userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
-     *                 inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
-     *                 additionalFileInfo (Optional): [
-     *                     (recursive schema, see above)
-     *                 ]
+     *     passFailCriteria (Optional): {
+     *         passFailMetrics (Optional): {
+     *             String (Optional): {
+     *                 clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
+     *                 aggregate: String(count/percentage/avg/p50/p90/p95/p99/min/max) (Optional)
+     *                 condition: String (Optional)
+     *                 requestName: String (Optional)
+     *                 value: Double (Optional)
+     *                 action: String(continue/stop) (Optional)
+     *                 actualValue: Double (Optional)
+     *                 result: String(passed/undetermined/failed) (Optional)
      *             }
-     *             testId: String (Optional)
-     *             description: String (Optional)
-     *             displayName: String (Optional)
-     *             subnetId: String (Optional)
-     *             keyvaultReferenceIdentityType: String (Optional)
-     *             keyvaultReferenceIdentityId: String (Optional)
-     *             createdDateTime: OffsetDateTime (Optional)
-     *             createdBy: String (Optional)
-     *             lastModifiedDateTime: OffsetDateTime (Optional)
-     *             lastModifiedBy: String (Optional)
      *         }
-     *     ]
-     *     nextLink: String (Optional)
-     * }
-     * }
- * - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @param context The context to associate with this operation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return all load tests by the fully qualified resource Id e.g - * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName} along with - * {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listTestsSinglePageAsync(RequestOptions requestOptions, Context context) { - final String accept = "application/json"; - return service.listTests( - this.client.getEndpoint(), - this.client.getServiceVersion().getVersion(), - accept, - requestOptions, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - getValues(res.getValue(), "value"), - getNextLink(res.getValue(), "nextLink"), - null)); - } - - /** - * Get all load tests by the fully qualified resource Id e.g - * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}. - * - *

Query Parameters - * - * - * - * - * - * - * - * - * - *
Query Parameters
NameTypeRequiredDescription
orderbyStringNoSort on the supported fields in (field asc/desc) format. eg: lastModifiedDateTime asc. Supported fields - lastModifiedDateTime
searchStringNoPrefix based, case sensitive search on searchable fields - displayName, createdBy. For example, to search for a test, with display name is Login Test, the search parameter can be Login.
lastModifiedStartTimeOffsetDateTimeNoStart DateTime(ISO 8601 literal format) of the last updated time range to filter tests.
lastModifiedEndTimeOffsetDateTimeNoEnd DateTime(ISO 8601 literal format) of the last updated time range to filter tests.
maxpagesizeIntegerNoNumber of results in response.
- * - * You can add these to a request with {@link RequestOptions#addQueryParam} - * - *

Response Body Schema - * - *

{@code
-     * {
-     *     value (Required): [
-     *          (Required){
-     *             passFailCriteria (Optional): {
-     *                 passFailMetrics (Optional): {
-     *                     String (Optional): {
-     *                         clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
-     *                         aggregate: String(count/percentage/avg/p50/p90/p95/p99/min/max) (Optional)
-     *                         condition: String (Optional)
-     *                         requestName: String (Optional)
-     *                         value: Double (Optional)
-     *                         action: String(continue/stop) (Optional)
-     *                         actualValue: Double (Optional)
-     *                         result: String(passed/undetermined/failed) (Optional)
-     *                     }
-     *                 }
-     *             }
-     *             secrets (Optional): {
-     *                 String (Optional): {
-     *                     value: String (Optional)
-     *                     type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
-     *                 }
-     *             }
-     *             certificate (Optional): {
-     *                 value: String (Optional)
-     *                 type: String(AKV_CERT_URI) (Optional)
-     *                 name: String (Optional)
-     *             }
-     *             environmentVariables (Optional): {
-     *                 String: String (Optional)
-     *             }
-     *             loadTestConfiguration (Optional): {
-     *                 engineInstances: Integer (Optional)
-     *                 splitAllCSVs: Boolean (Optional)
-     *                 quickStartTest: Boolean (Optional)
-     *                 optionalLoadTestConfig (Optional): {
-     *                     endpointUrl: String (Optional)
-     *                     virtualUsers: Integer (Optional)
-     *                     rampUpTime: Integer (Optional)
-     *                     duration: Integer (Optional)
-     *                 }
-     *             }
-     *             inputArtifacts (Optional): {
-     *                 configFileInfo (Optional): {
-     *                     url: String (Optional)
-     *                     fileName: String (Optional)
-     *                     fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
-     *                     expireDateTime: OffsetDateTime (Optional)
-     *                     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
-     *                     validationFailureDetails: String (Optional)
-     *                 }
-     *                 testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
-     *                 userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
-     *                 inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
-     *                 additionalFileInfo (Optional): [
-     *                     (recursive schema, see above)
-     *                 ]
-     *             }
-     *             testId: String (Optional)
-     *             description: String (Optional)
-     *             displayName: String (Optional)
-     *             subnetId: String (Optional)
-     *             keyvaultReferenceIdentityType: String (Optional)
-     *             keyvaultReferenceIdentityId: String (Optional)
-     *             createdDateTime: OffsetDateTime (Optional)
-     *             createdBy: String (Optional)
-     *             lastModifiedDateTime: OffsetDateTime (Optional)
-     *             lastModifiedBy: String (Optional)
+     *     }
+     *     secrets (Optional): {
+     *         String (Optional): {
+     *             value: String (Optional)
+     *             type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
+     *         }
+     *     }
+     *     certificate (Optional): {
+     *         value: String (Optional)
+     *         type: String(AKV_CERT_URI) (Optional)
+     *         name: String (Optional)
+     *     }
+     *     environmentVariables (Optional): {
+     *         String: String (Optional)
+     *     }
+     *     loadTestConfiguration (Optional): {
+     *         engineInstances: Integer (Optional)
+     *         splitAllCSVs: Boolean (Optional)
+     *         quickStartTest: Boolean (Optional)
+     *         optionalLoadTestConfig (Optional): {
+     *             endpointUrl: String (Optional)
+     *             virtualUsers: Integer (Optional)
+     *             rampUpTime: Integer (Optional)
+     *             duration: Integer (Optional)
      *         }
-     *     ]
-     *     nextLink: String (Optional)
+     *     }
+     *     inputArtifacts (Optional): {
+     *         configFileInfo (Optional): {
+     *             url: String (Optional)
+     *             fileName: String (Optional)
+     *             fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
+     *             expireDateTime: OffsetDateTime (Optional)
+     *             validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
+     *             validationFailureDetails: String (Optional)
+     *         }
+     *         testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
+     *         userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
+     *         inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
+     *         additionalFileInfo (Optional): [
+     *             (recursive schema, see above)
+     *         ]
+     *     }
+     *     testId: String (Optional)
+     *     description: String (Optional)
+     *     displayName: String (Optional)
+     *     subnetId: String (Optional)
+     *     keyvaultReferenceIdentityType: String (Optional)
+     *     keyvaultReferenceIdentityId: String (Optional)
+     *     createdDateTime: OffsetDateTime (Optional)
+     *     createdBy: String (Optional)
+     *     lastModifiedDateTime: OffsetDateTime (Optional)
+     *     lastModifiedBy: String (Optional)
      * }
      * }
* @@ -1601,99 +1476,100 @@ public PagedFlux listTestsAsync(RequestOptions requestOptions) { * *
{@code
      * {
-     *     value (Required): [
-     *          (Required){
-     *             passFailCriteria (Optional): {
-     *                 passFailMetrics (Optional): {
-     *                     String (Optional): {
-     *                         clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
-     *                         aggregate: String(count/percentage/avg/p50/p90/p95/p99/min/max) (Optional)
-     *                         condition: String (Optional)
-     *                         requestName: String (Optional)
-     *                         value: Double (Optional)
-     *                         action: String(continue/stop) (Optional)
-     *                         actualValue: Double (Optional)
-     *                         result: String(passed/undetermined/failed) (Optional)
-     *                     }
-     *                 }
-     *             }
-     *             secrets (Optional): {
-     *                 String (Optional): {
-     *                     value: String (Optional)
-     *                     type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
-     *                 }
-     *             }
-     *             certificate (Optional): {
-     *                 value: String (Optional)
-     *                 type: String(AKV_CERT_URI) (Optional)
-     *                 name: String (Optional)
-     *             }
-     *             environmentVariables (Optional): {
-     *                 String: String (Optional)
-     *             }
-     *             loadTestConfiguration (Optional): {
-     *                 engineInstances: Integer (Optional)
-     *                 splitAllCSVs: Boolean (Optional)
-     *                 quickStartTest: Boolean (Optional)
-     *                 optionalLoadTestConfig (Optional): {
-     *                     endpointUrl: String (Optional)
-     *                     virtualUsers: Integer (Optional)
-     *                     rampUpTime: Integer (Optional)
-     *                     duration: Integer (Optional)
-     *                 }
-     *             }
-     *             inputArtifacts (Optional): {
-     *                 configFileInfo (Optional): {
-     *                     url: String (Optional)
-     *                     fileName: String (Optional)
-     *                     fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
-     *                     expireDateTime: OffsetDateTime (Optional)
-     *                     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
-     *                     validationFailureDetails: String (Optional)
-     *                 }
-     *                 testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
-     *                 userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
-     *                 inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
-     *                 additionalFileInfo (Optional): [
-     *                     (recursive schema, see above)
-     *                 ]
+     *     passFailCriteria (Optional): {
+     *         passFailMetrics (Optional): {
+     *             String (Optional): {
+     *                 clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
+     *                 aggregate: String(count/percentage/avg/p50/p90/p95/p99/min/max) (Optional)
+     *                 condition: String (Optional)
+     *                 requestName: String (Optional)
+     *                 value: Double (Optional)
+     *                 action: String(continue/stop) (Optional)
+     *                 actualValue: Double (Optional)
+     *                 result: String(passed/undetermined/failed) (Optional)
      *             }
-     *             testId: String (Optional)
-     *             description: String (Optional)
-     *             displayName: String (Optional)
-     *             subnetId: String (Optional)
-     *             keyvaultReferenceIdentityType: String (Optional)
-     *             keyvaultReferenceIdentityId: String (Optional)
-     *             createdDateTime: OffsetDateTime (Optional)
-     *             createdBy: String (Optional)
-     *             lastModifiedDateTime: OffsetDateTime (Optional)
-     *             lastModifiedBy: String (Optional)
      *         }
-     *     ]
-     *     nextLink: String (Optional)
+     *     }
+     *     secrets (Optional): {
+     *         String (Optional): {
+     *             value: String (Optional)
+     *             type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
+     *         }
+     *     }
+     *     certificate (Optional): {
+     *         value: String (Optional)
+     *         type: String(AKV_CERT_URI) (Optional)
+     *         name: String (Optional)
+     *     }
+     *     environmentVariables (Optional): {
+     *         String: String (Optional)
+     *     }
+     *     loadTestConfiguration (Optional): {
+     *         engineInstances: Integer (Optional)
+     *         splitAllCSVs: Boolean (Optional)
+     *         quickStartTest: Boolean (Optional)
+     *         optionalLoadTestConfig (Optional): {
+     *             endpointUrl: String (Optional)
+     *             virtualUsers: Integer (Optional)
+     *             rampUpTime: Integer (Optional)
+     *             duration: Integer (Optional)
+     *         }
+     *     }
+     *     inputArtifacts (Optional): {
+     *         configFileInfo (Optional): {
+     *             url: String (Optional)
+     *             fileName: String (Optional)
+     *             fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
+     *             expireDateTime: OffsetDateTime (Optional)
+     *             validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
+     *             validationFailureDetails: String (Optional)
+     *         }
+     *         testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
+     *         userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
+     *         inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
+     *         additionalFileInfo (Optional): [
+     *             (recursive schema, see above)
+     *         ]
+     *     }
+     *     testId: String (Optional)
+     *     description: String (Optional)
+     *     displayName: String (Optional)
+     *     subnetId: String (Optional)
+     *     keyvaultReferenceIdentityType: String (Optional)
+     *     keyvaultReferenceIdentityId: String (Optional)
+     *     createdDateTime: OffsetDateTime (Optional)
+     *     createdBy: String (Optional)
+     *     lastModifiedDateTime: OffsetDateTime (Optional)
+     *     lastModifiedBy: String (Optional)
      * }
      * }
* * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @param context The context to associate with this operation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. * @return all load tests by the fully qualified resource Id e.g - * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName} as - * paginated response with {@link PagedFlux}. + * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName} along with + * {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listTestsAsync(RequestOptions requestOptions, Context context) { - RequestOptions requestOptionsForNextPage = new RequestOptions(); - requestOptionsForNextPage.setContext( - requestOptions != null && requestOptions.getContext() != null - ? requestOptions.getContext() - : Context.NONE); - return new PagedFlux<>( - () -> listTestsSinglePageAsync(requestOptions, context), - nextLink -> listTestsNextSinglePageAsync(nextLink, requestOptionsForNextPage, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listTestsSinglePage(RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = + service.listTestsSync( + this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), + accept, + requestOptions, + Context.NONE); + return new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + getValues(res.getValue(), "value"), + getNextLink(res.getValue(), "nextLink"), + null); } /** @@ -1718,76 +1594,71 @@ public PagedFlux listTestsAsync(RequestOptions requestOptions, Conte * *
{@code
      * {
-     *     value (Required): [
-     *          (Required){
-     *             passFailCriteria (Optional): {
-     *                 passFailMetrics (Optional): {
-     *                     String (Optional): {
-     *                         clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
-     *                         aggregate: String(count/percentage/avg/p50/p90/p95/p99/min/max) (Optional)
-     *                         condition: String (Optional)
-     *                         requestName: String (Optional)
-     *                         value: Double (Optional)
-     *                         action: String(continue/stop) (Optional)
-     *                         actualValue: Double (Optional)
-     *                         result: String(passed/undetermined/failed) (Optional)
-     *                     }
-     *                 }
-     *             }
-     *             secrets (Optional): {
-     *                 String (Optional): {
-     *                     value: String (Optional)
-     *                     type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
-     *                 }
-     *             }
-     *             certificate (Optional): {
-     *                 value: String (Optional)
-     *                 type: String(AKV_CERT_URI) (Optional)
-     *                 name: String (Optional)
-     *             }
-     *             environmentVariables (Optional): {
-     *                 String: String (Optional)
-     *             }
-     *             loadTestConfiguration (Optional): {
-     *                 engineInstances: Integer (Optional)
-     *                 splitAllCSVs: Boolean (Optional)
-     *                 quickStartTest: Boolean (Optional)
-     *                 optionalLoadTestConfig (Optional): {
-     *                     endpointUrl: String (Optional)
-     *                     virtualUsers: Integer (Optional)
-     *                     rampUpTime: Integer (Optional)
-     *                     duration: Integer (Optional)
-     *                 }
-     *             }
-     *             inputArtifacts (Optional): {
-     *                 configFileInfo (Optional): {
-     *                     url: String (Optional)
-     *                     fileName: String (Optional)
-     *                     fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
-     *                     expireDateTime: OffsetDateTime (Optional)
-     *                     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
-     *                     validationFailureDetails: String (Optional)
-     *                 }
-     *                 testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
-     *                 userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
-     *                 inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
-     *                 additionalFileInfo (Optional): [
-     *                     (recursive schema, see above)
-     *                 ]
+     *     passFailCriteria (Optional): {
+     *         passFailMetrics (Optional): {
+     *             String (Optional): {
+     *                 clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
+     *                 aggregate: String(count/percentage/avg/p50/p90/p95/p99/min/max) (Optional)
+     *                 condition: String (Optional)
+     *                 requestName: String (Optional)
+     *                 value: Double (Optional)
+     *                 action: String(continue/stop) (Optional)
+     *                 actualValue: Double (Optional)
+     *                 result: String(passed/undetermined/failed) (Optional)
      *             }
-     *             testId: String (Optional)
-     *             description: String (Optional)
-     *             displayName: String (Optional)
-     *             subnetId: String (Optional)
-     *             keyvaultReferenceIdentityType: String (Optional)
-     *             keyvaultReferenceIdentityId: String (Optional)
-     *             createdDateTime: OffsetDateTime (Optional)
-     *             createdBy: String (Optional)
-     *             lastModifiedDateTime: OffsetDateTime (Optional)
-     *             lastModifiedBy: String (Optional)
      *         }
-     *     ]
-     *     nextLink: String (Optional)
+     *     }
+     *     secrets (Optional): {
+     *         String (Optional): {
+     *             value: String (Optional)
+     *             type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
+     *         }
+     *     }
+     *     certificate (Optional): {
+     *         value: String (Optional)
+     *         type: String(AKV_CERT_URI) (Optional)
+     *         name: String (Optional)
+     *     }
+     *     environmentVariables (Optional): {
+     *         String: String (Optional)
+     *     }
+     *     loadTestConfiguration (Optional): {
+     *         engineInstances: Integer (Optional)
+     *         splitAllCSVs: Boolean (Optional)
+     *         quickStartTest: Boolean (Optional)
+     *         optionalLoadTestConfig (Optional): {
+     *             endpointUrl: String (Optional)
+     *             virtualUsers: Integer (Optional)
+     *             rampUpTime: Integer (Optional)
+     *             duration: Integer (Optional)
+     *         }
+     *     }
+     *     inputArtifacts (Optional): {
+     *         configFileInfo (Optional): {
+     *             url: String (Optional)
+     *             fileName: String (Optional)
+     *             fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
+     *             expireDateTime: OffsetDateTime (Optional)
+     *             validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
+     *             validationFailureDetails: String (Optional)
+     *         }
+     *         testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
+     *         userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
+     *         inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
+     *         additionalFileInfo (Optional): [
+     *             (recursive schema, see above)
+     *         ]
+     *     }
+     *     testId: String (Optional)
+     *     description: String (Optional)
+     *     displayName: String (Optional)
+     *     subnetId: String (Optional)
+     *     keyvaultReferenceIdentityType: String (Optional)
+     *     keyvaultReferenceIdentityId: String (Optional)
+     *     createdDateTime: OffsetDateTime (Optional)
+     *     createdBy: String (Optional)
+     *     lastModifiedDateTime: OffsetDateTime (Optional)
+     *     lastModifiedBy: String (Optional)
      * }
      * }
* @@ -1802,7 +1673,14 @@ public PagedFlux listTestsAsync(RequestOptions requestOptions, Conte */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listTests(RequestOptions requestOptions) { - return new PagedIterable<>(listTestsAsync(requestOptions)); + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null + ? requestOptions.getContext() + : Context.NONE); + return new PagedIterable<>( + () -> listTestsSinglePage(requestOptions), + nextLink -> listTestsNextSinglePage(nextLink, requestOptionsForNextPage)); } /** @@ -1822,7 +1700,7 @@ public PagedIterable listTests(RequestOptions requestOptions) { *

Request Body Schema * *

{@code
-     * Flux
+     * BinaryData
      * }
* *

Response Body Schema @@ -1883,7 +1761,7 @@ public Mono> uploadTestFileWithResponseAsync( *

Request Body Schema * *

{@code
-     * Flux
+     * BinaryData
      * }
* *

Response Body Schema @@ -1904,18 +1782,17 @@ public Mono> uploadTestFileWithResponseAsync( * @param fileName Unique name for test file with file extension like : App.jmx. * @param body The file content as application/octet-stream. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @param context The context to associate with this operation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return file info along with {@link Response} on successful completion of {@link Mono}. + * @return file info along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> uploadTestFileWithResponseAsync( - String testId, String fileName, BinaryData body, RequestOptions requestOptions, Context context) { + public Response uploadTestFileWithResponse( + String testId, String fileName, BinaryData body, RequestOptions requestOptions) { final String accept = "application/json"; - return service.uploadTestFile( + return service.uploadTestFileSync( this.client.getEndpoint(), testId, fileName, @@ -1923,57 +1800,7 @@ public Mono> uploadTestFileWithResponseAsync( body, accept, requestOptions, - context); - } - - /** - * Upload input file for a given test name. File size can't be more than 50 MB. Existing file with same name for the - * given test will be overwritten. File should be provided in the request body as application/octet-stream. - * - *

Query Parameters - * - * - * - * - * - *
Query Parameters
NameTypeRequiredDescription
fileTypeStringNoFile type. Allowed values: "JMX_FILE", "USER_PROPERTIES", "ADDITIONAL_ARTIFACTS".
- * - * You can add these to a request with {@link RequestOptions#addQueryParam} - * - *

Request Body Schema - * - *

{@code
-     * Flux
-     * }
- * - *

Response Body Schema - * - *

{@code
-     * {
-     *     url: String (Optional)
-     *     fileName: String (Optional)
-     *     fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
-     *     expireDateTime: OffsetDateTime (Optional)
-     *     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
-     *     validationFailureDetails: String (Optional)
-     * }
-     * }
- * - * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or - * hyphen characters. - * @param fileName Unique name for test file with file extension like : App.jmx. - * @param body The file content as application/octet-stream. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return file info along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response uploadTestFileWithResponse( - String testId, String fileName, BinaryData body, RequestOptions requestOptions) { - return uploadTestFileWithResponseAsync(testId, fileName, body, requestOptions).block(); + Context.NONE); } /** @@ -2038,56 +1865,23 @@ public Mono> getTestFileWithResponseAsync( * hyphen characters. * @param fileName File name with file extension like app.jmx. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @param context The context to associate with this operation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return test file by the file name along with {@link Response} on successful completion of {@link Mono}. + * @return test file by the file name along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getTestFileWithResponseAsync( - String testId, String fileName, RequestOptions requestOptions, Context context) { + public Response getTestFileWithResponse(String testId, String fileName, RequestOptions requestOptions) { final String accept = "application/json"; - return service.getTestFile( + return service.getTestFileSync( this.client.getEndpoint(), testId, fileName, this.client.getServiceVersion().getVersion(), accept, requestOptions, - context); - } - - /** - * Get test file by the file name. - * - *

Response Body Schema - * - *

{@code
-     * {
-     *     url: String (Optional)
-     *     fileName: String (Optional)
-     *     fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
-     *     expireDateTime: OffsetDateTime (Optional)
-     *     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
-     *     validationFailureDetails: String (Optional)
-     * }
-     * }
- * - * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or - * hyphen characters. - * @param fileName File name with file extension like app.jmx. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return test file by the file name along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getTestFileWithResponse(String testId, String fileName, RequestOptions requestOptions) { - return getTestFileWithResponseAsync(testId, fileName, requestOptions).block(); + Context.NONE); } /** @@ -2126,43 +1920,23 @@ public Mono> deleteTestFileWithResponseAsync( * hyphen characters. * @param fileName File name with file extension like app.jmx. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @param context The context to associate with this operation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteTestFileWithResponseAsync( - String testId, String fileName, RequestOptions requestOptions, Context context) { + public Response deleteTestFileWithResponse(String testId, String fileName, RequestOptions requestOptions) { final String accept = "application/json"; - return service.deleteTestFile( + return service.deleteTestFileSync( this.client.getEndpoint(), testId, fileName, this.client.getServiceVersion().getVersion(), accept, requestOptions, - context); - } - - /** - * Delete file by the file name for a test. - * - * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or - * hyphen characters. - * @param fileName File name with file extension like app.jmx. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteTestFileWithResponse(String testId, String fileName, RequestOptions requestOptions) { - return deleteTestFileWithResponseAsync(testId, fileName, requestOptions).block(); + Context.NONE); } /** @@ -2172,17 +1946,12 @@ public Response deleteTestFileWithResponse(String testId, String fileName, * *
{@code
      * {
-     *     value (Required): [
-     *          (Required){
-     *             url: String (Optional)
-     *             fileName: String (Optional)
-     *             fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
-     *             expireDateTime: OffsetDateTime (Optional)
-     *             validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
-     *             validationFailureDetails: String (Optional)
-     *         }
-     *     ]
-     *     nextLink: String (Optional)
+     *     url: String (Optional)
+     *     fileName: String (Optional)
+     *     fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
+     *     expireDateTime: OffsetDateTime (Optional)
+     *     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
+     *     validationFailureDetails: String (Optional)
      * }
      * }
* @@ -2196,7 +1965,7 @@ public Response deleteTestFileWithResponse(String testId, String fileName, * @return all test files along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listTestFilesSinglePageAsync(String testId, RequestOptions requestOptions) { + private Mono> listTestFilesSinglePageAsync(String testId, RequestOptions requestOptions) { final String accept = "application/json"; return FluxUtil.withContext( context -> @@ -2225,70 +1994,12 @@ public Mono> listTestFilesSinglePageAsync(String testI * *
{@code
      * {
-     *     value (Required): [
-     *          (Required){
-     *             url: String (Optional)
-     *             fileName: String (Optional)
-     *             fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
-     *             expireDateTime: OffsetDateTime (Optional)
-     *             validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
-     *             validationFailureDetails: String (Optional)
-     *         }
-     *     ]
-     *     nextLink: String (Optional)
-     * }
-     * }
- * - * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or - * hyphen characters. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @param context The context to associate with this operation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return all test files along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listTestFilesSinglePageAsync( - String testId, RequestOptions requestOptions, Context context) { - final String accept = "application/json"; - return service.listTestFiles( - this.client.getEndpoint(), - testId, - this.client.getServiceVersion().getVersion(), - accept, - requestOptions, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - getValues(res.getValue(), "value"), - getNextLink(res.getValue(), "nextLink"), - null)); - } - - /** - * Get all test files. - * - *

Response Body Schema - * - *

{@code
-     * {
-     *     value (Required): [
-     *          (Required){
-     *             url: String (Optional)
-     *             fileName: String (Optional)
-     *             fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
-     *             expireDateTime: OffsetDateTime (Optional)
-     *             validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
-     *             validationFailureDetails: String (Optional)
-     *         }
-     *     ]
-     *     nextLink: String (Optional)
+     *     url: String (Optional)
+     *     fileName: String (Optional)
+     *     fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
+     *     expireDateTime: OffsetDateTime (Optional)
+     *     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
+     *     validationFailureDetails: String (Optional)
      * }
      * }
* @@ -2320,40 +2031,42 @@ public PagedFlux listTestFilesAsync(String testId, RequestOptions re * *
{@code
      * {
-     *     value (Required): [
-     *          (Required){
-     *             url: String (Optional)
-     *             fileName: String (Optional)
-     *             fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
-     *             expireDateTime: OffsetDateTime (Optional)
-     *             validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
-     *             validationFailureDetails: String (Optional)
-     *         }
-     *     ]
-     *     nextLink: String (Optional)
+     *     url: String (Optional)
+     *     fileName: String (Optional)
+     *     fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
+     *     expireDateTime: OffsetDateTime (Optional)
+     *     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
+     *     validationFailureDetails: String (Optional)
      * }
      * }
* * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or * hyphen characters. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @param context The context to associate with this operation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return all test files as paginated response with {@link PagedFlux}. + * @return all test files along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listTestFilesAsync(String testId, RequestOptions requestOptions, Context context) { - RequestOptions requestOptionsForNextPage = new RequestOptions(); - requestOptionsForNextPage.setContext( - requestOptions != null && requestOptions.getContext() != null - ? requestOptions.getContext() - : Context.NONE); - return new PagedFlux<>( - () -> listTestFilesSinglePageAsync(testId, requestOptions, context), - nextLink -> listTestFilesNextSinglePageAsync(nextLink, requestOptionsForNextPage, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listTestFilesSinglePage(String testId, RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = + service.listTestFilesSync( + this.client.getEndpoint(), + testId, + this.client.getServiceVersion().getVersion(), + accept, + requestOptions, + Context.NONE); + return new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + getValues(res.getValue(), "value"), + getNextLink(res.getValue(), "nextLink"), + null); } /** @@ -2363,17 +2076,12 @@ public PagedFlux listTestFilesAsync(String testId, RequestOptions re * *
{@code
      * {
-     *     value (Required): [
-     *          (Required){
-     *             url: String (Optional)
-     *             fileName: String (Optional)
-     *             fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
-     *             expireDateTime: OffsetDateTime (Optional)
-     *             validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
-     *             validationFailureDetails: String (Optional)
-     *         }
-     *     ]
-     *     nextLink: String (Optional)
+     *     url: String (Optional)
+     *     fileName: String (Optional)
+     *     fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
+     *     expireDateTime: OffsetDateTime (Optional)
+     *     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
+     *     validationFailureDetails: String (Optional)
      * }
      * }
* @@ -2388,7 +2096,14 @@ public PagedFlux listTestFilesAsync(String testId, RequestOptions re */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listTestFiles(String testId, RequestOptions requestOptions) { - return new PagedIterable<>(listTestFilesAsync(testId, requestOptions)); + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null + ? requestOptions.getContext() + : Context.NONE); + return new PagedIterable<>( + () -> listTestFilesSinglePage(testId, requestOptions), + nextLink -> listTestFilesNextSinglePage(nextLink, requestOptionsForNextPage)); } /** @@ -2519,90 +2234,24 @@ public Mono> createOrUpdateAppComponentsWithResponseAsync( * hyphen characters. * @param body App Component model. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @param context The context to associate with this operation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return test app component along with {@link Response} on successful completion of {@link Mono}. + * @return test app component along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateAppComponentsWithResponseAsync( - String testId, BinaryData body, RequestOptions requestOptions, Context context) { + public Response createOrUpdateAppComponentsWithResponse( + String testId, BinaryData body, RequestOptions requestOptions) { final String accept = "application/json"; - return service.createOrUpdateAppComponents( + return service.createOrUpdateAppComponentsSync( this.client.getEndpoint(), testId, this.client.getServiceVersion().getVersion(), body, accept, requestOptions, - context); - } - - /** - * Associate an app component (collection of azure resources) to a test. - * - *

Request Body Schema - * - *

{@code
-     * {
-     *     components (Required): {
-     *         String (Required): {
-     *             resourceId: String (Optional)
-     *             resourceName: String (Optional)
-     *             resourceType: String (Optional)
-     *             displayName: String (Optional)
-     *             resourceGroup: String (Optional)
-     *             subscriptionId: String (Optional)
-     *             kind: String (Optional)
-     *         }
-     *     }
-     *     testId: String (Optional)
-     *     createdDateTime: OffsetDateTime (Optional)
-     *     createdBy: String (Optional)
-     *     lastModifiedDateTime: OffsetDateTime (Optional)
-     *     lastModifiedBy: String (Optional)
-     * }
-     * }
- * - *

Response Body Schema - * - *

{@code
-     * {
-     *     components (Required): {
-     *         String (Required): {
-     *             resourceId: String (Optional)
-     *             resourceName: String (Optional)
-     *             resourceType: String (Optional)
-     *             displayName: String (Optional)
-     *             resourceGroup: String (Optional)
-     *             subscriptionId: String (Optional)
-     *             kind: String (Optional)
-     *         }
-     *     }
-     *     testId: String (Optional)
-     *     createdDateTime: OffsetDateTime (Optional)
-     *     createdBy: String (Optional)
-     *     lastModifiedDateTime: OffsetDateTime (Optional)
-     *     lastModifiedBy: String (Optional)
-     * }
-     * }
- * - * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or - * hyphen characters. - * @param body App Component model. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return test app component along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateAppComponentsWithResponse( - String testId, BinaryData body, RequestOptions requestOptions) { - return createOrUpdateAppComponentsWithResponseAsync(testId, body, requestOptions).block(); + Context.NONE); } /** @@ -2684,142 +2333,22 @@ public Mono> getAppComponentsWithResponseAsync(String testI * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or * hyphen characters. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @param context The context to associate with this operation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return associated app component (collection of azure resources) for the given test along with {@link Response} - * on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getAppComponentsWithResponseAsync( - String testId, RequestOptions requestOptions, Context context) { - final String accept = "application/json"; - return service.getAppComponents( - this.client.getEndpoint(), - testId, - this.client.getServiceVersion().getVersion(), - accept, - requestOptions, - context); - } - - /** - * Get associated app component (collection of azure resources) for the given test. - * - *

Response Body Schema - * - *

{@code
-     * {
-     *     components (Required): {
-     *         String (Required): {
-     *             resourceId: String (Optional)
-     *             resourceName: String (Optional)
-     *             resourceType: String (Optional)
-     *             displayName: String (Optional)
-     *             resourceGroup: String (Optional)
-     *             subscriptionId: String (Optional)
-     *             kind: String (Optional)
-     *         }
-     *     }
-     *     testId: String (Optional)
-     *     createdDateTime: OffsetDateTime (Optional)
-     *     createdBy: String (Optional)
-     *     lastModifiedDateTime: OffsetDateTime (Optional)
-     *     lastModifiedBy: String (Optional)
-     * }
-     * }
- * - * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or - * hyphen characters. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return associated app component (collection of azure resources) for the given test along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getAppComponentsWithResponse(String testId, RequestOptions requestOptions) { - return getAppComponentsWithResponseAsync(testId, requestOptions).block(); - } - - /** - * Configure server metrics for a test. - * - *

Request Body Schema - * - *

{@code
-     * {
-     *     testId: String (Optional)
-     *     metrics (Optional): {
-     *         String (Optional): {
-     *             id: String (Optional)
-     *             resourceId: String (Required)
-     *             metricNamespace: String (Required)
-     *             displayDescription: String (Optional)
-     *             name: String (Required)
-     *             aggregation: String (Required)
-     *             unit: String (Optional)
-     *             resourceType: String (Required)
-     *         }
-     *     }
-     *     createdDateTime: OffsetDateTime (Optional)
-     *     createdBy: String (Optional)
-     *     lastModifiedDateTime: OffsetDateTime (Optional)
-     *     lastModifiedBy: String (Optional)
-     * }
-     * }
- * - *

Response Body Schema - * - *

{@code
-     * {
-     *     testId: String (Optional)
-     *     metrics (Optional): {
-     *         String (Optional): {
-     *             id: String (Optional)
-     *             resourceId: String (Required)
-     *             metricNamespace: String (Required)
-     *             displayDescription: String (Optional)
-     *             name: String (Required)
-     *             aggregation: String (Required)
-     *             unit: String (Optional)
-     *             resourceType: String (Required)
-     *         }
-     *     }
-     *     createdDateTime: OffsetDateTime (Optional)
-     *     createdBy: String (Optional)
-     *     lastModifiedDateTime: OffsetDateTime (Optional)
-     *     lastModifiedBy: String (Optional)
-     * }
-     * }
- * - * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or - * hyphen characters. - * @param body Server metric configuration model. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return test server metrics configuration along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateServerMetricsConfigWithResponseAsync( - String testId, BinaryData body, RequestOptions requestOptions) { - final String accept = "application/json"; - return FluxUtil.withContext( - context -> - service.createOrUpdateServerMetricsConfig( - this.client.getEndpoint(), - testId, - this.client.getServiceVersion().getVersion(), - body, - accept, - requestOptions, - context)); + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return associated app component (collection of azure resources) for the given test along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getAppComponentsWithResponse(String testId, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getAppComponentsSync( + this.client.getEndpoint(), + testId, + this.client.getServiceVersion().getVersion(), + accept, + requestOptions, + Context.NONE); } /** @@ -2877,7 +2406,6 @@ public Mono> createOrUpdateServerMetricsConfigWithResponseA * hyphen characters. * @param body Server metric configuration model. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @param context The context to associate with this operation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -2886,16 +2414,18 @@ public Mono> createOrUpdateServerMetricsConfigWithResponseA */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> createOrUpdateServerMetricsConfigWithResponseAsync( - String testId, BinaryData body, RequestOptions requestOptions, Context context) { + String testId, BinaryData body, RequestOptions requestOptions) { final String accept = "application/json"; - return service.createOrUpdateServerMetricsConfig( - this.client.getEndpoint(), - testId, - this.client.getServiceVersion().getVersion(), - body, - accept, - requestOptions, - context); + return FluxUtil.withContext( + context -> + service.createOrUpdateServerMetricsConfig( + this.client.getEndpoint(), + testId, + this.client.getServiceVersion().getVersion(), + body, + accept, + requestOptions, + context)); } /** @@ -2962,7 +2492,15 @@ public Mono> createOrUpdateServerMetricsConfigWithResponseA @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrUpdateServerMetricsConfigWithResponse( String testId, BinaryData body, RequestOptions requestOptions) { - return createOrUpdateServerMetricsConfigWithResponseAsync(testId, body, requestOptions).block(); + final String accept = "application/json"; + return service.createOrUpdateServerMetricsConfigSync( + this.client.getEndpoint(), + testId, + this.client.getServiceVersion().getVersion(), + body, + accept, + requestOptions, + Context.NONE); } /** @@ -3046,46 +2584,92 @@ public Mono> getServerMetricsConfigWithResponseAsync( * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or * hyphen characters. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @param context The context to associate with this operation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return test server metrics configuration along with {@link Response} on successful completion of {@link Mono}. + * @return test server metrics configuration along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getServerMetricsConfigWithResponseAsync( - String testId, RequestOptions requestOptions, Context context) { + public Response getServerMetricsConfigWithResponse(String testId, RequestOptions requestOptions) { final String accept = "application/json"; - return service.getServerMetricsConfig( + return service.getServerMetricsConfigSync( this.client.getEndpoint(), testId, this.client.getServiceVersion().getVersion(), accept, requestOptions, - context); + Context.NONE); } /** - * List server metrics configuration for the given test. + * Get the next page of items. * *

Response Body Schema * *

{@code
      * {
-     *     testId: String (Optional)
-     *     metrics (Optional): {
+     *     passFailCriteria (Optional): {
+     *         passFailMetrics (Optional): {
+     *             String (Optional): {
+     *                 clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
+     *                 aggregate: String(count/percentage/avg/p50/p90/p95/p99/min/max) (Optional)
+     *                 condition: String (Optional)
+     *                 requestName: String (Optional)
+     *                 value: Double (Optional)
+     *                 action: String(continue/stop) (Optional)
+     *                 actualValue: Double (Optional)
+     *                 result: String(passed/undetermined/failed) (Optional)
+     *             }
+     *         }
+     *     }
+     *     secrets (Optional): {
      *         String (Optional): {
-     *             id: String (Optional)
-     *             resourceId: String (Required)
-     *             metricNamespace: String (Required)
-     *             displayDescription: String (Optional)
-     *             name: String (Required)
-     *             aggregation: String (Required)
-     *             unit: String (Optional)
-     *             resourceType: String (Required)
+     *             value: String (Optional)
+     *             type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
+     *         }
+     *     }
+     *     certificate (Optional): {
+     *         value: String (Optional)
+     *         type: String(AKV_CERT_URI) (Optional)
+     *         name: String (Optional)
+     *     }
+     *     environmentVariables (Optional): {
+     *         String: String (Optional)
+     *     }
+     *     loadTestConfiguration (Optional): {
+     *         engineInstances: Integer (Optional)
+     *         splitAllCSVs: Boolean (Optional)
+     *         quickStartTest: Boolean (Optional)
+     *         optionalLoadTestConfig (Optional): {
+     *             endpointUrl: String (Optional)
+     *             virtualUsers: Integer (Optional)
+     *             rampUpTime: Integer (Optional)
+     *             duration: Integer (Optional)
+     *         }
+     *     }
+     *     inputArtifacts (Optional): {
+     *         configFileInfo (Optional): {
+     *             url: String (Optional)
+     *             fileName: String (Optional)
+     *             fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
+     *             expireDateTime: OffsetDateTime (Optional)
+     *             validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
+     *             validationFailureDetails: String (Optional)
      *         }
+     *         testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
+     *         userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
+     *         inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
+     *         additionalFileInfo (Optional): [
+     *             (recursive schema, see above)
+     *         ]
      *     }
+     *     testId: String (Optional)
+     *     description: String (Optional)
+     *     displayName: String (Optional)
+     *     subnetId: String (Optional)
+     *     keyvaultReferenceIdentityType: String (Optional)
+     *     keyvaultReferenceIdentityId: String (Optional)
      *     createdDateTime: OffsetDateTime (Optional)
      *     createdBy: String (Optional)
      *     lastModifiedDateTime: OffsetDateTime (Optional)
@@ -3093,101 +2677,8 @@ public Mono> getServerMetricsConfigWithResponseAsync(
      * }
      * }
* - * @param testId Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or - * hyphen characters. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return test server metrics configuration along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getServerMetricsConfigWithResponse(String testId, RequestOptions requestOptions) { - return getServerMetricsConfigWithResponseAsync(testId, requestOptions).block(); - } - - /** - * Get the next page of items. - * - *

Response Body Schema - * - *

{@code
-     * {
-     *     value (Required): [
-     *          (Required){
-     *             passFailCriteria (Optional): {
-     *                 passFailMetrics (Optional): {
-     *                     String (Optional): {
-     *                         clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
-     *                         aggregate: String(count/percentage/avg/p50/p90/p95/p99/min/max) (Optional)
-     *                         condition: String (Optional)
-     *                         requestName: String (Optional)
-     *                         value: Double (Optional)
-     *                         action: String(continue/stop) (Optional)
-     *                         actualValue: Double (Optional)
-     *                         result: String(passed/undetermined/failed) (Optional)
-     *                     }
-     *                 }
-     *             }
-     *             secrets (Optional): {
-     *                 String (Optional): {
-     *                     value: String (Optional)
-     *                     type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
-     *                 }
-     *             }
-     *             certificate (Optional): {
-     *                 value: String (Optional)
-     *                 type: String(AKV_CERT_URI) (Optional)
-     *                 name: String (Optional)
-     *             }
-     *             environmentVariables (Optional): {
-     *                 String: String (Optional)
-     *             }
-     *             loadTestConfiguration (Optional): {
-     *                 engineInstances: Integer (Optional)
-     *                 splitAllCSVs: Boolean (Optional)
-     *                 quickStartTest: Boolean (Optional)
-     *                 optionalLoadTestConfig (Optional): {
-     *                     endpointUrl: String (Optional)
-     *                     virtualUsers: Integer (Optional)
-     *                     rampUpTime: Integer (Optional)
-     *                     duration: Integer (Optional)
-     *                 }
-     *             }
-     *             inputArtifacts (Optional): {
-     *                 configFileInfo (Optional): {
-     *                     url: String (Optional)
-     *                     fileName: String (Optional)
-     *                     fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
-     *                     expireDateTime: OffsetDateTime (Optional)
-     *                     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
-     *                     validationFailureDetails: String (Optional)
-     *                 }
-     *                 testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
-     *                 userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
-     *                 inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
-     *                 additionalFileInfo (Optional): [
-     *                     (recursive schema, see above)
-     *                 ]
-     *             }
-     *             testId: String (Optional)
-     *             description: String (Optional)
-     *             displayName: String (Optional)
-     *             subnetId: String (Optional)
-     *             keyvaultReferenceIdentityType: String (Optional)
-     *             keyvaultReferenceIdentityId: String (Optional)
-     *             createdDateTime: OffsetDateTime (Optional)
-     *             createdBy: String (Optional)
-     *             lastModifiedDateTime: OffsetDateTime (Optional)
-     *             lastModifiedBy: String (Optional)
-     *         }
-     *     ]
-     *     nextLink: String (Optional)
-     * }
-     * }
- * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -3196,7 +2687,7 @@ public Response getServerMetricsConfigWithResponse(String testId, Re * @return collection of tests along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listTestsNextSinglePageAsync( + private Mono> listTestsNextSinglePageAsync( String nextLink, RequestOptions requestOptions) { final String accept = "application/json"; return FluxUtil.withContext( @@ -3221,102 +2712,95 @@ public Mono> listTestsNextSinglePageAsync( * *

{@code
      * {
-     *     value (Required): [
-     *          (Required){
-     *             passFailCriteria (Optional): {
-     *                 passFailMetrics (Optional): {
-     *                     String (Optional): {
-     *                         clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
-     *                         aggregate: String(count/percentage/avg/p50/p90/p95/p99/min/max) (Optional)
-     *                         condition: String (Optional)
-     *                         requestName: String (Optional)
-     *                         value: Double (Optional)
-     *                         action: String(continue/stop) (Optional)
-     *                         actualValue: Double (Optional)
-     *                         result: String(passed/undetermined/failed) (Optional)
-     *                     }
-     *                 }
-     *             }
-     *             secrets (Optional): {
-     *                 String (Optional): {
-     *                     value: String (Optional)
-     *                     type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
-     *                 }
-     *             }
-     *             certificate (Optional): {
-     *                 value: String (Optional)
-     *                 type: String(AKV_CERT_URI) (Optional)
-     *                 name: String (Optional)
-     *             }
-     *             environmentVariables (Optional): {
-     *                 String: String (Optional)
-     *             }
-     *             loadTestConfiguration (Optional): {
-     *                 engineInstances: Integer (Optional)
-     *                 splitAllCSVs: Boolean (Optional)
-     *                 quickStartTest: Boolean (Optional)
-     *                 optionalLoadTestConfig (Optional): {
-     *                     endpointUrl: String (Optional)
-     *                     virtualUsers: Integer (Optional)
-     *                     rampUpTime: Integer (Optional)
-     *                     duration: Integer (Optional)
-     *                 }
-     *             }
-     *             inputArtifacts (Optional): {
-     *                 configFileInfo (Optional): {
-     *                     url: String (Optional)
-     *                     fileName: String (Optional)
-     *                     fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
-     *                     expireDateTime: OffsetDateTime (Optional)
-     *                     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
-     *                     validationFailureDetails: String (Optional)
-     *                 }
-     *                 testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
-     *                 userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
-     *                 inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
-     *                 additionalFileInfo (Optional): [
-     *                     (recursive schema, see above)
-     *                 ]
+     *     passFailCriteria (Optional): {
+     *         passFailMetrics (Optional): {
+     *             String (Optional): {
+     *                 clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
+     *                 aggregate: String(count/percentage/avg/p50/p90/p95/p99/min/max) (Optional)
+     *                 condition: String (Optional)
+     *                 requestName: String (Optional)
+     *                 value: Double (Optional)
+     *                 action: String(continue/stop) (Optional)
+     *                 actualValue: Double (Optional)
+     *                 result: String(passed/undetermined/failed) (Optional)
      *             }
-     *             testId: String (Optional)
-     *             description: String (Optional)
-     *             displayName: String (Optional)
-     *             subnetId: String (Optional)
-     *             keyvaultReferenceIdentityType: String (Optional)
-     *             keyvaultReferenceIdentityId: String (Optional)
-     *             createdDateTime: OffsetDateTime (Optional)
-     *             createdBy: String (Optional)
-     *             lastModifiedDateTime: OffsetDateTime (Optional)
-     *             lastModifiedBy: String (Optional)
      *         }
-     *     ]
-     *     nextLink: String (Optional)
+     *     }
+     *     secrets (Optional): {
+     *         String (Optional): {
+     *             value: String (Optional)
+     *             type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
+     *         }
+     *     }
+     *     certificate (Optional): {
+     *         value: String (Optional)
+     *         type: String(AKV_CERT_URI) (Optional)
+     *         name: String (Optional)
+     *     }
+     *     environmentVariables (Optional): {
+     *         String: String (Optional)
+     *     }
+     *     loadTestConfiguration (Optional): {
+     *         engineInstances: Integer (Optional)
+     *         splitAllCSVs: Boolean (Optional)
+     *         quickStartTest: Boolean (Optional)
+     *         optionalLoadTestConfig (Optional): {
+     *             endpointUrl: String (Optional)
+     *             virtualUsers: Integer (Optional)
+     *             rampUpTime: Integer (Optional)
+     *             duration: Integer (Optional)
+     *         }
+     *     }
+     *     inputArtifacts (Optional): {
+     *         configFileInfo (Optional): {
+     *             url: String (Optional)
+     *             fileName: String (Optional)
+     *             fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
+     *             expireDateTime: OffsetDateTime (Optional)
+     *             validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
+     *             validationFailureDetails: String (Optional)
+     *         }
+     *         testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
+     *         userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
+     *         inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
+     *         additionalFileInfo (Optional): [
+     *             (recursive schema, see above)
+     *         ]
+     *     }
+     *     testId: String (Optional)
+     *     description: String (Optional)
+     *     displayName: String (Optional)
+     *     subnetId: String (Optional)
+     *     keyvaultReferenceIdentityType: String (Optional)
+     *     keyvaultReferenceIdentityId: String (Optional)
+     *     createdDateTime: OffsetDateTime (Optional)
+     *     createdBy: String (Optional)
+     *     lastModifiedDateTime: OffsetDateTime (Optional)
+     *     lastModifiedBy: String (Optional)
      * }
      * }
* - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @param context The context to associate with this operation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return collection of tests along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return collection of tests along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listTestsNextSinglePageAsync( - String nextLink, RequestOptions requestOptions, Context context) { + private PagedResponse listTestsNextSinglePage(String nextLink, RequestOptions requestOptions) { final String accept = "application/json"; - return service.listTestsNext(nextLink, this.client.getEndpoint(), accept, requestOptions, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - getValues(res.getValue(), "value"), - getNextLink(res.getValue(), "nextLink"), - null)); + Response res = + service.listTestsNextSync(nextLink, this.client.getEndpoint(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + getValues(res.getValue(), "value"), + getNextLink(res.getValue(), "nextLink"), + null); } /** @@ -3326,21 +2810,17 @@ public Mono> listTestsNextSinglePageAsync( * *

{@code
      * {
-     *     value (Required): [
-     *          (Required){
-     *             url: String (Optional)
-     *             fileName: String (Optional)
-     *             fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
-     *             expireDateTime: OffsetDateTime (Optional)
-     *             validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
-     *             validationFailureDetails: String (Optional)
-     *         }
-     *     ]
-     *     nextLink: String (Optional)
+     *     url: String (Optional)
+     *     fileName: String (Optional)
+     *     fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
+     *     expireDateTime: OffsetDateTime (Optional)
+     *     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
+     *     validationFailureDetails: String (Optional)
      * }
      * }
* - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -3349,7 +2829,7 @@ public Mono> listTestsNextSinglePageAsync( * @return collection of files along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listTestFilesNextSinglePageAsync( + private Mono> listTestFilesNextSinglePageAsync( String nextLink, RequestOptions requestOptions) { final String accept = "application/json"; return FluxUtil.withContext( @@ -3374,43 +2854,37 @@ public Mono> listTestFilesNextSinglePageAsync( * *

{@code
      * {
-     *     value (Required): [
-     *          (Required){
-     *             url: String (Optional)
-     *             fileName: String (Optional)
-     *             fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
-     *             expireDateTime: OffsetDateTime (Optional)
-     *             validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
-     *             validationFailureDetails: String (Optional)
-     *         }
-     *     ]
-     *     nextLink: String (Optional)
+     *     url: String (Optional)
+     *     fileName: String (Optional)
+     *     fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
+     *     expireDateTime: OffsetDateTime (Optional)
+     *     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
+     *     validationFailureDetails: String (Optional)
      * }
      * }
* - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @param context The context to associate with this operation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return collection of files along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return collection of files along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listTestFilesNextSinglePageAsync( - String nextLink, RequestOptions requestOptions, Context context) { + private PagedResponse listTestFilesNextSinglePage(String nextLink, RequestOptions requestOptions) { final String accept = "application/json"; - return service.listTestFilesNext(nextLink, this.client.getEndpoint(), accept, requestOptions, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - getValues(res.getValue(), "value"), - getNextLink(res.getValue(), "nextLink"), - null)); + Response res = + service.listTestFilesNextSync( + nextLink, this.client.getEndpoint(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + getValues(res.getValue(), "value"), + getNextLink(res.getValue(), "nextLink"), + null); } private List getValues(BinaryData binaryData, String path) { diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/implementation/LoadTestRunsImpl.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/implementation/LoadTestRunsImpl.java index d3c07622ffd9..2d3a5f4be622 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/implementation/LoadTestRunsImpl.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/implementation/LoadTestRunsImpl.java @@ -63,7 +63,7 @@ public final class LoadTestRunsImpl { */ @Host("https://{Endpoint}") @ServiceInterface(name = "LoadTestingClientLoa") - private interface LoadTestRunsService { + public interface LoadTestRunsService { @Patch("/test-runs/{testRunId}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType( @@ -85,6 +85,27 @@ Mono> createOrUpdateTestRun( RequestOptions requestOptions, Context context); + @Patch("/test-runs/{testRunId}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType( + value = ClientAuthenticationException.class, + code = {401}) + @UnexpectedResponseExceptionType( + value = ResourceNotFoundException.class, + code = {404}) + @UnexpectedResponseExceptionType( + value = ResourceModifiedException.class, + code = {409}) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response createOrUpdateTestRunSync( + @HostParam("Endpoint") String endpoint, + @PathParam("testRunId") String testRunId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/merge-patch+json") BinaryData body, + @HeaderParam("Accept") String accept, + RequestOptions requestOptions, + Context context); + @Get("/test-runs/{testRunId}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType( @@ -105,6 +126,26 @@ Mono> getTestRun( RequestOptions requestOptions, Context context); + @Get("/test-runs/{testRunId}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType( + value = ClientAuthenticationException.class, + code = {401}) + @UnexpectedResponseExceptionType( + value = ResourceNotFoundException.class, + code = {404}) + @UnexpectedResponseExceptionType( + value = ResourceModifiedException.class, + code = {409}) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getTestRunSync( + @HostParam("Endpoint") String endpoint, + @PathParam("testRunId") String testRunId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + RequestOptions requestOptions, + Context context); + @Delete("/test-runs/{testRunId}") @ExpectedResponses({204}) @UnexpectedResponseExceptionType( @@ -125,6 +166,26 @@ Mono> deleteTestRun( RequestOptions requestOptions, Context context); + @Delete("/test-runs/{testRunId}") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType( + value = ClientAuthenticationException.class, + code = {401}) + @UnexpectedResponseExceptionType( + value = ResourceNotFoundException.class, + code = {404}) + @UnexpectedResponseExceptionType( + value = ResourceModifiedException.class, + code = {409}) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response deleteTestRunSync( + @HostParam("Endpoint") String endpoint, + @PathParam("testRunId") String testRunId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + RequestOptions requestOptions, + Context context); + @Get("/test-runs/{testRunId}/files/{fileName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType( @@ -146,6 +207,27 @@ Mono> getTestRunFile( RequestOptions requestOptions, Context context); + @Get("/test-runs/{testRunId}/files/{fileName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType( + value = ClientAuthenticationException.class, + code = {401}) + @UnexpectedResponseExceptionType( + value = ResourceNotFoundException.class, + code = {404}) + @UnexpectedResponseExceptionType( + value = ResourceModifiedException.class, + code = {409}) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getTestRunFileSync( + @HostParam("Endpoint") String endpoint, + @PathParam("testRunId") String testRunId, + @PathParam("fileName") String fileName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + RequestOptions requestOptions, + Context context); + @Get("/test-runs") @ExpectedResponses({200}) @UnexpectedResponseExceptionType( @@ -165,6 +247,25 @@ Mono> listTestRuns( RequestOptions requestOptions, Context context); + @Get("/test-runs") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType( + value = ClientAuthenticationException.class, + code = {401}) + @UnexpectedResponseExceptionType( + value = ResourceNotFoundException.class, + code = {404}) + @UnexpectedResponseExceptionType( + value = ResourceModifiedException.class, + code = {409}) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listTestRunsSync( + @HostParam("Endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + RequestOptions requestOptions, + Context context); + @Post("/test-runs/{testRunId}:stop") @ExpectedResponses({200}) @UnexpectedResponseExceptionType( @@ -185,6 +286,26 @@ Mono> stopTestRun( RequestOptions requestOptions, Context context); + @Post("/test-runs/{testRunId}:stop") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType( + value = ClientAuthenticationException.class, + code = {401}) + @UnexpectedResponseExceptionType( + value = ResourceNotFoundException.class, + code = {404}) + @UnexpectedResponseExceptionType( + value = ResourceModifiedException.class, + code = {409}) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response stopTestRunSync( + @HostParam("Endpoint") String endpoint, + @PathParam("testRunId") String testRunId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + RequestOptions requestOptions, + Context context); + @Get("/test-runs/{testRunId}/metric-namespaces") @ExpectedResponses({200}) @UnexpectedResponseExceptionType( @@ -205,6 +326,26 @@ Mono> getMetricNamespaces( RequestOptions requestOptions, Context context); + @Get("/test-runs/{testRunId}/metric-namespaces") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType( + value = ClientAuthenticationException.class, + code = {401}) + @UnexpectedResponseExceptionType( + value = ResourceNotFoundException.class, + code = {404}) + @UnexpectedResponseExceptionType( + value = ResourceModifiedException.class, + code = {409}) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getMetricNamespacesSync( + @HostParam("Endpoint") String endpoint, + @PathParam("testRunId") String testRunId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + RequestOptions requestOptions, + Context context); + @Get("/test-runs/{testRunId}/metric-definitions") @ExpectedResponses({200}) @UnexpectedResponseExceptionType( @@ -226,6 +367,27 @@ Mono> getMetricDefinitions( RequestOptions requestOptions, Context context); + @Get("/test-runs/{testRunId}/metric-definitions") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType( + value = ClientAuthenticationException.class, + code = {401}) + @UnexpectedResponseExceptionType( + value = ResourceNotFoundException.class, + code = {404}) + @UnexpectedResponseExceptionType( + value = ResourceModifiedException.class, + code = {409}) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getMetricDefinitionsSync( + @HostParam("Endpoint") String endpoint, + @PathParam("testRunId") String testRunId, + @QueryParam("metricNamespace") String metricNamespace, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + RequestOptions requestOptions, + Context context); + @Post("/test-runs/{testRunId}/metrics") @ExpectedResponses({200}) @UnexpectedResponseExceptionType( @@ -249,6 +411,29 @@ Mono> listMetrics( RequestOptions requestOptions, Context context); + @Post("/test-runs/{testRunId}/metrics") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType( + value = ClientAuthenticationException.class, + code = {401}) + @UnexpectedResponseExceptionType( + value = ResourceNotFoundException.class, + code = {404}) + @UnexpectedResponseExceptionType( + value = ResourceModifiedException.class, + code = {409}) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listMetricsSync( + @HostParam("Endpoint") String endpoint, + @PathParam("testRunId") String testRunId, + @QueryParam("metricname") String metricName, + @QueryParam("metricNamespace") String metricNamespace, + @QueryParam("timespan") String timespan, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + RequestOptions requestOptions, + Context context); + @Get("/test-runs/{testRunId}/metric-dimensions/{name}/values") @ExpectedResponses({200}) @UnexpectedResponseExceptionType( @@ -273,6 +458,30 @@ Mono> listMetricDimensionValues( RequestOptions requestOptions, Context context); + @Get("/test-runs/{testRunId}/metric-dimensions/{name}/values") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType( + value = ClientAuthenticationException.class, + code = {401}) + @UnexpectedResponseExceptionType( + value = ResourceNotFoundException.class, + code = {404}) + @UnexpectedResponseExceptionType( + value = ResourceModifiedException.class, + code = {409}) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listMetricDimensionValuesSync( + @HostParam("Endpoint") String endpoint, + @PathParam("testRunId") String testRunId, + @PathParam("name") String name, + @QueryParam("metricname") String metricName, + @QueryParam("metricNamespace") String metricNamespace, + @QueryParam("timespan") String timespan, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + RequestOptions requestOptions, + Context context); + @Patch("/test-runs/{testRunId}/app-components") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType( @@ -294,6 +503,27 @@ Mono> createOrUpdateAppComponents( RequestOptions requestOptions, Context context); + @Patch("/test-runs/{testRunId}/app-components") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType( + value = ClientAuthenticationException.class, + code = {401}) + @UnexpectedResponseExceptionType( + value = ResourceNotFoundException.class, + code = {404}) + @UnexpectedResponseExceptionType( + value = ResourceModifiedException.class, + code = {409}) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response createOrUpdateAppComponentsSync( + @HostParam("Endpoint") String endpoint, + @PathParam("testRunId") String testRunId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/merge-patch+json") BinaryData body, + @HeaderParam("Accept") String accept, + RequestOptions requestOptions, + Context context); + @Get("/test-runs/{testRunId}/app-components") @ExpectedResponses({200}) @UnexpectedResponseExceptionType( @@ -314,8 +544,8 @@ Mono> getAppComponents( RequestOptions requestOptions, Context context); - @Patch("/test-runs/{testRunId}/server-metrics-config") - @ExpectedResponses({200, 201}) + @Get("/test-runs/{testRunId}/app-components") + @ExpectedResponses({200}) @UnexpectedResponseExceptionType( value = ClientAuthenticationException.class, code = {401}) @@ -326,17 +556,16 @@ Mono> getAppComponents( value = ResourceModifiedException.class, code = {409}) @UnexpectedResponseExceptionType(HttpResponseException.class) - Mono> createOrUpdateServerMetricsConfig( + Response getAppComponentsSync( @HostParam("Endpoint") String endpoint, @PathParam("testRunId") String testRunId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/merge-patch+json") BinaryData body, @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); - @Get("/test-runs/{testRunId}/server-metrics-config") - @ExpectedResponses({200}) + @Patch("/test-runs/{testRunId}/server-metrics-config") + @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType( value = ClientAuthenticationException.class, code = {401}) @@ -347,16 +576,17 @@ Mono> createOrUpdateServerMetricsConfig( value = ResourceModifiedException.class, code = {409}) @UnexpectedResponseExceptionType(HttpResponseException.class) - Mono> getServerMetricsConfig( + Mono> createOrUpdateServerMetricsConfig( @HostParam("Endpoint") String endpoint, @PathParam("testRunId") String testRunId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/merge-patch+json") BinaryData body, @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); - @Get("{nextLink}") - @ExpectedResponses({200}) + @Patch("/test-runs/{testRunId}/server-metrics-config") + @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType( value = ClientAuthenticationException.class, code = {401}) @@ -367,14 +597,16 @@ Mono> getServerMetricsConfig( value = ResourceModifiedException.class, code = {409}) @UnexpectedResponseExceptionType(HttpResponseException.class) - Mono> listTestRunsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, + Response createOrUpdateServerMetricsConfigSync( @HostParam("Endpoint") String endpoint, + @PathParam("testRunId") String testRunId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/merge-patch+json") BinaryData body, @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); - @Get("{nextLink}") + @Get("/test-runs/{testRunId}/server-metrics-config") @ExpectedResponses({200}) @UnexpectedResponseExceptionType( value = ClientAuthenticationException.class, @@ -386,14 +618,15 @@ Mono> listTestRunsNext( value = ResourceModifiedException.class, code = {409}) @UnexpectedResponseExceptionType(HttpResponseException.class) - Mono> listMetricsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, + Mono> getServerMetricsConfig( @HostParam("Endpoint") String endpoint, + @PathParam("testRunId") String testRunId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); - @Get("{nextLink}") + @Get("/test-runs/{testRunId}/server-metrics-config") @ExpectedResponses({200}) @UnexpectedResponseExceptionType( value = ClientAuthenticationException.class, @@ -405,15 +638,130 @@ Mono> listMetricsNext( value = ResourceModifiedException.class, code = {409}) @UnexpectedResponseExceptionType(HttpResponseException.class) - Mono> listMetricDimensionValuesNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, + Response getServerMetricsConfigSync( @HostParam("Endpoint") String endpoint, + @PathParam("testRunId") String testRunId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); - } - /** + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType( + value = ClientAuthenticationException.class, + code = {401}) + @UnexpectedResponseExceptionType( + value = ResourceNotFoundException.class, + code = {404}) + @UnexpectedResponseExceptionType( + value = ResourceModifiedException.class, + code = {409}) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listTestRunsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("Endpoint") String endpoint, + @HeaderParam("Accept") String accept, + RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType( + value = ClientAuthenticationException.class, + code = {401}) + @UnexpectedResponseExceptionType( + value = ResourceNotFoundException.class, + code = {404}) + @UnexpectedResponseExceptionType( + value = ResourceModifiedException.class, + code = {409}) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listTestRunsNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("Endpoint") String endpoint, + @HeaderParam("Accept") String accept, + RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType( + value = ClientAuthenticationException.class, + code = {401}) + @UnexpectedResponseExceptionType( + value = ResourceNotFoundException.class, + code = {404}) + @UnexpectedResponseExceptionType( + value = ResourceModifiedException.class, + code = {409}) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listMetricsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("Endpoint") String endpoint, + @HeaderParam("Accept") String accept, + RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType( + value = ClientAuthenticationException.class, + code = {401}) + @UnexpectedResponseExceptionType( + value = ResourceNotFoundException.class, + code = {404}) + @UnexpectedResponseExceptionType( + value = ResourceModifiedException.class, + code = {409}) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listMetricsNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("Endpoint") String endpoint, + @HeaderParam("Accept") String accept, + RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType( + value = ClientAuthenticationException.class, + code = {401}) + @UnexpectedResponseExceptionType( + value = ResourceNotFoundException.class, + code = {404}) + @UnexpectedResponseExceptionType( + value = ResourceModifiedException.class, + code = {409}) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listMetricDimensionValuesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("Endpoint") String endpoint, + @HeaderParam("Accept") String accept, + RequestOptions requestOptions, + Context context); + + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType( + value = ClientAuthenticationException.class, + code = {401}) + @UnexpectedResponseExceptionType( + value = ResourceNotFoundException.class, + code = {404}) + @UnexpectedResponseExceptionType( + value = ResourceModifiedException.class, + code = {409}) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listMetricDimensionValuesNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("Endpoint") String endpoint, + @HeaderParam("Accept") String accept, + RequestOptions requestOptions, + Context context); + } + + /** * Create and start a new test run with the given name. * *

Query Parameters @@ -901,147 +1249,28 @@ public Mono> createOrUpdateTestRunWithResponseAsync( * or hyphen characters. * @param body Load test run model. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @param context The context to associate with this operation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return load test run model along with {@link Response} on successful completion of {@link Mono}. + * @return load test run model along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateTestRunWithResponseAsync( - String testRunId, BinaryData body, RequestOptions requestOptions, Context context) { + public Response createOrUpdateTestRunWithResponse( + String testRunId, BinaryData body, RequestOptions requestOptions) { final String accept = "application/json"; - return service.createOrUpdateTestRun( + return service.createOrUpdateTestRunSync( this.client.getEndpoint(), testRunId, this.client.getServiceVersion().getVersion(), body, accept, requestOptions, - context); + Context.NONE); } /** - * Create and start a new test run with the given name. - * - *

Query Parameters - * - * - * - * - * - *
Query Parameters
NameTypeRequiredDescription
oldTestRunIdStringNoExisting test run identifier that should be rerun, if this is provided, the test will run with the JMX file, configuration and app components from the existing test run. You can override the configuration values for new test run in the request body.
- * - * You can add these to a request with {@link RequestOptions#addQueryParam} - * - *

Request Body Schema - * - *

{@code
-     * {
-     *     passFailCriteria (Optional): {
-     *         passFailMetrics (Optional): {
-     *             String (Optional): {
-     *                 clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
-     *                 aggregate: String(count/percentage/avg/p50/p90/p95/p99/min/max) (Optional)
-     *                 condition: String (Optional)
-     *                 requestName: String (Optional)
-     *                 value: Double (Optional)
-     *                 action: String(continue/stop) (Optional)
-     *                 actualValue: Double (Optional)
-     *                 result: String(passed/undetermined/failed) (Optional)
-     *             }
-     *         }
-     *     }
-     *     secrets (Optional): {
-     *         String (Optional): {
-     *             value: String (Optional)
-     *             type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
-     *         }
-     *     }
-     *     certificate (Optional): {
-     *         value: String (Optional)
-     *         type: String(AKV_CERT_URI) (Optional)
-     *         name: String (Optional)
-     *     }
-     *     environmentVariables (Optional): {
-     *         String: String (Optional)
-     *     }
-     *     errorDetails (Optional): [
-     *          (Optional){
-     *             message: String (Optional)
-     *         }
-     *     ]
-     *     testRunStatistics (Optional): {
-     *         String (Optional): {
-     *             transaction: String (Optional)
-     *             sampleCount: Double (Optional)
-     *             errorCount: Double (Optional)
-     *             errorPct: Double (Optional)
-     *             meanResTime: Double (Optional)
-     *             medianResTime: Double (Optional)
-     *             maxResTime: Double (Optional)
-     *             minResTime: Double (Optional)
-     *             pct1ResTime: Double (Optional)
-     *             pct2ResTime: Double (Optional)
-     *             pct3ResTime: Double (Optional)
-     *             throughput: Double (Optional)
-     *             receivedKBytesPerSec: Double (Optional)
-     *             sentKBytesPerSec: Double (Optional)
-     *         }
-     *     }
-     *     loadTestConfiguration (Optional): {
-     *         engineInstances: Integer (Optional)
-     *         splitAllCSVs: Boolean (Optional)
-     *         quickStartTest: Boolean (Optional)
-     *         optionalLoadTestConfig (Optional): {
-     *             endpointUrl: String (Optional)
-     *             virtualUsers: Integer (Optional)
-     *             rampUpTime: Integer (Optional)
-     *             duration: Integer (Optional)
-     *         }
-     *     }
-     *     testArtifacts (Optional): {
-     *         inputArtifacts (Optional): {
-     *             configFileInfo (Optional): {
-     *                 url: String (Optional)
-     *                 fileName: String (Optional)
-     *                 fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
-     *                 expireDateTime: OffsetDateTime (Optional)
-     *                 validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
-     *                 validationFailureDetails: String (Optional)
-     *             }
-     *             testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
-     *             userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
-     *             inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
-     *             additionalFileInfo (Optional): [
-     *                 (recursive schema, see above)
-     *             ]
-     *         }
-     *         outputArtifacts (Optional): {
-     *             resultFileInfo (Optional): (recursive schema, see resultFileInfo above)
-     *             logsFileInfo (Optional): (recursive schema, see logsFileInfo above)
-     *         }
-     *     }
-     *     testResult: String(PASSED/NOT_APPLICABLE/FAILED) (Optional)
-     *     virtualUsers: Integer (Optional)
-     *     testRunId: String (Optional)
-     *     displayName: String (Optional)
-     *     testId: String (Optional)
-     *     description: String (Optional)
-     *     status: String(ACCEPTED/NOTSTARTED/PROVISIONING/PROVISIONED/CONFIGURING/CONFIGURED/EXECUTING/EXECUTED/DEPROVISIONING/DEPROVISIONED/DONE/CANCELLING/CANCELLED/FAILED/VALIDATION_SUCCESS/VALIDATION_FAILURE) (Optional)
-     *     startDateTime: OffsetDateTime (Optional)
-     *     endDateTime: OffsetDateTime (Optional)
-     *     executedDateTime: OffsetDateTime (Optional)
-     *     portalUrl: String (Optional)
-     *     duration: Long (Optional)
-     *     subnetId: String (Optional)
-     *     createdDateTime: OffsetDateTime (Optional)
-     *     createdBy: String (Optional)
-     *     lastModifiedDateTime: OffsetDateTime (Optional)
-     *     lastModifiedBy: String (Optional)
-     * }
-     * }
+ * Get test run details by name. * *

Response Body Schema * @@ -1153,18 +1382,25 @@ public Mono> createOrUpdateTestRunWithResponseAsync( * * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. - * @param body Load test run model. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return load test run model along with {@link Response}. + * @return test run details by name along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateTestRunWithResponse( - String testRunId, BinaryData body, RequestOptions requestOptions) { - return createOrUpdateTestRunWithResponseAsync(testRunId, body, requestOptions).block(); + public Mono> getTestRunWithResponseAsync(String testRunId, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext( + context -> + service.getTestRun( + this.client.getEndpoint(), + testRunId, + this.client.getServiceVersion().getVersion(), + accept, + requestOptions, + context)); } /** @@ -1285,14 +1521,38 @@ public Response createOrUpdateTestRunWithResponse( * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return test run details by name along with {@link Response} on successful completion of {@link Mono}. + * @return test run details by name along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getTestRunWithResponseAsync(String testRunId, RequestOptions requestOptions) { + public Response getTestRunWithResponse(String testRunId, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getTestRunSync( + this.client.getEndpoint(), + testRunId, + this.client.getServiceVersion().getVersion(), + accept, + requestOptions, + Context.NONE); + } + + /** + * Delete a test run by its name. + * + * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore + * or hyphen characters. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteTestRunWithResponseAsync(String testRunId, RequestOptions requestOptions) { final String accept = "application/json"; return FluxUtil.withContext( context -> - service.getTestRun( + service.deleteTestRun( this.client.getEndpoint(), testRunId, this.client.getServiceVersion().getVersion(), @@ -1302,7 +1562,129 @@ public Mono> getTestRunWithResponseAsync(String testRunId, } /** - * Get test run details by name. + * Delete a test run by its name. + * + * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore + * or hyphen characters. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteTestRunWithResponse(String testRunId, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.deleteTestRunSync( + this.client.getEndpoint(), + testRunId, + this.client.getServiceVersion().getVersion(), + accept, + requestOptions, + Context.NONE); + } + + /** + * Get test run file by file name. + * + *

Response Body Schema + * + *

{@code
+     * {
+     *     url: String (Optional)
+     *     fileName: String (Optional)
+     *     fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
+     *     expireDateTime: OffsetDateTime (Optional)
+     *     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
+     *     validationFailureDetails: String (Optional)
+     * }
+     * }
+ * + * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore + * or hyphen characters. + * @param fileName Test run file name with file extension. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return test run file by file name along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getTestRunFileWithResponseAsync( + String testRunId, String fileName, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext( + context -> + service.getTestRunFile( + this.client.getEndpoint(), + testRunId, + fileName, + this.client.getServiceVersion().getVersion(), + accept, + requestOptions, + context)); + } + + /** + * Get test run file by file name. + * + *

Response Body Schema + * + *

{@code
+     * {
+     *     url: String (Optional)
+     *     fileName: String (Optional)
+     *     fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
+     *     expireDateTime: OffsetDateTime (Optional)
+     *     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
+     *     validationFailureDetails: String (Optional)
+     * }
+     * }
+ * + * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore + * or hyphen characters. + * @param fileName Test run file name with file extension. + * @param requestOptions The options to configure the HTTP request before HTTP client sends it. + * @throws HttpResponseException thrown if the request is rejected by server. + * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. + * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. + * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return test run file by file name along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getTestRunFileWithResponse( + String testRunId, String fileName, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getTestRunFileSync( + this.client.getEndpoint(), + testRunId, + fileName, + this.client.getServiceVersion().getVersion(), + accept, + requestOptions, + Context.NONE); + } + + /** + * Get all test runs with given filters. + * + *

Query Parameters + * + * + * + * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
orderbyStringNoSort on the supported fields in (field asc/desc) format. eg: executedDateTime asc. Supported fields - executedDateTime
searchStringNoPrefix based, case sensitive search on searchable fields - description, executedUser. For example, to search for a test run, with description 500 VUs, the search parameter can be 500.
testIdStringNoUnique name of an existing load test.
executionFromOffsetDateTimeNoStart DateTime(ISO 8601 literal format) of test-run execution time filter range.
executionToOffsetDateTimeNoEnd DateTime(ISO 8601 literal format) of test-run execution time filter range.
statusStringNoComma separated list of test run status.
maxpagesizeIntegerNoNumber of results in response.
+ * + * You can add these to a request with {@link RequestOptions#addQueryParam} * *

Response Body Schema * @@ -1412,31 +1794,54 @@ public Mono> getTestRunWithResponseAsync(String testRunId, * } * }

* - * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore - * or hyphen characters. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @param context The context to associate with this operation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return test run details by name along with {@link Response} on successful completion of {@link Mono}. + * @return all test runs with given filters along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getTestRunWithResponseAsync( - String testRunId, RequestOptions requestOptions, Context context) { + private Mono> listTestRunsSinglePageAsync(RequestOptions requestOptions) { final String accept = "application/json"; - return service.getTestRun( - this.client.getEndpoint(), - testRunId, - this.client.getServiceVersion().getVersion(), - accept, - requestOptions, - context); + return FluxUtil.withContext( + context -> + service.listTestRuns( + this.client.getEndpoint(), + this.client.getServiceVersion().getVersion(), + accept, + requestOptions, + context)) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + getValues(res.getValue(), "value"), + getNextLink(res.getValue(), "nextLink"), + null)); } /** - * Get test run details by name. + * Get all test runs with given filters. + * + *

Query Parameters + * + * + * + * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
orderbyStringNoSort on the supported fields in (field asc/desc) format. eg: executedDateTime asc. Supported fields - executedDateTime
searchStringNoPrefix based, case sensitive search on searchable fields - description, executedUser. For example, to search for a test run, with description 500 VUs, the search parameter can be 500.
testIdStringNoUnique name of an existing load test.
executionFromOffsetDateTimeNoStart DateTime(ISO 8601 literal format) of test-run execution time filter range.
executionToOffsetDateTimeNoEnd DateTime(ISO 8601 literal format) of test-run execution time filter range.
statusStringNoComma separated list of test run status.
maxpagesizeIntegerNoNumber of results in response.
+ * + * You can add these to a request with {@link RequestOptions#addQueryParam} * *

Response Body Schema * @@ -1546,208 +1951,29 @@ public Mono> getTestRunWithResponseAsync( * } * } * - * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore - * or hyphen characters. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return test run details by name along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getTestRunWithResponse(String testRunId, RequestOptions requestOptions) { - return getTestRunWithResponseAsync(testRunId, requestOptions).block(); - } - - /** - * Delete a test run by its name. - * - * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore - * or hyphen characters. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return all test runs with given filters as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteTestRunWithResponseAsync(String testRunId, RequestOptions requestOptions) { - final String accept = "application/json"; - return FluxUtil.withContext( - context -> - service.deleteTestRun( - this.client.getEndpoint(), - testRunId, - this.client.getServiceVersion().getVersion(), - accept, - requestOptions, - context)); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listTestRunsAsync(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null + ? requestOptions.getContext() + : Context.NONE); + return new PagedFlux<>( + () -> listTestRunsSinglePageAsync(requestOptions), + nextLink -> listTestRunsNextSinglePageAsync(nextLink, requestOptionsForNextPage)); } /** - * Delete a test run by its name. + * Get all test runs with given filters. * - * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore - * or hyphen characters. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @param context The context to associate with this operation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteTestRunWithResponseAsync( - String testRunId, RequestOptions requestOptions, Context context) { - final String accept = "application/json"; - return service.deleteTestRun( - this.client.getEndpoint(), - testRunId, - this.client.getServiceVersion().getVersion(), - accept, - requestOptions, - context); - } - - /** - * Delete a test run by its name. - * - * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore - * or hyphen characters. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteTestRunWithResponse(String testRunId, RequestOptions requestOptions) { - return deleteTestRunWithResponseAsync(testRunId, requestOptions).block(); - } - - /** - * Get test run file by file name. - * - *

Response Body Schema - * - *

{@code
-     * {
-     *     url: String (Optional)
-     *     fileName: String (Optional)
-     *     fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
-     *     expireDateTime: OffsetDateTime (Optional)
-     *     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
-     *     validationFailureDetails: String (Optional)
-     * }
-     * }
- * - * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore - * or hyphen characters. - * @param fileName Test run file name with file extension. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return test run file by file name along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getTestRunFileWithResponseAsync( - String testRunId, String fileName, RequestOptions requestOptions) { - final String accept = "application/json"; - return FluxUtil.withContext( - context -> - service.getTestRunFile( - this.client.getEndpoint(), - testRunId, - fileName, - this.client.getServiceVersion().getVersion(), - accept, - requestOptions, - context)); - } - - /** - * Get test run file by file name. - * - *

Response Body Schema - * - *

{@code
-     * {
-     *     url: String (Optional)
-     *     fileName: String (Optional)
-     *     fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
-     *     expireDateTime: OffsetDateTime (Optional)
-     *     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
-     *     validationFailureDetails: String (Optional)
-     * }
-     * }
- * - * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore - * or hyphen characters. - * @param fileName Test run file name with file extension. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @param context The context to associate with this operation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return test run file by file name along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getTestRunFileWithResponseAsync( - String testRunId, String fileName, RequestOptions requestOptions, Context context) { - final String accept = "application/json"; - return service.getTestRunFile( - this.client.getEndpoint(), - testRunId, - fileName, - this.client.getServiceVersion().getVersion(), - accept, - requestOptions, - context); - } - - /** - * Get test run file by file name. - * - *

Response Body Schema - * - *

{@code
-     * {
-     *     url: String (Optional)
-     *     fileName: String (Optional)
-     *     fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
-     *     expireDateTime: OffsetDateTime (Optional)
-     *     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
-     *     validationFailureDetails: String (Optional)
-     * }
-     * }
- * - * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore - * or hyphen characters. - * @param fileName Test run file name with file extension. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return test run file by file name along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getTestRunFileWithResponse( - String testRunId, String fileName, RequestOptions requestOptions) { - return getTestRunFileWithResponseAsync(testRunId, fileName, requestOptions).block(); - } - - /** - * Get all test runs with given filters. - * - *

Query Parameters + *

Query Parameters * * * @@ -1767,607 +1993,134 @@ public Response getTestRunFileWithResponse( * *
{@code
      * {
-     *     value (Required): [
-     *          (Required){
-     *             passFailCriteria (Optional): {
-     *                 passFailMetrics (Optional): {
-     *                     String (Optional): {
-     *                         clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
-     *                         aggregate: String(count/percentage/avg/p50/p90/p95/p99/min/max) (Optional)
-     *                         condition: String (Optional)
-     *                         requestName: String (Optional)
-     *                         value: Double (Optional)
-     *                         action: String(continue/stop) (Optional)
-     *                         actualValue: Double (Optional)
-     *                         result: String(passed/undetermined/failed) (Optional)
-     *                     }
-     *                 }
-     *             }
-     *             secrets (Optional): {
-     *                 String (Optional): {
-     *                     value: String (Optional)
-     *                     type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
-     *                 }
-     *             }
-     *             certificate (Optional): {
-     *                 value: String (Optional)
-     *                 type: String(AKV_CERT_URI) (Optional)
-     *                 name: String (Optional)
-     *             }
-     *             environmentVariables (Optional): {
-     *                 String: String (Optional)
-     *             }
-     *             errorDetails (Optional): [
-     *                  (Optional){
-     *                     message: String (Optional)
-     *                 }
-     *             ]
-     *             testRunStatistics (Optional): {
-     *                 String (Optional): {
-     *                     transaction: String (Optional)
-     *                     sampleCount: Double (Optional)
-     *                     errorCount: Double (Optional)
-     *                     errorPct: Double (Optional)
-     *                     meanResTime: Double (Optional)
-     *                     medianResTime: Double (Optional)
-     *                     maxResTime: Double (Optional)
-     *                     minResTime: Double (Optional)
-     *                     pct1ResTime: Double (Optional)
-     *                     pct2ResTime: Double (Optional)
-     *                     pct3ResTime: Double (Optional)
-     *                     throughput: Double (Optional)
-     *                     receivedKBytesPerSec: Double (Optional)
-     *                     sentKBytesPerSec: Double (Optional)
-     *                 }
-     *             }
-     *             loadTestConfiguration (Optional): {
-     *                 engineInstances: Integer (Optional)
-     *                 splitAllCSVs: Boolean (Optional)
-     *                 quickStartTest: Boolean (Optional)
-     *                 optionalLoadTestConfig (Optional): {
-     *                     endpointUrl: String (Optional)
-     *                     virtualUsers: Integer (Optional)
-     *                     rampUpTime: Integer (Optional)
-     *                     duration: Integer (Optional)
-     *                 }
-     *             }
-     *             testArtifacts (Optional): {
-     *                 inputArtifacts (Optional): {
-     *                     configFileInfo (Optional): {
-     *                         url: String (Optional)
-     *                         fileName: String (Optional)
-     *                         fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
-     *                         expireDateTime: OffsetDateTime (Optional)
-     *                         validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
-     *                         validationFailureDetails: String (Optional)
-     *                     }
-     *                     testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
-     *                     userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
-     *                     inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
-     *                     additionalFileInfo (Optional): [
-     *                         (recursive schema, see above)
-     *                     ]
-     *                 }
-     *                 outputArtifacts (Optional): {
-     *                     resultFileInfo (Optional): (recursive schema, see resultFileInfo above)
-     *                     logsFileInfo (Optional): (recursive schema, see logsFileInfo above)
-     *                 }
+     *     passFailCriteria (Optional): {
+     *         passFailMetrics (Optional): {
+     *             String (Optional): {
+     *                 clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
+     *                 aggregate: String(count/percentage/avg/p50/p90/p95/p99/min/max) (Optional)
+     *                 condition: String (Optional)
+     *                 requestName: String (Optional)
+     *                 value: Double (Optional)
+     *                 action: String(continue/stop) (Optional)
+     *                 actualValue: Double (Optional)
+     *                 result: String(passed/undetermined/failed) (Optional)
      *             }
-     *             testResult: String(PASSED/NOT_APPLICABLE/FAILED) (Optional)
-     *             virtualUsers: Integer (Optional)
-     *             testRunId: String (Optional)
-     *             displayName: String (Optional)
-     *             testId: String (Optional)
-     *             description: String (Optional)
-     *             status: String(ACCEPTED/NOTSTARTED/PROVISIONING/PROVISIONED/CONFIGURING/CONFIGURED/EXECUTING/EXECUTED/DEPROVISIONING/DEPROVISIONED/DONE/CANCELLING/CANCELLED/FAILED/VALIDATION_SUCCESS/VALIDATION_FAILURE) (Optional)
-     *             startDateTime: OffsetDateTime (Optional)
-     *             endDateTime: OffsetDateTime (Optional)
-     *             executedDateTime: OffsetDateTime (Optional)
-     *             portalUrl: String (Optional)
-     *             duration: Long (Optional)
-     *             subnetId: String (Optional)
-     *             createdDateTime: OffsetDateTime (Optional)
-     *             createdBy: String (Optional)
-     *             lastModifiedDateTime: OffsetDateTime (Optional)
-     *             lastModifiedBy: String (Optional)
+     *         }
+     *     }
+     *     secrets (Optional): {
+     *         String (Optional): {
+     *             value: String (Optional)
+     *             type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
+     *         }
+     *     }
+     *     certificate (Optional): {
+     *         value: String (Optional)
+     *         type: String(AKV_CERT_URI) (Optional)
+     *         name: String (Optional)
+     *     }
+     *     environmentVariables (Optional): {
+     *         String: String (Optional)
+     *     }
+     *     errorDetails (Optional): [
+     *          (Optional){
+     *             message: String (Optional)
      *         }
      *     ]
-     *     nextLink: String (Optional)
-     * }
-     * }
- * - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return all test runs with given filters along with {@link PagedResponse} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listTestRunsSinglePageAsync(RequestOptions requestOptions) { - final String accept = "application/json"; - return FluxUtil.withContext( - context -> - service.listTestRuns( - this.client.getEndpoint(), - this.client.getServiceVersion().getVersion(), - accept, - requestOptions, - context)) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - getValues(res.getValue(), "value"), - getNextLink(res.getValue(), "nextLink"), - null)); - } - - /** - * Get all test runs with given filters. - * - *

Query Parameters - * - *

Query Parameters
- * - * - * - * - * - * - * - * - * - *
Query Parameters
NameTypeRequiredDescription
orderbyStringNoSort on the supported fields in (field asc/desc) format. eg: executedDateTime asc. Supported fields - executedDateTime
searchStringNoPrefix based, case sensitive search on searchable fields - description, executedUser. For example, to search for a test run, with description 500 VUs, the search parameter can be 500.
testIdStringNoUnique name of an existing load test.
executionFromOffsetDateTimeNoStart DateTime(ISO 8601 literal format) of test-run execution time filter range.
executionToOffsetDateTimeNoEnd DateTime(ISO 8601 literal format) of test-run execution time filter range.
statusStringNoComma separated list of test run status.
maxpagesizeIntegerNoNumber of results in response.
- * - * You can add these to a request with {@link RequestOptions#addQueryParam} - * - *

Response Body Schema - * - *

{@code
-     * {
-     *     value (Required): [
-     *          (Required){
-     *             passFailCriteria (Optional): {
-     *                 passFailMetrics (Optional): {
-     *                     String (Optional): {
-     *                         clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
-     *                         aggregate: String(count/percentage/avg/p50/p90/p95/p99/min/max) (Optional)
-     *                         condition: String (Optional)
-     *                         requestName: String (Optional)
-     *                         value: Double (Optional)
-     *                         action: String(continue/stop) (Optional)
-     *                         actualValue: Double (Optional)
-     *                         result: String(passed/undetermined/failed) (Optional)
-     *                     }
-     *                 }
-     *             }
-     *             secrets (Optional): {
-     *                 String (Optional): {
-     *                     value: String (Optional)
-     *                     type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
-     *                 }
-     *             }
-     *             certificate (Optional): {
-     *                 value: String (Optional)
-     *                 type: String(AKV_CERT_URI) (Optional)
-     *                 name: String (Optional)
-     *             }
-     *             environmentVariables (Optional): {
-     *                 String: String (Optional)
+     *     testRunStatistics (Optional): {
+     *         String (Optional): {
+     *             transaction: String (Optional)
+     *             sampleCount: Double (Optional)
+     *             errorCount: Double (Optional)
+     *             errorPct: Double (Optional)
+     *             meanResTime: Double (Optional)
+     *             medianResTime: Double (Optional)
+     *             maxResTime: Double (Optional)
+     *             minResTime: Double (Optional)
+     *             pct1ResTime: Double (Optional)
+     *             pct2ResTime: Double (Optional)
+     *             pct3ResTime: Double (Optional)
+     *             throughput: Double (Optional)
+     *             receivedKBytesPerSec: Double (Optional)
+     *             sentKBytesPerSec: Double (Optional)
+     *         }
+     *     }
+     *     loadTestConfiguration (Optional): {
+     *         engineInstances: Integer (Optional)
+     *         splitAllCSVs: Boolean (Optional)
+     *         quickStartTest: Boolean (Optional)
+     *         optionalLoadTestConfig (Optional): {
+     *             endpointUrl: String (Optional)
+     *             virtualUsers: Integer (Optional)
+     *             rampUpTime: Integer (Optional)
+     *             duration: Integer (Optional)
+     *         }
+     *     }
+     *     testArtifacts (Optional): {
+     *         inputArtifacts (Optional): {
+     *             configFileInfo (Optional): {
+     *                 url: String (Optional)
+     *                 fileName: String (Optional)
+     *                 fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
+     *                 expireDateTime: OffsetDateTime (Optional)
+     *                 validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
+     *                 validationFailureDetails: String (Optional)
      *             }
-     *             errorDetails (Optional): [
-     *                  (Optional){
-     *                     message: String (Optional)
-     *                 }
+     *             testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
+     *             userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
+     *             inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
+     *             additionalFileInfo (Optional): [
+     *                 (recursive schema, see above)
      *             ]
-     *             testRunStatistics (Optional): {
-     *                 String (Optional): {
-     *                     transaction: String (Optional)
-     *                     sampleCount: Double (Optional)
-     *                     errorCount: Double (Optional)
-     *                     errorPct: Double (Optional)
-     *                     meanResTime: Double (Optional)
-     *                     medianResTime: Double (Optional)
-     *                     maxResTime: Double (Optional)
-     *                     minResTime: Double (Optional)
-     *                     pct1ResTime: Double (Optional)
-     *                     pct2ResTime: Double (Optional)
-     *                     pct3ResTime: Double (Optional)
-     *                     throughput: Double (Optional)
-     *                     receivedKBytesPerSec: Double (Optional)
-     *                     sentKBytesPerSec: Double (Optional)
-     *                 }
-     *             }
-     *             loadTestConfiguration (Optional): {
-     *                 engineInstances: Integer (Optional)
-     *                 splitAllCSVs: Boolean (Optional)
-     *                 quickStartTest: Boolean (Optional)
-     *                 optionalLoadTestConfig (Optional): {
-     *                     endpointUrl: String (Optional)
-     *                     virtualUsers: Integer (Optional)
-     *                     rampUpTime: Integer (Optional)
-     *                     duration: Integer (Optional)
-     *                 }
-     *             }
-     *             testArtifacts (Optional): {
-     *                 inputArtifacts (Optional): {
-     *                     configFileInfo (Optional): {
-     *                         url: String (Optional)
-     *                         fileName: String (Optional)
-     *                         fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
-     *                         expireDateTime: OffsetDateTime (Optional)
-     *                         validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
-     *                         validationFailureDetails: String (Optional)
-     *                     }
-     *                     testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
-     *                     userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
-     *                     inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
-     *                     additionalFileInfo (Optional): [
-     *                         (recursive schema, see above)
-     *                     ]
-     *                 }
-     *                 outputArtifacts (Optional): {
-     *                     resultFileInfo (Optional): (recursive schema, see resultFileInfo above)
-     *                     logsFileInfo (Optional): (recursive schema, see logsFileInfo above)
-     *                 }
-     *             }
-     *             testResult: String(PASSED/NOT_APPLICABLE/FAILED) (Optional)
-     *             virtualUsers: Integer (Optional)
-     *             testRunId: String (Optional)
-     *             displayName: String (Optional)
-     *             testId: String (Optional)
-     *             description: String (Optional)
-     *             status: String(ACCEPTED/NOTSTARTED/PROVISIONING/PROVISIONED/CONFIGURING/CONFIGURED/EXECUTING/EXECUTED/DEPROVISIONING/DEPROVISIONED/DONE/CANCELLING/CANCELLED/FAILED/VALIDATION_SUCCESS/VALIDATION_FAILURE) (Optional)
-     *             startDateTime: OffsetDateTime (Optional)
-     *             endDateTime: OffsetDateTime (Optional)
-     *             executedDateTime: OffsetDateTime (Optional)
-     *             portalUrl: String (Optional)
-     *             duration: Long (Optional)
-     *             subnetId: String (Optional)
-     *             createdDateTime: OffsetDateTime (Optional)
-     *             createdBy: String (Optional)
-     *             lastModifiedDateTime: OffsetDateTime (Optional)
-     *             lastModifiedBy: String (Optional)
      *         }
-     *     ]
-     *     nextLink: String (Optional)
+     *         outputArtifacts (Optional): {
+     *             resultFileInfo (Optional): (recursive schema, see resultFileInfo above)
+     *             logsFileInfo (Optional): (recursive schema, see logsFileInfo above)
+     *         }
+     *     }
+     *     testResult: String(PASSED/NOT_APPLICABLE/FAILED) (Optional)
+     *     virtualUsers: Integer (Optional)
+     *     testRunId: String (Optional)
+     *     displayName: String (Optional)
+     *     testId: String (Optional)
+     *     description: String (Optional)
+     *     status: String(ACCEPTED/NOTSTARTED/PROVISIONING/PROVISIONED/CONFIGURING/CONFIGURED/EXECUTING/EXECUTED/DEPROVISIONING/DEPROVISIONED/DONE/CANCELLING/CANCELLED/FAILED/VALIDATION_SUCCESS/VALIDATION_FAILURE) (Optional)
+     *     startDateTime: OffsetDateTime (Optional)
+     *     endDateTime: OffsetDateTime (Optional)
+     *     executedDateTime: OffsetDateTime (Optional)
+     *     portalUrl: String (Optional)
+     *     duration: Long (Optional)
+     *     subnetId: String (Optional)
+     *     createdDateTime: OffsetDateTime (Optional)
+     *     createdBy: String (Optional)
+     *     lastModifiedDateTime: OffsetDateTime (Optional)
+     *     lastModifiedBy: String (Optional)
      * }
      * }
* * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @param context The context to associate with this operation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return all test runs with given filters along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return all test runs with given filters along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listTestRunsSinglePageAsync(RequestOptions requestOptions, Context context) { + private PagedResponse listTestRunsSinglePage(RequestOptions requestOptions) { final String accept = "application/json"; - return service.listTestRuns( + Response res = + service.listTestRunsSync( this.client.getEndpoint(), this.client.getServiceVersion().getVersion(), accept, requestOptions, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - getValues(res.getValue(), "value"), - getNextLink(res.getValue(), "nextLink"), - null)); - } - - /** - * Get all test runs with given filters. - * - *

Query Parameters - * - * - * - * - * - * - * - * - * - * - * - *
Query Parameters
NameTypeRequiredDescription
orderbyStringNoSort on the supported fields in (field asc/desc) format. eg: executedDateTime asc. Supported fields - executedDateTime
searchStringNoPrefix based, case sensitive search on searchable fields - description, executedUser. For example, to search for a test run, with description 500 VUs, the search parameter can be 500.
testIdStringNoUnique name of an existing load test.
executionFromOffsetDateTimeNoStart DateTime(ISO 8601 literal format) of test-run execution time filter range.
executionToOffsetDateTimeNoEnd DateTime(ISO 8601 literal format) of test-run execution time filter range.
statusStringNoComma separated list of test run status.
maxpagesizeIntegerNoNumber of results in response.
- * - * You can add these to a request with {@link RequestOptions#addQueryParam} - * - *

Response Body Schema - * - *

{@code
-     * {
-     *     value (Required): [
-     *          (Required){
-     *             passFailCriteria (Optional): {
-     *                 passFailMetrics (Optional): {
-     *                     String (Optional): {
-     *                         clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
-     *                         aggregate: String(count/percentage/avg/p50/p90/p95/p99/min/max) (Optional)
-     *                         condition: String (Optional)
-     *                         requestName: String (Optional)
-     *                         value: Double (Optional)
-     *                         action: String(continue/stop) (Optional)
-     *                         actualValue: Double (Optional)
-     *                         result: String(passed/undetermined/failed) (Optional)
-     *                     }
-     *                 }
-     *             }
-     *             secrets (Optional): {
-     *                 String (Optional): {
-     *                     value: String (Optional)
-     *                     type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
-     *                 }
-     *             }
-     *             certificate (Optional): {
-     *                 value: String (Optional)
-     *                 type: String(AKV_CERT_URI) (Optional)
-     *                 name: String (Optional)
-     *             }
-     *             environmentVariables (Optional): {
-     *                 String: String (Optional)
-     *             }
-     *             errorDetails (Optional): [
-     *                  (Optional){
-     *                     message: String (Optional)
-     *                 }
-     *             ]
-     *             testRunStatistics (Optional): {
-     *                 String (Optional): {
-     *                     transaction: String (Optional)
-     *                     sampleCount: Double (Optional)
-     *                     errorCount: Double (Optional)
-     *                     errorPct: Double (Optional)
-     *                     meanResTime: Double (Optional)
-     *                     medianResTime: Double (Optional)
-     *                     maxResTime: Double (Optional)
-     *                     minResTime: Double (Optional)
-     *                     pct1ResTime: Double (Optional)
-     *                     pct2ResTime: Double (Optional)
-     *                     pct3ResTime: Double (Optional)
-     *                     throughput: Double (Optional)
-     *                     receivedKBytesPerSec: Double (Optional)
-     *                     sentKBytesPerSec: Double (Optional)
-     *                 }
-     *             }
-     *             loadTestConfiguration (Optional): {
-     *                 engineInstances: Integer (Optional)
-     *                 splitAllCSVs: Boolean (Optional)
-     *                 quickStartTest: Boolean (Optional)
-     *                 optionalLoadTestConfig (Optional): {
-     *                     endpointUrl: String (Optional)
-     *                     virtualUsers: Integer (Optional)
-     *                     rampUpTime: Integer (Optional)
-     *                     duration: Integer (Optional)
-     *                 }
-     *             }
-     *             testArtifacts (Optional): {
-     *                 inputArtifacts (Optional): {
-     *                     configFileInfo (Optional): {
-     *                         url: String (Optional)
-     *                         fileName: String (Optional)
-     *                         fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
-     *                         expireDateTime: OffsetDateTime (Optional)
-     *                         validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
-     *                         validationFailureDetails: String (Optional)
-     *                     }
-     *                     testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
-     *                     userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
-     *                     inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
-     *                     additionalFileInfo (Optional): [
-     *                         (recursive schema, see above)
-     *                     ]
-     *                 }
-     *                 outputArtifacts (Optional): {
-     *                     resultFileInfo (Optional): (recursive schema, see resultFileInfo above)
-     *                     logsFileInfo (Optional): (recursive schema, see logsFileInfo above)
-     *                 }
-     *             }
-     *             testResult: String(PASSED/NOT_APPLICABLE/FAILED) (Optional)
-     *             virtualUsers: Integer (Optional)
-     *             testRunId: String (Optional)
-     *             displayName: String (Optional)
-     *             testId: String (Optional)
-     *             description: String (Optional)
-     *             status: String(ACCEPTED/NOTSTARTED/PROVISIONING/PROVISIONED/CONFIGURING/CONFIGURED/EXECUTING/EXECUTED/DEPROVISIONING/DEPROVISIONED/DONE/CANCELLING/CANCELLED/FAILED/VALIDATION_SUCCESS/VALIDATION_FAILURE) (Optional)
-     *             startDateTime: OffsetDateTime (Optional)
-     *             endDateTime: OffsetDateTime (Optional)
-     *             executedDateTime: OffsetDateTime (Optional)
-     *             portalUrl: String (Optional)
-     *             duration: Long (Optional)
-     *             subnetId: String (Optional)
-     *             createdDateTime: OffsetDateTime (Optional)
-     *             createdBy: String (Optional)
-     *             lastModifiedDateTime: OffsetDateTime (Optional)
-     *             lastModifiedBy: String (Optional)
-     *         }
-     *     ]
-     *     nextLink: String (Optional)
-     * }
-     * }
- * - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return all test runs with given filters as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listTestRunsAsync(RequestOptions requestOptions) { - RequestOptions requestOptionsForNextPage = new RequestOptions(); - requestOptionsForNextPage.setContext( - requestOptions != null && requestOptions.getContext() != null - ? requestOptions.getContext() - : Context.NONE); - return new PagedFlux<>( - () -> listTestRunsSinglePageAsync(requestOptions), - nextLink -> listTestRunsNextSinglePageAsync(nextLink, requestOptionsForNextPage)); - } - - /** - * Get all test runs with given filters. - * - *

Query Parameters - * - * - * - * - * - * - * - * - * - * - * - *
Query Parameters
NameTypeRequiredDescription
orderbyStringNoSort on the supported fields in (field asc/desc) format. eg: executedDateTime asc. Supported fields - executedDateTime
searchStringNoPrefix based, case sensitive search on searchable fields - description, executedUser. For example, to search for a test run, with description 500 VUs, the search parameter can be 500.
testIdStringNoUnique name of an existing load test.
executionFromOffsetDateTimeNoStart DateTime(ISO 8601 literal format) of test-run execution time filter range.
executionToOffsetDateTimeNoEnd DateTime(ISO 8601 literal format) of test-run execution time filter range.
statusStringNoComma separated list of test run status.
maxpagesizeIntegerNoNumber of results in response.
- * - * You can add these to a request with {@link RequestOptions#addQueryParam} - * - *

Response Body Schema - * - *

{@code
-     * {
-     *     value (Required): [
-     *          (Required){
-     *             passFailCriteria (Optional): {
-     *                 passFailMetrics (Optional): {
-     *                     String (Optional): {
-     *                         clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
-     *                         aggregate: String(count/percentage/avg/p50/p90/p95/p99/min/max) (Optional)
-     *                         condition: String (Optional)
-     *                         requestName: String (Optional)
-     *                         value: Double (Optional)
-     *                         action: String(continue/stop) (Optional)
-     *                         actualValue: Double (Optional)
-     *                         result: String(passed/undetermined/failed) (Optional)
-     *                     }
-     *                 }
-     *             }
-     *             secrets (Optional): {
-     *                 String (Optional): {
-     *                     value: String (Optional)
-     *                     type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
-     *                 }
-     *             }
-     *             certificate (Optional): {
-     *                 value: String (Optional)
-     *                 type: String(AKV_CERT_URI) (Optional)
-     *                 name: String (Optional)
-     *             }
-     *             environmentVariables (Optional): {
-     *                 String: String (Optional)
-     *             }
-     *             errorDetails (Optional): [
-     *                  (Optional){
-     *                     message: String (Optional)
-     *                 }
-     *             ]
-     *             testRunStatistics (Optional): {
-     *                 String (Optional): {
-     *                     transaction: String (Optional)
-     *                     sampleCount: Double (Optional)
-     *                     errorCount: Double (Optional)
-     *                     errorPct: Double (Optional)
-     *                     meanResTime: Double (Optional)
-     *                     medianResTime: Double (Optional)
-     *                     maxResTime: Double (Optional)
-     *                     minResTime: Double (Optional)
-     *                     pct1ResTime: Double (Optional)
-     *                     pct2ResTime: Double (Optional)
-     *                     pct3ResTime: Double (Optional)
-     *                     throughput: Double (Optional)
-     *                     receivedKBytesPerSec: Double (Optional)
-     *                     sentKBytesPerSec: Double (Optional)
-     *                 }
-     *             }
-     *             loadTestConfiguration (Optional): {
-     *                 engineInstances: Integer (Optional)
-     *                 splitAllCSVs: Boolean (Optional)
-     *                 quickStartTest: Boolean (Optional)
-     *                 optionalLoadTestConfig (Optional): {
-     *                     endpointUrl: String (Optional)
-     *                     virtualUsers: Integer (Optional)
-     *                     rampUpTime: Integer (Optional)
-     *                     duration: Integer (Optional)
-     *                 }
-     *             }
-     *             testArtifacts (Optional): {
-     *                 inputArtifacts (Optional): {
-     *                     configFileInfo (Optional): {
-     *                         url: String (Optional)
-     *                         fileName: String (Optional)
-     *                         fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
-     *                         expireDateTime: OffsetDateTime (Optional)
-     *                         validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
-     *                         validationFailureDetails: String (Optional)
-     *                     }
-     *                     testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
-     *                     userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
-     *                     inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
-     *                     additionalFileInfo (Optional): [
-     *                         (recursive schema, see above)
-     *                     ]
-     *                 }
-     *                 outputArtifacts (Optional): {
-     *                     resultFileInfo (Optional): (recursive schema, see resultFileInfo above)
-     *                     logsFileInfo (Optional): (recursive schema, see logsFileInfo above)
-     *                 }
-     *             }
-     *             testResult: String(PASSED/NOT_APPLICABLE/FAILED) (Optional)
-     *             virtualUsers: Integer (Optional)
-     *             testRunId: String (Optional)
-     *             displayName: String (Optional)
-     *             testId: String (Optional)
-     *             description: String (Optional)
-     *             status: String(ACCEPTED/NOTSTARTED/PROVISIONING/PROVISIONED/CONFIGURING/CONFIGURED/EXECUTING/EXECUTED/DEPROVISIONING/DEPROVISIONED/DONE/CANCELLING/CANCELLED/FAILED/VALIDATION_SUCCESS/VALIDATION_FAILURE) (Optional)
-     *             startDateTime: OffsetDateTime (Optional)
-     *             endDateTime: OffsetDateTime (Optional)
-     *             executedDateTime: OffsetDateTime (Optional)
-     *             portalUrl: String (Optional)
-     *             duration: Long (Optional)
-     *             subnetId: String (Optional)
-     *             createdDateTime: OffsetDateTime (Optional)
-     *             createdBy: String (Optional)
-     *             lastModifiedDateTime: OffsetDateTime (Optional)
-     *             lastModifiedBy: String (Optional)
-     *         }
-     *     ]
-     *     nextLink: String (Optional)
-     * }
-     * }
- * - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @param context The context to associate with this operation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return all test runs with given filters as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listTestRunsAsync(RequestOptions requestOptions, Context context) { - RequestOptions requestOptionsForNextPage = new RequestOptions(); - requestOptionsForNextPage.setContext( - requestOptions != null && requestOptions.getContext() != null - ? requestOptions.getContext() - : Context.NONE); - return new PagedFlux<>( - () -> listTestRunsSinglePageAsync(requestOptions, context), - nextLink -> listTestRunsNextSinglePageAsync(nextLink, requestOptionsForNextPage, context)); + Context.NONE); + return new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + getValues(res.getValue(), "value"), + getNextLink(res.getValue(), "nextLink"), + null); } /** @@ -2383,139 +2136,11 @@ public PagedFlux listTestRunsAsync(RequestOptions requestOptions, Co * testIdStringNoUnique name of an existing load test. * executionFromOffsetDateTimeNoStart DateTime(ISO 8601 literal format) of test-run execution time filter range. * executionToOffsetDateTimeNoEnd DateTime(ISO 8601 literal format) of test-run execution time filter range. - * statusStringNoComma separated list of test run status. - * maxpagesizeIntegerNoNumber of results in response. - * - * - * You can add these to a request with {@link RequestOptions#addQueryParam} - * - *

Response Body Schema - * - *

{@code
-     * {
-     *     value (Required): [
-     *          (Required){
-     *             passFailCriteria (Optional): {
-     *                 passFailMetrics (Optional): {
-     *                     String (Optional): {
-     *                         clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
-     *                         aggregate: String(count/percentage/avg/p50/p90/p95/p99/min/max) (Optional)
-     *                         condition: String (Optional)
-     *                         requestName: String (Optional)
-     *                         value: Double (Optional)
-     *                         action: String(continue/stop) (Optional)
-     *                         actualValue: Double (Optional)
-     *                         result: String(passed/undetermined/failed) (Optional)
-     *                     }
-     *                 }
-     *             }
-     *             secrets (Optional): {
-     *                 String (Optional): {
-     *                     value: String (Optional)
-     *                     type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
-     *                 }
-     *             }
-     *             certificate (Optional): {
-     *                 value: String (Optional)
-     *                 type: String(AKV_CERT_URI) (Optional)
-     *                 name: String (Optional)
-     *             }
-     *             environmentVariables (Optional): {
-     *                 String: String (Optional)
-     *             }
-     *             errorDetails (Optional): [
-     *                  (Optional){
-     *                     message: String (Optional)
-     *                 }
-     *             ]
-     *             testRunStatistics (Optional): {
-     *                 String (Optional): {
-     *                     transaction: String (Optional)
-     *                     sampleCount: Double (Optional)
-     *                     errorCount: Double (Optional)
-     *                     errorPct: Double (Optional)
-     *                     meanResTime: Double (Optional)
-     *                     medianResTime: Double (Optional)
-     *                     maxResTime: Double (Optional)
-     *                     minResTime: Double (Optional)
-     *                     pct1ResTime: Double (Optional)
-     *                     pct2ResTime: Double (Optional)
-     *                     pct3ResTime: Double (Optional)
-     *                     throughput: Double (Optional)
-     *                     receivedKBytesPerSec: Double (Optional)
-     *                     sentKBytesPerSec: Double (Optional)
-     *                 }
-     *             }
-     *             loadTestConfiguration (Optional): {
-     *                 engineInstances: Integer (Optional)
-     *                 splitAllCSVs: Boolean (Optional)
-     *                 quickStartTest: Boolean (Optional)
-     *                 optionalLoadTestConfig (Optional): {
-     *                     endpointUrl: String (Optional)
-     *                     virtualUsers: Integer (Optional)
-     *                     rampUpTime: Integer (Optional)
-     *                     duration: Integer (Optional)
-     *                 }
-     *             }
-     *             testArtifacts (Optional): {
-     *                 inputArtifacts (Optional): {
-     *                     configFileInfo (Optional): {
-     *                         url: String (Optional)
-     *                         fileName: String (Optional)
-     *                         fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
-     *                         expireDateTime: OffsetDateTime (Optional)
-     *                         validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
-     *                         validationFailureDetails: String (Optional)
-     *                     }
-     *                     testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
-     *                     userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
-     *                     inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
-     *                     additionalFileInfo (Optional): [
-     *                         (recursive schema, see above)
-     *                     ]
-     *                 }
-     *                 outputArtifacts (Optional): {
-     *                     resultFileInfo (Optional): (recursive schema, see resultFileInfo above)
-     *                     logsFileInfo (Optional): (recursive schema, see logsFileInfo above)
-     *                 }
-     *             }
-     *             testResult: String(PASSED/NOT_APPLICABLE/FAILED) (Optional)
-     *             virtualUsers: Integer (Optional)
-     *             testRunId: String (Optional)
-     *             displayName: String (Optional)
-     *             testId: String (Optional)
-     *             description: String (Optional)
-     *             status: String(ACCEPTED/NOTSTARTED/PROVISIONING/PROVISIONED/CONFIGURING/CONFIGURED/EXECUTING/EXECUTED/DEPROVISIONING/DEPROVISIONED/DONE/CANCELLING/CANCELLED/FAILED/VALIDATION_SUCCESS/VALIDATION_FAILURE) (Optional)
-     *             startDateTime: OffsetDateTime (Optional)
-     *             endDateTime: OffsetDateTime (Optional)
-     *             executedDateTime: OffsetDateTime (Optional)
-     *             portalUrl: String (Optional)
-     *             duration: Long (Optional)
-     *             subnetId: String (Optional)
-     *             createdDateTime: OffsetDateTime (Optional)
-     *             createdBy: String (Optional)
-     *             lastModifiedDateTime: OffsetDateTime (Optional)
-     *             lastModifiedBy: String (Optional)
-     *         }
-     *     ]
-     *     nextLink: String (Optional)
-     * }
-     * }
+ * statusStringNoComma separated list of test run status. + * maxpagesizeIntegerNoNumber of results in response. + * * - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return all test runs with given filters as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listTestRuns(RequestOptions requestOptions) { - return new PagedIterable<>(listTestRunsAsync(requestOptions)); - } - - /** - * Stop test run by name. + * You can add these to a request with {@link RequestOptions#addQueryParam} * *

Response Body Schema * @@ -2625,27 +2250,23 @@ public PagedIterable listTestRuns(RequestOptions requestOptions) { * } * } * - * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore - * or hyphen characters. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return load test run model along with {@link Response} on successful completion of {@link Mono}. + * @return all test runs with given filters as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> stopTestRunWithResponseAsync(String testRunId, RequestOptions requestOptions) { - final String accept = "application/json"; - return FluxUtil.withContext( - context -> - service.stopTestRun( - this.client.getEndpoint(), - testRunId, - this.client.getServiceVersion().getVersion(), - accept, - requestOptions, - context)); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listTestRuns(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null + ? requestOptions.getContext() + : Context.NONE); + return new PagedIterable<>( + () -> listTestRunsSinglePage(requestOptions), + nextLink -> listTestRunsNextSinglePage(nextLink, requestOptionsForNextPage)); } /** @@ -2762,7 +2383,6 @@ public Mono> stopTestRunWithResponseAsync(String testRunId, * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @param context The context to associate with this operation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -2770,16 +2390,17 @@ public Mono> stopTestRunWithResponseAsync(String testRunId, * @return load test run model along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> stopTestRunWithResponseAsync( - String testRunId, RequestOptions requestOptions, Context context) { + public Mono> stopTestRunWithResponseAsync(String testRunId, RequestOptions requestOptions) { final String accept = "application/json"; - return service.stopTestRun( - this.client.getEndpoint(), - testRunId, - this.client.getServiceVersion().getVersion(), - accept, - requestOptions, - context); + return FluxUtil.withContext( + context -> + service.stopTestRun( + this.client.getEndpoint(), + testRunId, + this.client.getServiceVersion().getVersion(), + accept, + requestOptions, + context)); } /** @@ -2904,7 +2525,14 @@ public Mono> stopTestRunWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public Response stopTestRunWithResponse(String testRunId, RequestOptions requestOptions) { - return stopTestRunWithResponseAsync(testRunId, requestOptions).block(); + final String accept = "application/json"; + return service.stopTestRunSync( + this.client.getEndpoint(), + testRunId, + this.client.getServiceVersion().getVersion(), + accept, + requestOptions, + Context.NONE); } /** @@ -2967,55 +2595,22 @@ public Mono> getMetricNamespacesWithResponseAsync( * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @param context The context to associate with this operation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return represents collection of metric namespaces along with {@link Response} on successful completion of {@link - * Mono}. + * @return represents collection of metric namespaces along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getMetricNamespacesWithResponseAsync( - String testRunId, RequestOptions requestOptions, Context context) { + public Response getMetricNamespacesWithResponse(String testRunId, RequestOptions requestOptions) { final String accept = "application/json"; - return service.getMetricNamespaces( + return service.getMetricNamespacesSync( this.client.getEndpoint(), testRunId, this.client.getServiceVersion().getVersion(), accept, requestOptions, - context); - } - - /** - * List the metric namespaces for a load test run. - * - *

Response Body Schema - * - *

{@code
-     * {
-     *     value (Required): [
-     *          (Required){
-     *             description: String (Optional)
-     *             name: String (Optional)
-     *         }
-     *     ]
-     * }
-     * }
- * - * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore - * or hyphen characters. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return represents collection of metric namespaces along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getMetricNamespacesWithResponse(String testRunId, RequestOptions requestOptions) { - return getMetricNamespacesWithResponseAsync(testRunId, requestOptions).block(); + Context.NONE); } /** @@ -3115,75 +2710,24 @@ public Mono> getMetricDefinitionsWithResponseAsync( * or hyphen characters. * @param metricNamespace Metric namespace to query metric definitions for. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @param context The context to associate with this operation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return represents collection of metric definitions along with {@link Response} on successful completion of - * {@link Mono}. + * @return represents collection of metric definitions along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getMetricDefinitionsWithResponseAsync( - String testRunId, String metricNamespace, RequestOptions requestOptions, Context context) { + public Response getMetricDefinitionsWithResponse( + String testRunId, String metricNamespace, RequestOptions requestOptions) { final String accept = "application/json"; - return service.getMetricDefinitions( + return service.getMetricDefinitionsSync( this.client.getEndpoint(), testRunId, metricNamespace, this.client.getServiceVersion().getVersion(), accept, requestOptions, - context); - } - - /** - * List the metric definitions for a load test run. - * - *

Response Body Schema - * - *

{@code
-     * {
-     *     value (Required): [
-     *          (Required){
-     *             dimensions (Optional): [
-     *                  (Optional){
-     *                     description: String (Optional)
-     *                     name: String (Optional)
-     *                 }
-     *             ]
-     *             description: String (Optional)
-     *             name: String (Optional)
-     *             namespace: String (Optional)
-     *             primaryAggregationType: String(Average/Count/None/Total/Percentile90/Percentile95/Percentile99) (Optional)
-     *             supportedAggregationTypes (Optional): [
-     *                 String (Optional)
-     *             ]
-     *             unit: String(NotSpecified/Percent/Count/Seconds/Milliseconds/Bytes/BytesPerSecond/CountPerSecond) (Optional)
-     *             metricAvailabilities (Optional): [
-     *                  (Optional){
-     *                     timeGrain: String(PT5S/PT10S/PT1M/PT5M/PT1H) (Optional)
-     *                 }
-     *             ]
-     *         }
-     *     ]
-     * }
-     * }
- * - * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore - * or hyphen characters. - * @param metricNamespace Metric namespace to query metric definitions for. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return represents collection of metric definitions along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getMetricDefinitionsWithResponse( - String testRunId, String metricNamespace, RequestOptions requestOptions) { - return getMetricDefinitionsWithResponseAsync(testRunId, metricNamespace, requestOptions).block(); + Context.NONE); } /** @@ -3200,6 +2744,16 @@ public Response getMetricDefinitionsWithResponse( * * You can add these to a request with {@link RequestOptions#addQueryParam} * + *

Header Parameters + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: "application/json".
+ * + * You can add these to a request with {@link RequestOptions#addHeader} + * *

Request Body Schema * *

{@code
@@ -3219,23 +2773,18 @@ public Response getMetricDefinitionsWithResponse(
      *
      * 
{@code
      * {
-     *     value (Optional): [
+     *     data (Optional): [
      *          (Optional){
-     *             data (Optional): [
-     *                  (Optional){
-     *                     timestamp: String (Optional)
-     *                     value: Double (Optional)
-     *                 }
-     *             ]
-     *             dimensionValues (Optional): [
-     *                  (Optional){
-     *                     name: String (Optional)
-     *                     value: String (Optional)
-     *                 }
-     *             ]
+     *             timestamp: String (Optional)
+     *             value: Double (Optional)
+     *         }
+     *     ]
+     *     dimensionValues (Optional): [
+     *          (Optional){
+     *             name: String (Optional)
+     *             value: String (Optional)
      *         }
      *     ]
-     *     nextLink: String (Optional)
      * }
      * }
* @@ -3254,7 +2803,7 @@ public Response getMetricDefinitionsWithResponse( * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listMetricsSinglePageAsync( + private Mono> listMetricsSinglePageAsync( String testRunId, String metricName, String metricNamespace, @@ -3270,107 +2819,9 @@ public Mono> listMetricsSinglePageAsync( metricNamespace, timespan, this.client.getServiceVersion().getVersion(), - accept, - requestOptions, - context)) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - getValues(res.getValue(), "value"), - getNextLink(res.getValue(), "nextLink"), - null)); - } - - /** - * List the metric values for a load test run. - * - *

Query Parameters - * - * - * - * - * - * - *
Query Parameters
NameTypeRequiredDescription
aggregationStringNoThe aggregation
intervalStringNoThe interval (i.e. timegrain) of the query. Allowed values: "PT5S", "PT10S", "PT1M", "PT5M", "PT1H".
- * - * You can add these to a request with {@link RequestOptions#addQueryParam} - * - *

Request Body Schema - * - *

{@code
-     * {
-     *     filters (Optional): [
-     *          (Optional){
-     *             name: String (Optional)
-     *             values (Optional): [
-     *                 String (Optional)
-     *             ]
-     *         }
-     *     ]
-     * }
-     * }
- * - *

Response Body Schema - * - *

{@code
-     * {
-     *     value (Optional): [
-     *          (Optional){
-     *             data (Optional): [
-     *                  (Optional){
-     *                     timestamp: String (Optional)
-     *                     value: Double (Optional)
-     *                 }
-     *             ]
-     *             dimensionValues (Optional): [
-     *                  (Optional){
-     *                     name: String (Optional)
-     *                     value: String (Optional)
-     *                 }
-     *             ]
-     *         }
-     *     ]
-     *     nextLink: String (Optional)
-     * }
-     * }
- * - * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore - * or hyphen characters. - * @param metricName Metric name. - * @param metricNamespace Metric namespace to query metric definitions for. - * @param timespan The timespan of the query. It is a string with the following format - * 'startDateTime_ISO/endDateTime_ISO'. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @param context The context to associate with this operation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the response to a metrics query along with {@link PagedResponse} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listMetricsSinglePageAsync( - String testRunId, - String metricName, - String metricNamespace, - String timespan, - RequestOptions requestOptions, - Context context) { - final String accept = "application/json"; - return service.listMetrics( - this.client.getEndpoint(), - testRunId, - metricName, - metricNamespace, - timespan, - this.client.getServiceVersion().getVersion(), - accept, - requestOptions, - context) + accept, + requestOptions, + context)) .map( res -> new PagedResponseBase<>( @@ -3396,6 +2847,16 @@ public Mono> listMetricsSinglePageAsync( * * You can add these to a request with {@link RequestOptions#addQueryParam} * + *

Header Parameters + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: "application/json".
+ * + * You can add these to a request with {@link RequestOptions#addHeader} + * *

Request Body Schema * *

{@code
@@ -3415,23 +2876,18 @@ public Mono> listMetricsSinglePageAsync(
      *
      * 
{@code
      * {
-     *     value (Optional): [
+     *     data (Optional): [
      *          (Optional){
-     *             data (Optional): [
-     *                  (Optional){
-     *                     timestamp: String (Optional)
-     *                     value: Double (Optional)
-     *                 }
-     *             ]
-     *             dimensionValues (Optional): [
-     *                  (Optional){
-     *                     name: String (Optional)
-     *                     value: String (Optional)
-     *                 }
-     *             ]
+     *             timestamp: String (Optional)
+     *             value: Double (Optional)
+     *         }
+     *     ]
+     *     dimensionValues (Optional): [
+     *          (Optional){
+     *             name: String (Optional)
+     *             value: String (Optional)
      *         }
      *     ]
-     *     nextLink: String (Optional)
      * }
      * }
* @@ -3479,6 +2935,16 @@ public PagedFlux listMetricsAsync( * * You can add these to a request with {@link RequestOptions#addQueryParam} * + *

Header Parameters + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: "application/json".
+ * + * You can add these to a request with {@link RequestOptions#addHeader} + * *

Request Body Schema * *

{@code
@@ -3498,23 +2964,18 @@ public PagedFlux listMetricsAsync(
      *
      * 
{@code
      * {
-     *     value (Optional): [
+     *     data (Optional): [
      *          (Optional){
-     *             data (Optional): [
-     *                  (Optional){
-     *                     timestamp: String (Optional)
-     *                     value: Double (Optional)
-     *                 }
-     *             ]
-     *             dimensionValues (Optional): [
-     *                  (Optional){
-     *                     name: String (Optional)
-     *                     value: String (Optional)
-     *                 }
-     *             ]
+     *             timestamp: String (Optional)
+     *             value: Double (Optional)
+     *         }
+     *     ]
+     *     dimensionValues (Optional): [
+     *          (Optional){
+     *             name: String (Optional)
+     *             value: String (Optional)
      *         }
      *     ]
-     *     nextLink: String (Optional)
      * }
      * }
* @@ -3525,31 +2986,38 @@ public PagedFlux listMetricsAsync( * @param timespan The timespan of the query. It is a string with the following format * 'startDateTime_ISO/endDateTime_ISO'. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @param context The context to associate with this operation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the response to a metrics query as paginated response with {@link PagedFlux}. + * @return the response to a metrics query along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listMetricsAsync( + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listMetricsSinglePage( String testRunId, String metricName, String metricNamespace, String timespan, - RequestOptions requestOptions, - Context context) { - RequestOptions requestOptionsForNextPage = new RequestOptions(); - requestOptionsForNextPage.setContext( - requestOptions != null && requestOptions.getContext() != null - ? requestOptions.getContext() - : Context.NONE); - return new PagedFlux<>( - () -> - listMetricsSinglePageAsync( - testRunId, metricName, metricNamespace, timespan, requestOptions, context), - nextLink -> listMetricsNextSinglePageAsync(nextLink, requestOptionsForNextPage, context)); + RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = + service.listMetricsSync( + this.client.getEndpoint(), + testRunId, + metricName, + metricNamespace, + timespan, + this.client.getServiceVersion().getVersion(), + accept, + requestOptions, + Context.NONE); + return new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + getValues(res.getValue(), "value"), + getNextLink(res.getValue(), "nextLink"), + null); } /** @@ -3566,6 +3034,16 @@ public PagedFlux listMetricsAsync( * * You can add these to a request with {@link RequestOptions#addQueryParam} * + *

Header Parameters + * + * + * + * + * + *
Header Parameters
NameTypeRequiredDescription
Content-TypeStringNoThe content type. Allowed values: "application/json".
+ * + * You can add these to a request with {@link RequestOptions#addHeader} + * *

Request Body Schema * *

{@code
@@ -3585,23 +3063,18 @@ public PagedFlux listMetricsAsync(
      *
      * 
{@code
      * {
-     *     value (Optional): [
+     *     data (Optional): [
      *          (Optional){
-     *             data (Optional): [
-     *                  (Optional){
-     *                     timestamp: String (Optional)
-     *                     value: Double (Optional)
-     *                 }
-     *             ]
-     *             dimensionValues (Optional): [
-     *                  (Optional){
-     *                     name: String (Optional)
-     *                     value: String (Optional)
-     *                 }
-     *             ]
+     *             timestamp: String (Optional)
+     *             value: Double (Optional)
+     *         }
+     *     ]
+     *     dimensionValues (Optional): [
+     *          (Optional){
+     *             name: String (Optional)
+     *             value: String (Optional)
      *         }
      *     ]
-     *     nextLink: String (Optional)
      * }
      * }
* @@ -3625,7 +3098,14 @@ public PagedIterable listMetrics( String metricNamespace, String timespan, RequestOptions requestOptions) { - return new PagedIterable<>(listMetricsAsync(testRunId, metricName, metricNamespace, timespan, requestOptions)); + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null + ? requestOptions.getContext() + : Context.NONE); + return new PagedIterable<>( + () -> listMetricsSinglePage(testRunId, metricName, metricNamespace, timespan, requestOptions), + nextLink -> listMetricsNextSinglePage(nextLink, requestOptionsForNextPage)); } /** @@ -3644,12 +3124,7 @@ public PagedIterable listMetrics( *

Response Body Schema * *

{@code
-     * {
-     *     value (Optional): [
-     *         String (Optional)
-     *     ]
-     *     nextLink: String (Optional)
-     * }
+     * String
      * }
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore @@ -3667,7 +3142,7 @@ public PagedIterable listMetrics( * @return metrics dimension values along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listMetricDimensionValuesSinglePageAsync( + private Mono> listMetricDimensionValuesSinglePageAsync( String testRunId, String name, String metricName, @@ -3715,83 +3190,7 @@ public Mono> listMetricDimensionValuesSinglePageAsync( *

Response Body Schema * *

{@code
-     * {
-     *     value (Optional): [
-     *         String (Optional)
-     *     ]
-     *     nextLink: String (Optional)
-     * }
-     * }
- * - * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore - * or hyphen characters. - * @param name Dimension name. - * @param metricName Metric name. - * @param metricNamespace Metric namespace to query metric definitions for. - * @param timespan The timespan of the query. It is a string with the following format - * 'startDateTime_ISO/endDateTime_ISO'. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @param context The context to associate with this operation. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return metrics dimension values along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listMetricDimensionValuesSinglePageAsync( - String testRunId, - String name, - String metricName, - String metricNamespace, - String timespan, - RequestOptions requestOptions, - Context context) { - final String accept = "application/json"; - return service.listMetricDimensionValues( - this.client.getEndpoint(), - testRunId, - name, - metricName, - metricNamespace, - timespan, - this.client.getServiceVersion().getVersion(), - accept, - requestOptions, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - getValues(res.getValue(), "value"), - getNextLink(res.getValue(), "nextLink"), - null)); - } - - /** - * List the dimension values for the given metric dimension name. - * - *

Query Parameters - * - * - * - * - * - *
Query Parameters
NameTypeRequiredDescription
intervalStringNoThe interval (i.e. timegrain) of the query. Allowed values: "PT5S", "PT10S", "PT1M", "PT5M", "PT1H".
- * - * You can add these to a request with {@link RequestOptions#addQueryParam} - * - *

Response Body Schema - * - *

{@code
-     * {
-     *     value (Optional): [
-     *         String (Optional)
-     *     ]
-     *     nextLink: String (Optional)
-     * }
+     * String
      * }
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore @@ -3844,12 +3243,7 @@ public PagedFlux listMetricDimensionValuesAsync( *

Response Body Schema * *

{@code
-     * {
-     *     value (Optional): [
-     *         String (Optional)
-     *     ]
-     *     nextLink: String (Optional)
-     * }
+     * String
      * }
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore @@ -3860,32 +3254,40 @@ public PagedFlux listMetricDimensionValuesAsync( * @param timespan The timespan of the query. It is a string with the following format * 'startDateTime_ISO/endDateTime_ISO'. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @param context The context to associate with this operation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return metrics dimension values as paginated response with {@link PagedFlux}. + * @return metrics dimension values along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listMetricDimensionValuesAsync( + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listMetricDimensionValuesSinglePage( String testRunId, String name, String metricName, String metricNamespace, String timespan, - RequestOptions requestOptions, - Context context) { - RequestOptions requestOptionsForNextPage = new RequestOptions(); - requestOptionsForNextPage.setContext( - requestOptions != null && requestOptions.getContext() != null - ? requestOptions.getContext() - : Context.NONE); - return new PagedFlux<>( - () -> - listMetricDimensionValuesSinglePageAsync( - testRunId, name, metricName, metricNamespace, timespan, requestOptions, context), - nextLink -> listMetricDimensionValuesNextSinglePageAsync(nextLink, requestOptionsForNextPage, context)); + RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = + service.listMetricDimensionValuesSync( + this.client.getEndpoint(), + testRunId, + name, + metricName, + metricNamespace, + timespan, + this.client.getServiceVersion().getVersion(), + accept, + requestOptions, + Context.NONE); + return new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + getValues(res.getValue(), "value"), + getNextLink(res.getValue(), "nextLink"), + null); } /** @@ -3904,113 +3306,41 @@ public PagedFlux listMetricDimensionValuesAsync( *

Response Body Schema * *

{@code
-     * {
-     *     value (Optional): [
-     *         String (Optional)
-     *     ]
-     *     nextLink: String (Optional)
-     * }
-     * }
- * - * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore - * or hyphen characters. - * @param name Dimension name. - * @param metricName Metric name. - * @param metricNamespace Metric namespace to query metric definitions for. - * @param timespan The timespan of the query. It is a string with the following format - * 'startDateTime_ISO/endDateTime_ISO'. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return metrics dimension values as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listMetricDimensionValues( - String testRunId, - String name, - String metricName, - String metricNamespace, - String timespan, - RequestOptions requestOptions) { - return new PagedIterable<>( - listMetricDimensionValuesAsync(testRunId, name, metricName, metricNamespace, timespan, requestOptions)); - } - - /** - * Associate an app component (collection of azure resources) to a test run. - * - *

Request Body Schema - * - *

{@code
-     * {
-     *     components (Required): {
-     *         String (Required): {
-     *             resourceId: String (Optional)
-     *             resourceName: String (Optional)
-     *             resourceType: String (Optional)
-     *             displayName: String (Optional)
-     *             resourceGroup: String (Optional)
-     *             subscriptionId: String (Optional)
-     *             kind: String (Optional)
-     *         }
-     *     }
-     *     testRunId: String (Optional)
-     *     createdDateTime: OffsetDateTime (Optional)
-     *     createdBy: String (Optional)
-     *     lastModifiedDateTime: OffsetDateTime (Optional)
-     *     lastModifiedBy: String (Optional)
-     * }
-     * }
- * - *

Response Body Schema - * - *

{@code
-     * {
-     *     components (Required): {
-     *         String (Required): {
-     *             resourceId: String (Optional)
-     *             resourceName: String (Optional)
-     *             resourceType: String (Optional)
-     *             displayName: String (Optional)
-     *             resourceGroup: String (Optional)
-     *             subscriptionId: String (Optional)
-     *             kind: String (Optional)
-     *         }
-     *     }
-     *     testRunId: String (Optional)
-     *     createdDateTime: OffsetDateTime (Optional)
-     *     createdBy: String (Optional)
-     *     lastModifiedDateTime: OffsetDateTime (Optional)
-     *     lastModifiedBy: String (Optional)
-     * }
+     * String
      * }
* * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. - * @param body App Component model. + * @param name Dimension name. + * @param metricName Metric name. + * @param metricNamespace Metric namespace to query metric definitions for. + * @param timespan The timespan of the query. It is a string with the following format + * 'startDateTime_ISO/endDateTime_ISO'. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return test run app component along with {@link Response} on successful completion of {@link Mono}. + * @return metrics dimension values as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateAppComponentsWithResponseAsync( - String testRunId, BinaryData body, RequestOptions requestOptions) { - final String accept = "application/json"; - return FluxUtil.withContext( - context -> - service.createOrUpdateAppComponents( - this.client.getEndpoint(), - testRunId, - this.client.getServiceVersion().getVersion(), - body, - accept, - requestOptions, - context)); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listMetricDimensionValues( + String testRunId, + String name, + String metricName, + String metricNamespace, + String timespan, + RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null + ? requestOptions.getContext() + : Context.NONE); + return new PagedIterable<>( + () -> + listMetricDimensionValuesSinglePage( + testRunId, name, metricName, metricNamespace, timespan, requestOptions), + nextLink -> listMetricDimensionValuesNextSinglePage(nextLink, requestOptionsForNextPage)); } /** @@ -4066,7 +3396,6 @@ public Mono> createOrUpdateAppComponentsWithResponseAsync( * or hyphen characters. * @param body App Component model. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @param context The context to associate with this operation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. @@ -4075,16 +3404,18 @@ public Mono> createOrUpdateAppComponentsWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> createOrUpdateAppComponentsWithResponseAsync( - String testRunId, BinaryData body, RequestOptions requestOptions, Context context) { + String testRunId, BinaryData body, RequestOptions requestOptions) { final String accept = "application/json"; - return service.createOrUpdateAppComponents( - this.client.getEndpoint(), - testRunId, - this.client.getServiceVersion().getVersion(), - body, - accept, - requestOptions, - context); + return FluxUtil.withContext( + context -> + service.createOrUpdateAppComponents( + this.client.getEndpoint(), + testRunId, + this.client.getServiceVersion().getVersion(), + body, + accept, + requestOptions, + context)); } /** @@ -4149,7 +3480,15 @@ public Mono> createOrUpdateAppComponentsWithResponseAsync( @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrUpdateAppComponentsWithResponse( String testRunId, BinaryData body, RequestOptions requestOptions) { - return createOrUpdateAppComponentsWithResponseAsync(testRunId, body, requestOptions).block(); + final String accept = "application/json"; + return service.createOrUpdateAppComponentsSync( + this.client.getEndpoint(), + testRunId, + this.client.getServiceVersion().getVersion(), + body, + accept, + requestOptions, + Context.NONE); } /** @@ -4232,66 +3571,23 @@ public Mono> getAppComponentsWithResponseAsync( * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @param context The context to associate with this operation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. * @return associated app component (collection of azure resources) for the given test run along with {@link - * Response} on successful completion of {@link Mono}. + * Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getAppComponentsWithResponseAsync( - String testRunId, RequestOptions requestOptions, Context context) { + public Response getAppComponentsWithResponse(String testRunId, RequestOptions requestOptions) { final String accept = "application/json"; - return service.getAppComponents( + return service.getAppComponentsSync( this.client.getEndpoint(), testRunId, this.client.getServiceVersion().getVersion(), accept, requestOptions, - context); - } - - /** - * Get associated app component (collection of azure resources) for the given test run. - * - *

Response Body Schema - * - *

{@code
-     * {
-     *     components (Required): {
-     *         String (Required): {
-     *             resourceId: String (Optional)
-     *             resourceName: String (Optional)
-     *             resourceType: String (Optional)
-     *             displayName: String (Optional)
-     *             resourceGroup: String (Optional)
-     *             subscriptionId: String (Optional)
-     *             kind: String (Optional)
-     *         }
-     *     }
-     *     testRunId: String (Optional)
-     *     createdDateTime: OffsetDateTime (Optional)
-     *     createdBy: String (Optional)
-     *     lastModifiedDateTime: OffsetDateTime (Optional)
-     *     lastModifiedBy: String (Optional)
-     * }
-     * }
- * - * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore - * or hyphen characters. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return associated app component (collection of azure resources) for the given test run along with {@link - * Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getAppComponentsWithResponse(String testRunId, RequestOptions requestOptions) { - return getAppComponentsWithResponseAsync(testRunId, requestOptions).block(); + Context.NONE); } /** @@ -4427,93 +3723,24 @@ public Mono> createOrUpdateServerMetricsConfigWithResponseA * or hyphen characters. * @param body Server metric configuration model. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @param context The context to associate with this operation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return test run server metrics configuration along with {@link Response} on successful completion of {@link - * Mono}. + * @return test run server metrics configuration along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateServerMetricsConfigWithResponseAsync( - String testRunId, BinaryData body, RequestOptions requestOptions, Context context) { + public Response createOrUpdateServerMetricsConfigWithResponse( + String testRunId, BinaryData body, RequestOptions requestOptions) { final String accept = "application/json"; - return service.createOrUpdateServerMetricsConfig( + return service.createOrUpdateServerMetricsConfigSync( this.client.getEndpoint(), testRunId, this.client.getServiceVersion().getVersion(), body, accept, requestOptions, - context); - } - - /** - * Configure server metrics for a test run. - * - *

Request Body Schema - * - *

{@code
-     * {
-     *     testRunId: String (Optional)
-     *     metrics (Optional): {
-     *         String (Optional): {
-     *             id: String (Optional)
-     *             resourceId: String (Required)
-     *             metricNamespace: String (Required)
-     *             displayDescription: String (Optional)
-     *             name: String (Required)
-     *             aggregation: String (Required)
-     *             unit: String (Optional)
-     *             resourceType: String (Required)
-     *         }
-     *     }
-     *     createdDateTime: OffsetDateTime (Optional)
-     *     createdBy: String (Optional)
-     *     lastModifiedDateTime: OffsetDateTime (Optional)
-     *     lastModifiedBy: String (Optional)
-     * }
-     * }
- * - *

Response Body Schema - * - *

{@code
-     * {
-     *     testRunId: String (Optional)
-     *     metrics (Optional): {
-     *         String (Optional): {
-     *             id: String (Optional)
-     *             resourceId: String (Required)
-     *             metricNamespace: String (Required)
-     *             displayDescription: String (Optional)
-     *             name: String (Required)
-     *             aggregation: String (Required)
-     *             unit: String (Optional)
-     *             resourceType: String (Required)
-     *         }
-     *     }
-     *     createdDateTime: OffsetDateTime (Optional)
-     *     createdBy: String (Optional)
-     *     lastModifiedDateTime: OffsetDateTime (Optional)
-     *     lastModifiedBy: String (Optional)
-     * }
-     * }
- * - * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore - * or hyphen characters. - * @param body Server metric configuration model. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return test run server metrics configuration along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateServerMetricsConfigWithResponse( - String testRunId, BinaryData body, RequestOptions requestOptions) { - return createOrUpdateServerMetricsConfigWithResponseAsync(testRunId, body, requestOptions).block(); + Context.NONE); } /** @@ -4598,47 +3825,128 @@ public Mono> getServerMetricsConfigWithResponseAsync( * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore * or hyphen characters. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @param context The context to associate with this operation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return test run server metrics configuration along with {@link Response} on successful completion of {@link - * Mono}. + * @return test run server metrics configuration along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getServerMetricsConfigWithResponseAsync( - String testRunId, RequestOptions requestOptions, Context context) { + public Response getServerMetricsConfigWithResponse(String testRunId, RequestOptions requestOptions) { final String accept = "application/json"; - return service.getServerMetricsConfig( + return service.getServerMetricsConfigSync( this.client.getEndpoint(), testRunId, this.client.getServiceVersion().getVersion(), accept, requestOptions, - context); + Context.NONE); } /** - * List server metrics configuration for the given test run. + * Get the next page of items. * *

Response Body Schema * *

{@code
      * {
-     *     testRunId: String (Optional)
-     *     metrics (Optional): {
+     *     passFailCriteria (Optional): {
+     *         passFailMetrics (Optional): {
+     *             String (Optional): {
+     *                 clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
+     *                 aggregate: String(count/percentage/avg/p50/p90/p95/p99/min/max) (Optional)
+     *                 condition: String (Optional)
+     *                 requestName: String (Optional)
+     *                 value: Double (Optional)
+     *                 action: String(continue/stop) (Optional)
+     *                 actualValue: Double (Optional)
+     *                 result: String(passed/undetermined/failed) (Optional)
+     *             }
+     *         }
+     *     }
+     *     secrets (Optional): {
      *         String (Optional): {
-     *             id: String (Optional)
-     *             resourceId: String (Required)
-     *             metricNamespace: String (Required)
-     *             displayDescription: String (Optional)
-     *             name: String (Required)
-     *             aggregation: String (Required)
-     *             unit: String (Optional)
-     *             resourceType: String (Required)
+     *             value: String (Optional)
+     *             type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
+     *         }
+     *     }
+     *     certificate (Optional): {
+     *         value: String (Optional)
+     *         type: String(AKV_CERT_URI) (Optional)
+     *         name: String (Optional)
+     *     }
+     *     environmentVariables (Optional): {
+     *         String: String (Optional)
+     *     }
+     *     errorDetails (Optional): [
+     *          (Optional){
+     *             message: String (Optional)
+     *         }
+     *     ]
+     *     testRunStatistics (Optional): {
+     *         String (Optional): {
+     *             transaction: String (Optional)
+     *             sampleCount: Double (Optional)
+     *             errorCount: Double (Optional)
+     *             errorPct: Double (Optional)
+     *             meanResTime: Double (Optional)
+     *             medianResTime: Double (Optional)
+     *             maxResTime: Double (Optional)
+     *             minResTime: Double (Optional)
+     *             pct1ResTime: Double (Optional)
+     *             pct2ResTime: Double (Optional)
+     *             pct3ResTime: Double (Optional)
+     *             throughput: Double (Optional)
+     *             receivedKBytesPerSec: Double (Optional)
+     *             sentKBytesPerSec: Double (Optional)
+     *         }
+     *     }
+     *     loadTestConfiguration (Optional): {
+     *         engineInstances: Integer (Optional)
+     *         splitAllCSVs: Boolean (Optional)
+     *         quickStartTest: Boolean (Optional)
+     *         optionalLoadTestConfig (Optional): {
+     *             endpointUrl: String (Optional)
+     *             virtualUsers: Integer (Optional)
+     *             rampUpTime: Integer (Optional)
+     *             duration: Integer (Optional)
+     *         }
+     *     }
+     *     testArtifacts (Optional): {
+     *         inputArtifacts (Optional): {
+     *             configFileInfo (Optional): {
+     *                 url: String (Optional)
+     *                 fileName: String (Optional)
+     *                 fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
+     *                 expireDateTime: OffsetDateTime (Optional)
+     *                 validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
+     *                 validationFailureDetails: String (Optional)
+     *             }
+     *             testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
+     *             userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
+     *             inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
+     *             additionalFileInfo (Optional): [
+     *                 (recursive schema, see above)
+     *             ]
+     *         }
+     *         outputArtifacts (Optional): {
+     *             resultFileInfo (Optional): (recursive schema, see resultFileInfo above)
+     *             logsFileInfo (Optional): (recursive schema, see logsFileInfo above)
      *         }
      *     }
+     *     testResult: String(PASSED/NOT_APPLICABLE/FAILED) (Optional)
+     *     virtualUsers: Integer (Optional)
+     *     testRunId: String (Optional)
+     *     displayName: String (Optional)
+     *     testId: String (Optional)
+     *     description: String (Optional)
+     *     status: String(ACCEPTED/NOTSTARTED/PROVISIONING/PROVISIONED/CONFIGURING/CONFIGURED/EXECUTING/EXECUTED/DEPROVISIONING/DEPROVISIONED/DONE/CANCELLING/CANCELLED/FAILED/VALIDATION_SUCCESS/VALIDATION_FAILURE) (Optional)
+     *     startDateTime: OffsetDateTime (Optional)
+     *     endDateTime: OffsetDateTime (Optional)
+     *     executedDateTime: OffsetDateTime (Optional)
+     *     portalUrl: String (Optional)
+     *     duration: Long (Optional)
+     *     subnetId: String (Optional)
      *     createdDateTime: OffsetDateTime (Optional)
      *     createdBy: String (Optional)
      *     lastModifiedDateTime: OffsetDateTime (Optional)
@@ -4646,137 +3954,8 @@ public Mono> getServerMetricsConfigWithResponseAsync(
      * }
      * }
* - * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore - * or hyphen characters. - * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @throws HttpResponseException thrown if the request is rejected by server. - * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. - * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. - * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return test run server metrics configuration along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getServerMetricsConfigWithResponse(String testRunId, RequestOptions requestOptions) { - return getServerMetricsConfigWithResponseAsync(testRunId, requestOptions).block(); - } - - /** - * Get the next page of items. - * - *

Response Body Schema - * - *

{@code
-     * {
-     *     value (Required): [
-     *          (Required){
-     *             passFailCriteria (Optional): {
-     *                 passFailMetrics (Optional): {
-     *                     String (Optional): {
-     *                         clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
-     *                         aggregate: String(count/percentage/avg/p50/p90/p95/p99/min/max) (Optional)
-     *                         condition: String (Optional)
-     *                         requestName: String (Optional)
-     *                         value: Double (Optional)
-     *                         action: String(continue/stop) (Optional)
-     *                         actualValue: Double (Optional)
-     *                         result: String(passed/undetermined/failed) (Optional)
-     *                     }
-     *                 }
-     *             }
-     *             secrets (Optional): {
-     *                 String (Optional): {
-     *                     value: String (Optional)
-     *                     type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
-     *                 }
-     *             }
-     *             certificate (Optional): {
-     *                 value: String (Optional)
-     *                 type: String(AKV_CERT_URI) (Optional)
-     *                 name: String (Optional)
-     *             }
-     *             environmentVariables (Optional): {
-     *                 String: String (Optional)
-     *             }
-     *             errorDetails (Optional): [
-     *                  (Optional){
-     *                     message: String (Optional)
-     *                 }
-     *             ]
-     *             testRunStatistics (Optional): {
-     *                 String (Optional): {
-     *                     transaction: String (Optional)
-     *                     sampleCount: Double (Optional)
-     *                     errorCount: Double (Optional)
-     *                     errorPct: Double (Optional)
-     *                     meanResTime: Double (Optional)
-     *                     medianResTime: Double (Optional)
-     *                     maxResTime: Double (Optional)
-     *                     minResTime: Double (Optional)
-     *                     pct1ResTime: Double (Optional)
-     *                     pct2ResTime: Double (Optional)
-     *                     pct3ResTime: Double (Optional)
-     *                     throughput: Double (Optional)
-     *                     receivedKBytesPerSec: Double (Optional)
-     *                     sentKBytesPerSec: Double (Optional)
-     *                 }
-     *             }
-     *             loadTestConfiguration (Optional): {
-     *                 engineInstances: Integer (Optional)
-     *                 splitAllCSVs: Boolean (Optional)
-     *                 quickStartTest: Boolean (Optional)
-     *                 optionalLoadTestConfig (Optional): {
-     *                     endpointUrl: String (Optional)
-     *                     virtualUsers: Integer (Optional)
-     *                     rampUpTime: Integer (Optional)
-     *                     duration: Integer (Optional)
-     *                 }
-     *             }
-     *             testArtifacts (Optional): {
-     *                 inputArtifacts (Optional): {
-     *                     configFileInfo (Optional): {
-     *                         url: String (Optional)
-     *                         fileName: String (Optional)
-     *                         fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
-     *                         expireDateTime: OffsetDateTime (Optional)
-     *                         validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
-     *                         validationFailureDetails: String (Optional)
-     *                     }
-     *                     testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
-     *                     userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
-     *                     inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
-     *                     additionalFileInfo (Optional): [
-     *                         (recursive schema, see above)
-     *                     ]
-     *                 }
-     *                 outputArtifacts (Optional): {
-     *                     resultFileInfo (Optional): (recursive schema, see resultFileInfo above)
-     *                     logsFileInfo (Optional): (recursive schema, see logsFileInfo above)
-     *                 }
-     *             }
-     *             testResult: String(PASSED/NOT_APPLICABLE/FAILED) (Optional)
-     *             virtualUsers: Integer (Optional)
-     *             testRunId: String (Optional)
-     *             displayName: String (Optional)
-     *             testId: String (Optional)
-     *             description: String (Optional)
-     *             status: String(ACCEPTED/NOTSTARTED/PROVISIONING/PROVISIONED/CONFIGURING/CONFIGURED/EXECUTING/EXECUTED/DEPROVISIONING/DEPROVISIONED/DONE/CANCELLING/CANCELLED/FAILED/VALIDATION_SUCCESS/VALIDATION_FAILURE) (Optional)
-     *             startDateTime: OffsetDateTime (Optional)
-     *             endDateTime: OffsetDateTime (Optional)
-     *             executedDateTime: OffsetDateTime (Optional)
-     *             portalUrl: String (Optional)
-     *             duration: Long (Optional)
-     *             subnetId: String (Optional)
-     *             createdDateTime: OffsetDateTime (Optional)
-     *             createdBy: String (Optional)
-     *             lastModifiedDateTime: OffsetDateTime (Optional)
-     *             lastModifiedBy: String (Optional)
-     *         }
-     *     ]
-     *     nextLink: String (Optional)
-     * }
-     * }
- * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -4785,7 +3964,7 @@ public Response getServerMetricsConfigWithResponse(String testRunId, * @return collection of test runs along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listTestRunsNextSinglePageAsync( + private Mono> listTestRunsNextSinglePageAsync( String nextLink, RequestOptions requestOptions) { final String accept = "application/json"; return FluxUtil.withContext( @@ -4810,138 +3989,131 @@ public Mono> listTestRunsNextSinglePageAsync( * *

{@code
      * {
-     *     value (Required): [
-     *          (Required){
-     *             passFailCriteria (Optional): {
-     *                 passFailMetrics (Optional): {
-     *                     String (Optional): {
-     *                         clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
-     *                         aggregate: String(count/percentage/avg/p50/p90/p95/p99/min/max) (Optional)
-     *                         condition: String (Optional)
-     *                         requestName: String (Optional)
-     *                         value: Double (Optional)
-     *                         action: String(continue/stop) (Optional)
-     *                         actualValue: Double (Optional)
-     *                         result: String(passed/undetermined/failed) (Optional)
-     *                     }
-     *                 }
-     *             }
-     *             secrets (Optional): {
-     *                 String (Optional): {
-     *                     value: String (Optional)
-     *                     type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
-     *                 }
-     *             }
-     *             certificate (Optional): {
-     *                 value: String (Optional)
-     *                 type: String(AKV_CERT_URI) (Optional)
-     *                 name: String (Optional)
+     *     passFailCriteria (Optional): {
+     *         passFailMetrics (Optional): {
+     *             String (Optional): {
+     *                 clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
+     *                 aggregate: String(count/percentage/avg/p50/p90/p95/p99/min/max) (Optional)
+     *                 condition: String (Optional)
+     *                 requestName: String (Optional)
+     *                 value: Double (Optional)
+     *                 action: String(continue/stop) (Optional)
+     *                 actualValue: Double (Optional)
+     *                 result: String(passed/undetermined/failed) (Optional)
      *             }
-     *             environmentVariables (Optional): {
-     *                 String: String (Optional)
+     *         }
+     *     }
+     *     secrets (Optional): {
+     *         String (Optional): {
+     *             value: String (Optional)
+     *             type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
+     *         }
+     *     }
+     *     certificate (Optional): {
+     *         value: String (Optional)
+     *         type: String(AKV_CERT_URI) (Optional)
+     *         name: String (Optional)
+     *     }
+     *     environmentVariables (Optional): {
+     *         String: String (Optional)
+     *     }
+     *     errorDetails (Optional): [
+     *          (Optional){
+     *             message: String (Optional)
+     *         }
+     *     ]
+     *     testRunStatistics (Optional): {
+     *         String (Optional): {
+     *             transaction: String (Optional)
+     *             sampleCount: Double (Optional)
+     *             errorCount: Double (Optional)
+     *             errorPct: Double (Optional)
+     *             meanResTime: Double (Optional)
+     *             medianResTime: Double (Optional)
+     *             maxResTime: Double (Optional)
+     *             minResTime: Double (Optional)
+     *             pct1ResTime: Double (Optional)
+     *             pct2ResTime: Double (Optional)
+     *             pct3ResTime: Double (Optional)
+     *             throughput: Double (Optional)
+     *             receivedKBytesPerSec: Double (Optional)
+     *             sentKBytesPerSec: Double (Optional)
+     *         }
+     *     }
+     *     loadTestConfiguration (Optional): {
+     *         engineInstances: Integer (Optional)
+     *         splitAllCSVs: Boolean (Optional)
+     *         quickStartTest: Boolean (Optional)
+     *         optionalLoadTestConfig (Optional): {
+     *             endpointUrl: String (Optional)
+     *             virtualUsers: Integer (Optional)
+     *             rampUpTime: Integer (Optional)
+     *             duration: Integer (Optional)
+     *         }
+     *     }
+     *     testArtifacts (Optional): {
+     *         inputArtifacts (Optional): {
+     *             configFileInfo (Optional): {
+     *                 url: String (Optional)
+     *                 fileName: String (Optional)
+     *                 fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
+     *                 expireDateTime: OffsetDateTime (Optional)
+     *                 validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
+     *                 validationFailureDetails: String (Optional)
      *             }
-     *             errorDetails (Optional): [
-     *                  (Optional){
-     *                     message: String (Optional)
-     *                 }
+     *             testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
+     *             userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
+     *             inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
+     *             additionalFileInfo (Optional): [
+     *                 (recursive schema, see above)
      *             ]
-     *             testRunStatistics (Optional): {
-     *                 String (Optional): {
-     *                     transaction: String (Optional)
-     *                     sampleCount: Double (Optional)
-     *                     errorCount: Double (Optional)
-     *                     errorPct: Double (Optional)
-     *                     meanResTime: Double (Optional)
-     *                     medianResTime: Double (Optional)
-     *                     maxResTime: Double (Optional)
-     *                     minResTime: Double (Optional)
-     *                     pct1ResTime: Double (Optional)
-     *                     pct2ResTime: Double (Optional)
-     *                     pct3ResTime: Double (Optional)
-     *                     throughput: Double (Optional)
-     *                     receivedKBytesPerSec: Double (Optional)
-     *                     sentKBytesPerSec: Double (Optional)
-     *                 }
-     *             }
-     *             loadTestConfiguration (Optional): {
-     *                 engineInstances: Integer (Optional)
-     *                 splitAllCSVs: Boolean (Optional)
-     *                 quickStartTest: Boolean (Optional)
-     *                 optionalLoadTestConfig (Optional): {
-     *                     endpointUrl: String (Optional)
-     *                     virtualUsers: Integer (Optional)
-     *                     rampUpTime: Integer (Optional)
-     *                     duration: Integer (Optional)
-     *                 }
-     *             }
-     *             testArtifacts (Optional): {
-     *                 inputArtifacts (Optional): {
-     *                     configFileInfo (Optional): {
-     *                         url: String (Optional)
-     *                         fileName: String (Optional)
-     *                         fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
-     *                         expireDateTime: OffsetDateTime (Optional)
-     *                         validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
-     *                         validationFailureDetails: String (Optional)
-     *                     }
-     *                     testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
-     *                     userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
-     *                     inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
-     *                     additionalFileInfo (Optional): [
-     *                         (recursive schema, see above)
-     *                     ]
-     *                 }
-     *                 outputArtifacts (Optional): {
-     *                     resultFileInfo (Optional): (recursive schema, see resultFileInfo above)
-     *                     logsFileInfo (Optional): (recursive schema, see logsFileInfo above)
-     *                 }
-     *             }
-     *             testResult: String(PASSED/NOT_APPLICABLE/FAILED) (Optional)
-     *             virtualUsers: Integer (Optional)
-     *             testRunId: String (Optional)
-     *             displayName: String (Optional)
-     *             testId: String (Optional)
-     *             description: String (Optional)
-     *             status: String(ACCEPTED/NOTSTARTED/PROVISIONING/PROVISIONED/CONFIGURING/CONFIGURED/EXECUTING/EXECUTED/DEPROVISIONING/DEPROVISIONED/DONE/CANCELLING/CANCELLED/FAILED/VALIDATION_SUCCESS/VALIDATION_FAILURE) (Optional)
-     *             startDateTime: OffsetDateTime (Optional)
-     *             endDateTime: OffsetDateTime (Optional)
-     *             executedDateTime: OffsetDateTime (Optional)
-     *             portalUrl: String (Optional)
-     *             duration: Long (Optional)
-     *             subnetId: String (Optional)
-     *             createdDateTime: OffsetDateTime (Optional)
-     *             createdBy: String (Optional)
-     *             lastModifiedDateTime: OffsetDateTime (Optional)
-     *             lastModifiedBy: String (Optional)
      *         }
-     *     ]
-     *     nextLink: String (Optional)
+     *         outputArtifacts (Optional): {
+     *             resultFileInfo (Optional): (recursive schema, see resultFileInfo above)
+     *             logsFileInfo (Optional): (recursive schema, see logsFileInfo above)
+     *         }
+     *     }
+     *     testResult: String(PASSED/NOT_APPLICABLE/FAILED) (Optional)
+     *     virtualUsers: Integer (Optional)
+     *     testRunId: String (Optional)
+     *     displayName: String (Optional)
+     *     testId: String (Optional)
+     *     description: String (Optional)
+     *     status: String(ACCEPTED/NOTSTARTED/PROVISIONING/PROVISIONED/CONFIGURING/CONFIGURED/EXECUTING/EXECUTED/DEPROVISIONING/DEPROVISIONED/DONE/CANCELLING/CANCELLED/FAILED/VALIDATION_SUCCESS/VALIDATION_FAILURE) (Optional)
+     *     startDateTime: OffsetDateTime (Optional)
+     *     endDateTime: OffsetDateTime (Optional)
+     *     executedDateTime: OffsetDateTime (Optional)
+     *     portalUrl: String (Optional)
+     *     duration: Long (Optional)
+     *     subnetId: String (Optional)
+     *     createdDateTime: OffsetDateTime (Optional)
+     *     createdBy: String (Optional)
+     *     lastModifiedDateTime: OffsetDateTime (Optional)
+     *     lastModifiedBy: String (Optional)
      * }
      * }
* - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @param context The context to associate with this operation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return collection of test runs along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return collection of test runs along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listTestRunsNextSinglePageAsync( - String nextLink, RequestOptions requestOptions, Context context) { + private PagedResponse listTestRunsNextSinglePage(String nextLink, RequestOptions requestOptions) { final String accept = "application/json"; - return service.listTestRunsNext(nextLink, this.client.getEndpoint(), accept, requestOptions, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - getValues(res.getValue(), "value"), - getNextLink(res.getValue(), "nextLink"), - null)); + Response res = + service.listTestRunsNextSync(nextLink, this.client.getEndpoint(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + getValues(res.getValue(), "value"), + getNextLink(res.getValue(), "nextLink"), + null); } /** @@ -4951,27 +4123,23 @@ public Mono> listTestRunsNextSinglePageAsync( * *

{@code
      * {
-     *     value (Optional): [
+     *     data (Optional): [
      *          (Optional){
-     *             data (Optional): [
-     *                  (Optional){
-     *                     timestamp: String (Optional)
-     *                     value: Double (Optional)
-     *                 }
-     *             ]
-     *             dimensionValues (Optional): [
-     *                  (Optional){
-     *                     name: String (Optional)
-     *                     value: String (Optional)
-     *                 }
-     *             ]
+     *             timestamp: String (Optional)
+     *             value: Double (Optional)
+     *         }
+     *     ]
+     *     dimensionValues (Optional): [
+     *          (Optional){
+     *             name: String (Optional)
+     *             value: String (Optional)
      *         }
      *     ]
-     *     nextLink: String (Optional)
      * }
      * }
* - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -4981,7 +4149,7 @@ public Mono> listTestRunsNextSinglePageAsync( * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listMetricsNextSinglePageAsync( + private Mono> listMetricsNextSinglePageAsync( String nextLink, RequestOptions requestOptions) { final String accept = "application/json"; return FluxUtil.withContext( @@ -5006,50 +4174,42 @@ public Mono> listMetricsNextSinglePageAsync( * *

{@code
      * {
-     *     value (Optional): [
+     *     data (Optional): [
      *          (Optional){
-     *             data (Optional): [
-     *                  (Optional){
-     *                     timestamp: String (Optional)
-     *                     value: Double (Optional)
-     *                 }
-     *             ]
-     *             dimensionValues (Optional): [
-     *                  (Optional){
-     *                     name: String (Optional)
-     *                     value: String (Optional)
-     *                 }
-     *             ]
+     *             timestamp: String (Optional)
+     *             value: Double (Optional)
+     *         }
+     *     ]
+     *     dimensionValues (Optional): [
+     *          (Optional){
+     *             name: String (Optional)
+     *             value: String (Optional)
      *         }
      *     ]
-     *     nextLink: String (Optional)
      * }
      * }
* - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @param context The context to associate with this operation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return the response to a metrics query along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return the response to a metrics query along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listMetricsNextSinglePageAsync( - String nextLink, RequestOptions requestOptions, Context context) { + private PagedResponse listMetricsNextSinglePage(String nextLink, RequestOptions requestOptions) { final String accept = "application/json"; - return service.listMetricsNext(nextLink, this.client.getEndpoint(), accept, requestOptions, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - getValues(res.getValue(), "value"), - getNextLink(res.getValue(), "nextLink"), - null)); + Response res = + service.listMetricsNextSync(nextLink, this.client.getEndpoint(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + getValues(res.getValue(), "value"), + getNextLink(res.getValue(), "nextLink"), + null); } /** @@ -5058,15 +4218,11 @@ public Mono> listMetricsNextSinglePageAsync( *

Response Body Schema * *

{@code
-     * {
-     *     value (Optional): [
-     *         String (Optional)
-     *     ]
-     *     nextLink: String (Optional)
-     * }
+     * String
      * }
* - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -5075,7 +4231,7 @@ public Mono> listMetricsNextSinglePageAsync( * @return metrics dimension values along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listMetricDimensionValuesNextSinglePageAsync( + private Mono> listMetricDimensionValuesNextSinglePageAsync( String nextLink, RequestOptions requestOptions) { final String accept = "application/json"; return FluxUtil.withContext( @@ -5099,38 +4255,32 @@ public Mono> listMetricDimensionValuesNextSinglePageAs *

Response Body Schema * *

{@code
-     * {
-     *     value (Optional): [
-     *         String (Optional)
-     *     ]
-     *     nextLink: String (Optional)
-     * }
+     * String
      * }
* - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param requestOptions The options to configure the HTTP request before HTTP client sends it. - * @param context The context to associate with this operation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404. * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. - * @return metrics dimension values along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return metrics dimension values along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> listMetricDimensionValuesNextSinglePageAsync( - String nextLink, RequestOptions requestOptions, Context context) { + private PagedResponse listMetricDimensionValuesNextSinglePage( + String nextLink, RequestOptions requestOptions) { final String accept = "application/json"; - return service.listMetricDimensionValuesNext( - nextLink, this.client.getEndpoint(), accept, requestOptions, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - getValues(res.getValue(), "value"), - getNextLink(res.getValue(), "nextLink"), - null)); + Response res = + service.listMetricDimensionValuesNextSync( + nextLink, this.client.getEndpoint(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + getValues(res.getValue(), "value"), + getNextLink(res.getValue(), "nextLink"), + null); } private List getValues(BinaryData binaryData, String path) { diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/module-info.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/module-info.java index 46c02485cca9..c735cba0bf71 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/module-info.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/module-info.java @@ -1,3 +1,7 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + module com.azure.developer.loadtesting { requires transitive com.azure.core; diff --git a/sdk/loadtesting/azure-developer-loadtesting/swagger/README.md b/sdk/loadtesting/azure-developer-loadtesting/swagger/README.md index 9f42067ba13b..19e01d3e0de3 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/swagger/README.md +++ b/sdk/loadtesting/azure-developer-loadtesting/swagger/README.md @@ -1,7 +1,6 @@ ## Generate autorest code ```yaml -require: https://github.com/Azure/azure-rest-api-specs/blob/3e27c70e7c02c07b458bc0e94716c3d82d3fdd19/specification/loadtestservice/data-plane/readme.md java: true data-plane: true title: LoadTestingClient @@ -14,16 +13,17 @@ generate-builder-per-client: true partial-update: true output-folder: $(azure-sdk-for-java-folder)/sdk/loadtesting/azure-developer-loadtesting service-versions: -- '2022-11-01' + - '2022-11-01' directive: -- rename-operation: - from: LoadTestRun_ListMetricNamespaces - to: LoadTestRun_GetMetricNamespaces -- rename-operation: - from: LoadTestRun_ListMetricDefinitions - to: LoadTestRun_GetMetricDefinitions -- where-operation: LoadTestRun_ListMetrics - transform: $['parameters'][3]['x-ms-client-name'] = 'metricName' -- where-operation: LoadTestRun_ListMetricDimensionValues - transform: $['parameters'][3]['x-ms-client-name'] = 'metricName' + - rename-operation: + from: LoadTestRun_ListMetricNamespaces + to: LoadTestRun_GetMetricNamespaces + - rename-operation: + from: LoadTestRun_ListMetricDefinitions + to: LoadTestRun_GetMetricDefinitions + - where-operation: LoadTestRun_ListMetrics + transform: $['parameters'][3]['x-ms-client-name'] = 'metricName' + - where-operation: LoadTestRun_ListMetricDimensionValues + transform: $['parameters'][3]['x-ms-client-name'] = 'metricName' +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/loadtestservice/data-plane/readme.md ```