diff --git a/sdk/loadtesting/azure-developer-loadtesting/package.json b/sdk/loadtesting/azure-developer-loadtesting/package.json new file mode 100644 index 000000000000..4144ded7a1a0 --- /dev/null +++ b/sdk/loadtesting/azure-developer-loadtesting/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "@azure-tools/typespec-java": "^0.38.3" + } +} 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 c39162e6cbb5..e6835479d50b 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 @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting; import com.azure.core.annotation.Generated; @@ -18,17 +19,20 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.BinaryData; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.developer.loadtesting.implementation.JsonMergePatchHelper; import com.azure.developer.loadtesting.implementation.LoadTestAdministrationClientImpl; +import com.azure.developer.loadtesting.implementation.models.CloneTestRequest1; import com.azure.developer.loadtesting.models.LoadTest; import com.azure.developer.loadtesting.models.LoadTestingFileType; +import com.azure.developer.loadtesting.models.NotificationRule; +import com.azure.developer.loadtesting.models.OperationStatus; import com.azure.developer.loadtesting.models.TestAppComponents; import com.azure.developer.loadtesting.models.TestFileInfo; import com.azure.developer.loadtesting.models.TestProfile; import com.azure.developer.loadtesting.models.TestServerMetricsConfiguration; -import java.time.Duration; +import com.azure.developer.loadtesting.models.Trigger; +import com.azure.developer.loadtesting.models.TriggerState; import java.time.OffsetDateTime; import java.util.List; import java.util.Objects; @@ -41,164 +45,17 @@ */ @ServiceClient(builder = LoadTestAdministrationClientBuilder.class, isAsync = true) public final class LoadTestAdministrationAsyncClient { - - private static final ClientLogger LOGGER = new ClientLogger(LoadTestAdministrationAsyncClient.class); - @Generated private final LoadTestAdministrationClientImpl serviceClient; /** - * Configure server metrics for a test. - *

Request Body Schema

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

Response Body Schema

- * - *
-     * {@code
-     * {
-     *     testId: String (Optional)
-     *     metrics (Optional, Required on create): {
-     *         String (Required): {
-     *             id: String (Optional)
-     *             resourceId: String (Optional, Required on create)
-     *             metricNamespace: String (Optional, Required on create)
-     *             displayDescription: String (Optional)
-     *             name: String (Optional, Required on create)
-     *             aggregation: String (Optional, Required on create)
-     *             unit: String (Optional)
-     *             resourceType: String (Optional, Required on create)
-     *         }
-     *     }
-     *     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}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateServerMetricsConfigWithResponse(String testId, BinaryData body, - RequestOptions requestOptions) { - return this.serviceClient.createOrUpdateServerMetricsConfigWithResponseAsync(testId, body, requestOptions); - } - - /** - * Uploads file and polls the validation status of the uploaded file. - * - * @param testId Unique name for load test, must be a valid URL character ^[a-z0-9_-]*$. - * @param fileName Unique name for test file with file extension like : App.jmx. - * @param body The file content as application/octet-stream. - * @param fileUploadRequestOptions The options to configure the file upload HTTP request before HTTP client sends - * it. - * @throws ResourceNotFoundException when a test with {@code testId} doesn't exist. - * @return A {@link PollerFlux} to poll on and retrieve the file info with validation status. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux beginUploadTestFile(String testId, String fileName, BinaryData body, - RequestOptions fileUploadRequestOptions) { - RequestOptions defaultRequestOptions = new RequestOptions(); - if (fileUploadRequestOptions != null) { - defaultRequestOptions.setContext(fileUploadRequestOptions.getContext()); - } - return new PollerFlux<>(Duration.ofSeconds(2), - (context) -> uploadTestFileWithResponse(testId, fileName, body, fileUploadRequestOptions) - .flatMap(FluxUtil::toMono) - .flatMap(fileBinaryData -> PollingUtils - .getPollResponseMono(() -> PollingUtils.getValidationStatus(fileBinaryData))) - .flatMap(fileValidationPollResp -> Mono.just(fileValidationPollResp.getValue())), - (context) -> getTestFileWithResponse(testId, fileName, defaultRequestOptions).flatMap(FluxUtil::toMono) - .flatMap(fileBinaryData -> PollingUtils - .getPollResponseMono(() -> PollingUtils.getValidationStatus(fileBinaryData))), - (activationResponse, context) -> Mono - .error(LOGGER.logExceptionAsError(new RuntimeException("Cancellation is not supported"))), - (context) -> getTestFileWithResponse(testId, fileName, defaultRequestOptions).flatMap(FluxUtil::toMono)); - } - - /** - * Uploads file and polls the validation status of the uploaded file. - * - * @param testId Unique name for load test, must be a valid URL character ^[a-z0-9_-]*$. - * @param fileName Unique name for test file with file extension like : App.jmx. - * @param body The file content as application/octet-stream. - * @throws ResourceNotFoundException when a test with {@code testId} doesn't exist. - * @return A {@link PollerFlux} to poll on and retrieve the file info with validation status. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux beginUploadTestFile(String testId, String fileName, BinaryData body) { - return new PollerFlux<>(Duration.ofSeconds(2), (context) -> uploadTestFile(testId, fileName, body), - (context) -> getTestFile(testId, fileName).flatMap( - fileResp -> PollingUtils.getPollResponseMono(() -> PollingUtils.getValidationStatus(fileResp))), - (activationResponse, context) -> Mono - .error(LOGGER.logExceptionAsError(new RuntimeException("Cancellation is not supported"))), - (context) -> getTestFile(testId, fileName)); - } - - /** - * Get all test files. - *

Response Body Schema

+ * Initializes an instance of LoadTestAdministrationAsyncClient class. * - *
-     * {@code
-     * {
-     *     fileName: String (Required)
-     *     url: String (Optional)
-     *     fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional)
-     *     expireDateTime: OffsetDateTime (Optional)
-     *     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
-     *     validationFailureDetails: String (Optional)
-     * }
-     * }
-     * 
- * - * @param testId Unique test identifier 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 all test files as paginated response with {@link PagedFlux}. + * @param serviceClient the service client implementation. */ @Generated - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listTestFiles(String testId, RequestOptions requestOptions) { - return this.serviceClient.listTestFilesAsync(testId, requestOptions); + LoadTestAdministrationAsyncClient(LoadTestAdministrationClientImpl serviceClient) { + this.serviceClient = serviceClient; } /** @@ -239,6 +96,7 @@ public PagedFlux listTestFiles(String testId, RequestOptions request * autoStopDisabled: Boolean (Optional) * errorRate: Double (Optional) * errorRateTimeWindowInSeconds: Long (Optional) + * maximumVirtualUsersPerEngine: Integer (Optional) * } * secrets (Optional): { * String (Required): { @@ -278,7 +136,7 @@ public PagedFlux listTestFiles(String testId, RequestOptions request * configFileInfo (Optional): { * fileName: String (Required) * url: String (Optional) - * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional) + * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional) * expireDateTime: OffsetDateTime (Optional) * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional) * validationFailureDetails: String (Optional) @@ -305,6 +163,10 @@ public PagedFlux listTestFiles(String testId, RequestOptions request * engineBuiltInIdentityIds (Optional): [ * String (Optional) * ] + * estimatedVirtualUserHours: Double (Optional) + * preferences (Optional): { + * enableAIErrorInsights: Boolean (Optional) + * } * createdDateTime: OffsetDateTime (Optional) * createdBy: String (Optional) * lastModifiedDateTime: OffsetDateTime (Optional) @@ -349,6 +211,7 @@ public PagedFlux listTestFiles(String testId, RequestOptions request * autoStopDisabled: Boolean (Optional) * errorRate: Double (Optional) * errorRateTimeWindowInSeconds: Long (Optional) + * maximumVirtualUsersPerEngine: Integer (Optional) * } * secrets (Optional): { * String (Required): { @@ -388,7 +251,7 @@ public PagedFlux listTestFiles(String testId, RequestOptions request * configFileInfo (Optional): { * fileName: String (Required) * url: String (Optional) - * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional) + * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional) * expireDateTime: OffsetDateTime (Optional) * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional) * validationFailureDetails: String (Optional) @@ -415,6 +278,10 @@ public PagedFlux listTestFiles(String testId, RequestOptions request * engineBuiltInIdentityIds (Optional): [ * String (Optional) * ] + * estimatedVirtualUserHours: Double (Optional) + * preferences (Optional): { + * enableAIErrorInsights: Boolean (Optional) + * } * createdDateTime: OffsetDateTime (Optional) * createdBy: String (Optional) * lastModifiedDateTime: OffsetDateTime (Optional) @@ -422,7 +289,7 @@ public PagedFlux listTestFiles(String testId, RequestOptions request * } * } * - * + * * @param testId Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, * underscore or hyphen characters. * @param body The resource instance. @@ -441,66 +308,277 @@ public Mono> createOrUpdateTestWithResponse(String testId, } /** - * Delete a test by its test Id. - * - * @param testId Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, - * underscore or hyphen characters. + * Add an app component to a test. + * + * Add an app component to a test by providing the resource Id, name and type. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     components (Optional, Required on create): {
+     *         String (Required): {
+     *             resourceId: String (Required)
+     *             resourceName: String (Optional, Required on create)
+     *             resourceType: String (Optional, Required on create)
+     *             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 (Optional, Required on create): {
+     *         String (Required): {
+     *             resourceId: String (Required)
+     *             resourceName: String (Optional, Required on create)
+     *             resourceType: String (Optional, Required on create)
+     *             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 the {@link Response} on successful completion of {@link Mono}. + * @return test app components along with {@link Response} on successful completion of {@link Mono}. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteTestWithResponse(String testId, RequestOptions requestOptions) { - return this.serviceClient.deleteTestWithResponseAsync(testId, requestOptions); + public Mono> createOrUpdateAppComponentsWithResponse(String testId, BinaryData body, + RequestOptions requestOptions) { + return this.serviceClient.createOrUpdateAppComponentsWithResponseAsync(testId, body, requestOptions); } /** - * Get load test details by test Id. - *

Response Body Schema

+ * Configure server metrics for a test. + *

Request Body Schema

* *
      * {@code
      * {
-     *     passFailCriteria (Optional): {
-     *         passFailMetrics (Optional): {
-     *             String (Required): {
-     *                 clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
-     *                 aggregate: String(count/percentage/avg/p50/p75/p90/p95/p96/p97/p98/p99/p99.9/p99.99/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)
-     *             }
-     *         }
-     *         passFailServerMetrics (Optional): {
-     *             String (Required): {
-     *                 resourceId: String (Optional, Required on create)
-     *                 metricNamespace: String (Optional, Required on create)
-     *                 metricName: String (Optional, Required on create)
-     *                 aggregation: String (Optional, Required on create)
-     *                 condition: String (Optional, Required on create)
-     *                 value: double (Optional, Required on create)
-     *                 action: String(continue/stop) (Optional)
-     *                 actualValue: Double (Optional)
-     *                 result: String(passed/undetermined/failed) (Optional)
-     *             }
+     *     testId: String (Optional)
+     *     metrics (Optional, Required on create): {
+     *         String (Required): {
+     *             id: String (Optional)
+     *             resourceId: String (Optional, Required on create)
+     *             metricNamespace: String (Optional, Required on create)
+     *             displayDescription: String (Optional)
+     *             name: String (Optional, Required on create)
+     *             aggregation: String (Optional, Required on create)
+     *             unit: String (Optional)
+     *             resourceType: String (Optional, Required on create)
      *         }
      *     }
-     *     autoStopCriteria (Optional): {
-     *         autoStopDisabled: Boolean (Optional)
-     *         errorRate: Double (Optional)
-     *         errorRateTimeWindowInSeconds: Long (Optional)
-     *     }
-     *     secrets (Optional): {
+     *     createdDateTime: OffsetDateTime (Optional)
+     *     createdBy: String (Optional)
+     *     lastModifiedDateTime: OffsetDateTime (Optional)
+     *     lastModifiedBy: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     testId: String (Optional)
+     *     metrics (Optional, Required on create): {
      *         String (Required): {
-     *             value: String (Optional)
-     *             type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
+     *             id: String (Optional)
+     *             resourceId: String (Optional, Required on create)
+     *             metricNamespace: String (Optional, Required on create)
+     *             displayDescription: String (Optional)
+     *             name: String (Optional, Required on create)
+     *             aggregation: String (Optional, Required on create)
+     *             unit: String (Optional)
+     *             resourceType: String (Optional, Required on create)
+     *         }
+     *     }
+     *     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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateServerMetricsConfigWithResponse(String testId, BinaryData body, + RequestOptions requestOptions) { + return this.serviceClient.createOrUpdateServerMetricsConfigWithResponseAsync(testId, body, requestOptions); + } + + /** + * Get associated app component (collection of azure resources) for the given test. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     components (Optional, Required on create): {
+     *         String (Required): {
+     *             resourceId: String (Required)
+     *             resourceName: String (Optional, Required on create)
+     *             resourceType: String (Optional, Required on create)
+     *             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} + * on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getAppComponentsWithResponse(String testId, RequestOptions requestOptions) { + return this.serviceClient.getAppComponentsWithResponseAsync(testId, requestOptions); + } + + /** + * List server metrics configuration for the given test. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     testId: String (Optional)
+     *     metrics (Optional, Required on create): {
+     *         String (Required): {
+     *             id: String (Optional)
+     *             resourceId: String (Optional, Required on create)
+     *             metricNamespace: String (Optional, Required on create)
+     *             displayDescription: String (Optional)
+     *             name: String (Optional, Required on create)
+     *             aggregation: String (Optional, Required on create)
+     *             unit: String (Optional)
+     *             resourceType: String (Optional, Required on create)
+     *         }
+     *     }
+     *     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 test server metrics configuration along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getServerMetricsConfigWithResponse(String testId, RequestOptions requestOptions) { + return this.serviceClient.getServerMetricsConfigWithResponseAsync(testId, requestOptions); + } + + /** + * Get load test details by test Id. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     passFailCriteria (Optional): {
+     *         passFailMetrics (Optional): {
+     *             String (Required): {
+     *                 clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
+     *                 aggregate: String(count/percentage/avg/p50/p75/p90/p95/p96/p97/p98/p99/p99.9/p99.99/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)
+     *             }
+     *         }
+     *         passFailServerMetrics (Optional): {
+     *             String (Required): {
+     *                 resourceId: String (Optional, Required on create)
+     *                 metricNamespace: String (Optional, Required on create)
+     *                 metricName: String (Optional, Required on create)
+     *                 aggregation: String (Optional, Required on create)
+     *                 condition: String (Optional, Required on create)
+     *                 value: double (Optional, Required on create)
+     *                 action: String(continue/stop) (Optional)
+     *                 actualValue: Double (Optional)
+     *                 result: String(passed/undetermined/failed) (Optional)
+     *             }
+     *         }
+     *     }
+     *     autoStopCriteria (Optional): {
+     *         autoStopDisabled: Boolean (Optional)
+     *         errorRate: Double (Optional)
+     *         errorRateTimeWindowInSeconds: Long (Optional)
+     *         maximumVirtualUsersPerEngine: Integer (Optional)
+     *     }
+     *     secrets (Optional): {
+     *         String (Required): {
+     *             value: String (Optional)
+     *             type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
      *         }
      *     }
      *     certificate (Optional): {
@@ -535,7 +613,7 @@ public Mono> deleteTestWithResponse(String testId, RequestOptions
      *         configFileInfo (Optional): {
      *             fileName: String (Required)
      *             url: String (Optional)
-     *             fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional)
+     *             fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional)
      *             expireDateTime: OffsetDateTime (Optional)
      *             validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
      *             validationFailureDetails: String (Optional)
@@ -562,6 +640,10 @@ public Mono> deleteTestWithResponse(String testId, RequestOptions
      *     engineBuiltInIdentityIds (Optional): [
      *         String (Optional)
      *     ]
+     *     estimatedVirtualUserHours: Double (Optional)
+     *     preferences (Optional): {
+     *         enableAIErrorInsights: Boolean (Optional)
+     *     }
      *     createdDateTime: OffsetDateTime (Optional)
      *     createdBy: String (Optional)
      *     lastModifiedDateTime: OffsetDateTime (Optional)
@@ -569,7 +651,7 @@ public Mono> deleteTestWithResponse(String testId, RequestOptions
      * }
      * }
      * 
- * + * * @param testId Unique test identifier 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. @@ -585,6 +667,73 @@ public Mono> getTestWithResponse(String testId, RequestOpti return this.serviceClient.getTestWithResponseAsync(testId, requestOptions); } + /** + * Get all the files that are associated with a test. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     fileName: String (Required)
+     *     url: String (Optional)
+     *     fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional)
+     *     expireDateTime: OffsetDateTime (Optional)
+     *     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
+     *     validationFailureDetails: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param testId Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, + * underscore or hyphen characters. + * @param fileName Name of the file. + * @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 the files that are associated with a test along with {@link Response} on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getTestFileWithResponse(String testId, String fileName, + RequestOptions requestOptions) { + return this.serviceClient.getTestFileWithResponseAsync(testId, fileName, requestOptions); + } + + /** + * Get all test files. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     fileName: String (Required)
+     *     url: String (Optional)
+     *     fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional)
+     *     expireDateTime: OffsetDateTime (Optional)
+     *     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
+     *     validationFailureDetails: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param testId Unique test identifier 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 all test files as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listTestFiles(String testId, RequestOptions requestOptions) { + return this.serviceClient.listTestFilesAsync(testId, requestOptions); + } + /** * Get all load tests by the fully qualified resource Id e.g * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}. @@ -641,6 +790,7 @@ public Mono> getTestWithResponse(String testId, RequestOpti * autoStopDisabled: Boolean (Optional) * errorRate: Double (Optional) * errorRateTimeWindowInSeconds: Long (Optional) + * maximumVirtualUsersPerEngine: Integer (Optional) * } * secrets (Optional): { * String (Required): { @@ -680,7 +830,7 @@ public Mono> getTestWithResponse(String testId, RequestOpti * configFileInfo (Optional): { * fileName: String (Required) * url: String (Optional) - * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional) + * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional) * expireDateTime: OffsetDateTime (Optional) * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional) * validationFailureDetails: String (Optional) @@ -707,6 +857,10 @@ public Mono> getTestWithResponse(String testId, RequestOpti * engineBuiltInIdentityIds (Optional): [ * String (Optional) * ] + * estimatedVirtualUserHours: Double (Optional) + * preferences (Optional): { + * enableAIErrorInsights: Boolean (Optional) + * } * createdDateTime: OffsetDateTime (Optional) * createdBy: String (Optional) * lastModifiedDateTime: OffsetDateTime (Optional) @@ -714,7 +868,7 @@ public Mono> getTestWithResponse(String testId, RequestOpti * } * } * - * + * * @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. @@ -731,57 +885,43 @@ public PagedFlux listTests(RequestOptions requestOptions) { } /** - * 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 - * + * Upload input file for a given test Id. 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".
NameTypeRequiredDescription
fileTypeStringNoFile type. Allowed values: "JMX_FILE", "USER_PROPERTIES", + * "ADDITIONAL_ARTIFACTS", "ZIPPED_ARTIFACTS", "URL_TEST_CONFIG", "TEST_SCRIPT", "BROWSER_RECORDING", + * "TEST_PLAN_RECOMMENDATIONS".
- * * You can add these to a request with {@link RequestOptions#addQueryParam} - * - *

- * Request Body Schema - * + *

Request Body Schema

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

- * Response Body Schema - * + * + *

Response Body Schema

+ * *
      * {@code
      * {
+     *     fileName: String (Required)
      *     url: String (Optional)
-     *     fileName: String (Optional)
-     *     fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
+     *     fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (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 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. @@ -789,8 +929,9 @@ public PagedFlux listTests(RequestOptions requestOptions) { * @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 test file info along with {@link Response} on successful completion of {@link Mono}. */ + @Generated @ServiceMethod(returns = ReturnType.SINGLE) Mono> uploadTestFileWithResponse(String testId, String fileName, BinaryData body, RequestOptions requestOptions) { @@ -798,22 +939,8 @@ Mono> uploadTestFileWithResponse(String testId, String file } /** - * Get all the files that are associated with a test. - *

Response Body Schema

+ * Delete file by the file name for a test. * - *
-     * {@code
-     * {
-     *     fileName: String (Required)
-     *     url: String (Optional)
-     *     fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional)
-     *     expireDateTime: OffsetDateTime (Optional)
-     *     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
-     *     validationFailureDetails: String (Optional)
-     * }
-     * }
-     * 
- * * @param testId Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, * underscore or hyphen characters. * @param fileName Name of the file. @@ -822,22 +949,20 @@ Mono> uploadTestFileWithResponse(String testId, String file * @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 the files that are associated with a test along with {@link Response} on successful completion of - * {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getTestFileWithResponse(String testId, String fileName, + public Mono> deleteTestFileWithResponse(String testId, String fileName, RequestOptions requestOptions) { - return this.serviceClient.getTestFileWithResponseAsync(testId, fileName, requestOptions); + return this.serviceClient.deleteTestFileWithResponseAsync(testId, fileName, requestOptions); } /** - * Delete file by the file name for a test. - * + * Delete a test by its test Id. + * * @param testId Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, * underscore or hyphen characters. - * @param fileName Name of the file. * @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. @@ -847,32 +972,27 @@ public Mono> getTestFileWithResponse(String testId, String */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteTestFileWithResponse(String testId, String fileName, - RequestOptions requestOptions) { - return this.serviceClient.deleteTestFileWithResponseAsync(testId, fileName, requestOptions); + public Mono> deleteTestWithResponse(String testId, RequestOptions requestOptions) { + return this.serviceClient.deleteTestWithResponseAsync(testId, requestOptions); } /** - * Add an app component to a test. - * - * Add an app component to a test by providing the resource Id, name and type. + * Create a new test profile or update an existing test profile. + * + * Create a new test profile or update an existing test profile by providing the test profile Id. *

Request Body Schema

* *
      * {@code
      * {
-     *     components (Optional, Required on create): {
-     *         String (Required): {
-     *             resourceId: String (Required)
-     *             resourceName: String (Optional, Required on create)
-     *             resourceType: String (Optional, Required on create)
-     *             displayName: String (Optional)
-     *             resourceGroup: String (Optional)
-     *             subscriptionId: String (Optional)
-     *             kind: String (Optional)
-     *         }
-     *     }
+     *     testProfileId: String (Required)
+     *     displayName: String (Optional)
+     *     description: String (Optional)
      *     testId: String (Optional)
+     *     targetResourceId: String (Optional)
+     *     targetResourceConfigurations (Optional): {
+     *         kind: String(FunctionsFlexConsumption) (Required)
+     *     }
      *     createdDateTime: OffsetDateTime (Optional)
      *     createdBy: String (Optional)
      *     lastModifiedDateTime: OffsetDateTime (Optional)
@@ -886,18 +1006,14 @@ public Mono> deleteTestFileWithResponse(String testId, String fil
      * 
      * {@code
      * {
-     *     components (Optional, Required on create): {
-     *         String (Required): {
-     *             resourceId: String (Required)
-     *             resourceName: String (Optional, Required on create)
-     *             resourceType: String (Optional, Required on create)
-     *             displayName: String (Optional)
-     *             resourceGroup: String (Optional)
-     *             subscriptionId: String (Optional)
-     *             kind: String (Optional)
-     *         }
-     *     }
+     *     testProfileId: String (Required)
+     *     displayName: String (Optional)
+     *     description: String (Optional)
      *     testId: String (Optional)
+     *     targetResourceId: String (Optional)
+     *     targetResourceConfigurations (Optional): {
+     *         kind: String(FunctionsFlexConsumption) (Required)
+     *     }
      *     createdDateTime: OffsetDateTime (Optional)
      *     createdBy: String (Optional)
      *     lastModifiedDateTime: OffsetDateTime (Optional)
@@ -905,43 +1021,61 @@ public Mono> deleteTestFileWithResponse(String testId, String fil
      * }
      * }
      * 
- * - * @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 testProfileId Unique identifier for the test profile, must contain only lower-case alphabetic, numeric, + * underscore or hyphen characters. + * @param body The resource instance. * @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 components along with {@link Response} on successful completion of {@link Mono}. + * @return test Profile Model along with {@link Response} on successful completion of {@link Mono}. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateAppComponentsWithResponse(String testId, BinaryData body, + public Mono> createOrUpdateTestProfileWithResponse(String testProfileId, BinaryData body, RequestOptions requestOptions) { - return this.serviceClient.createOrUpdateAppComponentsWithResponseAsync(testId, body, requestOptions); + return this.serviceClient.createOrUpdateTestProfileWithResponseAsync(testProfileId, body, requestOptions); } /** - * Get associated app component (collection of azure resources) for the given test. + * Delete a test profile. + * + * Delete a test profile by its test profile Id. + * + * @param testProfileId Unique identifier for the test profile, 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteTestProfileWithResponse(String testProfileId, RequestOptions requestOptions) { + return this.serviceClient.deleteTestProfileWithResponseAsync(testProfileId, requestOptions); + } + + /** + * Get load test profile details. + * + * Get load test profile details by test profile Id. *

Response Body Schema

* *
      * {@code
      * {
-     *     components (Optional, Required on create): {
-     *         String (Required): {
-     *             resourceId: String (Required)
-     *             resourceName: String (Optional, Required on create)
-     *             resourceType: String (Optional, Required on create)
-     *             displayName: String (Optional)
-     *             resourceGroup: String (Optional)
-     *             subscriptionId: String (Optional)
-     *             kind: String (Optional)
-     *         }
-     *     }
+     *     testProfileId: String (Required)
+     *     displayName: String (Optional)
+     *     description: String (Optional)
      *     testId: String (Optional)
+     *     targetResourceId: String (Optional)
+     *     targetResourceConfigurations (Optional): {
+     *         kind: String(FunctionsFlexConsumption) (Required)
+     *     }
      *     createdDateTime: OffsetDateTime (Optional)
      *     createdBy: String (Optional)
      *     lastModifiedDateTime: OffsetDateTime (Optional)
@@ -949,42 +1083,57 @@ public Mono> createOrUpdateAppComponentsWithResponse(String
      * }
      * }
      * 
- * - * @param testId Unique name for the load test, must contain only lower-case alphabetic, - * numeric, underscore or hyphen characters. + * + * @param testProfileId Unique identifier for the test profile, 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} - * on successful completion of {@link Mono}. + * @return load test profile details. + * + * Get load test profile details by test profile Id along with {@link Response} on successful completion of + * {@link Mono}. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getAppComponentsWithResponse(String testId, RequestOptions requestOptions) { - return this.serviceClient.getAppComponentsWithResponseAsync(testId, requestOptions); + public Mono> getTestProfileWithResponse(String testProfileId, RequestOptions requestOptions) { + return this.serviceClient.getTestProfileWithResponseAsync(testProfileId, requestOptions); } /** - * List server metrics configuration for the given test. + * List test profiles. + * + * Get all test profiles for the given filters. + *

Query Parameters

+ * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
maxpagesizeIntegerNoMaximum number of results to include in a single + * response.
lastModifiedStartTimeOffsetDateTimeNoStart DateTime(RFC 3339 literal format) + * of the last updated time range to filter test profiles.
lastModifiedEndTimeOffsetDateTimeNoEnd DateTime(RFC 3339 literal format) of + * the last updated time range to filter test profiles.
testProfileIdsList<String>NoComma separated list of IDs of the test + * profiles to filter. In the form of "," separated string.
testIdsList<String>NoComma separated list IDs of the tests which should + * be associated with the test profiles to fetch. In the form of "," separated string.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} *

Response Body Schema

* *
      * {@code
      * {
+     *     testProfileId: String (Required)
+     *     displayName: String (Optional)
+     *     description: String (Optional)
      *     testId: String (Optional)
-     *     metrics (Optional, Required on create): {
-     *         String (Required): {
-     *             id: String (Optional)
-     *             resourceId: String (Optional, Required on create)
-     *             metricNamespace: String (Optional, Required on create)
-     *             displayDescription: String (Optional)
-     *             name: String (Optional, Required on create)
-     *             aggregation: String (Optional, Required on create)
-     *             unit: String (Optional)
-     *             resourceType: String (Optional, Required on create)
-     *         }
+     *     targetResourceId: String (Optional)
+     *     targetResourceConfigurations (Optional): {
+     *         kind: String(FunctionsFlexConsumption) (Required)
      *     }
      *     createdDateTime: OffsetDateTime (Optional)
      *     createdBy: String (Optional)
@@ -993,48 +1142,34 @@ public Mono> getAppComponentsWithResponse(String testId, Re
      * }
      * }
      * 
- * - * @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} on successful completion of {@link Mono}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getServerMetricsConfigWithResponse(String testId, RequestOptions requestOptions) { - return this.serviceClient.getServerMetricsConfigWithResponseAsync(testId, requestOptions); - } - - /** - * Initializes an instance of LoadTestAdministrationAsyncClient class. - * - * @param serviceClient the service client implementation. + * @return paged collection of TestProfile items as paginated response with {@link PagedFlux}. */ @Generated - LoadTestAdministrationAsyncClient(LoadTestAdministrationClientImpl serviceClient) { - this.serviceClient = serviceClient; + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listTestProfiles(RequestOptions requestOptions) { + return this.serviceClient.listTestProfilesAsync(requestOptions); } /** - * Create a new test profile or update an existing test profile. - * - * Create a new test profile or update an existing test profile by providing the test profile Id. + * Create or update operation template. *

Request Body Schema

* *
      * {@code
      * {
-     *     testProfileId: String (Required)
-     *     displayName: String (Optional)
+     *     kind: String(ScheduleTestsTrigger) (Required)
+     *     triggerId: String (Required)
+     *     displayName: String (Optional, Required on create)
      *     description: String (Optional)
-     *     testId: String (Optional)
-     *     targetResourceId: String (Optional)
-     *     targetResourceConfigurations (Optional): {
-     *         kind: String(FunctionsFlexConsumption) (Required)
+     *     state: String(Active/Paused/Completed/Disabled) (Optional)
+     *     stateDetails (Optional): {
+     *         message: String (Optional)
      *     }
      *     createdDateTime: OffsetDateTime (Optional)
      *     createdBy: String (Optional)
@@ -1049,13 +1184,13 @@ public Mono> getServerMetricsConfigWithResponse(String test
      * 
      * {@code
      * {
-     *     testProfileId: String (Required)
-     *     displayName: String (Optional)
+     *     kind: String(ScheduleTestsTrigger) (Required)
+     *     triggerId: String (Required)
+     *     displayName: String (Optional, Required on create)
      *     description: String (Optional)
-     *     testId: String (Optional)
-     *     targetResourceId: String (Optional)
-     *     targetResourceConfigurations (Optional): {
-     *         kind: String(FunctionsFlexConsumption) (Required)
+     *     state: String(Active/Paused/Completed/Disabled) (Optional)
+     *     stateDetails (Optional): {
+     *         message: String (Optional)
      *     }
      *     createdDateTime: OffsetDateTime (Optional)
      *     createdBy: String (Optional)
@@ -1064,31 +1199,27 @@ public Mono> getServerMetricsConfigWithResponse(String test
      * }
      * }
      * 
- * - * @param testProfileId Unique identifier for the test profile, must contain only lower-case alphabetic, numeric, - * underscore or hyphen characters. + * + * @param triggerId The unique identifier of the trigger. * @param body The resource instance. * @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 Profile Model along with {@link Response} on successful completion of {@link Mono}. + * @return trigger model along with {@link Response} on successful completion of {@link Mono}. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateTestProfileWithResponse(String testProfileId, BinaryData body, + public Mono> createOrUpdateTriggerWithResponse(String triggerId, BinaryData body, RequestOptions requestOptions) { - return this.serviceClient.createOrUpdateTestProfileWithResponseAsync(testProfileId, body, requestOptions); + return this.serviceClient.createOrUpdateTriggerWithResponseAsync(triggerId, body, requestOptions); } /** - * Delete a test profile. - * - * Delete a test profile by its test profile Id. - * - * @param testProfileId Unique identifier for the test profile, must contain only lower-case alphabetic, numeric, - * underscore or hyphen characters. + * Resource delete operation template. + * + * @param triggerId The unique identifier of the trigger. * @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. @@ -1098,26 +1229,24 @@ public Mono> createOrUpdateTestProfileWithResponse(String t */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteTestProfileWithResponse(String testProfileId, RequestOptions requestOptions) { - return this.serviceClient.deleteTestProfileWithResponseAsync(testProfileId, requestOptions); + public Mono> deleteTriggerWithResponse(String triggerId, RequestOptions requestOptions) { + return this.serviceClient.deleteTriggerWithResponseAsync(triggerId, requestOptions); } /** - * Get load test profile details. - * - * Get load test profile details by test profile Id. + * Resource read operation template. *

Response Body Schema

* *
      * {@code
      * {
-     *     testProfileId: String (Required)
-     *     displayName: String (Optional)
+     *     kind: String(ScheduleTestsTrigger) (Required)
+     *     triggerId: String (Required)
+     *     displayName: String (Optional, Required on create)
      *     description: String (Optional)
-     *     testId: String (Optional)
-     *     targetResourceId: String (Optional)
-     *     targetResourceConfigurations (Optional): {
-     *         kind: String(FunctionsFlexConsumption) (Required)
+     *     state: String(Active/Paused/Completed/Disabled) (Optional)
+     *     stateDetails (Optional): {
+     *         message: String (Optional)
      *     }
      *     createdDateTime: OffsetDateTime (Optional)
      *     createdBy: String (Optional)
@@ -1126,43 +1255,37 @@ public Mono> deleteTestProfileWithResponse(String testProfileId,
      * }
      * }
      * 
- * - * @param testProfileId Unique identifier for the test profile, must contain only lower-case alphabetic, numeric, - * underscore or hyphen characters. + * + * @param triggerId The unique identifier of the trigger. * @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 profile details. - * - * Get load test profile details by test profile Id along with {@link Response} on successful completion of - * {@link Mono}. + * @return trigger model along with {@link Response} on successful completion of {@link Mono}. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getTestProfileWithResponse(String testProfileId, RequestOptions requestOptions) { - return this.serviceClient.getTestProfileWithResponseAsync(testProfileId, requestOptions); + public Mono> getTriggerWithResponse(String triggerId, RequestOptions requestOptions) { + return this.serviceClient.getTriggerWithResponseAsync(triggerId, requestOptions); } /** - * List test profiles. - * - * Get all test profiles for the given filters. + * Resource list operation template. *

Query Parameters

* * * - * + * + * * + * of the last updated time range to filter triggers. * - * - * + * the last updated time range to filter triggers. + * *
Query Parameters
NameTypeRequiredDescription
maxpagesizeIntegerNoMaximum number of results to include in a single - * response.
testIdsStringNoSearch based on triggers associated with the provided test + * ids.
statesStringNoFilter triggers based on a comma separated list of states. + * Allowed values: "Active", "Paused", "Completed", "Disabled".
lastModifiedStartTimeOffsetDateTimeNoStart DateTime(RFC 3339 literal format) - * of the last updated time range to filter test profiles.
lastModifiedEndTimeOffsetDateTimeNoEnd DateTime(RFC 3339 literal format) of - * the last updated time range to filter test profiles.
testProfileIdsList<String>NoComma separated list of IDs of the test - * profiles to filter. In the form of "," separated string.
testIdsList<String>NoComma separated list IDs of the tests which should - * be associated with the test profiles to fetch. In the form of "," separated string.
maxpagesizeIntegerNoNumber of results in response. Default page size is + * 50.
* You can add these to a request with {@link RequestOptions#addQueryParam} *

Response Body Schema

@@ -1170,13 +1293,13 @@ public Mono> getTestProfileWithResponse(String testProfileI *
      * {@code
      * {
-     *     testProfileId: String (Required)
-     *     displayName: String (Optional)
+     *     kind: String(ScheduleTestsTrigger) (Required)
+     *     triggerId: String (Required)
+     *     displayName: String (Optional, Required on create)
      *     description: String (Optional)
-     *     testId: String (Optional)
-     *     targetResourceId: String (Optional)
-     *     targetResourceConfigurations (Optional): {
-     *         kind: String(FunctionsFlexConsumption) (Required)
+     *     state: String(Active/Paused/Completed/Disabled) (Optional)
+     *     stateDetails (Optional): {
+     *         message: String (Optional)
      *     }
      *     createdDateTime: OffsetDateTime (Optional)
      *     createdBy: String (Optional)
@@ -1185,145 +1308,754 @@ public Mono> getTestProfileWithResponse(String testProfileI
      * }
      * }
      * 
- * + * * @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 paged collection of TestProfile items as paginated response with {@link PagedFlux}. + * @return paged collection of Trigger items as paginated response with {@link PagedFlux}. */ @Generated @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listTestProfiles(RequestOptions requestOptions) { - return this.serviceClient.listTestProfilesAsync(requestOptions); + public PagedFlux listTriggers(RequestOptions requestOptions) { + return this.serviceClient.listTriggersAsync(requestOptions); } /** - * Add an app component to a test. - * - * Add an app component to a test by providing the resource Id, name and type. - * - * @param testId Unique name for the load test, must contain only lower-case alphabetic, - * numeric, underscore or hyphen characters. - * @param body App Component model. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * Create or update operation template. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     scope: String(Tests) (Required)
+     *     notificationRuleId: String (Required)
+     *     displayName: String (Optional, Required on create)
+     *     actionGroupIds (Optional, Required on create): [
+     *         String (Optional, Required on create)
+     *     ]
+     *     createdDateTime: OffsetDateTime (Optional)
+     *     createdBy: String (Optional)
+     *     lastModifiedDateTime: OffsetDateTime (Optional)
+     *     lastModifiedBy: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     scope: String(Tests) (Required)
+     *     notificationRuleId: String (Required)
+     *     displayName: String (Optional, Required on create)
+     *     actionGroupIds (Optional, Required on create): [
+     *         String (Optional, Required on create)
+     *     ]
+     *     createdDateTime: OffsetDateTime (Optional)
+     *     createdBy: String (Optional)
+     *     lastModifiedDateTime: OffsetDateTime (Optional)
+     *     lastModifiedBy: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param notificationRuleId The unique identifier of the notification rule. + * @param body The resource instance. + * @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 notification rule model along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateNotificationRuleWithResponse(String notificationRuleId, + BinaryData body, RequestOptions requestOptions) { + return this.serviceClient.createOrUpdateNotificationRuleWithResponseAsync(notificationRuleId, body, + requestOptions); + } + + /** + * Resource delete operation template. + * + * @param notificationRuleId The unique identifier of the notification rule. + * @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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteNotificationRuleWithResponse(String notificationRuleId, + RequestOptions requestOptions) { + return this.serviceClient.deleteNotificationRuleWithResponseAsync(notificationRuleId, requestOptions); + } + + /** + * Resource read operation template. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     scope: String(Tests) (Required)
+     *     notificationRuleId: String (Required)
+     *     displayName: String (Optional, Required on create)
+     *     actionGroupIds (Optional, Required on create): [
+     *         String (Optional, Required on create)
+     *     ]
+     *     createdDateTime: OffsetDateTime (Optional)
+     *     createdBy: String (Optional)
+     *     lastModifiedDateTime: OffsetDateTime (Optional)
+     *     lastModifiedBy: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param notificationRuleId The unique identifier of the notification rule. + * @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 notification rule model along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getNotificationRuleWithResponse(String notificationRuleId, + RequestOptions requestOptions) { + return this.serviceClient.getNotificationRuleWithResponseAsync(notificationRuleId, requestOptions); + } + + /** + * Resource list operation template. + *

Query Parameters

+ * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
testIdsStringNoSearch based on notification rules associated with the provided + * test ids.
scopesStringNoSearch based on notification rules for the provided + * scopes.
lastModifiedStartTimeOffsetDateTimeNoStart DateTime(RFC 3339 literal format) + * of the last updated time range to filter notification rules.
lastModifiedEndTimeOffsetDateTimeNoEnd DateTime(RFC 3339 literal format) of + * the last updated time range to filter notification rules.
maxpagesizeIntegerNoNumber of results in response. Default page size is + * 50.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     scope: String(Tests) (Required)
+     *     notificationRuleId: String (Required)
+     *     displayName: String (Optional, Required on create)
+     *     actionGroupIds (Optional, Required on create): [
+     *         String (Optional, Required on create)
+     *     ]
+     *     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. + * @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 paged collection of NotificationRule items as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listNotificationRules(RequestOptions requestOptions) { + return this.serviceClient.listNotificationRulesAsync(requestOptions); + } + + /** + * Clone a load test. + * + * Clone the given test with optional overrides applied to the clone test. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     newTestId: String (Required)
+     *     displayName: String (Optional)
+     *     description: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     id: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required)
+     *     error (Optional): {
+     *         error (Required): (recursive schema, see error above)
+     *     }
+     * }
+     * }
+     * 
+ * + * @param testId Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, + * underscore or hyphen characters. + * @param cloneTestRequest1 The cloneTestRequest1 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. + * @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 PollerFlux} for polling of provides status details for long running operations. + */ + @Generated + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux beginCloneTest(String testId, BinaryData cloneTestRequest1, + RequestOptions requestOptions) { + return this.serviceClient.beginCloneTestAsync(testId, cloneTestRequest1, requestOptions); + } + + /** + * Generate load test plan recommendations. + * + * Generate AI Recommendations to author a load test plan using the uploaded browser recording file. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     id: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required)
+     *     error (Optional): {
+     *         error (Required): (recursive schema, see error above)
+     *     }
+     * }
+     * }
+     * 
+ * + * @param testId Unique test identifier 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 PollerFlux} for polling of provides status details for long running operations. + */ + @Generated + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux beginGenerateTestPlanRecommendations(String testId, + RequestOptions requestOptions) { + return this.serviceClient.beginGenerateTestPlanRecommendationsAsync(testId, requestOptions); + } + + /** + * Get the status of a long running operation. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     id: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required)
+     *     kind: String(CloneTest/GenerateTestRunInsights/TestPlanRecommendations) (Required)
+     *     error (Optional): {
+     *         error (Required): (recursive schema, see error above)
+     *     }
+     * }
+     * }
+     * 
+ * + * @param operationId The unique ID of the operation. + * @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 status of a long running operation along with {@link Response} on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getOperationStatusWithResponse(String operationId, + RequestOptions requestOptions) { + return this.serviceClient.getOperationStatusWithResponseAsync(operationId, requestOptions); + } + + /** + * Create a new test or update an existing test by providing the test Id. + * + * @param testId Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, + * underscore or hyphen characters. + * @param body The resource instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return load test model on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateTest(String testId, LoadTest body) { + // Generated convenience method for createOrUpdateTestWithResponse + RequestOptions requestOptions = new RequestOptions(); + JsonMergePatchHelper.getLoadTestAccessor().prepareModelForJsonMergePatch(body, true); + BinaryData bodyInBinaryData = BinaryData.fromObject(body); + // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization. + bodyInBinaryData.getLength(); + JsonMergePatchHelper.getLoadTestAccessor().prepareModelForJsonMergePatch(body, false); + return createOrUpdateTestWithResponse(testId, bodyInBinaryData, requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(LoadTest.class)); + } + + /** + * Add an app component to a test. + * + * Add an app component to a test by providing the resource Id, name and type. + * + * @param testId Unique name for the load test, must contain only lower-case alphabetic, + * numeric, underscore or hyphen characters. + * @param body App Component model. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return test app components on successful completion of {@link Mono}. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateAppComponents(String testId, TestAppComponents body) { - // Generated convenience method for createOrUpdateAppComponentsWithResponse + public Mono createOrUpdateAppComponents(String testId, TestAppComponents body) { + // Generated convenience method for createOrUpdateAppComponentsWithResponse + RequestOptions requestOptions = new RequestOptions(); + JsonMergePatchHelper.getTestAppComponentsAccessor().prepareModelForJsonMergePatch(body, true); + BinaryData bodyInBinaryData = BinaryData.fromObject(body); + // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization. + bodyInBinaryData.getLength(); + JsonMergePatchHelper.getTestAppComponentsAccessor().prepareModelForJsonMergePatch(body, false); + return createOrUpdateAppComponentsWithResponse(testId, bodyInBinaryData, requestOptions) + .flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(TestAppComponents.class)); + } + + /** + * Configure server metrics for a test. + * + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return test server metrics configuration on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateServerMetricsConfig(String testId, + TestServerMetricsConfiguration body) { + // Generated convenience method for createOrUpdateServerMetricsConfigWithResponse + RequestOptions requestOptions = new RequestOptions(); + JsonMergePatchHelper.getTestServerMetricsConfigurationAccessor().prepareModelForJsonMergePatch(body, true); + BinaryData bodyInBinaryData = BinaryData.fromObject(body); + // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization. + bodyInBinaryData.getLength(); + JsonMergePatchHelper.getTestServerMetricsConfigurationAccessor().prepareModelForJsonMergePatch(body, false); + return createOrUpdateServerMetricsConfigWithResponse(testId, bodyInBinaryData, requestOptions) + .flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(TestServerMetricsConfiguration.class)); + } + + /** + * Get associated app component (collection of azure resources) for the given test. + * + * @param testId Unique name for the load test, must contain only lower-case alphabetic, + * numeric, underscore or hyphen characters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return associated app component (collection of azure resources) for the given test on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getAppComponents(String testId) { + // Generated convenience method for getAppComponentsWithResponse + RequestOptions requestOptions = new RequestOptions(); + return getAppComponentsWithResponse(testId, requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(TestAppComponents.class)); + } + + /** + * List server metrics configuration for the given test. + * + * @param testId Unique name for the load test, must contain only lower-case alphabetic, + * numeric, underscore or hyphen characters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return test server metrics configuration on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getServerMetricsConfig(String testId) { + // Generated convenience method for getServerMetricsConfigWithResponse + RequestOptions requestOptions = new RequestOptions(); + return getServerMetricsConfigWithResponse(testId, requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(TestServerMetricsConfiguration.class)); + } + + /** + * Get load test details by test Id. + * + * @param testId Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, + * underscore or hyphen characters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return load test details by test Id on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getTest(String testId) { + // Generated convenience method for getTestWithResponse + RequestOptions requestOptions = new RequestOptions(); + return getTestWithResponse(testId, requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(LoadTest.class)); + } + + /** + * Get all the files that are associated with a test. + * + * @param testId Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, + * underscore or hyphen characters. + * @param fileName Name of the file. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the files that are associated with a test on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getTestFile(String testId, String fileName) { + // Generated convenience method for getTestFileWithResponse + RequestOptions requestOptions = new RequestOptions(); + return getTestFileWithResponse(testId, fileName, requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(TestFileInfo.class)); + } + + /** + * Get all test files. + * + * @param testId Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, + * underscore or hyphen characters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all test files as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listTestFiles(String testId) { + // Generated convenience method for listTestFiles + RequestOptions requestOptions = new RequestOptions(); + PagedFlux pagedFluxResponse = listTestFiles(testId, requestOptions); + return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> { + Flux> flux = (continuationTokenParam == null) + ? pagedFluxResponse.byPage().take(1) + : pagedFluxResponse.byPage(continuationTokenParam).take(1); + return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(), + pagedResponse.getStatusCode(), pagedResponse.getHeaders(), + pagedResponse.getValue() + .stream() + .map(protocolMethodData -> protocolMethodData.toObject(TestFileInfo.class)) + .collect(Collectors.toList()), + pagedResponse.getContinuationToken(), null)); + }); + } + + /** + * Get all load tests by the fully qualified resource Id e.g + * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}. + * + * @param orderBy Sort on the supported fields in (field asc/desc) format. eg: + * lastModifiedDateTime asc. Supported fields - lastModifiedDateTime. + * @param search Prefix 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. + * @param lastModifiedStartTime Start DateTime(RFC 3339 literal format) of the last updated time range to filter + * tests. + * @param lastModifiedEndTime End DateTime(RFC 3339 literal format) of the last updated time range to filter tests. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listTests(String orderBy, String search, OffsetDateTime lastModifiedStartTime, + OffsetDateTime lastModifiedEndTime) { + // Generated convenience method for listTests + RequestOptions requestOptions = new RequestOptions(); + if (orderBy != null) { + requestOptions.addQueryParam("orderby", orderBy, false); + } + if (search != null) { + requestOptions.addQueryParam("search", search, false); + } + if (lastModifiedStartTime != null) { + requestOptions.addQueryParam("lastModifiedStartTime", String.valueOf(lastModifiedStartTime), false); + } + if (lastModifiedEndTime != null) { + requestOptions.addQueryParam("lastModifiedEndTime", String.valueOf(lastModifiedEndTime), false); + } + PagedFlux pagedFluxResponse = listTests(requestOptions); + return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> { + Flux> flux = (continuationTokenParam == null) + ? pagedFluxResponse.byPage().take(1) + : pagedFluxResponse.byPage(continuationTokenParam).take(1); + return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(), + pagedResponse.getStatusCode(), pagedResponse.getHeaders(), + pagedResponse.getValue() + .stream() + .map(protocolMethodData -> protocolMethodData.toObject(LoadTest.class)) + .collect(Collectors.toList()), + pagedResponse.getContinuationToken(), null)); + }); + } + + /** + * Get all load tests by the fully qualified resource Id e.g + * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}. + * + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listTests() { + // Generated convenience method for listTests + RequestOptions requestOptions = new RequestOptions(); + PagedFlux pagedFluxResponse = listTests(requestOptions); + return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> { + Flux> flux = (continuationTokenParam == null) + ? pagedFluxResponse.byPage().take(1) + : pagedFluxResponse.byPage(continuationTokenParam).take(1); + return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(), + pagedResponse.getStatusCode(), pagedResponse.getHeaders(), + pagedResponse.getValue() + .stream() + .map(protocolMethodData -> protocolMethodData.toObject(LoadTest.class)) + .collect(Collectors.toList()), + pagedResponse.getContinuationToken(), null)); + }); + } + + /** + * Upload input file for a given test Id. 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. + * + * @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 fileType File type. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return test file info on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono uploadTestFile(String testId, String fileName, BinaryData body, LoadTestingFileType fileType) { + // Generated convenience method for uploadTestFileWithResponse + RequestOptions requestOptions = new RequestOptions(); + if (fileType != null) { + requestOptions.addQueryParam("fileType", fileType.toString(), false); + } + return uploadTestFileWithResponse(testId, fileName, body, requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(TestFileInfo.class)); + } + + /** + * Upload input file for a given test Id. 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. + * + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return test file info on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono uploadTestFile(String testId, String fileName, BinaryData body) { + // Generated convenience method for uploadTestFileWithResponse RequestOptions requestOptions = new RequestOptions(); - JsonMergePatchHelper.getTestAppComponentsAccessor().prepareModelForJsonMergePatch(body, true); - BinaryData bodyInBinaryData = BinaryData.fromObject(body); - // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization. - bodyInBinaryData.getLength(); - JsonMergePatchHelper.getTestAppComponentsAccessor().prepareModelForJsonMergePatch(body, false); - return createOrUpdateAppComponentsWithResponse(testId, bodyInBinaryData, requestOptions) - .flatMap(FluxUtil::toMono) - .map(protocolMethodData -> protocolMethodData.toObject(TestAppComponents.class)); + return uploadTestFileWithResponse(testId, fileName, body, requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(TestFileInfo.class)); } /** - * Get associated app component (collection of azure resources) for the given test. - * - * @param testId Unique name for the load test, must contain only lower-case alphabetic, - * numeric, underscore or hyphen characters. + * Delete file by the file name for a test. + * + * @param testId Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, + * underscore or hyphen characters. + * @param fileName Name of the file. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return associated app component (collection of azure resources) for the given test on successful completion of - * {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getAppComponents(String testId) { - // Generated convenience method for getAppComponentsWithResponse + public Mono deleteTestFile(String testId, String fileName) { + // Generated convenience method for deleteTestFileWithResponse RequestOptions requestOptions = new RequestOptions(); - return getAppComponentsWithResponse(testId, requestOptions).flatMap(FluxUtil::toMono) - .map(protocolMethodData -> protocolMethodData.toObject(TestAppComponents.class)); + return deleteTestFileWithResponse(testId, fileName, requestOptions).flatMap(FluxUtil::toMono); } /** - * List server metrics configuration for the given test. - * - * @param testId Unique name for the load test, must contain only lower-case alphabetic, - * numeric, underscore or hyphen characters. + * Delete a test by its test Id. + * + * @param testId Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, + * underscore or hyphen characters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return test server metrics configuration on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getServerMetricsConfig(String testId) { - // Generated convenience method for getServerMetricsConfigWithResponse + public Mono deleteTest(String testId) { + // Generated convenience method for deleteTestWithResponse RequestOptions requestOptions = new RequestOptions(); - return getServerMetricsConfigWithResponse(testId, requestOptions).flatMap(FluxUtil::toMono) - .map(protocolMethodData -> protocolMethodData.toObject(TestServerMetricsConfiguration.class)); + return deleteTestWithResponse(testId, requestOptions).flatMap(FluxUtil::toMono); } /** - * Get load test details by test Id. - * - * @param testId Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, + * Create a new test profile or update an existing test profile. + * + * Create a new test profile or update an existing test profile by providing the test profile Id. + * + * @param testProfileId Unique identifier for the test profile, must contain only lower-case alphabetic, numeric, * underscore or hyphen characters. + * @param body The resource instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return load test details by test Id on successful completion of {@link Mono}. + * @return test Profile Model on successful completion of {@link Mono}. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getTest(String testId) { - // Generated convenience method for getTestWithResponse + public Mono createOrUpdateTestProfile(String testProfileId, TestProfile body) { + // Generated convenience method for createOrUpdateTestProfileWithResponse RequestOptions requestOptions = new RequestOptions(); - return getTestWithResponse(testId, requestOptions).flatMap(FluxUtil::toMono) - .map(protocolMethodData -> protocolMethodData.toObject(LoadTest.class)); + JsonMergePatchHelper.getTestProfileAccessor().prepareModelForJsonMergePatch(body, true); + BinaryData bodyInBinaryData = BinaryData.fromObject(body); + // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization. + bodyInBinaryData.getLength(); + JsonMergePatchHelper.getTestProfileAccessor().prepareModelForJsonMergePatch(body, false); + return createOrUpdateTestProfileWithResponse(testProfileId, bodyInBinaryData, requestOptions) + .flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(TestProfile.class)); } /** - * Get all the files that are associated with a test. - * - * @param testId Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, + * Delete a test profile. + * + * Delete a test profile by its test profile Id. + * + * @param testProfileId Unique identifier for the test profile, must contain only lower-case alphabetic, numeric, * underscore or hyphen characters. - * @param fileName Name of the file. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the files that are associated with a test on successful completion of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getTestFile(String testId, String fileName) { - // Generated convenience method for getTestFileWithResponse + public Mono deleteTestProfile(String testProfileId) { + // Generated convenience method for deleteTestProfileWithResponse RequestOptions requestOptions = new RequestOptions(); - return getTestFileWithResponse(testId, fileName, requestOptions).flatMap(FluxUtil::toMono) - .map(protocolMethodData -> protocolMethodData.toObject(TestFileInfo.class)); + return deleteTestProfileWithResponse(testProfileId, requestOptions).flatMap(FluxUtil::toMono); } /** - * Get all test files. - * - * @param testId Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, + * Get load test profile details. + * + * Get load test profile details by test profile Id. + * + * @param testProfileId Unique identifier for the test profile, must contain only lower-case alphabetic, numeric, * underscore or hyphen characters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -1331,61 +2063,207 @@ public Mono getTestFile(String testId, String fileName) { * @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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all test files as paginated response with {@link PagedFlux}. + * @return load test profile details. + * + * Get load test profile details by test profile Id on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getTestProfile(String testProfileId) { + // Generated convenience method for getTestProfileWithResponse + RequestOptions requestOptions = new RequestOptions(); + return getTestProfileWithResponse(testProfileId, requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(TestProfile.class)); + } + + /** + * List test profiles. + * + * Get all test profiles for the given filters. + * + * @param lastModifiedStartTime Start DateTime(RFC 3339 literal format) of the last updated time range to filter + * test profiles. + * @param lastModifiedEndTime End DateTime(RFC 3339 literal format) of the last updated time range to filter test + * profiles. + * @param testProfileIds Comma separated list of IDs of the test profiles to filter. + * @param testIds Comma separated list IDs of the tests which should be associated with the test profiles to fetch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of TestProfile items as paginated response with {@link PagedFlux}. */ @Generated @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listTestFiles(String testId) { - // Generated convenience method for listTestFiles + public PagedFlux listTestProfiles(OffsetDateTime lastModifiedStartTime, + OffsetDateTime lastModifiedEndTime, List testProfileIds, List testIds) { + // Generated convenience method for listTestProfiles RequestOptions requestOptions = new RequestOptions(); - PagedFlux pagedFluxResponse = listTestFiles(testId, requestOptions); + if (lastModifiedStartTime != null) { + requestOptions.addQueryParam("lastModifiedStartTime", String.valueOf(lastModifiedStartTime), false); + } + if (lastModifiedEndTime != null) { + requestOptions.addQueryParam("lastModifiedEndTime", String.valueOf(lastModifiedEndTime), false); + } + if (testProfileIds != null) { + requestOptions.addQueryParam("testProfileIds", + testProfileIds.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")), + false); + } + if (testIds != null) { + requestOptions.addQueryParam("testIds", + testIds.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")), + false); + } + PagedFlux pagedFluxResponse = listTestProfiles(requestOptions); return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> { Flux> flux = (continuationTokenParam == null) ? pagedFluxResponse.byPage().take(1) : pagedFluxResponse.byPage(continuationTokenParam).take(1); - return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(), + return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(), pagedResponse.getStatusCode(), pagedResponse.getHeaders(), pagedResponse.getValue() .stream() - .map(protocolMethodData -> protocolMethodData.toObject(TestFileInfo.class)) + .map(protocolMethodData -> protocolMethodData.toObject(TestProfile.class)) .collect(Collectors.toList()), pagedResponse.getContinuationToken(), null)); }); } /** - * Get all load tests by the fully qualified resource Id e.g - * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}. - * - * @param orderBy Sort on the supported fields in (field asc/desc) format. eg: - * lastModifiedDateTime asc. Supported fields - lastModifiedDateTime. - * @param search Prefix 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. + * List test profiles. + * + * Get all test profiles for the given filters. + * + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of TestProfile items as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listTestProfiles() { + // Generated convenience method for listTestProfiles + RequestOptions requestOptions = new RequestOptions(); + PagedFlux pagedFluxResponse = listTestProfiles(requestOptions); + return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> { + Flux> flux = (continuationTokenParam == null) + ? pagedFluxResponse.byPage().take(1) + : pagedFluxResponse.byPage(continuationTokenParam).take(1); + return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(), + pagedResponse.getStatusCode(), pagedResponse.getHeaders(), + pagedResponse.getValue() + .stream() + .map(protocolMethodData -> protocolMethodData.toObject(TestProfile.class)) + .collect(Collectors.toList()), + pagedResponse.getContinuationToken(), null)); + }); + } + + /** + * Create or update operation template. + * + * @param triggerId The unique identifier of the trigger. + * @param body The resource instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return trigger model on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateTrigger(String triggerId, Trigger body) { + // Generated convenience method for createOrUpdateTriggerWithResponse + RequestOptions requestOptions = new RequestOptions(); + JsonMergePatchHelper.getTriggerAccessor().prepareModelForJsonMergePatch(body, true); + BinaryData bodyInBinaryData = BinaryData.fromObject(body); + // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization. + bodyInBinaryData.getLength(); + JsonMergePatchHelper.getTriggerAccessor().prepareModelForJsonMergePatch(body, false); + return createOrUpdateTriggerWithResponse(triggerId, bodyInBinaryData, requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(Trigger.class)); + } + + /** + * Resource delete operation template. + * + * @param triggerId The unique identifier of the trigger. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono deleteTrigger(String triggerId) { + // Generated convenience method for deleteTriggerWithResponse + RequestOptions requestOptions = new RequestOptions(); + return deleteTriggerWithResponse(triggerId, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Resource read operation template. + * + * @param triggerId The unique identifier of the trigger. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return trigger model on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getTrigger(String triggerId) { + // Generated convenience method for getTriggerWithResponse + RequestOptions requestOptions = new RequestOptions(); + return getTriggerWithResponse(triggerId, requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(Trigger.class)); + } + + /** + * Resource list operation template. + * + * @param testIds Search based on triggers associated with the provided test ids. + * @param states Filter triggers based on a comma separated list of states. * @param lastModifiedStartTime Start DateTime(RFC 3339 literal format) of the last updated time range to filter - * tests. - * @param lastModifiedEndTime End DateTime(RFC 3339 literal format) of the last updated time range to filter tests. + * triggers. + * @param lastModifiedEndTime End DateTime(RFC 3339 literal format) of the last updated time range to filter + * triggers. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @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}. + * @return paged collection of Trigger items as paginated response with {@link PagedFlux}. */ @Generated @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listTests(String orderBy, String search, OffsetDateTime lastModifiedStartTime, + public PagedFlux listTriggers(String testIds, TriggerState states, OffsetDateTime lastModifiedStartTime, OffsetDateTime lastModifiedEndTime) { - // Generated convenience method for listTests + // Generated convenience method for listTriggers RequestOptions requestOptions = new RequestOptions(); - if (orderBy != null) { - requestOptions.addQueryParam("orderby", orderBy, false); + if (testIds != null) { + requestOptions.addQueryParam("testIds", testIds, false); } - if (search != null) { - requestOptions.addQueryParam("search", search, false); + if (states != null) { + requestOptions.addQueryParam("states", states.toString(), false); } if (lastModifiedStartTime != null) { requestOptions.addQueryParam("lastModifiedStartTime", String.valueOf(lastModifiedStartTime), false); @@ -1393,130 +2271,55 @@ public PagedFlux listTests(String orderBy, String search, OffsetDateTi if (lastModifiedEndTime != null) { requestOptions.addQueryParam("lastModifiedEndTime", String.valueOf(lastModifiedEndTime), false); } - PagedFlux pagedFluxResponse = listTests(requestOptions); + PagedFlux pagedFluxResponse = listTriggers(requestOptions); return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> { Flux> flux = (continuationTokenParam == null) ? pagedFluxResponse.byPage().take(1) : pagedFluxResponse.byPage(continuationTokenParam).take(1); - return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(), + return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(), pagedResponse.getStatusCode(), pagedResponse.getHeaders(), pagedResponse.getValue() .stream() - .map(protocolMethodData -> protocolMethodData.toObject(LoadTest.class)) + .map(protocolMethodData -> protocolMethodData.toObject(Trigger.class)) .collect(Collectors.toList()), pagedResponse.getContinuationToken(), null)); }); } /** - * Get all load tests by the fully qualified resource Id e.g - * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}. - * + * Resource list operation template. + * * @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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @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}. + * @return paged collection of Trigger items as paginated response with {@link PagedFlux}. */ @Generated @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listTests() { - // Generated convenience method for listTests + public PagedFlux listTriggers() { + // Generated convenience method for listTriggers RequestOptions requestOptions = new RequestOptions(); - PagedFlux pagedFluxResponse = listTests(requestOptions); + PagedFlux pagedFluxResponse = listTriggers(requestOptions); return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> { Flux> flux = (continuationTokenParam == null) ? pagedFluxResponse.byPage().take(1) : pagedFluxResponse.byPage(continuationTokenParam).take(1); - return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(), + return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(), pagedResponse.getStatusCode(), pagedResponse.getHeaders(), pagedResponse.getValue() .stream() - .map(protocolMethodData -> protocolMethodData.toObject(LoadTest.class)) + .map(protocolMethodData -> protocolMethodData.toObject(Trigger.class)) .collect(Collectors.toList()), pagedResponse.getContinuationToken(), null)); }); } /** - * Upload input file for a given test Id. 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. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return test file info on successful completion of {@link Mono}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - Mono uploadTestFile(String testId, String fileName, BinaryData body) { - // Generated convenience method for uploadTestFileWithResponse - RequestOptions requestOptions = new RequestOptions(); - return uploadTestFileWithResponse(testId, fileName, body, requestOptions).flatMap(FluxUtil::toMono) - .map(protocolMethodData -> protocolMethodData.toObject(TestFileInfo.class)); - } - - /** - * Delete file by the file name for a test. - * - * @param testId Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, - * underscore or hyphen characters. - * @param fileName Name of the file. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteTestFile(String testId, String fileName) { - // Generated convenience method for deleteTestFileWithResponse - RequestOptions requestOptions = new RequestOptions(); - return deleteTestFileWithResponse(testId, fileName, requestOptions).flatMap(FluxUtil::toMono); - } - - /** - * Delete a test by its test Id. - * - * @param testId Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, - * underscore or hyphen characters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteTest(String testId) { - // Generated convenience method for deleteTestWithResponse - RequestOptions requestOptions = new RequestOptions(); - return deleteTestWithResponse(testId, requestOptions).flatMap(FluxUtil::toMono); - } - - /** - * Create a new test profile or update an existing test profile. - * - * Create a new test profile or update an existing test profile by providing the test profile Id. - * - * @param testProfileId Unique identifier for the test profile, must contain only lower-case alphabetic, numeric, - * underscore or hyphen characters. + * Create or update operation template. + * + * @param notificationRuleId The unique identifier of the notification rule. * @param body The resource instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. @@ -1524,30 +2327,27 @@ public Mono deleteTest(String testId) { * @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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return test Profile Model on successful completion of {@link Mono}. + * @return notification rule model on successful completion of {@link Mono}. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateTestProfile(String testProfileId, TestProfile body) { - // Generated convenience method for createOrUpdateTestProfileWithResponse + public Mono createOrUpdateNotificationRule(String notificationRuleId, NotificationRule body) { + // Generated convenience method for createOrUpdateNotificationRuleWithResponse RequestOptions requestOptions = new RequestOptions(); - JsonMergePatchHelper.getTestProfileAccessor().prepareModelForJsonMergePatch(body, true); + JsonMergePatchHelper.getNotificationRuleAccessor().prepareModelForJsonMergePatch(body, true); BinaryData bodyInBinaryData = BinaryData.fromObject(body); // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization. bodyInBinaryData.getLength(); - JsonMergePatchHelper.getTestProfileAccessor().prepareModelForJsonMergePatch(body, false); - return createOrUpdateTestProfileWithResponse(testProfileId, bodyInBinaryData, requestOptions) + JsonMergePatchHelper.getNotificationRuleAccessor().prepareModelForJsonMergePatch(body, false); + return createOrUpdateNotificationRuleWithResponse(notificationRuleId, bodyInBinaryData, requestOptions) .flatMap(FluxUtil::toMono) - .map(protocolMethodData -> protocolMethodData.toObject(TestProfile.class)); + .map(protocolMethodData -> protocolMethodData.toObject(NotificationRule.class)); } /** - * Delete a test profile. - * - * Delete a test profile by its test profile Id. - * - * @param testProfileId Unique identifier for the test profile, must contain only lower-case alphabetic, numeric, - * underscore or hyphen characters. + * Resource delete operation template. + * + * @param notificationRuleId The unique identifier of the notification rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws HttpResponseException thrown if the request is rejected by server. * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401. @@ -1558,215 +2358,210 @@ public Mono createOrUpdateTestProfile(String testProfileId, TestPro */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono deleteTestProfile(String testProfileId) { - // Generated convenience method for deleteTestProfileWithResponse + public Mono deleteNotificationRule(String notificationRuleId) { + // Generated convenience method for deleteNotificationRuleWithResponse RequestOptions requestOptions = new RequestOptions(); - return deleteTestProfileWithResponse(testProfileId, requestOptions).flatMap(FluxUtil::toMono); + return deleteNotificationRuleWithResponse(notificationRuleId, requestOptions).flatMap(FluxUtil::toMono); } /** - * Get load test profile details. - * - * Get load test profile details by test profile Id. - * - * @param testProfileId Unique identifier for the test profile, must contain only lower-case alphabetic, numeric, - * underscore or hyphen characters. + * Resource read operation template. + * + * @param notificationRuleId The unique identifier of the notification rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return load test profile details. - * - * Get load test profile details by test profile Id on successful completion of {@link Mono}. + * @return notification rule model on successful completion of {@link Mono}. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getTestProfile(String testProfileId) { - // Generated convenience method for getTestProfileWithResponse + public Mono getNotificationRule(String notificationRuleId) { + // Generated convenience method for getNotificationRuleWithResponse RequestOptions requestOptions = new RequestOptions(); - return getTestProfileWithResponse(testProfileId, requestOptions).flatMap(FluxUtil::toMono) - .map(protocolMethodData -> protocolMethodData.toObject(TestProfile.class)); + return getNotificationRuleWithResponse(notificationRuleId, requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(NotificationRule.class)); } /** - * List test profiles. - * - * Get all test profiles for the given filters. - * + * Resource list operation template. + * + * @param testIds Search based on notification rules associated with the provided test ids. + * @param scopes Search based on notification rules for the provided scopes. + * @param lastModifiedStartTime Start DateTime(RFC 3339 literal format) of the last updated time range to filter + * notification rules. + * @param lastModifiedEndTime End DateTime(RFC 3339 literal format) of the last updated time range to filter + * notification rules. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of TestProfile items as paginated response with {@link PagedFlux}. + * @return paged collection of NotificationRule items as paginated response with {@link PagedFlux}. */ @Generated @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listTestProfiles() { - // Generated convenience method for listTestProfiles + public PagedFlux listNotificationRules(String testIds, String scopes, + OffsetDateTime lastModifiedStartTime, OffsetDateTime lastModifiedEndTime) { + // Generated convenience method for listNotificationRules RequestOptions requestOptions = new RequestOptions(); - PagedFlux pagedFluxResponse = listTestProfiles(requestOptions); + if (testIds != null) { + requestOptions.addQueryParam("testIds", testIds, false); + } + if (scopes != null) { + requestOptions.addQueryParam("scopes", scopes, false); + } + if (lastModifiedStartTime != null) { + requestOptions.addQueryParam("lastModifiedStartTime", String.valueOf(lastModifiedStartTime), false); + } + if (lastModifiedEndTime != null) { + requestOptions.addQueryParam("lastModifiedEndTime", String.valueOf(lastModifiedEndTime), false); + } + PagedFlux pagedFluxResponse = listNotificationRules(requestOptions); return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> { Flux> flux = (continuationTokenParam == null) ? pagedFluxResponse.byPage().take(1) : pagedFluxResponse.byPage(continuationTokenParam).take(1); - return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(), + return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(), pagedResponse.getStatusCode(), pagedResponse.getHeaders(), pagedResponse.getValue() .stream() - .map(protocolMethodData -> protocolMethodData.toObject(TestProfile.class)) + .map(protocolMethodData -> protocolMethodData.toObject(NotificationRule.class)) .collect(Collectors.toList()), pagedResponse.getContinuationToken(), null)); }); } /** - * List test profiles. - * - * Get all test profiles for the given filters. - * - * @param lastModifiedStartTime Start DateTime(RFC 3339 literal format) of the last updated time range to filter - * test profiles. - * @param lastModifiedEndTime End DateTime(RFC 3339 literal format) of the last updated time range to filter test - * profiles. - * @param testProfileIds Comma separated list of IDs of the test profiles to filter. - * @param testIds Comma separated list IDs of the tests which should be associated with the test profiles to fetch. - * @throws IllegalArgumentException thrown if parameters fail the validation. + * Resource list operation template. + * * @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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of TestProfile items as paginated response with {@link PagedFlux}. + * @return paged collection of NotificationRule items as paginated response with {@link PagedFlux}. */ @Generated @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listTestProfiles(OffsetDateTime lastModifiedStartTime, - OffsetDateTime lastModifiedEndTime, List testProfileIds, List testIds) { - // Generated convenience method for listTestProfiles + public PagedFlux listNotificationRules() { + // Generated convenience method for listNotificationRules RequestOptions requestOptions = new RequestOptions(); - if (lastModifiedStartTime != null) { - requestOptions.addQueryParam("lastModifiedStartTime", String.valueOf(lastModifiedStartTime), false); - } - if (lastModifiedEndTime != null) { - requestOptions.addQueryParam("lastModifiedEndTime", String.valueOf(lastModifiedEndTime), false); - } - if (testProfileIds != null) { - requestOptions.addQueryParam("testProfileIds", - testProfileIds.stream() - .map(paramItemValue -> Objects.toString(paramItemValue, "")) - .collect(Collectors.joining(",")), - false); - } - if (testIds != null) { - requestOptions.addQueryParam("testIds", - testIds.stream() - .map(paramItemValue -> Objects.toString(paramItemValue, "")) - .collect(Collectors.joining(",")), - false); - } - PagedFlux pagedFluxResponse = listTestProfiles(requestOptions); + PagedFlux pagedFluxResponse = listNotificationRules(requestOptions); return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> { Flux> flux = (continuationTokenParam == null) ? pagedFluxResponse.byPage().take(1) : pagedFluxResponse.byPage(continuationTokenParam).take(1); - return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(), + return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(), pagedResponse.getStatusCode(), pagedResponse.getHeaders(), pagedResponse.getValue() .stream() - .map(protocolMethodData -> protocolMethodData.toObject(TestProfile.class)) + .map(protocolMethodData -> protocolMethodData.toObject(NotificationRule.class)) .collect(Collectors.toList()), pagedResponse.getContinuationToken(), null)); }); } /** - * Configure server metrics for a test. - * - * @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. + * Clone a load test. + * + * Clone the given test with optional overrides applied to the clone test. + * + * @param testId Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, + * underscore or hyphen characters. + * @param newTestId Unique identifier for the new test that will be created. + * @param displayName Display Name override for the newly created test. + * @param description Description override for the newly created test. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return test server metrics configuration on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of provides status details for long running operations. */ @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateServerMetricsConfig(String testId, - TestServerMetricsConfiguration body) { - // Generated convenience method for createOrUpdateServerMetricsConfigWithResponse + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux beginCloneTest(String testId, String newTestId, String displayName, + String description) { + // Generated convenience method for beginCloneTestWithModel RequestOptions requestOptions = new RequestOptions(); - JsonMergePatchHelper.getTestServerMetricsConfigurationAccessor().prepareModelForJsonMergePatch(body, true); - BinaryData bodyInBinaryData = BinaryData.fromObject(body); - // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization. - bodyInBinaryData.getLength(); - JsonMergePatchHelper.getTestServerMetricsConfigurationAccessor().prepareModelForJsonMergePatch(body, false); - return createOrUpdateServerMetricsConfigWithResponse(testId, bodyInBinaryData, requestOptions) - .flatMap(FluxUtil::toMono) - .map(protocolMethodData -> protocolMethodData.toObject(TestServerMetricsConfiguration.class)); + CloneTestRequest1 cloneTestRequest1Obj + = new CloneTestRequest1(newTestId).setDisplayName(displayName).setDescription(description); + BinaryData cloneTestRequest1 = BinaryData.fromObject(cloneTestRequest1Obj); + return serviceClient.beginCloneTestWithModelAsync(testId, cloneTestRequest1, requestOptions); } /** - * Create a new test or update an existing test by providing the test Id. - * + * Clone a load test. + * + * Clone the given test with optional overrides applied to the clone test. + * * @param testId Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, * underscore or hyphen characters. - * @param body The resource instance. + * @param newTestId Unique identifier for the new test that will be created. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return load test model on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of provides status details for long running operations. */ @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateTest(String testId, LoadTest body) { - // Generated convenience method for createOrUpdateTestWithResponse + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux beginCloneTest(String testId, String newTestId) { + // Generated convenience method for beginCloneTestWithModel RequestOptions requestOptions = new RequestOptions(); - JsonMergePatchHelper.getLoadTestAccessor().prepareModelForJsonMergePatch(body, true); - BinaryData bodyInBinaryData = BinaryData.fromObject(body); - // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization. - bodyInBinaryData.getLength(); - JsonMergePatchHelper.getLoadTestAccessor().prepareModelForJsonMergePatch(body, false); - return createOrUpdateTestWithResponse(testId, bodyInBinaryData, requestOptions).flatMap(FluxUtil::toMono) - .map(protocolMethodData -> protocolMethodData.toObject(LoadTest.class)); + CloneTestRequest1 cloneTestRequest1Obj = new CloneTestRequest1(newTestId); + BinaryData cloneTestRequest1 = BinaryData.fromObject(cloneTestRequest1Obj); + return serviceClient.beginCloneTestWithModelAsync(testId, cloneTestRequest1, requestOptions); } /** - * Upload input file for a given test Id. 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. - * - * @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 fileType File type. + * Generate load test plan recommendations. + * + * Generate AI Recommendations to author a load test plan using the uploaded browser recording file. + * + * @param testId Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, + * underscore or hyphen characters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return test file info on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of provides status details for long running operations. + */ + @Generated + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux beginGenerateTestPlanRecommendations(String testId) { + // Generated convenience method for beginGenerateTestPlanRecommendationsWithModel + RequestOptions requestOptions = new RequestOptions(); + return serviceClient.beginGenerateTestPlanRecommendationsWithModelAsync(testId, requestOptions); + } + + /** + * Get the status of a long running operation. + * + * @param operationId The unique ID of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a long running operation on successful completion of {@link Mono}. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Mono uploadTestFile(String testId, String fileName, BinaryData body, LoadTestingFileType fileType) { - // Generated convenience method for uploadTestFileWithResponse + public Mono getOperationStatus(String operationId) { + // Generated convenience method for getOperationStatusWithResponse RequestOptions requestOptions = new RequestOptions(); - if (fileType != null) { - requestOptions.addQueryParam("fileType", fileType.toString(), false); - } - return uploadTestFileWithResponse(testId, fileName, body, requestOptions).flatMap(FluxUtil::toMono) - .map(protocolMethodData -> protocolMethodData.toObject(TestFileInfo.class)); + return getOperationStatusWithResponse(operationId, requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(OperationStatus.class)); } } 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 9c91a7011296..45444a05917b 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 @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting; import com.azure.core.annotation.Generated; @@ -15,17 +16,20 @@ import com.azure.core.http.rest.RequestOptions; import com.azure.core.http.rest.Response; import com.azure.core.util.BinaryData; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.SyncPoller; import com.azure.developer.loadtesting.implementation.JsonMergePatchHelper; import com.azure.developer.loadtesting.implementation.LoadTestAdministrationClientImpl; +import com.azure.developer.loadtesting.implementation.models.CloneTestRequest1; import com.azure.developer.loadtesting.models.LoadTest; import com.azure.developer.loadtesting.models.LoadTestingFileType; +import com.azure.developer.loadtesting.models.NotificationRule; +import com.azure.developer.loadtesting.models.OperationStatus; import com.azure.developer.loadtesting.models.TestAppComponents; import com.azure.developer.loadtesting.models.TestFileInfo; import com.azure.developer.loadtesting.models.TestProfile; import com.azure.developer.loadtesting.models.TestServerMetricsConfiguration; -import java.time.Duration; +import com.azure.developer.loadtesting.models.Trigger; +import com.azure.developer.loadtesting.models.TriggerState; import java.time.OffsetDateTime; import java.util.List; import java.util.Objects; @@ -36,157 +40,17 @@ */ @ServiceClient(builder = LoadTestAdministrationClientBuilder.class) public final class LoadTestAdministrationClient { - - private static final ClientLogger LOGGER = new ClientLogger(LoadTestAdministrationClient.class); - - /** - * Configure server metrics for a test. - *

Request Body Schema

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

Response Body Schema

- * - *
-     * {@code
-     * {
-     *     testId: String (Optional)
-     *     metrics (Optional, Required on create): {
-     *         String (Required): {
-     *             id: String (Optional)
-     *             resourceId: String (Optional, Required on create)
-     *             metricNamespace: String (Optional, Required on create)
-     *             displayDescription: String (Optional)
-     *             name: String (Optional, Required on create)
-     *             aggregation: String (Optional, Required on create)
-     *             unit: String (Optional)
-     *             resourceType: String (Optional, Required on create)
-     *         }
-     *     }
-     *     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}. - */ @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateServerMetricsConfigWithResponse(String testId, BinaryData body, - RequestOptions requestOptions) { - return this.serviceClient.createOrUpdateServerMetricsConfigWithResponse(testId, body, requestOptions); - } - - /** - * Uploads file and polls the validation status of the uploaded file. - * - * @param testId Unique name for load test, must be a valid URL character ^[a-z0-9_-]*$. - * @param fileName Unique name for test file with file extension like : App.jmx. - * @param body The file content as application/octet-stream. - * @param fileUploadRequestOptions The options to configure the file upload HTTP request before HTTP client sends - * it. - * @throws ResourceNotFoundException when a test with {@code testId} doesn't exist. - * @return A {@link SyncPoller} to poll on and retrieve the file info with validation status. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller beginUploadTestFile(String testId, String fileName, BinaryData body, - RequestOptions fileUploadRequestOptions) { - RequestOptions defaultRequestOptions = new RequestOptions(); - if (fileUploadRequestOptions != null) { - defaultRequestOptions.setContext(fileUploadRequestOptions.getContext()); - } - return SyncPoller.createPoller(Duration.ofSeconds(2), - (context) -> PollingUtils.getValidationStatus( - uploadTestFileWithResponse(testId, fileName, body, fileUploadRequestOptions).getValue()), - (context) -> PollingUtils - .getValidationStatus(getTestFileWithResponse(testId, fileName, defaultRequestOptions).getValue()), - (activationResponse, context) -> { - throw LOGGER.logExceptionAsError(new RuntimeException("Cancellation is not supported")); - }, (context) -> getTestFileWithResponse(testId, fileName, defaultRequestOptions).getValue()); - } - - /** - * Uploads file and polls the validation status of the uploaded file. - * - * @param testId Unique name for load test, must be a valid URL character ^[a-z0-9_-]*$. - * @param fileName Unique name for test file with file extension like : App.jmx. - * @param body The file content as application/octet-stream. - * @throws ResourceNotFoundException when a test with {@code testId} doesn't exist. - * @return A {@link SyncPoller} to poll on and retrieve the file info with validation status. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller beginUploadTestFile(String testId, String fileName, BinaryData body) { - return SyncPoller.createPoller(Duration.ofSeconds(2), - (context) -> PollingUtils.getValidationStatus(uploadTestFile(testId, fileName, body)), - (context) -> PollingUtils.getValidationStatus(getTestFile(testId, fileName)), - (activationResponse, context) -> { - throw LOGGER.logExceptionAsError(new RuntimeException("Cancellation is not supported")); - }, (context) -> getTestFile(testId, fileName)); - } + private final LoadTestAdministrationClientImpl serviceClient; /** - * Get all test files. - *

Response Body Schema

+ * Initializes an instance of LoadTestAdministrationClient class. * - *
-     * {@code
-     * {
-     *     fileName: String (Required)
-     *     url: String (Optional)
-     *     fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional)
-     *     expireDateTime: OffsetDateTime (Optional)
-     *     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
-     *     validationFailureDetails: String (Optional)
-     * }
-     * }
-     * 
- * - * @param testId Unique test identifier 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 all test files as paginated response with {@link PagedIterable}. + * @param serviceClient the service client implementation. */ @Generated - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listTestFiles(String testId, RequestOptions requestOptions) { - return this.serviceClient.listTestFiles(testId, requestOptions); + LoadTestAdministrationClient(LoadTestAdministrationClientImpl serviceClient) { + this.serviceClient = serviceClient; } /** @@ -227,6 +91,7 @@ public PagedIterable listTestFiles(String testId, RequestOptions req * autoStopDisabled: Boolean (Optional) * errorRate: Double (Optional) * errorRateTimeWindowInSeconds: Long (Optional) + * maximumVirtualUsersPerEngine: Integer (Optional) * } * secrets (Optional): { * String (Required): { @@ -266,7 +131,7 @@ public PagedIterable listTestFiles(String testId, RequestOptions req * configFileInfo (Optional): { * fileName: String (Required) * url: String (Optional) - * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional) + * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional) * expireDateTime: OffsetDateTime (Optional) * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional) * validationFailureDetails: String (Optional) @@ -293,6 +158,10 @@ public PagedIterable listTestFiles(String testId, RequestOptions req * engineBuiltInIdentityIds (Optional): [ * String (Optional) * ] + * estimatedVirtualUserHours: Double (Optional) + * preferences (Optional): { + * enableAIErrorInsights: Boolean (Optional) + * } * createdDateTime: OffsetDateTime (Optional) * createdBy: String (Optional) * lastModifiedDateTime: OffsetDateTime (Optional) @@ -337,6 +206,7 @@ public PagedIterable listTestFiles(String testId, RequestOptions req * autoStopDisabled: Boolean (Optional) * errorRate: Double (Optional) * errorRateTimeWindowInSeconds: Long (Optional) + * maximumVirtualUsersPerEngine: Integer (Optional) * } * secrets (Optional): { * String (Required): { @@ -376,7 +246,7 @@ public PagedIterable listTestFiles(String testId, RequestOptions req * configFileInfo (Optional): { * fileName: String (Required) * url: String (Optional) - * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional) + * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional) * expireDateTime: OffsetDateTime (Optional) * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional) * validationFailureDetails: String (Optional) @@ -403,6 +273,10 @@ public PagedIterable listTestFiles(String testId, RequestOptions req * engineBuiltInIdentityIds (Optional): [ * String (Optional) * ] + * estimatedVirtualUserHours: Double (Optional) + * preferences (Optional): { + * enableAIErrorInsights: Boolean (Optional) + * } * createdDateTime: OffsetDateTime (Optional) * createdBy: String (Optional) * lastModifiedDateTime: OffsetDateTime (Optional) @@ -410,7 +284,7 @@ public PagedIterable listTestFiles(String testId, RequestOptions req * } * } *
- * + * * @param testId Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, * underscore or hyphen characters. * @param body The resource instance. @@ -429,69 +303,279 @@ public Response createOrUpdateTestWithResponse(String testId, Binary } /** - * Delete a test by its test Id. - * - * @param testId Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, - * underscore or hyphen characters. + * Add an app component to a test. + * + * Add an app component to a test by providing the resource Id, name and type. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     components (Optional, Required on create): {
+     *         String (Required): {
+     *             resourceId: String (Required)
+     *             resourceName: String (Optional, Required on create)
+     *             resourceType: String (Optional, Required on create)
+     *             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 (Optional, Required on create): {
+     *         String (Required): {
+     *             resourceId: String (Required)
+     *             resourceName: String (Optional, Required on create)
+     *             resourceType: String (Optional, Required on create)
+     *             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 the {@link Response}. + * @return test app components along with {@link Response}. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteTestWithResponse(String testId, RequestOptions requestOptions) { - return this.serviceClient.deleteTestWithResponse(testId, requestOptions); + public Response createOrUpdateAppComponentsWithResponse(String testId, BinaryData body, + RequestOptions requestOptions) { + return this.serviceClient.createOrUpdateAppComponentsWithResponse(testId, body, requestOptions); } /** - * Get load test details by test Id. - *

Response Body Schema

+ * Configure server metrics for a test. + *

Request Body Schema

* *
      * {@code
      * {
-     *     passFailCriteria (Optional): {
-     *         passFailMetrics (Optional): {
-     *             String (Required): {
-     *                 clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
-     *                 aggregate: String(count/percentage/avg/p50/p75/p90/p95/p96/p97/p98/p99/p99.9/p99.99/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)
-     *             }
-     *         }
-     *         passFailServerMetrics (Optional): {
-     *             String (Required): {
-     *                 resourceId: String (Optional, Required on create)
-     *                 metricNamespace: String (Optional, Required on create)
-     *                 metricName: String (Optional, Required on create)
-     *                 aggregation: String (Optional, Required on create)
-     *                 condition: String (Optional, Required on create)
-     *                 value: double (Optional, Required on create)
-     *                 action: String(continue/stop) (Optional)
-     *                 actualValue: Double (Optional)
-     *                 result: String(passed/undetermined/failed) (Optional)
-     *             }
+     *     testId: String (Optional)
+     *     metrics (Optional, Required on create): {
+     *         String (Required): {
+     *             id: String (Optional)
+     *             resourceId: String (Optional, Required on create)
+     *             metricNamespace: String (Optional, Required on create)
+     *             displayDescription: String (Optional)
+     *             name: String (Optional, Required on create)
+     *             aggregation: String (Optional, Required on create)
+     *             unit: String (Optional)
+     *             resourceType: String (Optional, Required on create)
      *         }
      *     }
-     *     autoStopCriteria (Optional): {
-     *         autoStopDisabled: Boolean (Optional)
-     *         errorRate: Double (Optional)
-     *         errorRateTimeWindowInSeconds: Long (Optional)
-     *     }
-     *     secrets (Optional): {
+     *     createdDateTime: OffsetDateTime (Optional)
+     *     createdBy: String (Optional)
+     *     lastModifiedDateTime: OffsetDateTime (Optional)
+     *     lastModifiedBy: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     testId: String (Optional)
+     *     metrics (Optional, Required on create): {
      *         String (Required): {
-     *             value: String (Optional)
-     *             type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
+     *             id: String (Optional)
+     *             resourceId: String (Optional, Required on create)
+     *             metricNamespace: String (Optional, Required on create)
+     *             displayDescription: String (Optional)
+     *             name: String (Optional, Required on create)
+     *             aggregation: String (Optional, Required on create)
+     *             unit: String (Optional)
+     *             resourceType: String (Optional, Required on create)
      *         }
      *     }
-     *     certificate (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 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateServerMetricsConfigWithResponse(String testId, BinaryData body, + RequestOptions requestOptions) { + return this.serviceClient.createOrUpdateServerMetricsConfigWithResponse(testId, body, requestOptions); + } + + /** + * Get associated app component (collection of azure resources) for the given test. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     components (Optional, Required on create): {
+     *         String (Required): {
+     *             resourceId: String (Required)
+     *             resourceName: String (Optional, Required on create)
+     *             resourceType: String (Optional, Required on create)
+     *             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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getAppComponentsWithResponse(String testId, RequestOptions requestOptions) { + return this.serviceClient.getAppComponentsWithResponse(testId, requestOptions); + } + + /** + * List server metrics configuration for the given test. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     testId: String (Optional)
+     *     metrics (Optional, Required on create): {
+     *         String (Required): {
+     *             id: String (Optional)
+     *             resourceId: String (Optional, Required on create)
+     *             metricNamespace: String (Optional, Required on create)
+     *             displayDescription: String (Optional)
+     *             name: String (Optional, Required on create)
+     *             aggregation: String (Optional, Required on create)
+     *             unit: String (Optional)
+     *             resourceType: String (Optional, Required on create)
+     *         }
+     *     }
+     *     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 test server metrics configuration along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getServerMetricsConfigWithResponse(String testId, RequestOptions requestOptions) { + return this.serviceClient.getServerMetricsConfigWithResponse(testId, requestOptions); + } + + /** + * Get load test details by test Id. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     passFailCriteria (Optional): {
+     *         passFailMetrics (Optional): {
+     *             String (Required): {
+     *                 clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
+     *                 aggregate: String(count/percentage/avg/p50/p75/p90/p95/p96/p97/p98/p99/p99.9/p99.99/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)
+     *             }
+     *         }
+     *         passFailServerMetrics (Optional): {
+     *             String (Required): {
+     *                 resourceId: String (Optional, Required on create)
+     *                 metricNamespace: String (Optional, Required on create)
+     *                 metricName: String (Optional, Required on create)
+     *                 aggregation: String (Optional, Required on create)
+     *                 condition: String (Optional, Required on create)
+     *                 value: double (Optional, Required on create)
+     *                 action: String(continue/stop) (Optional)
+     *                 actualValue: Double (Optional)
+     *                 result: String(passed/undetermined/failed) (Optional)
+     *             }
+     *         }
+     *     }
+     *     autoStopCriteria (Optional): {
+     *         autoStopDisabled: Boolean (Optional)
+     *         errorRate: Double (Optional)
+     *         errorRateTimeWindowInSeconds: Long (Optional)
+     *         maximumVirtualUsersPerEngine: Integer (Optional)
+     *     }
+     *     secrets (Optional): {
+     *         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)
@@ -523,7 +607,7 @@ public Response deleteTestWithResponse(String testId, RequestOptions reque
      *         configFileInfo (Optional): {
      *             fileName: String (Required)
      *             url: String (Optional)
-     *             fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional)
+     *             fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional)
      *             expireDateTime: OffsetDateTime (Optional)
      *             validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
      *             validationFailureDetails: String (Optional)
@@ -550,6 +634,10 @@ public Response deleteTestWithResponse(String testId, RequestOptions reque
      *     engineBuiltInIdentityIds (Optional): [
      *         String (Optional)
      *     ]
+     *     estimatedVirtualUserHours: Double (Optional)
+     *     preferences (Optional): {
+     *         enableAIErrorInsights: Boolean (Optional)
+     *     }
      *     createdDateTime: OffsetDateTime (Optional)
      *     createdBy: String (Optional)
      *     lastModifiedDateTime: OffsetDateTime (Optional)
@@ -557,7 +645,7 @@ public Response deleteTestWithResponse(String testId, RequestOptions reque
      * }
      * }
      * 
- * + * * @param testId Unique test identifier 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. @@ -573,6 +661,71 @@ public Response getTestWithResponse(String testId, RequestOptions re return this.serviceClient.getTestWithResponse(testId, requestOptions); } + /** + * Get all the files that are associated with a test. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     fileName: String (Required)
+     *     url: String (Optional)
+     *     fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional)
+     *     expireDateTime: OffsetDateTime (Optional)
+     *     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
+     *     validationFailureDetails: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param testId Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, + * underscore or hyphen characters. + * @param fileName Name of the file. + * @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 the files that are associated with a test along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getTestFileWithResponse(String testId, String fileName, RequestOptions requestOptions) { + return this.serviceClient.getTestFileWithResponse(testId, fileName, requestOptions); + } + + /** + * Get all test files. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     fileName: String (Required)
+     *     url: String (Optional)
+     *     fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional)
+     *     expireDateTime: OffsetDateTime (Optional)
+     *     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
+     *     validationFailureDetails: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param testId Unique test identifier 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 all test files as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listTestFiles(String testId, RequestOptions requestOptions) { + return this.serviceClient.listTestFiles(testId, requestOptions); + } + /** * Get all load tests by the fully qualified resource Id e.g * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}. @@ -629,6 +782,7 @@ public Response getTestWithResponse(String testId, RequestOptions re * autoStopDisabled: Boolean (Optional) * errorRate: Double (Optional) * errorRateTimeWindowInSeconds: Long (Optional) + * maximumVirtualUsersPerEngine: Integer (Optional) * } * secrets (Optional): { * String (Required): { @@ -668,7 +822,7 @@ public Response getTestWithResponse(String testId, RequestOptions re * configFileInfo (Optional): { * fileName: String (Required) * url: String (Optional) - * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional) + * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional) * expireDateTime: OffsetDateTime (Optional) * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional) * validationFailureDetails: String (Optional) @@ -695,6 +849,10 @@ public Response getTestWithResponse(String testId, RequestOptions re * engineBuiltInIdentityIds (Optional): [ * String (Optional) * ] + * estimatedVirtualUserHours: Double (Optional) + * preferences (Optional): { + * enableAIErrorInsights: Boolean (Optional) + * } * createdDateTime: OffsetDateTime (Optional) * createdBy: String (Optional) * lastModifiedDateTime: OffsetDateTime (Optional) @@ -702,7 +860,7 @@ public Response getTestWithResponse(String testId, RequestOptions re * } * } *
- * + * * @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. @@ -719,57 +877,43 @@ public PagedIterable listTests(RequestOptions requestOptions) { } /** - * 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 - * + * Upload input file for a given test Id. 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".
NameTypeRequiredDescription
fileTypeStringNoFile type. Allowed values: "JMX_FILE", "USER_PROPERTIES", + * "ADDITIONAL_ARTIFACTS", "ZIPPED_ARTIFACTS", "URL_TEST_CONFIG", "TEST_SCRIPT", "BROWSER_RECORDING", + * "TEST_PLAN_RECOMMENDATIONS".
- * * You can add these to a request with {@link RequestOptions#addQueryParam} - * - *

- * Request Body Schema - * + *

Request Body Schema

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

- * Response Body Schema - * + * + *

Response Body Schema

+ * *
      * {@code
      * {
+     *     fileName: String (Required)
      *     url: String (Optional)
-     *     fileName: String (Optional)
-     *     fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
+     *     fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (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 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. @@ -777,8 +921,9 @@ public PagedIterable listTests(RequestOptions requestOptions) { * @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}. + * @return test file info along with {@link Response}. */ + @Generated @ServiceMethod(returns = ReturnType.SINGLE) Response uploadTestFileWithResponse(String testId, String fileName, BinaryData body, RequestOptions requestOptions) { @@ -786,22 +931,8 @@ Response uploadTestFileWithResponse(String testId, String fileName, } /** - * Get all the files that are associated with a test. - *

Response Body Schema

+ * Delete file by the file name for a test. * - *
-     * {@code
-     * {
-     *     fileName: String (Required)
-     *     url: String (Optional)
-     *     fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional)
-     *     expireDateTime: OffsetDateTime (Optional)
-     *     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
-     *     validationFailureDetails: String (Optional)
-     * }
-     * }
-     * 
- * * @param testId Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, * underscore or hyphen characters. * @param fileName Name of the file. @@ -810,20 +941,19 @@ Response uploadTestFileWithResponse(String testId, String fileName, * @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 the files that are associated with a test along with {@link Response}. + * @return the {@link Response}. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Response getTestFileWithResponse(String testId, String fileName, RequestOptions requestOptions) { - return this.serviceClient.getTestFileWithResponse(testId, fileName, requestOptions); + public Response deleteTestFileWithResponse(String testId, String fileName, RequestOptions requestOptions) { + return this.serviceClient.deleteTestFileWithResponse(testId, fileName, requestOptions); } /** - * Delete file by the file name for a test. - * + * Delete a test by its test Id. + * * @param testId Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, * underscore or hyphen characters. - * @param fileName Name of the file. * @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. @@ -833,31 +963,27 @@ public Response getTestFileWithResponse(String testId, String fileNa */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteTestFileWithResponse(String testId, String fileName, RequestOptions requestOptions) { - return this.serviceClient.deleteTestFileWithResponse(testId, fileName, requestOptions); + public Response deleteTestWithResponse(String testId, RequestOptions requestOptions) { + return this.serviceClient.deleteTestWithResponse(testId, requestOptions); } /** - * Add an app component to a test. - * - * Add an app component to a test by providing the resource Id, name and type. + * Create a new test profile or update an existing test profile. + * + * Create a new test profile or update an existing test profile by providing the test profile Id. *

Request Body Schema

* *
      * {@code
      * {
-     *     components (Optional, Required on create): {
-     *         String (Required): {
-     *             resourceId: String (Required)
-     *             resourceName: String (Optional, Required on create)
-     *             resourceType: String (Optional, Required on create)
-     *             displayName: String (Optional)
-     *             resourceGroup: String (Optional)
-     *             subscriptionId: String (Optional)
-     *             kind: String (Optional)
-     *         }
-     *     }
+     *     testProfileId: String (Required)
+     *     displayName: String (Optional)
+     *     description: String (Optional)
      *     testId: String (Optional)
+     *     targetResourceId: String (Optional)
+     *     targetResourceConfigurations (Optional): {
+     *         kind: String(FunctionsFlexConsumption) (Required)
+     *     }
      *     createdDateTime: OffsetDateTime (Optional)
      *     createdBy: String (Optional)
      *     lastModifiedDateTime: OffsetDateTime (Optional)
@@ -871,18 +997,14 @@ public Response deleteTestFileWithResponse(String testId, String fileName,
      * 
      * {@code
      * {
-     *     components (Optional, Required on create): {
-     *         String (Required): {
-     *             resourceId: String (Required)
-     *             resourceName: String (Optional, Required on create)
-     *             resourceType: String (Optional, Required on create)
-     *             displayName: String (Optional)
-     *             resourceGroup: String (Optional)
-     *             subscriptionId: String (Optional)
-     *             kind: String (Optional)
-     *         }
-     *     }
+     *     testProfileId: String (Required)
+     *     displayName: String (Optional)
+     *     description: String (Optional)
      *     testId: String (Optional)
+     *     targetResourceId: String (Optional)
+     *     targetResourceConfigurations (Optional): {
+     *         kind: String(FunctionsFlexConsumption) (Required)
+     *     }
      *     createdDateTime: OffsetDateTime (Optional)
      *     createdBy: String (Optional)
      *     lastModifiedDateTime: OffsetDateTime (Optional)
@@ -890,43 +1012,61 @@ public Response deleteTestFileWithResponse(String testId, String fileName,
      * }
      * }
      * 
- * - * @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 testProfileId Unique identifier for the test profile, must contain only lower-case alphabetic, numeric, + * underscore or hyphen characters. + * @param body The resource instance. * @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 components along with {@link Response}. + * @return test Profile Model along with {@link Response}. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateAppComponentsWithResponse(String testId, BinaryData body, + public Response createOrUpdateTestProfileWithResponse(String testProfileId, BinaryData body, RequestOptions requestOptions) { - return this.serviceClient.createOrUpdateAppComponentsWithResponse(testId, body, requestOptions); + return this.serviceClient.createOrUpdateTestProfileWithResponse(testProfileId, body, requestOptions); } /** - * Get associated app component (collection of azure resources) for the given test. + * Delete a test profile. + * + * Delete a test profile by its test profile Id. + * + * @param testProfileId Unique identifier for the test profile, 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteTestProfileWithResponse(String testProfileId, RequestOptions requestOptions) { + return this.serviceClient.deleteTestProfileWithResponse(testProfileId, requestOptions); + } + + /** + * Get load test profile details. + * + * Get load test profile details by test profile Id. *

Response Body Schema

* *
      * {@code
      * {
-     *     components (Optional, Required on create): {
-     *         String (Required): {
-     *             resourceId: String (Required)
-     *             resourceName: String (Optional, Required on create)
-     *             resourceType: String (Optional, Required on create)
-     *             displayName: String (Optional)
-     *             resourceGroup: String (Optional)
-     *             subscriptionId: String (Optional)
-     *             kind: String (Optional)
-     *         }
-     *     }
+     *     testProfileId: String (Required)
+     *     displayName: String (Optional)
+     *     description: String (Optional)
      *     testId: String (Optional)
+     *     targetResourceId: String (Optional)
+     *     targetResourceConfigurations (Optional): {
+     *         kind: String(FunctionsFlexConsumption) (Required)
+     *     }
      *     createdDateTime: OffsetDateTime (Optional)
      *     createdBy: String (Optional)
      *     lastModifiedDateTime: OffsetDateTime (Optional)
@@ -934,41 +1074,56 @@ public Response createOrUpdateAppComponentsWithResponse(String testI
      * }
      * }
      * 
- * - * @param testId Unique name for the load test, must contain only lower-case alphabetic, - * numeric, underscore or hyphen characters. + * + * @param testProfileId Unique identifier for the test profile, 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}. + * @return load test profile details. + * + * Get load test profile details by test profile Id along with {@link Response}. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Response getAppComponentsWithResponse(String testId, RequestOptions requestOptions) { - return this.serviceClient.getAppComponentsWithResponse(testId, requestOptions); + public Response getTestProfileWithResponse(String testProfileId, RequestOptions requestOptions) { + return this.serviceClient.getTestProfileWithResponse(testProfileId, requestOptions); } /** - * List server metrics configuration for the given test. + * List test profiles. + * + * Get all test profiles for the given filters. + *

Query Parameters

+ * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
maxpagesizeIntegerNoMaximum number of results to include in a single + * response.
lastModifiedStartTimeOffsetDateTimeNoStart DateTime(RFC 3339 literal format) + * of the last updated time range to filter test profiles.
lastModifiedEndTimeOffsetDateTimeNoEnd DateTime(RFC 3339 literal format) of + * the last updated time range to filter test profiles.
testProfileIdsList<String>NoComma separated list of IDs of the test + * profiles to filter. In the form of "," separated string.
testIdsList<String>NoComma separated list IDs of the tests which should + * be associated with the test profiles to fetch. In the form of "," separated string.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} *

Response Body Schema

* *
      * {@code
      * {
+     *     testProfileId: String (Required)
+     *     displayName: String (Optional)
+     *     description: String (Optional)
      *     testId: String (Optional)
-     *     metrics (Optional, Required on create): {
-     *         String (Required): {
-     *             id: String (Optional)
-     *             resourceId: String (Optional, Required on create)
-     *             metricNamespace: String (Optional, Required on create)
-     *             displayDescription: String (Optional)
-     *             name: String (Optional, Required on create)
-     *             aggregation: String (Optional, Required on create)
-     *             unit: String (Optional)
-     *             resourceType: String (Optional, Required on create)
-     *         }
+     *     targetResourceId: String (Optional)
+     *     targetResourceConfigurations (Optional): {
+     *         kind: String(FunctionsFlexConsumption) (Required)
      *     }
      *     createdDateTime: OffsetDateTime (Optional)
      *     createdBy: String (Optional)
@@ -977,38 +1132,34 @@ public Response getAppComponentsWithResponse(String testId, RequestO
      * }
      * }
      * 
- * - * @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}. + * @return paged collection of TestProfile items as paginated response with {@link PagedIterable}. */ @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getServerMetricsConfigWithResponse(String testId, RequestOptions requestOptions) { - return this.serviceClient.getServerMetricsConfigWithResponse(testId, requestOptions); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listTestProfiles(RequestOptions requestOptions) { + return this.serviceClient.listTestProfiles(requestOptions); } /** - * Create a new test profile or update an existing test profile. - * - * Create a new test profile or update an existing test profile by providing the test profile Id. + * Create or update operation template. *

Request Body Schema

* *
      * {@code
      * {
-     *     testProfileId: String (Required)
-     *     displayName: String (Optional)
+     *     kind: String(ScheduleTestsTrigger) (Required)
+     *     triggerId: String (Required)
+     *     displayName: String (Optional, Required on create)
      *     description: String (Optional)
-     *     testId: String (Optional)
-     *     targetResourceId: String (Optional)
-     *     targetResourceConfigurations (Optional): {
-     *         kind: String(FunctionsFlexConsumption) (Required)
+     *     state: String(Active/Paused/Completed/Disabled) (Optional)
+     *     stateDetails (Optional): {
+     *         message: String (Optional)
      *     }
      *     createdDateTime: OffsetDateTime (Optional)
      *     createdBy: String (Optional)
@@ -1023,13 +1174,13 @@ public Response getServerMetricsConfigWithResponse(String testId, Re
      * 
      * {@code
      * {
-     *     testProfileId: String (Required)
-     *     displayName: String (Optional)
+     *     kind: String(ScheduleTestsTrigger) (Required)
+     *     triggerId: String (Required)
+     *     displayName: String (Optional, Required on create)
      *     description: String (Optional)
-     *     testId: String (Optional)
-     *     targetResourceId: String (Optional)
-     *     targetResourceConfigurations (Optional): {
-     *         kind: String(FunctionsFlexConsumption) (Required)
+     *     state: String(Active/Paused/Completed/Disabled) (Optional)
+     *     stateDetails (Optional): {
+     *         message: String (Optional)
      *     }
      *     createdDateTime: OffsetDateTime (Optional)
      *     createdBy: String (Optional)
@@ -1038,31 +1189,27 @@ public Response getServerMetricsConfigWithResponse(String testId, Re
      * }
      * }
      * 
- * - * @param testProfileId Unique identifier for the test profile, must contain only lower-case alphabetic, numeric, - * underscore or hyphen characters. + * + * @param triggerId The unique identifier of the trigger. * @param body The resource instance. * @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 Profile Model along with {@link Response}. + * @return trigger model along with {@link Response}. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateTestProfileWithResponse(String testProfileId, BinaryData body, + public Response createOrUpdateTriggerWithResponse(String triggerId, BinaryData body, RequestOptions requestOptions) { - return this.serviceClient.createOrUpdateTestProfileWithResponse(testProfileId, body, requestOptions); + return this.serviceClient.createOrUpdateTriggerWithResponse(triggerId, body, requestOptions); } /** - * Delete a test profile. - * - * Delete a test profile by its test profile Id. - * - * @param testProfileId Unique identifier for the test profile, must contain only lower-case alphabetic, numeric, - * underscore or hyphen characters. + * Resource delete operation template. + * + * @param triggerId The unique identifier of the trigger. * @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. @@ -1072,26 +1219,24 @@ public Response createOrUpdateTestProfileWithResponse(String testPro */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteTestProfileWithResponse(String testProfileId, RequestOptions requestOptions) { - return this.serviceClient.deleteTestProfileWithResponse(testProfileId, requestOptions); + public Response deleteTriggerWithResponse(String triggerId, RequestOptions requestOptions) { + return this.serviceClient.deleteTriggerWithResponse(triggerId, requestOptions); } /** - * Get load test profile details. - * - * Get load test profile details by test profile Id. + * Resource read operation template. *

Response Body Schema

* *
      * {@code
      * {
-     *     testProfileId: String (Required)
-     *     displayName: String (Optional)
+     *     kind: String(ScheduleTestsTrigger) (Required)
+     *     triggerId: String (Required)
+     *     displayName: String (Optional, Required on create)
      *     description: String (Optional)
-     *     testId: String (Optional)
-     *     targetResourceId: String (Optional)
-     *     targetResourceConfigurations (Optional): {
-     *         kind: String(FunctionsFlexConsumption) (Required)
+     *     state: String(Active/Paused/Completed/Disabled) (Optional)
+     *     stateDetails (Optional): {
+     *         message: String (Optional)
      *     }
      *     createdDateTime: OffsetDateTime (Optional)
      *     createdBy: String (Optional)
@@ -1100,42 +1245,37 @@ public Response deleteTestProfileWithResponse(String testProfileId, Reques
      * }
      * }
      * 
- * - * @param testProfileId Unique identifier for the test profile, must contain only lower-case alphabetic, numeric, - * underscore or hyphen characters. + * + * @param triggerId The unique identifier of the trigger. * @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 profile details. - * - * Get load test profile details by test profile Id along with {@link Response}. + * @return trigger model along with {@link Response}. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Response getTestProfileWithResponse(String testProfileId, RequestOptions requestOptions) { - return this.serviceClient.getTestProfileWithResponse(testProfileId, requestOptions); + public Response getTriggerWithResponse(String triggerId, RequestOptions requestOptions) { + return this.serviceClient.getTriggerWithResponse(triggerId, requestOptions); } /** - * List test profiles. - * - * Get all test profiles for the given filters. + * Resource list operation template. *

Query Parameters

* * * - * + * + * * + * of the last updated time range to filter triggers. * - * - * + * the last updated time range to filter triggers. + * *
Query Parameters
NameTypeRequiredDescription
maxpagesizeIntegerNoMaximum number of results to include in a single - * response.
testIdsStringNoSearch based on triggers associated with the provided test + * ids.
statesStringNoFilter triggers based on a comma separated list of states. + * Allowed values: "Active", "Paused", "Completed", "Disabled".
lastModifiedStartTimeOffsetDateTimeNoStart DateTime(RFC 3339 literal format) - * of the last updated time range to filter test profiles.
lastModifiedEndTimeOffsetDateTimeNoEnd DateTime(RFC 3339 literal format) of - * the last updated time range to filter test profiles.
testProfileIdsList<String>NoComma separated list of IDs of the test - * profiles to filter. In the form of "," separated string.
testIdsList<String>NoComma separated list IDs of the tests which should - * be associated with the test profiles to fetch. In the form of "," separated string.
maxpagesizeIntegerNoNumber of results in response. Default page size is + * 50.
* You can add these to a request with {@link RequestOptions#addQueryParam} *

Response Body Schema

@@ -1143,13 +1283,13 @@ public Response getTestProfileWithResponse(String testProfileId, Req *
      * {@code
      * {
-     *     testProfileId: String (Required)
-     *     displayName: String (Optional)
+     *     kind: String(ScheduleTestsTrigger) (Required)
+     *     triggerId: String (Required)
+     *     displayName: String (Optional, Required on create)
      *     description: String (Optional)
-     *     testId: String (Optional)
-     *     targetResourceId: String (Optional)
-     *     targetResourceConfigurations (Optional): {
-     *         kind: String(FunctionsFlexConsumption) (Required)
+     *     state: String(Active/Paused/Completed/Disabled) (Optional)
+     *     stateDetails (Optional): {
+     *         message: String (Optional)
      *     }
      *     createdDateTime: OffsetDateTime (Optional)
      *     createdBy: String (Optional)
@@ -1158,533 +1298,1140 @@ public Response getTestProfileWithResponse(String testProfileId, Req
      * }
      * }
      * 
- * + * * @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 paged collection of TestProfile items as paginated response with {@link PagedIterable}. + * @return paged collection of Trigger items as paginated response with {@link PagedIterable}. */ @Generated @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listTestProfiles(RequestOptions requestOptions) { - return this.serviceClient.listTestProfiles(requestOptions); + public PagedIterable listTriggers(RequestOptions requestOptions) { + return this.serviceClient.listTriggers(requestOptions); } /** - * Add an app component to a test. - * - * Add an app component to a test by providing the resource Id, name and type. - * - * @param testId Unique name for the load test, must contain only lower-case alphabetic, - * numeric, underscore or hyphen characters. - * @param body App Component model. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return test app components. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public TestAppComponents createOrUpdateAppComponents(String testId, TestAppComponents body) { - // Generated convenience method for createOrUpdateAppComponentsWithResponse - RequestOptions requestOptions = new RequestOptions(); - JsonMergePatchHelper.getTestAppComponentsAccessor().prepareModelForJsonMergePatch(body, true); - BinaryData bodyInBinaryData = BinaryData.fromObject(body); - // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization. - bodyInBinaryData.getLength(); - JsonMergePatchHelper.getTestAppComponentsAccessor().prepareModelForJsonMergePatch(body, false); - return createOrUpdateAppComponentsWithResponse(testId, bodyInBinaryData, requestOptions).getValue() - .toObject(TestAppComponents.class); - } - + * Create or update operation template. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     scope: String(Tests) (Required)
+     *     notificationRuleId: String (Required)
+     *     displayName: String (Optional, Required on create)
+     *     actionGroupIds (Optional, Required on create): [
+     *         String (Optional, Required on create)
+     *     ]
+     *     createdDateTime: OffsetDateTime (Optional)
+     *     createdBy: String (Optional)
+     *     lastModifiedDateTime: OffsetDateTime (Optional)
+     *     lastModifiedBy: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     scope: String(Tests) (Required)
+     *     notificationRuleId: String (Required)
+     *     displayName: String (Optional, Required on create)
+     *     actionGroupIds (Optional, Required on create): [
+     *         String (Optional, Required on create)
+     *     ]
+     *     createdDateTime: OffsetDateTime (Optional)
+     *     createdBy: String (Optional)
+     *     lastModifiedDateTime: OffsetDateTime (Optional)
+     *     lastModifiedBy: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param notificationRuleId The unique identifier of the notification rule. + * @param body The resource instance. + * @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 notification rule model along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateNotificationRuleWithResponse(String notificationRuleId, BinaryData body, + RequestOptions requestOptions) { + return this.serviceClient.createOrUpdateNotificationRuleWithResponse(notificationRuleId, body, requestOptions); + } + + /** + * Resource delete operation template. + * + * @param notificationRuleId The unique identifier of the notification rule. + * @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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteNotificationRuleWithResponse(String notificationRuleId, RequestOptions requestOptions) { + return this.serviceClient.deleteNotificationRuleWithResponse(notificationRuleId, requestOptions); + } + + /** + * Resource read operation template. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     scope: String(Tests) (Required)
+     *     notificationRuleId: String (Required)
+     *     displayName: String (Optional, Required on create)
+     *     actionGroupIds (Optional, Required on create): [
+     *         String (Optional, Required on create)
+     *     ]
+     *     createdDateTime: OffsetDateTime (Optional)
+     *     createdBy: String (Optional)
+     *     lastModifiedDateTime: OffsetDateTime (Optional)
+     *     lastModifiedBy: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param notificationRuleId The unique identifier of the notification rule. + * @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 notification rule model along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getNotificationRuleWithResponse(String notificationRuleId, + RequestOptions requestOptions) { + return this.serviceClient.getNotificationRuleWithResponse(notificationRuleId, requestOptions); + } + + /** + * Resource list operation template. + *

Query Parameters

+ * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
testIdsStringNoSearch based on notification rules associated with the provided + * test ids.
scopesStringNoSearch based on notification rules for the provided + * scopes.
lastModifiedStartTimeOffsetDateTimeNoStart DateTime(RFC 3339 literal format) + * of the last updated time range to filter notification rules.
lastModifiedEndTimeOffsetDateTimeNoEnd DateTime(RFC 3339 literal format) of + * the last updated time range to filter notification rules.
maxpagesizeIntegerNoNumber of results in response. Default page size is + * 50.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     scope: String(Tests) (Required)
+     *     notificationRuleId: String (Required)
+     *     displayName: String (Optional, Required on create)
+     *     actionGroupIds (Optional, Required on create): [
+     *         String (Optional, Required on create)
+     *     ]
+     *     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. + * @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 paged collection of NotificationRule items as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listNotificationRules(RequestOptions requestOptions) { + return this.serviceClient.listNotificationRules(requestOptions); + } + + /** + * Clone a load test. + * + * Clone the given test with optional overrides applied to the clone test. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     newTestId: String (Required)
+     *     displayName: String (Optional)
+     *     description: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     id: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required)
+     *     error (Optional): {
+     *         error (Required): (recursive schema, see error above)
+     *     }
+     * }
+     * }
+     * 
+ * + * @param testId Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, + * underscore or hyphen characters. + * @param cloneTestRequest1 The cloneTestRequest1 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. + * @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 SyncPoller} for polling of provides status details for long running operations. + */ + @Generated + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller beginCloneTest(String testId, BinaryData cloneTestRequest1, + RequestOptions requestOptions) { + return this.serviceClient.beginCloneTest(testId, cloneTestRequest1, requestOptions); + } + + /** + * Generate load test plan recommendations. + * + * Generate AI Recommendations to author a load test plan using the uploaded browser recording file. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     id: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required)
+     *     error (Optional): {
+     *         error (Required): (recursive schema, see error above)
+     *     }
+     * }
+     * }
+     * 
+ * + * @param testId Unique test identifier 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 SyncPoller} for polling of provides status details for long running operations. + */ + @Generated + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller beginGenerateTestPlanRecommendations(String testId, + RequestOptions requestOptions) { + return this.serviceClient.beginGenerateTestPlanRecommendations(testId, requestOptions); + } + + /** + * Get the status of a long running operation. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     id: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required)
+     *     kind: String(CloneTest/GenerateTestRunInsights/TestPlanRecommendations) (Required)
+     *     error (Optional): {
+     *         error (Required): (recursive schema, see error above)
+     *     }
+     * }
+     * }
+     * 
+ * + * @param operationId The unique ID of the operation. + * @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 status of a long running operation along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getOperationStatusWithResponse(String operationId, RequestOptions requestOptions) { + return this.serviceClient.getOperationStatusWithResponse(operationId, requestOptions); + } + + /** + * Create a new test or update an existing test by providing the test Id. + * + * @param testId Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, + * underscore or hyphen characters. + * @param body The resource instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return load test model. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public LoadTest createOrUpdateTest(String testId, LoadTest body) { + // Generated convenience method for createOrUpdateTestWithResponse + RequestOptions requestOptions = new RequestOptions(); + JsonMergePatchHelper.getLoadTestAccessor().prepareModelForJsonMergePatch(body, true); + BinaryData bodyInBinaryData = BinaryData.fromObject(body); + // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization. + bodyInBinaryData.getLength(); + JsonMergePatchHelper.getLoadTestAccessor().prepareModelForJsonMergePatch(body, false); + return createOrUpdateTestWithResponse(testId, bodyInBinaryData, requestOptions).getValue() + .toObject(LoadTest.class); + } + + /** + * Add an app component to a test. + * + * Add an app component to a test by providing the resource Id, name and type. + * + * @param testId Unique name for the load test, must contain only lower-case alphabetic, + * numeric, underscore or hyphen characters. + * @param body App Component model. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return test app components. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public TestAppComponents createOrUpdateAppComponents(String testId, TestAppComponents body) { + // Generated convenience method for createOrUpdateAppComponentsWithResponse + RequestOptions requestOptions = new RequestOptions(); + JsonMergePatchHelper.getTestAppComponentsAccessor().prepareModelForJsonMergePatch(body, true); + BinaryData bodyInBinaryData = BinaryData.fromObject(body); + // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization. + bodyInBinaryData.getLength(); + JsonMergePatchHelper.getTestAppComponentsAccessor().prepareModelForJsonMergePatch(body, false); + return createOrUpdateAppComponentsWithResponse(testId, bodyInBinaryData, requestOptions).getValue() + .toObject(TestAppComponents.class); + } + + /** + * Configure server metrics for a test. + * + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return test server metrics configuration. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public TestServerMetricsConfiguration createOrUpdateServerMetricsConfig(String testId, + TestServerMetricsConfiguration body) { + // Generated convenience method for createOrUpdateServerMetricsConfigWithResponse + RequestOptions requestOptions = new RequestOptions(); + JsonMergePatchHelper.getTestServerMetricsConfigurationAccessor().prepareModelForJsonMergePatch(body, true); + BinaryData bodyInBinaryData = BinaryData.fromObject(body); + // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization. + bodyInBinaryData.getLength(); + JsonMergePatchHelper.getTestServerMetricsConfigurationAccessor().prepareModelForJsonMergePatch(body, false); + return createOrUpdateServerMetricsConfigWithResponse(testId, bodyInBinaryData, requestOptions).getValue() + .toObject(TestServerMetricsConfiguration.class); + } + + /** + * Get associated app component (collection of azure resources) for the given test. + * + * @param testId Unique name for the load test, must contain only lower-case alphabetic, + * numeric, underscore or hyphen characters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return associated app component (collection of azure resources) for the given test. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public TestAppComponents getAppComponents(String testId) { + // Generated convenience method for getAppComponentsWithResponse + RequestOptions requestOptions = new RequestOptions(); + return getAppComponentsWithResponse(testId, requestOptions).getValue().toObject(TestAppComponents.class); + } + + /** + * List server metrics configuration for the given test. + * + * @param testId Unique name for the load test, must contain only lower-case alphabetic, + * numeric, underscore or hyphen characters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return test server metrics configuration. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public TestServerMetricsConfiguration getServerMetricsConfig(String testId) { + // Generated convenience method for getServerMetricsConfigWithResponse + RequestOptions requestOptions = new RequestOptions(); + return getServerMetricsConfigWithResponse(testId, requestOptions).getValue() + .toObject(TestServerMetricsConfiguration.class); + } + + /** + * Get load test details by test Id. + * + * @param testId Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, + * underscore or hyphen characters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return load test details by test Id. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public LoadTest getTest(String testId) { + // Generated convenience method for getTestWithResponse + RequestOptions requestOptions = new RequestOptions(); + return getTestWithResponse(testId, requestOptions).getValue().toObject(LoadTest.class); + } + + /** + * Get all the files that are associated with a test. + * + * @param testId Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, + * underscore or hyphen characters. + * @param fileName Name of the file. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all the files that are associated with a test. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public TestFileInfo getTestFile(String testId, String fileName) { + // Generated convenience method for getTestFileWithResponse + RequestOptions requestOptions = new RequestOptions(); + return getTestFileWithResponse(testId, fileName, requestOptions).getValue().toObject(TestFileInfo.class); + } + + /** + * Get all test files. + * + * @param testId Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, + * underscore or hyphen characters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all test files as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listTestFiles(String testId) { + // Generated convenience method for listTestFiles + RequestOptions requestOptions = new RequestOptions(); + return serviceClient.listTestFiles(testId, requestOptions) + .mapPage(bodyItemValue -> bodyItemValue.toObject(TestFileInfo.class)); + } + /** - * Get associated app component (collection of azure resources) for the given test. - * + * Get all load tests by the fully qualified resource Id e.g + * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}. + * + * @param orderBy Sort on the supported fields in (field asc/desc) format. eg: + * lastModifiedDateTime asc. Supported fields - lastModifiedDateTime. + * @param search Prefix 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. + * @param lastModifiedStartTime Start DateTime(RFC 3339 literal format) of the last updated time range to filter + * tests. + * @param lastModifiedEndTime End DateTime(RFC 3339 literal format) of the last updated time range to filter tests. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @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 PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listTests(String orderBy, String search, OffsetDateTime lastModifiedStartTime, + OffsetDateTime lastModifiedEndTime) { + // Generated convenience method for listTests + RequestOptions requestOptions = new RequestOptions(); + if (orderBy != null) { + requestOptions.addQueryParam("orderby", orderBy, false); + } + if (search != null) { + requestOptions.addQueryParam("search", search, false); + } + if (lastModifiedStartTime != null) { + requestOptions.addQueryParam("lastModifiedStartTime", String.valueOf(lastModifiedStartTime), false); + } + if (lastModifiedEndTime != null) { + requestOptions.addQueryParam("lastModifiedEndTime", String.valueOf(lastModifiedEndTime), false); + } + return serviceClient.listTests(requestOptions).mapPage(bodyItemValue -> bodyItemValue.toObject(LoadTest.class)); + } + + /** + * Get all load tests by the fully qualified resource Id e.g + * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}. + * + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @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 PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listTests() { + // Generated convenience method for listTests + RequestOptions requestOptions = new RequestOptions(); + return serviceClient.listTests(requestOptions).mapPage(bodyItemValue -> bodyItemValue.toObject(LoadTest.class)); + } + + /** + * Upload input file for a given test Id. 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. + * * @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 fileType File type. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return associated app component (collection of azure resources) for the given test. + * @return test file info. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public TestAppComponents getAppComponents(String testId) { - // Generated convenience method for getAppComponentsWithResponse + TestFileInfo uploadTestFile(String testId, String fileName, BinaryData body, LoadTestingFileType fileType) { + // Generated convenience method for uploadTestFileWithResponse RequestOptions requestOptions = new RequestOptions(); - return getAppComponentsWithResponse(testId, requestOptions).getValue().toObject(TestAppComponents.class); + if (fileType != null) { + requestOptions.addQueryParam("fileType", fileType.toString(), false); + } + return uploadTestFileWithResponse(testId, fileName, body, requestOptions).getValue() + .toObject(TestFileInfo.class); } /** - * List server metrics configuration for the given test. - * + * Upload input file for a given test Id. 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. + * * @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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return test server metrics configuration. + * @return test file info. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public TestServerMetricsConfiguration getServerMetricsConfig(String testId) { - // Generated convenience method for getServerMetricsConfigWithResponse + TestFileInfo uploadTestFile(String testId, String fileName, BinaryData body) { + // Generated convenience method for uploadTestFileWithResponse RequestOptions requestOptions = new RequestOptions(); - return getServerMetricsConfigWithResponse(testId, requestOptions).getValue() - .toObject(TestServerMetricsConfiguration.class); + return uploadTestFileWithResponse(testId, fileName, body, requestOptions).getValue() + .toObject(TestFileInfo.class); } /** - * Get load test details by test Id. - * + * Delete file by the file name for a test. + * * @param testId Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, * underscore or hyphen characters. + * @param fileName Name of the file. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return load test details by test Id. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public LoadTest getTest(String testId) { - // Generated convenience method for getTestWithResponse + public void deleteTestFile(String testId, String fileName) { + // Generated convenience method for deleteTestFileWithResponse RequestOptions requestOptions = new RequestOptions(); - return getTestWithResponse(testId, requestOptions).getValue().toObject(LoadTest.class); + deleteTestFileWithResponse(testId, fileName, requestOptions).getValue(); } /** - * Get all the files that are associated with a test. - * + * Delete a test by its test Id. + * * @param testId Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, * underscore or hyphen characters. - * @param fileName Name of the file. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the files that are associated with a test. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public TestFileInfo getTestFile(String testId, String fileName) { - // Generated convenience method for getTestFileWithResponse + public void deleteTest(String testId) { + // Generated convenience method for deleteTestWithResponse RequestOptions requestOptions = new RequestOptions(); - return getTestFileWithResponse(testId, fileName, requestOptions).getValue().toObject(TestFileInfo.class); + deleteTestWithResponse(testId, requestOptions).getValue(); } /** - * Get all test files. - * - * @param testId Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, + * Create a new test profile or update an existing test profile. + * + * Create a new test profile or update an existing test profile by providing the test profile Id. + * + * @param testProfileId Unique identifier for the test profile, must contain only lower-case alphabetic, numeric, * underscore or hyphen characters. + * @param body The resource instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all test files as paginated response with {@link PagedIterable}. + * @return test Profile Model. */ @Generated - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listTestFiles(String testId) { - // Generated convenience method for listTestFiles + @ServiceMethod(returns = ReturnType.SINGLE) + public TestProfile createOrUpdateTestProfile(String testProfileId, TestProfile body) { + // Generated convenience method for createOrUpdateTestProfileWithResponse RequestOptions requestOptions = new RequestOptions(); - return serviceClient.listTestFiles(testId, requestOptions) - .mapPage(bodyItemValue -> bodyItemValue.toObject(TestFileInfo.class)); + JsonMergePatchHelper.getTestProfileAccessor().prepareModelForJsonMergePatch(body, true); + BinaryData bodyInBinaryData = BinaryData.fromObject(body); + // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization. + bodyInBinaryData.getLength(); + JsonMergePatchHelper.getTestProfileAccessor().prepareModelForJsonMergePatch(body, false); + return createOrUpdateTestProfileWithResponse(testProfileId, bodyInBinaryData, requestOptions).getValue() + .toObject(TestProfile.class); } /** - * Get all load tests by the fully qualified resource Id e.g - * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}. - * - * @param orderBy Sort on the supported fields in (field asc/desc) format. eg: - * lastModifiedDateTime asc. Supported fields - lastModifiedDateTime. - * @param search Prefix 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. + * Delete a test profile. + * + * Delete a test profile by its test profile Id. + * + * @param testProfileId Unique identifier for the test profile, must contain only lower-case alphabetic, numeric, + * underscore or hyphen characters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteTestProfile(String testProfileId) { + // Generated convenience method for deleteTestProfileWithResponse + RequestOptions requestOptions = new RequestOptions(); + deleteTestProfileWithResponse(testProfileId, requestOptions).getValue(); + } + + /** + * Get load test profile details. + * + * Get load test profile details by test profile Id. + * + * @param testProfileId Unique identifier for the test profile, must contain only lower-case alphabetic, numeric, + * underscore or hyphen characters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return load test profile details. + * + * Get load test profile details by test profile Id. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public TestProfile getTestProfile(String testProfileId) { + // Generated convenience method for getTestProfileWithResponse + RequestOptions requestOptions = new RequestOptions(); + return getTestProfileWithResponse(testProfileId, requestOptions).getValue().toObject(TestProfile.class); + } + + /** + * List test profiles. + * + * Get all test profiles for the given filters. + * * @param lastModifiedStartTime Start DateTime(RFC 3339 literal format) of the last updated time range to filter - * tests. - * @param lastModifiedEndTime End DateTime(RFC 3339 literal format) of the last updated time range to filter tests. + * test profiles. + * @param lastModifiedEndTime End DateTime(RFC 3339 literal format) of the last updated time range to filter test + * profiles. + * @param testProfileIds Comma separated list of IDs of the test profiles to filter. + * @param testIds Comma separated list IDs of the tests which should be associated with the test profiles to fetch. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @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 PagedIterable}. + * @return paged collection of TestProfile items as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listTestProfiles(OffsetDateTime lastModifiedStartTime, + OffsetDateTime lastModifiedEndTime, List testProfileIds, List testIds) { + // Generated convenience method for listTestProfiles + RequestOptions requestOptions = new RequestOptions(); + if (lastModifiedStartTime != null) { + requestOptions.addQueryParam("lastModifiedStartTime", String.valueOf(lastModifiedStartTime), false); + } + if (lastModifiedEndTime != null) { + requestOptions.addQueryParam("lastModifiedEndTime", String.valueOf(lastModifiedEndTime), false); + } + if (testProfileIds != null) { + requestOptions.addQueryParam("testProfileIds", + testProfileIds.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")), + false); + } + if (testIds != null) { + requestOptions.addQueryParam("testIds", + testIds.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")), + false); + } + return serviceClient.listTestProfiles(requestOptions) + .mapPage(bodyItemValue -> bodyItemValue.toObject(TestProfile.class)); + } + + /** + * List test profiles. + * + * Get all test profiles for the given filters. + * + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of TestProfile items as paginated response with {@link PagedIterable}. */ @Generated @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listTests(String orderBy, String search, OffsetDateTime lastModifiedStartTime, - OffsetDateTime lastModifiedEndTime) { - // Generated convenience method for listTests + public PagedIterable listTestProfiles() { + // Generated convenience method for listTestProfiles RequestOptions requestOptions = new RequestOptions(); - if (orderBy != null) { - requestOptions.addQueryParam("orderby", orderBy, false); - } - if (search != null) { - requestOptions.addQueryParam("search", search, false); - } - if (lastModifiedStartTime != null) { - requestOptions.addQueryParam("lastModifiedStartTime", String.valueOf(lastModifiedStartTime), false); - } - if (lastModifiedEndTime != null) { - requestOptions.addQueryParam("lastModifiedEndTime", String.valueOf(lastModifiedEndTime), false); - } - return serviceClient.listTests(requestOptions).mapPage(bodyItemValue -> bodyItemValue.toObject(LoadTest.class)); + return serviceClient.listTestProfiles(requestOptions) + .mapPage(bodyItemValue -> bodyItemValue.toObject(TestProfile.class)); } /** - * Get all load tests by the fully qualified resource Id e.g - * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}. - * + * Create or update operation template. + * + * @param triggerId The unique identifier of the trigger. + * @param body The resource instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @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 PagedIterable}. + * @return trigger model. */ @Generated - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listTests() { - // Generated convenience method for listTests + @ServiceMethod(returns = ReturnType.SINGLE) + public Trigger createOrUpdateTrigger(String triggerId, Trigger body) { + // Generated convenience method for createOrUpdateTriggerWithResponse RequestOptions requestOptions = new RequestOptions(); - return serviceClient.listTests(requestOptions).mapPage(bodyItemValue -> bodyItemValue.toObject(LoadTest.class)); + JsonMergePatchHelper.getTriggerAccessor().prepareModelForJsonMergePatch(body, true); + BinaryData bodyInBinaryData = BinaryData.fromObject(body); + // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization. + bodyInBinaryData.getLength(); + JsonMergePatchHelper.getTriggerAccessor().prepareModelForJsonMergePatch(body, false); + return createOrUpdateTriggerWithResponse(triggerId, bodyInBinaryData, requestOptions).getValue() + .toObject(Trigger.class); } /** - * Upload input file for a given test Id. 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. - * - * @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. + * Resource delete operation template. + * + * @param triggerId The unique identifier of the trigger. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return test file info. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - TestFileInfo uploadTestFile(String testId, String fileName, BinaryData body) { - // Generated convenience method for uploadTestFileWithResponse + public void deleteTrigger(String triggerId) { + // Generated convenience method for deleteTriggerWithResponse RequestOptions requestOptions = new RequestOptions(); - return uploadTestFileWithResponse(testId, fileName, body, requestOptions).getValue() - .toObject(TestFileInfo.class); + deleteTriggerWithResponse(triggerId, requestOptions).getValue(); } /** - * Delete file by the file name for a test. - * - * @param testId Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, - * underscore or hyphen characters. - * @param fileName Name of the file. + * Resource read operation template. + * + * @param triggerId The unique identifier of the trigger. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return trigger model. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteTestFile(String testId, String fileName) { - // Generated convenience method for deleteTestFileWithResponse + public Trigger getTrigger(String triggerId) { + // Generated convenience method for getTriggerWithResponse RequestOptions requestOptions = new RequestOptions(); - deleteTestFileWithResponse(testId, fileName, requestOptions).getValue(); + return getTriggerWithResponse(triggerId, requestOptions).getValue().toObject(Trigger.class); } /** - * Delete a test by its test Id. - * - * @param testId Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, - * underscore or hyphen characters. + * Resource list operation template. + * + * @param testIds Search based on triggers associated with the provided test ids. + * @param states Filter triggers based on a comma separated list of states. + * @param lastModifiedStartTime Start DateTime(RFC 3339 literal format) of the last updated time range to filter + * triggers. + * @param lastModifiedEndTime End DateTime(RFC 3339 literal format) of the last updated time range to filter + * triggers. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of Trigger items as paginated response with {@link PagedIterable}. */ @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteTest(String testId) { - // Generated convenience method for deleteTestWithResponse + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listTriggers(String testIds, TriggerState states, + OffsetDateTime lastModifiedStartTime, OffsetDateTime lastModifiedEndTime) { + // Generated convenience method for listTriggers RequestOptions requestOptions = new RequestOptions(); - deleteTestWithResponse(testId, requestOptions).getValue(); + if (testIds != null) { + requestOptions.addQueryParam("testIds", testIds, false); + } + if (states != null) { + requestOptions.addQueryParam("states", states.toString(), false); + } + if (lastModifiedStartTime != null) { + requestOptions.addQueryParam("lastModifiedStartTime", String.valueOf(lastModifiedStartTime), false); + } + if (lastModifiedEndTime != null) { + requestOptions.addQueryParam("lastModifiedEndTime", String.valueOf(lastModifiedEndTime), false); + } + return serviceClient.listTriggers(requestOptions) + .mapPage(bodyItemValue -> bodyItemValue.toObject(Trigger.class)); } /** - * Create a new test profile or update an existing test profile. - * - * Create a new test profile or update an existing test profile by providing the test profile Id. - * - * @param testProfileId Unique identifier for the test profile, must contain only lower-case alphabetic, numeric, - * underscore or hyphen characters. - * @param body The resource instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. + * Resource list operation template. + * * @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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return test Profile Model. + * @return paged collection of Trigger items as paginated response with {@link PagedIterable}. */ @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public TestProfile createOrUpdateTestProfile(String testProfileId, TestProfile body) { - // Generated convenience method for createOrUpdateTestProfileWithResponse + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listTriggers() { + // Generated convenience method for listTriggers RequestOptions requestOptions = new RequestOptions(); - JsonMergePatchHelper.getTestProfileAccessor().prepareModelForJsonMergePatch(body, true); - BinaryData bodyInBinaryData = BinaryData.fromObject(body); - // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization. - bodyInBinaryData.getLength(); - JsonMergePatchHelper.getTestProfileAccessor().prepareModelForJsonMergePatch(body, false); - return createOrUpdateTestProfileWithResponse(testProfileId, bodyInBinaryData, requestOptions).getValue() - .toObject(TestProfile.class); + return serviceClient.listTriggers(requestOptions) + .mapPage(bodyItemValue -> bodyItemValue.toObject(Trigger.class)); } /** - * Delete a test profile. - * - * Delete a test profile by its test profile Id. - * - * @param testProfileId Unique identifier for the test profile, must contain only lower-case alphabetic, numeric, - * underscore or hyphen characters. + * Create or update operation template. + * + * @param notificationRuleId The unique identifier of the notification rule. + * @param body The resource instance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return notification rule model. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteTestProfile(String testProfileId) { - // Generated convenience method for deleteTestProfileWithResponse + public NotificationRule createOrUpdateNotificationRule(String notificationRuleId, NotificationRule body) { + // Generated convenience method for createOrUpdateNotificationRuleWithResponse RequestOptions requestOptions = new RequestOptions(); - deleteTestProfileWithResponse(testProfileId, requestOptions).getValue(); + JsonMergePatchHelper.getNotificationRuleAccessor().prepareModelForJsonMergePatch(body, true); + BinaryData bodyInBinaryData = BinaryData.fromObject(body); + // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization. + bodyInBinaryData.getLength(); + JsonMergePatchHelper.getNotificationRuleAccessor().prepareModelForJsonMergePatch(body, false); + return createOrUpdateNotificationRuleWithResponse(notificationRuleId, bodyInBinaryData, requestOptions) + .getValue() + .toObject(NotificationRule.class); } /** - * Get load test profile details. - * - * Get load test profile details by test profile Id. - * - * @param testProfileId Unique identifier for the test profile, must contain only lower-case alphabetic, numeric, - * underscore or hyphen characters. + * Resource delete operation template. + * + * @param notificationRuleId The unique identifier of the notification rule. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return load test profile details. - * - * Get load test profile details by test profile Id. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public TestProfile getTestProfile(String testProfileId) { - // Generated convenience method for getTestProfileWithResponse + public void deleteNotificationRule(String notificationRuleId) { + // Generated convenience method for deleteNotificationRuleWithResponse RequestOptions requestOptions = new RequestOptions(); - return getTestProfileWithResponse(testProfileId, requestOptions).getValue().toObject(TestProfile.class); + deleteNotificationRuleWithResponse(notificationRuleId, requestOptions).getValue(); } /** - * List test profiles. - * - * Get all test profiles for the given filters. - * + * Resource read operation template. + * + * @param notificationRuleId The unique identifier of the notification rule. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of TestProfile items as paginated response with {@link PagedIterable}. + * @return notification rule model. */ @Generated - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listTestProfiles() { - // Generated convenience method for listTestProfiles + @ServiceMethod(returns = ReturnType.SINGLE) + public NotificationRule getNotificationRule(String notificationRuleId) { + // Generated convenience method for getNotificationRuleWithResponse RequestOptions requestOptions = new RequestOptions(); - return serviceClient.listTestProfiles(requestOptions) - .mapPage(bodyItemValue -> bodyItemValue.toObject(TestProfile.class)); + return getNotificationRuleWithResponse(notificationRuleId, requestOptions).getValue() + .toObject(NotificationRule.class); } /** - * List test profiles. - * - * Get all test profiles for the given filters. - * + * Resource list operation template. + * + * @param testIds Search based on notification rules associated with the provided test ids. + * @param scopes Search based on notification rules for the provided scopes. * @param lastModifiedStartTime Start DateTime(RFC 3339 literal format) of the last updated time range to filter - * test profiles. - * @param lastModifiedEndTime End DateTime(RFC 3339 literal format) of the last updated time range to filter test - * profiles. - * @param testProfileIds Comma separated list of IDs of the test profiles to filter. - * @param testIds Comma separated list IDs of the tests which should be associated with the test profiles to fetch. + * notification rules. + * @param lastModifiedEndTime End DateTime(RFC 3339 literal format) of the last updated time range to filter + * notification rules. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of TestProfile items as paginated response with {@link PagedIterable}. + * @return paged collection of NotificationRule items as paginated response with {@link PagedIterable}. */ @Generated @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listTestProfiles(OffsetDateTime lastModifiedStartTime, - OffsetDateTime lastModifiedEndTime, List testProfileIds, List testIds) { - // Generated convenience method for listTestProfiles + public PagedIterable listNotificationRules(String testIds, String scopes, + OffsetDateTime lastModifiedStartTime, OffsetDateTime lastModifiedEndTime) { + // Generated convenience method for listNotificationRules RequestOptions requestOptions = new RequestOptions(); + if (testIds != null) { + requestOptions.addQueryParam("testIds", testIds, false); + } + if (scopes != null) { + requestOptions.addQueryParam("scopes", scopes, false); + } if (lastModifiedStartTime != null) { requestOptions.addQueryParam("lastModifiedStartTime", String.valueOf(lastModifiedStartTime), false); } if (lastModifiedEndTime != null) { requestOptions.addQueryParam("lastModifiedEndTime", String.valueOf(lastModifiedEndTime), false); } - if (testProfileIds != null) { - requestOptions.addQueryParam("testProfileIds", - testProfileIds.stream() - .map(paramItemValue -> Objects.toString(paramItemValue, "")) - .collect(Collectors.joining(",")), - false); - } - if (testIds != null) { - requestOptions.addQueryParam("testIds", - testIds.stream() - .map(paramItemValue -> Objects.toString(paramItemValue, "")) - .collect(Collectors.joining(",")), - false); - } - return serviceClient.listTestProfiles(requestOptions) - .mapPage(bodyItemValue -> bodyItemValue.toObject(TestProfile.class)); + return serviceClient.listNotificationRules(requestOptions) + .mapPage(bodyItemValue -> bodyItemValue.toObject(NotificationRule.class)); } /** - * Configure server metrics for a test. - * - * @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. + * Resource list operation template. + * * @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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return test server metrics configuration. + * @return paged collection of NotificationRule items as paginated response with {@link PagedIterable}. */ @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public TestServerMetricsConfiguration createOrUpdateServerMetricsConfig(String testId, - TestServerMetricsConfiguration body) { - // Generated convenience method for createOrUpdateServerMetricsConfigWithResponse + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listNotificationRules() { + // Generated convenience method for listNotificationRules RequestOptions requestOptions = new RequestOptions(); - JsonMergePatchHelper.getTestServerMetricsConfigurationAccessor().prepareModelForJsonMergePatch(body, true); - BinaryData bodyInBinaryData = BinaryData.fromObject(body); - // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization. - bodyInBinaryData.getLength(); - JsonMergePatchHelper.getTestServerMetricsConfigurationAccessor().prepareModelForJsonMergePatch(body, false); - return createOrUpdateServerMetricsConfigWithResponse(testId, bodyInBinaryData, requestOptions).getValue() - .toObject(TestServerMetricsConfiguration.class); + return serviceClient.listNotificationRules(requestOptions) + .mapPage(bodyItemValue -> bodyItemValue.toObject(NotificationRule.class)); } /** - * Create a new test or update an existing test by providing the test Id. - * + * Clone a load test. + * + * Clone the given test with optional overrides applied to the clone test. + * * @param testId Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, * underscore or hyphen characters. - * @param body The resource instance. + * @param newTestId Unique identifier for the new test that will be created. + * @param displayName Display Name override for the newly created test. + * @param description Description override for the newly created test. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return load test model. + * @return the {@link SyncPoller} for polling of provides status details for long running operations. */ @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public LoadTest createOrUpdateTest(String testId, LoadTest body) { - // Generated convenience method for createOrUpdateTestWithResponse + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller beginCloneTest(String testId, String newTestId, String displayName, + String description) { + // Generated convenience method for beginCloneTestWithModel RequestOptions requestOptions = new RequestOptions(); - JsonMergePatchHelper.getLoadTestAccessor().prepareModelForJsonMergePatch(body, true); - BinaryData bodyInBinaryData = BinaryData.fromObject(body); - // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization. - bodyInBinaryData.getLength(); - JsonMergePatchHelper.getLoadTestAccessor().prepareModelForJsonMergePatch(body, false); - return createOrUpdateTestWithResponse(testId, bodyInBinaryData, requestOptions).getValue() - .toObject(LoadTest.class); + CloneTestRequest1 cloneTestRequest1Obj + = new CloneTestRequest1(newTestId).setDisplayName(displayName).setDescription(description); + BinaryData cloneTestRequest1 = BinaryData.fromObject(cloneTestRequest1Obj); + return serviceClient.beginCloneTestWithModel(testId, cloneTestRequest1, requestOptions); } /** - * Upload input file for a given test Id. 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. - * - * @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 fileType File type. + * Clone a load test. + * + * Clone the given test with optional overrides applied to the clone test. + * + * @param testId Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, + * underscore or hyphen characters. + * @param newTestId Unique identifier for the new test that will be created. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return test file info. + * @return the {@link SyncPoller} for polling of provides status details for long running operations. */ @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - TestFileInfo uploadTestFile(String testId, String fileName, BinaryData body, LoadTestingFileType fileType) { - // Generated convenience method for uploadTestFileWithResponse + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller beginCloneTest(String testId, String newTestId) { + // Generated convenience method for beginCloneTestWithModel RequestOptions requestOptions = new RequestOptions(); - if (fileType != null) { - requestOptions.addQueryParam("fileType", fileType.toString(), false); - } - return uploadTestFileWithResponse(testId, fileName, body, requestOptions).getValue() - .toObject(TestFileInfo.class); + CloneTestRequest1 cloneTestRequest1Obj = new CloneTestRequest1(newTestId); + BinaryData cloneTestRequest1 = BinaryData.fromObject(cloneTestRequest1Obj); + return serviceClient.beginCloneTestWithModel(testId, cloneTestRequest1, requestOptions); } + /** + * Generate load test plan recommendations. + * + * Generate AI Recommendations to author a load test plan using the uploaded browser recording file. + * + * @param testId Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, + * underscore or hyphen characters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of provides status details for long running operations. + */ @Generated - private final LoadTestAdministrationClientImpl serviceClient; + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller beginGenerateTestPlanRecommendations(String testId) { + // Generated convenience method for beginGenerateTestPlanRecommendationsWithModel + RequestOptions requestOptions = new RequestOptions(); + return serviceClient.beginGenerateTestPlanRecommendationsWithModel(testId, requestOptions); + } /** - * Initializes an instance of LoadTestAdministrationClient class. - * - * @param serviceClient the service client implementation. + * Get the status of a long running operation. + * + * @param operationId The unique ID of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the status of a long running operation. */ @Generated - LoadTestAdministrationClient(LoadTestAdministrationClientImpl serviceClient) { - this.serviceClient = serviceClient; + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationStatus getOperationStatus(String operationId) { + // Generated convenience method for getOperationStatusWithResponse + RequestOptions requestOptions = new RequestOptions(); + return getOperationStatusWithResponse(operationId, requestOptions).getValue().toObject(OperationStatus.class); } } 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 82fe0a7b6c1b..a7feb35b5319 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 @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting; import com.azure.core.annotation.Generated; @@ -46,7 +47,6 @@ public final class LoadTestAdministrationClientBuilder implements HttpTrait, ConfigurationTrait, TokenCredentialTrait, EndpointTrait { - @Generated private static final String SDK_NAME = "name"; @@ -56,6 +56,10 @@ public final class LoadTestAdministrationClientBuilder @Generated private static final String[] DEFAULT_SCOPES = new String[] { "https://cnt-prod.loadtesting.azure.com/.default" }; + @Generated + private static final Map PROPERTIES + = CoreUtils.getProperties("azure-developer-loadtesting.properties"); + @Generated private final List pipelinePolicies; @@ -68,37 +72,37 @@ public LoadTestAdministrationClientBuilder() { } /* - * The HTTP pipeline to send requests through. + * The HTTP client used to send the request. */ @Generated - private HttpPipeline pipeline; + private HttpClient httpClient; /** * {@inheritDoc}. */ @Generated @Override - public LoadTestAdministrationClientBuilder pipeline(HttpPipeline pipeline) { - if (this.pipeline != null && pipeline == null) { - LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); - } - this.pipeline = pipeline; + public LoadTestAdministrationClientBuilder httpClient(HttpClient httpClient) { + this.httpClient = httpClient; return this; } /* - * The HTTP client used to send the request. + * The HTTP pipeline to send requests through. */ @Generated - private HttpClient httpClient; + private HttpPipeline pipeline; /** * {@inheritDoc}. */ @Generated @Override - public LoadTestAdministrationClientBuilder httpClient(HttpClient httpClient) { - this.httpClient = httpClient; + public LoadTestAdministrationClientBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } + this.pipeline = pipeline; return this; } @@ -217,7 +221,7 @@ public LoadTestAdministrationClientBuilder endpoint(String endpoint) { /** * Sets Service version. - * + * * @param serviceVersion the serviceVersion value. * @return the LoadTestAdministrationClientBuilder. */ @@ -235,7 +239,7 @@ public LoadTestAdministrationClientBuilder serviceVersion(LoadTestingServiceVers /** * Sets The retry policy that will attempt to retry failed requests, if applicable. - * + * * @param retryPolicy the retryPolicy value. * @return the LoadTestAdministrationClientBuilder. */ @@ -247,7 +251,7 @@ public LoadTestAdministrationClientBuilder retryPolicy(RetryPolicy retryPolicy) /** * Builds an instance of LoadTestAdministrationClientImpl with the provided parameters. - * + * * @return an instance of LoadTestAdministrationClientImpl. */ @Generated @@ -261,6 +265,13 @@ private LoadTestAdministrationClientImpl buildInnerClient() { return client; } + @Generated + private void validateClient() { + // This method is invoked from 'buildInnerClient'/'buildClient' method. + // Developer can customize this method, to validate that the necessary conditions are met for the new client. + Objects.requireNonNull(endpoint, "'endpoint' cannot be null."); + } + @Generated private HttpPipeline createHttpPipeline() { Configuration buildConfiguration @@ -301,7 +312,7 @@ private HttpPipeline createHttpPipeline() { /** * Builds an instance of LoadTestAdministrationAsyncClient class. - * + * * @return an instance of LoadTestAdministrationAsyncClient. */ @Generated @@ -311,7 +322,7 @@ public LoadTestAdministrationAsyncClient buildAsyncClient() { /** * Builds an instance of LoadTestAdministrationClient class. - * + * * @return an instance of LoadTestAdministrationClient. */ @Generated @@ -319,16 +330,5 @@ public LoadTestAdministrationClient buildClient() { return new LoadTestAdministrationClient(buildInnerClient()); } - @Generated - private static final Map PROPERTIES - = CoreUtils.getProperties("azure-developer-loadtesting.properties"); - private static final ClientLogger LOGGER = new ClientLogger(LoadTestAdministrationClientBuilder.class); - - @Generated - private void validateClient() { - // This method is invoked from 'buildInnerClient'/'buildClient' method. - // Developer can customize this method, to validate that the necessary conditions are met for the new client. - Objects.requireNonNull(endpoint, "'endpoint' cannot be null."); - } } 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 cb276fab7365..de02699b5b10 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 @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting; import com.azure.core.annotation.Generated; @@ -11,7 +12,6 @@ import com.azure.core.exception.HttpResponseException; import com.azure.core.exception.ResourceModifiedException; import com.azure.core.exception.ResourceNotFoundException; -import com.azure.core.http.HttpHeaderName; import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.PagedResponseBase; @@ -25,12 +25,14 @@ import com.azure.developer.loadtesting.models.LoadTestRun; import com.azure.developer.loadtesting.models.MetricDefinitions; import com.azure.developer.loadtesting.models.MetricNamespaces; +import com.azure.developer.loadtesting.models.MetricsFilters; import com.azure.developer.loadtesting.models.TestProfileRun; import com.azure.developer.loadtesting.models.TestRunAppComponents; import com.azure.developer.loadtesting.models.TestRunFileInfo; +import com.azure.developer.loadtesting.models.TestRunInsights; import com.azure.developer.loadtesting.models.TestRunServerMetricsConfiguration; import com.azure.developer.loadtesting.models.TimeGrain; -import java.time.Duration; +import com.azure.developer.loadtesting.models.TimeSeriesElement; import java.time.OffsetDateTime; import java.util.List; import java.util.Objects; @@ -43,30 +45,192 @@ */ @ServiceClient(builder = LoadTestRunClientBuilder.class, isAsync = true) public final class LoadTestRunAsyncClient { - @Generated private final LoadTestRunClientImpl serviceClient; /** - * Configure server metrics for a test run. + * Initializes an instance of LoadTestRunAsyncClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + LoadTestRunAsyncClient(LoadTestRunClientImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Create and start a new test run with the given test run Id. + *

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
      * {
-     *     testRunId: String (Optional)
-     *     metrics (Optional): {
+     *     testRunId: String (Required)
+     *     passFailCriteria (Optional): {
+     *         passFailMetrics (Optional): {
+     *             String (Required): {
+     *                 clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
+     *                 aggregate: String(count/percentage/avg/p50/p75/p90/p95/p96/p97/p98/p99/p99.9/p99.99/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)
+     *             }
+     *         }
+     *         passFailServerMetrics (Optional): {
+     *             String (Required): {
+     *                 resourceId: String (Optional, Required on create)
+     *                 metricNamespace: String (Optional, Required on create)
+     *                 metricName: String (Optional, Required on create)
+     *                 aggregation: String (Optional, Required on create)
+     *                 condition: String (Optional, Required on create)
+     *                 value: double (Optional, Required on create)
+     *                 action: String(continue/stop) (Optional)
+     *                 actualValue: Double (Optional)
+     *                 result: String(passed/undetermined/failed) (Optional)
+     *             }
+     *         }
+     *     }
+     *     autoStopCriteria (Optional): {
+     *         autoStopDisabled: Boolean (Optional)
+     *         errorRate: Double (Optional)
+     *         errorRateTimeWindowInSeconds: Long (Optional)
+     *         maximumVirtualUsersPerEngine: Integer (Optional)
+     *     }
+     *     secrets (Optional): {
      *         String (Required): {
-     *             id: String (Optional)
-     *             resourceId: String (Optional, Required on create)
-     *             metricNamespace: String (Optional, Required on create)
-     *             displayDescription: String (Optional)
-     *             name: String (Optional, Required on create)
-     *             aggregation: String (Optional, Required on create)
-     *             unit: String (Optional)
-     *             resourceType: String (Optional, Required on create)
+     *             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 (Required)
+     *     }
+     *     errorDetails (Optional): [
+     *          (Optional){
+     *             code: String (Optional)
+     *             message: String (Optional)
+     *             properties (Optional): {
+     *                 String (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         }
+     *     ]
+     *     testRunStatistics (Optional): {
+     *         String (Required): {
+     *             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)
+     *             pct75ResTime: Double (Optional)
+     *             pct96ResTime: Double (Optional)
+     *             pct97ResTime: Double (Optional)
+     *             pct98ResTime: Double (Optional)
+     *             pct999ResTime: Double (Optional)
+     *             pct9999ResTime: Double (Optional)
+     *             throughput: Double (Optional)
+     *             receivedKBytesPerSec: Double (Optional)
+     *             sentKBytesPerSec: Double (Optional)
+     *         }
+     *     }
+     *     regionalStatistics (Optional): {
+     *         String (Required): (recursive schema, see String above)
+     *     }
+     *     loadTestConfiguration (Optional): {
+     *         engineInstances: Integer (Optional)
+     *         splitAllCSVs: Boolean (Optional)
+     *         quickStartTest: Boolean (Optional)
+     *         optionalLoadTestConfig (Optional): {
+     *             endpointUrl: String (Optional)
+     *             requestsPerSecond: Integer (Optional)
+     *             maxResponseTimeInMs: Integer (Optional)
+     *             virtualUsers: Integer (Optional)
+     *             rampUpTime: Integer (Optional)
+     *             duration: Long (Optional)
+     *         }
+     *         regionalLoadTestConfig (Optional): [
+     *              (Optional){
+     *                 engineInstances: int (Optional, Required on create)
+     *                 region: String (Optional, Required on create)
+     *             }
+     *         ]
+     *     }
+     *     testArtifacts (Optional): {
+     *         inputArtifacts (Optional): {
+     *             configFileInfo (Optional): {
+     *                 fileName: String (Required)
+     *                 url: String (Optional)
+     *                 fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (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)
+     *             urlTestConfigFileInfo (Optional): (recursive schema, see urlTestConfigFileInfo above)
+     *             additionalFileInfo (Optional): [
+     *                 (recursive schema, see above)
+     *             ]
+     *         }
+     *         outputArtifacts (Optional): {
+     *             resultFileInfo (Optional): (recursive schema, see resultFileInfo above)
+     *             logsFileInfo (Optional): (recursive schema, see logsFileInfo above)
+     *             artifactsContainerInfo (Optional): {
+     *                 url: String (Optional)
+     *                 expireDateTime: OffsetDateTime (Optional)
+     *             }
+     *             reportFileInfo (Optional): (recursive schema, see reportFileInfo above)
+     *         }
+     *     }
+     *     testResult: String(PASSED/NOT_APPLICABLE/FAILED) (Optional)
+     *     virtualUsers: Integer (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)
+     *     virtualUserHours: Double (Optional)
+     *     subnetId: String (Optional)
+     *     kind: String(URL/JMX/Locust) (Optional)
+     *     requestDataLevel: String(NONE/ERRORS) (Optional)
+     *     debugLogsEnabled: Boolean (Optional)
+     *     publicIPDisabled: Boolean (Optional)
+     *     createdByType: String(User/ScheduledTrigger/AzurePipelines/GitHubWorkflows) (Optional)
+     *     createdByUri: String (Optional)
+     *     estimatedVirtualUserHours: Double (Optional)
+     *     executionStartDateTime: OffsetDateTime (Optional)
+     *     executionEndDateTime: OffsetDateTime (Optional)
      *     createdDateTime: OffsetDateTime (Optional)
      *     createdBy: String (Optional)
      *     lastModifiedDateTime: OffsetDateTime (Optional)
@@ -80,19 +244,161 @@ public final class LoadTestRunAsyncClient {
      * 
      * {@code
      * {
-     *     testRunId: String (Optional)
-     *     metrics (Optional): {
+     *     testRunId: String (Required)
+     *     passFailCriteria (Optional): {
+     *         passFailMetrics (Optional): {
+     *             String (Required): {
+     *                 clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
+     *                 aggregate: String(count/percentage/avg/p50/p75/p90/p95/p96/p97/p98/p99/p99.9/p99.99/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)
+     *             }
+     *         }
+     *         passFailServerMetrics (Optional): {
+     *             String (Required): {
+     *                 resourceId: String (Optional, Required on create)
+     *                 metricNamespace: String (Optional, Required on create)
+     *                 metricName: String (Optional, Required on create)
+     *                 aggregation: String (Optional, Required on create)
+     *                 condition: String (Optional, Required on create)
+     *                 value: double (Optional, Required on create)
+     *                 action: String(continue/stop) (Optional)
+     *                 actualValue: Double (Optional)
+     *                 result: String(passed/undetermined/failed) (Optional)
+     *             }
+     *         }
+     *     }
+     *     autoStopCriteria (Optional): {
+     *         autoStopDisabled: Boolean (Optional)
+     *         errorRate: Double (Optional)
+     *         errorRateTimeWindowInSeconds: Long (Optional)
+     *         maximumVirtualUsersPerEngine: Integer (Optional)
+     *     }
+     *     secrets (Optional): {
      *         String (Required): {
-     *             id: String (Optional)
-     *             resourceId: String (Optional, Required on create)
-     *             metricNamespace: String (Optional, Required on create)
-     *             displayDescription: String (Optional)
-     *             name: String (Optional, Required on create)
-     *             aggregation: String (Optional, Required on create)
-     *             unit: String (Optional)
-     *             resourceType: String (Optional, Required on create)
+     *             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 (Required)
+     *     }
+     *     errorDetails (Optional): [
+     *          (Optional){
+     *             code: String (Optional)
+     *             message: String (Optional)
+     *             properties (Optional): {
+     *                 String (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
+     *         }
+     *     ]
+     *     testRunStatistics (Optional): {
+     *         String (Required): {
+     *             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)
+     *             pct75ResTime: Double (Optional)
+     *             pct96ResTime: Double (Optional)
+     *             pct97ResTime: Double (Optional)
+     *             pct98ResTime: Double (Optional)
+     *             pct999ResTime: Double (Optional)
+     *             pct9999ResTime: Double (Optional)
+     *             throughput: Double (Optional)
+     *             receivedKBytesPerSec: Double (Optional)
+     *             sentKBytesPerSec: Double (Optional)
+     *         }
+     *     }
+     *     regionalStatistics (Optional): {
+     *         String (Required): (recursive schema, see String above)
+     *     }
+     *     loadTestConfiguration (Optional): {
+     *         engineInstances: Integer (Optional)
+     *         splitAllCSVs: Boolean (Optional)
+     *         quickStartTest: Boolean (Optional)
+     *         optionalLoadTestConfig (Optional): {
+     *             endpointUrl: String (Optional)
+     *             requestsPerSecond: Integer (Optional)
+     *             maxResponseTimeInMs: Integer (Optional)
+     *             virtualUsers: Integer (Optional)
+     *             rampUpTime: Integer (Optional)
+     *             duration: Long (Optional)
+     *         }
+     *         regionalLoadTestConfig (Optional): [
+     *              (Optional){
+     *                 engineInstances: int (Optional, Required on create)
+     *                 region: String (Optional, Required on create)
+     *             }
+     *         ]
+     *     }
+     *     testArtifacts (Optional): {
+     *         inputArtifacts (Optional): {
+     *             configFileInfo (Optional): {
+     *                 fileName: String (Required)
+     *                 url: String (Optional)
+     *                 fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (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)
+     *             urlTestConfigFileInfo (Optional): (recursive schema, see urlTestConfigFileInfo above)
+     *             additionalFileInfo (Optional): [
+     *                 (recursive schema, see above)
+     *             ]
+     *         }
+     *         outputArtifacts (Optional): {
+     *             resultFileInfo (Optional): (recursive schema, see resultFileInfo above)
+     *             logsFileInfo (Optional): (recursive schema, see logsFileInfo above)
+     *             artifactsContainerInfo (Optional): {
+     *                 url: String (Optional)
+     *                 expireDateTime: OffsetDateTime (Optional)
+     *             }
+     *             reportFileInfo (Optional): (recursive schema, see reportFileInfo above)
+     *         }
+     *     }
+     *     testResult: String(PASSED/NOT_APPLICABLE/FAILED) (Optional)
+     *     virtualUsers: Integer (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)
+     *     virtualUserHours: Double (Optional)
+     *     subnetId: String (Optional)
+     *     kind: String(URL/JMX/Locust) (Optional)
+     *     requestDataLevel: String(NONE/ERRORS) (Optional)
+     *     debugLogsEnabled: Boolean (Optional)
+     *     publicIPDisabled: Boolean (Optional)
+     *     createdByType: String(User/ScheduledTrigger/AzurePipelines/GitHubWorkflows) (Optional)
+     *     createdByUri: String (Optional)
+     *     estimatedVirtualUserHours: Double (Optional)
+     *     executionStartDateTime: OffsetDateTime (Optional)
+     *     executionEndDateTime: OffsetDateTime (Optional)
      *     createdDateTime: OffsetDateTime (Optional)
      *     createdBy: String (Optional)
      *     lastModifiedDateTime: OffsetDateTime (Optional)
@@ -100,128 +406,27 @@ public final class LoadTestRunAsyncClient {
      * }
      * }
      * 
- * - * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, + * + * @param testRunId Unique test run identifier for the load test run, must contain only lower-case alphabetic, * numeric, underscore or hyphen characters. - * @param body Server metric configuration model. + * @param body The resource instance. * @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} on successful completion of - * {@link Mono}. + * @return load test run model along with {@link Response} on successful completion of {@link Mono}. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateServerMetricsConfigWithResponse(String testRunId, BinaryData body, + Mono> createOrUpdateTestRunWithResponse(String testRunId, BinaryData body, RequestOptions requestOptions) { - return this.serviceClient.createOrUpdateServerMetricsConfigWithResponseAsync(testRunId, body, requestOptions); - } - - /** - * Starts a test run and polls the status of the test run. - * - * @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 testRunRequestOptions The options to configure the file upload HTTP request before HTTP client sends it. - * @throws ResourceNotFoundException when a test with {@code testId} doesn't exist. - * @return A {@link PollerFlux} to poll on and retrieve the test run - * status(ACCEPTED/NOTSTARTED/PROVISIONING/PROVISIONED/CONFIGURING/CONFIGURED/EXECUTING/EXECUTED/DEPROVISIONING/DEPROVISIONED/DONE/CANCELLING/CANCELLED/FAILED/VALIDATION_SUCCESS/VALIDATION_FAILURE). - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux beginTestRun(String testRunId, BinaryData body, - RequestOptions testRunRequestOptions) { - RequestOptions defaultRequestOptions = new RequestOptions(); - if (testRunRequestOptions != null) { - defaultRequestOptions.setContext(testRunRequestOptions.getContext()); - } - return new PollerFlux<>(Duration.ofSeconds(5), - (context) -> createOrUpdateTestRunWithResponse(testRunId, body, testRunRequestOptions) - .flatMap(FluxUtil::toMono), - (context) -> getTestRunWithResponse(testRunId, defaultRequestOptions).flatMap(FluxUtil::toMono) - .flatMap(testRunBinary -> PollingUtils - .getPollResponseMono(() -> PollingUtils.getTestRunStatus(testRunBinary))), - (activationResponse, context) -> stopTestRunWithResponse(testRunId, defaultRequestOptions) - .flatMap(FluxUtil::toMono), - (context) -> getTestRunWithResponse(testRunId, defaultRequestOptions).flatMap(FluxUtil::toMono)); - } - - /** - * Starts a test run and polls the status of the test run. - * - * @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. - * @throws ResourceNotFoundException when a test with {@code testId} doesn't exist. - * @return A {@link PollerFlux} to poll on and retrieve the test run - * status(ACCEPTED/NOTSTARTED/PROVISIONING/PROVISIONED/CONFIGURING/CONFIGURED/EXECUTING/EXECUTED/DEPROVISIONING/DEPROVISIONED/DONE/CANCELLING/CANCELLED/FAILED/VALIDATION_SUCCESS/VALIDATION_FAILURE). - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux beginTestRun(String testRunId, LoadTestRun body) { - return new PollerFlux<>(Duration.ofSeconds(5), (context) -> createOrUpdateTestRun(testRunId, body), - (context) -> getTestRun(testRunId).flatMap( - testRunBinary -> PollingUtils.getPollResponseMono(() -> PollingUtils.getTestRunStatus(testRunBinary))), - (activationResponse, context) -> stopTestRun(testRunId), (context) -> getTestRun(testRunId)); - } - - /** - * Starts a test profile run and polls the status of the test profile run. - * - * @param testProfileRunId Unique name for the test profile run, must contain only lower-case alphabetic, numeric, - * underscore - * or hyphen characters. - * @param body Test Profile Run model. - * @param testProfileRunRequestOptions The options to configure the file upload HTTP request before HTTP client - * sends it. - * @throws ResourceNotFoundException when a test profile with {@code testProfileId} doesn't exist. - * @return A {@link PollerFlux} to poll on and retrieve the test run - * status(ACCEPTED/NOTSTARTED/EXECUTING/DONE/CANCELLING/CANCELLED/FAILED). - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux beginTestProfileRun(String testProfileRunId, BinaryData body, - RequestOptions testProfileRunRequestOptions) { - RequestOptions defaultRequestOptions = new RequestOptions(); - if (testProfileRunRequestOptions != null) { - defaultRequestOptions.setContext(testProfileRunRequestOptions.getContext()); - } - return new PollerFlux<>(Duration.ofSeconds(5), - (context) -> createOrUpdateTestProfileRunWithResponse(testProfileRunId, body, testProfileRunRequestOptions) - .flatMap(FluxUtil::toMono), - (context) -> getTestRunWithResponse(testProfileRunId, defaultRequestOptions).flatMap(FluxUtil::toMono) - .flatMap(testRunBinary -> PollingUtils - .getPollResponseMono(() -> PollingUtils.getTestRunStatus(testRunBinary))), - (activationResponse, context) -> stopTestRunWithResponse(testProfileRunId, defaultRequestOptions) - .flatMap(FluxUtil::toMono), - (context) -> getTestRunWithResponse(testProfileRunId, defaultRequestOptions).flatMap(FluxUtil::toMono)); - } - - /** - * Starts a test profile run and polls the status of the test profile run. - * - * @param testProfileRunId Unique name for the test profile run, must contain only lower-case alphabetic, numeric, - * underscore - * or hyphen characters. - * @param body Test Profile Run model. - * @throws ResourceNotFoundException when a test profile with {@code testProfileId} doesn't exist. - * @return A {@link PollerFlux} to poll on and retrieve the test run - * status(ACCEPTED/NOTSTARTED/EXECUTING/DONE/CANCELLING/CANCELLED/FAILED). - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public PollerFlux beginTestProfileRun(String testProfileRunId, - TestProfileRun body) { - return new PollerFlux<>(Duration.ofSeconds(5), - (context) -> createOrUpdateTestProfileRun(testProfileRunId, body), - (context) -> getTestProfileRun(testProfileRunId).flatMap(testProfileRunBinary -> PollingUtils - .getPollResponseMono(() -> PollingUtils.getTestProfileRunStatus(testProfileRunBinary))), - (activationResponse, context) -> stopTestProfileRun(testProfileRunId), - (context) -> getTestProfileRun(testProfileRunId)); + return this.serviceClient.createOrUpdateTestRunWithResponseAsync(testRunId, body, requestOptions); } /** * Add an app component to a test run. - * + * * Add an app component to a test run by providing the resource Id, name and type. *

Request Body Schema

* @@ -238,160 +443,16 @@ public PollerFlux beginTestProfileRun(String tes * 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 (Optional, Required on create): {
-     *         String (Required): {
-     *             resourceId: String (Required)
-     *             resourceName: String (Optional, Required on create)
-     *             resourceType: String (Optional, Required on create)
-     *             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 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 run app component along with {@link Response} on successful completion of {@link Mono}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> createOrUpdateAppComponentsWithResponse(String testRunId, BinaryData body, - RequestOptions requestOptions) { - return this.serviceClient.createOrUpdateAppComponentsWithResponseAsync(testRunId, body, requestOptions); - } - - /** - * 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)
+     *     }
+     *     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 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 the response to a metrics query as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listMetrics(String testRunId, String metricName, String metricNamespace, - String timespan, RequestOptions requestOptions) { - if (requestOptions == null) { - requestOptions = new RequestOptions(); - } - // Content-Type header required even though body can be null - requestOptions.setHeader(HttpHeaderName.CONTENT_TYPE, "application/json"); - return this.serviceClient.listMetricsAsync(testRunId, metricName, metricNamespace, timespan, requestOptions); - } - - /** - * Get associated app component (collection of azure resources) for the given test - * run. + * *

Response Body Schema

* *
@@ -416,25 +477,52 @@ public PagedFlux listMetrics(String testRunId, String metricName, St
      * }
      * }
      * 
- * + * * @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 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} on successful completion of {@link Mono}. + * @return test run app component along with {@link Response} on successful completion of {@link Mono}. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getAppComponentsWithResponse(String testRunId, RequestOptions requestOptions) { - return this.serviceClient.getAppComponentsWithResponseAsync(testRunId, requestOptions); + public Mono> createOrUpdateAppComponentsWithResponse(String testRunId, BinaryData body, + RequestOptions requestOptions) { + return this.serviceClient.createOrUpdateAppComponentsWithResponseAsync(testRunId, body, requestOptions); } /** - * Get associated server metrics configuration for the given test run. + * Configure server metrics for a test run. + *

Request Body Schema

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

Response Body Schema

* *
@@ -460,264 +548,109 @@ public Mono> getAppComponentsWithResponse(String testRunId,
      * }
      * }
      * 
- * + * * @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 associated server metrics configuration for the given test run along with {@link Response} on successful - * completion of {@link Mono}. + * @return test run server metrics configuration along with {@link Response} on successful completion of + * {@link Mono}. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getServerMetricsConfigWithResponse(String testRunId, + public Mono> createOrUpdateServerMetricsConfigWithResponse(String testRunId, BinaryData body, RequestOptions requestOptions) { - return this.serviceClient.getServerMetricsConfigWithResponseAsync(testRunId, requestOptions); + return this.serviceClient.createOrUpdateServerMetricsConfigWithResponseAsync(testRunId, body, requestOptions); } /** - * 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)
-     * }
-     * }
-     * 
- * - *

- * Response Body Schema - * + * Delete an existing load test run. + * + * Delete an existing load test run by providing the testRunId. + * + * @param testRunId Unique test run identifier 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> deleteTestRunWithResponse(String testRunId, RequestOptions requestOptions) { + return this.serviceClient.deleteTestRunWithResponseAsync(testRunId, requestOptions); + } + + /** + * Get associated app component (collection of azure resources) for the given test + * run. + *

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)
-     *     }
-     *     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)
+     * {@code
+     * {
+     *     components (Optional, Required on create): {
+     *         String (Required): {
+     *             resourceId: String (Required)
+     *             resourceName: String (Optional, Required on create)
+     *             resourceType: String (Optional, Required on create)
+     *             displayName: String (Optional)
+     *             resourceGroup: String (Optional)
+     *             subscriptionId: String (Optional)
+     *             kind: String (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)
+     *     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} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getAppComponentsWithResponse(String testRunId, RequestOptions requestOptions) { + return this.serviceClient.getAppComponentsWithResponseAsync(testRunId, requestOptions); + } + + /** + * Get associated server metrics configuration for the given test run. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     testRunId: String (Optional)
+     *     metrics (Optional): {
+     *         String (Required): {
+     *             id: String (Optional)
+     *             resourceId: String (Optional, Required on create)
+     *             metricNamespace: String (Optional, Required on create)
+     *             displayDescription: String (Optional)
+     *             name: String (Optional, Required on create)
+     *             aggregation: String (Optional, Required on create)
+     *             unit: String (Optional)
+     *             resourceType: String (Optional, Required on create)
      *         }
      *     }
-     *     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)
@@ -725,21 +658,22 @@ public Mono> getServerMetricsConfigWithResponse(String test
      * }
      * }
      * 
- * - * @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 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 associated server metrics configuration for the given test run along with {@link Response} on successful + * completion of {@link Mono}. */ + @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Mono> createOrUpdateTestRunWithResponse(String testRunId, BinaryData body, + public Mono> getServerMetricsConfigWithResponse(String testRunId, RequestOptions requestOptions) { - return this.serviceClient.createOrUpdateTestRunWithResponseAsync(testRunId, body, requestOptions); + return this.serviceClient.getServerMetricsConfigWithResponseAsync(testRunId, requestOptions); } /** @@ -781,6 +715,7 @@ Mono> createOrUpdateTestRunWithResponse(String testRunId, B * autoStopDisabled: Boolean (Optional) * errorRate: Double (Optional) * errorRateTimeWindowInSeconds: Long (Optional) + * maximumVirtualUsersPerEngine: Integer (Optional) * } * secrets (Optional): { * String (Required): { @@ -798,7 +733,13 @@ Mono> createOrUpdateTestRunWithResponse(String testRunId, B * } * errorDetails (Optional): [ * (Optional){ + * code: String (Optional) * message: String (Optional) + * properties (Optional): { + * String (Required): [ + * String (Required) + * ] + * } * } * ] * testRunStatistics (Optional): { @@ -852,7 +793,7 @@ Mono> createOrUpdateTestRunWithResponse(String testRunId, B * configFileInfo (Optional): { * fileName: String (Required) * url: String (Optional) - * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional) + * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional) * expireDateTime: OffsetDateTime (Optional) * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional) * validationFailureDetails: String (Optional) @@ -892,7 +833,11 @@ Mono> createOrUpdateTestRunWithResponse(String testRunId, B * requestDataLevel: String(NONE/ERRORS) (Optional) * debugLogsEnabled: Boolean (Optional) * publicIPDisabled: Boolean (Optional) - * createdByType: String(User/ScheduledTrigger) (Optional) + * createdByType: String(User/ScheduledTrigger/AzurePipelines/GitHubWorkflows) (Optional) + * createdByUri: String (Optional) + * estimatedVirtualUserHours: Double (Optional) + * executionStartDateTime: OffsetDateTime (Optional) + * executionEndDateTime: OffsetDateTime (Optional) * createdDateTime: OffsetDateTime (Optional) * createdBy: String (Optional) * lastModifiedDateTime: OffsetDateTime (Optional) @@ -900,7 +845,7 @@ Mono> createOrUpdateTestRunWithResponse(String testRunId, B * } * } *
- * + * * @param testRunId Unique test run identifier 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. @@ -917,57 +862,239 @@ public Mono> getTestRunWithResponse(String testRunId, Reque } /** - * Delete an existing load test run. - * - * Delete an existing load test run by providing the testRunId. - * + * Get test run file by file name. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     fileName: String (Required)
+     *     url: String (Optional)
+     *     fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional)
+     *     expireDateTime: OffsetDateTime (Optional)
+     *     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
+     *     validationFailureDetails: String (Optional)
+     * }
+     * }
+     * 
+ * * @param testRunId Unique test run identifier for the load test run, must contain only lower-case alphabetic, * numeric, underscore or hyphen characters. + * @param fileName Name of the file. * @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 test run file by file name along with {@link Response} on successful completion of {@link Mono}. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> deleteTestRunWithResponse(String testRunId, RequestOptions requestOptions) { - return this.serviceClient.deleteTestRunWithResponseAsync(testRunId, requestOptions); + public Mono> getTestRunFileWithResponse(String testRunId, String fileName, + RequestOptions requestOptions) { + return this.serviceClient.getTestRunFileWithResponseAsync(testRunId, fileName, requestOptions); } /** - * Get test run file by file name. + * 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
+     * String
+     * }
+     * 
+ * + * @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 PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listMetricDimensionValues(String testRunId, String name, String metricname, + String metricNamespace, String timespan, RequestOptions requestOptions) { + return this.serviceClient.listMetricDimensionValuesAsync(testRunId, name, metricname, metricNamespace, timespan, + requestOptions); + } + + /** + * 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/Percentile75/Percentile90/Percentile95/Percentile96/Percentile97/Percentile98/Percentile99/Percentile999/Percentile9999) (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} on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getMetricDefinitionsWithResponse(String testRunId, String metricNamespace, + RequestOptions requestOptions) { + return this.serviceClient.getMetricDefinitionsWithResponseAsync(testRunId, metricNamespace, requestOptions); + } + + /** + * 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} on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getMetricNamespacesWithResponse(String testRunId, RequestOptions requestOptions) { + return this.serviceClient.getMetricNamespacesWithResponseAsync(testRunId, requestOptions); + } + + /** + * 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} + *

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
+     * {
+     *     filters (Optional): [
+     *          (Optional){
+     *             name: String (Optional)
+     *             values (Optional): [
+     *                 String (Optional)
+     *             ]
+     *         }
+     *     ]
+     * }
+     * }
+     * 
+ * *

Response Body Schema

* *
      * {@code
      * {
-     *     fileName: String (Required)
-     *     url: String (Optional)
-     *     fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional)
-     *     expireDateTime: OffsetDateTime (Optional)
-     *     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
-     *     validationFailureDetails: String (Optional)
+     *     data (Optional): [
+     *          (Optional){
+     *             timestamp: OffsetDateTime (Optional)
+     *             value: Double (Optional)
+     *         }
+     *     ]
+     *     dimensionValues (Optional): [
+     *          (Optional){
+     *             name: String (Optional)
+     *             value: String (Optional)
+     *         }
+     *     ]
      * }
      * }
      * 
- * - * @param testRunId Unique test run identifier for the load test run, must contain only lower-case alphabetic, + * + * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, * numeric, underscore or hyphen characters. - * @param fileName Name of the file. + * @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 file by file name along with {@link Response} on successful completion of {@link Mono}. + * @return the response to a metrics query as paginated response with {@link PagedFlux}. */ @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getTestRunFileWithResponse(String testRunId, String fileName, - RequestOptions requestOptions) { - return this.serviceClient.getTestRunFileWithResponseAsync(testRunId, fileName, requestOptions); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listMetrics(String testRunId, String metricname, String metricNamespace, + String timespan, RequestOptions requestOptions) { + return this.serviceClient.listMetricsAsync(testRunId, metricname, metricNamespace, timespan, requestOptions); } /** @@ -992,6 +1119,8 @@ public Mono> getTestRunFileWithResponse(String testRunId, S * maxpagesizeIntegerNoNumber of results in response. * createdByTypesList<String>NoComma separated list of type of entities * that have created the test run. In the form of "," separated string. + * testIdsList<String>NoComma-separated list of test IDs. If you are using + * testIds, do not send a value for testId. In the form of "," separated string. * * You can add these to a request with {@link RequestOptions#addQueryParam} *

Response Body Schema

@@ -1031,6 +1160,7 @@ public Mono> getTestRunFileWithResponse(String testRunId, S * autoStopDisabled: Boolean (Optional) * errorRate: Double (Optional) * errorRateTimeWindowInSeconds: Long (Optional) + * maximumVirtualUsersPerEngine: Integer (Optional) * } * secrets (Optional): { * String (Required): { @@ -1048,7 +1178,13 @@ public Mono> getTestRunFileWithResponse(String testRunId, S * } * errorDetails (Optional): [ * (Optional){ + * code: String (Optional) * message: String (Optional) + * properties (Optional): { + * String (Required): [ + * String (Required) + * ] + * } * } * ] * testRunStatistics (Optional): { @@ -1102,7 +1238,7 @@ public Mono> getTestRunFileWithResponse(String testRunId, S * configFileInfo (Optional): { * fileName: String (Required) * url: String (Optional) - * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional) + * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional) * expireDateTime: OffsetDateTime (Optional) * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional) * validationFailureDetails: String (Optional) @@ -1142,7 +1278,11 @@ public Mono> getTestRunFileWithResponse(String testRunId, S * requestDataLevel: String(NONE/ERRORS) (Optional) * debugLogsEnabled: Boolean (Optional) * publicIPDisabled: Boolean (Optional) - * createdByType: String(User/ScheduledTrigger) (Optional) + * createdByType: String(User/ScheduledTrigger/AzurePipelines/GitHubWorkflows) (Optional) + * createdByUri: String (Optional) + * estimatedVirtualUserHours: Double (Optional) + * executionStartDateTime: OffsetDateTime (Optional) + * executionEndDateTime: OffsetDateTime (Optional) * createdDateTime: OffsetDateTime (Optional) * createdBy: String (Optional) * lastModifiedDateTime: OffsetDateTime (Optional) @@ -1150,7 +1290,7 @@ public Mono> getTestRunFileWithResponse(String testRunId, S * } * } *
- * + * * @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. @@ -1203,6 +1343,7 @@ public PagedFlux listTestRuns(RequestOptions requestOptions) { * autoStopDisabled: Boolean (Optional) * errorRate: Double (Optional) * errorRateTimeWindowInSeconds: Long (Optional) + * maximumVirtualUsersPerEngine: Integer (Optional) * } * secrets (Optional): { * String (Required): { @@ -1220,7 +1361,13 @@ public PagedFlux listTestRuns(RequestOptions requestOptions) { * } * errorDetails (Optional): [ * (Optional){ + * code: String (Optional) * message: String (Optional) + * properties (Optional): { + * String (Required): [ + * String (Required) + * ] + * } * } * ] * testRunStatistics (Optional): { @@ -1274,7 +1421,7 @@ public PagedFlux listTestRuns(RequestOptions requestOptions) { * configFileInfo (Optional): { * fileName: String (Required) * url: String (Optional) - * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional) + * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional) * expireDateTime: OffsetDateTime (Optional) * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional) * validationFailureDetails: String (Optional) @@ -1314,7 +1461,11 @@ public PagedFlux listTestRuns(RequestOptions requestOptions) { * requestDataLevel: String(NONE/ERRORS) (Optional) * debugLogsEnabled: Boolean (Optional) * publicIPDisabled: Boolean (Optional) - * createdByType: String(User/ScheduledTrigger) (Optional) + * createdByType: String(User/ScheduledTrigger/AzurePipelines/GitHubWorkflows) (Optional) + * createdByUri: String (Optional) + * estimatedVirtualUserHours: Double (Optional) + * executionStartDateTime: OffsetDateTime (Optional) + * executionEndDateTime: OffsetDateTime (Optional) * createdDateTime: OffsetDateTime (Optional) * createdBy: String (Optional) * lastModifiedDateTime: OffsetDateTime (Optional) @@ -1322,7 +1473,7 @@ public PagedFlux listTestRuns(RequestOptions requestOptions) { * } * } * - * + * * @param testRunId Unique test run identifier 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. @@ -1338,104 +1489,9 @@ public Mono> stopTestRunWithResponse(String testRunId, Requ return this.serviceClient.stopTestRunWithResponseAsync(testRunId, requestOptions); } - /** - * 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} on successful completion of - * {@link Mono}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getMetricNamespacesWithResponse(String testRunId, RequestOptions requestOptions) { - return this.serviceClient.getMetricNamespacesWithResponseAsync(testRunId, requestOptions); - } - - /** - * 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/Percentile75/Percentile90/Percentile95/Percentile96/Percentile97/Percentile98/Percentile99/Percentile999/Percentile9999) (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} on successful completion of - * {@link Mono}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getMetricDefinitionsWithResponse(String testRunId, String metricNamespace, - RequestOptions requestOptions) { - return this.serviceClient.getMetricDefinitionsWithResponseAsync(testRunId, metricNamespace, requestOptions); - } - - /** - * Initializes an instance of LoadTestRunAsyncClient class. - * - * @param serviceClient the service client implementation. - */ - @Generated - LoadTestRunAsyncClient(LoadTestRunClientImpl serviceClient) { - this.serviceClient = serviceClient; - } - /** * Create and start a new test profile run. - * + * * Create and start a new test profile run with the given test profile run Id. *

Request Body Schema

* @@ -1453,7 +1509,13 @@ public Mono> getMetricDefinitionsWithResponse(String testRu * status: String(ACCEPTED/NOTSTARTED/EXECUTING/DONE/CANCELLING/CANCELLED/FAILED) (Optional) * errorDetails (Optional): [ * (Optional){ + * code: String (Optional) * message: String (Optional) + * properties (Optional): { + * String (Required): [ + * String (Required) + * ] + * } * } * ] * startDateTime: OffsetDateTime (Optional) @@ -1500,7 +1562,13 @@ public Mono> getMetricDefinitionsWithResponse(String testRu * status: String(ACCEPTED/NOTSTARTED/EXECUTING/DONE/CANCELLING/CANCELLED/FAILED) (Optional) * errorDetails (Optional): [ * (Optional){ + * code: String (Optional) * message: String (Optional) + * properties (Optional): { + * String (Required): [ + * String (Required) + * ] + * } * } * ] * startDateTime: OffsetDateTime (Optional) @@ -1530,7 +1598,7 @@ public Mono> getMetricDefinitionsWithResponse(String testRu * } * } * - * + * * @param testProfileRunId Unique identifier for the test profile run, must contain only lower-case alphabetic, * numeric, underscore or hyphen characters. * @param body The resource instance. @@ -1550,9 +1618,9 @@ Mono> createOrUpdateTestProfileRunWithResponse(String testP /** * Delete an existing load test profile run. - * + * * Delete an existing load test profile run by providing the test profile run Id. - * + * * @param testProfileRunId Unique identifier for the test profile 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. @@ -1571,7 +1639,7 @@ public Mono> deleteTestProfileRunWithResponse(String testProfileR /** * Get test profile run details. - * + * * Get test profile run details by test profile run Id. *

Response Body Schema

* @@ -1589,7 +1657,13 @@ public Mono> deleteTestProfileRunWithResponse(String testProfileR * status: String(ACCEPTED/NOTSTARTED/EXECUTING/DONE/CANCELLING/CANCELLED/FAILED) (Optional) * errorDetails (Optional): [ * (Optional){ + * code: String (Optional) * message: String (Optional) + * properties (Optional): { + * String (Required): [ + * String (Required) + * ] + * } * } * ] * startDateTime: OffsetDateTime (Optional) @@ -1619,7 +1693,7 @@ public Mono> deleteTestProfileRunWithResponse(String testProfileR * } * } * - * + * * @param testProfileRunId Unique identifier for the test profile 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. @@ -1628,7 +1702,7 @@ public Mono> deleteTestProfileRunWithResponse(String testProfileR * @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 profile run details. - * + * * Get test profile run details by test profile run Id along with {@link Response} on successful completion of * {@link Mono}. */ @@ -1641,7 +1715,7 @@ public Mono> getTestProfileRunWithResponse(String testProfi /** * List test profile runs. - * + * * Get all test profile runs for the given filters. *

Query Parameters

* @@ -1685,7 +1759,13 @@ public Mono> getTestProfileRunWithResponse(String testProfi * status: String(ACCEPTED/NOTSTARTED/EXECUTING/DONE/CANCELLING/CANCELLED/FAILED) (Optional) * errorDetails (Optional): [ * (Optional){ + * code: String (Optional) * message: String (Optional) + * properties (Optional): { + * String (Required): [ + * String (Required) + * ] + * } * } * ] * startDateTime: OffsetDateTime (Optional) @@ -1715,7 +1795,7 @@ public Mono> getTestProfileRunWithResponse(String testProfi * } * } * - * + * * @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. @@ -1731,7 +1811,7 @@ public PagedFlux listTestProfileRuns(RequestOptions requestOptions) /** * Stop test profile run. - * + * * Stop test profile run for the given test profile run Id. *

Response Body Schema

* @@ -1749,7 +1829,13 @@ public PagedFlux listTestProfileRuns(RequestOptions requestOptions) * status: String(ACCEPTED/NOTSTARTED/EXECUTING/DONE/CANCELLING/CANCELLED/FAILED) (Optional) * errorDetails (Optional): [ * (Optional){ + * code: String (Optional) * message: String (Optional) + * properties (Optional): { + * String (Required): [ + * String (Required) + * ] + * } * } * ] * startDateTime: OffsetDateTime (Optional) @@ -1779,28 +1865,229 @@ public PagedFlux listTestProfileRuns(RequestOptions requestOptions) * } * } * - * - * @param testProfileRunId Unique identifier for the test profile run, must contain only lower-case alphabetic, + * + * @param testProfileRunId Unique identifier for the test profile 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 Profile Run model along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> stopTestProfileRunWithResponse(String testProfileRunId, + RequestOptions requestOptions) { + return this.serviceClient.stopTestProfileRunWithResponseAsync(testProfileRunId, requestOptions); + } + + /** + * Get the latest insights for the test run. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     columns (Optional): [
+     *          (Optional){
+     *             name: String (Required)
+     *             dataType: String (Required)
+     *         }
+     *     ]
+     *     rows (Optional): {
+     *         String (Required): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     version: Long (Optional)
+     *     status: String(NotStarted/Running/Succeeded/Failed/Canceled) (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 the latest insights for the test run along with {@link Response} on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getLatestTestRunInsightsWithResponse(String testRunId, + RequestOptions requestOptions) { + return this.serviceClient.getLatestTestRunInsightsWithResponseAsync(testRunId, requestOptions); + } + + /** + * Update the latest insights for the test run. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     columns (Optional): [
+     *          (Optional){
+     *             name: String (Required)
+     *             dataType: String (Required)
+     *         }
+     *     ]
+     *     rows (Optional): {
+     *         String (Required): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     version: Long (Optional)
+     *     status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     columns (Optional): [
+     *          (Optional){
+     *             name: String (Required)
+     *             dataType: String (Required)
+     *         }
+     *     ]
+     *     rows (Optional): {
+     *         String (Required): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     version: Long (Optional)
+     *     status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Optional)
+     * }
+     * }
+     * 
+ * + * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, + * numeric, underscore or hyphen characters. + * @param body Test run insights 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 represents insights for the test run along with {@link Response} on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> updateLatestTestRunInsightsWithResponse(String testRunId, BinaryData body, + RequestOptions requestOptions) { + return this.serviceClient.updateLatestTestRunInsightsWithResponseAsync(testRunId, body, requestOptions); + } + + /** + * Generate insights for the test run. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     id: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required)
+     *     kind: String(CloneTest/GenerateTestRunInsights/TestPlanRecommendations) (Required)
+     *     error (Optional): {
+     *         error (Required): (recursive schema, see error above)
+     *     }
+     * }
+     * }
+     * 
+ * + * @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 Profile Run model along with {@link Response} on successful completion of {@link Mono}. + * @return the {@link PollerFlux} for polling of status of a long running operation. */ @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> stopTestProfileRunWithResponse(String testProfileRunId, + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux beginGenerateTestRunInsights(String testRunId, RequestOptions requestOptions) { - return this.serviceClient.stopTestProfileRunWithResponseAsync(testProfileRunId, requestOptions); + return this.serviceClient.beginGenerateTestRunInsightsAsync(testRunId, requestOptions); + } + + /** + * Create and start a new test run with the given test run Id. + * + * @param testRunId Unique test run identifier for the load test run, must contain only lower-case alphabetic, + * numeric, underscore or hyphen characters. + * @param body The resource instance. + * @param oldTestRunId Existing 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return load test run model on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono createOrUpdateTestRun(String testRunId, LoadTestRun body, String oldTestRunId) { + // Generated convenience method for createOrUpdateTestRunWithResponse + RequestOptions requestOptions = new RequestOptions(); + if (oldTestRunId != null) { + requestOptions.addQueryParam("oldTestRunId", oldTestRunId, false); + } + JsonMergePatchHelper.getLoadTestRunAccessor().prepareModelForJsonMergePatch(body, true); + BinaryData bodyInBinaryData = BinaryData.fromObject(body); + // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization. + bodyInBinaryData.getLength(); + JsonMergePatchHelper.getLoadTestRunAccessor().prepareModelForJsonMergePatch(body, false); + return createOrUpdateTestRunWithResponse(testRunId, bodyInBinaryData, requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(LoadTestRun.class)); + } + + /** + * Create and start a new test run with the given test run Id. + * + * @param testRunId Unique test run identifier for the load test run, must contain only lower-case alphabetic, + * numeric, underscore or hyphen characters. + * @param body The resource instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return load test run model on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Mono createOrUpdateTestRun(String testRunId, LoadTestRun body) { + // Generated convenience method for createOrUpdateTestRunWithResponse + RequestOptions requestOptions = new RequestOptions(); + JsonMergePatchHelper.getLoadTestRunAccessor().prepareModelForJsonMergePatch(body, true); + BinaryData bodyInBinaryData = BinaryData.fromObject(body); + // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization. + bodyInBinaryData.getLength(); + JsonMergePatchHelper.getLoadTestRunAccessor().prepareModelForJsonMergePatch(body, false); + return createOrUpdateTestRunWithResponse(testRunId, bodyInBinaryData, requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(LoadTestRun.class)); } /** * Add an app component to a test run. - * + * * Add an app component to a test run by providing the resource Id, name and type. - * + * * @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. @@ -1827,11 +2114,41 @@ public Mono createOrUpdateAppComponents(String testRunId, .map(protocolMethodData -> protocolMethodData.toObject(TestRunAppComponents.class)); } + /** + * Configure server metrics for a test run. + * + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return test run server metrics configuration on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createOrUpdateServerMetricsConfig(String testRunId, + TestRunServerMetricsConfiguration body) { + // Generated convenience method for createOrUpdateServerMetricsConfigWithResponse + RequestOptions requestOptions = new RequestOptions(); + JsonMergePatchHelper.getTestRunServerMetricsConfigurationAccessor().prepareModelForJsonMergePatch(body, true); + BinaryData bodyInBinaryData = BinaryData.fromObject(body); + // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization. + bodyInBinaryData.getLength(); + JsonMergePatchHelper.getTestRunServerMetricsConfigurationAccessor().prepareModelForJsonMergePatch(body, false); + return createOrUpdateServerMetricsConfigWithResponse(testRunId, bodyInBinaryData, requestOptions) + .flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(TestRunServerMetricsConfiguration.class)); + } + /** * Delete an existing load test run. - * + * * Delete an existing load test run by providing the testRunId. - * + * * @param testRunId Unique test run identifier for the load test run, must contain only lower-case alphabetic, * numeric, underscore or hyphen characters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1853,7 +2170,7 @@ public Mono deleteTestRun(String testRunId) { /** * Get associated app component (collection of azure resources) for the given test * run. - * + * * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, * numeric, underscore or hyphen characters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1876,7 +2193,7 @@ public Mono getAppComponents(String testRunId) { /** * Get associated server metrics configuration for the given test run. - * + * * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, * numeric, underscore or hyphen characters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1898,7 +2215,7 @@ public Mono getServerMetricsConfig(String tes /** * Get test run details by test run Id. - * + * * @param testRunId Unique test run identifier for the load test run, must contain only lower-case alphabetic, * numeric, underscore or hyphen characters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1920,7 +2237,7 @@ public Mono getTestRun(String testRunId) { /** * Get test run file by file name. - * + * * @param testRunId Unique test run identifier for the load test run, must contain only lower-case alphabetic, * numeric, underscore or hyphen characters. * @param fileName Name of the file. @@ -1943,7 +2260,7 @@ public Mono getTestRunFile(String testRunId, String fileName) { /** * List the dimension values for the given metric dimension name. - * + * * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, * numeric, underscore or hyphen characters. * @param name Dimension name. @@ -1987,7 +2304,7 @@ public PagedFlux listMetricDimensionValues(String testRunId, String name /** * List the dimension values for the given metric dimension name. - * + * * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, * numeric, underscore or hyphen characters. * @param name Dimension name. @@ -2027,7 +2344,7 @@ public PagedFlux listMetricDimensionValues(String testRunId, String name /** * List the metric definitions for a load test run. - * + * * @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. @@ -2050,7 +2367,7 @@ public Mono getMetricDefinitions(String testRunId, String met /** * List the metric namespaces for a load test run. - * + * * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, * numeric, underscore or hyphen characters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2070,9 +2387,175 @@ public Mono getMetricNamespaces(String testRunId) { .map(protocolMethodData -> protocolMethodData.toObject(MetricNamespaces.class)); } + /** + * List the metric values for a load test run. + * + * @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 aggregation The aggregation. + * @param interval The interval (i.e. timegrain) of the query. + * @param body Metric dimension filter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response to a metrics query as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listMetrics(String testRunId, String metricname, String metricNamespace, + String timespan, String aggregation, TimeGrain interval, MetricsFilters body) { + // Generated convenience method for listMetrics + RequestOptions requestOptions = new RequestOptions(); + if (aggregation != null) { + requestOptions.addQueryParam("aggregation", aggregation, false); + } + if (interval != null) { + requestOptions.addQueryParam("interval", interval.toString(), false); + } + if (body != null) { + requestOptions.setBody(BinaryData.fromObject(body)); + } + PagedFlux pagedFluxResponse + = listMetrics(testRunId, metricname, metricNamespace, timespan, requestOptions); + return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> { + Flux> flux = (continuationTokenParam == null) + ? pagedFluxResponse.byPage().take(1) + : pagedFluxResponse.byPage(continuationTokenParam).take(1); + return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(), + pagedResponse.getStatusCode(), pagedResponse.getHeaders(), + pagedResponse.getValue() + .stream() + .map(protocolMethodData -> protocolMethodData.toObject(TimeSeriesElement.class)) + .collect(Collectors.toList()), + pagedResponse.getContinuationToken(), null)); + }); + } + + /** + * List the metric values for a load test run. + * + * @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'. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response to a metrics query as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listMetrics(String testRunId, String metricname, String metricNamespace, + String timespan) { + // Generated convenience method for listMetrics + RequestOptions requestOptions = new RequestOptions(); + PagedFlux pagedFluxResponse + = listMetrics(testRunId, metricname, metricNamespace, timespan, requestOptions); + return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> { + Flux> flux = (continuationTokenParam == null) + ? pagedFluxResponse.byPage().take(1) + : pagedFluxResponse.byPage(continuationTokenParam).take(1); + return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(), + pagedResponse.getStatusCode(), pagedResponse.getHeaders(), + pagedResponse.getValue() + .stream() + .map(protocolMethodData -> protocolMethodData.toObject(TimeSeriesElement.class)) + .collect(Collectors.toList()), + pagedResponse.getContinuationToken(), null)); + }); + } + + /** + * Get all test runs for the given filters. + * + * @param orderBy Sort on the supported fields in (field asc/desc) format. eg: executedDateTime + * asc. Supported fields - executedDateTime. + * @param search Prefix 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. + * @param testId Unique name of an existing load test. + * @param executionFrom Start DateTime(RFC 3339 literal format) of test-run execution time filter range. + * @param executionTo End DateTime(RFC 3339 literal format) of test-run execution time filter range. + * @param status Comma separated list of test run status. + * @param createdByTypes Comma separated list of type of entities that have created the test run. + * @param testIds Comma-separated list of test IDs. If you are using testIds, do not send a value for testId. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all test runs for the given filters as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listTestRuns(String orderBy, String search, String testId, + OffsetDateTime executionFrom, OffsetDateTime executionTo, String status, List createdByTypes, + List testIds) { + // Generated convenience method for listTestRuns + RequestOptions requestOptions = new RequestOptions(); + if (orderBy != null) { + requestOptions.addQueryParam("orderby", orderBy, false); + } + if (search != null) { + requestOptions.addQueryParam("search", search, false); + } + if (testId != null) { + requestOptions.addQueryParam("testId", testId, false); + } + if (executionFrom != null) { + requestOptions.addQueryParam("executionFrom", String.valueOf(executionFrom), false); + } + if (executionTo != null) { + requestOptions.addQueryParam("executionTo", String.valueOf(executionTo), false); + } + if (status != null) { + requestOptions.addQueryParam("status", status, false); + } + if (createdByTypes != null) { + requestOptions.addQueryParam("createdByTypes", + createdByTypes.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")), + false); + } + if (testIds != null) { + requestOptions.addQueryParam("testIds", + testIds.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")), + false); + } + PagedFlux pagedFluxResponse = listTestRuns(requestOptions); + return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> { + Flux> flux = (continuationTokenParam == null) + ? pagedFluxResponse.byPage().take(1) + : pagedFluxResponse.byPage(continuationTokenParam).take(1); + return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(), + pagedResponse.getStatusCode(), pagedResponse.getHeaders(), + pagedResponse.getValue() + .stream() + .map(protocolMethodData -> protocolMethodData.toObject(LoadTestRun.class)) + .collect(Collectors.toList()), + pagedResponse.getContinuationToken(), null)); + }); + } + /** * Get all test runs for the given filters. - * + * * @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. @@ -2102,7 +2585,7 @@ public PagedFlux listTestRuns() { /** * Stop test run by test run Id. - * + * * @param testRunId Unique test run identifier for the load test run, must contain only lower-case alphabetic, * numeric, underscore or hyphen characters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2124,9 +2607,9 @@ public Mono stopTestRun(String testRunId) { /** * Create and start a new test profile run. - * + * * Create and start a new test profile run with the given test profile run Id. - * + * * @param testProfileRunId Unique identifier for the test profile run, must contain only lower-case alphabetic, * numeric, underscore or hyphen characters. * @param body The resource instance. @@ -2155,9 +2638,9 @@ Mono createOrUpdateTestProfileRun(String testProfileRunId, TestP /** * Delete an existing load test profile run. - * + * * Delete an existing load test profile run by providing the test profile run Id. - * + * * @param testProfileRunId Unique identifier for the test profile run, must contain only lower-case alphabetic, * numeric, underscore or hyphen characters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2178,9 +2661,9 @@ public Mono deleteTestProfileRun(String testProfileRunId) { /** * Get test profile run details. - * + * * Get test profile run details by test profile run Id. - * + * * @param testProfileRunId Unique identifier for the test profile run, must contain only lower-case alphabetic, * numeric, underscore or hyphen characters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2190,7 +2673,7 @@ public Mono deleteTestProfileRun(String testProfileRunId) { * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return test profile run details. - * + * * Get test profile run details by test profile run Id on successful completion of {@link Mono}. */ @Generated @@ -2204,105 +2687,9 @@ public Mono getTestProfileRun(String testProfileRunId) { /** * List test profile runs. - * - * Get all test profile runs for the given filters. - * - * @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. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of TestProfileRun items as paginated response with {@link PagedFlux}. - */ - @Generated - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listTestProfileRuns() { - // Generated convenience method for listTestProfileRuns - RequestOptions requestOptions = new RequestOptions(); - PagedFlux pagedFluxResponse = listTestProfileRuns(requestOptions); - return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> { - Flux> flux = (continuationTokenParam == null) - ? pagedFluxResponse.byPage().take(1) - : pagedFluxResponse.byPage(continuationTokenParam).take(1); - return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(), - pagedResponse.getStatusCode(), pagedResponse.getHeaders(), - pagedResponse.getValue() - .stream() - .map(protocolMethodData -> protocolMethodData.toObject(TestProfileRun.class)) - .collect(Collectors.toList()), - pagedResponse.getContinuationToken(), null)); - }); - } - - /** - * Stop test profile run. - * - * Stop test profile run for the given test profile run Id. - * - * @param testProfileRunId Unique identifier for the test profile run, must contain only lower-case alphabetic, - * numeric, underscore or hyphen characters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return test Profile Run model on successful completion of {@link Mono}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono stopTestProfileRun(String testProfileRunId) { - // Generated convenience method for stopTestProfileRunWithResponse - RequestOptions requestOptions = new RequestOptions(); - return stopTestProfileRunWithResponse(testProfileRunId, requestOptions).flatMap(FluxUtil::toMono) - .map(protocolMethodData -> protocolMethodData.toObject(TestProfileRun.class)); - } - - /** - * 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
-     * String
-     * }
-     * 
- * - * @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 PagedFlux}. - */ - @Generated - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listMetricDimensionValues(String testRunId, String name, String metricname, - String metricNamespace, String timespan, RequestOptions requestOptions) { - return this.serviceClient.listMetricDimensionValuesAsync(testRunId, name, metricname, metricNamespace, timespan, - requestOptions); - } - - /** - * List test profile runs. - * * Get all test profile runs for the given filters. - * + * * @param minStartDateTime Minimum Start DateTime(RFC 3339 literal format) of the test profile runs to filter on. * @param maxStartDateTime Maximum Start DateTime(RFC 3339 literal format) of the test profile runs to filter on. * @param minEndDateTime Minimum End DateTime(RFC 3339 literal format) of the test profile runs to filter on. @@ -2386,162 +2773,130 @@ public PagedFlux listTestProfileRuns(OffsetDateTime minStartDate } /** - * Configure server metrics for a test run. - * - * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, + * List test profile runs. + * + * Get all test profile runs for the given filters. + * + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of TestProfileRun items as paginated response with {@link PagedFlux}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listTestProfileRuns() { + // Generated convenience method for listTestProfileRuns + RequestOptions requestOptions = new RequestOptions(); + PagedFlux pagedFluxResponse = listTestProfileRuns(requestOptions); + return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> { + Flux> flux = (continuationTokenParam == null) + ? pagedFluxResponse.byPage().take(1) + : pagedFluxResponse.byPage(continuationTokenParam).take(1); + return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(), + pagedResponse.getStatusCode(), pagedResponse.getHeaders(), + pagedResponse.getValue() + .stream() + .map(protocolMethodData -> protocolMethodData.toObject(TestProfileRun.class)) + .collect(Collectors.toList()), + pagedResponse.getContinuationToken(), null)); + }); + } + + /** + * Stop test profile run. + * + * Stop test profile run for the given test profile run Id. + * + * @param testProfileRunId Unique identifier for the test profile run, must contain only lower-case alphabetic, * numeric, underscore or hyphen characters. - * @param body Server metric configuration model. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return test run server metrics configuration on successful completion of {@link Mono}. + * @return test Profile Run model on successful completion of {@link Mono}. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createOrUpdateServerMetricsConfig(String testRunId, - TestRunServerMetricsConfiguration body) { - // Generated convenience method for createOrUpdateServerMetricsConfigWithResponse + public Mono stopTestProfileRun(String testProfileRunId) { + // Generated convenience method for stopTestProfileRunWithResponse RequestOptions requestOptions = new RequestOptions(); - JsonMergePatchHelper.getTestRunServerMetricsConfigurationAccessor().prepareModelForJsonMergePatch(body, true); - BinaryData bodyInBinaryData = BinaryData.fromObject(body); - // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization. - bodyInBinaryData.getLength(); - JsonMergePatchHelper.getTestRunServerMetricsConfigurationAccessor().prepareModelForJsonMergePatch(body, false); - return createOrUpdateServerMetricsConfigWithResponse(testRunId, bodyInBinaryData, requestOptions) - .flatMap(FluxUtil::toMono) - .map(protocolMethodData -> protocolMethodData.toObject(TestRunServerMetricsConfiguration.class)); + return stopTestProfileRunWithResponse(testProfileRunId, requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(TestProfileRun.class)); } /** - * Create and start a new test run with the given test run Id. - * - * @param testRunId Unique test run identifier for the load test run, must contain only lower-case alphabetic, + * Get the latest insights for the test run. + * + * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, * numeric, underscore or hyphen characters. - * @param body The resource instance. - * @param oldTestRunId Existing 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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return load test run model on successful completion of {@link Mono}. + * @return the latest insights for the test run on successful completion of {@link Mono}. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateTestRun(String testRunId, LoadTestRun body, String oldTestRunId) { - // Generated convenience method for createOrUpdateTestRunWithResponse + public Mono getLatestTestRunInsights(String testRunId) { + // Generated convenience method for getLatestTestRunInsightsWithResponse RequestOptions requestOptions = new RequestOptions(); - if (oldTestRunId != null) { - requestOptions.addQueryParam("oldTestRunId", oldTestRunId, false); - } - JsonMergePatchHelper.getLoadTestRunAccessor().prepareModelForJsonMergePatch(body, true); - BinaryData bodyInBinaryData = BinaryData.fromObject(body); - // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization. - bodyInBinaryData.getLength(); - JsonMergePatchHelper.getLoadTestRunAccessor().prepareModelForJsonMergePatch(body, false); - return createOrUpdateTestRunWithResponse(testRunId, bodyInBinaryData, requestOptions).flatMap(FluxUtil::toMono) - .map(protocolMethodData -> protocolMethodData.toObject(LoadTestRun.class)); + return getLatestTestRunInsightsWithResponse(testRunId, requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(TestRunInsights.class)); } /** - * Create and start a new test run with the given test run Id. - * - * @param testRunId Unique test run identifier for the load test run, must contain only lower-case alphabetic, + * Update the latest insights for the test run. + * + * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, * numeric, underscore or hyphen characters. - * @param body The resource instance. + * @param body Test run insights model. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return load test run model on successful completion of {@link Mono}. + * @return represents insights for the test run on successful completion of {@link Mono}. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Mono createOrUpdateTestRun(String testRunId, LoadTestRun body) { - // Generated convenience method for createOrUpdateTestRunWithResponse + public Mono updateLatestTestRunInsights(String testRunId, TestRunInsights body) { + // Generated convenience method for updateLatestTestRunInsightsWithResponse RequestOptions requestOptions = new RequestOptions(); - JsonMergePatchHelper.getLoadTestRunAccessor().prepareModelForJsonMergePatch(body, true); + JsonMergePatchHelper.getTestRunInsightsAccessor().prepareModelForJsonMergePatch(body, true); BinaryData bodyInBinaryData = BinaryData.fromObject(body); // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization. bodyInBinaryData.getLength(); - JsonMergePatchHelper.getLoadTestRunAccessor().prepareModelForJsonMergePatch(body, false); - return createOrUpdateTestRunWithResponse(testRunId, bodyInBinaryData, requestOptions).flatMap(FluxUtil::toMono) - .map(protocolMethodData -> protocolMethodData.toObject(LoadTestRun.class)); + JsonMergePatchHelper.getTestRunInsightsAccessor().prepareModelForJsonMergePatch(body, false); + return updateLatestTestRunInsightsWithResponse(testRunId, bodyInBinaryData, requestOptions) + .flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(TestRunInsights.class)); } /** - * Get all test runs for the given filters. - * - * @param orderBy Sort on the supported fields in (field asc/desc) format. eg: executedDateTime - * asc. Supported fields - executedDateTime. - * @param search Prefix 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. - * @param testId Unique name of an existing load test. - * @param executionFrom Start DateTime(RFC 3339 literal format) of test-run execution time filter range. - * @param executionTo End DateTime(RFC 3339 literal format) of test-run execution time filter range. - * @param status Comma separated list of test run status. - * @param createdByTypes Comma separated list of type of entities that have created the test run. + * Generate insights for the test run. + * + * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, + * numeric, underscore or hyphen characters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all test runs for the given filters as paginated response with {@link PagedFlux}. + * @return the {@link PollerFlux} for polling of status of a long running operation. */ @Generated - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedFlux listTestRuns(String orderBy, String search, String testId, - OffsetDateTime executionFrom, OffsetDateTime executionTo, String status, List createdByTypes) { - // Generated convenience method for listTestRuns + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux beginGenerateTestRunInsights(String testRunId) { + // Generated convenience method for beginGenerateTestRunInsightsWithModel RequestOptions requestOptions = new RequestOptions(); - if (orderBy != null) { - requestOptions.addQueryParam("orderby", orderBy, false); - } - if (search != null) { - requestOptions.addQueryParam("search", search, false); - } - if (testId != null) { - requestOptions.addQueryParam("testId", testId, false); - } - if (executionFrom != null) { - requestOptions.addQueryParam("executionFrom", String.valueOf(executionFrom), false); - } - if (executionTo != null) { - requestOptions.addQueryParam("executionTo", String.valueOf(executionTo), false); - } - if (status != null) { - requestOptions.addQueryParam("status", status, false); - } - if (createdByTypes != null) { - requestOptions.addQueryParam("createdByTypes", - createdByTypes.stream() - .map(paramItemValue -> Objects.toString(paramItemValue, "")) - .collect(Collectors.joining(",")), - false); - } - PagedFlux pagedFluxResponse = listTestRuns(requestOptions); - return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> { - Flux> flux = (continuationTokenParam == null) - ? pagedFluxResponse.byPage().take(1) - : pagedFluxResponse.byPage(continuationTokenParam).take(1); - return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(), - pagedResponse.getStatusCode(), pagedResponse.getHeaders(), - pagedResponse.getValue() - .stream() - .map(protocolMethodData -> protocolMethodData.toObject(LoadTestRun.class)) - .collect(Collectors.toList()), - pagedResponse.getContinuationToken(), null)); - }); + return serviceClient.beginGenerateTestRunInsightsWithModelAsync(testRunId, requestOptions); } } 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 cc39a00a470b..73cbeecbdee5 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 @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting; import com.azure.core.annotation.Generated; @@ -11,7 +12,6 @@ import com.azure.core.exception.HttpResponseException; import com.azure.core.exception.ResourceModifiedException; import com.azure.core.exception.ResourceNotFoundException; -import com.azure.core.http.HttpHeaderName; import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.RequestOptions; import com.azure.core.http.rest.Response; @@ -22,12 +22,14 @@ import com.azure.developer.loadtesting.models.LoadTestRun; import com.azure.developer.loadtesting.models.MetricDefinitions; import com.azure.developer.loadtesting.models.MetricNamespaces; +import com.azure.developer.loadtesting.models.MetricsFilters; import com.azure.developer.loadtesting.models.TestProfileRun; import com.azure.developer.loadtesting.models.TestRunAppComponents; import com.azure.developer.loadtesting.models.TestRunFileInfo; +import com.azure.developer.loadtesting.models.TestRunInsights; import com.azure.developer.loadtesting.models.TestRunServerMetricsConfiguration; import com.azure.developer.loadtesting.models.TimeGrain; -import java.time.Duration; +import com.azure.developer.loadtesting.models.TimeSeriesElement; import java.time.OffsetDateTime; import java.util.List; import java.util.Objects; @@ -38,328 +40,192 @@ */ @ServiceClient(builder = LoadTestRunClientBuilder.class) public final class LoadTestRunClient { + @Generated + private final LoadTestRunClientImpl serviceClient; /** - * Configure server metrics for a test run. - *

Request Body Schema

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

Response Body Schema

+ * Initializes an instance of LoadTestRunClient class. * - *
-     * {@code
-     * {
-     *     testRunId: String (Optional)
-     *     metrics (Optional): {
-     *         String (Required): {
-     *             id: String (Optional)
-     *             resourceId: String (Optional, Required on create)
-     *             metricNamespace: String (Optional, Required on create)
-     *             displayDescription: String (Optional)
-     *             name: String (Optional, Required on create)
-     *             aggregation: String (Optional, Required on create)
-     *             unit: String (Optional)
-     *             resourceType: String (Optional, Required on create)
-     *         }
-     *     }
-     *     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}. + * @param serviceClient the service client implementation. */ @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateServerMetricsConfigWithResponse(String testRunId, BinaryData body, - RequestOptions requestOptions) { - return this.serviceClient.createOrUpdateServerMetricsConfigWithResponse(testRunId, body, requestOptions); - } - - /** - * Starts a test run and polls the status of the test run. - * - * @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 testRunRequestOptions The options to configure the file upload HTTP request before HTTP client sends it. - * @return A {@link SyncPoller} to poll on and retrieve the test run - * status(ACCEPTED/NOTSTARTED/PROVISIONING/PROVISIONED/CONFIGURING/CONFIGURED/EXECUTING/EXECUTED/DEPROVISIONING/DEPROVISIONED/DONE/CANCELLING/CANCELLED/FAILED/VALIDATION_SUCCESS/VALIDATION_FAILURE). - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller beginTestRun(String testRunId, BinaryData body, - RequestOptions testRunRequestOptions) { - RequestOptions defaultRequestOptions = new RequestOptions(); - if (testRunRequestOptions != null) { - defaultRequestOptions.setContext(testRunRequestOptions.getContext()); - } - return SyncPoller.createPoller(Duration.ofSeconds(5), - (context) -> PollingUtils - .getTestRunStatus(createOrUpdateTestRunWithResponse(testRunId, body, testRunRequestOptions).getValue()), - (context) -> PollingUtils - .getTestRunStatus(getTestRunWithResponse(testRunId, defaultRequestOptions).getValue()), - (activationResponse, context) -> stopTestRunWithResponse(testRunId, defaultRequestOptions).getValue(), - (context) -> getTestRunWithResponse(testRunId, defaultRequestOptions).getValue()); - } - - /** - * Starts a test run and polls the status of the test run. - * - * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore - * or hyphen characters. - * @param testRun Load test run model. - * @param oldTestRunId Existing 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. - * @throws ResourceNotFoundException when a test with {@code oldTestRunId} doesn't exist. - * @return A {@link SyncPoller} to poll on and retrieve the test run - * status(ACCEPTED/NOTSTARTED/PROVISIONING/PROVISIONED/CONFIGURING/CONFIGURED/EXECUTING/EXECUTED/DEPROVISIONING/DEPROVISIONED/DONE/CANCELLING/CANCELLED/FAILED/VALIDATION_SUCCESS/VALIDATION_FAILURE). - */ - public SyncPoller beginTestRun(String testRunId, LoadTestRun testRun, - String oldTestRunId) { - return SyncPoller.createPoller(Duration.ofSeconds(5), - (context) -> PollingUtils.getTestRunStatus(createOrUpdateTestRun(testRunId, testRun, oldTestRunId)), - (context) -> PollingUtils.getTestRunStatus(getTestRun(testRunId)), - (activationResponse, context) -> stopTestRun(testRunId), (context) -> getTestRun(testRunId)); + LoadTestRunClient(LoadTestRunClientImpl serviceClient) { + this.serviceClient = serviceClient; } /** - * Add an app component to a test run. - * - * Add an app component to a test run by providing the resource Id, name and type. + * Create and start a new test run with the given test run Id. + *

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
      * {
-     *     components (Optional, Required on create): {
-     *         String (Required): {
-     *             resourceId: String (Required)
-     *             resourceName: String (Optional, Required on create)
-     *             resourceType: String (Optional, Required on create)
-     *             displayName: String (Optional)
-     *             resourceGroup: String (Optional)
-     *             subscriptionId: String (Optional)
-     *             kind: String (Optional)
+     *     testRunId: String (Required)
+     *     passFailCriteria (Optional): {
+     *         passFailMetrics (Optional): {
+     *             String (Required): {
+     *                 clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
+     *                 aggregate: String(count/percentage/avg/p50/p75/p90/p95/p96/p97/p98/p99/p99.9/p99.99/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)
+     *             }
+     *         }
+     *         passFailServerMetrics (Optional): {
+     *             String (Required): {
+     *                 resourceId: String (Optional, Required on create)
+     *                 metricNamespace: String (Optional, Required on create)
+     *                 metricName: String (Optional, Required on create)
+     *                 aggregation: String (Optional, Required on create)
+     *                 condition: String (Optional, Required on create)
+     *                 value: double (Optional, Required on create)
+     *                 action: String(continue/stop) (Optional)
+     *                 actualValue: Double (Optional)
+     *                 result: String(passed/undetermined/failed) (Optional)
+     *             }
      *         }
      *     }
-     *     testRunId: String (Optional)
-     *     createdDateTime: OffsetDateTime (Optional)
-     *     createdBy: String (Optional)
-     *     lastModifiedDateTime: OffsetDateTime (Optional)
-     *     lastModifiedBy: String (Optional)
-     * }
-     * }
-     * 
- * - *

Response Body Schema

- * - *
-     * {@code
-     * {
-     *     components (Optional, Required on create): {
+     *     autoStopCriteria (Optional): {
+     *         autoStopDisabled: Boolean (Optional)
+     *         errorRate: Double (Optional)
+     *         errorRateTimeWindowInSeconds: Long (Optional)
+     *         maximumVirtualUsersPerEngine: Integer (Optional)
+     *     }
+     *     secrets (Optional): {
      *         String (Required): {
-     *             resourceId: String (Required)
-     *             resourceName: String (Optional, Required on create)
-     *             resourceType: String (Optional, Required on create)
-     *             displayName: String (Optional)
-     *             resourceGroup: String (Optional)
-     *             subscriptionId: String (Optional)
-     *             kind: String (Optional)
+     *             value: String (Optional)
+     *             type: String(AKV_SECRET_URI/SECRET_VALUE) (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 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 run app component along with {@link Response}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateAppComponentsWithResponse(String testRunId, BinaryData body, - RequestOptions requestOptions) { - return this.serviceClient.createOrUpdateAppComponentsWithResponse(testRunId, body, requestOptions); - } - - /** - * 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} - *

- * 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
-     * {
-     *     filters (Optional): [
+     *     certificate (Optional): {
+     *         value: String (Optional)
+     *         type: String(AKV_CERT_URI) (Optional)
+     *         name: String (Optional)
+     *     }
+     *     environmentVariables (Optional): {
+     *         String: String (Required)
+     *     }
+     *     errorDetails (Optional): [
      *          (Optional){
-     *             name: String (Optional)
-     *             values (Optional): [
-     *                 String (Optional)
-     *             ]
+     *             code: String (Optional)
+     *             message: String (Optional)
+     *             properties (Optional): {
+     *                 String (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
      *         }
      *     ]
-     * }
-     * }
-     * 
- * - *

- * Response Body Schema - *

- * - *
-     * {@code
-     * {
-     *     data (Optional): [
-     *          (Optional){
-     *             timestamp: String (Optional)
-     *             value: Double (Optional)
+     *     testRunStatistics (Optional): {
+     *         String (Required): {
+     *             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)
+     *             pct75ResTime: Double (Optional)
+     *             pct96ResTime: Double (Optional)
+     *             pct97ResTime: Double (Optional)
+     *             pct98ResTime: Double (Optional)
+     *             pct999ResTime: Double (Optional)
+     *             pct9999ResTime: Double (Optional)
+     *             throughput: Double (Optional)
+     *             receivedKBytesPerSec: Double (Optional)
+     *             sentKBytesPerSec: Double (Optional)
      *         }
-     *     ]
-     *     dimensionValues (Optional): [
-     *          (Optional){
-     *             name: String (Optional)
-     *             value: String (Optional)
+     *     }
+     *     regionalStatistics (Optional): {
+     *         String (Required): (recursive schema, see String above)
+     *     }
+     *     loadTestConfiguration (Optional): {
+     *         engineInstances: Integer (Optional)
+     *         splitAllCSVs: Boolean (Optional)
+     *         quickStartTest: Boolean (Optional)
+     *         optionalLoadTestConfig (Optional): {
+     *             endpointUrl: String (Optional)
+     *             requestsPerSecond: Integer (Optional)
+     *             maxResponseTimeInMs: Integer (Optional)
+     *             virtualUsers: Integer (Optional)
+     *             rampUpTime: Integer (Optional)
+     *             duration: Long (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. - * @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 PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listMetrics(String testRunId, String metricName, String metricNamespace, - String timespan, RequestOptions requestOptions) { - if (requestOptions == null) { - requestOptions = new RequestOptions(); - } - // Content-Type header required even though body can be null - requestOptions.setHeader(HttpHeaderName.CONTENT_TYPE, "application/json"); - return this.serviceClient.listMetrics(testRunId, metricName, metricNamespace, timespan, requestOptions); - } - - /** - * Get associated app component (collection of azure resources) for the given test - * run. - *

Response Body Schema

- * - *
-     * {@code
-     * {
-     *     components (Optional, Required on create): {
-     *         String (Required): {
-     *             resourceId: String (Required)
-     *             resourceName: String (Optional, Required on create)
-     *             resourceType: String (Optional, Required on create)
-     *             displayName: String (Optional)
-     *             resourceGroup: String (Optional)
-     *             subscriptionId: String (Optional)
-     *             kind: String (Optional)
+     *         regionalLoadTestConfig (Optional): [
+     *              (Optional){
+     *                 engineInstances: int (Optional, Required on create)
+     *                 region: String (Optional, Required on create)
+     *             }
+     *         ]
+     *     }
+     *     testArtifacts (Optional): {
+     *         inputArtifacts (Optional): {
+     *             configFileInfo (Optional): {
+     *                 fileName: String (Required)
+     *                 url: String (Optional)
+     *                 fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (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)
+     *             urlTestConfigFileInfo (Optional): (recursive schema, see urlTestConfigFileInfo above)
+     *             additionalFileInfo (Optional): [
+     *                 (recursive schema, see above)
+     *             ]
+     *         }
+     *         outputArtifacts (Optional): {
+     *             resultFileInfo (Optional): (recursive schema, see resultFileInfo above)
+     *             logsFileInfo (Optional): (recursive schema, see logsFileInfo above)
+     *             artifactsContainerInfo (Optional): {
+     *                 url: String (Optional)
+     *                 expireDateTime: OffsetDateTime (Optional)
+     *             }
+     *             reportFileInfo (Optional): (recursive schema, see reportFileInfo above)
      *         }
      *     }
-     *     testRunId: String (Optional)
+     *     testResult: String(PASSED/NOT_APPLICABLE/FAILED) (Optional)
+     *     virtualUsers: Integer (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)
+     *     virtualUserHours: Double (Optional)
+     *     subnetId: String (Optional)
+     *     kind: String(URL/JMX/Locust) (Optional)
+     *     requestDataLevel: String(NONE/ERRORS) (Optional)
+     *     debugLogsEnabled: Boolean (Optional)
+     *     publicIPDisabled: Boolean (Optional)
+     *     createdByType: String(User/ScheduledTrigger/AzurePipelines/GitHubWorkflows) (Optional)
+     *     createdByUri: String (Optional)
+     *     estimatedVirtualUserHours: Double (Optional)
+     *     executionStartDateTime: OffsetDateTime (Optional)
+     *     executionEndDateTime: OffsetDateTime (Optional)
      *     createdDateTime: OffsetDateTime (Optional)
      *     createdBy: String (Optional)
      *     lastModifiedDateTime: OffsetDateTime (Optional)
@@ -367,103 +233,18 @@ public PagedIterable listMetrics(String testRunId, String metricName
      * }
      * }
      * 
- * - * @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}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getAppComponentsWithResponse(String testRunId, RequestOptions requestOptions) { - return this.serviceClient.getAppComponentsWithResponse(testRunId, requestOptions); - } - - /** - * Get associated server metrics configuration for the given test run. + * *

Response Body Schema

* *
      * {@code
      * {
-     *     testRunId: String (Optional)
-     *     metrics (Optional): {
-     *         String (Required): {
-     *             id: String (Optional)
-     *             resourceId: String (Optional, Required on create)
-     *             metricNamespace: String (Optional, Required on create)
-     *             displayDescription: String (Optional)
-     *             name: String (Optional, Required on create)
-     *             aggregation: String (Optional, Required on create)
-     *             unit: String (Optional)
-     *             resourceType: String (Optional, Required on create)
-     *         }
-     *     }
-     *     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 server metrics configuration for the given test run along with {@link Response}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getServerMetricsConfigWithResponse(String testRunId, RequestOptions requestOptions) { - return this.serviceClient.getServerMetricsConfigWithResponse(testRunId, requestOptions); - } - - /** - * 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
-     * {
+     *     testRunId: String (Required)
      *     passFailCriteria (Optional): {
      *         passFailMetrics (Optional): {
-     *             String (Optional): {
+     *             String (Required): {
      *                 clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
-     *                 aggregate: String(count/percentage/avg/p50/p90/p95/p99/min/max) (Optional)
+     *                 aggregate: String(count/percentage/avg/p50/p75/p90/p95/p96/p97/p98/p99/p99.9/p99.99/min/max) (Optional)
      *                 condition: String (Optional)
      *                 requestName: String (Optional)
      *                 value: Double (Optional)
@@ -472,9 +253,28 @@ public Response getServerMetricsConfigWithResponse(String testRunId,
      *                 result: String(passed/undetermined/failed) (Optional)
      *             }
      *         }
+     *         passFailServerMetrics (Optional): {
+     *             String (Required): {
+     *                 resourceId: String (Optional, Required on create)
+     *                 metricNamespace: String (Optional, Required on create)
+     *                 metricName: String (Optional, Required on create)
+     *                 aggregation: String (Optional, Required on create)
+     *                 condition: String (Optional, Required on create)
+     *                 value: double (Optional, Required on create)
+     *                 action: String(continue/stop) (Optional)
+     *                 actualValue: Double (Optional)
+     *                 result: String(passed/undetermined/failed) (Optional)
+     *             }
+     *         }
+     *     }
+     *     autoStopCriteria (Optional): {
+     *         autoStopDisabled: Boolean (Optional)
+     *         errorRate: Double (Optional)
+     *         errorRateTimeWindowInSeconds: Long (Optional)
+     *         maximumVirtualUsersPerEngine: Integer (Optional)
      *     }
      *     secrets (Optional): {
-     *         String (Optional): {
+     *         String (Required): {
      *             value: String (Optional)
      *             type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
      *         }
@@ -485,15 +285,21 @@ public Response getServerMetricsConfigWithResponse(String testRunId,
      *         name: String (Optional)
      *     }
      *     environmentVariables (Optional): {
-     *         String: String (Optional)
+     *         String: String (Required)
      *     }
      *     errorDetails (Optional): [
      *          (Optional){
+     *             code: String (Optional)
      *             message: String (Optional)
+     *             properties (Optional): {
+     *                 String (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
      *         }
      *     ]
      *     testRunStatistics (Optional): {
-     *         String (Optional): {
+     *         String (Required): {
      *             transaction: String (Optional)
      *             sampleCount: Double (Optional)
      *             errorCount: Double (Optional)
@@ -505,28 +311,45 @@ public Response getServerMetricsConfigWithResponse(String testRunId,
      *             pct1ResTime: Double (Optional)
      *             pct2ResTime: Double (Optional)
      *             pct3ResTime: Double (Optional)
+     *             pct75ResTime: Double (Optional)
+     *             pct96ResTime: Double (Optional)
+     *             pct97ResTime: Double (Optional)
+     *             pct98ResTime: Double (Optional)
+     *             pct999ResTime: Double (Optional)
+     *             pct9999ResTime: Double (Optional)
      *             throughput: Double (Optional)
      *             receivedKBytesPerSec: Double (Optional)
      *             sentKBytesPerSec: Double (Optional)
      *         }
      *     }
+     *     regionalStatistics (Optional): {
+     *         String (Required): (recursive schema, see String above)
+     *     }
      *     loadTestConfiguration (Optional): {
      *         engineInstances: Integer (Optional)
      *         splitAllCSVs: Boolean (Optional)
      *         quickStartTest: Boolean (Optional)
      *         optionalLoadTestConfig (Optional): {
      *             endpointUrl: String (Optional)
+     *             requestsPerSecond: Integer (Optional)
+     *             maxResponseTimeInMs: Integer (Optional)
      *             virtualUsers: Integer (Optional)
      *             rampUpTime: Integer (Optional)
-     *             duration: Integer (Optional)
+     *             duration: Long (Optional)
      *         }
+     *         regionalLoadTestConfig (Optional): [
+     *              (Optional){
+     *                 engineInstances: int (Optional, Required on create)
+     *                 region: String (Optional, Required on create)
+     *             }
+     *         ]
      *     }
      *     testArtifacts (Optional): {
      *         inputArtifacts (Optional): {
      *             configFileInfo (Optional): {
+     *                 fileName: String (Required)
      *                 url: String (Optional)
-     *                 fileName: String (Optional)
-     *                 fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
+     *                 fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional)
      *                 expireDateTime: OffsetDateTime (Optional)
      *                 validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
      *                 validationFailureDetails: String (Optional)
@@ -534,6 +357,7 @@ public Response getServerMetricsConfigWithResponse(String testRunId,
      *             testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
      *             userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
      *             inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
+     *             urlTestConfigFileInfo (Optional): (recursive schema, see urlTestConfigFileInfo above)
      *             additionalFileInfo (Optional): [
      *                 (recursive schema, see above)
      *             ]
@@ -541,11 +365,15 @@ public Response getServerMetricsConfigWithResponse(String testRunId,
      *         outputArtifacts (Optional): {
      *             resultFileInfo (Optional): (recursive schema, see resultFileInfo above)
      *             logsFileInfo (Optional): (recursive schema, see logsFileInfo above)
+     *             artifactsContainerInfo (Optional): {
+     *                 url: String (Optional)
+     *                 expireDateTime: OffsetDateTime (Optional)
+     *             }
+     *             reportFileInfo (Optional): (recursive schema, see reportFileInfo above)
      *         }
      *     }
      *     testResult: String(PASSED/NOT_APPLICABLE/FAILED) (Optional)
      *     virtualUsers: Integer (Optional)
-     *     testRunId: String (Optional)
      *     displayName: String (Optional)
      *     testId: String (Optional)
      *     description: String (Optional)
@@ -555,7 +383,17 @@ public Response getServerMetricsConfigWithResponse(String testRunId,
      *     executedDateTime: OffsetDateTime (Optional)
      *     portalUrl: String (Optional)
      *     duration: Long (Optional)
+     *     virtualUserHours: Double (Optional)
      *     subnetId: String (Optional)
+     *     kind: String(URL/JMX/Locust) (Optional)
+     *     requestDataLevel: String(NONE/ERRORS) (Optional)
+     *     debugLogsEnabled: Boolean (Optional)
+     *     publicIPDisabled: Boolean (Optional)
+     *     createdByType: String(User/ScheduledTrigger/AzurePipelines/GitHubWorkflows) (Optional)
+     *     createdByUri: String (Optional)
+     *     estimatedVirtualUserHours: Double (Optional)
+     *     executionStartDateTime: OffsetDateTime (Optional)
+     *     executionEndDateTime: OffsetDateTime (Optional)
      *     createdDateTime: OffsetDateTime (Optional)
      *     createdBy: String (Optional)
      *     lastModifiedDateTime: OffsetDateTime (Optional)
@@ -563,110 +401,250 @@ public Response getServerMetricsConfigWithResponse(String testRunId,
      * }
      * }
      * 
- * - *

- * Response Body Schema - * + * + * @param testRunId Unique test run identifier for the load test run, must contain only lower-case alphabetic, + * numeric, underscore or hyphen characters. + * @param body The resource instance. + * @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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateTestRunWithResponse(String testRunId, BinaryData body, + RequestOptions requestOptions) { + return this.serviceClient.createOrUpdateTestRunWithResponse(testRunId, body, requestOptions); + } + + /** + * Add an app component to a test run. + * + * Add an app component to a test run by providing the resource Id, name and type. + *

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)
-     *             }
+     *     components (Optional, Required on create): {
+     *         String (Required): {
+     *             resourceId: String (Required)
+     *             resourceName: String (Optional, Required on create)
+     *             resourceType: String (Optional, Required on create)
+     *             displayName: String (Optional)
+     *             resourceGroup: String (Optional)
+     *             subscriptionId: String (Optional)
+     *             kind: String (Optional)
      *         }
      *     }
-     *     secrets (Optional): {
-     *         String (Optional): {
-     *             value: String (Optional)
-     *             type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
+     *     testRunId: String (Optional)
+     *     createdDateTime: OffsetDateTime (Optional)
+     *     createdBy: String (Optional)
+     *     lastModifiedDateTime: OffsetDateTime (Optional)
+     *     lastModifiedBy: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     components (Optional, Required on create): {
+     *         String (Required): {
+     *             resourceId: String (Required)
+     *             resourceName: String (Optional, Required on create)
+     *             resourceType: String (Optional, Required on create)
+     *             displayName: String (Optional)
+     *             resourceGroup: String (Optional)
+     *             subscriptionId: String (Optional)
+     *             kind: String (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)
+     *     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 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 run app component along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateAppComponentsWithResponse(String testRunId, BinaryData body, + RequestOptions requestOptions) { + return this.serviceClient.createOrUpdateAppComponentsWithResponse(testRunId, body, requestOptions); + } + + /** + * Configure server metrics for a test run. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     testRunId: String (Optional)
+     *     metrics (Optional): {
+     *         String (Required): {
+     *             id: String (Optional)
+     *             resourceId: String (Optional, Required on create)
+     *             metricNamespace: String (Optional, Required on create)
+     *             displayDescription: String (Optional)
+     *             name: String (Optional, Required on create)
+     *             aggregation: String (Optional, Required on create)
+     *             unit: String (Optional)
+     *             resourceType: String (Optional, Required on create)
      *         }
-     *     ]
-     *     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)
+     *     }
+     *     createdDateTime: OffsetDateTime (Optional)
+     *     createdBy: String (Optional)
+     *     lastModifiedDateTime: OffsetDateTime (Optional)
+     *     lastModifiedBy: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     testRunId: String (Optional)
+     *     metrics (Optional): {
+     *         String (Required): {
+     *             id: String (Optional)
+     *             resourceId: String (Optional, Required on create)
+     *             metricNamespace: String (Optional, Required on create)
+     *             displayDescription: String (Optional)
+     *             name: String (Optional, Required on create)
+     *             aggregation: String (Optional, Required on create)
+     *             unit: String (Optional)
+     *             resourceType: String (Optional, Required on create)
      *         }
      *     }
-     *     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)
+     *     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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateServerMetricsConfigWithResponse(String testRunId, BinaryData body, + RequestOptions requestOptions) { + return this.serviceClient.createOrUpdateServerMetricsConfigWithResponse(testRunId, body, requestOptions); + } + + /** + * Delete an existing load test run. + * + * Delete an existing load test run by providing the testRunId. + * + * @param testRunId Unique test run identifier 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteTestRunWithResponse(String testRunId, RequestOptions requestOptions) { + return this.serviceClient.deleteTestRunWithResponse(testRunId, requestOptions); + } + + /** + * Get associated app component (collection of azure resources) for the given test + * run. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     components (Optional, Required on create): {
+     *         String (Required): {
+     *             resourceId: String (Required)
+     *             resourceName: String (Optional, Required on create)
+     *             resourceType: String (Optional, Required on create)
+     *             displayName: String (Optional)
+     *             resourceGroup: String (Optional)
+     *             subscriptionId: String (Optional)
+     *             kind: String (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)
+     *     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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getAppComponentsWithResponse(String testRunId, RequestOptions requestOptions) { + return this.serviceClient.getAppComponentsWithResponse(testRunId, requestOptions); + } + + /** + * Get associated server metrics configuration for the given test run. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     testRunId: String (Optional)
+     *     metrics (Optional): {
+     *         String (Required): {
+     *             id: String (Optional)
+     *             resourceId: String (Optional, Required on create)
+     *             metricNamespace: String (Optional, Required on create)
+     *             displayDescription: String (Optional)
+     *             name: String (Optional, Required on create)
+     *             aggregation: String (Optional, Required on create)
+     *             unit: String (Optional)
+     *             resourceType: String (Optional, Required on create)
      *         }
      *     }
-     *     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)
@@ -674,21 +652,20 @@ public Response getServerMetricsConfigWithResponse(String testRunId,
      * }
      * }
      * 
- * - * @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 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}. + * @return associated server metrics configuration for the given test run along with {@link Response}. */ + @Generated @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateTestRunWithResponse(String testRunId, BinaryData body, - RequestOptions requestOptions) { - return this.serviceClient.createOrUpdateTestRunWithResponse(testRunId, body, requestOptions); + public Response getServerMetricsConfigWithResponse(String testRunId, RequestOptions requestOptions) { + return this.serviceClient.getServerMetricsConfigWithResponse(testRunId, requestOptions); } /** @@ -730,6 +707,7 @@ Response createOrUpdateTestRunWithResponse(String testRunId, BinaryD * autoStopDisabled: Boolean (Optional) * errorRate: Double (Optional) * errorRateTimeWindowInSeconds: Long (Optional) + * maximumVirtualUsersPerEngine: Integer (Optional) * } * secrets (Optional): { * String (Required): { @@ -747,7 +725,13 @@ Response createOrUpdateTestRunWithResponse(String testRunId, BinaryD * } * errorDetails (Optional): [ * (Optional){ + * code: String (Optional) * message: String (Optional) + * properties (Optional): { + * String (Required): [ + * String (Required) + * ] + * } * } * ] * testRunStatistics (Optional): { @@ -801,7 +785,7 @@ Response createOrUpdateTestRunWithResponse(String testRunId, BinaryD * configFileInfo (Optional): { * fileName: String (Required) * url: String (Optional) - * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional) + * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional) * expireDateTime: OffsetDateTime (Optional) * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional) * validationFailureDetails: String (Optional) @@ -841,7 +825,11 @@ Response createOrUpdateTestRunWithResponse(String testRunId, BinaryD * requestDataLevel: String(NONE/ERRORS) (Optional) * debugLogsEnabled: Boolean (Optional) * publicIPDisabled: Boolean (Optional) - * createdByType: String(User/ScheduledTrigger) (Optional) + * createdByType: String(User/ScheduledTrigger/AzurePipelines/GitHubWorkflows) (Optional) + * createdByUri: String (Optional) + * estimatedVirtualUserHours: Double (Optional) + * executionStartDateTime: OffsetDateTime (Optional) + * executionEndDateTime: OffsetDateTime (Optional) * createdDateTime: OffsetDateTime (Optional) * createdBy: String (Optional) * lastModifiedDateTime: OffsetDateTime (Optional) @@ -849,7 +837,7 @@ Response createOrUpdateTestRunWithResponse(String testRunId, BinaryD * } * } * - * + * * @param testRunId Unique test run identifier 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. @@ -866,57 +854,237 @@ public Response getTestRunWithResponse(String testRunId, RequestOpti } /** - * Delete an existing load test run. - * - * Delete an existing load test run by providing the testRunId. - * + * Get test run file by file name. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     fileName: String (Required)
+     *     url: String (Optional)
+     *     fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional)
+     *     expireDateTime: OffsetDateTime (Optional)
+     *     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
+     *     validationFailureDetails: String (Optional)
+     * }
+     * }
+     * 
+ * * @param testRunId Unique test run identifier for the load test run, must contain only lower-case alphabetic, * numeric, underscore or hyphen characters. + * @param fileName Name of the file. * @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}. + * @return test run file by file name along with {@link Response}. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteTestRunWithResponse(String testRunId, RequestOptions requestOptions) { - return this.serviceClient.deleteTestRunWithResponse(testRunId, requestOptions); + public Response getTestRunFileWithResponse(String testRunId, String fileName, + RequestOptions requestOptions) { + return this.serviceClient.getTestRunFileWithResponse(testRunId, fileName, requestOptions); } /** - * Get test run file by file name. + * 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
+     * String
+     * }
+     * 
+ * + * @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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listMetricDimensionValues(String testRunId, String name, String metricname, + String metricNamespace, String timespan, RequestOptions requestOptions) { + return this.serviceClient.listMetricDimensionValues(testRunId, name, metricname, metricNamespace, timespan, + requestOptions); + } + + /** + * 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/Percentile75/Percentile90/Percentile95/Percentile96/Percentile97/Percentile98/Percentile99/Percentile999/Percentile9999) (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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getMetricDefinitionsWithResponse(String testRunId, String metricNamespace, + RequestOptions requestOptions) { + return this.serviceClient.getMetricDefinitionsWithResponse(testRunId, metricNamespace, requestOptions); + } + + /** + * 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getMetricNamespacesWithResponse(String testRunId, RequestOptions requestOptions) { + return this.serviceClient.getMetricNamespacesWithResponse(testRunId, requestOptions); + } + + /** + * 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} + *

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
+     * {
+     *     filters (Optional): [
+     *          (Optional){
+     *             name: String (Optional)
+     *             values (Optional): [
+     *                 String (Optional)
+     *             ]
+     *         }
+     *     ]
+     * }
+     * }
+     * 
+ * *

Response Body Schema

* *
      * {@code
      * {
-     *     fileName: String (Required)
-     *     url: String (Optional)
-     *     fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional)
-     *     expireDateTime: OffsetDateTime (Optional)
-     *     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
-     *     validationFailureDetails: String (Optional)
+     *     data (Optional): [
+     *          (Optional){
+     *             timestamp: OffsetDateTime (Optional)
+     *             value: Double (Optional)
+     *         }
+     *     ]
+     *     dimensionValues (Optional): [
+     *          (Optional){
+     *             name: String (Optional)
+     *             value: String (Optional)
+     *         }
+     *     ]
      * }
      * }
      * 
- * - * @param testRunId Unique test run identifier for the load test run, must contain only lower-case alphabetic, + * + * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, * numeric, underscore or hyphen characters. - * @param fileName Name of the file. + * @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 file by file name along with {@link Response}. + * @return the response to a metrics query as paginated response with {@link PagedIterable}. */ @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getTestRunFileWithResponse(String testRunId, String fileName, - RequestOptions requestOptions) { - return this.serviceClient.getTestRunFileWithResponse(testRunId, fileName, requestOptions); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listMetrics(String testRunId, String metricname, String metricNamespace, + String timespan, RequestOptions requestOptions) { + return this.serviceClient.listMetrics(testRunId, metricname, metricNamespace, timespan, requestOptions); } /** @@ -941,6 +1109,8 @@ public Response getTestRunFileWithResponse(String testRunId, String * maxpagesizeIntegerNoNumber of results in response. * createdByTypesList<String>NoComma separated list of type of entities * that have created the test run. In the form of "," separated string. + * testIdsList<String>NoComma-separated list of test IDs. If you are using + * testIds, do not send a value for testId. In the form of "," separated string. * * You can add these to a request with {@link RequestOptions#addQueryParam} *

Response Body Schema

@@ -980,6 +1150,7 @@ public Response getTestRunFileWithResponse(String testRunId, String * autoStopDisabled: Boolean (Optional) * errorRate: Double (Optional) * errorRateTimeWindowInSeconds: Long (Optional) + * maximumVirtualUsersPerEngine: Integer (Optional) * } * secrets (Optional): { * String (Required): { @@ -997,7 +1168,13 @@ public Response getTestRunFileWithResponse(String testRunId, String * } * errorDetails (Optional): [ * (Optional){ + * code: String (Optional) * message: String (Optional) + * properties (Optional): { + * String (Required): [ + * String (Required) + * ] + * } * } * ] * testRunStatistics (Optional): { @@ -1051,7 +1228,7 @@ public Response getTestRunFileWithResponse(String testRunId, String * configFileInfo (Optional): { * fileName: String (Required) * url: String (Optional) - * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional) + * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional) * expireDateTime: OffsetDateTime (Optional) * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional) * validationFailureDetails: String (Optional) @@ -1091,7 +1268,11 @@ public Response getTestRunFileWithResponse(String testRunId, String * requestDataLevel: String(NONE/ERRORS) (Optional) * debugLogsEnabled: Boolean (Optional) * publicIPDisabled: Boolean (Optional) - * createdByType: String(User/ScheduledTrigger) (Optional) + * createdByType: String(User/ScheduledTrigger/AzurePipelines/GitHubWorkflows) (Optional) + * createdByUri: String (Optional) + * estimatedVirtualUserHours: Double (Optional) + * executionStartDateTime: OffsetDateTime (Optional) + * executionEndDateTime: OffsetDateTime (Optional) * createdDateTime: OffsetDateTime (Optional) * createdBy: String (Optional) * lastModifiedDateTime: OffsetDateTime (Optional) @@ -1099,7 +1280,7 @@ public Response getTestRunFileWithResponse(String testRunId, String * } * } * - * + * * @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. @@ -1152,6 +1333,7 @@ public PagedIterable listTestRuns(RequestOptions requestOptions) { * autoStopDisabled: Boolean (Optional) * errorRate: Double (Optional) * errorRateTimeWindowInSeconds: Long (Optional) + * maximumVirtualUsersPerEngine: Integer (Optional) * } * secrets (Optional): { * String (Required): { @@ -1169,7 +1351,13 @@ public PagedIterable listTestRuns(RequestOptions requestOptions) { * } * errorDetails (Optional): [ * (Optional){ + * code: String (Optional) * message: String (Optional) + * properties (Optional): { + * String (Required): [ + * String (Required) + * ] + * } * } * ] * testRunStatistics (Optional): { @@ -1223,7 +1411,7 @@ public PagedIterable listTestRuns(RequestOptions requestOptions) { * configFileInfo (Optional): { * fileName: String (Required) * url: String (Optional) - * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional) + * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional) * expireDateTime: OffsetDateTime (Optional) * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional) * validationFailureDetails: String (Optional) @@ -1263,7 +1451,11 @@ public PagedIterable listTestRuns(RequestOptions requestOptions) { * requestDataLevel: String(NONE/ERRORS) (Optional) * debugLogsEnabled: Boolean (Optional) * publicIPDisabled: Boolean (Optional) - * createdByType: String(User/ScheduledTrigger) (Optional) + * createdByType: String(User/ScheduledTrigger/AzurePipelines/GitHubWorkflows) (Optional) + * createdByUri: String (Optional) + * estimatedVirtualUserHours: Double (Optional) + * executionStartDateTime: OffsetDateTime (Optional) + * executionEndDateTime: OffsetDateTime (Optional) * createdDateTime: OffsetDateTime (Optional) * createdBy: String (Optional) * lastModifiedDateTime: OffsetDateTime (Optional) @@ -1271,7 +1463,7 @@ public PagedIterable listTestRuns(RequestOptions requestOptions) { * } * } * - * + * * @param testRunId Unique test run identifier 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. @@ -1287,92 +1479,9 @@ public Response stopTestRunWithResponse(String testRunId, RequestOpt return this.serviceClient.stopTestRunWithResponse(testRunId, requestOptions); } - /** - * 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}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getMetricNamespacesWithResponse(String testRunId, RequestOptions requestOptions) { - return this.serviceClient.getMetricNamespacesWithResponse(testRunId, requestOptions); - } - - /** - * 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/Percentile75/Percentile90/Percentile95/Percentile96/Percentile97/Percentile98/Percentile99/Percentile999/Percentile9999) (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}. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getMetricDefinitionsWithResponse(String testRunId, String metricNamespace, - RequestOptions requestOptions) { - return this.serviceClient.getMetricDefinitionsWithResponse(testRunId, metricNamespace, requestOptions); - } - /** * Create and start a new test profile run. - * + * * Create and start a new test profile run with the given test profile run Id. *

Request Body Schema

* @@ -1390,7 +1499,13 @@ public Response getMetricDefinitionsWithResponse(String testRunId, S * status: String(ACCEPTED/NOTSTARTED/EXECUTING/DONE/CANCELLING/CANCELLED/FAILED) (Optional) * errorDetails (Optional): [ * (Optional){ + * code: String (Optional) * message: String (Optional) + * properties (Optional): { + * String (Required): [ + * String (Required) + * ] + * } * } * ] * startDateTime: OffsetDateTime (Optional) @@ -1437,7 +1552,13 @@ public Response getMetricDefinitionsWithResponse(String testRunId, S * status: String(ACCEPTED/NOTSTARTED/EXECUTING/DONE/CANCELLING/CANCELLED/FAILED) (Optional) * errorDetails (Optional): [ * (Optional){ + * code: String (Optional) * message: String (Optional) + * properties (Optional): { + * String (Required): [ + * String (Required) + * ] + * } * } * ] * startDateTime: OffsetDateTime (Optional) @@ -1467,7 +1588,7 @@ public Response getMetricDefinitionsWithResponse(String testRunId, S * } * } * - * + * * @param testProfileRunId Unique identifier for the test profile run, must contain only lower-case alphabetic, * numeric, underscore or hyphen characters. * @param body The resource instance. @@ -1487,9 +1608,9 @@ Response createOrUpdateTestProfileRunWithResponse(String testProfile /** * Delete an existing load test profile run. - * + * * Delete an existing load test profile run by providing the test profile run Id. - * + * * @param testProfileRunId Unique identifier for the test profile 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. @@ -1507,7 +1628,7 @@ public Response deleteTestProfileRunWithResponse(String testProfileRunId, /** * Get test profile run details. - * + * * Get test profile run details by test profile run Id. *

Response Body Schema

* @@ -1525,7 +1646,13 @@ public Response deleteTestProfileRunWithResponse(String testProfileRunId, * status: String(ACCEPTED/NOTSTARTED/EXECUTING/DONE/CANCELLING/CANCELLED/FAILED) (Optional) * errorDetails (Optional): [ * (Optional){ + * code: String (Optional) * message: String (Optional) + * properties (Optional): { + * String (Required): [ + * String (Required) + * ] + * } * } * ] * startDateTime: OffsetDateTime (Optional) @@ -1555,7 +1682,7 @@ public Response deleteTestProfileRunWithResponse(String testProfileRunId, * } * } * - * + * * @param testProfileRunId Unique identifier for the test profile 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. @@ -1564,7 +1691,7 @@ public Response deleteTestProfileRunWithResponse(String testProfileRunId, * @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 profile run details. - * + * * Get test profile run details by test profile run Id along with {@link Response}. */ @Generated @@ -1575,7 +1702,7 @@ public Response getTestProfileRunWithResponse(String testProfileRunI /** * List test profile runs. - * + * * Get all test profile runs for the given filters. *

Query Parameters

* @@ -1619,7 +1746,83 @@ public Response getTestProfileRunWithResponse(String testProfileRunI * status: String(ACCEPTED/NOTSTARTED/EXECUTING/DONE/CANCELLING/CANCELLED/FAILED) (Optional) * errorDetails (Optional): [ * (Optional){ + * code: String (Optional) + * message: String (Optional) + * properties (Optional): { + * String (Required): [ + * String (Required) + * ] + * } + * } + * ] + * startDateTime: OffsetDateTime (Optional) + * endDateTime: OffsetDateTime (Optional) + * durationInSeconds: Long (Optional) + * testRunDetails (Optional): { + * String (Required): { + * status: String(ACCEPTED/NOTSTARTED/PROVISIONING/PROVISIONED/CONFIGURING/CONFIGURED/EXECUTING/EXECUTED/DEPROVISIONING/DEPROVISIONED/DONE/CANCELLING/CANCELLED/FAILED/VALIDATION_SUCCESS/VALIDATION_FAILURE) (Required) + * configurationId: String (Required) + * properties (Required): { + * String: String (Required) + * } + * } + * } + * recommendations (Optional): [ + * (Optional){ + * category: String(ThroughputOptimized/CostOptimized) (Required) + * configurations (Optional): [ + * 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. + * @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 paged collection of TestProfileRun items as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listTestProfileRuns(RequestOptions requestOptions) { + return this.serviceClient.listTestProfileRuns(requestOptions); + } + + /** + * Stop test profile run. + * + * Stop test profile run for the given test profile run Id. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     testProfileRunId: String (Required)
+     *     displayName: String (Optional)
+     *     description: String (Optional)
+     *     testProfileId: String (Optional)
+     *     targetResourceId: String (Optional)
+     *     targetResourceConfigurations (Optional): {
+     *         kind: String(FunctionsFlexConsumption) (Required)
+     *     }
+     *     status: String(ACCEPTED/NOTSTARTED/EXECUTING/DONE/CANCELLING/CANCELLED/FAILED) (Optional)
+     *     errorDetails (Optional): [
+     *          (Optional){
+     *             code: String (Optional)
      *             message: String (Optional)
+     *             properties (Optional): {
+     *                 String (Required): [
+     *                     String (Required)
+     *                 ]
+     *             }
      *         }
      *     ]
      *     startDateTime: OffsetDateTime (Optional)
@@ -1649,140 +1852,225 @@ public Response getTestProfileRunWithResponse(String testProfileRunI
      * }
      * }
      * 
- * + * + * @param testProfileRunId Unique identifier for the test profile 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 Profile Run model along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response stopTestProfileRunWithResponse(String testProfileRunId, RequestOptions requestOptions) { + return this.serviceClient.stopTestProfileRunWithResponse(testProfileRunId, requestOptions); + } + + /** + * Get the latest insights for the test run. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     columns (Optional): [
+     *          (Optional){
+     *             name: String (Required)
+     *             dataType: String (Required)
+     *         }
+     *     ]
+     *     rows (Optional): {
+     *         String (Required): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     version: Long (Optional)
+     *     status: String(NotStarted/Running/Succeeded/Failed/Canceled) (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 paged collection of TestProfileRun items as paginated response with {@link PagedIterable}. + * @return the latest insights for the test run along with {@link Response}. */ @Generated - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listTestProfileRuns(RequestOptions requestOptions) { - return this.serviceClient.listTestProfileRuns(requestOptions); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getLatestTestRunInsightsWithResponse(String testRunId, RequestOptions requestOptions) { + return this.serviceClient.getLatestTestRunInsightsWithResponse(testRunId, requestOptions); } /** - * Stop test profile run. - * - * Stop test profile run for the given test profile run Id. - *

Response Body Schema

+ * Update the latest insights for the test run. + *

Request Body Schema

* *
      * {@code
      * {
-     *     testProfileRunId: String (Required)
-     *     displayName: String (Optional)
-     *     description: String (Optional)
-     *     testProfileId: String (Optional)
-     *     targetResourceId: String (Optional)
-     *     targetResourceConfigurations (Optional): {
-     *         kind: String(FunctionsFlexConsumption) (Required)
-     *     }
-     *     status: String(ACCEPTED/NOTSTARTED/EXECUTING/DONE/CANCELLING/CANCELLED/FAILED) (Optional)
-     *     errorDetails (Optional): [
+     *     columns (Optional): [
      *          (Optional){
-     *             message: String (Optional)
+     *             name: String (Required)
+     *             dataType: String (Required)
      *         }
      *     ]
-     *     startDateTime: OffsetDateTime (Optional)
-     *     endDateTime: OffsetDateTime (Optional)
-     *     durationInSeconds: Long (Optional)
-     *     testRunDetails (Optional): {
+     *     rows (Optional): {
      *         String (Required): {
-     *             status: String(ACCEPTED/NOTSTARTED/PROVISIONING/PROVISIONED/CONFIGURING/CONFIGURED/EXECUTING/EXECUTED/DEPROVISIONING/DEPROVISIONED/DONE/CANCELLING/CANCELLED/FAILED/VALIDATION_SUCCESS/VALIDATION_FAILURE) (Required)
-     *             configurationId: String (Required)
-     *             properties (Required): {
-     *                 String: String (Required)
-     *             }
+     *             String: String (Required)
      *         }
      *     }
-     *     recommendations (Optional): [
+     *     version: Long (Optional)
+     *     status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     columns (Optional): [
      *          (Optional){
-     *             category: String(ThroughputOptimized/CostOptimized) (Required)
-     *             configurations (Optional): [
-     *                 String (Optional)
-     *             ]
+     *             name: String (Required)
+     *             dataType: String (Required)
      *         }
      *     ]
-     *     createdDateTime: OffsetDateTime (Optional)
-     *     createdBy: String (Optional)
-     *     lastModifiedDateTime: OffsetDateTime (Optional)
-     *     lastModifiedBy: String (Optional)
+     *     rows (Optional): {
+     *         String (Required): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     version: Long (Optional)
+     *     status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Optional)
      * }
      * }
      * 
- * - * @param testProfileRunId Unique identifier for the test profile run, must contain only lower-case alphabetic, + * + * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, * numeric, underscore or hyphen characters. + * @param body Test run insights 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 Profile Run model along with {@link Response}. + * @return represents insights for the test run along with {@link Response}. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public Response stopTestProfileRunWithResponse(String testProfileRunId, RequestOptions requestOptions) { - return this.serviceClient.stopTestProfileRunWithResponse(testProfileRunId, requestOptions); + public Response updateLatestTestRunInsightsWithResponse(String testRunId, BinaryData body, + RequestOptions requestOptions) { + return this.serviceClient.updateLatestTestRunInsightsWithResponse(testRunId, body, requestOptions); } /** - * Starts a test run and polls the status of the test run. - * - * @param testProfileRunId Unique name for the test profile run, must contain only lower-case alphabetic, numeric, - * underscore - * or hyphen characters. - * @param body Test Profile Run Model. - * @param testProfileRunRequestOptions The options to configure the file upload HTTP request before HTTP client - * sends it. - * @return A {@link SyncPoller} to poll on and retrieve the test run - * status(ACCEPTED/NOTSTARTED/EXECUTING/DONE/CANCELLING/CANCELLED/FAILED). + * Generate insights for the test run. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     id: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required)
+     *     kind: String(CloneTest/GenerateTestRunInsights/TestPlanRecommendations) (Required)
+     *     error (Optional): {
+     *         error (Required): (recursive schema, see error above)
+     *     }
+     * }
+     * }
+     * 
+ * + * @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 SyncPoller} for polling of status of a long running operation. */ + @Generated @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller beginTestProfileRun(String testProfileRunId, BinaryData body, - RequestOptions testProfileRunRequestOptions) { - RequestOptions defaultRequestOptions = new RequestOptions(); - if (testProfileRunRequestOptions != null) { - defaultRequestOptions.setContext(testProfileRunRequestOptions.getContext()); + public SyncPoller beginGenerateTestRunInsights(String testRunId, + RequestOptions requestOptions) { + return this.serviceClient.beginGenerateTestRunInsights(testRunId, requestOptions); + } + + /** + * Create and start a new test run with the given test run Id. + * + * @param testRunId Unique test run identifier for the load test run, must contain only lower-case alphabetic, + * numeric, underscore or hyphen characters. + * @param body The resource instance. + * @param oldTestRunId Existing 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return load test run model. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + LoadTestRun createOrUpdateTestRun(String testRunId, LoadTestRun body, String oldTestRunId) { + // Generated convenience method for createOrUpdateTestRunWithResponse + RequestOptions requestOptions = new RequestOptions(); + if (oldTestRunId != null) { + requestOptions.addQueryParam("oldTestRunId", oldTestRunId, false); } - return SyncPoller.createPoller(Duration.ofSeconds(5), (context) -> PollingUtils.getTestProfileRunStatus( - createOrUpdateTestProfileRunWithResponse(testProfileRunId, body, testProfileRunRequestOptions).getValue()), - (context) -> PollingUtils.getTestProfileRunStatus( - getTestProfileRunWithResponse(testProfileRunId, defaultRequestOptions).getValue()), - (activationResponse, context) -> stopTestProfileRunWithResponse(testProfileRunId, defaultRequestOptions) - .getValue(), - (context) -> getTestProfileRunWithResponse(testProfileRunId, defaultRequestOptions).getValue()); + JsonMergePatchHelper.getLoadTestRunAccessor().prepareModelForJsonMergePatch(body, true); + BinaryData bodyInBinaryData = BinaryData.fromObject(body); + // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization. + bodyInBinaryData.getLength(); + JsonMergePatchHelper.getLoadTestRunAccessor().prepareModelForJsonMergePatch(body, false); + return createOrUpdateTestRunWithResponse(testRunId, bodyInBinaryData, requestOptions).getValue() + .toObject(LoadTestRun.class); } /** - * Starts a test run and polls the status of the test run. - * - * @param testProfileRunId Unique name for the test profile run, must contain only lower-case alphabetic, numeric, - * underscore - * or hyphen characters. - * @param testProfileRun Test Profile Run Model. - * @return A {@link SyncPoller} to poll on and retrieve the test run - * status(ACCEPTED/NOTSTARTED/EXECUTING/DONE/CANCELLING/CANCELLED/FAILED). + * Create and start a new test run with the given test run Id. + * + * @param testRunId Unique test run identifier for the load test run, must contain only lower-case alphabetic, + * numeric, underscore or hyphen characters. + * @param body The resource instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return load test run model. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller beginTestProfileRun(String testProfileRunId, - TestProfileRun testProfileRun) { - return SyncPoller.createPoller(Duration.ofSeconds(5), - (context) -> PollingUtils - .getTestProfileRunStatus(createOrUpdateTestProfileRun(testProfileRunId, testProfileRun)), - (context) -> PollingUtils.getTestProfileRunStatus(getTestProfileRun(testProfileRunId)), - (activationResponse, context) -> stopTestProfileRun(testProfileRunId), - (context) -> getTestProfileRun(testProfileRunId)); + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + LoadTestRun createOrUpdateTestRun(String testRunId, LoadTestRun body) { + // Generated convenience method for createOrUpdateTestRunWithResponse + RequestOptions requestOptions = new RequestOptions(); + JsonMergePatchHelper.getLoadTestRunAccessor().prepareModelForJsonMergePatch(body, true); + BinaryData bodyInBinaryData = BinaryData.fromObject(body); + // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization. + bodyInBinaryData.getLength(); + JsonMergePatchHelper.getLoadTestRunAccessor().prepareModelForJsonMergePatch(body, false); + return createOrUpdateTestRunWithResponse(testRunId, bodyInBinaryData, requestOptions).getValue() + .toObject(LoadTestRun.class); } /** * Add an app component to a test run. - * + * * Add an app component to a test run by providing the resource Id, name and type. - * + * * @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. @@ -1808,11 +2096,40 @@ public TestRunAppComponents createOrUpdateAppComponents(String testRunId, TestRu .toObject(TestRunAppComponents.class); } + /** + * Configure server metrics for a test run. + * + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return test run server metrics configuration. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public TestRunServerMetricsConfiguration createOrUpdateServerMetricsConfig(String testRunId, + TestRunServerMetricsConfiguration body) { + // Generated convenience method for createOrUpdateServerMetricsConfigWithResponse + RequestOptions requestOptions = new RequestOptions(); + JsonMergePatchHelper.getTestRunServerMetricsConfigurationAccessor().prepareModelForJsonMergePatch(body, true); + BinaryData bodyInBinaryData = BinaryData.fromObject(body); + // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization. + bodyInBinaryData.getLength(); + JsonMergePatchHelper.getTestRunServerMetricsConfigurationAccessor().prepareModelForJsonMergePatch(body, false); + return createOrUpdateServerMetricsConfigWithResponse(testRunId, bodyInBinaryData, requestOptions).getValue() + .toObject(TestRunServerMetricsConfiguration.class); + } + /** * Delete an existing load test run. - * + * * Delete an existing load test run by providing the testRunId. - * + * * @param testRunId Unique test run identifier for the load test run, must contain only lower-case alphabetic, * numeric, underscore or hyphen characters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1833,7 +2150,7 @@ public void deleteTestRun(String testRunId) { /** * Get associated app component (collection of azure resources) for the given test * run. - * + * * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, * numeric, underscore or hyphen characters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1855,7 +2172,7 @@ public TestRunAppComponents getAppComponents(String testRunId) { /** * Get associated server metrics configuration for the given test run. - * + * * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, * numeric, underscore or hyphen characters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1877,7 +2194,7 @@ public TestRunServerMetricsConfiguration getServerMetricsConfig(String testRunId /** * Get test run details by test run Id. - * + * * @param testRunId Unique test run identifier for the load test run, must contain only lower-case alphabetic, * numeric, underscore or hyphen characters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1898,7 +2215,7 @@ public LoadTestRun getTestRun(String testRunId) { /** * Get test run file by file name. - * + * * @param testRunId Unique test run identifier for the load test run, must contain only lower-case alphabetic, * numeric, underscore or hyphen characters. * @param fileName Name of the file. @@ -1921,7 +2238,7 @@ public TestRunFileInfo getTestRunFile(String testRunId, String fileName) { /** * List the dimension values for the given metric dimension name. - * + * * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, * numeric, underscore or hyphen characters. * @param name Dimension name. @@ -1954,7 +2271,7 @@ public PagedIterable listMetricDimensionValues(String testRunId, String /** * List the dimension values for the given metric dimension name. - * + * * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, * numeric, underscore or hyphen characters. * @param name Dimension name. @@ -1983,7 +2300,7 @@ public PagedIterable listMetricDimensionValues(String testRunId, String /** * List the metric definitions for a load test run. - * + * * @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. @@ -2006,7 +2323,7 @@ public MetricDefinitions getMetricDefinitions(String testRunId, String metricNam /** * List the metric namespaces for a load test run. - * + * * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, * numeric, underscore or hyphen characters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2025,9 +2342,140 @@ public MetricNamespaces getMetricNamespaces(String testRunId) { return getMetricNamespacesWithResponse(testRunId, requestOptions).getValue().toObject(MetricNamespaces.class); } + /** + * List the metric values for a load test run. + * + * @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 aggregation The aggregation. + * @param interval The interval (i.e. timegrain) of the query. + * @param body Metric dimension filter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response to a metrics query as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listMetrics(String testRunId, String metricname, String metricNamespace, + String timespan, String aggregation, TimeGrain interval, MetricsFilters body) { + // Generated convenience method for listMetrics + RequestOptions requestOptions = new RequestOptions(); + if (aggregation != null) { + requestOptions.addQueryParam("aggregation", aggregation, false); + } + if (interval != null) { + requestOptions.addQueryParam("interval", interval.toString(), false); + } + if (body != null) { + requestOptions.setBody(BinaryData.fromObject(body)); + } + return serviceClient.listMetrics(testRunId, metricname, metricNamespace, timespan, requestOptions) + .mapPage(bodyItemValue -> bodyItemValue.toObject(TimeSeriesElement.class)); + } + + /** + * List the metric values for a load test run. + * + * @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'. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response to a metrics query as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listMetrics(String testRunId, String metricname, String metricNamespace, + String timespan) { + // Generated convenience method for listMetrics + RequestOptions requestOptions = new RequestOptions(); + return serviceClient.listMetrics(testRunId, metricname, metricNamespace, timespan, requestOptions) + .mapPage(bodyItemValue -> bodyItemValue.toObject(TimeSeriesElement.class)); + } + + /** + * Get all test runs for the given filters. + * + * @param orderBy Sort on the supported fields in (field asc/desc) format. eg: executedDateTime + * asc. Supported fields - executedDateTime. + * @param search Prefix 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. + * @param testId Unique name of an existing load test. + * @param executionFrom Start DateTime(RFC 3339 literal format) of test-run execution time filter range. + * @param executionTo End DateTime(RFC 3339 literal format) of test-run execution time filter range. + * @param status Comma separated list of test run status. + * @param createdByTypes Comma separated list of type of entities that have created the test run. + * @param testIds Comma-separated list of test IDs. If you are using testIds, do not send a value for testId. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all test runs for the given filters as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listTestRuns(String orderBy, String search, String testId, + OffsetDateTime executionFrom, OffsetDateTime executionTo, String status, List createdByTypes, + List testIds) { + // Generated convenience method for listTestRuns + RequestOptions requestOptions = new RequestOptions(); + if (orderBy != null) { + requestOptions.addQueryParam("orderby", orderBy, false); + } + if (search != null) { + requestOptions.addQueryParam("search", search, false); + } + if (testId != null) { + requestOptions.addQueryParam("testId", testId, false); + } + if (executionFrom != null) { + requestOptions.addQueryParam("executionFrom", String.valueOf(executionFrom), false); + } + if (executionTo != null) { + requestOptions.addQueryParam("executionTo", String.valueOf(executionTo), false); + } + if (status != null) { + requestOptions.addQueryParam("status", status, false); + } + if (createdByTypes != null) { + requestOptions.addQueryParam("createdByTypes", + createdByTypes.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")), + false); + } + if (testIds != null) { + requestOptions.addQueryParam("testIds", + testIds.stream() + .map(paramItemValue -> Objects.toString(paramItemValue, "")) + .collect(Collectors.joining(",")), + false); + } + return serviceClient.listTestRuns(requestOptions) + .mapPage(bodyItemValue -> bodyItemValue.toObject(LoadTestRun.class)); + } + /** * Get all test runs for the given filters. - * + * * @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. @@ -2046,7 +2494,7 @@ public PagedIterable listTestRuns() { /** * Stop test run by test run Id. - * + * * @param testRunId Unique test run identifier for the load test run, must contain only lower-case alphabetic, * numeric, underscore or hyphen characters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2067,9 +2515,9 @@ public LoadTestRun stopTestRun(String testRunId) { /** * Create and start a new test profile run. - * + * * Create and start a new test profile run with the given test profile run Id. - * + * * @param testProfileRunId Unique identifier for the test profile run, must contain only lower-case alphabetic, * numeric, underscore or hyphen characters. * @param body The resource instance. @@ -2097,9 +2545,9 @@ TestProfileRun createOrUpdateTestProfileRun(String testProfileRunId, TestProfile /** * Delete an existing load test profile run. - * + * * Delete an existing load test profile run by providing the test profile run Id. - * + * * @param testProfileRunId Unique identifier for the test profile run, must contain only lower-case alphabetic, * numeric, underscore or hyphen characters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2119,9 +2567,9 @@ public void deleteTestProfileRun(String testProfileRunId) { /** * Get test profile run details. - * + * * Get test profile run details by test profile run Id. - * + * * @param testProfileRunId Unique identifier for the test profile run, must contain only lower-case alphabetic, * numeric, underscore or hyphen characters. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2131,7 +2579,7 @@ public void deleteTestProfileRun(String testProfileRunId) { * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return test profile run details. - * + * * Get test profile run details by test profile run Id. */ @Generated @@ -2145,94 +2593,9 @@ public TestProfileRun getTestProfileRun(String testProfileRunId) { /** * List test profile runs. - * - * Get all test profile runs for the given filters. - * - * @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. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paged collection of TestProfileRun items as paginated response with {@link PagedIterable}. - */ - @Generated - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listTestProfileRuns() { - // Generated convenience method for listTestProfileRuns - RequestOptions requestOptions = new RequestOptions(); - return serviceClient.listTestProfileRuns(requestOptions) - .mapPage(bodyItemValue -> bodyItemValue.toObject(TestProfileRun.class)); - } - - /** - * Stop test profile run. - * - * Stop test profile run for the given test profile run Id. - * - * @param testProfileRunId Unique identifier for the test profile run, must contain only lower-case alphabetic, - * numeric, underscore or hyphen characters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return test Profile Run model. - */ - @Generated - @ServiceMethod(returns = ReturnType.SINGLE) - public TestProfileRun stopTestProfileRun(String testProfileRunId) { - // Generated convenience method for stopTestProfileRunWithResponse - RequestOptions requestOptions = new RequestOptions(); - return stopTestProfileRunWithResponse(testProfileRunId, requestOptions).getValue() - .toObject(TestProfileRun.class); - } - - /** - * 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
-     * String
-     * }
-     * 
- * - * @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}. - */ - @Generated - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listMetricDimensionValues(String testRunId, String name, String metricname, - String metricNamespace, String timespan, RequestOptions requestOptions) { - return this.serviceClient.listMetricDimensionValues(testRunId, name, metricname, metricNamespace, timespan, - requestOptions); - } - - /** - * List test profile runs. - * * Get all test profile runs for the given filters. - * + * * @param minStartDateTime Minimum Start DateTime(RFC 3339 literal format) of the test profile runs to filter on. * @param maxStartDateTime Maximum Start DateTime(RFC 3339 literal format) of the test profile runs to filter on. * @param minEndDateTime Minimum End DateTime(RFC 3339 literal format) of the test profile runs to filter on. @@ -2305,163 +2668,118 @@ public PagedIterable listTestProfileRuns(OffsetDateTime minStart } /** - * Configure server metrics for a test run. - * - * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, + * List test profile runs. + * + * Get all test profile runs for the given filters. + * + * @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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of TestProfileRun items as paginated response with {@link PagedIterable}. + */ + @Generated + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listTestProfileRuns() { + // Generated convenience method for listTestProfileRuns + RequestOptions requestOptions = new RequestOptions(); + return serviceClient.listTestProfileRuns(requestOptions) + .mapPage(bodyItemValue -> bodyItemValue.toObject(TestProfileRun.class)); + } + + /** + * Stop test profile run. + * + * Stop test profile run for the given test profile run Id. + * + * @param testProfileRunId Unique identifier for the test profile run, must contain only lower-case alphabetic, * numeric, underscore or hyphen characters. - * @param body Server metric configuration model. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return test run server metrics configuration. + * @return test Profile Run model. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - public TestRunServerMetricsConfiguration createOrUpdateServerMetricsConfig(String testRunId, - TestRunServerMetricsConfiguration body) { - // Generated convenience method for createOrUpdateServerMetricsConfigWithResponse + public TestProfileRun stopTestProfileRun(String testProfileRunId) { + // Generated convenience method for stopTestProfileRunWithResponse RequestOptions requestOptions = new RequestOptions(); - JsonMergePatchHelper.getTestRunServerMetricsConfigurationAccessor().prepareModelForJsonMergePatch(body, true); - BinaryData bodyInBinaryData = BinaryData.fromObject(body); - // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization. - bodyInBinaryData.getLength(); - JsonMergePatchHelper.getTestRunServerMetricsConfigurationAccessor().prepareModelForJsonMergePatch(body, false); - return createOrUpdateServerMetricsConfigWithResponse(testRunId, bodyInBinaryData, requestOptions).getValue() - .toObject(TestRunServerMetricsConfiguration.class); + return stopTestProfileRunWithResponse(testProfileRunId, requestOptions).getValue() + .toObject(TestProfileRun.class); } /** - * Create and start a new test run with the given test run Id. - * - * @param testRunId Unique test run identifier for the load test run, must contain only lower-case alphabetic, + * Get the latest insights for the test run. + * + * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, * numeric, underscore or hyphen characters. - * @param body The resource instance. - * @param oldTestRunId Existing 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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return load test run model. + * @return the latest insights for the test run. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - LoadTestRun createOrUpdateTestRun(String testRunId, LoadTestRun body, String oldTestRunId) { - // Generated convenience method for createOrUpdateTestRunWithResponse + public TestRunInsights getLatestTestRunInsights(String testRunId) { + // Generated convenience method for getLatestTestRunInsightsWithResponse RequestOptions requestOptions = new RequestOptions(); - if (oldTestRunId != null) { - requestOptions.addQueryParam("oldTestRunId", oldTestRunId, false); - } - JsonMergePatchHelper.getLoadTestRunAccessor().prepareModelForJsonMergePatch(body, true); - BinaryData bodyInBinaryData = BinaryData.fromObject(body); - // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization. - bodyInBinaryData.getLength(); - JsonMergePatchHelper.getLoadTestRunAccessor().prepareModelForJsonMergePatch(body, false); - return createOrUpdateTestRunWithResponse(testRunId, bodyInBinaryData, requestOptions).getValue() - .toObject(LoadTestRun.class); + return getLatestTestRunInsightsWithResponse(testRunId, requestOptions).getValue() + .toObject(TestRunInsights.class); } /** - * Create and start a new test run with the given test run Id. - * - * @param testRunId Unique test run identifier for the load test run, must contain only lower-case alphabetic, + * Update the latest insights for the test run. + * + * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, * numeric, underscore or hyphen characters. - * @param body The resource instance. + * @param body Test run insights model. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return load test run model. + * @return represents insights for the test run. */ @Generated @ServiceMethod(returns = ReturnType.SINGLE) - LoadTestRun createOrUpdateTestRun(String testRunId, LoadTestRun body) { - // Generated convenience method for createOrUpdateTestRunWithResponse + public TestRunInsights updateLatestTestRunInsights(String testRunId, TestRunInsights body) { + // Generated convenience method for updateLatestTestRunInsightsWithResponse RequestOptions requestOptions = new RequestOptions(); - JsonMergePatchHelper.getLoadTestRunAccessor().prepareModelForJsonMergePatch(body, true); + JsonMergePatchHelper.getTestRunInsightsAccessor().prepareModelForJsonMergePatch(body, true); BinaryData bodyInBinaryData = BinaryData.fromObject(body); // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization. bodyInBinaryData.getLength(); - JsonMergePatchHelper.getLoadTestRunAccessor().prepareModelForJsonMergePatch(body, false); - return createOrUpdateTestRunWithResponse(testRunId, bodyInBinaryData, requestOptions).getValue() - .toObject(LoadTestRun.class); - } - - @Generated - private final LoadTestRunClientImpl serviceClient; - - /** - * Initializes an instance of LoadTestRunClient class. - * - * @param serviceClient the service client implementation. - */ - @Generated - LoadTestRunClient(LoadTestRunClientImpl serviceClient) { - this.serviceClient = serviceClient; + JsonMergePatchHelper.getTestRunInsightsAccessor().prepareModelForJsonMergePatch(body, false); + return updateLatestTestRunInsightsWithResponse(testRunId, bodyInBinaryData, requestOptions).getValue() + .toObject(TestRunInsights.class); } /** - * Get all test runs for the given filters. - * - * @param orderBy Sort on the supported fields in (field asc/desc) format. eg: executedDateTime - * asc. Supported fields - executedDateTime. - * @param search Prefix 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. - * @param testId Unique name of an existing load test. - * @param executionFrom Start DateTime(RFC 3339 literal format) of test-run execution time filter range. - * @param executionTo End DateTime(RFC 3339 literal format) of test-run execution time filter range. - * @param status Comma separated list of test run status. - * @param createdByTypes Comma separated list of type of entities that have created the test run. + * Generate insights for the test run. + * + * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, + * numeric, underscore or hyphen characters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @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. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all test runs for the given filters as paginated response with {@link PagedIterable}. + * @return the {@link SyncPoller} for polling of status of a long running operation. */ @Generated - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listTestRuns(String orderBy, String search, String testId, - OffsetDateTime executionFrom, OffsetDateTime executionTo, String status, List createdByTypes) { - // Generated convenience method for listTestRuns + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller beginGenerateTestRunInsights(String testRunId) { + // Generated convenience method for beginGenerateTestRunInsightsWithModel RequestOptions requestOptions = new RequestOptions(); - if (orderBy != null) { - requestOptions.addQueryParam("orderby", orderBy, false); - } - if (search != null) { - requestOptions.addQueryParam("search", search, false); - } - if (testId != null) { - requestOptions.addQueryParam("testId", testId, false); - } - if (executionFrom != null) { - requestOptions.addQueryParam("executionFrom", String.valueOf(executionFrom), false); - } - if (executionTo != null) { - requestOptions.addQueryParam("executionTo", String.valueOf(executionTo), false); - } - if (status != null) { - requestOptions.addQueryParam("status", status, false); - } - if (createdByTypes != null) { - requestOptions.addQueryParam("createdByTypes", - createdByTypes.stream() - .map(paramItemValue -> Objects.toString(paramItemValue, "")) - .collect(Collectors.joining(",")), - false); - } - return serviceClient.listTestRuns(requestOptions) - .mapPage(bodyItemValue -> bodyItemValue.toObject(LoadTestRun.class)); + return serviceClient.beginGenerateTestRunInsightsWithModel(testRunId, requestOptions); } } 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 57fb818630b4..a66b51ab7dc7 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 @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting; import com.azure.core.annotation.Generated; @@ -46,7 +47,6 @@ public final class LoadTestRunClientBuilder implements HttpTrait, ConfigurationTrait, TokenCredentialTrait, EndpointTrait { - @Generated private static final String SDK_NAME = "name"; @@ -56,6 +56,10 @@ public final class LoadTestRunClientBuilder @Generated private static final String[] DEFAULT_SCOPES = new String[] { "https://cnt-prod.loadtesting.azure.com/.default" }; + @Generated + private static final Map PROPERTIES + = CoreUtils.getProperties("azure-developer-loadtesting.properties"); + @Generated private final List pipelinePolicies; @@ -68,37 +72,37 @@ public LoadTestRunClientBuilder() { } /* - * The HTTP pipeline to send requests through. + * The HTTP client used to send the request. */ @Generated - private HttpPipeline pipeline; + private HttpClient httpClient; /** * {@inheritDoc}. */ @Generated @Override - public LoadTestRunClientBuilder pipeline(HttpPipeline pipeline) { - if (this.pipeline != null && pipeline == null) { - LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); - } - this.pipeline = pipeline; + public LoadTestRunClientBuilder httpClient(HttpClient httpClient) { + this.httpClient = httpClient; return this; } /* - * The HTTP client used to send the request. + * The HTTP pipeline to send requests through. */ @Generated - private HttpClient httpClient; + private HttpPipeline pipeline; /** * {@inheritDoc}. */ @Generated @Override - public LoadTestRunClientBuilder httpClient(HttpClient httpClient) { - this.httpClient = httpClient; + public LoadTestRunClientBuilder pipeline(HttpPipeline pipeline) { + if (this.pipeline != null && pipeline == null) { + LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured."); + } + this.pipeline = pipeline; return this; } @@ -217,7 +221,7 @@ public LoadTestRunClientBuilder endpoint(String endpoint) { /** * Sets Service version. - * + * * @param serviceVersion the serviceVersion value. * @return the LoadTestRunClientBuilder. */ @@ -235,7 +239,7 @@ public LoadTestRunClientBuilder serviceVersion(LoadTestingServiceVersion service /** * Sets The retry policy that will attempt to retry failed requests, if applicable. - * + * * @param retryPolicy the retryPolicy value. * @return the LoadTestRunClientBuilder. */ @@ -247,7 +251,7 @@ public LoadTestRunClientBuilder retryPolicy(RetryPolicy retryPolicy) { /** * Builds an instance of LoadTestRunClientImpl with the provided parameters. - * + * * @return an instance of LoadTestRunClientImpl. */ @Generated @@ -261,6 +265,13 @@ private LoadTestRunClientImpl buildInnerClient() { return client; } + @Generated + private void validateClient() { + // This method is invoked from 'buildInnerClient'/'buildClient' method. + // Developer can customize this method, to validate that the necessary conditions are met for the new client. + Objects.requireNonNull(endpoint, "'endpoint' cannot be null."); + } + @Generated private HttpPipeline createHttpPipeline() { Configuration buildConfiguration @@ -301,7 +312,7 @@ private HttpPipeline createHttpPipeline() { /** * Builds an instance of LoadTestRunAsyncClient class. - * + * * @return an instance of LoadTestRunAsyncClient. */ @Generated @@ -311,7 +322,7 @@ public LoadTestRunAsyncClient buildAsyncClient() { /** * Builds an instance of LoadTestRunClient class. - * + * * @return an instance of LoadTestRunClient. */ @Generated @@ -319,16 +330,5 @@ public LoadTestRunClient buildClient() { return new LoadTestRunClient(buildInnerClient()); } - @Generated - private static final Map PROPERTIES - = CoreUtils.getProperties("azure-developer-loadtesting.properties"); - private static final ClientLogger LOGGER = new ClientLogger(LoadTestRunClientBuilder.class); - - @Generated - private void validateClient() { - // This method is invoked from 'buildInnerClient'/'buildClient' method. - // Developer can customize this method, to validate that the necessary conditions are met for the new client. - Objects.requireNonNull(endpoint, "'endpoint' cannot be null."); - } } 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 592413907231..04ed2a9ed79e 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 @@ -38,7 +38,17 @@ public enum LoadTestingServiceVersion implements ServiceVersion { /** * Enum value 2024-12-01-preview. */ - V2024_12_01_PREVIEW("2024-12-01-preview"); + V2024_12_01_PREVIEW("2024-12-01-preview"), + + /** + * Enum value 2025-03-01-preview. + */ + V2025_03_01_PREVIEW("2025-03-01-preview"), + + /** + * Enum value 2025-11-01-preview. + */ + V2025_11_01_PREVIEW("2025-11-01-preview"); private final String version; @@ -60,6 +70,6 @@ public String getVersion() { * @return The latest {@link LoadTestingServiceVersion}. */ public static LoadTestingServiceVersion getLatest() { - return V2024_12_01_PREVIEW; + return V2025_11_01_PREVIEW; } } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/implementation/JsonMergePatchHelper.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/implementation/JsonMergePatchHelper.java index 77bff80e025a..bcda5aeae970 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/implementation/JsonMergePatchHelper.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/implementation/JsonMergePatchHelper.java @@ -10,21 +10,33 @@ import com.azure.developer.loadtesting.models.LoadTestConfiguration; import com.azure.developer.loadtesting.models.LoadTestRun; import com.azure.developer.loadtesting.models.LoadTestingAppComponent; +import com.azure.developer.loadtesting.models.NotificationRule; import com.azure.developer.loadtesting.models.OptionalLoadTestConfiguration; import com.azure.developer.loadtesting.models.PassFailCriteria; import com.azure.developer.loadtesting.models.PassFailMetric; import com.azure.developer.loadtesting.models.PassFailServerMetric; +import com.azure.developer.loadtesting.models.Recurrence; +import com.azure.developer.loadtesting.models.RecurrenceEnd; import com.azure.developer.loadtesting.models.RegionalConfiguration; import com.azure.developer.loadtesting.models.ResourceMetric; +import com.azure.developer.loadtesting.models.StateDetails; import com.azure.developer.loadtesting.models.TargetResourceConfigurations; import com.azure.developer.loadtesting.models.TestAppComponents; import com.azure.developer.loadtesting.models.TestCertificate; +import com.azure.developer.loadtesting.models.TestPreferences; import com.azure.developer.loadtesting.models.TestProfile; import com.azure.developer.loadtesting.models.TestProfileRun; import com.azure.developer.loadtesting.models.TestRunAppComponents; +import com.azure.developer.loadtesting.models.TestRunEndedEventCondition; +import com.azure.developer.loadtesting.models.TestRunInsights; import com.azure.developer.loadtesting.models.TestRunServerMetricsConfiguration; import com.azure.developer.loadtesting.models.TestSecret; import com.azure.developer.loadtesting.models.TestServerMetricsConfiguration; +import com.azure.developer.loadtesting.models.TestsNotificationEventFilter; +import com.azure.developer.loadtesting.models.Trigger; +import com.azure.developer.loadtesting.models.TriggerState; +import java.time.OffsetDateTime; +import java.util.List; /** * This is the Helper class to enable json merge patch serialization for a model. @@ -196,6 +208,22 @@ public static RegionalConfigurationAccessor getRegionalConfigurationAccessor() { return regionalConfigurationAccessor; } + private static TestPreferencesAccessor testPreferencesAccessor; + + public interface TestPreferencesAccessor { + TestPreferences prepareModelForJsonMergePatch(TestPreferences testPreferences, boolean jsonMergePatchEnabled); + + boolean isJsonMergePatch(TestPreferences testPreferences); + } + + public static void setTestPreferencesAccessor(TestPreferencesAccessor accessor) { + testPreferencesAccessor = accessor; + } + + public static TestPreferencesAccessor getTestPreferencesAccessor() { + return testPreferencesAccessor; + } + private static TestAppComponentsAccessor testAppComponentsAccessor; public interface TestAppComponentsAccessor { @@ -317,6 +345,139 @@ public static void setFunctionFlexConsumptionResourceConfigurationAccessor( return functionFlexConsumptionResourceConfigurationAccessor; } + private static TriggerAccessor triggerAccessor; + + public interface TriggerAccessor { + Trigger prepareModelForJsonMergePatch(Trigger trigger, boolean jsonMergePatchEnabled); + + boolean isJsonMergePatch(Trigger trigger); + + void setTriggerId(Trigger trigger, String triggerId); + + void setDisplayName(Trigger trigger, String displayName); + + void setDescription(Trigger trigger, String description); + + void setState(Trigger trigger, TriggerState state); + + void setStateDetails(Trigger trigger, StateDetails stateDetails); + + void setCreatedDateTime(Trigger trigger, OffsetDateTime createdDateTime); + + void setCreatedBy(Trigger trigger, String createdBy); + + void setLastModifiedDateTime(Trigger trigger, OffsetDateTime lastModifiedDateTime); + + void setLastModifiedBy(Trigger trigger, String lastModifiedBy); + } + + public static void setTriggerAccessor(TriggerAccessor accessor) { + triggerAccessor = accessor; + } + + public static TriggerAccessor getTriggerAccessor() { + return triggerAccessor; + } + + private static RecurrenceAccessor recurrenceAccessor; + + public interface RecurrenceAccessor { + Recurrence prepareModelForJsonMergePatch(Recurrence recurrence, boolean jsonMergePatchEnabled); + + boolean isJsonMergePatch(Recurrence recurrence); + + void setRecurrenceEnd(Recurrence recurrence, RecurrenceEnd recurrenceEnd); + } + + public static void setRecurrenceAccessor(RecurrenceAccessor accessor) { + recurrenceAccessor = accessor; + } + + public static RecurrenceAccessor getRecurrenceAccessor() { + return recurrenceAccessor; + } + + private static RecurrenceEndAccessor recurrenceEndAccessor; + + public interface RecurrenceEndAccessor { + RecurrenceEnd prepareModelForJsonMergePatch(RecurrenceEnd recurrenceEnd, boolean jsonMergePatchEnabled); + + boolean isJsonMergePatch(RecurrenceEnd recurrenceEnd); + } + + public static void setRecurrenceEndAccessor(RecurrenceEndAccessor accessor) { + recurrenceEndAccessor = accessor; + } + + public static RecurrenceEndAccessor getRecurrenceEndAccessor() { + return recurrenceEndAccessor; + } + + private static NotificationRuleAccessor notificationRuleAccessor; + + public interface NotificationRuleAccessor { + NotificationRule prepareModelForJsonMergePatch(NotificationRule notificationRule, + boolean jsonMergePatchEnabled); + + boolean isJsonMergePatch(NotificationRule notificationRule); + + void setNotificationRuleId(NotificationRule notificationRule, String notificationRuleId); + + void setDisplayName(NotificationRule notificationRule, String displayName); + + void setActionGroupIds(NotificationRule notificationRule, List actionGroupIds); + + void setCreatedDateTime(NotificationRule notificationRule, OffsetDateTime createdDateTime); + + void setCreatedBy(NotificationRule notificationRule, String createdBy); + + void setLastModifiedDateTime(NotificationRule notificationRule, OffsetDateTime lastModifiedDateTime); + + void setLastModifiedBy(NotificationRule notificationRule, String lastModifiedBy); + } + + public static void setNotificationRuleAccessor(NotificationRuleAccessor accessor) { + notificationRuleAccessor = accessor; + } + + public static NotificationRuleAccessor getNotificationRuleAccessor() { + return notificationRuleAccessor; + } + + private static TestsNotificationEventFilterAccessor testsNotificationEventFilterAccessor; + + public interface TestsNotificationEventFilterAccessor { + TestsNotificationEventFilter prepareModelForJsonMergePatch( + TestsNotificationEventFilter testsNotificationEventFilter, boolean jsonMergePatchEnabled); + + boolean isJsonMergePatch(TestsNotificationEventFilter testsNotificationEventFilter); + } + + public static void setTestsNotificationEventFilterAccessor(TestsNotificationEventFilterAccessor accessor) { + testsNotificationEventFilterAccessor = accessor; + } + + public static TestsNotificationEventFilterAccessor getTestsNotificationEventFilterAccessor() { + return testsNotificationEventFilterAccessor; + } + + private static TestRunEndedEventConditionAccessor testRunEndedEventConditionAccessor; + + public interface TestRunEndedEventConditionAccessor { + TestRunEndedEventCondition prepareModelForJsonMergePatch(TestRunEndedEventCondition testRunEndedEventCondition, + boolean jsonMergePatchEnabled); + + boolean isJsonMergePatch(TestRunEndedEventCondition testRunEndedEventCondition); + } + + public static void setTestRunEndedEventConditionAccessor(TestRunEndedEventConditionAccessor accessor) { + testRunEndedEventConditionAccessor = accessor; + } + + public static TestRunEndedEventConditionAccessor getTestRunEndedEventConditionAccessor() { + return testRunEndedEventConditionAccessor; + } + private static LoadTestRunAccessor loadTestRunAccessor; public interface LoadTestRunAccessor { @@ -383,4 +544,20 @@ public static void setTestProfileRunAccessor(TestProfileRunAccessor accessor) { public static TestProfileRunAccessor getTestProfileRunAccessor() { return testProfileRunAccessor; } + + private static TestRunInsightsAccessor testRunInsightsAccessor; + + public interface TestRunInsightsAccessor { + TestRunInsights prepareModelForJsonMergePatch(TestRunInsights testRunInsights, boolean jsonMergePatchEnabled); + + boolean isJsonMergePatch(TestRunInsights testRunInsights); + } + + public static void setTestRunInsightsAccessor(TestRunInsightsAccessor accessor) { + testRunInsightsAccessor = accessor; + } + + public static TestRunInsightsAccessor getTestRunInsightsAccessor() { + return testRunInsightsAccessor; + } } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/implementation/LoadTestAdministrationClientImpl.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/implementation/LoadTestAdministrationClientImpl.java index 255296fc4442..e884ab8a4bdf 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/implementation/LoadTestAdministrationClientImpl.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/implementation/LoadTestAdministrationClientImpl.java @@ -13,6 +13,7 @@ import com.azure.core.annotation.HostParam; import com.azure.core.annotation.Patch; import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; import com.azure.core.annotation.Put; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; @@ -38,9 +39,18 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.UrlBuilder; +import com.azure.core.util.polling.DefaultPollingStrategy; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.PollingStrategyOptions; +import com.azure.core.util.polling.SyncDefaultPollingStrategy; +import com.azure.core.util.polling.SyncPoller; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; +import com.azure.core.util.serializer.TypeReference; import com.azure.developer.loadtesting.LoadTestingServiceVersion; +import com.azure.developer.loadtesting.models.LoadTest; +import com.azure.developer.loadtesting.models.OperationStatus; +import java.time.Duration; import java.util.List; import java.util.Map; import java.util.stream.Collectors; @@ -378,8 +388,7 @@ Response uploadTestFileSync(@HostParam("endpoint") String endpoint, @UnexpectedResponseExceptionType(HttpResponseException.class) Mono> deleteTestFile(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("testId") String testId, - @PathParam("fileName") String fileName, @HeaderParam("Accept") String accept, RequestOptions requestOptions, - Context context); + @PathParam("fileName") String fileName, RequestOptions requestOptions, Context context); @Delete("/tests/{testId}/files/{fileName}") @ExpectedResponses({ 204 }) @@ -389,8 +398,7 @@ Mono> deleteTestFile(@HostParam("endpoint") String endpoint, @UnexpectedResponseExceptionType(HttpResponseException.class) Response deleteTestFileSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("testId") String testId, - @PathParam("fileName") String fileName, @HeaderParam("Accept") String accept, RequestOptions requestOptions, - Context context); + @PathParam("fileName") String fileName, RequestOptions requestOptions, Context context); @Delete("/tests/{testId}") @ExpectedResponses({ 204 }) @@ -400,7 +408,7 @@ Response deleteTestFileSync(@HostParam("endpoint") String endpoint, @UnexpectedResponseExceptionType(HttpResponseException.class) Mono> deleteTest(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("testId") String testId, - @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + RequestOptions requestOptions, Context context); @Delete("/tests/{testId}") @ExpectedResponses({ 204 }) @@ -410,7 +418,7 @@ Mono> deleteTest(@HostParam("endpoint") String endpoint, @UnexpectedResponseExceptionType(HttpResponseException.class) Response deleteTestSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("testId") String testId, - @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + RequestOptions requestOptions, Context context); @Patch("/test-profiles/{testProfileId}") @ExpectedResponses({ 200, 201 }) @@ -442,7 +450,7 @@ Response createOrUpdateTestProfileSync(@HostParam("endpoint") String @UnexpectedResponseExceptionType(HttpResponseException.class) Mono> deleteTestProfile(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("testProfileId") String testProfileId, - @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + RequestOptions requestOptions, Context context); @Delete("/test-profiles/{testProfileId}") @ExpectedResponses({ 204 }) @@ -452,7 +460,7 @@ Mono> deleteTestProfile(@HostParam("endpoint") String endpoint, @UnexpectedResponseExceptionType(HttpResponseException.class) Response deleteTestProfileSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("testProfileId") String testProfileId, - @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + RequestOptions requestOptions, Context context); @Get("/test-profiles/{testProfileId}") @ExpectedResponses({ 200 }) @@ -494,6 +502,234 @@ Response listTestProfilesSync(@HostParam("endpoint") String endpoint @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + @Patch("/triggers/{triggerId}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> createOrUpdateTrigger(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("triggerId") String triggerId, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/merge-patch+json") BinaryData body, RequestOptions requestOptions, Context context); + + @Patch("/triggers/{triggerId}") + @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 createOrUpdateTriggerSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("triggerId") String triggerId, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/merge-patch+json") BinaryData body, RequestOptions requestOptions, Context context); + + @Delete("/triggers/{triggerId}") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> deleteTrigger(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("triggerId") String triggerId, + RequestOptions requestOptions, Context context); + + @Delete("/triggers/{triggerId}") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response deleteTriggerSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("triggerId") String triggerId, + RequestOptions requestOptions, Context context); + + @Get("/triggers/{triggerId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getTrigger(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("triggerId") String triggerId, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/triggers/{triggerId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getTriggerSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("triggerId") String triggerId, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/triggers") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listTriggers(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/triggers") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listTriggersSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Patch("/notification-rules/{notificationRuleId}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> createOrUpdateNotificationRule(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("notificationRuleId") String notificationRuleId, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/merge-patch+json") BinaryData body, RequestOptions requestOptions, Context context); + + @Patch("/notification-rules/{notificationRuleId}") + @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 createOrUpdateNotificationRuleSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("notificationRuleId") String notificationRuleId, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/merge-patch+json") BinaryData body, RequestOptions requestOptions, Context context); + + @Delete("/notification-rules/{notificationRuleId}") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> deleteNotificationRule(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("notificationRuleId") String notificationRuleId, + RequestOptions requestOptions, Context context); + + @Delete("/notification-rules/{notificationRuleId}") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response deleteNotificationRuleSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("notificationRuleId") String notificationRuleId, + RequestOptions requestOptions, Context context); + + @Get("/notification-rules/{notificationRuleId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getNotificationRule(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("notificationRuleId") String notificationRuleId, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/notification-rules/{notificationRuleId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getNotificationRuleSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("notificationRuleId") String notificationRuleId, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/notification-rules") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> listNotificationRules(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/notification-rules") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response listNotificationRulesSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Post("/tests/{testId}:clone") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> cloneTest(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("testId") String testId, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") BinaryData cloneTestRequest1, RequestOptions requestOptions, + Context context); + + @Post("/tests/{testId}:clone") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response cloneTestSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("testId") String testId, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") BinaryData cloneTestRequest1, RequestOptions requestOptions, + Context context); + + @Post("/tests/{testId}:generateTestPlanRecommendations") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> generateTestPlanRecommendations(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("testId") String testId, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Post("/tests/{testId}:generateTestPlanRecommendations") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response generateTestPlanRecommendationsSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("testId") String testId, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/operations/{operationId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getOperationStatus(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("operationId") String operationId, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/operations/{operationId}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getOperationStatusSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("operationId") String operationId, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) @@ -553,6 +789,46 @@ Mono> listTestProfilesNext(@PathParam(value = "nextLink", e Response listTestProfilesNextSync(@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> listTriggersNext(@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 listTriggersNextSync(@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> listNotificationRulesNext( + @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 listNotificationRulesNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); } /** @@ -593,6 +869,7 @@ Response listTestProfilesNextSync(@PathParam(value = "nextLink", enc * autoStopDisabled: Boolean (Optional) * errorRate: Double (Optional) * errorRateTimeWindowInSeconds: Long (Optional) + * maximumVirtualUsersPerEngine: Integer (Optional) * } * secrets (Optional): { * String (Required): { @@ -632,7 +909,7 @@ Response listTestProfilesNextSync(@PathParam(value = "nextLink", enc * configFileInfo (Optional): { * fileName: String (Required) * url: String (Optional) - * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional) + * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional) * expireDateTime: OffsetDateTime (Optional) * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional) * validationFailureDetails: String (Optional) @@ -659,6 +936,10 @@ Response listTestProfilesNextSync(@PathParam(value = "nextLink", enc * engineBuiltInIdentityIds (Optional): [ * String (Optional) * ] + * estimatedVirtualUserHours: Double (Optional) + * preferences (Optional): { + * enableAIErrorInsights: Boolean (Optional) + * } * createdDateTime: OffsetDateTime (Optional) * createdBy: String (Optional) * lastModifiedDateTime: OffsetDateTime (Optional) @@ -703,6 +984,7 @@ Response listTestProfilesNextSync(@PathParam(value = "nextLink", enc * autoStopDisabled: Boolean (Optional) * errorRate: Double (Optional) * errorRateTimeWindowInSeconds: Long (Optional) + * maximumVirtualUsersPerEngine: Integer (Optional) * } * secrets (Optional): { * String (Required): { @@ -742,7 +1024,7 @@ Response listTestProfilesNextSync(@PathParam(value = "nextLink", enc * configFileInfo (Optional): { * fileName: String (Required) * url: String (Optional) - * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional) + * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional) * expireDateTime: OffsetDateTime (Optional) * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional) * validationFailureDetails: String (Optional) @@ -769,6 +1051,10 @@ Response listTestProfilesNextSync(@PathParam(value = "nextLink", enc * engineBuiltInIdentityIds (Optional): [ * String (Optional) * ] + * estimatedVirtualUserHours: Double (Optional) + * preferences (Optional): { + * enableAIErrorInsights: Boolean (Optional) + * } * createdDateTime: OffsetDateTime (Optional) * createdBy: String (Optional) * lastModifiedDateTime: OffsetDateTime (Optional) @@ -834,6 +1120,7 @@ public Mono> createOrUpdateTestWithResponseAsync(String tes * autoStopDisabled: Boolean (Optional) * errorRate: Double (Optional) * errorRateTimeWindowInSeconds: Long (Optional) + * maximumVirtualUsersPerEngine: Integer (Optional) * } * secrets (Optional): { * String (Required): { @@ -873,7 +1160,7 @@ public Mono> createOrUpdateTestWithResponseAsync(String tes * configFileInfo (Optional): { * fileName: String (Required) * url: String (Optional) - * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional) + * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional) * expireDateTime: OffsetDateTime (Optional) * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional) * validationFailureDetails: String (Optional) @@ -900,6 +1187,10 @@ public Mono> createOrUpdateTestWithResponseAsync(String tes * engineBuiltInIdentityIds (Optional): [ * String (Optional) * ] + * estimatedVirtualUserHours: Double (Optional) + * preferences (Optional): { + * enableAIErrorInsights: Boolean (Optional) + * } * createdDateTime: OffsetDateTime (Optional) * createdBy: String (Optional) * lastModifiedDateTime: OffsetDateTime (Optional) @@ -944,6 +1235,7 @@ public Mono> createOrUpdateTestWithResponseAsync(String tes * autoStopDisabled: Boolean (Optional) * errorRate: Double (Optional) * errorRateTimeWindowInSeconds: Long (Optional) + * maximumVirtualUsersPerEngine: Integer (Optional) * } * secrets (Optional): { * String (Required): { @@ -983,7 +1275,7 @@ public Mono> createOrUpdateTestWithResponseAsync(String tes * configFileInfo (Optional): { * fileName: String (Required) * url: String (Optional) - * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional) + * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional) * expireDateTime: OffsetDateTime (Optional) * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional) * validationFailureDetails: String (Optional) @@ -1010,6 +1302,10 @@ public Mono> createOrUpdateTestWithResponseAsync(String tes * engineBuiltInIdentityIds (Optional): [ * String (Optional) * ] + * estimatedVirtualUserHours: Double (Optional) + * preferences (Optional): { + * enableAIErrorInsights: Boolean (Optional) + * } * createdDateTime: OffsetDateTime (Optional) * createdBy: String (Optional) * lastModifiedDateTime: OffsetDateTime (Optional) @@ -1543,6 +1839,7 @@ public Response getServerMetricsConfigWithResponse(String testId, Re * autoStopDisabled: Boolean (Optional) * errorRate: Double (Optional) * errorRateTimeWindowInSeconds: Long (Optional) + * maximumVirtualUsersPerEngine: Integer (Optional) * } * secrets (Optional): { * String (Required): { @@ -1582,7 +1879,7 @@ public Response getServerMetricsConfigWithResponse(String testId, Re * configFileInfo (Optional): { * fileName: String (Required) * url: String (Optional) - * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional) + * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional) * expireDateTime: OffsetDateTime (Optional) * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional) * validationFailureDetails: String (Optional) @@ -1609,6 +1906,10 @@ public Response getServerMetricsConfigWithResponse(String testId, Re * engineBuiltInIdentityIds (Optional): [ * String (Optional) * ] + * estimatedVirtualUserHours: Double (Optional) + * preferences (Optional): { + * enableAIErrorInsights: Boolean (Optional) + * } * createdDateTime: OffsetDateTime (Optional) * createdBy: String (Optional) * lastModifiedDateTime: OffsetDateTime (Optional) @@ -1671,6 +1972,7 @@ public Mono> getTestWithResponseAsync(String testId, Reques * autoStopDisabled: Boolean (Optional) * errorRate: Double (Optional) * errorRateTimeWindowInSeconds: Long (Optional) + * maximumVirtualUsersPerEngine: Integer (Optional) * } * secrets (Optional): { * String (Required): { @@ -1710,7 +2012,7 @@ public Mono> getTestWithResponseAsync(String testId, Reques * configFileInfo (Optional): { * fileName: String (Required) * url: String (Optional) - * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional) + * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional) * expireDateTime: OffsetDateTime (Optional) * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional) * validationFailureDetails: String (Optional) @@ -1737,6 +2039,10 @@ public Mono> getTestWithResponseAsync(String testId, Reques * engineBuiltInIdentityIds (Optional): [ * String (Optional) * ] + * estimatedVirtualUserHours: Double (Optional) + * preferences (Optional): { + * enableAIErrorInsights: Boolean (Optional) + * } * createdDateTime: OffsetDateTime (Optional) * createdBy: String (Optional) * lastModifiedDateTime: OffsetDateTime (Optional) @@ -1770,7 +2076,7 @@ public Response getTestWithResponse(String testId, RequestOptions re * { * fileName: String (Required) * url: String (Optional) - * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional) + * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional) * expireDateTime: OffsetDateTime (Optional) * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional) * validationFailureDetails: String (Optional) @@ -1806,7 +2112,7 @@ public Mono> getTestFileWithResponseAsync(String testId, St * { * fileName: String (Required) * url: String (Optional) - * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional) + * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional) * expireDateTime: OffsetDateTime (Optional) * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional) * validationFailureDetails: String (Optional) @@ -1840,7 +2146,7 @@ public Response getTestFileWithResponse(String testId, String fileNa * { * fileName: String (Required) * url: String (Optional) - * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional) + * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional) * expireDateTime: OffsetDateTime (Optional) * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional) * validationFailureDetails: String (Optional) @@ -1876,7 +2182,7 @@ private Mono> listTestFilesSinglePageAsync(String test * { * fileName: String (Required) * url: String (Optional) - * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional) + * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional) * expireDateTime: OffsetDateTime (Optional) * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional) * validationFailureDetails: String (Optional) @@ -1911,7 +2217,7 @@ public PagedFlux listTestFilesAsync(String testId, RequestOptions re * { * fileName: String (Required) * url: String (Optional) - * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional) + * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional) * expireDateTime: OffsetDateTime (Optional) * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional) * validationFailureDetails: String (Optional) @@ -1946,7 +2252,7 @@ private PagedResponse listTestFilesSinglePage(String testId, Request * { * fileName: String (Required) * url: String (Optional) - * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional) + * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional) * expireDateTime: OffsetDateTime (Optional) * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional) * validationFailureDetails: String (Optional) @@ -2028,6 +2334,7 @@ public PagedIterable listTestFiles(String testId, RequestOptions req * autoStopDisabled: Boolean (Optional) * errorRate: Double (Optional) * errorRateTimeWindowInSeconds: Long (Optional) + * maximumVirtualUsersPerEngine: Integer (Optional) * } * secrets (Optional): { * String (Required): { @@ -2067,7 +2374,7 @@ public PagedIterable listTestFiles(String testId, RequestOptions req * configFileInfo (Optional): { * fileName: String (Required) * url: String (Optional) - * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional) + * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional) * expireDateTime: OffsetDateTime (Optional) * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional) * validationFailureDetails: String (Optional) @@ -2094,6 +2401,10 @@ public PagedIterable listTestFiles(String testId, RequestOptions req * engineBuiltInIdentityIds (Optional): [ * String (Optional) * ] + * estimatedVirtualUserHours: Double (Optional) + * preferences (Optional): { + * enableAIErrorInsights: Boolean (Optional) + * } * createdDateTime: OffsetDateTime (Optional) * createdBy: String (Optional) * lastModifiedDateTime: OffsetDateTime (Optional) @@ -2177,6 +2488,7 @@ private Mono> listTestsSinglePageAsync(RequestOptions * autoStopDisabled: Boolean (Optional) * errorRate: Double (Optional) * errorRateTimeWindowInSeconds: Long (Optional) + * maximumVirtualUsersPerEngine: Integer (Optional) * } * secrets (Optional): { * String (Required): { @@ -2216,7 +2528,7 @@ private Mono> listTestsSinglePageAsync(RequestOptions * configFileInfo (Optional): { * fileName: String (Required) * url: String (Optional) - * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional) + * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional) * expireDateTime: OffsetDateTime (Optional) * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional) * validationFailureDetails: String (Optional) @@ -2243,6 +2555,10 @@ private Mono> listTestsSinglePageAsync(RequestOptions * engineBuiltInIdentityIds (Optional): [ * String (Optional) * ] + * estimatedVirtualUserHours: Double (Optional) + * preferences (Optional): { + * enableAIErrorInsights: Boolean (Optional) + * } * createdDateTime: OffsetDateTime (Optional) * createdBy: String (Optional) * lastModifiedDateTime: OffsetDateTime (Optional) @@ -2345,6 +2661,7 @@ public PagedFlux listTestsAsync(RequestOptions requestOptions) { * autoStopDisabled: Boolean (Optional) * errorRate: Double (Optional) * errorRateTimeWindowInSeconds: Long (Optional) + * maximumVirtualUsersPerEngine: Integer (Optional) * } * secrets (Optional): { * String (Required): { @@ -2384,7 +2701,7 @@ public PagedFlux listTestsAsync(RequestOptions requestOptions) { * configFileInfo (Optional): { * fileName: String (Required) * url: String (Optional) - * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional) + * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional) * expireDateTime: OffsetDateTime (Optional) * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional) * validationFailureDetails: String (Optional) @@ -2411,6 +2728,10 @@ public PagedFlux listTestsAsync(RequestOptions requestOptions) { * engineBuiltInIdentityIds (Optional): [ * String (Optional) * ] + * estimatedVirtualUserHours: Double (Optional) + * preferences (Optional): { + * enableAIErrorInsights: Boolean (Optional) + * } * createdDateTime: OffsetDateTime (Optional) * createdBy: String (Optional) * lastModifiedDateTime: OffsetDateTime (Optional) @@ -2493,6 +2814,7 @@ private PagedResponse listTestsSinglePage(RequestOptions requestOpti * autoStopDisabled: Boolean (Optional) * errorRate: Double (Optional) * errorRateTimeWindowInSeconds: Long (Optional) + * maximumVirtualUsersPerEngine: Integer (Optional) * } * secrets (Optional): { * String (Required): { @@ -2532,7 +2854,7 @@ private PagedResponse listTestsSinglePage(RequestOptions requestOpti * configFileInfo (Optional): { * fileName: String (Required) * url: String (Optional) - * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional) + * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional) * expireDateTime: OffsetDateTime (Optional) * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional) * validationFailureDetails: String (Optional) @@ -2559,6 +2881,10 @@ private PagedResponse listTestsSinglePage(RequestOptions requestOpti * engineBuiltInIdentityIds (Optional): [ * String (Optional) * ] + * estimatedVirtualUserHours: Double (Optional) + * preferences (Optional): { + * enableAIErrorInsights: Boolean (Optional) + * } * createdDateTime: OffsetDateTime (Optional) * createdBy: String (Optional) * lastModifiedDateTime: OffsetDateTime (Optional) @@ -2614,7 +2940,8 @@ public PagedIterable listTests(RequestOptions requestOptions) { * Query Parameters * NameTypeRequiredDescription * fileTypeStringNoFile type. Allowed values: "JMX_FILE", "USER_PROPERTIES", - * "ADDITIONAL_ARTIFACTS", "ZIPPED_ARTIFACTS", "URL_TEST_CONFIG", "TEST_SCRIPT". + * "ADDITIONAL_ARTIFACTS", "ZIPPED_ARTIFACTS", "URL_TEST_CONFIG", "TEST_SCRIPT", "BROWSER_RECORDING", + * "TEST_PLAN_RECOMMENDATIONS". * * You can add these to a request with {@link RequestOptions#addQueryParam} *

Request Body Schema

@@ -2632,7 +2959,7 @@ public PagedIterable listTests(RequestOptions requestOptions) { * { * fileName: String (Required) * url: String (Optional) - * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional) + * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional) * expireDateTime: OffsetDateTime (Optional) * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional) * validationFailureDetails: String (Optional) @@ -2670,7 +2997,8 @@ public Mono> uploadTestFileWithResponseAsync(String testId, * Query Parameters * NameTypeRequiredDescription * fileTypeStringNoFile type. Allowed values: "JMX_FILE", "USER_PROPERTIES", - * "ADDITIONAL_ARTIFACTS", "ZIPPED_ARTIFACTS", "URL_TEST_CONFIG", "TEST_SCRIPT". + * "ADDITIONAL_ARTIFACTS", "ZIPPED_ARTIFACTS", "URL_TEST_CONFIG", "TEST_SCRIPT", "BROWSER_RECORDING", + * "TEST_PLAN_RECOMMENDATIONS". * * You can add these to a request with {@link RequestOptions#addQueryParam} *

Request Body Schema

@@ -2688,7 +3016,7 @@ public Mono> uploadTestFileWithResponseAsync(String testId, * { * fileName: String (Required) * url: String (Optional) - * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional) + * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional) * expireDateTime: OffsetDateTime (Optional) * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional) * validationFailureDetails: String (Optional) @@ -2732,9 +3060,8 @@ public Response uploadTestFileWithResponse(String testId, String fil @ServiceMethod(returns = ReturnType.SINGLE) public Mono> deleteTestFileWithResponseAsync(String testId, String fileName, RequestOptions requestOptions) { - final String accept = "application/json"; return FluxUtil.withContext(context -> service.deleteTestFile(this.getEndpoint(), - this.getServiceVersion().getVersion(), testId, fileName, accept, requestOptions, context)); + this.getServiceVersion().getVersion(), testId, fileName, requestOptions, context)); } /** @@ -2752,9 +3079,8 @@ public Mono> deleteTestFileWithResponseAsync(String testId, Strin */ @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteTestFileWithResponse(String testId, String fileName, RequestOptions requestOptions) { - final String accept = "application/json"; return service.deleteTestFileSync(this.getEndpoint(), this.getServiceVersion().getVersion(), testId, fileName, - accept, requestOptions, Context.NONE); + requestOptions, Context.NONE); } /** @@ -2771,9 +3097,8 @@ public Response deleteTestFileWithResponse(String testId, String fileName, */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> deleteTestWithResponseAsync(String testId, RequestOptions requestOptions) { - final String accept = "application/json"; return FluxUtil.withContext(context -> service.deleteTest(this.getEndpoint(), - this.getServiceVersion().getVersion(), testId, accept, requestOptions, context)); + this.getServiceVersion().getVersion(), testId, requestOptions, context)); } /** @@ -2790,9 +3115,8 @@ public Mono> deleteTestWithResponseAsync(String testId, RequestOp */ @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteTestWithResponse(String testId, RequestOptions requestOptions) { - final String accept = "application/json"; - return service.deleteTestSync(this.getEndpoint(), this.getServiceVersion().getVersion(), testId, accept, - requestOptions, Context.NONE); + return service.deleteTestSync(this.getEndpoint(), this.getServiceVersion().getVersion(), testId, requestOptions, + Context.NONE); } /** @@ -2942,9 +3266,8 @@ public Response createOrUpdateTestProfileWithResponse(String testPro @ServiceMethod(returns = ReturnType.SINGLE) public Mono> deleteTestProfileWithResponseAsync(String testProfileId, RequestOptions requestOptions) { - final String accept = "application/json"; return FluxUtil.withContext(context -> service.deleteTestProfile(this.getEndpoint(), - this.getServiceVersion().getVersion(), testProfileId, accept, requestOptions, context)); + this.getServiceVersion().getVersion(), testProfileId, requestOptions, context)); } /** @@ -2963,9 +3286,8 @@ public Mono> deleteTestProfileWithResponseAsync(String testProfil */ @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteTestProfileWithResponse(String testProfileId, RequestOptions requestOptions) { - final String accept = "application/json"; return service.deleteTestProfileSync(this.getEndpoint(), this.getServiceVersion().getVersion(), testProfileId, - accept, requestOptions, Context.NONE); + requestOptions, Context.NONE); } /** @@ -3327,30 +3649,1623 @@ public PagedIterable listTestProfiles(RequestOptions requestOptions) } /** - * Get all test files. - * - * Get the next page of items. - *

Response Body Schema

+ * Create or update operation template. + *

Request Body Schema

* *
      * {@code
      * {
-     *     fileName: String (Required)
-     *     url: String (Optional)
-     *     fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional)
-     *     expireDateTime: OffsetDateTime (Optional)
-     *     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
-     *     validationFailureDetails: String (Optional)
+     *     kind: String(ScheduleTestsTrigger) (Required)
+     *     triggerId: String (Required)
+     *     displayName: String (Optional, Required on create)
+     *     description: String (Optional)
+     *     state: String(Active/Paused/Completed/Disabled) (Optional)
+     *     stateDetails (Optional): {
+     *         message: String (Optional)
+     *     }
+     *     createdDateTime: OffsetDateTime (Optional)
+     *     createdBy: String (Optional)
+     *     lastModifiedDateTime: OffsetDateTime (Optional)
+     *     lastModifiedBy: String (Optional)
      * }
      * }
      * 
* - * @param nextLink The URL to get the next list of items. - * @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. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     kind: String(ScheduleTestsTrigger) (Required)
+     *     triggerId: String (Required)
+     *     displayName: String (Optional, Required on create)
+     *     description: String (Optional)
+     *     state: String(Active/Paused/Completed/Disabled) (Optional)
+     *     stateDetails (Optional): {
+     *         message: String (Optional)
+     *     }
+     *     createdDateTime: OffsetDateTime (Optional)
+     *     createdBy: String (Optional)
+     *     lastModifiedDateTime: OffsetDateTime (Optional)
+     *     lastModifiedBy: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param triggerId The unique identifier of the trigger. + * @param body The resource instance. + * @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 trigger model along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateTriggerWithResponseAsync(String triggerId, BinaryData body, + RequestOptions requestOptions) { + final String contentType = "application/merge-patch+json"; + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.createOrUpdateTrigger(this.getEndpoint(), + this.getServiceVersion().getVersion(), triggerId, contentType, accept, body, requestOptions, context)); + } + + /** + * Create or update operation template. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     kind: String(ScheduleTestsTrigger) (Required)
+     *     triggerId: String (Required)
+     *     displayName: String (Optional, Required on create)
+     *     description: String (Optional)
+     *     state: String(Active/Paused/Completed/Disabled) (Optional)
+     *     stateDetails (Optional): {
+     *         message: String (Optional)
+     *     }
+     *     createdDateTime: OffsetDateTime (Optional)
+     *     createdBy: String (Optional)
+     *     lastModifiedDateTime: OffsetDateTime (Optional)
+     *     lastModifiedBy: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     kind: String(ScheduleTestsTrigger) (Required)
+     *     triggerId: String (Required)
+     *     displayName: String (Optional, Required on create)
+     *     description: String (Optional)
+     *     state: String(Active/Paused/Completed/Disabled) (Optional)
+     *     stateDetails (Optional): {
+     *         message: String (Optional)
+     *     }
+     *     createdDateTime: OffsetDateTime (Optional)
+     *     createdBy: String (Optional)
+     *     lastModifiedDateTime: OffsetDateTime (Optional)
+     *     lastModifiedBy: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param triggerId The unique identifier of the trigger. + * @param body The resource instance. + * @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 trigger model along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateTriggerWithResponse(String triggerId, BinaryData body, + RequestOptions requestOptions) { + final String contentType = "application/merge-patch+json"; + final String accept = "application/json"; + return service.createOrUpdateTriggerSync(this.getEndpoint(), this.getServiceVersion().getVersion(), triggerId, + contentType, accept, body, requestOptions, Context.NONE); + } + + /** + * Resource delete operation template. + * + * @param triggerId The unique identifier of the trigger. + * @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> deleteTriggerWithResponseAsync(String triggerId, RequestOptions requestOptions) { + return FluxUtil.withContext(context -> service.deleteTrigger(this.getEndpoint(), + this.getServiceVersion().getVersion(), triggerId, requestOptions, context)); + } + + /** + * Resource delete operation template. + * + * @param triggerId The unique identifier of the trigger. + * @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 deleteTriggerWithResponse(String triggerId, RequestOptions requestOptions) { + return service.deleteTriggerSync(this.getEndpoint(), this.getServiceVersion().getVersion(), triggerId, + requestOptions, Context.NONE); + } + + /** + * Resource read operation template. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     kind: String(ScheduleTestsTrigger) (Required)
+     *     triggerId: String (Required)
+     *     displayName: String (Optional, Required on create)
+     *     description: String (Optional)
+     *     state: String(Active/Paused/Completed/Disabled) (Optional)
+     *     stateDetails (Optional): {
+     *         message: String (Optional)
+     *     }
+     *     createdDateTime: OffsetDateTime (Optional)
+     *     createdBy: String (Optional)
+     *     lastModifiedDateTime: OffsetDateTime (Optional)
+     *     lastModifiedBy: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param triggerId The unique identifier of the trigger. + * @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 trigger model along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getTriggerWithResponseAsync(String triggerId, RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.getTrigger(this.getEndpoint(), + this.getServiceVersion().getVersion(), triggerId, accept, requestOptions, context)); + } + + /** + * Resource read operation template. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     kind: String(ScheduleTestsTrigger) (Required)
+     *     triggerId: String (Required)
+     *     displayName: String (Optional, Required on create)
+     *     description: String (Optional)
+     *     state: String(Active/Paused/Completed/Disabled) (Optional)
+     *     stateDetails (Optional): {
+     *         message: String (Optional)
+     *     }
+     *     createdDateTime: OffsetDateTime (Optional)
+     *     createdBy: String (Optional)
+     *     lastModifiedDateTime: OffsetDateTime (Optional)
+     *     lastModifiedBy: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param triggerId The unique identifier of the trigger. + * @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 trigger model along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getTriggerWithResponse(String triggerId, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getTriggerSync(this.getEndpoint(), this.getServiceVersion().getVersion(), triggerId, accept, + requestOptions, Context.NONE); + } + + /** + * Resource list operation template. + *

Query Parameters

+ * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
testIdsStringNoSearch based on triggers associated with the provided test + * ids.
statesStringNoFilter triggers based on a comma separated list of states. + * Allowed values: "Active", "Paused", "Completed", "Disabled".
lastModifiedStartTimeOffsetDateTimeNoStart DateTime(RFC 3339 literal format) + * of the last updated time range to filter triggers.
lastModifiedEndTimeOffsetDateTimeNoEnd DateTime(RFC 3339 literal format) of + * the last updated time range to filter triggers.
maxpagesizeIntegerNoNumber of results in response. Default page size is + * 50.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     kind: String(ScheduleTestsTrigger) (Required)
+     *     triggerId: String (Required)
+     *     displayName: String (Optional, Required on create)
+     *     description: String (Optional)
+     *     state: String(Active/Paused/Completed/Disabled) (Optional)
+     *     stateDetails (Optional): {
+     *         message: 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. + * @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 paged collection of Trigger items along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listTriggersSinglePageAsync(RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listTriggers(this.getEndpoint(), this.getServiceVersion().getVersion(), + accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Resource list operation template. + *

Query Parameters

+ * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
testIdsStringNoSearch based on triggers associated with the provided test + * ids.
statesStringNoFilter triggers based on a comma separated list of states. + * Allowed values: "Active", "Paused", "Completed", "Disabled".
lastModifiedStartTimeOffsetDateTimeNoStart DateTime(RFC 3339 literal format) + * of the last updated time range to filter triggers.
lastModifiedEndTimeOffsetDateTimeNoEnd DateTime(RFC 3339 literal format) of + * the last updated time range to filter triggers.
maxpagesizeIntegerNoNumber of results in response. Default page size is + * 50.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     kind: String(ScheduleTestsTrigger) (Required)
+     *     triggerId: String (Required)
+     *     displayName: String (Optional, Required on create)
+     *     description: String (Optional)
+     *     state: String(Active/Paused/Completed/Disabled) (Optional)
+     *     stateDetails (Optional): {
+     *         message: 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. + * @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 paged collection of Trigger items as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listTriggersAsync(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>((pageSize) -> { + RequestOptions requestOptionsLocal = requestOptions == null ? new RequestOptions() : requestOptions; + if (pageSize != null) { + requestOptionsLocal.addRequestCallback(requestLocal -> { + UrlBuilder urlBuilder = UrlBuilder.parse(requestLocal.getUrl()); + urlBuilder.setQueryParameter("maxpagesize", String.valueOf(pageSize)); + requestLocal.setUrl(urlBuilder.toString()); + }); + } + return listTriggersSinglePageAsync(requestOptionsLocal); + }, (nextLink, pageSize) -> { + RequestOptions requestOptionsLocal = new RequestOptions(); + requestOptionsLocal.setContext(requestOptionsForNextPage.getContext()); + if (pageSize != null) { + requestOptionsLocal.addRequestCallback(requestLocal -> { + UrlBuilder urlBuilder = UrlBuilder.parse(requestLocal.getUrl()); + urlBuilder.setQueryParameter("maxpagesize", String.valueOf(pageSize)); + requestLocal.setUrl(urlBuilder.toString()); + }); + } + return listTriggersNextSinglePageAsync(nextLink, requestOptionsLocal); + }); + } + + /** + * Resource list operation template. + *

Query Parameters

+ * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
testIdsStringNoSearch based on triggers associated with the provided test + * ids.
statesStringNoFilter triggers based on a comma separated list of states. + * Allowed values: "Active", "Paused", "Completed", "Disabled".
lastModifiedStartTimeOffsetDateTimeNoStart DateTime(RFC 3339 literal format) + * of the last updated time range to filter triggers.
lastModifiedEndTimeOffsetDateTimeNoEnd DateTime(RFC 3339 literal format) of + * the last updated time range to filter triggers.
maxpagesizeIntegerNoNumber of results in response. Default page size is + * 50.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     kind: String(ScheduleTestsTrigger) (Required)
+     *     triggerId: String (Required)
+     *     displayName: String (Optional, Required on create)
+     *     description: String (Optional)
+     *     state: String(Active/Paused/Completed/Disabled) (Optional)
+     *     stateDetails (Optional): {
+     *         message: 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. + * @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 paged collection of Trigger items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listTriggersSinglePage(RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listTriggersSync(this.getEndpoint(), this.getServiceVersion().getVersion(), + accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Resource list operation template. + *

Query Parameters

+ * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
testIdsStringNoSearch based on triggers associated with the provided test + * ids.
statesStringNoFilter triggers based on a comma separated list of states. + * Allowed values: "Active", "Paused", "Completed", "Disabled".
lastModifiedStartTimeOffsetDateTimeNoStart DateTime(RFC 3339 literal format) + * of the last updated time range to filter triggers.
lastModifiedEndTimeOffsetDateTimeNoEnd DateTime(RFC 3339 literal format) of + * the last updated time range to filter triggers.
maxpagesizeIntegerNoNumber of results in response. Default page size is + * 50.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     kind: String(ScheduleTestsTrigger) (Required)
+     *     triggerId: String (Required)
+     *     displayName: String (Optional, Required on create)
+     *     description: String (Optional)
+     *     state: String(Active/Paused/Completed/Disabled) (Optional)
+     *     stateDetails (Optional): {
+     *         message: 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. + * @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 paged collection of Trigger items as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listTriggers(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>((pageSize) -> { + RequestOptions requestOptionsLocal = requestOptions == null ? new RequestOptions() : requestOptions; + if (pageSize != null) { + requestOptionsLocal.addRequestCallback(requestLocal -> { + UrlBuilder urlBuilder = UrlBuilder.parse(requestLocal.getUrl()); + urlBuilder.setQueryParameter("maxpagesize", String.valueOf(pageSize)); + requestLocal.setUrl(urlBuilder.toString()); + }); + } + return listTriggersSinglePage(requestOptionsLocal); + }, (nextLink, pageSize) -> { + RequestOptions requestOptionsLocal = new RequestOptions(); + requestOptionsLocal.setContext(requestOptionsForNextPage.getContext()); + if (pageSize != null) { + requestOptionsLocal.addRequestCallback(requestLocal -> { + UrlBuilder urlBuilder = UrlBuilder.parse(requestLocal.getUrl()); + urlBuilder.setQueryParameter("maxpagesize", String.valueOf(pageSize)); + requestLocal.setUrl(urlBuilder.toString()); + }); + } + return listTriggersNextSinglePage(nextLink, requestOptionsLocal); + }); + } + + /** + * Create or update operation template. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     scope: String(Tests) (Required)
+     *     notificationRuleId: String (Required)
+     *     displayName: String (Optional, Required on create)
+     *     actionGroupIds (Optional, Required on create): [
+     *         String (Optional, Required on create)
+     *     ]
+     *     createdDateTime: OffsetDateTime (Optional)
+     *     createdBy: String (Optional)
+     *     lastModifiedDateTime: OffsetDateTime (Optional)
+     *     lastModifiedBy: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     scope: String(Tests) (Required)
+     *     notificationRuleId: String (Required)
+     *     displayName: String (Optional, Required on create)
+     *     actionGroupIds (Optional, Required on create): [
+     *         String (Optional, Required on create)
+     *     ]
+     *     createdDateTime: OffsetDateTime (Optional)
+     *     createdBy: String (Optional)
+     *     lastModifiedDateTime: OffsetDateTime (Optional)
+     *     lastModifiedBy: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param notificationRuleId The unique identifier of the notification rule. + * @param body The resource instance. + * @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 notification rule model along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createOrUpdateNotificationRuleWithResponseAsync(String notificationRuleId, + BinaryData body, RequestOptions requestOptions) { + final String contentType = "application/merge-patch+json"; + final String accept = "application/json"; + return FluxUtil.withContext( + context -> service.createOrUpdateNotificationRule(this.getEndpoint(), this.getServiceVersion().getVersion(), + notificationRuleId, contentType, accept, body, requestOptions, context)); + } + + /** + * Create or update operation template. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     scope: String(Tests) (Required)
+     *     notificationRuleId: String (Required)
+     *     displayName: String (Optional, Required on create)
+     *     actionGroupIds (Optional, Required on create): [
+     *         String (Optional, Required on create)
+     *     ]
+     *     createdDateTime: OffsetDateTime (Optional)
+     *     createdBy: String (Optional)
+     *     lastModifiedDateTime: OffsetDateTime (Optional)
+     *     lastModifiedBy: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     scope: String(Tests) (Required)
+     *     notificationRuleId: String (Required)
+     *     displayName: String (Optional, Required on create)
+     *     actionGroupIds (Optional, Required on create): [
+     *         String (Optional, Required on create)
+     *     ]
+     *     createdDateTime: OffsetDateTime (Optional)
+     *     createdBy: String (Optional)
+     *     lastModifiedDateTime: OffsetDateTime (Optional)
+     *     lastModifiedBy: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param notificationRuleId The unique identifier of the notification rule. + * @param body The resource instance. + * @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 notification rule model along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateNotificationRuleWithResponse(String notificationRuleId, BinaryData body, + RequestOptions requestOptions) { + final String contentType = "application/merge-patch+json"; + final String accept = "application/json"; + return service.createOrUpdateNotificationRuleSync(this.getEndpoint(), this.getServiceVersion().getVersion(), + notificationRuleId, contentType, accept, body, requestOptions, Context.NONE); + } + + /** + * Resource delete operation template. + * + * @param notificationRuleId The unique identifier of the notification rule. + * @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> deleteNotificationRuleWithResponseAsync(String notificationRuleId, + RequestOptions requestOptions) { + return FluxUtil.withContext(context -> service.deleteNotificationRule(this.getEndpoint(), + this.getServiceVersion().getVersion(), notificationRuleId, requestOptions, context)); + } + + /** + * Resource delete operation template. + * + * @param notificationRuleId The unique identifier of the notification rule. + * @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 deleteNotificationRuleWithResponse(String notificationRuleId, RequestOptions requestOptions) { + return service.deleteNotificationRuleSync(this.getEndpoint(), this.getServiceVersion().getVersion(), + notificationRuleId, requestOptions, Context.NONE); + } + + /** + * Resource read operation template. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     scope: String(Tests) (Required)
+     *     notificationRuleId: String (Required)
+     *     displayName: String (Optional, Required on create)
+     *     actionGroupIds (Optional, Required on create): [
+     *         String (Optional, Required on create)
+     *     ]
+     *     createdDateTime: OffsetDateTime (Optional)
+     *     createdBy: String (Optional)
+     *     lastModifiedDateTime: OffsetDateTime (Optional)
+     *     lastModifiedBy: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param notificationRuleId The unique identifier of the notification rule. + * @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 notification rule model along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getNotificationRuleWithResponseAsync(String notificationRuleId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.getNotificationRule(this.getEndpoint(), + this.getServiceVersion().getVersion(), notificationRuleId, accept, requestOptions, context)); + } + + /** + * Resource read operation template. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     scope: String(Tests) (Required)
+     *     notificationRuleId: String (Required)
+     *     displayName: String (Optional, Required on create)
+     *     actionGroupIds (Optional, Required on create): [
+     *         String (Optional, Required on create)
+     *     ]
+     *     createdDateTime: OffsetDateTime (Optional)
+     *     createdBy: String (Optional)
+     *     lastModifiedDateTime: OffsetDateTime (Optional)
+     *     lastModifiedBy: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param notificationRuleId The unique identifier of the notification rule. + * @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 notification rule model along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getNotificationRuleWithResponse(String notificationRuleId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getNotificationRuleSync(this.getEndpoint(), this.getServiceVersion().getVersion(), + notificationRuleId, accept, requestOptions, Context.NONE); + } + + /** + * Resource list operation template. + *

Query Parameters

+ * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
testIdsStringNoSearch based on notification rules associated with the provided + * test ids.
scopesStringNoSearch based on notification rules for the provided + * scopes.
lastModifiedStartTimeOffsetDateTimeNoStart DateTime(RFC 3339 literal format) + * of the last updated time range to filter notification rules.
lastModifiedEndTimeOffsetDateTimeNoEnd DateTime(RFC 3339 literal format) of + * the last updated time range to filter notification rules.
maxpagesizeIntegerNoNumber of results in response. Default page size is + * 50.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     scope: String(Tests) (Required)
+     *     notificationRuleId: String (Required)
+     *     displayName: String (Optional, Required on create)
+     *     actionGroupIds (Optional, Required on create): [
+     *         String (Optional, Required on create)
+     *     ]
+     *     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. + * @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 paged collection of NotificationRule items along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNotificationRulesSinglePageAsync(RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNotificationRules(this.getEndpoint(), + this.getServiceVersion().getVersion(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Resource list operation template. + *

Query Parameters

+ * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
testIdsStringNoSearch based on notification rules associated with the provided + * test ids.
scopesStringNoSearch based on notification rules for the provided + * scopes.
lastModifiedStartTimeOffsetDateTimeNoStart DateTime(RFC 3339 literal format) + * of the last updated time range to filter notification rules.
lastModifiedEndTimeOffsetDateTimeNoEnd DateTime(RFC 3339 literal format) of + * the last updated time range to filter notification rules.
maxpagesizeIntegerNoNumber of results in response. Default page size is + * 50.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     scope: String(Tests) (Required)
+     *     notificationRuleId: String (Required)
+     *     displayName: String (Optional, Required on create)
+     *     actionGroupIds (Optional, Required on create): [
+     *         String (Optional, Required on create)
+     *     ]
+     *     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. + * @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 paged collection of NotificationRule items as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedFlux listNotificationRulesAsync(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedFlux<>((pageSize) -> { + RequestOptions requestOptionsLocal = requestOptions == null ? new RequestOptions() : requestOptions; + if (pageSize != null) { + requestOptionsLocal.addRequestCallback(requestLocal -> { + UrlBuilder urlBuilder = UrlBuilder.parse(requestLocal.getUrl()); + urlBuilder.setQueryParameter("maxpagesize", String.valueOf(pageSize)); + requestLocal.setUrl(urlBuilder.toString()); + }); + } + return listNotificationRulesSinglePageAsync(requestOptionsLocal); + }, (nextLink, pageSize) -> { + RequestOptions requestOptionsLocal = new RequestOptions(); + requestOptionsLocal.setContext(requestOptionsForNextPage.getContext()); + if (pageSize != null) { + requestOptionsLocal.addRequestCallback(requestLocal -> { + UrlBuilder urlBuilder = UrlBuilder.parse(requestLocal.getUrl()); + urlBuilder.setQueryParameter("maxpagesize", String.valueOf(pageSize)); + requestLocal.setUrl(urlBuilder.toString()); + }); + } + return listNotificationRulesNextSinglePageAsync(nextLink, requestOptionsLocal); + }); + } + + /** + * Resource list operation template. + *

Query Parameters

+ * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
testIdsStringNoSearch based on notification rules associated with the provided + * test ids.
scopesStringNoSearch based on notification rules for the provided + * scopes.
lastModifiedStartTimeOffsetDateTimeNoStart DateTime(RFC 3339 literal format) + * of the last updated time range to filter notification rules.
lastModifiedEndTimeOffsetDateTimeNoEnd DateTime(RFC 3339 literal format) of + * the last updated time range to filter notification rules.
maxpagesizeIntegerNoNumber of results in response. Default page size is + * 50.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     scope: String(Tests) (Required)
+     *     notificationRuleId: String (Required)
+     *     displayName: String (Optional, Required on create)
+     *     actionGroupIds (Optional, Required on create): [
+     *         String (Optional, Required on create)
+     *     ]
+     *     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. + * @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 paged collection of NotificationRule items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNotificationRulesSinglePage(RequestOptions requestOptions) { + final String accept = "application/json"; + Response res = service.listNotificationRulesSync(this.getEndpoint(), + this.getServiceVersion().getVersion(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Resource list operation template. + *

Query Parameters

+ * + * + * + * + * + * + * + * + *
Query Parameters
NameTypeRequiredDescription
testIdsStringNoSearch based on notification rules associated with the provided + * test ids.
scopesStringNoSearch based on notification rules for the provided + * scopes.
lastModifiedStartTimeOffsetDateTimeNoStart DateTime(RFC 3339 literal format) + * of the last updated time range to filter notification rules.
lastModifiedEndTimeOffsetDateTimeNoEnd DateTime(RFC 3339 literal format) of + * the last updated time range to filter notification rules.
maxpagesizeIntegerNoNumber of results in response. Default page size is + * 50.
+ * You can add these to a request with {@link RequestOptions#addQueryParam} + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     scope: String(Tests) (Required)
+     *     notificationRuleId: String (Required)
+     *     displayName: String (Optional, Required on create)
+     *     actionGroupIds (Optional, Required on create): [
+     *         String (Optional, Required on create)
+     *     ]
+     *     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. + * @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 paged collection of NotificationRule items as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listNotificationRules(RequestOptions requestOptions) { + RequestOptions requestOptionsForNextPage = new RequestOptions(); + requestOptionsForNextPage.setContext( + requestOptions != null && requestOptions.getContext() != null ? requestOptions.getContext() : Context.NONE); + return new PagedIterable<>((pageSize) -> { + RequestOptions requestOptionsLocal = requestOptions == null ? new RequestOptions() : requestOptions; + if (pageSize != null) { + requestOptionsLocal.addRequestCallback(requestLocal -> { + UrlBuilder urlBuilder = UrlBuilder.parse(requestLocal.getUrl()); + urlBuilder.setQueryParameter("maxpagesize", String.valueOf(pageSize)); + requestLocal.setUrl(urlBuilder.toString()); + }); + } + return listNotificationRulesSinglePage(requestOptionsLocal); + }, (nextLink, pageSize) -> { + RequestOptions requestOptionsLocal = new RequestOptions(); + requestOptionsLocal.setContext(requestOptionsForNextPage.getContext()); + if (pageSize != null) { + requestOptionsLocal.addRequestCallback(requestLocal -> { + UrlBuilder urlBuilder = UrlBuilder.parse(requestLocal.getUrl()); + urlBuilder.setQueryParameter("maxpagesize", String.valueOf(pageSize)); + requestLocal.setUrl(urlBuilder.toString()); + }); + } + return listNotificationRulesNextSinglePage(nextLink, requestOptionsLocal); + }); + } + + /** + * Clone a load test. + * + * Clone the given test with optional overrides applied to the clone test. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     newTestId: String (Required)
+     *     displayName: String (Optional)
+     *     description: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     id: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required)
+     *     error (Optional): {
+     *         error (Required): (recursive schema, see error above)
+     *     }
+     * }
+     * }
+     * 
+ * + * @param testId Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, + * underscore or hyphen characters. + * @param cloneTestRequest1 The cloneTestRequest1 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. + * @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 provides status details for long running operations along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> cloneTestWithResponseAsync(String testId, BinaryData cloneTestRequest1, + RequestOptions requestOptions) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.cloneTest(this.getEndpoint(), this.getServiceVersion().getVersion(), testId, + contentType, accept, cloneTestRequest1, requestOptions, context)); + } + + /** + * Clone a load test. + * + * Clone the given test with optional overrides applied to the clone test. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     newTestId: String (Required)
+     *     displayName: String (Optional)
+     *     description: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     id: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required)
+     *     error (Optional): {
+     *         error (Required): (recursive schema, see error above)
+     *     }
+     * }
+     * }
+     * 
+ * + * @param testId Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, + * underscore or hyphen characters. + * @param cloneTestRequest1 The cloneTestRequest1 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. + * @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 provides status details for long running operations along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response cloneTestWithResponse(String testId, BinaryData cloneTestRequest1, + RequestOptions requestOptions) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.cloneTestSync(this.getEndpoint(), this.getServiceVersion().getVersion(), testId, contentType, + accept, cloneTestRequest1, requestOptions, Context.NONE); + } + + /** + * Clone a load test. + * + * Clone the given test with optional overrides applied to the clone test. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     newTestId: String (Required)
+     *     displayName: String (Optional)
+     *     description: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     id: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required)
+     *     error (Optional): {
+     *         error (Required): (recursive schema, see error above)
+     *     }
+     * }
+     * }
+     * 
+ * + * @param testId Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, + * underscore or hyphen characters. + * @param cloneTestRequest1 The cloneTestRequest1 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. + * @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 PollerFlux} for polling of provides status details for long running operations. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux beginCloneTestWithModelAsync(String testId, + BinaryData cloneTestRequest1, RequestOptions requestOptions) { + return PollerFlux.create(Duration.ofSeconds(1), + () -> this.cloneTestWithResponseAsync(testId, cloneTestRequest1, requestOptions), + new DefaultPollingStrategy<>(new PollingStrategyOptions(this.getHttpPipeline()) + .setEndpoint("https://{endpoint}".replace("{endpoint}", this.getEndpoint())) + .setContext(requestOptions != null && requestOptions.getContext() != null + ? requestOptions.getContext() + : Context.NONE) + .setServiceVersion(this.getServiceVersion().getVersion())), + TypeReference.createInstance(OperationStatus.class), TypeReference.createInstance(LoadTest.class)); + } + + /** + * Clone a load test. + * + * Clone the given test with optional overrides applied to the clone test. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     newTestId: String (Required)
+     *     displayName: String (Optional)
+     *     description: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     id: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required)
+     *     error (Optional): {
+     *         error (Required): (recursive schema, see error above)
+     *     }
+     * }
+     * }
+     * 
+ * + * @param testId Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, + * underscore or hyphen characters. + * @param cloneTestRequest1 The cloneTestRequest1 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. + * @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 SyncPoller} for polling of provides status details for long running operations. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller beginCloneTestWithModel(String testId, BinaryData cloneTestRequest1, + RequestOptions requestOptions) { + return SyncPoller.createPoller(Duration.ofSeconds(1), + () -> this.cloneTestWithResponse(testId, cloneTestRequest1, requestOptions), + new SyncDefaultPollingStrategy<>(new PollingStrategyOptions(this.getHttpPipeline()) + .setEndpoint("https://{endpoint}".replace("{endpoint}", this.getEndpoint())) + .setContext(requestOptions != null && requestOptions.getContext() != null + ? requestOptions.getContext() + : Context.NONE) + .setServiceVersion(this.getServiceVersion().getVersion())), + TypeReference.createInstance(OperationStatus.class), TypeReference.createInstance(LoadTest.class)); + } + + /** + * Clone a load test. + * + * Clone the given test with optional overrides applied to the clone test. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     newTestId: String (Required)
+     *     displayName: String (Optional)
+     *     description: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     id: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required)
+     *     error (Optional): {
+     *         error (Required): (recursive schema, see error above)
+     *     }
+     * }
+     * }
+     * 
+ * + * @param testId Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, + * underscore or hyphen characters. + * @param cloneTestRequest1 The cloneTestRequest1 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. + * @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 PollerFlux} for polling of provides status details for long running operations. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux beginCloneTestAsync(String testId, BinaryData cloneTestRequest1, + RequestOptions requestOptions) { + return PollerFlux.create(Duration.ofSeconds(1), + () -> this.cloneTestWithResponseAsync(testId, cloneTestRequest1, requestOptions), + new DefaultPollingStrategy<>(new PollingStrategyOptions(this.getHttpPipeline()) + .setEndpoint("https://{endpoint}".replace("{endpoint}", this.getEndpoint())) + .setContext(requestOptions != null && requestOptions.getContext() != null + ? requestOptions.getContext() + : Context.NONE) + .setServiceVersion(this.getServiceVersion().getVersion())), + TypeReference.createInstance(BinaryData.class), TypeReference.createInstance(BinaryData.class)); + } + + /** + * Clone a load test. + * + * Clone the given test with optional overrides applied to the clone test. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     newTestId: String (Required)
+     *     displayName: String (Optional)
+     *     description: String (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     id: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required)
+     *     error (Optional): {
+     *         error (Required): (recursive schema, see error above)
+     *     }
+     * }
+     * }
+     * 
+ * + * @param testId Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, + * underscore or hyphen characters. + * @param cloneTestRequest1 The cloneTestRequest1 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. + * @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 SyncPoller} for polling of provides status details for long running operations. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller beginCloneTest(String testId, BinaryData cloneTestRequest1, + RequestOptions requestOptions) { + return SyncPoller.createPoller(Duration.ofSeconds(1), + () -> this.cloneTestWithResponse(testId, cloneTestRequest1, requestOptions), + new SyncDefaultPollingStrategy<>(new PollingStrategyOptions(this.getHttpPipeline()) + .setEndpoint("https://{endpoint}".replace("{endpoint}", this.getEndpoint())) + .setContext(requestOptions != null && requestOptions.getContext() != null + ? requestOptions.getContext() + : Context.NONE) + .setServiceVersion(this.getServiceVersion().getVersion())), + TypeReference.createInstance(BinaryData.class), TypeReference.createInstance(BinaryData.class)); + } + + /** + * Generate load test plan recommendations. + * + * Generate AI Recommendations to author a load test plan using the uploaded browser recording file. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     id: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required)
+     *     error (Optional): {
+     *         error (Required): (recursive schema, see error above)
+     *     }
+     * }
+     * }
+     * 
+ * + * @param testId Unique test identifier 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 provides status details for long running operations along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> generateTestPlanRecommendationsWithResponseAsync(String testId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.generateTestPlanRecommendations(this.getEndpoint(), + this.getServiceVersion().getVersion(), testId, accept, requestOptions, context)); + } + + /** + * Generate load test plan recommendations. + * + * Generate AI Recommendations to author a load test plan using the uploaded browser recording file. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     id: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required)
+     *     error (Optional): {
+     *         error (Required): (recursive schema, see error above)
+     *     }
+     * }
+     * }
+     * 
+ * + * @param testId Unique test identifier 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 provides status details for long running operations along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response generateTestPlanRecommendationsWithResponse(String testId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return service.generateTestPlanRecommendationsSync(this.getEndpoint(), this.getServiceVersion().getVersion(), + testId, accept, requestOptions, Context.NONE); + } + + /** + * Generate load test plan recommendations. + * + * Generate AI Recommendations to author a load test plan using the uploaded browser recording file. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     id: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required)
+     *     error (Optional): {
+     *         error (Required): (recursive schema, see error above)
+     *     }
+     * }
+     * }
+     * 
+ * + * @param testId Unique test identifier 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 PollerFlux} for polling of provides status details for long running operations. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux beginGenerateTestPlanRecommendationsWithModelAsync(String testId, + RequestOptions requestOptions) { + return PollerFlux.create(Duration.ofSeconds(1), + () -> this.generateTestPlanRecommendationsWithResponseAsync(testId, requestOptions), + new DefaultPollingStrategy<>(new PollingStrategyOptions(this.getHttpPipeline()) + .setEndpoint("https://{endpoint}".replace("{endpoint}", this.getEndpoint())) + .setContext(requestOptions != null && requestOptions.getContext() != null + ? requestOptions.getContext() + : Context.NONE) + .setServiceVersion(this.getServiceVersion().getVersion())), + TypeReference.createInstance(OperationStatus.class), TypeReference.createInstance(LoadTest.class)); + } + + /** + * Generate load test plan recommendations. + * + * Generate AI Recommendations to author a load test plan using the uploaded browser recording file. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     id: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required)
+     *     error (Optional): {
+     *         error (Required): (recursive schema, see error above)
+     *     }
+     * }
+     * }
+     * 
+ * + * @param testId Unique test identifier 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 SyncPoller} for polling of provides status details for long running operations. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller beginGenerateTestPlanRecommendationsWithModel(String testId, + RequestOptions requestOptions) { + return SyncPoller.createPoller(Duration.ofSeconds(1), + () -> this.generateTestPlanRecommendationsWithResponse(testId, requestOptions), + new SyncDefaultPollingStrategy<>(new PollingStrategyOptions(this.getHttpPipeline()) + .setEndpoint("https://{endpoint}".replace("{endpoint}", this.getEndpoint())) + .setContext(requestOptions != null && requestOptions.getContext() != null + ? requestOptions.getContext() + : Context.NONE) + .setServiceVersion(this.getServiceVersion().getVersion())), + TypeReference.createInstance(OperationStatus.class), TypeReference.createInstance(LoadTest.class)); + } + + /** + * Generate load test plan recommendations. + * + * Generate AI Recommendations to author a load test plan using the uploaded browser recording file. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     id: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required)
+     *     error (Optional): {
+     *         error (Required): (recursive schema, see error above)
+     *     }
+     * }
+     * }
+     * 
+ * + * @param testId Unique test identifier 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 PollerFlux} for polling of provides status details for long running operations. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux beginGenerateTestPlanRecommendationsAsync(String testId, + RequestOptions requestOptions) { + return PollerFlux.create(Duration.ofSeconds(1), + () -> this.generateTestPlanRecommendationsWithResponseAsync(testId, requestOptions), + new DefaultPollingStrategy<>(new PollingStrategyOptions(this.getHttpPipeline()) + .setEndpoint("https://{endpoint}".replace("{endpoint}", this.getEndpoint())) + .setContext(requestOptions != null && requestOptions.getContext() != null + ? requestOptions.getContext() + : Context.NONE) + .setServiceVersion(this.getServiceVersion().getVersion())), + TypeReference.createInstance(BinaryData.class), TypeReference.createInstance(BinaryData.class)); + } + + /** + * Generate load test plan recommendations. + * + * Generate AI Recommendations to author a load test plan using the uploaded browser recording file. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     id: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required)
+     *     error (Optional): {
+     *         error (Required): (recursive schema, see error above)
+     *     }
+     * }
+     * }
+     * 
+ * + * @param testId Unique test identifier 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 SyncPoller} for polling of provides status details for long running operations. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller beginGenerateTestPlanRecommendations(String testId, + RequestOptions requestOptions) { + return SyncPoller.createPoller(Duration.ofSeconds(1), + () -> this.generateTestPlanRecommendationsWithResponse(testId, requestOptions), + new SyncDefaultPollingStrategy<>(new PollingStrategyOptions(this.getHttpPipeline()) + .setEndpoint("https://{endpoint}".replace("{endpoint}", this.getEndpoint())) + .setContext(requestOptions != null && requestOptions.getContext() != null + ? requestOptions.getContext() + : Context.NONE) + .setServiceVersion(this.getServiceVersion().getVersion())), + TypeReference.createInstance(BinaryData.class), TypeReference.createInstance(BinaryData.class)); + } + + /** + * Get the status of a long running operation. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     id: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required)
+     *     kind: String(CloneTest/GenerateTestRunInsights/TestPlanRecommendations) (Required)
+     *     error (Optional): {
+     *         error (Required): (recursive schema, see error above)
+     *     }
+     * }
+     * }
+     * 
+ * + * @param operationId The unique ID of the operation. + * @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 status of a long running operation along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getOperationStatusWithResponseAsync(String operationId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.getOperationStatus(this.getEndpoint(), + this.getServiceVersion().getVersion(), operationId, accept, requestOptions, context)); + } + + /** + * Get the status of a long running operation. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     id: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required)
+     *     kind: String(CloneTest/GenerateTestRunInsights/TestPlanRecommendations) (Required)
+     *     error (Optional): {
+     *         error (Required): (recursive schema, see error above)
+     *     }
+     * }
+     * }
+     * 
+ * + * @param operationId The unique ID of the operation. + * @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 status of a long running operation along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getOperationStatusWithResponse(String operationId, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getOperationStatusSync(this.getEndpoint(), this.getServiceVersion().getVersion(), operationId, + accept, requestOptions, Context.NONE); + } + + /** + * Get all test files. + * + * Get the next page of items. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     fileName: String (Required)
+     *     url: String (Optional)
+     *     fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional)
+     *     expireDateTime: OffsetDateTime (Optional)
+     *     validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
+     *     validationFailureDetails: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param nextLink The URL to get the next list of items. + * @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 files along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -3375,7 +5290,7 @@ private Mono> listTestFilesNextSinglePageAsync(String * { * fileName: String (Required) * url: String (Optional) - * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional) + * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional) * expireDateTime: OffsetDateTime (Optional) * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional) * validationFailureDetails: String (Optional) @@ -3441,6 +5356,7 @@ private PagedResponse listTestFilesNextSinglePage(String nextLink, R * autoStopDisabled: Boolean (Optional) * errorRate: Double (Optional) * errorRateTimeWindowInSeconds: Long (Optional) + * maximumVirtualUsersPerEngine: Integer (Optional) * } * secrets (Optional): { * String (Required): { @@ -3480,7 +5396,7 @@ private PagedResponse listTestFilesNextSinglePage(String nextLink, R * configFileInfo (Optional): { * fileName: String (Required) * url: String (Optional) - * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional) + * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional) * expireDateTime: OffsetDateTime (Optional) * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional) * validationFailureDetails: String (Optional) @@ -3507,6 +5423,10 @@ private PagedResponse listTestFilesNextSinglePage(String nextLink, R * engineBuiltInIdentityIds (Optional): [ * String (Optional) * ] + * estimatedVirtualUserHours: Double (Optional) + * preferences (Optional): { + * enableAIErrorInsights: Boolean (Optional) + * } * createdDateTime: OffsetDateTime (Optional) * createdBy: String (Optional) * lastModifiedDateTime: OffsetDateTime (Optional) @@ -3577,6 +5497,7 @@ private Mono> listTestsNextSinglePageAsync(String next * autoStopDisabled: Boolean (Optional) * errorRate: Double (Optional) * errorRateTimeWindowInSeconds: Long (Optional) + * maximumVirtualUsersPerEngine: Integer (Optional) * } * secrets (Optional): { * String (Required): { @@ -3616,7 +5537,7 @@ private Mono> listTestsNextSinglePageAsync(String next * configFileInfo (Optional): { * fileName: String (Required) * url: String (Optional) - * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional) + * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional) * expireDateTime: OffsetDateTime (Optional) * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional) * validationFailureDetails: String (Optional) @@ -3643,6 +5564,10 @@ private Mono> listTestsNextSinglePageAsync(String next * engineBuiltInIdentityIds (Optional): [ * String (Optional) * ] + * estimatedVirtualUserHours: Double (Optional) + * preferences (Optional): { + * enableAIErrorInsights: Boolean (Optional) + * } * createdDateTime: OffsetDateTime (Optional) * createdBy: String (Optional) * lastModifiedDateTime: OffsetDateTime (Optional) @@ -3757,6 +5682,168 @@ private PagedResponse listTestProfilesNextSinglePage(String nextLink getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); } + /** + * Get the next page of items. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     kind: String(ScheduleTestsTrigger) (Required)
+     *     triggerId: String (Required)
+     *     displayName: String (Optional, Required on create)
+     *     description: String (Optional)
+     *     state: String(Active/Paused/Completed/Disabled) (Optional)
+     *     stateDetails (Optional): {
+     *         message: String (Optional)
+     *     }
+     *     createdDateTime: OffsetDateTime (Optional)
+     *     createdBy: String (Optional)
+     *     lastModifiedDateTime: OffsetDateTime (Optional)
+     *     lastModifiedBy: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param nextLink The URL to get the next list of items. + * @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 paged collection of Trigger items along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listTriggersNextSinglePageAsync(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listTriggersNext(nextLink, this.getEndpoint(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get the next page of items. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     kind: String(ScheduleTestsTrigger) (Required)
+     *     triggerId: String (Required)
+     *     displayName: String (Optional, Required on create)
+     *     description: String (Optional)
+     *     state: String(Active/Paused/Completed/Disabled) (Optional)
+     *     stateDetails (Optional): {
+     *         message: String (Optional)
+     *     }
+     *     createdDateTime: OffsetDateTime (Optional)
+     *     createdBy: String (Optional)
+     *     lastModifiedDateTime: OffsetDateTime (Optional)
+     *     lastModifiedBy: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param nextLink The URL to get the next list of items. + * @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 paged collection of Trigger items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listTriggersNextSinglePage(String nextLink, RequestOptions requestOptions) { + final String accept = "application/json"; + Response res + = service.listTriggersNextSync(nextLink, this.getEndpoint(), accept, requestOptions, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null); + } + + /** + * Get the next page of items. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     scope: String(Tests) (Required)
+     *     notificationRuleId: String (Required)
+     *     displayName: String (Optional, Required on create)
+     *     actionGroupIds (Optional, Required on create): [
+     *         String (Optional, Required on create)
+     *     ]
+     *     createdDateTime: OffsetDateTime (Optional)
+     *     createdBy: String (Optional)
+     *     lastModifiedDateTime: OffsetDateTime (Optional)
+     *     lastModifiedBy: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param nextLink The URL to get the next list of items. + * @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 paged collection of NotificationRule items along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNotificationRulesNextSinglePageAsync(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext( + context -> service.listNotificationRulesNext(nextLink, this.getEndpoint(), accept, requestOptions, context)) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + getValues(res.getValue(), "value"), getNextLink(res.getValue(), "nextLink"), null)); + } + + /** + * Get the next page of items. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     scope: String(Tests) (Required)
+     *     notificationRuleId: String (Required)
+     *     displayName: String (Optional, Required on create)
+     *     actionGroupIds (Optional, Required on create): [
+     *         String (Optional, Required on create)
+     *     ]
+     *     createdDateTime: OffsetDateTime (Optional)
+     *     createdBy: String (Optional)
+     *     lastModifiedDateTime: OffsetDateTime (Optional)
+     *     lastModifiedBy: String (Optional)
+     * }
+     * }
+     * 
+ * + * @param nextLink The URL to get the next list of items. + * @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 paged collection of NotificationRule items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNotificationRulesNextSinglePage(String nextLink, + RequestOptions requestOptions) { + final String accept = "application/json"; + Response res + = service.listNotificationRulesNextSync(nextLink, this.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) { try { Map obj = binaryData.toObject(Map.class); diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/implementation/LoadTestRunClientImpl.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/implementation/LoadTestRunClientImpl.java index 5fda3e17144f..ef53f6fccae2 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/implementation/LoadTestRunClientImpl.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/implementation/LoadTestRunClientImpl.java @@ -39,9 +39,17 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.UrlBuilder; +import com.azure.core.util.polling.DefaultPollingStrategy; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.PollingStrategyOptions; +import com.azure.core.util.polling.SyncDefaultPollingStrategy; +import com.azure.core.util.polling.SyncPoller; import com.azure.core.util.serializer.JacksonAdapter; import com.azure.core.util.serializer.SerializerAdapter; +import com.azure.core.util.serializer.TypeReference; import com.azure.developer.loadtesting.LoadTestingServiceVersion; +import com.azure.developer.loadtesting.models.TestRunInsights; +import java.time.Duration; import java.util.List; import java.util.Map; import java.util.stream.Collectors; @@ -231,7 +239,7 @@ Response createOrUpdateServerMetricsConfigSync(@HostParam("endpoint" @UnexpectedResponseExceptionType(HttpResponseException.class) Mono> deleteTestRun(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("testRunId") String testRunId, - @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + RequestOptions requestOptions, Context context); @Delete("/test-runs/{testRunId}") @ExpectedResponses({ 204 }) @@ -241,7 +249,7 @@ Mono> deleteTestRun(@HostParam("endpoint") String endpoint, @UnexpectedResponseExceptionType(HttpResponseException.class) Response deleteTestRunSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("testRunId") String testRunId, - @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + RequestOptions requestOptions, Context context); @Get("/test-runs/{testRunId}/app-components") @ExpectedResponses({ 200 }) @@ -485,7 +493,7 @@ Response createOrUpdateTestProfileRunSync(@HostParam("endpoint") Str @UnexpectedResponseExceptionType(HttpResponseException.class) Mono> deleteTestProfileRun(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("testProfileRunId") String testProfileRunId, - @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + RequestOptions requestOptions, Context context); @Delete("/test-profile-runs/{testProfileRunId}") @ExpectedResponses({ 204 }) @@ -495,7 +503,7 @@ Mono> deleteTestProfileRun(@HostParam("endpoint") String endpoint @UnexpectedResponseExceptionType(HttpResponseException.class) Response deleteTestProfileRunSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("testProfileRunId") String testProfileRunId, - @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + RequestOptions requestOptions, Context context); @Get("/test-profile-runs/{testProfileRunId}") @ExpectedResponses({ 200 }) @@ -557,6 +565,68 @@ Response stopTestProfileRunSync(@HostParam("endpoint") String endpoi @QueryParam("api-version") String apiVersion, @PathParam("testProfileRunId") String testProfileRunId, @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + @Get("/test-runs/{testRunId}/insights/latest") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getLatestTestRunInsights(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("testRunId") String testRunId, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/test-runs/{testRunId}/insights/latest") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getLatestTestRunInsightsSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("testRunId") String testRunId, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Patch("/test-runs/{testRunId}/insights/latest") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> updateLatestTestRunInsights(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("content-type") String contentType, + @PathParam("testRunId") String testRunId, @HeaderParam("Accept") String accept, + @BodyParam("application/merge-patch+json") BinaryData body, RequestOptions requestOptions, Context context); + + @Patch("/test-runs/{testRunId}/insights/latest") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response updateLatestTestRunInsightsSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("content-type") String contentType, + @PathParam("testRunId") String testRunId, @HeaderParam("Accept") String accept, + @BodyParam("application/merge-patch+json") BinaryData body, RequestOptions requestOptions, Context context); + + @Post("/test-runs/{testRunId}/insights:generate") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> generateTestRunInsights(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("testRunId") String testRunId, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + + @Post("/test-runs/{testRunId}/insights:generate") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response generateTestRunInsightsSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("testRunId") String testRunId, + @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context); + @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) @@ -688,6 +758,7 @@ Response listTestProfileRunsNextSync(@PathParam(value = "nextLink", * autoStopDisabled: Boolean (Optional) * errorRate: Double (Optional) * errorRateTimeWindowInSeconds: Long (Optional) + * maximumVirtualUsersPerEngine: Integer (Optional) * } * secrets (Optional): { * String (Required): { @@ -705,7 +776,13 @@ Response listTestProfileRunsNextSync(@PathParam(value = "nextLink", * } * errorDetails (Optional): [ * (Optional){ + * code: String (Optional) * message: String (Optional) + * properties (Optional): { + * String (Required): [ + * String (Required) + * ] + * } * } * ] * testRunStatistics (Optional): { @@ -759,7 +836,7 @@ Response listTestProfileRunsNextSync(@PathParam(value = "nextLink", * configFileInfo (Optional): { * fileName: String (Required) * url: String (Optional) - * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional) + * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional) * expireDateTime: OffsetDateTime (Optional) * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional) * validationFailureDetails: String (Optional) @@ -799,7 +876,11 @@ Response listTestProfileRunsNextSync(@PathParam(value = "nextLink", * requestDataLevel: String(NONE/ERRORS) (Optional) * debugLogsEnabled: Boolean (Optional) * publicIPDisabled: Boolean (Optional) - * createdByType: String(User/ScheduledTrigger) (Optional) + * createdByType: String(User/ScheduledTrigger/AzurePipelines/GitHubWorkflows) (Optional) + * createdByUri: String (Optional) + * estimatedVirtualUserHours: Double (Optional) + * executionStartDateTime: OffsetDateTime (Optional) + * executionEndDateTime: OffsetDateTime (Optional) * createdDateTime: OffsetDateTime (Optional) * createdBy: String (Optional) * lastModifiedDateTime: OffsetDateTime (Optional) @@ -845,6 +926,7 @@ Response listTestProfileRunsNextSync(@PathParam(value = "nextLink", * autoStopDisabled: Boolean (Optional) * errorRate: Double (Optional) * errorRateTimeWindowInSeconds: Long (Optional) + * maximumVirtualUsersPerEngine: Integer (Optional) * } * secrets (Optional): { * String (Required): { @@ -862,7 +944,13 @@ Response listTestProfileRunsNextSync(@PathParam(value = "nextLink", * } * errorDetails (Optional): [ * (Optional){ + * code: String (Optional) * message: String (Optional) + * properties (Optional): { + * String (Required): [ + * String (Required) + * ] + * } * } * ] * testRunStatistics (Optional): { @@ -916,7 +1004,7 @@ Response listTestProfileRunsNextSync(@PathParam(value = "nextLink", * configFileInfo (Optional): { * fileName: String (Required) * url: String (Optional) - * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional) + * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional) * expireDateTime: OffsetDateTime (Optional) * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional) * validationFailureDetails: String (Optional) @@ -956,7 +1044,11 @@ Response listTestProfileRunsNextSync(@PathParam(value = "nextLink", * requestDataLevel: String(NONE/ERRORS) (Optional) * debugLogsEnabled: Boolean (Optional) * publicIPDisabled: Boolean (Optional) - * createdByType: String(User/ScheduledTrigger) (Optional) + * createdByType: String(User/ScheduledTrigger/AzurePipelines/GitHubWorkflows) (Optional) + * createdByUri: String (Optional) + * estimatedVirtualUserHours: Double (Optional) + * executionStartDateTime: OffsetDateTime (Optional) + * executionEndDateTime: OffsetDateTime (Optional) * createdDateTime: OffsetDateTime (Optional) * createdBy: String (Optional) * lastModifiedDateTime: OffsetDateTime (Optional) @@ -1034,6 +1126,7 @@ public Mono> createOrUpdateTestRunWithResponseAsync(String * autoStopDisabled: Boolean (Optional) * errorRate: Double (Optional) * errorRateTimeWindowInSeconds: Long (Optional) + * maximumVirtualUsersPerEngine: Integer (Optional) * } * secrets (Optional): { * String (Required): { @@ -1051,7 +1144,13 @@ public Mono> createOrUpdateTestRunWithResponseAsync(String * } * errorDetails (Optional): [ * (Optional){ + * code: String (Optional) * message: String (Optional) + * properties (Optional): { + * String (Required): [ + * String (Required) + * ] + * } * } * ] * testRunStatistics (Optional): { @@ -1105,7 +1204,7 @@ public Mono> createOrUpdateTestRunWithResponseAsync(String * configFileInfo (Optional): { * fileName: String (Required) * url: String (Optional) - * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional) + * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional) * expireDateTime: OffsetDateTime (Optional) * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional) * validationFailureDetails: String (Optional) @@ -1145,7 +1244,11 @@ public Mono> createOrUpdateTestRunWithResponseAsync(String * requestDataLevel: String(NONE/ERRORS) (Optional) * debugLogsEnabled: Boolean (Optional) * publicIPDisabled: Boolean (Optional) - * createdByType: String(User/ScheduledTrigger) (Optional) + * createdByType: String(User/ScheduledTrigger/AzurePipelines/GitHubWorkflows) (Optional) + * createdByUri: String (Optional) + * estimatedVirtualUserHours: Double (Optional) + * executionStartDateTime: OffsetDateTime (Optional) + * executionEndDateTime: OffsetDateTime (Optional) * createdDateTime: OffsetDateTime (Optional) * createdBy: String (Optional) * lastModifiedDateTime: OffsetDateTime (Optional) @@ -1191,6 +1294,7 @@ public Mono> createOrUpdateTestRunWithResponseAsync(String * autoStopDisabled: Boolean (Optional) * errorRate: Double (Optional) * errorRateTimeWindowInSeconds: Long (Optional) + * maximumVirtualUsersPerEngine: Integer (Optional) * } * secrets (Optional): { * String (Required): { @@ -1208,7 +1312,13 @@ public Mono> createOrUpdateTestRunWithResponseAsync(String * } * errorDetails (Optional): [ * (Optional){ + * code: String (Optional) * message: String (Optional) + * properties (Optional): { + * String (Required): [ + * String (Required) + * ] + * } * } * ] * testRunStatistics (Optional): { @@ -1262,7 +1372,7 @@ public Mono> createOrUpdateTestRunWithResponseAsync(String * configFileInfo (Optional): { * fileName: String (Required) * url: String (Optional) - * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional) + * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional) * expireDateTime: OffsetDateTime (Optional) * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional) * validationFailureDetails: String (Optional) @@ -1302,7 +1412,11 @@ public Mono> createOrUpdateTestRunWithResponseAsync(String * requestDataLevel: String(NONE/ERRORS) (Optional) * debugLogsEnabled: Boolean (Optional) * publicIPDisabled: Boolean (Optional) - * createdByType: String(User/ScheduledTrigger) (Optional) + * createdByType: String(User/ScheduledTrigger/AzurePipelines/GitHubWorkflows) (Optional) + * createdByUri: String (Optional) + * estimatedVirtualUserHours: Double (Optional) + * executionStartDateTime: OffsetDateTime (Optional) + * executionEndDateTime: OffsetDateTime (Optional) * createdDateTime: OffsetDateTime (Optional) * createdBy: String (Optional) * lastModifiedDateTime: OffsetDateTime (Optional) @@ -1639,9 +1753,8 @@ public Response createOrUpdateServerMetricsConfigWithResponse(String */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> deleteTestRunWithResponseAsync(String testRunId, RequestOptions requestOptions) { - final String accept = "application/json"; return FluxUtil.withContext(context -> service.deleteTestRun(this.getEndpoint(), - this.getServiceVersion().getVersion(), testRunId, accept, requestOptions, context)); + this.getServiceVersion().getVersion(), testRunId, requestOptions, context)); } /** @@ -1660,8 +1773,7 @@ public Mono> deleteTestRunWithResponseAsync(String testRunId, Req */ @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteTestRunWithResponse(String testRunId, RequestOptions requestOptions) { - final String accept = "application/json"; - return service.deleteTestRunSync(this.getEndpoint(), this.getServiceVersion().getVersion(), testRunId, accept, + return service.deleteTestRunSync(this.getEndpoint(), this.getServiceVersion().getVersion(), testRunId, requestOptions, Context.NONE); } @@ -1885,6 +1997,7 @@ public Response getServerMetricsConfigWithResponse(String testRunId, * autoStopDisabled: Boolean (Optional) * errorRate: Double (Optional) * errorRateTimeWindowInSeconds: Long (Optional) + * maximumVirtualUsersPerEngine: Integer (Optional) * } * secrets (Optional): { * String (Required): { @@ -1902,7 +2015,13 @@ public Response getServerMetricsConfigWithResponse(String testRunId, * } * errorDetails (Optional): [ * (Optional){ + * code: String (Optional) * message: String (Optional) + * properties (Optional): { + * String (Required): [ + * String (Required) + * ] + * } * } * ] * testRunStatistics (Optional): { @@ -1956,7 +2075,7 @@ public Response getServerMetricsConfigWithResponse(String testRunId, * configFileInfo (Optional): { * fileName: String (Required) * url: String (Optional) - * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional) + * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional) * expireDateTime: OffsetDateTime (Optional) * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional) * validationFailureDetails: String (Optional) @@ -1996,7 +2115,11 @@ public Response getServerMetricsConfigWithResponse(String testRunId, * requestDataLevel: String(NONE/ERRORS) (Optional) * debugLogsEnabled: Boolean (Optional) * publicIPDisabled: Boolean (Optional) - * createdByType: String(User/ScheduledTrigger) (Optional) + * createdByType: String(User/ScheduledTrigger/AzurePipelines/GitHubWorkflows) (Optional) + * createdByUri: String (Optional) + * estimatedVirtualUserHours: Double (Optional) + * executionStartDateTime: OffsetDateTime (Optional) + * executionEndDateTime: OffsetDateTime (Optional) * createdDateTime: OffsetDateTime (Optional) * createdBy: String (Optional) * lastModifiedDateTime: OffsetDateTime (Optional) @@ -2060,6 +2183,7 @@ public Mono> getTestRunWithResponseAsync(String testRunId, * autoStopDisabled: Boolean (Optional) * errorRate: Double (Optional) * errorRateTimeWindowInSeconds: Long (Optional) + * maximumVirtualUsersPerEngine: Integer (Optional) * } * secrets (Optional): { * String (Required): { @@ -2077,7 +2201,13 @@ public Mono> getTestRunWithResponseAsync(String testRunId, * } * errorDetails (Optional): [ * (Optional){ + * code: String (Optional) * message: String (Optional) + * properties (Optional): { + * String (Required): [ + * String (Required) + * ] + * } * } * ] * testRunStatistics (Optional): { @@ -2131,7 +2261,7 @@ public Mono> getTestRunWithResponseAsync(String testRunId, * configFileInfo (Optional): { * fileName: String (Required) * url: String (Optional) - * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional) + * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional) * expireDateTime: OffsetDateTime (Optional) * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional) * validationFailureDetails: String (Optional) @@ -2171,7 +2301,11 @@ public Mono> getTestRunWithResponseAsync(String testRunId, * requestDataLevel: String(NONE/ERRORS) (Optional) * debugLogsEnabled: Boolean (Optional) * publicIPDisabled: Boolean (Optional) - * createdByType: String(User/ScheduledTrigger) (Optional) + * createdByType: String(User/ScheduledTrigger/AzurePipelines/GitHubWorkflows) (Optional) + * createdByUri: String (Optional) + * estimatedVirtualUserHours: Double (Optional) + * executionStartDateTime: OffsetDateTime (Optional) + * executionEndDateTime: OffsetDateTime (Optional) * createdDateTime: OffsetDateTime (Optional) * createdBy: String (Optional) * lastModifiedDateTime: OffsetDateTime (Optional) @@ -2205,7 +2339,7 @@ public Response getTestRunWithResponse(String testRunId, RequestOpti * { * fileName: String (Required) * url: String (Optional) - * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional) + * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional) * expireDateTime: OffsetDateTime (Optional) * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional) * validationFailureDetails: String (Optional) @@ -2240,7 +2374,7 @@ public Mono> getTestRunFileWithResponseAsync(String testRun * { * fileName: String (Required) * url: String (Optional) - * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional) + * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional) * expireDateTime: OffsetDateTime (Optional) * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional) * validationFailureDetails: String (Optional) @@ -2972,6 +3106,8 @@ public PagedIterable listMetrics(String testRunId, String metricname * maxpagesizeIntegerNoNumber of results in response. * createdByTypesList<String>NoComma separated list of type of entities * that have created the test run. In the form of "," separated string. + * testIdsList<String>NoComma-separated list of test IDs. If you are using + * testIds, do not send a value for testId. In the form of "," separated string. * * You can add these to a request with {@link RequestOptions#addQueryParam} *

Response Body Schema

@@ -3011,6 +3147,7 @@ public PagedIterable listMetrics(String testRunId, String metricname * autoStopDisabled: Boolean (Optional) * errorRate: Double (Optional) * errorRateTimeWindowInSeconds: Long (Optional) + * maximumVirtualUsersPerEngine: Integer (Optional) * } * secrets (Optional): { * String (Required): { @@ -3028,7 +3165,13 @@ public PagedIterable listMetrics(String testRunId, String metricname * } * errorDetails (Optional): [ * (Optional){ + * code: String (Optional) * message: String (Optional) + * properties (Optional): { + * String (Required): [ + * String (Required) + * ] + * } * } * ] * testRunStatistics (Optional): { @@ -3082,7 +3225,7 @@ public PagedIterable listMetrics(String testRunId, String metricname * configFileInfo (Optional): { * fileName: String (Required) * url: String (Optional) - * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional) + * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional) * expireDateTime: OffsetDateTime (Optional) * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional) * validationFailureDetails: String (Optional) @@ -3122,7 +3265,11 @@ public PagedIterable listMetrics(String testRunId, String metricname * requestDataLevel: String(NONE/ERRORS) (Optional) * debugLogsEnabled: Boolean (Optional) * publicIPDisabled: Boolean (Optional) - * createdByType: String(User/ScheduledTrigger) (Optional) + * createdByType: String(User/ScheduledTrigger/AzurePipelines/GitHubWorkflows) (Optional) + * createdByUri: String (Optional) + * estimatedVirtualUserHours: Double (Optional) + * executionStartDateTime: OffsetDateTime (Optional) + * executionEndDateTime: OffsetDateTime (Optional) * createdDateTime: OffsetDateTime (Optional) * createdBy: String (Optional) * lastModifiedDateTime: OffsetDateTime (Optional) @@ -3171,6 +3318,8 @@ private Mono> listTestRunsSinglePageAsync(RequestOptio * maxpagesizeIntegerNoNumber of results in response. * createdByTypesList<String>NoComma separated list of type of entities * that have created the test run. In the form of "," separated string. + * testIdsList<String>NoComma-separated list of test IDs. If you are using + * testIds, do not send a value for testId. In the form of "," separated string. * * You can add these to a request with {@link RequestOptions#addQueryParam} *

Response Body Schema

@@ -3210,6 +3359,7 @@ private Mono> listTestRunsSinglePageAsync(RequestOptio * autoStopDisabled: Boolean (Optional) * errorRate: Double (Optional) * errorRateTimeWindowInSeconds: Long (Optional) + * maximumVirtualUsersPerEngine: Integer (Optional) * } * secrets (Optional): { * String (Required): { @@ -3227,7 +3377,13 @@ private Mono> listTestRunsSinglePageAsync(RequestOptio * } * errorDetails (Optional): [ * (Optional){ + * code: String (Optional) * message: String (Optional) + * properties (Optional): { + * String (Required): [ + * String (Required) + * ] + * } * } * ] * testRunStatistics (Optional): { @@ -3281,7 +3437,7 @@ private Mono> listTestRunsSinglePageAsync(RequestOptio * configFileInfo (Optional): { * fileName: String (Required) * url: String (Optional) - * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional) + * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional) * expireDateTime: OffsetDateTime (Optional) * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional) * validationFailureDetails: String (Optional) @@ -3321,7 +3477,11 @@ private Mono> listTestRunsSinglePageAsync(RequestOptio * requestDataLevel: String(NONE/ERRORS) (Optional) * debugLogsEnabled: Boolean (Optional) * publicIPDisabled: Boolean (Optional) - * createdByType: String(User/ScheduledTrigger) (Optional) + * createdByType: String(User/ScheduledTrigger/AzurePipelines/GitHubWorkflows) (Optional) + * createdByUri: String (Optional) + * estimatedVirtualUserHours: Double (Optional) + * executionStartDateTime: OffsetDateTime (Optional) + * executionEndDateTime: OffsetDateTime (Optional) * createdDateTime: OffsetDateTime (Optional) * createdBy: String (Optional) * lastModifiedDateTime: OffsetDateTime (Optional) @@ -3388,6 +3548,8 @@ public PagedFlux listTestRunsAsync(RequestOptions requestOptions) { * maxpagesizeIntegerNoNumber of results in response. * createdByTypesList<String>NoComma separated list of type of entities * that have created the test run. In the form of "," separated string. + * testIdsList<String>NoComma-separated list of test IDs. If you are using + * testIds, do not send a value for testId. In the form of "," separated string. * * You can add these to a request with {@link RequestOptions#addQueryParam} *

Response Body Schema

@@ -3427,6 +3589,7 @@ public PagedFlux listTestRunsAsync(RequestOptions requestOptions) { * autoStopDisabled: Boolean (Optional) * errorRate: Double (Optional) * errorRateTimeWindowInSeconds: Long (Optional) + * maximumVirtualUsersPerEngine: Integer (Optional) * } * secrets (Optional): { * String (Required): { @@ -3444,7 +3607,13 @@ public PagedFlux listTestRunsAsync(RequestOptions requestOptions) { * } * errorDetails (Optional): [ * (Optional){ + * code: String (Optional) * message: String (Optional) + * properties (Optional): { + * String (Required): [ + * String (Required) + * ] + * } * } * ] * testRunStatistics (Optional): { @@ -3498,7 +3667,7 @@ public PagedFlux listTestRunsAsync(RequestOptions requestOptions) { * configFileInfo (Optional): { * fileName: String (Required) * url: String (Optional) - * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional) + * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional) * expireDateTime: OffsetDateTime (Optional) * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional) * validationFailureDetails: String (Optional) @@ -3538,7 +3707,11 @@ public PagedFlux listTestRunsAsync(RequestOptions requestOptions) { * requestDataLevel: String(NONE/ERRORS) (Optional) * debugLogsEnabled: Boolean (Optional) * publicIPDisabled: Boolean (Optional) - * createdByType: String(User/ScheduledTrigger) (Optional) + * createdByType: String(User/ScheduledTrigger/AzurePipelines/GitHubWorkflows) (Optional) + * createdByUri: String (Optional) + * estimatedVirtualUserHours: Double (Optional) + * executionStartDateTime: OffsetDateTime (Optional) + * executionEndDateTime: OffsetDateTime (Optional) * createdDateTime: OffsetDateTime (Optional) * createdBy: String (Optional) * lastModifiedDateTime: OffsetDateTime (Optional) @@ -3585,6 +3758,8 @@ private PagedResponse listTestRunsSinglePage(RequestOptions requestO * maxpagesizeIntegerNoNumber of results in response. * createdByTypesList<String>NoComma separated list of type of entities * that have created the test run. In the form of "," separated string. + * testIdsList<String>NoComma-separated list of test IDs. If you are using + * testIds, do not send a value for testId. In the form of "," separated string. * * You can add these to a request with {@link RequestOptions#addQueryParam} *

Response Body Schema

@@ -3624,6 +3799,7 @@ private PagedResponse listTestRunsSinglePage(RequestOptions requestO * autoStopDisabled: Boolean (Optional) * errorRate: Double (Optional) * errorRateTimeWindowInSeconds: Long (Optional) + * maximumVirtualUsersPerEngine: Integer (Optional) * } * secrets (Optional): { * String (Required): { @@ -3641,7 +3817,13 @@ private PagedResponse listTestRunsSinglePage(RequestOptions requestO * } * errorDetails (Optional): [ * (Optional){ + * code: String (Optional) * message: String (Optional) + * properties (Optional): { + * String (Required): [ + * String (Required) + * ] + * } * } * ] * testRunStatistics (Optional): { @@ -3695,7 +3877,7 @@ private PagedResponse listTestRunsSinglePage(RequestOptions requestO * configFileInfo (Optional): { * fileName: String (Required) * url: String (Optional) - * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional) + * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional) * expireDateTime: OffsetDateTime (Optional) * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional) * validationFailureDetails: String (Optional) @@ -3735,7 +3917,11 @@ private PagedResponse listTestRunsSinglePage(RequestOptions requestO * requestDataLevel: String(NONE/ERRORS) (Optional) * debugLogsEnabled: Boolean (Optional) * publicIPDisabled: Boolean (Optional) - * createdByType: String(User/ScheduledTrigger) (Optional) + * createdByType: String(User/ScheduledTrigger/AzurePipelines/GitHubWorkflows) (Optional) + * createdByUri: String (Optional) + * estimatedVirtualUserHours: Double (Optional) + * executionStartDateTime: OffsetDateTime (Optional) + * executionEndDateTime: OffsetDateTime (Optional) * createdDateTime: OffsetDateTime (Optional) * createdBy: String (Optional) * lastModifiedDateTime: OffsetDateTime (Optional) @@ -3819,6 +4005,7 @@ public PagedIterable listTestRuns(RequestOptions requestOptions) { * autoStopDisabled: Boolean (Optional) * errorRate: Double (Optional) * errorRateTimeWindowInSeconds: Long (Optional) + * maximumVirtualUsersPerEngine: Integer (Optional) * } * secrets (Optional): { * String (Required): { @@ -3836,7 +4023,13 @@ public PagedIterable listTestRuns(RequestOptions requestOptions) { * } * errorDetails (Optional): [ * (Optional){ + * code: String (Optional) * message: String (Optional) + * properties (Optional): { + * String (Required): [ + * String (Required) + * ] + * } * } * ] * testRunStatistics (Optional): { @@ -3890,7 +4083,7 @@ public PagedIterable listTestRuns(RequestOptions requestOptions) { * configFileInfo (Optional): { * fileName: String (Required) * url: String (Optional) - * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional) + * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional) * expireDateTime: OffsetDateTime (Optional) * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional) * validationFailureDetails: String (Optional) @@ -3930,7 +4123,11 @@ public PagedIterable listTestRuns(RequestOptions requestOptions) { * requestDataLevel: String(NONE/ERRORS) (Optional) * debugLogsEnabled: Boolean (Optional) * publicIPDisabled: Boolean (Optional) - * createdByType: String(User/ScheduledTrigger) (Optional) + * createdByType: String(User/ScheduledTrigger/AzurePipelines/GitHubWorkflows) (Optional) + * createdByUri: String (Optional) + * estimatedVirtualUserHours: Double (Optional) + * executionStartDateTime: OffsetDateTime (Optional) + * executionEndDateTime: OffsetDateTime (Optional) * createdDateTime: OffsetDateTime (Optional) * createdBy: String (Optional) * lastModifiedDateTime: OffsetDateTime (Optional) @@ -3994,6 +4191,7 @@ public Mono> stopTestRunWithResponseAsync(String testRunId, * autoStopDisabled: Boolean (Optional) * errorRate: Double (Optional) * errorRateTimeWindowInSeconds: Long (Optional) + * maximumVirtualUsersPerEngine: Integer (Optional) * } * secrets (Optional): { * String (Required): { @@ -4011,7 +4209,13 @@ public Mono> stopTestRunWithResponseAsync(String testRunId, * } * errorDetails (Optional): [ * (Optional){ + * code: String (Optional) * message: String (Optional) + * properties (Optional): { + * String (Required): [ + * String (Required) + * ] + * } * } * ] * testRunStatistics (Optional): { @@ -4065,7 +4269,7 @@ public Mono> stopTestRunWithResponseAsync(String testRunId, * configFileInfo (Optional): { * fileName: String (Required) * url: String (Optional) - * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional) + * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional) * expireDateTime: OffsetDateTime (Optional) * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional) * validationFailureDetails: String (Optional) @@ -4105,7 +4309,11 @@ public Mono> stopTestRunWithResponseAsync(String testRunId, * requestDataLevel: String(NONE/ERRORS) (Optional) * debugLogsEnabled: Boolean (Optional) * publicIPDisabled: Boolean (Optional) - * createdByType: String(User/ScheduledTrigger) (Optional) + * createdByType: String(User/ScheduledTrigger/AzurePipelines/GitHubWorkflows) (Optional) + * createdByUri: String (Optional) + * estimatedVirtualUserHours: Double (Optional) + * executionStartDateTime: OffsetDateTime (Optional) + * executionEndDateTime: OffsetDateTime (Optional) * createdDateTime: OffsetDateTime (Optional) * createdBy: String (Optional) * lastModifiedDateTime: OffsetDateTime (Optional) @@ -4150,7 +4358,13 @@ public Response stopTestRunWithResponse(String testRunId, RequestOpt * status: String(ACCEPTED/NOTSTARTED/EXECUTING/DONE/CANCELLING/CANCELLED/FAILED) (Optional) * errorDetails (Optional): [ * (Optional){ + * code: String (Optional) * message: String (Optional) + * properties (Optional): { + * String (Required): [ + * String (Required) + * ] + * } * } * ] * startDateTime: OffsetDateTime (Optional) @@ -4197,7 +4411,13 @@ public Response stopTestRunWithResponse(String testRunId, RequestOpt * status: String(ACCEPTED/NOTSTARTED/EXECUTING/DONE/CANCELLING/CANCELLED/FAILED) (Optional) * errorDetails (Optional): [ * (Optional){ + * code: String (Optional) * message: String (Optional) + * properties (Optional): { + * String (Required): [ + * String (Required) + * ] + * } * } * ] * startDateTime: OffsetDateTime (Optional) @@ -4268,7 +4488,13 @@ public Mono> createOrUpdateTestProfileRunWithResponseAsync( * status: String(ACCEPTED/NOTSTARTED/EXECUTING/DONE/CANCELLING/CANCELLED/FAILED) (Optional) * errorDetails (Optional): [ * (Optional){ + * code: String (Optional) * message: String (Optional) + * properties (Optional): { + * String (Required): [ + * String (Required) + * ] + * } * } * ] * startDateTime: OffsetDateTime (Optional) @@ -4315,7 +4541,13 @@ public Mono> createOrUpdateTestProfileRunWithResponseAsync( * status: String(ACCEPTED/NOTSTARTED/EXECUTING/DONE/CANCELLING/CANCELLED/FAILED) (Optional) * errorDetails (Optional): [ * (Optional){ + * code: String (Optional) * message: String (Optional) + * properties (Optional): { + * String (Required): [ + * String (Required) + * ] + * } * } * ] * startDateTime: OffsetDateTime (Optional) @@ -4382,9 +4614,8 @@ public Response createOrUpdateTestProfileRunWithResponse(String test @ServiceMethod(returns = ReturnType.SINGLE) public Mono> deleteTestProfileRunWithResponseAsync(String testProfileRunId, RequestOptions requestOptions) { - final String accept = "application/json"; return FluxUtil.withContext(context -> service.deleteTestProfileRun(this.getEndpoint(), - this.getServiceVersion().getVersion(), testProfileRunId, accept, requestOptions, context)); + this.getServiceVersion().getVersion(), testProfileRunId, requestOptions, context)); } /** @@ -4403,9 +4634,8 @@ public Mono> deleteTestProfileRunWithResponseAsync(String testPro */ @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteTestProfileRunWithResponse(String testProfileRunId, RequestOptions requestOptions) { - final String accept = "application/json"; return service.deleteTestProfileRunSync(this.getEndpoint(), this.getServiceVersion().getVersion(), - testProfileRunId, accept, requestOptions, Context.NONE); + testProfileRunId, requestOptions, Context.NONE); } /** @@ -4428,7 +4658,13 @@ public Response deleteTestProfileRunWithResponse(String testProfileRunId, * status: String(ACCEPTED/NOTSTARTED/EXECUTING/DONE/CANCELLING/CANCELLED/FAILED) (Optional) * errorDetails (Optional): [ * (Optional){ + * code: String (Optional) * message: String (Optional) + * properties (Optional): { + * String (Required): [ + * String (Required) + * ] + * } * } * ] * startDateTime: OffsetDateTime (Optional) @@ -4499,7 +4735,13 @@ public Mono> getTestProfileRunWithResponseAsync(String test * status: String(ACCEPTED/NOTSTARTED/EXECUTING/DONE/CANCELLING/CANCELLED/FAILED) (Optional) * errorDetails (Optional): [ * (Optional){ + * code: String (Optional) * message: String (Optional) + * properties (Optional): { + * String (Required): [ + * String (Required) + * ] + * } * } * ] * startDateTime: OffsetDateTime (Optional) @@ -4594,7 +4836,13 @@ public Response getTestProfileRunWithResponse(String testProfileRunI * status: String(ACCEPTED/NOTSTARTED/EXECUTING/DONE/CANCELLING/CANCELLED/FAILED) (Optional) * errorDetails (Optional): [ * (Optional){ + * code: String (Optional) * message: String (Optional) + * properties (Optional): { + * String (Required): [ + * String (Required) + * ] + * } * } * ] * startDateTime: OffsetDateTime (Optional) @@ -4689,7 +4937,13 @@ private Mono> listTestProfileRunsSinglePageAsync(Reque * status: String(ACCEPTED/NOTSTARTED/EXECUTING/DONE/CANCELLING/CANCELLED/FAILED) (Optional) * errorDetails (Optional): [ * (Optional){ + * code: String (Optional) * message: String (Optional) + * properties (Optional): { + * String (Required): [ + * String (Required) + * ] + * } * } * ] * startDateTime: OffsetDateTime (Optional) @@ -4802,7 +5056,13 @@ public PagedFlux listTestProfileRunsAsync(RequestOptions requestOpti * status: String(ACCEPTED/NOTSTARTED/EXECUTING/DONE/CANCELLING/CANCELLED/FAILED) (Optional) * errorDetails (Optional): [ * (Optional){ + * code: String (Optional) * message: String (Optional) + * properties (Optional): { + * String (Required): [ + * String (Required) + * ] + * } * } * ] * startDateTime: OffsetDateTime (Optional) @@ -4895,7 +5155,13 @@ private PagedResponse listTestProfileRunsSinglePage(RequestOptions r * status: String(ACCEPTED/NOTSTARTED/EXECUTING/DONE/CANCELLING/CANCELLED/FAILED) (Optional) * errorDetails (Optional): [ * (Optional){ + * code: String (Optional) * message: String (Optional) + * properties (Optional): { + * String (Required): [ + * String (Required) + * ] + * } * } * ] * startDateTime: OffsetDateTime (Optional) @@ -4982,7 +5248,13 @@ public PagedIterable listTestProfileRuns(RequestOptions requestOptio * status: String(ACCEPTED/NOTSTARTED/EXECUTING/DONE/CANCELLING/CANCELLED/FAILED) (Optional) * errorDetails (Optional): [ * (Optional){ + * code: String (Optional) * message: String (Optional) + * properties (Optional): { + * String (Required): [ + * String (Required) + * ] + * } * } * ] * startDateTime: OffsetDateTime (Optional) @@ -5050,7 +5322,13 @@ public Mono> stopTestProfileRunWithResponseAsync(String tes * status: String(ACCEPTED/NOTSTARTED/EXECUTING/DONE/CANCELLING/CANCELLED/FAILED) (Optional) * errorDetails (Optional): [ * (Optional){ + * code: String (Optional) * message: String (Optional) + * properties (Optional): { + * String (Required): [ + * String (Required) + * ] + * } * } * ] * startDateTime: OffsetDateTime (Optional) @@ -5097,6 +5375,446 @@ public Response stopTestProfileRunWithResponse(String testProfileRun testProfileRunId, accept, requestOptions, Context.NONE); } + /** + * Get the latest insights for the test run. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     columns (Optional): [
+     *          (Optional){
+     *             name: String (Required)
+     *             dataType: String (Required)
+     *         }
+     *     ]
+     *     rows (Optional): {
+     *         String (Required): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     version: Long (Optional)
+     *     status: String(NotStarted/Running/Succeeded/Failed/Canceled) (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 the latest insights for the test run along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getLatestTestRunInsightsWithResponseAsync(String testRunId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.getLatestTestRunInsights(this.getEndpoint(), + this.getServiceVersion().getVersion(), testRunId, accept, requestOptions, context)); + } + + /** + * Get the latest insights for the test run. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     columns (Optional): [
+     *          (Optional){
+     *             name: String (Required)
+     *             dataType: String (Required)
+     *         }
+     *     ]
+     *     rows (Optional): {
+     *         String (Required): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     version: Long (Optional)
+     *     status: String(NotStarted/Running/Succeeded/Failed/Canceled) (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 the latest insights for the test run along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getLatestTestRunInsightsWithResponse(String testRunId, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getLatestTestRunInsightsSync(this.getEndpoint(), this.getServiceVersion().getVersion(), + testRunId, accept, requestOptions, Context.NONE); + } + + /** + * Update the latest insights for the test run. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     columns (Optional): [
+     *          (Optional){
+     *             name: String (Required)
+     *             dataType: String (Required)
+     *         }
+     *     ]
+     *     rows (Optional): {
+     *         String (Required): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     version: Long (Optional)
+     *     status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     columns (Optional): [
+     *          (Optional){
+     *             name: String (Required)
+     *             dataType: String (Required)
+     *         }
+     *     ]
+     *     rows (Optional): {
+     *         String (Required): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     version: Long (Optional)
+     *     status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Optional)
+     * }
+     * }
+     * 
+ * + * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, + * numeric, underscore or hyphen characters. + * @param body Test run insights 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 represents insights for the test run along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> updateLatestTestRunInsightsWithResponseAsync(String testRunId, BinaryData body, + RequestOptions requestOptions) { + final String contentType = "application/merge-patch+json"; + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.updateLatestTestRunInsights(this.getEndpoint(), + this.getServiceVersion().getVersion(), contentType, testRunId, accept, body, requestOptions, context)); + } + + /** + * Update the latest insights for the test run. + *

Request Body Schema

+ * + *
+     * {@code
+     * {
+     *     columns (Optional): [
+     *          (Optional){
+     *             name: String (Required)
+     *             dataType: String (Required)
+     *         }
+     *     ]
+     *     rows (Optional): {
+     *         String (Required): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     version: Long (Optional)
+     *     status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Optional)
+     * }
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     columns (Optional): [
+     *          (Optional){
+     *             name: String (Required)
+     *             dataType: String (Required)
+     *         }
+     *     ]
+     *     rows (Optional): {
+     *         String (Required): {
+     *             String: String (Required)
+     *         }
+     *     }
+     *     version: Long (Optional)
+     *     status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Optional)
+     * }
+     * }
+     * 
+ * + * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, + * numeric, underscore or hyphen characters. + * @param body Test run insights 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 represents insights for the test run along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateLatestTestRunInsightsWithResponse(String testRunId, BinaryData body, + RequestOptions requestOptions) { + final String contentType = "application/merge-patch+json"; + final String accept = "application/json"; + return service.updateLatestTestRunInsightsSync(this.getEndpoint(), this.getServiceVersion().getVersion(), + contentType, testRunId, accept, body, requestOptions, Context.NONE); + } + + /** + * Generate insights for the test run. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     id: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required)
+     *     kind: String(CloneTest/GenerateTestRunInsights/TestPlanRecommendations) (Required)
+     *     error (Optional): {
+     *         error (Required): (recursive schema, see error above)
+     *     }
+     * }
+     * }
+     * 
+ * + * @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 status of a long running operation along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> generateTestRunInsightsWithResponseAsync(String testRunId, + RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.generateTestRunInsights(this.getEndpoint(), + this.getServiceVersion().getVersion(), testRunId, accept, requestOptions, context)); + } + + /** + * Generate insights for the test run. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     id: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required)
+     *     kind: String(CloneTest/GenerateTestRunInsights/TestPlanRecommendations) (Required)
+     *     error (Optional): {
+     *         error (Required): (recursive schema, see error above)
+     *     }
+     * }
+     * }
+     * 
+ * + * @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 status of a long running operation along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response generateTestRunInsightsWithResponse(String testRunId, RequestOptions requestOptions) { + final String accept = "application/json"; + return service.generateTestRunInsightsSync(this.getEndpoint(), this.getServiceVersion().getVersion(), testRunId, + accept, requestOptions, Context.NONE); + } + + /** + * Generate insights for the test run. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     id: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required)
+     *     kind: String(CloneTest/GenerateTestRunInsights/TestPlanRecommendations) (Required)
+     *     error (Optional): {
+     *         error (Required): (recursive schema, see error above)
+     *     }
+     * }
+     * }
+     * 
+ * + * @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 PollerFlux} for polling of status of a long running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux beginGenerateTestRunInsightsWithModelAsync(String testRunId, + RequestOptions requestOptions) { + return PollerFlux.create(Duration.ofSeconds(1), + () -> this.generateTestRunInsightsWithResponseAsync(testRunId, requestOptions), + new DefaultPollingStrategy<>(new PollingStrategyOptions(this.getHttpPipeline()) + .setEndpoint("https://{endpoint}".replace("{endpoint}", this.getEndpoint())) + .setContext(requestOptions != null && requestOptions.getContext() != null + ? requestOptions.getContext() + : Context.NONE) + .setServiceVersion(this.getServiceVersion().getVersion())), + TypeReference.createInstance(TestRunInsights.class), TypeReference.createInstance(Void.class)); + } + + /** + * Generate insights for the test run. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     id: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required)
+     *     kind: String(CloneTest/GenerateTestRunInsights/TestPlanRecommendations) (Required)
+     *     error (Optional): {
+     *         error (Required): (recursive schema, see error above)
+     *     }
+     * }
+     * }
+     * 
+ * + * @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 SyncPoller} for polling of status of a long running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller beginGenerateTestRunInsightsWithModel(String testRunId, + RequestOptions requestOptions) { + return SyncPoller.createPoller(Duration.ofSeconds(1), + () -> this.generateTestRunInsightsWithResponse(testRunId, requestOptions), + new SyncDefaultPollingStrategy<>(new PollingStrategyOptions(this.getHttpPipeline()) + .setEndpoint("https://{endpoint}".replace("{endpoint}", this.getEndpoint())) + .setContext(requestOptions != null && requestOptions.getContext() != null + ? requestOptions.getContext() + : Context.NONE) + .setServiceVersion(this.getServiceVersion().getVersion())), + TypeReference.createInstance(TestRunInsights.class), TypeReference.createInstance(Void.class)); + } + + /** + * Generate insights for the test run. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     id: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required)
+     *     kind: String(CloneTest/GenerateTestRunInsights/TestPlanRecommendations) (Required)
+     *     error (Optional): {
+     *         error (Required): (recursive schema, see error above)
+     *     }
+     * }
+     * }
+     * 
+ * + * @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 PollerFlux} for polling of status of a long running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public PollerFlux beginGenerateTestRunInsightsAsync(String testRunId, + RequestOptions requestOptions) { + return PollerFlux.create(Duration.ofSeconds(1), + () -> this.generateTestRunInsightsWithResponseAsync(testRunId, requestOptions), + new DefaultPollingStrategy<>(new PollingStrategyOptions(this.getHttpPipeline()) + .setEndpoint("https://{endpoint}".replace("{endpoint}", this.getEndpoint())) + .setContext(requestOptions != null && requestOptions.getContext() != null + ? requestOptions.getContext() + : Context.NONE) + .setServiceVersion(this.getServiceVersion().getVersion())), + TypeReference.createInstance(BinaryData.class), TypeReference.createInstance(BinaryData.class)); + } + + /** + * Generate insights for the test run. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     id: String (Required)
+     *     status: String(NotStarted/Running/Succeeded/Failed/Canceled) (Required)
+     *     kind: String(CloneTest/GenerateTestRunInsights/TestPlanRecommendations) (Required)
+     *     error (Optional): {
+     *         error (Required): (recursive schema, see error above)
+     *     }
+     * }
+     * }
+     * 
+ * + * @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 SyncPoller} for polling of status of a long running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller beginGenerateTestRunInsights(String testRunId, + RequestOptions requestOptions) { + return SyncPoller.createPoller(Duration.ofSeconds(1), + () -> this.generateTestRunInsightsWithResponse(testRunId, requestOptions), + new SyncDefaultPollingStrategy<>(new PollingStrategyOptions(this.getHttpPipeline()) + .setEndpoint("https://{endpoint}".replace("{endpoint}", this.getEndpoint())) + .setContext(requestOptions != null && requestOptions.getContext() != null + ? requestOptions.getContext() + : Context.NONE) + .setServiceVersion(this.getServiceVersion().getVersion())), + TypeReference.createInstance(BinaryData.class), TypeReference.createInstance(BinaryData.class)); + } + /** * List the dimension values for the given metric dimension name. * @@ -5286,6 +6004,7 @@ private PagedResponse listMetricsNextSinglePage(String nextLink, Req * autoStopDisabled: Boolean (Optional) * errorRate: Double (Optional) * errorRateTimeWindowInSeconds: Long (Optional) + * maximumVirtualUsersPerEngine: Integer (Optional) * } * secrets (Optional): { * String (Required): { @@ -5303,7 +6022,13 @@ private PagedResponse listMetricsNextSinglePage(String nextLink, Req * } * errorDetails (Optional): [ * (Optional){ + * code: String (Optional) * message: String (Optional) + * properties (Optional): { + * String (Required): [ + * String (Required) + * ] + * } * } * ] * testRunStatistics (Optional): { @@ -5357,7 +6082,7 @@ private PagedResponse listMetricsNextSinglePage(String nextLink, Req * configFileInfo (Optional): { * fileName: String (Required) * url: String (Optional) - * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional) + * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional) * expireDateTime: OffsetDateTime (Optional) * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional) * validationFailureDetails: String (Optional) @@ -5397,7 +6122,11 @@ private PagedResponse listMetricsNextSinglePage(String nextLink, Req * requestDataLevel: String(NONE/ERRORS) (Optional) * debugLogsEnabled: Boolean (Optional) * publicIPDisabled: Boolean (Optional) - * createdByType: String(User/ScheduledTrigger) (Optional) + * createdByType: String(User/ScheduledTrigger/AzurePipelines/GitHubWorkflows) (Optional) + * createdByUri: String (Optional) + * estimatedVirtualUserHours: Double (Optional) + * executionStartDateTime: OffsetDateTime (Optional) + * executionEndDateTime: OffsetDateTime (Optional) * createdDateTime: OffsetDateTime (Optional) * createdBy: String (Optional) * lastModifiedDateTime: OffsetDateTime (Optional) @@ -5467,6 +6196,7 @@ private Mono> listTestRunsNextSinglePageAsync(String n * autoStopDisabled: Boolean (Optional) * errorRate: Double (Optional) * errorRateTimeWindowInSeconds: Long (Optional) + * maximumVirtualUsersPerEngine: Integer (Optional) * } * secrets (Optional): { * String (Required): { @@ -5484,7 +6214,13 @@ private Mono> listTestRunsNextSinglePageAsync(String n * } * errorDetails (Optional): [ * (Optional){ + * code: String (Optional) * message: String (Optional) + * properties (Optional): { + * String (Required): [ + * String (Required) + * ] + * } * } * ] * testRunStatistics (Optional): { @@ -5538,7 +6274,7 @@ private Mono> listTestRunsNextSinglePageAsync(String n * configFileInfo (Optional): { * fileName: String (Required) * url: String (Optional) - * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional) + * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT/BROWSER_RECORDING/TEST_PLAN_RECOMMENDATIONS) (Optional) * expireDateTime: OffsetDateTime (Optional) * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional) * validationFailureDetails: String (Optional) @@ -5578,7 +6314,11 @@ private Mono> listTestRunsNextSinglePageAsync(String n * requestDataLevel: String(NONE/ERRORS) (Optional) * debugLogsEnabled: Boolean (Optional) * publicIPDisabled: Boolean (Optional) - * createdByType: String(User/ScheduledTrigger) (Optional) + * createdByType: String(User/ScheduledTrigger/AzurePipelines/GitHubWorkflows) (Optional) + * createdByUri: String (Optional) + * estimatedVirtualUserHours: Double (Optional) + * executionStartDateTime: OffsetDateTime (Optional) + * executionEndDateTime: OffsetDateTime (Optional) * createdDateTime: OffsetDateTime (Optional) * createdBy: String (Optional) * lastModifiedDateTime: OffsetDateTime (Optional) @@ -5624,7 +6364,13 @@ private PagedResponse listTestRunsNextSinglePage(String nextLink, Re * status: String(ACCEPTED/NOTSTARTED/EXECUTING/DONE/CANCELLING/CANCELLED/FAILED) (Optional) * errorDetails (Optional): [ * (Optional){ + * code: String (Optional) * message: String (Optional) + * properties (Optional): { + * String (Required): [ + * String (Required) + * ] + * } * } * ] * startDateTime: OffsetDateTime (Optional) @@ -5694,7 +6440,13 @@ private Mono> listTestProfileRunsNextSinglePageAsync(S * status: String(ACCEPTED/NOTSTARTED/EXECUTING/DONE/CANCELLING/CANCELLED/FAILED) (Optional) * errorDetails (Optional): [ * (Optional){ + * code: String (Optional) * message: String (Optional) + * properties (Optional): { + * String (Required): [ + * String (Required) + * ] + * } * } * ] * startDateTime: OffsetDateTime (Optional) diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/implementation/models/CloneTestRequest1.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/implementation/models/CloneTestRequest1.java new file mode 100644 index 000000000000..e4116afbe9b6 --- /dev/null +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/implementation/models/CloneTestRequest1.java @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.developer.loadtesting.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The CloneTestRequest1 model. + */ +@Fluent +public final class CloneTestRequest1 implements JsonSerializable { + /* + * Unique identifier for the new test that will be created. + */ + @Generated + private final String newTestId; + + /* + * Display Name override for the newly created test. + */ + @Generated + private String displayName; + + /* + * Description override for the newly created test. + */ + @Generated + private String description; + + /** + * Creates an instance of CloneTestRequest1 class. + * + * @param newTestId the newTestId value to set. + */ + @Generated + public CloneTestRequest1(String newTestId) { + this.newTestId = newTestId; + } + + /** + * Get the newTestId property: Unique identifier for the new test that will be created. + * + * @return the newTestId value. + */ + @Generated + public String getNewTestId() { + return this.newTestId; + } + + /** + * Get the displayName property: Display Name override for the newly created test. + * + * @return the displayName value. + */ + @Generated + public String getDisplayName() { + return this.displayName; + } + + /** + * Set the displayName property: Display Name override for the newly created test. + * + * @param displayName the displayName value to set. + * @return the CloneTestRequest1 object itself. + */ + @Generated + public CloneTestRequest1 setDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the description property: Description override for the newly created test. + * + * @return the description value. + */ + @Generated + public String getDescription() { + return this.description; + } + + /** + * Set the description property: Description override for the newly created test. + * + * @param description the description value to set. + * @return the CloneTestRequest1 object itself. + */ + @Generated + public CloneTestRequest1 setDescription(String description) { + this.description = description; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("newTestId", this.newTestId); + jsonWriter.writeStringField("displayName", this.displayName); + jsonWriter.writeStringField("description", this.description); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CloneTestRequest1 from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CloneTestRequest1 if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the CloneTestRequest1. + */ + @Generated + public static CloneTestRequest1 fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String newTestId = null; + String displayName = null; + String description = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("newTestId".equals(fieldName)) { + newTestId = reader.getString(); + } else if ("displayName".equals(fieldName)) { + displayName = reader.getString(); + } else if ("description".equals(fieldName)) { + description = reader.getString(); + } else { + reader.skipChildren(); + } + } + CloneTestRequest1 deserializedCloneTestRequest1 = new CloneTestRequest1(newTestId); + deserializedCloneTestRequest1.displayName = displayName; + deserializedCloneTestRequest1.description = description; + + return deserializedCloneTestRequest1; + }); + } +} diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/implementation/models/package-info.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/implementation/models/package-info.java new file mode 100644 index 000000000000..24a15de0fe35 --- /dev/null +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/implementation/models/package-info.java @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +/** + * Package containing the data models for LoadTesting. + * These APIs allow end users to create, view and run load tests using Azure Load Test Service. + */ +package com.azure.developer.loadtesting.implementation.models; diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/implementation/package-info.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/implementation/package-info.java index 918f9c45b17b..3b12718899af 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/implementation/package-info.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/implementation/package-info.java @@ -1,8 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. + /** - * Package containing the implementations for LoadTestingClient. These APIs allow end users to create, view and run load - * tests using Azure Load Test Service. + * Package containing the implementations for LoadTesting. + * These APIs allow end users to create, view and run load tests using Azure Load Test Service. */ package com.azure.developer.loadtesting.implementation; diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/AggregationType.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/AggregationType.java index 592eb59ac279..73c7e3a8636f 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/AggregationType.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/AggregationType.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Generated; @@ -11,7 +12,6 @@ * Aggregation type. */ public final class AggregationType extends ExpandableStringEnum { - /** * Average value. */ @@ -92,7 +92,7 @@ public final class AggregationType extends ExpandableStringEnum /** * Creates a new instance of AggregationType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Generated @@ -102,7 +102,7 @@ public AggregationType() { /** * Creates or finds a AggregationType from its string representation. - * + * * @param name a name to look for. * @return the corresponding AggregationType. */ @@ -113,7 +113,7 @@ public static AggregationType fromString(String name) { /** * Gets known AggregationType values. - * + * * @return known AggregationType values. */ @Generated diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/ArtifactsContainerInfo.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/ArtifactsContainerInfo.java index 68f1772d4dfb..16546c753bc3 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/ArtifactsContainerInfo.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/ArtifactsContainerInfo.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Generated; @@ -19,13 +20,18 @@ */ @Immutable public final class ArtifactsContainerInfo implements JsonSerializable { - /* * This is a SAS URI to an Azure Storage Container that contains the test run artifacts. */ @Generated private String url; + /* + * Expiry time of the container (RFC 3339 literal format) + */ + @Generated + private OffsetDateTime expiresOn; + /** * Creates an instance of ArtifactsContainerInfo class. */ @@ -35,7 +41,7 @@ private ArtifactsContainerInfo() { /** * Get the url property: This is a SAS URI to an Azure Storage Container that contains the test run artifacts. - * + * * @return the url value. */ @Generated @@ -43,6 +49,16 @@ public String getUrl() { return this.url; } + /** + * Get the expiresOn property: Expiry time of the container (RFC 3339 literal format). + * + * @return the expiresOn value. + */ + @Generated + public OffsetDateTime getExpiresOn() { + return this.expiresOn; + } + /** * {@inheritDoc} */ @@ -58,7 +74,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of ArtifactsContainerInfo from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of ArtifactsContainerInfo if the JsonReader was pointing to an instance of it, or null if it * was pointing to JSON null. @@ -71,6 +87,7 @@ public static ArtifactsContainerInfo fromJson(JsonReader jsonReader) throws IOEx while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); + if ("url".equals(fieldName)) { deserializedArtifactsContainerInfo.url = reader.getString(); } else if ("expireDateTime".equals(fieldName)) { @@ -80,23 +97,8 @@ public static ArtifactsContainerInfo fromJson(JsonReader jsonReader) throws IOEx reader.skipChildren(); } } + return deserializedArtifactsContainerInfo; }); } - - /* - * Expiry time of the container (RFC 3339 literal format) - */ - @Generated - private OffsetDateTime expiresOn; - - /** - * Get the expiresOn property: Expiry time of the container (RFC 3339 literal format). - * - * @return the expiresOn value. - */ - @Generated - public OffsetDateTime getExpiresOn() { - return this.expiresOn; - } } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/AutoStopCriteria.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/AutoStopCriteria.java index 373b1dd6f953..59dcd38d292a 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/AutoStopCriteria.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/AutoStopCriteria.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Fluent; @@ -21,7 +22,6 @@ */ @Fluent public final class AutoStopCriteria implements JsonSerializable { - /* * Whether auto-stop should be disabled. The default value is false. */ @@ -35,6 +35,18 @@ public final class AutoStopCriteria implements JsonSerializable { + /** + * If the certificate is stored in an Azure Key Vault. + */ + @Generated + public static final CertificateType KEY_VAULT_CERTIFICATE_URI = fromString("AKV_CERT_URI"); /** * Creates a new instance of CertificateType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Generated @@ -24,7 +30,7 @@ public CertificateType() { /** * Creates or finds a CertificateType from its string representation. - * + * * @param name a name to look for. * @return the corresponding CertificateType. */ @@ -35,17 +41,11 @@ public static CertificateType fromString(String name) { /** * Gets known CertificateType values. - * + * * @return known CertificateType values. */ @Generated public static Collection values() { return values(CertificateType.class); } - - /** - * If the certificate is stored in an Azure Key Vault. - */ - @Generated - public static final CertificateType KEY_VAULT_CERTIFICATE_URI = fromString("AKV_CERT_URI"); } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/CreatedByType.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/CreatedByType.java index 5bfda0b10bae..424f63d6319d 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/CreatedByType.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/CreatedByType.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Generated; @@ -11,7 +12,6 @@ * The type of the entity that created the test run. (E.x. User, ScheduleTrigger, etc). */ public final class CreatedByType extends ExpandableStringEnum { - /** * Entity was created by a user. */ @@ -24,9 +24,21 @@ public final class CreatedByType extends ExpandableStringEnum { @Generated public static final CreatedByType SCHEDULED_TRIGGER = fromString("ScheduledTrigger"); + /** + * Entity was created by Azure DevOps pipelines. + */ + @Generated + public static final CreatedByType AZURE_PIPELINES = fromString("AzurePipelines"); + + /** + * Entity was created by GitHub Workflows. + */ + @Generated + public static final CreatedByType GIT_HUB_WORKFLOWS = fromString("GitHubWorkflows"); + /** * Creates a new instance of CreatedByType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Generated @@ -36,7 +48,7 @@ public CreatedByType() { /** * Creates or finds a CreatedByType from its string representation. - * + * * @param name a name to look for. * @return the corresponding CreatedByType. */ @@ -47,7 +59,7 @@ public static CreatedByType fromString(String name) { /** * Gets known CreatedByType values. - * + * * @return known CreatedByType values. */ @Generated diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/DailyRecurrence.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/DailyRecurrence.java new file mode 100644 index 000000000000..8fbdcef93588 --- /dev/null +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/DailyRecurrence.java @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.developer.loadtesting.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.developer.loadtesting.implementation.JsonMergePatchHelper; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.HashSet; +import java.util.Set; + +/** + * Recurrence model when frequency is set as Daily. + */ +@Fluent +public final class DailyRecurrence extends Recurrence { + /* + * Frequency of the recurrence. + */ + @Generated + private Frequency frequency = Frequency.DAILY; + + /* + * The interval at which the recurrence should repeat. It signifies the number of days between each recurrence. + */ + @Generated + private int interval; + + /** + * Stores updated model property, the value is property name, not serialized name. + */ + @Generated + private final Set updatedProperties = new HashSet<>(); + + /** + * Creates an instance of DailyRecurrence class. + */ + @Generated + public DailyRecurrence() { + } + + /** + * Get the frequency property: Frequency of the recurrence. + * + * @return the frequency value. + */ + @Generated + @Override + public Frequency getFrequency() { + return this.frequency; + } + + /** + * Get the interval property: The interval at which the recurrence should repeat. It signifies the number of days + * between each recurrence. + * + * @return the interval value. + */ + @Generated + public int getInterval() { + return this.interval; + } + + /** + * Set the interval property: The interval at which the recurrence should repeat. It signifies the number of days + * between each recurrence. + *

Required when create the resource.

+ * + * @param interval the interval value to set. + * @return the DailyRecurrence object itself. + */ + @Generated + public DailyRecurrence setInterval(int interval) { + this.interval = interval; + this.updatedProperties.add("interval"); + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public DailyRecurrence setRecurrenceEnd(RecurrenceEnd recurrenceEnd) { + super.setRecurrenceEnd(recurrenceEnd); + this.updatedProperties.add("recurrenceEnd"); + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + if (JsonMergePatchHelper.getRecurrenceAccessor().isJsonMergePatch(this)) { + return toJsonMergePatch(jsonWriter); + } else { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("recurrenceEnd", getRecurrenceEnd()); + jsonWriter.writeStringField("frequency", this.frequency == null ? null : this.frequency.toString()); + jsonWriter.writeIntField("interval", this.interval); + return jsonWriter.writeEndObject(); + } + } + + @Generated + private JsonWriter toJsonMergePatch(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + if (updatedProperties.contains("recurrenceEnd")) { + if (getRecurrenceEnd() == null) { + jsonWriter.writeNullField("recurrenceEnd"); + } else { + JsonMergePatchHelper.getRecurrenceEndAccessor().prepareModelForJsonMergePatch(getRecurrenceEnd(), true); + jsonWriter.writeJsonField("recurrenceEnd", getRecurrenceEnd()); + JsonMergePatchHelper.getRecurrenceEndAccessor() + .prepareModelForJsonMergePatch(getRecurrenceEnd(), false); + } + } + jsonWriter.writeStringField("frequency", this.frequency.toString()); + if (updatedProperties.contains("interval")) { + jsonWriter.writeIntField("interval", this.interval); + } + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DailyRecurrence from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DailyRecurrence if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the DailyRecurrence. + */ + @Generated + public static DailyRecurrence fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DailyRecurrence deserializedDailyRecurrence = new DailyRecurrence(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("recurrenceEnd".equals(fieldName)) { + JsonMergePatchHelper.getRecurrenceAccessor() + .setRecurrenceEnd(deserializedDailyRecurrence, RecurrenceEnd.fromJson(reader)); + } else if ("frequency".equals(fieldName)) { + deserializedDailyRecurrence.frequency = Frequency.fromString(reader.getString()); + } else if ("interval".equals(fieldName)) { + deserializedDailyRecurrence.interval = reader.getInt(); + } else { + reader.skipChildren(); + } + } + + return deserializedDailyRecurrence; + }); + } +} diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/DimensionFilter.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/DimensionFilter.java index 748621e4a923..8743a3a6383e 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/DimensionFilter.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/DimensionFilter.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Fluent; @@ -17,7 +18,6 @@ */ @Fluent public final class DimensionFilter implements JsonSerializable { - /* * The dimension name */ @@ -39,7 +39,7 @@ public DimensionFilter() { /** * Get the name property: The dimension name. - * + * * @return the name value. */ @Generated @@ -49,7 +49,7 @@ public String getName() { /** * Set the name property: The dimension name. - * + * * @param name the name value to set. * @return the DimensionFilter object itself. */ @@ -61,7 +61,7 @@ public DimensionFilter setName(String name) { /** * Get the values property: The dimension values. Maximum values can be 20. - * + * * @return the values value. */ @Generated @@ -71,7 +71,7 @@ public List getValues() { /** * Set the values property: The dimension values. Maximum values can be 20. - * + * * @param values the values value to set. * @return the DimensionFilter object itself. */ @@ -95,7 +95,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of DimensionFilter from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of DimensionFilter if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. @@ -108,6 +108,7 @@ public static DimensionFilter fromJson(JsonReader jsonReader) throws IOException while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); + if ("name".equals(fieldName)) { deserializedDimensionFilter.name = reader.getString(); } else if ("values".equals(fieldName)) { @@ -117,6 +118,7 @@ public static DimensionFilter fromJson(JsonReader jsonReader) throws IOException reader.skipChildren(); } } + return deserializedDimensionFilter; }); } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/DimensionValue.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/DimensionValue.java index 4a2d66025b3c..9e4c2f005480 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/DimensionValue.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/DimensionValue.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Generated; @@ -16,7 +17,6 @@ */ @Immutable public final class DimensionValue implements JsonSerializable { - /* * The name of the dimension. */ @@ -38,7 +38,7 @@ private DimensionValue() { /** * Get the name property: The name of the dimension. - * + * * @return the name value. */ @Generated @@ -48,7 +48,7 @@ public String getName() { /** * Get the value property: The value of the dimension. - * + * * @return the value value. */ @Generated @@ -70,7 +70,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of DimensionValue from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of DimensionValue if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. @@ -83,6 +83,7 @@ public static DimensionValue fromJson(JsonReader jsonReader) throws IOException while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); + if ("name".equals(fieldName)) { deserializedDimensionValue.name = reader.getString(); } else if ("value".equals(fieldName)) { @@ -91,6 +92,7 @@ public static DimensionValue fromJson(JsonReader jsonReader) throws IOException reader.skipChildren(); } } + return deserializedDimensionValue; }); } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/ErrorDetails.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/ErrorDetails.java index b8215734366e..0e90be28aa3d 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/ErrorDetails.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/ErrorDetails.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Generated; @@ -10,12 +11,19 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; +import java.util.List; +import java.util.Map; /** * Error details if there is any failure in load test run. */ @Immutable public final class ErrorDetails implements JsonSerializable { + /* + * Error code if there is any failure in load test run. + */ + @Generated + private String code; /* * Error details in case test run was not successfully run. @@ -23,6 +31,13 @@ public final class ErrorDetails implements JsonSerializable { @Generated private String message; + /* + * A dictionary for storing additional error information for better context. Each key is a property name (e.g., + * "Description", "Resolution", "Category", "Region"), and its value is an array of strings with relevant details. + */ + @Generated + private Map> properties; + /** * Creates an instance of ErrorDetails class. */ @@ -30,9 +45,19 @@ public final class ErrorDetails implements JsonSerializable { private ErrorDetails() { } + /** + * Get the code property: Error code if there is any failure in load test run. + * + * @return the code value. + */ + @Generated + public String getCode() { + return this.code; + } + /** * Get the message property: Error details in case test run was not successfully run. - * + * * @return the message value. */ @Generated @@ -40,6 +65,18 @@ public String getMessage() { return this.message; } + /** + * Get the properties property: A dictionary for storing additional error information for better context. Each key + * is a property name (e.g., "Description", "Resolution", "Category", "Region"), and its value is an array of + * strings with relevant details. + * + * @return the properties value. + */ + @Generated + public Map> getProperties() { + return this.properties; + } + /** * {@inheritDoc} */ @@ -52,7 +89,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of ErrorDetails from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of ErrorDetails if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. @@ -65,12 +102,20 @@ public static ErrorDetails fromJson(JsonReader jsonReader) throws IOException { while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("message".equals(fieldName)) { + + if ("code".equals(fieldName)) { + deserializedErrorDetails.code = reader.getString(); + } else if ("message".equals(fieldName)) { deserializedErrorDetails.message = reader.getString(); + } else if ("properties".equals(fieldName)) { + Map> properties + = reader.readMap(reader1 -> reader1.readArray(reader2 -> reader2.getString())); + deserializedErrorDetails.properties = properties; } else { reader.skipChildren(); } } + return deserializedErrorDetails; }); } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/FileValidationStatus.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/FileValidationStatus.java index 8ecabeb7691d..09c5870d06a9 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/FileValidationStatus.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/FileValidationStatus.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Generated; @@ -11,7 +12,6 @@ * File status. */ public final class FileValidationStatus extends ExpandableStringEnum { - /** * File is not validated. */ @@ -44,7 +44,7 @@ public final class FileValidationStatus extends ExpandableStringEnum { + /** + * Recurrence defined by a cron expression. + */ + @Generated + public static final Frequency CRON = fromString("Cron"); + + /** + * Recurrence defined on an hourly basis, as specified by HourlyRecurrence. + */ + @Generated + public static final Frequency HOURLY = fromString("Hourly"); + + /** + * Recurrence defined on a daily basis, as specified by DailyRecurrence. + */ + @Generated + public static final Frequency DAILY = fromString("Daily"); + + /** + * Recurrence defined on a weekly basis, as specified by WeeklyRecurrence. + */ + @Generated + public static final Frequency WEEKLY = fromString("Weekly"); + + /** + * Recurrence defined monthly on specific days, as specified by MonthlyRecurrenceByWeekDays. + */ + @Generated + public static final Frequency MONTHLY_BY_DAYS = fromString("MonthlyByDays"); + + /** + * Recurrence defined monthly on specific dates, as specified by MonthlyRecurrenceByDates. + */ + @Generated + public static final Frequency MONTHLY_BY_DATES = fromString("MonthlyByDates"); + + /** + * Creates a new instance of Frequency value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public Frequency() { + } + + /** + * Creates or finds a Frequency from its string representation. + * + * @param name a name to look for. + * @return the corresponding Frequency. + */ + @Generated + public static Frequency fromString(String name) { + return fromString(name, Frequency.class); + } + + /** + * Gets known Frequency values. + * + * @return known Frequency values. + */ + @Generated + public static Collection values() { + return values(Frequency.class); + } +} diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/FunctionFlexConsumptionResourceConfiguration.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/FunctionFlexConsumptionResourceConfiguration.java index 6df721f013cf..eeb22ae7879e 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/FunctionFlexConsumptionResourceConfiguration.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/FunctionFlexConsumptionResourceConfiguration.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Fluent; @@ -20,7 +21,6 @@ @Fluent public final class FunctionFlexConsumptionResourceConfiguration implements JsonSerializable { - /* * Memory size of the instance. Supported values are 2048, 4096. */ @@ -50,7 +50,6 @@ private void serializeAsJsonMergePatch(boolean jsonMergePatch) { static { JsonMergePatchHelper.setFunctionFlexConsumptionResourceConfigurationAccessor( new JsonMergePatchHelper.FunctionFlexConsumptionResourceConfigurationAccessor() { - @Override public FunctionFlexConsumptionResourceConfiguration prepareModelForJsonMergePatch( FunctionFlexConsumptionResourceConfiguration model, boolean jsonMergePatchEnabled) { @@ -74,7 +73,7 @@ public FunctionFlexConsumptionResourceConfiguration() { /** * Get the instanceMemoryMB property: Memory size of the instance. Supported values are 2048, 4096. - * + * * @return the instanceMemoryMB value. */ @Generated @@ -85,7 +84,7 @@ public long getInstanceMemoryMB() { /** * Set the instanceMemoryMB property: Memory size of the instance. Supported values are 2048, 4096. *

Required when create the resource.

- * + * * @param instanceMemoryMB the instanceMemoryMB value to set. * @return the FunctionFlexConsumptionResourceConfiguration object itself. */ @@ -98,7 +97,7 @@ public FunctionFlexConsumptionResourceConfiguration setInstanceMemoryMB(long ins /** * Get the httpConcurrency property: HTTP Concurrency for the function app. - * + * * @return the httpConcurrency value. */ @Generated @@ -106,6 +105,19 @@ public Long getHttpConcurrency() { return this.httpConcurrency; } + /** + * Set the httpConcurrency property: HTTP Concurrency for the function app. + * + * @param httpConcurrency the httpConcurrency value to set. + * @return the FunctionFlexConsumptionResourceConfiguration object itself. + */ + @Generated + public FunctionFlexConsumptionResourceConfiguration setHttpConcurrency(Long httpConcurrency) { + this.httpConcurrency = httpConcurrency; + this.updatedProperties.add("httpConcurrency"); + return this; + } + /** * {@inheritDoc} */ @@ -140,7 +152,7 @@ private JsonWriter toJsonMergePatch(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of FunctionFlexConsumptionResourceConfiguration from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of FunctionFlexConsumptionResourceConfiguration if the JsonReader was pointing to an instance * of it, or null if it was pointing to JSON null. @@ -154,6 +166,7 @@ public static FunctionFlexConsumptionResourceConfiguration fromJson(JsonReader j while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); + if ("instanceMemoryMB".equals(fieldName)) { deserializedFunctionFlexConsumptionResourceConfiguration.instanceMemoryMB = reader.getLong(); } else if ("httpConcurrency".equals(fieldName)) { @@ -163,20 +176,8 @@ public static FunctionFlexConsumptionResourceConfiguration fromJson(JsonReader j reader.skipChildren(); } } + return deserializedFunctionFlexConsumptionResourceConfiguration; }); } - - /** - * Set the httpConcurrency property: HTTP Concurrency for the function app. - * - * @param httpConcurrency the httpConcurrency value to set. - * @return the FunctionFlexConsumptionResourceConfiguration object itself. - */ - @Generated - public FunctionFlexConsumptionResourceConfiguration setHttpConcurrency(Long httpConcurrency) { - this.httpConcurrency = httpConcurrency; - this.updatedProperties.add("httpConcurrency"); - return this; - } } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/FunctionFlexConsumptionTargetResourceConfigurations.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/FunctionFlexConsumptionTargetResourceConfigurations.java index f556333f00fd..00e3c330bf69 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/FunctionFlexConsumptionTargetResourceConfigurations.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/FunctionFlexConsumptionTargetResourceConfigurations.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Fluent; @@ -19,7 +20,6 @@ */ @Fluent public final class FunctionFlexConsumptionTargetResourceConfigurations extends TargetResourceConfigurations { - /* * Kind of the resource for which the configurations apply. */ @@ -47,7 +47,7 @@ public FunctionFlexConsumptionTargetResourceConfigurations() { /** * Get the kind property: Kind of the resource for which the configurations apply. - * + * * @return the kind value. */ @Generated @@ -58,7 +58,7 @@ public ResourceKind getKind() { /** * Get the configurations property: A map of configurations for a Function app using Flex Consumption Plan. - * + * * @return the configurations value. */ @Generated @@ -68,7 +68,7 @@ public Map getConfiguratio /** * Set the configurations property: A map of configurations for a Function app using Flex Consumption Plan. - * + * * @param configurations the configurations value to set. * @return the FunctionFlexConsumptionTargetResourceConfigurations object itself. */ @@ -123,7 +123,7 @@ private JsonWriter toJsonMergePatch(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of FunctionFlexConsumptionTargetResourceConfigurations from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of FunctionFlexConsumptionTargetResourceConfigurations if the JsonReader was pointing to an * instance of it, or null if it was pointing to JSON null. @@ -138,6 +138,7 @@ public static FunctionFlexConsumptionTargetResourceConfigurations fromJson(JsonR while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); + if ("kind".equals(fieldName)) { deserializedFunctionFlexConsumptionTargetResourceConfigurations.kind = ResourceKind.fromString(reader.getString()); @@ -149,6 +150,7 @@ public static FunctionFlexConsumptionTargetResourceConfigurations fromJson(JsonR reader.skipChildren(); } } + return deserializedFunctionFlexConsumptionTargetResourceConfigurations; }); } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/HourlyRecurrence.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/HourlyRecurrence.java new file mode 100644 index 000000000000..daa8eeda40b8 --- /dev/null +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/HourlyRecurrence.java @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.developer.loadtesting.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.developer.loadtesting.implementation.JsonMergePatchHelper; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.HashSet; +import java.util.Set; + +/** + * Recurrence model when frequency is set as Hourly. + */ +@Fluent +public final class HourlyRecurrence extends Recurrence { + /* + * Frequency of the recurrence. + */ + @Generated + private Frequency frequency = Frequency.HOURLY; + + /* + * The interval at which the recurrence should repeat. It signifies the number of hours between each recurrence. + */ + @Generated + private int interval; + + /** + * Stores updated model property, the value is property name, not serialized name. + */ + @Generated + private final Set updatedProperties = new HashSet<>(); + + /** + * Creates an instance of HourlyRecurrence class. + */ + @Generated + public HourlyRecurrence() { + } + + /** + * Get the frequency property: Frequency of the recurrence. + * + * @return the frequency value. + */ + @Generated + @Override + public Frequency getFrequency() { + return this.frequency; + } + + /** + * Get the interval property: The interval at which the recurrence should repeat. It signifies the number of hours + * between each recurrence. + * + * @return the interval value. + */ + @Generated + public int getInterval() { + return this.interval; + } + + /** + * Set the interval property: The interval at which the recurrence should repeat. It signifies the number of hours + * between each recurrence. + *

Required when create the resource.

+ * + * @param interval the interval value to set. + * @return the HourlyRecurrence object itself. + */ + @Generated + public HourlyRecurrence setInterval(int interval) { + this.interval = interval; + this.updatedProperties.add("interval"); + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public HourlyRecurrence setRecurrenceEnd(RecurrenceEnd recurrenceEnd) { + super.setRecurrenceEnd(recurrenceEnd); + this.updatedProperties.add("recurrenceEnd"); + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + if (JsonMergePatchHelper.getRecurrenceAccessor().isJsonMergePatch(this)) { + return toJsonMergePatch(jsonWriter); + } else { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("recurrenceEnd", getRecurrenceEnd()); + jsonWriter.writeStringField("frequency", this.frequency == null ? null : this.frequency.toString()); + jsonWriter.writeIntField("interval", this.interval); + return jsonWriter.writeEndObject(); + } + } + + @Generated + private JsonWriter toJsonMergePatch(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + if (updatedProperties.contains("recurrenceEnd")) { + if (getRecurrenceEnd() == null) { + jsonWriter.writeNullField("recurrenceEnd"); + } else { + JsonMergePatchHelper.getRecurrenceEndAccessor().prepareModelForJsonMergePatch(getRecurrenceEnd(), true); + jsonWriter.writeJsonField("recurrenceEnd", getRecurrenceEnd()); + JsonMergePatchHelper.getRecurrenceEndAccessor() + .prepareModelForJsonMergePatch(getRecurrenceEnd(), false); + } + } + jsonWriter.writeStringField("frequency", this.frequency.toString()); + if (updatedProperties.contains("interval")) { + jsonWriter.writeIntField("interval", this.interval); + } + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of HourlyRecurrence from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of HourlyRecurrence if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the HourlyRecurrence. + */ + @Generated + public static HourlyRecurrence fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + HourlyRecurrence deserializedHourlyRecurrence = new HourlyRecurrence(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("recurrenceEnd".equals(fieldName)) { + JsonMergePatchHelper.getRecurrenceAccessor() + .setRecurrenceEnd(deserializedHourlyRecurrence, RecurrenceEnd.fromJson(reader)); + } else if ("frequency".equals(fieldName)) { + deserializedHourlyRecurrence.frequency = Frequency.fromString(reader.getString()); + } else if ("interval".equals(fieldName)) { + deserializedHourlyRecurrence.interval = reader.getInt(); + } else { + reader.skipChildren(); + } + } + + return deserializedHourlyRecurrence; + }); + } +} diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/LoadTest.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/LoadTest.java index 7be81bd62ef6..7133ddfd2f09 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/LoadTest.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/LoadTest.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Fluent; @@ -23,7 +24,6 @@ */ @Fluent public final class LoadTest implements JsonSerializable { - /* * Pass fail criteria for a test. */ @@ -151,6 +151,18 @@ public final class LoadTest implements JsonSerializable { @Generated private List engineBuiltInIdentityIds; + /* + * Estimated virtual user hours for the test. + */ + @Generated + private Double estimatedVirtualUserHours; + + /* + * Preferences for the test. + */ + @Generated + private TestPreferences preferences; + /* * The creation datetime(RFC 3339 literal format). */ @@ -191,7 +203,6 @@ private void serializeAsJsonMergePatch(boolean jsonMergePatch) { static { JsonMergePatchHelper.setLoadTestAccessor(new JsonMergePatchHelper.LoadTestAccessor() { - @Override public LoadTest prepareModelForJsonMergePatch(LoadTest model, boolean jsonMergePatchEnabled) { model.serializeAsJsonMergePatch(jsonMergePatchEnabled); @@ -214,7 +225,7 @@ public LoadTest() { /** * Get the passFailCriteria property: Pass fail criteria for a test. - * + * * @return the passFailCriteria value. */ @Generated @@ -224,7 +235,7 @@ public PassFailCriteria getPassFailCriteria() { /** * Set the passFailCriteria property: Pass fail criteria for a test. - * + * * @param passFailCriteria the passFailCriteria value to set. * @return the LoadTest object itself. */ @@ -238,7 +249,7 @@ public LoadTest setPassFailCriteria(PassFailCriteria passFailCriteria) { /** * Get the autoStopCriteria property: Auto stop criteria for a test. This will automatically stop a load test if the * error percentage is high for a certain time window. - * + * * @return the autoStopCriteria value. */ @Generated @@ -249,7 +260,7 @@ public AutoStopCriteria getAutoStopCriteria() { /** * Set the autoStopCriteria property: Auto stop criteria for a test. This will automatically stop a load test if the * error percentage is high for a certain time window. - * + * * @param autoStopCriteria the autoStopCriteria value to set. * @return the LoadTest object itself. */ @@ -266,7 +277,7 @@ public LoadTest setAutoStopCriteria(AutoStopCriteria autoStopCriteria) { * identifier and the type should be AKV_SECRET_URI. If the secret is stored * elsewhere, the secret value should be provided directly and the type should be * SECRET_VALUE. - * + * * @return the secrets value. */ @Generated @@ -280,7 +291,7 @@ public Map getSecrets() { * identifier and the type should be AKV_SECRET_URI. If the secret is stored * elsewhere, the secret value should be provided directly and the type should be * SECRET_VALUE. - * + * * @param secrets the secrets value to set. * @return the LoadTest object itself. */ @@ -293,7 +304,7 @@ public LoadTest setSecrets(Map secrets) { /** * Get the certificate property: Certificates metadata. - * + * * @return the certificate value. */ @Generated @@ -303,7 +314,7 @@ public TestCertificate getCertificate() { /** * Set the certificate property: Certificates metadata. - * + * * @param certificate the certificate value to set. * @return the LoadTest object itself. */ @@ -317,7 +328,7 @@ public LoadTest setCertificate(TestCertificate certificate) { /** * Get the environmentVariables property: Environment variables which are defined as a set of <name,value> * pairs. - * + * * @return the environmentVariables value. */ @Generated @@ -328,7 +339,7 @@ public Map getEnvironmentVariables() { /** * Set the environmentVariables property: Environment variables which are defined as a set of <name,value> * pairs. - * + * * @param environmentVariables the environmentVariables value to set. * @return the LoadTest object itself. */ @@ -341,7 +352,7 @@ public LoadTest setEnvironmentVariables(Map environmentVariables /** * Get the loadTestConfiguration property: The load test configuration. - * + * * @return the loadTestConfiguration value. */ @Generated @@ -351,7 +362,7 @@ public LoadTestConfiguration getLoadTestConfiguration() { /** * Set the loadTestConfiguration property: The load test configuration. - * + * * @param loadTestConfiguration the loadTestConfiguration value to set. * @return the LoadTest object itself. */ @@ -365,7 +376,7 @@ public LoadTest setLoadTestConfiguration(LoadTestConfiguration loadTestConfigura /** * Get the baselineTestRunId property: Id of the test run to be marked as baseline to view trends of client-side * metrics from recent test runs. - * + * * @return the baselineTestRunId value. */ @Generated @@ -376,7 +387,7 @@ public String getBaselineTestRunId() { /** * Set the baselineTestRunId property: Id of the test run to be marked as baseline to view trends of client-side * metrics from recent test runs. - * + * * @param baselineTestRunId the baselineTestRunId value to set. * @return the LoadTest object itself. */ @@ -389,7 +400,7 @@ public LoadTest setBaselineTestRunId(String baselineTestRunId) { /** * Get the inputArtifacts property: The input artifacts for the test. - * + * * @return the inputArtifacts value. */ @Generated @@ -400,7 +411,7 @@ public TestInputArtifacts getInputArtifacts() { /** * Get the testId property: Unique test identifier for the load test, must contain only lower-case alphabetic, * numeric, underscore or hyphen characters. - * + * * @return the testId value. */ @Generated @@ -410,7 +421,7 @@ public String getTestId() { /** * Get the description property: The test description. - * + * * @return the description value. */ @Generated @@ -420,7 +431,7 @@ public String getDescription() { /** * Set the description property: The test description. - * + * * @param description the description value to set. * @return the LoadTest object itself. */ @@ -433,7 +444,7 @@ public LoadTest setDescription(String description) { /** * Get the displayName property: Display name of a test. - * + * * @return the displayName value. */ @Generated @@ -443,7 +454,7 @@ public String getDisplayName() { /** * Set the displayName property: Display name of a test. - * + * * @param displayName the displayName value to set. * @return the LoadTest object itself. */ @@ -456,7 +467,7 @@ public LoadTest setDisplayName(String displayName) { /** * Get the subnetId property: Subnet ID on which the load test instances should run. - * + * * @return the subnetId value. */ @Generated @@ -466,7 +477,7 @@ public String getSubnetId() { /** * Set the subnetId property: Subnet ID on which the load test instances should run. - * + * * @param subnetId the subnetId value to set. * @return the LoadTest object itself. */ @@ -479,7 +490,7 @@ public LoadTest setSubnetId(String subnetId) { /** * Get the kind property: Kind of test. - * + * * @return the kind value. */ @Generated @@ -489,7 +500,7 @@ public LoadTestKind getKind() { /** * Set the kind property: Kind of test. - * + * * @param kind the kind value to set. * @return the LoadTest object itself. */ @@ -502,7 +513,7 @@ public LoadTest setKind(LoadTestKind kind) { /** * Get the publicIpDisabled property: Inject load test engines without deploying public IP for outbound access. - * + * * @return the publicIpDisabled value. */ @Generated @@ -512,7 +523,7 @@ public Boolean isPublicIpDisabled() { /** * Set the publicIpDisabled property: Inject load test engines without deploying public IP for outbound access. - * + * * @param publicIpDisabled the publicIpDisabled value to set. * @return the LoadTest object itself. */ @@ -525,7 +536,7 @@ public LoadTest setPublicIpDisabled(Boolean publicIpDisabled) { /** * Get the keyvaultReferenceIdentityType property: Type of the managed identity referencing the Key vault. - * + * * @return the keyvaultReferenceIdentityType value. */ @Generated @@ -535,7 +546,7 @@ public String getKeyvaultReferenceIdentityType() { /** * Set the keyvaultReferenceIdentityType property: Type of the managed identity referencing the Key vault. - * + * * @param keyvaultReferenceIdentityType the keyvaultReferenceIdentityType value to set. * @return the LoadTest object itself. */ @@ -548,7 +559,7 @@ public LoadTest setKeyvaultReferenceIdentityType(String keyvaultReferenceIdentit /** * Get the keyvaultReferenceIdentityId property: Resource Id of the managed identity referencing the Key vault. - * + * * @return the keyvaultReferenceIdentityId value. */ @Generated @@ -558,7 +569,7 @@ public String getKeyvaultReferenceIdentityId() { /** * Set the keyvaultReferenceIdentityId property: Resource Id of the managed identity referencing the Key vault. - * + * * @param keyvaultReferenceIdentityId the keyvaultReferenceIdentityId value to set. * @return the LoadTest object itself. */ @@ -571,7 +582,7 @@ public LoadTest setKeyvaultReferenceIdentityId(String keyvaultReferenceIdentityI /** * Get the metricsReferenceIdentityType property: Type of the managed identity referencing the metrics. - * + * * @return the metricsReferenceIdentityType value. */ @Generated @@ -581,7 +592,7 @@ public LoadTestingManagedIdentityType getMetricsReferenceIdentityType() { /** * Set the metricsReferenceIdentityType property: Type of the managed identity referencing the metrics. - * + * * @param metricsReferenceIdentityType the metricsReferenceIdentityType value to set. * @return the LoadTest object itself. */ @@ -594,7 +605,7 @@ public LoadTest setMetricsReferenceIdentityType(LoadTestingManagedIdentityType m /** * Get the metricsReferenceIdentityId property: Resource Id of the managed identity referencing the metrics. - * + * * @return the metricsReferenceIdentityId value. */ @Generated @@ -604,7 +615,7 @@ public String getMetricsReferenceIdentityId() { /** * Set the metricsReferenceIdentityId property: Resource Id of the managed identity referencing the metrics. - * + * * @param metricsReferenceIdentityId the metricsReferenceIdentityId value to set. * @return the LoadTest object itself. */ @@ -617,7 +628,7 @@ public LoadTest setMetricsReferenceIdentityId(String metricsReferenceIdentityId) /** * Get the engineBuiltInIdentityType property: Type of the managed identity built in load test engines. - * + * * @return the engineBuiltInIdentityType value. */ @Generated @@ -627,7 +638,7 @@ public LoadTestingManagedIdentityType getEngineBuiltInIdentityType() { /** * Set the engineBuiltInIdentityType property: Type of the managed identity built in load test engines. - * + * * @param engineBuiltInIdentityType the engineBuiltInIdentityType value to set. * @return the LoadTest object itself. */ @@ -641,7 +652,7 @@ public LoadTest setEngineBuiltInIdentityType(LoadTestingManagedIdentityType engi /** * Get the engineBuiltInIdentityIds property: Resource Ids of the managed identity built in to load test engines. * Required if engineBuiltInIdentityType is UserAssigned. - * + * * @return the engineBuiltInIdentityIds value. */ @Generated @@ -652,7 +663,7 @@ public List getEngineBuiltInIdentityIds() { /** * Set the engineBuiltInIdentityIds property: Resource Ids of the managed identity built in to load test engines. * Required if engineBuiltInIdentityType is UserAssigned. - * + * * @param engineBuiltInIdentityIds the engineBuiltInIdentityIds value to set. * @return the LoadTest object itself. */ @@ -663,9 +674,42 @@ public LoadTest setEngineBuiltInIdentityIds(List engineBuiltInIdentityId return this; } + /** + * Get the estimatedVirtualUserHours property: Estimated virtual user hours for the test. + * + * @return the estimatedVirtualUserHours value. + */ + @Generated + public Double getEstimatedVirtualUserHours() { + return this.estimatedVirtualUserHours; + } + + /** + * Get the preferences property: Preferences for the test. + * + * @return the preferences value. + */ + @Generated + public TestPreferences getPreferences() { + return this.preferences; + } + + /** + * Set the preferences property: Preferences for the test. + * + * @param preferences the preferences value to set. + * @return the LoadTest object itself. + */ + @Generated + public LoadTest setPreferences(TestPreferences preferences) { + this.preferences = preferences; + this.updatedProperties.add("preferences"); + return this; + } + /** * Get the createdDateTime property: The creation datetime(RFC 3339 literal format). - * + * * @return the createdDateTime value. */ @Generated @@ -675,7 +719,7 @@ public OffsetDateTime getCreatedDateTime() { /** * Get the createdBy property: The user that created. - * + * * @return the createdBy value. */ @Generated @@ -685,7 +729,7 @@ public String getCreatedBy() { /** * Get the lastModifiedDateTime property: The last Modified datetime(RFC 3339 literal format). - * + * * @return the lastModifiedDateTime value. */ @Generated @@ -695,7 +739,7 @@ public OffsetDateTime getLastModifiedDateTime() { /** * Get the lastModifiedBy property: The user that last modified. - * + * * @return the lastModifiedBy value. */ @Generated @@ -735,6 +779,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { this.engineBuiltInIdentityType == null ? null : this.engineBuiltInIdentityType.toString()); jsonWriter.writeArrayField("engineBuiltInIdentityIds", this.engineBuiltInIdentityIds, (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("preferences", this.preferences); return jsonWriter.writeEndObject(); } } @@ -899,12 +944,22 @@ private JsonWriter toJsonMergePatch(JsonWriter jsonWriter) throws IOException { (writer, element) -> writer.writeString(element)); } } + if (updatedProperties.contains("preferences")) { + if (this.preferences == null) { + jsonWriter.writeNullField("preferences"); + } else { + JsonMergePatchHelper.getTestPreferencesAccessor().prepareModelForJsonMergePatch(this.preferences, true); + jsonWriter.writeJsonField("preferences", this.preferences); + JsonMergePatchHelper.getTestPreferencesAccessor() + .prepareModelForJsonMergePatch(this.preferences, false); + } + } return jsonWriter.writeEndObject(); } /** * Reads an instance of LoadTest from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of LoadTest if the JsonReader was pointing to an instance of it, or null if it was pointing * to JSON null. @@ -918,6 +973,7 @@ public static LoadTest fromJson(JsonReader jsonReader) throws IOException { while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); + if ("testId".equals(fieldName)) { deserializedLoadTest.testId = reader.getString(); } else if ("passFailCriteria".equals(fieldName)) { @@ -963,6 +1019,10 @@ public static LoadTest fromJson(JsonReader jsonReader) throws IOException { } else if ("engineBuiltInIdentityIds".equals(fieldName)) { List engineBuiltInIdentityIds = reader.readArray(reader1 -> reader1.getString()); deserializedLoadTest.engineBuiltInIdentityIds = engineBuiltInIdentityIds; + } else if ("estimatedVirtualUserHours".equals(fieldName)) { + deserializedLoadTest.estimatedVirtualUserHours = reader.getNullable(JsonReader::getDouble); + } else if ("preferences".equals(fieldName)) { + deserializedLoadTest.preferences = TestPreferences.fromJson(reader); } else if ("createdDateTime".equals(fieldName)) { deserializedLoadTest.createdDateTime = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); @@ -977,6 +1037,7 @@ public static LoadTest fromJson(JsonReader jsonReader) throws IOException { reader.skipChildren(); } } + return deserializedLoadTest; }); } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/LoadTestConfiguration.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/LoadTestConfiguration.java index ae20a977cb09..00f20cb9aab0 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/LoadTestConfiguration.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/LoadTestConfiguration.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Fluent; @@ -20,7 +21,6 @@ */ @Fluent public final class LoadTestConfiguration implements JsonSerializable { - /* * The number of engine instances to execute load test. Supported values are in range of 1-400. Required for * creating a new test. @@ -28,6 +28,15 @@ public final class LoadTestConfiguration implements JsonSerializable regionalLoadTestConfiguration; + /** * Stores updated model property, the value is property name, not serialized name. */ @@ -51,7 +72,6 @@ private void serializeAsJsonMergePatch(boolean jsonMergePatch) { static { JsonMergePatchHelper.setLoadTestConfigurationAccessor(new JsonMergePatchHelper.LoadTestConfigurationAccessor() { - @Override public LoadTestConfiguration prepareModelForJsonMergePatch(LoadTestConfiguration model, boolean jsonMergePatchEnabled) { @@ -76,7 +96,7 @@ public LoadTestConfiguration() { /** * Get the engineInstances property: The number of engine instances to execute load test. Supported values are in * range of 1-400. Required for creating a new test. - * + * * @return the engineInstances value. */ @Generated @@ -87,7 +107,7 @@ public Integer getEngineInstances() { /** * Set the engineInstances property: The number of engine instances to execute load test. Supported values are in * range of 1-400. Required for creating a new test. - * + * * @param engineInstances the engineInstances value to set. * @return the LoadTestConfiguration object itself. */ @@ -98,10 +118,39 @@ public LoadTestConfiguration setEngineInstances(Integer engineInstances) { return this; } + /** + * Get the splitAllCsvs property: If false, Azure Load Testing copies and processes your input files unmodified + * across all test engine instances. If true, Azure Load Testing splits the CSV + * input data evenly across all engine instances. If you provide multiple CSV + * files, each file will be split evenly. + * + * @return the splitAllCsvs value. + */ + @Generated + public Boolean isSplitAllCsvs() { + return this.splitAllCsvs; + } + + /** + * Set the splitAllCsvs property: If false, Azure Load Testing copies and processes your input files unmodified + * across all test engine instances. If true, Azure Load Testing splits the CSV + * input data evenly across all engine instances. If you provide multiple CSV + * files, each file will be split evenly. + * + * @param splitAllCsvs the splitAllCsvs value to set. + * @return the LoadTestConfiguration object itself. + */ + @Generated + public LoadTestConfiguration setSplitAllCsvs(Boolean splitAllCsvs) { + this.splitAllCsvs = splitAllCsvs; + this.updatedProperties.add("splitAllCsvs"); + return this; + } + /** * Get the quickStartTest property: If true, optionalLoadTestConfig is required and JMX script for the load test is * not required to upload. - * + * * @return the quickStartTest value. */ @Generated @@ -112,7 +161,7 @@ public Boolean isQuickStartTest() { /** * Set the quickStartTest property: If true, optionalLoadTestConfig is required and JMX script for the load test is * not required to upload. - * + * * @param quickStartTest the quickStartTest value to set. * @return the LoadTestConfiguration object itself. */ @@ -123,6 +172,54 @@ public LoadTestConfiguration setQuickStartTest(Boolean quickStartTest) { return this; } + /** + * Get the optionalLoadTestConfiguration property: Configuration for quick load test. + * + * @return the optionalLoadTestConfiguration value. + */ + @Generated + public OptionalLoadTestConfiguration getOptionalLoadTestConfiguration() { + return this.optionalLoadTestConfiguration; + } + + /** + * Set the optionalLoadTestConfiguration property: Configuration for quick load test. + * + * @param optionalLoadTestConfiguration the optionalLoadTestConfiguration value to set. + * @return the LoadTestConfiguration object itself. + */ + @Generated + public LoadTestConfiguration + setOptionalLoadTestConfiguration(OptionalLoadTestConfiguration optionalLoadTestConfiguration) { + this.optionalLoadTestConfiguration = optionalLoadTestConfiguration; + this.updatedProperties.add("optionalLoadTestConfiguration"); + return this; + } + + /** + * Get the regionalLoadTestConfiguration property: Region distribution configuration for the load test. + * + * @return the regionalLoadTestConfiguration value. + */ + @Generated + public List getRegionalLoadTestConfiguration() { + return this.regionalLoadTestConfiguration; + } + + /** + * Set the regionalLoadTestConfiguration property: Region distribution configuration for the load test. + * + * @param regionalLoadTestConfiguration the regionalLoadTestConfiguration value to set. + * @return the LoadTestConfiguration object itself. + */ + @Generated + public LoadTestConfiguration + setRegionalLoadTestConfiguration(List regionalLoadTestConfiguration) { + this.regionalLoadTestConfiguration = regionalLoadTestConfiguration; + this.updatedProperties.add("regionalLoadTestConfiguration"); + return this; + } + /** * {@inheritDoc} */ @@ -191,7 +288,7 @@ private JsonWriter toJsonMergePatch(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of LoadTestConfiguration from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of LoadTestConfiguration if the JsonReader was pointing to an instance of it, or null if it * was pointing to JSON null. @@ -204,6 +301,7 @@ public static LoadTestConfiguration fromJson(JsonReader jsonReader) throws IOExc while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); + if ("engineInstances".equals(fieldName)) { deserializedLoadTestConfiguration.engineInstances = reader.getNullable(JsonReader::getInt); } else if ("splitAllCSVs".equals(fieldName)) { @@ -221,105 +319,8 @@ public static LoadTestConfiguration fromJson(JsonReader jsonReader) throws IOExc reader.skipChildren(); } } + return deserializedLoadTestConfiguration; }); } - - /* - * If false, Azure Load Testing copies and processes your input files unmodified - * across all test engine instances. If true, Azure Load Testing splits the CSV - * input data evenly across all engine instances. If you provide multiple CSV - * files, each file will be split evenly. - */ - @Generated - private Boolean splitAllCsvs; - - /** - * Get the splitAllCsvs property: If false, Azure Load Testing copies and processes your input files unmodified - * across all test engine instances. If true, Azure Load Testing splits the CSV - * input data evenly across all engine instances. If you provide multiple CSV - * files, each file will be split evenly. - * - * @return the splitAllCsvs value. - */ - @Generated - public Boolean isSplitAllCsvs() { - return this.splitAllCsvs; - } - - /** - * Set the splitAllCsvs property: If false, Azure Load Testing copies and processes your input files unmodified - * across all test engine instances. If true, Azure Load Testing splits the CSV - * input data evenly across all engine instances. If you provide multiple CSV - * files, each file will be split evenly. - * - * @param splitAllCsvs the splitAllCsvs value to set. - * @return the LoadTestConfiguration object itself. - */ - @Generated - public LoadTestConfiguration setSplitAllCsvs(Boolean splitAllCsvs) { - this.splitAllCsvs = splitAllCsvs; - this.updatedProperties.add("splitAllCsvs"); - return this; - } - - /* - * Configuration for quick load test - */ - @Generated - private OptionalLoadTestConfiguration optionalLoadTestConfiguration; - - /* - * Region distribution configuration for the load test. - */ - @Generated - private List regionalLoadTestConfiguration; - - /** - * Get the optionalLoadTestConfiguration property: Configuration for quick load test. - * - * @return the optionalLoadTestConfiguration value. - */ - @Generated - public OptionalLoadTestConfiguration getOptionalLoadTestConfiguration() { - return this.optionalLoadTestConfiguration; - } - - /** - * Set the optionalLoadTestConfiguration property: Configuration for quick load test. - * - * @param optionalLoadTestConfiguration the optionalLoadTestConfiguration value to set. - * @return the LoadTestConfiguration object itself. - */ - @Generated - public LoadTestConfiguration - setOptionalLoadTestConfiguration(OptionalLoadTestConfiguration optionalLoadTestConfiguration) { - this.optionalLoadTestConfiguration = optionalLoadTestConfiguration; - this.updatedProperties.add("optionalLoadTestConfiguration"); - return this; - } - - /** - * Get the regionalLoadTestConfiguration property: Region distribution configuration for the load test. - * - * @return the regionalLoadTestConfiguration value. - */ - @Generated - public List getRegionalLoadTestConfiguration() { - return this.regionalLoadTestConfiguration; - } - - /** - * Set the regionalLoadTestConfiguration property: Region distribution configuration for the load test. - * - * @param regionalLoadTestConfiguration the regionalLoadTestConfiguration value to set. - * @return the LoadTestConfiguration object itself. - */ - @Generated - public LoadTestConfiguration - setRegionalLoadTestConfiguration(List regionalLoadTestConfiguration) { - this.regionalLoadTestConfiguration = regionalLoadTestConfiguration; - this.updatedProperties.add("regionalLoadTestConfiguration"); - return this; - } } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/LoadTestKind.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/LoadTestKind.java index 3155693c5321..91a960e136a2 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/LoadTestKind.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/LoadTestKind.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Generated; @@ -11,7 +12,6 @@ * Test kind. */ public final class LoadTestKind extends ExpandableStringEnum { - /** * URL Test. */ @@ -32,7 +32,7 @@ public final class LoadTestKind extends ExpandableStringEnum { /** * Creates a new instance of LoadTestKind value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Generated @@ -42,7 +42,7 @@ public LoadTestKind() { /** * Creates or finds a LoadTestKind from its string representation. - * + * * @param name a name to look for. * @return the corresponding LoadTestKind. */ @@ -53,7 +53,7 @@ public static LoadTestKind fromString(String name) { /** * Gets known LoadTestKind values. - * + * * @return known LoadTestKind values. */ @Generated diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/LoadTestRun.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/LoadTestRun.java index 1a1f248237f4..84b3cf50b601 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/LoadTestRun.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/LoadTestRun.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Fluent; @@ -23,7 +24,6 @@ */ @Fluent public final class LoadTestRun implements JsonSerializable { - /* * Unique test run identifier for the load test run, must contain only lower-case alphabetic, numeric, underscore or * hyphen characters. @@ -211,6 +211,30 @@ public final class LoadTestRun implements JsonSerializable { @Generated private CreatedByType createdByType; + /* + * The URI pointing to the entity that created the test run. + */ + @Generated + private String createdByUri; + + /* + * Estimated virtual user hours for the test run. + */ + @Generated + private Double estimatedVirtualUserHours; + + /* + * The test run execution start DateTime(RFC 3339 literal format). + */ + @Generated + private OffsetDateTime executionStartDateTime; + + /* + * The test run execution end DateTime(RFC 3339 literal format). + */ + @Generated + private OffsetDateTime executionEndDateTime; + /* * The creation datetime(RFC 3339 literal format). */ @@ -251,7 +275,6 @@ private void serializeAsJsonMergePatch(boolean jsonMergePatch) { static { JsonMergePatchHelper.setLoadTestRunAccessor(new JsonMergePatchHelper.LoadTestRunAccessor() { - @Override public LoadTestRun prepareModelForJsonMergePatch(LoadTestRun model, boolean jsonMergePatchEnabled) { model.serializeAsJsonMergePatch(jsonMergePatchEnabled); @@ -275,7 +298,7 @@ public LoadTestRun() { /** * Get the testRunId property: Unique test run identifier for the load test run, must contain only lower-case * alphabetic, numeric, underscore or hyphen characters. - * + * * @return the testRunId value. */ @Generated @@ -285,7 +308,7 @@ public String getTestRunId() { /** * Get the passFailCriteria property: Pass fail criteria for a test. - * + * * @return the passFailCriteria value. */ @Generated @@ -295,7 +318,7 @@ public PassFailCriteria getPassFailCriteria() { /** * Set the passFailCriteria property: Pass fail criteria for a test. - * + * * @param passFailCriteria the passFailCriteria value to set. * @return the LoadTestRun object itself. */ @@ -309,7 +332,7 @@ public LoadTestRun setPassFailCriteria(PassFailCriteria passFailCriteria) { /** * Get the autoStopCriteria property: Auto stop criteria for a test. This will automatically stop a load test if the * error percentage is high for a certain time window. - * + * * @return the autoStopCriteria value. */ @Generated @@ -320,7 +343,7 @@ public AutoStopCriteria getAutoStopCriteria() { /** * Set the autoStopCriteria property: Auto stop criteria for a test. This will automatically stop a load test if the * error percentage is high for a certain time window. - * + * * @param autoStopCriteria the autoStopCriteria value to set. * @return the LoadTestRun object itself. */ @@ -337,7 +360,7 @@ public LoadTestRun setAutoStopCriteria(AutoStopCriteria autoStopCriteria) { * identifier and the type should be AKV_SECRET_URI. If the secret is stored * elsewhere, the secret value should be provided directly and the type should be * SECRET_VALUE. - * + * * @return the secrets value. */ @Generated @@ -351,7 +374,7 @@ public Map getSecrets() { * identifier and the type should be AKV_SECRET_URI. If the secret is stored * elsewhere, the secret value should be provided directly and the type should be * SECRET_VALUE. - * + * * @param secrets the secrets value to set. * @return the LoadTestRun object itself. */ @@ -364,7 +387,7 @@ public LoadTestRun setSecrets(Map secrets) { /** * Get the certificate property: Certificates metadata. - * + * * @return the certificate value. */ @Generated @@ -374,7 +397,7 @@ public TestCertificate getCertificate() { /** * Set the certificate property: Certificates metadata. - * + * * @param certificate the certificate value to set. * @return the LoadTestRun object itself. */ @@ -388,7 +411,7 @@ public LoadTestRun setCertificate(TestCertificate certificate) { /** * Get the environmentVariables property: Environment variables which are defined as a set of <name,value> * pairs. - * + * * @return the environmentVariables value. */ @Generated @@ -399,7 +422,7 @@ public Map getEnvironmentVariables() { /** * Set the environmentVariables property: Environment variables which are defined as a set of <name,value> * pairs. - * + * * @param environmentVariables the environmentVariables value to set. * @return the LoadTestRun object itself. */ @@ -412,7 +435,7 @@ public LoadTestRun setEnvironmentVariables(Map environmentVariab /** * Get the errorDetails property: Error details if there is any failure in load test run. - * + * * @return the errorDetails value. */ @Generated @@ -425,7 +448,7 @@ public List getErrorDetails() { * statistics for performance metrics like response time, throughput, etc. from the load test run. * The sampler name is the same as the name mentioned in the test script. * Sampler name "Total" represents the aggregated statistics of all the samplers. - * + * * @return the testRunStatistics value. */ @Generated @@ -440,7 +463,7 @@ public Map getTestRunStatistics() { * example, East US should be passed as "eastus". * The region name must match one of the strings in the "Name" column returned from running the "az account * list-locations -o table" Azure CLI command. - * + * * @return the regionalStatistics value. */ @Generated @@ -450,7 +473,7 @@ public Map getRegionalStatistics() { /** * Get the loadTestConfiguration property: The load test configuration. - * + * * @return the loadTestConfiguration value. */ @Generated @@ -460,7 +483,7 @@ public LoadTestConfiguration getLoadTestConfiguration() { /** * Get the testArtifacts property: Collection of test run artifacts. - * + * * @return the testArtifacts value. */ @Generated @@ -470,7 +493,7 @@ public TestRunArtifacts getTestArtifacts() { /** * Get the testResult property: Test result for pass/Fail criteria used during the test run. - * + * * @return the testResult value. */ @Generated @@ -480,7 +503,7 @@ public PassFailTestResult getTestResult() { /** * Get the virtualUsers property: Number of virtual users, for which test has been run. - * + * * @return the virtualUsers value. */ @Generated @@ -490,7 +513,7 @@ public Integer getVirtualUsers() { /** * Get the displayName property: Display name of a testRun. - * + * * @return the displayName value. */ @Generated @@ -500,7 +523,7 @@ public String getDisplayName() { /** * Set the displayName property: Display name of a testRun. - * + * * @param displayName the displayName value to set. * @return the LoadTestRun object itself. */ @@ -513,7 +536,7 @@ public LoadTestRun setDisplayName(String displayName) { /** * Get the testId property: Associated test Id. - * + * * @return the testId value. */ @Generated @@ -523,7 +546,7 @@ public String getTestId() { /** * Set the testId property: Associated test Id. - * + * * @param testId the testId value to set. * @return the LoadTestRun object itself. */ @@ -536,7 +559,7 @@ public LoadTestRun setTestId(String testId) { /** * Get the description property: The test run description. - * + * * @return the description value. */ @Generated @@ -546,7 +569,7 @@ public String getDescription() { /** * Set the description property: The test run description. - * + * * @param description the description value to set. * @return the LoadTestRun object itself. */ @@ -559,7 +582,7 @@ public LoadTestRun setDescription(String description) { /** * Get the status property: The test run status. - * + * * @return the status value. */ @Generated @@ -569,7 +592,7 @@ public TestRunStatus getStatus() { /** * Get the startDateTime property: The test run start DateTime(RFC 3339 literal format). - * + * * @return the startDateTime value. */ @Generated @@ -579,7 +602,7 @@ public OffsetDateTime getStartDateTime() { /** * Get the endDateTime property: The test run end DateTime(RFC 3339 literal format). - * + * * @return the endDateTime value. */ @Generated @@ -589,7 +612,7 @@ public OffsetDateTime getEndDateTime() { /** * Get the executedDateTime property: Test run initiated time. - * + * * @return the executedDateTime value. */ @Generated @@ -599,7 +622,7 @@ public OffsetDateTime getExecutedDateTime() { /** * Get the portalUrl property: Portal url. - * + * * @return the portalUrl value. */ @Generated @@ -609,7 +632,7 @@ public String getPortalUrl() { /** * Get the duration property: Test run duration in milliseconds. - * + * * @return the duration value. */ @Generated @@ -619,7 +642,7 @@ public Long getDuration() { /** * Get the virtualUserHours property: Virtual user hours consumed by the test run. - * + * * @return the virtualUserHours value. */ @Generated @@ -629,7 +652,7 @@ public Double getVirtualUserHours() { /** * Get the subnetId property: Subnet ID on which the load test instances should run. - * + * * @return the subnetId value. */ @Generated @@ -639,7 +662,7 @@ public String getSubnetId() { /** * Get the kind property: Type of test. - * + * * @return the kind value. */ @Generated @@ -649,7 +672,7 @@ public LoadTestKind getKind() { /** * Get the requestDataLevel property: Request data collection level for test run. - * + * * @return the requestDataLevel value. */ @Generated @@ -659,7 +682,7 @@ public RequestDataLevel getRequestDataLevel() { /** * Set the requestDataLevel property: Request data collection level for test run. - * + * * @param requestDataLevel the requestDataLevel value to set. * @return the LoadTestRun object itself. */ @@ -673,7 +696,7 @@ public LoadTestRun setRequestDataLevel(RequestDataLevel requestDataLevel) { /** * Get the debugLogsEnabled property: Enable or disable debug level logging. True if debug logs are enabled for the * test run. False otherwise. - * + * * @return the debugLogsEnabled value. */ @Generated @@ -684,7 +707,7 @@ public Boolean isDebugLogsEnabled() { /** * Set the debugLogsEnabled property: Enable or disable debug level logging. True if debug logs are enabled for the * test run. False otherwise. - * + * * @param debugLogsEnabled the debugLogsEnabled value to set. * @return the LoadTestRun object itself. */ @@ -697,7 +720,7 @@ public LoadTestRun setDebugLogsEnabled(Boolean debugLogsEnabled) { /** * Get the publicIpDisabled property: Inject load test engines without deploying public IP for outbound access. - * + * * @return the publicIpDisabled value. */ @Generated @@ -708,7 +731,7 @@ public Boolean isPublicIpDisabled() { /** * Get the createdByType property: The type of the entity that created the test run. (E.x. User, ScheduleTrigger, * etc). - * + * * @return the createdByType value. */ @Generated @@ -719,7 +742,7 @@ public CreatedByType getCreatedByType() { /** * Set the createdByType property: The type of the entity that created the test run. (E.x. User, ScheduleTrigger, * etc). - * + * * @param createdByType the createdByType value to set. * @return the LoadTestRun object itself. */ @@ -730,9 +753,49 @@ public LoadTestRun setCreatedByType(CreatedByType createdByType) { return this; } + /** + * Get the createdByUri property: The URI pointing to the entity that created the test run. + * + * @return the createdByUri value. + */ + @Generated + public String getCreatedByUri() { + return this.createdByUri; + } + + /** + * Get the estimatedVirtualUserHours property: Estimated virtual user hours for the test run. + * + * @return the estimatedVirtualUserHours value. + */ + @Generated + public Double getEstimatedVirtualUserHours() { + return this.estimatedVirtualUserHours; + } + + /** + * Get the executionStartDateTime property: The test run execution start DateTime(RFC 3339 literal format). + * + * @return the executionStartDateTime value. + */ + @Generated + public OffsetDateTime getExecutionStartDateTime() { + return this.executionStartDateTime; + } + + /** + * Get the executionEndDateTime property: The test run execution end DateTime(RFC 3339 literal format). + * + * @return the executionEndDateTime value. + */ + @Generated + public OffsetDateTime getExecutionEndDateTime() { + return this.executionEndDateTime; + } + /** * Get the createdDateTime property: The creation datetime(RFC 3339 literal format). - * + * * @return the createdDateTime value. */ @Generated @@ -742,7 +805,7 @@ public OffsetDateTime getCreatedDateTime() { /** * Get the createdBy property: The user that created. - * + * * @return the createdBy value. */ @Generated @@ -752,7 +815,7 @@ public String getCreatedBy() { /** * Get the lastModifiedDateTime property: The last Modified datetime(RFC 3339 literal format). - * + * * @return the lastModifiedDateTime value. */ @Generated @@ -762,7 +825,7 @@ public OffsetDateTime getLastModifiedDateTime() { /** * Get the lastModifiedBy property: The user that last modified. - * + * * @return the lastModifiedBy value. */ @Generated @@ -908,7 +971,7 @@ private JsonWriter toJsonMergePatch(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of LoadTestRun from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of LoadTestRun if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. @@ -922,6 +985,7 @@ public static LoadTestRun fromJson(JsonReader jsonReader) throws IOException { while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); + if ("testRunId".equals(fieldName)) { deserializedLoadTestRun.testRunId = reader.getString(); } else if ("passFailCriteria".equals(fieldName)) { @@ -990,6 +1054,16 @@ public static LoadTestRun fromJson(JsonReader jsonReader) throws IOException { deserializedLoadTestRun.publicIpDisabled = reader.getNullable(JsonReader::getBoolean); } else if ("createdByType".equals(fieldName)) { deserializedLoadTestRun.createdByType = CreatedByType.fromString(reader.getString()); + } else if ("createdByUri".equals(fieldName)) { + deserializedLoadTestRun.createdByUri = reader.getString(); + } else if ("estimatedVirtualUserHours".equals(fieldName)) { + deserializedLoadTestRun.estimatedVirtualUserHours = reader.getNullable(JsonReader::getDouble); + } else if ("executionStartDateTime".equals(fieldName)) { + deserializedLoadTestRun.executionStartDateTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("executionEndDateTime".equals(fieldName)) { + deserializedLoadTestRun.executionEndDateTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); } else if ("createdDateTime".equals(fieldName)) { deserializedLoadTestRun.createdDateTime = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); @@ -1004,6 +1078,7 @@ public static LoadTestRun fromJson(JsonReader jsonReader) throws IOException { reader.skipChildren(); } } + return deserializedLoadTestRun; }); } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/LoadTestingAppComponent.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/LoadTestingAppComponent.java index 43263a641349..45770491c028 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/LoadTestingAppComponent.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/LoadTestingAppComponent.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Fluent; @@ -20,7 +21,6 @@ */ @Fluent public final class LoadTestingAppComponent implements JsonSerializable { - /* * fully qualified resource Id e.g * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName} @@ -81,7 +81,6 @@ private void serializeAsJsonMergePatch(boolean jsonMergePatch) { static { JsonMergePatchHelper .setLoadTestingAppComponentAccessor(new JsonMergePatchHelper.LoadTestingAppComponentAccessor() { - @Override public LoadTestingAppComponent prepareModelForJsonMergePatch(LoadTestingAppComponent model, boolean jsonMergePatchEnabled) { @@ -106,7 +105,7 @@ public LoadTestingAppComponent() { /** * Get the resourceId property: fully qualified resource Id e.g * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}. - * + * * @return the resourceId value. */ @Generated @@ -116,7 +115,7 @@ public String getResourceId() { /** * Get the resourceName property: Azure resource name, required while creating the app component. - * + * * @return the resourceName value. */ @Generated @@ -127,7 +126,7 @@ public String getResourceName() { /** * Set the resourceName property: Azure resource name, required while creating the app component. *

Required when create the resource.

- * + * * @param resourceName the resourceName value to set. * @return the LoadTestingAppComponent object itself. */ @@ -140,7 +139,7 @@ public LoadTestingAppComponent setResourceName(String resourceName) { /** * Get the resourceType property: Azure resource type, required while creating the app component. - * + * * @return the resourceType value. */ @Generated @@ -151,7 +150,7 @@ public String getResourceType() { /** * Set the resourceType property: Azure resource type, required while creating the app component. *

Required when create the resource.

- * + * * @param resourceType the resourceType value to set. * @return the LoadTestingAppComponent object itself. */ @@ -164,7 +163,7 @@ public LoadTestingAppComponent setResourceType(String resourceType) { /** * Get the displayName property: Azure resource display name. - * + * * @return the displayName value. */ @Generated @@ -174,7 +173,7 @@ public String getDisplayName() { /** * Set the displayName property: Azure resource display name. - * + * * @param displayName the displayName value to set. * @return the LoadTestingAppComponent object itself. */ @@ -187,7 +186,7 @@ public LoadTestingAppComponent setDisplayName(String displayName) { /** * Get the resourceGroup property: Resource group name of the Azure resource. - * + * * @return the resourceGroup value. */ @Generated @@ -197,7 +196,7 @@ public String getResourceGroup() { /** * Get the subscriptionId property: Subscription Id of the Azure resource. - * + * * @return the subscriptionId value. */ @Generated @@ -207,7 +206,7 @@ public String getSubscriptionId() { /** * Get the kind property: Kind of Azure resource type. - * + * * @return the kind value. */ @Generated @@ -217,7 +216,7 @@ public String getKind() { /** * Set the kind property: Kind of Azure resource type. - * + * * @param kind the kind value to set. * @return the LoadTestingAppComponent object itself. */ @@ -282,7 +281,7 @@ private JsonWriter toJsonMergePatch(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of LoadTestingAppComponent from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of LoadTestingAppComponent if the JsonReader was pointing to an instance of it, or null if it * was pointing to JSON null. @@ -296,6 +295,7 @@ public static LoadTestingAppComponent fromJson(JsonReader jsonReader) throws IOE while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); + if ("resourceId".equals(fieldName)) { deserializedLoadTestingAppComponent.resourceId = reader.getString(); } else if ("resourceName".equals(fieldName)) { @@ -314,6 +314,7 @@ public static LoadTestingAppComponent fromJson(JsonReader jsonReader) throws IOE reader.skipChildren(); } } + return deserializedLoadTestingAppComponent; }); } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/LoadTestingFileType.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/LoadTestingFileType.java index 8204876c253a..4918dbbf2849 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/LoadTestingFileType.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/LoadTestingFileType.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Generated; @@ -11,7 +12,6 @@ * Types of file supported. */ public final class LoadTestingFileType extends ExpandableStringEnum { - /** * If the file is a JMX script. */ @@ -48,9 +48,22 @@ public final class LoadTestingFileType extends ExpandableStringEnum { - /** * System-assigned managed identity. */ @@ -26,7 +26,7 @@ public final class LoadTestingManagedIdentityType extends ExpandableStringEnum { - /* * The time grain specifies the aggregation interval for the metric. Expressed as * a duration 'PT1M', 'PT1H', etc. @@ -34,7 +34,7 @@ private MetricAvailability() { /** * Get the timeGrain property: The time grain specifies the aggregation interval for the metric. Expressed as * a duration 'PT1M', 'PT1H', etc. - * + * * @return the timeGrain value. */ @Generated @@ -55,7 +55,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of MetricAvailability from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of MetricAvailability if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. @@ -68,12 +68,14 @@ public static MetricAvailability fromJson(JsonReader jsonReader) throws IOExcept while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); + if ("timeGrain".equals(fieldName)) { deserializedMetricAvailability.timeGrain = TimeGrain.fromString(reader.getString()); } else { reader.skipChildren(); } } + return deserializedMetricAvailability; }); } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/MetricDefinition.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/MetricDefinition.java index 3f20f00bb387..3a5d3f600a45 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/MetricDefinition.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/MetricDefinition.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Generated; @@ -17,7 +18,6 @@ */ @Immutable public final class MetricDefinition implements JsonSerializable { - /* * List of dimensions */ @@ -76,7 +76,7 @@ private MetricDefinition() { /** * Get the dimensions property: List of dimensions. - * + * * @return the dimensions value. */ @Generated @@ -86,7 +86,7 @@ public List getDimensions() { /** * Get the description property: The metric description. - * + * * @return the description value. */ @Generated @@ -96,7 +96,7 @@ public String getDescription() { /** * Get the name property: The metric name. - * + * * @return the name value. */ @Generated @@ -106,7 +106,7 @@ public String getName() { /** * Get the namespace property: The namespace the metric belongs to. - * + * * @return the namespace value. */ @Generated @@ -117,7 +117,7 @@ public String getNamespace() { /** * Get the primaryAggregationType property: The primary aggregation type value defining how to use the values for * display. - * + * * @return the primaryAggregationType value. */ @Generated @@ -127,7 +127,7 @@ public AggregationType getPrimaryAggregationType() { /** * Get the supportedAggregationTypes property: The collection of what all aggregation types are supported. - * + * * @return the supportedAggregationTypes value. */ @Generated @@ -137,7 +137,7 @@ public List getSupportedAggregationTypes() { /** * Get the unit property: The unit of the metric. - * + * * @return the unit value. */ @Generated @@ -148,7 +148,7 @@ public MetricUnit getUnit() { /** * Get the metricAvailabilities property: Metric availability specifies the time grain (aggregation interval or * frequency). - * + * * @return the metricAvailabilities value. */ @Generated @@ -179,7 +179,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of MetricDefinition from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of MetricDefinition if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. @@ -192,6 +192,7 @@ public static MetricDefinition fromJson(JsonReader jsonReader) throws IOExceptio while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); + if ("dimensions".equals(fieldName)) { List dimensions = reader.readArray(reader1 -> NameAndDescription.fromJson(reader1)); @@ -218,6 +219,7 @@ public static MetricDefinition fromJson(JsonReader jsonReader) throws IOExceptio reader.skipChildren(); } } + return deserializedMetricDefinition; }); } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/MetricDefinitions.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/MetricDefinitions.java index 57f06d193053..89ea654a672f 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/MetricDefinitions.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/MetricDefinitions.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Generated; @@ -17,7 +18,6 @@ */ @Immutable public final class MetricDefinitions implements JsonSerializable { - /* * the values for the metric definitions. */ @@ -26,7 +26,7 @@ public final class MetricDefinitions implements JsonSerializable value) { /** * Get the value property: the values for the metric definitions. - * + * * @return the value value. */ @Generated @@ -57,7 +57,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of MetricDefinitions from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of MetricDefinitions if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. @@ -71,6 +71,7 @@ public static MetricDefinitions fromJson(JsonReader jsonReader) throws IOExcepti while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); + if ("value".equals(fieldName)) { value = reader.readArray(reader1 -> MetricDefinition.fromJson(reader1)); } else { diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/MetricNamespace.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/MetricNamespace.java index 1983684d74f0..2f064cde7ff9 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/MetricNamespace.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/MetricNamespace.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Generated; @@ -16,7 +17,6 @@ */ @Immutable public final class MetricNamespace implements JsonSerializable { - /* * The namespace description. */ @@ -38,7 +38,7 @@ private MetricNamespace() { /** * Get the description property: The namespace description. - * + * * @return the description value. */ @Generated @@ -48,7 +48,7 @@ public String getDescription() { /** * Get the name property: The metric namespace name. - * + * * @return the name value. */ @Generated @@ -70,7 +70,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of MetricNamespace from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of MetricNamespace if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. @@ -83,6 +83,7 @@ public static MetricNamespace fromJson(JsonReader jsonReader) throws IOException while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); + if ("description".equals(fieldName)) { deserializedMetricNamespace.description = reader.getString(); } else if ("name".equals(fieldName)) { @@ -91,6 +92,7 @@ public static MetricNamespace fromJson(JsonReader jsonReader) throws IOException reader.skipChildren(); } } + return deserializedMetricNamespace; }); } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/MetricNamespaces.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/MetricNamespaces.java index 5d27a8d13bb2..24a06272a82c 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/MetricNamespaces.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/MetricNamespaces.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Generated; @@ -17,7 +18,6 @@ */ @Immutable public final class MetricNamespaces implements JsonSerializable { - /* * The values for the metric namespaces. */ @@ -26,7 +26,7 @@ public final class MetricNamespaces implements JsonSerializable value) { /** * Get the value property: The values for the metric namespaces. - * + * * @return the value value. */ @Generated @@ -57,7 +57,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of MetricNamespaces from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of MetricNamespaces if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. @@ -71,6 +71,7 @@ public static MetricNamespaces fromJson(JsonReader jsonReader) throws IOExceptio while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); + if ("value".equals(fieldName)) { value = reader.readArray(reader1 -> MetricNamespace.fromJson(reader1)); } else { diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/MetricUnit.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/MetricUnit.java index 52006e1cc47b..83a787b2aff2 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/MetricUnit.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/MetricUnit.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Generated; @@ -11,7 +12,6 @@ * Metric unit. */ public final class MetricUnit extends ExpandableStringEnum { - /** * No unit specified. */ @@ -62,7 +62,7 @@ public final class MetricUnit extends ExpandableStringEnum { /** * Creates a new instance of MetricUnit value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Generated @@ -72,7 +72,7 @@ public MetricUnit() { /** * Creates or finds a MetricUnit from its string representation. - * + * * @param name a name to look for. * @return the corresponding MetricUnit. */ @@ -83,7 +83,7 @@ public static MetricUnit fromString(String name) { /** * Gets known MetricUnit values. - * + * * @return known MetricUnit values. */ @Generated diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/MetricValue.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/MetricValue.java index 273d2e94f342..84b10e65cd28 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/MetricValue.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/MetricValue.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Generated; @@ -19,7 +20,6 @@ */ @Immutable public final class MetricValue implements JsonSerializable { - /* * The timestamp for the metric value in RFC 3339 format. */ @@ -41,7 +41,7 @@ private MetricValue() { /** * Get the timestamp property: The timestamp for the metric value in RFC 3339 format. - * + * * @return the timestamp value. */ @Generated @@ -51,7 +51,7 @@ public OffsetDateTime getTimestamp() { /** * Get the value property: The metric value. - * + * * @return the value value. */ @Generated @@ -74,7 +74,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of MetricValue from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of MetricValue if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. @@ -87,6 +87,7 @@ public static MetricValue fromJson(JsonReader jsonReader) throws IOException { while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); + if ("timestamp".equals(fieldName)) { deserializedMetricValue.timestamp = reader .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); @@ -96,6 +97,7 @@ public static MetricValue fromJson(JsonReader jsonReader) throws IOException { reader.skipChildren(); } } + return deserializedMetricValue; }); } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/MetricsFilters.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/MetricsFilters.java index 72265ec10d57..34a1f019344d 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/MetricsFilters.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/MetricsFilters.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Fluent; @@ -17,7 +18,6 @@ */ @Fluent public final class MetricsFilters implements JsonSerializable { - /* * Get metrics for specific dimension values. Example: Metric contains dimension * like SamplerName, Error. To retrieve all the time series data where SamplerName @@ -39,7 +39,7 @@ public MetricsFilters() { * like SamplerName, Error. To retrieve all the time series data where SamplerName * is equals to HTTPRequest1 or HTTPRequest2, the DimensionFilter value will be * {"SamplerName", ["HTTPRequest1", "HTTPRequest2"}. - * + * * @return the filters value. */ @Generated @@ -52,7 +52,7 @@ public List getFilters() { * like SamplerName, Error. To retrieve all the time series data where SamplerName * is equals to HTTPRequest1 or HTTPRequest2, the DimensionFilter value will be * {"SamplerName", ["HTTPRequest1", "HTTPRequest2"}. - * + * * @param filters the filters value to set. * @return the MetricsFilters object itself. */ @@ -75,7 +75,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of MetricsFilters from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of MetricsFilters if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. @@ -88,6 +88,7 @@ public static MetricsFilters fromJson(JsonReader jsonReader) throws IOException while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); + if ("filters".equals(fieldName)) { List filters = reader.readArray(reader1 -> DimensionFilter.fromJson(reader1)); deserializedMetricsFilters.filters = filters; @@ -95,6 +96,7 @@ public static MetricsFilters fromJson(JsonReader jsonReader) throws IOException reader.skipChildren(); } } + return deserializedMetricsFilters; }); } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/MonthlyRecurrenceByDates.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/MonthlyRecurrenceByDates.java new file mode 100644 index 000000000000..3fa0753bf666 --- /dev/null +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/MonthlyRecurrenceByDates.java @@ -0,0 +1,212 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.developer.loadtesting.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.developer.loadtesting.implementation.JsonMergePatchHelper; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +/** + * Recurrence model when frequency is set as MonthlyByDates. + */ +@Fluent +public final class MonthlyRecurrenceByDates extends Recurrence { + /* + * Frequency of the recurrence. + */ + @Generated + private Frequency frequency = Frequency.MONTHLY_BY_DATES; + + /* + * Recurrence set to repeat on the specified dates of the month. Value of dates can be 1 to 31 and -1. -1 represents + * the last day of the month. + */ + @Generated + private List datesInMonth; + + /* + * The interval at which the recurrence should repeat. It signifies the number of months between each recurrence. + */ + @Generated + private Integer interval; + + /** + * Stores updated model property, the value is property name, not serialized name. + */ + @Generated + private final Set updatedProperties = new HashSet<>(); + + /** + * Creates an instance of MonthlyRecurrenceByDates class. + */ + @Generated + public MonthlyRecurrenceByDates() { + } + + /** + * Get the frequency property: Frequency of the recurrence. + * + * @return the frequency value. + */ + @Generated + @Override + public Frequency getFrequency() { + return this.frequency; + } + + /** + * Get the datesInMonth property: Recurrence set to repeat on the specified dates of the month. Value of dates can + * be 1 to 31 and -1. -1 represents the last day of the month. + * + * @return the datesInMonth value. + */ + @Generated + public List getDatesInMonth() { + return this.datesInMonth; + } + + /** + * Set the datesInMonth property: Recurrence set to repeat on the specified dates of the month. Value of dates can + * be 1 to 31 and -1. -1 represents the last day of the month. + * + * @param datesInMonth the datesInMonth value to set. + * @return the MonthlyRecurrenceByDates object itself. + */ + @Generated + public MonthlyRecurrenceByDates setDatesInMonth(List datesInMonth) { + this.datesInMonth = datesInMonth; + this.updatedProperties.add("datesInMonth"); + return this; + } + + /** + * Get the interval property: The interval at which the recurrence should repeat. It signifies the number of months + * between each recurrence. + * + * @return the interval value. + */ + @Generated + public Integer getInterval() { + return this.interval; + } + + /** + * Set the interval property: The interval at which the recurrence should repeat. It signifies the number of months + * between each recurrence. + * + * @param interval the interval value to set. + * @return the MonthlyRecurrenceByDates object itself. + */ + @Generated + public MonthlyRecurrenceByDates setInterval(Integer interval) { + this.interval = interval; + this.updatedProperties.add("interval"); + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public MonthlyRecurrenceByDates setRecurrenceEnd(RecurrenceEnd recurrenceEnd) { + super.setRecurrenceEnd(recurrenceEnd); + this.updatedProperties.add("recurrenceEnd"); + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + if (JsonMergePatchHelper.getRecurrenceAccessor().isJsonMergePatch(this)) { + return toJsonMergePatch(jsonWriter); + } else { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("recurrenceEnd", getRecurrenceEnd()); + jsonWriter.writeStringField("frequency", this.frequency == null ? null : this.frequency.toString()); + jsonWriter.writeArrayField("datesInMonth", this.datesInMonth, + (writer, element) -> writer.writeInt(element)); + jsonWriter.writeNumberField("interval", this.interval); + return jsonWriter.writeEndObject(); + } + } + + @Generated + private JsonWriter toJsonMergePatch(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + if (updatedProperties.contains("recurrenceEnd")) { + if (getRecurrenceEnd() == null) { + jsonWriter.writeNullField("recurrenceEnd"); + } else { + JsonMergePatchHelper.getRecurrenceEndAccessor().prepareModelForJsonMergePatch(getRecurrenceEnd(), true); + jsonWriter.writeJsonField("recurrenceEnd", getRecurrenceEnd()); + JsonMergePatchHelper.getRecurrenceEndAccessor() + .prepareModelForJsonMergePatch(getRecurrenceEnd(), false); + } + } + jsonWriter.writeStringField("frequency", this.frequency.toString()); + if (updatedProperties.contains("datesInMonth")) { + if (this.datesInMonth == null) { + jsonWriter.writeNullField("datesInMonth"); + } else { + jsonWriter.writeArrayField("datesInMonth", this.datesInMonth, + (writer, element) -> writer.writeInt(element)); + } + } + if (updatedProperties.contains("interval")) { + if (this.interval == null) { + jsonWriter.writeNullField("interval"); + } else { + jsonWriter.writeNumberField("interval", this.interval); + } + } + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MonthlyRecurrenceByDates from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MonthlyRecurrenceByDates if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the MonthlyRecurrenceByDates. + */ + @Generated + public static MonthlyRecurrenceByDates fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MonthlyRecurrenceByDates deserializedMonthlyRecurrenceByDates = new MonthlyRecurrenceByDates(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("recurrenceEnd".equals(fieldName)) { + JsonMergePatchHelper.getRecurrenceAccessor() + .setRecurrenceEnd(deserializedMonthlyRecurrenceByDates, RecurrenceEnd.fromJson(reader)); + } else if ("frequency".equals(fieldName)) { + deserializedMonthlyRecurrenceByDates.frequency = Frequency.fromString(reader.getString()); + } else if ("datesInMonth".equals(fieldName)) { + List datesInMonth = reader.readArray(reader1 -> reader1.getInt()); + deserializedMonthlyRecurrenceByDates.datesInMonth = datesInMonth; + } else if ("interval".equals(fieldName)) { + deserializedMonthlyRecurrenceByDates.interval = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedMonthlyRecurrenceByDates; + }); + } +} diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/MonthlyRecurrenceByWeekDays.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/MonthlyRecurrenceByWeekDays.java new file mode 100644 index 000000000000..ab39d7eccad6 --- /dev/null +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/MonthlyRecurrenceByWeekDays.java @@ -0,0 +1,249 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.developer.loadtesting.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.developer.loadtesting.implementation.JsonMergePatchHelper; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +/** + * Recurrence model when frequency is set as MonthlyByDays . + */ +@Fluent +public final class MonthlyRecurrenceByWeekDays extends Recurrence { + /* + * Frequency of the recurrence. + */ + @Generated + private Frequency frequency = Frequency.MONTHLY_BY_DAYS; + + /* + * Specific days of the week when the recurrence should repeat. + */ + @Generated + private List weekDaysInMonth; + + /* + * Index of the week in a month at which the recurrence should repeat. For example, if the index is '2', weekDay is + * 'Monday', interval is 3 and frequency is 'Month', the recurrence will run every second Monday of the month and + * repeat every 3 months. Value of index can be 1 to 5. + */ + @Generated + private int index; + + /* + * The interval at which the recurrence should repeat. It signifies the number of months between each recurrence. + */ + @Generated + private int interval; + + /** + * Stores updated model property, the value is property name, not serialized name. + */ + @Generated + private final Set updatedProperties = new HashSet<>(); + + /** + * Creates an instance of MonthlyRecurrenceByWeekDays class. + */ + @Generated + public MonthlyRecurrenceByWeekDays() { + } + + /** + * Get the frequency property: Frequency of the recurrence. + * + * @return the frequency value. + */ + @Generated + @Override + public Frequency getFrequency() { + return this.frequency; + } + + /** + * Get the weekDaysInMonth property: Specific days of the week when the recurrence should repeat. + * + * @return the weekDaysInMonth value. + */ + @Generated + public List getWeekDaysInMonth() { + return this.weekDaysInMonth; + } + + /** + * Set the weekDaysInMonth property: Specific days of the week when the recurrence should repeat. + * + * @param weekDaysInMonth the weekDaysInMonth value to set. + * @return the MonthlyRecurrenceByWeekDays object itself. + */ + @Generated + public MonthlyRecurrenceByWeekDays setWeekDaysInMonth(List weekDaysInMonth) { + this.weekDaysInMonth = weekDaysInMonth; + this.updatedProperties.add("weekDaysInMonth"); + return this; + } + + /** + * Get the index property: Index of the week in a month at which the recurrence should repeat. For example, if the + * index is '2', weekDay is 'Monday', interval is 3 and frequency is 'Month', the recurrence will run every second + * Monday of the month and repeat every 3 months. Value of index can be 1 to 5. + * + * @return the index value. + */ + @Generated + public int getIndex() { + return this.index; + } + + /** + * Set the index property: Index of the week in a month at which the recurrence should repeat. For example, if the + * index is '2', weekDay is 'Monday', interval is 3 and frequency is 'Month', the recurrence will run every second + * Monday of the month and repeat every 3 months. Value of index can be 1 to 5. + *

Required when create the resource.

+ * + * @param index the index value to set. + * @return the MonthlyRecurrenceByWeekDays object itself. + */ + @Generated + public MonthlyRecurrenceByWeekDays setIndex(int index) { + this.index = index; + this.updatedProperties.add("index"); + return this; + } + + /** + * Get the interval property: The interval at which the recurrence should repeat. It signifies the number of months + * between each recurrence. + * + * @return the interval value. + */ + @Generated + public int getInterval() { + return this.interval; + } + + /** + * Set the interval property: The interval at which the recurrence should repeat. It signifies the number of months + * between each recurrence. + *

Required when create the resource.

+ * + * @param interval the interval value to set. + * @return the MonthlyRecurrenceByWeekDays object itself. + */ + @Generated + public MonthlyRecurrenceByWeekDays setInterval(int interval) { + this.interval = interval; + this.updatedProperties.add("interval"); + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public MonthlyRecurrenceByWeekDays setRecurrenceEnd(RecurrenceEnd recurrenceEnd) { + super.setRecurrenceEnd(recurrenceEnd); + this.updatedProperties.add("recurrenceEnd"); + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + if (JsonMergePatchHelper.getRecurrenceAccessor().isJsonMergePatch(this)) { + return toJsonMergePatch(jsonWriter); + } else { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("recurrenceEnd", getRecurrenceEnd()); + jsonWriter.writeStringField("frequency", this.frequency == null ? null : this.frequency.toString()); + jsonWriter.writeArrayField("weekDaysInMonth", this.weekDaysInMonth, + (writer, element) -> writer.writeString(element == null ? null : element.toString())); + jsonWriter.writeIntField("index", this.index); + jsonWriter.writeIntField("interval", this.interval); + return jsonWriter.writeEndObject(); + } + } + + @Generated + private JsonWriter toJsonMergePatch(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + if (updatedProperties.contains("recurrenceEnd")) { + if (getRecurrenceEnd() == null) { + jsonWriter.writeNullField("recurrenceEnd"); + } else { + JsonMergePatchHelper.getRecurrenceEndAccessor().prepareModelForJsonMergePatch(getRecurrenceEnd(), true); + jsonWriter.writeJsonField("recurrenceEnd", getRecurrenceEnd()); + JsonMergePatchHelper.getRecurrenceEndAccessor() + .prepareModelForJsonMergePatch(getRecurrenceEnd(), false); + } + } + jsonWriter.writeStringField("frequency", this.frequency.toString()); + if (updatedProperties.contains("weekDaysInMonth")) { + if (this.weekDaysInMonth == null) { + jsonWriter.writeNullField("weekDaysInMonth"); + } else { + jsonWriter.writeArrayField("weekDaysInMonth", this.weekDaysInMonth, + (writer, element) -> writer.writeString(element.toString())); + } + } + if (updatedProperties.contains("index")) { + jsonWriter.writeIntField("index", this.index); + } + if (updatedProperties.contains("interval")) { + jsonWriter.writeIntField("interval", this.interval); + } + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of MonthlyRecurrenceByWeekDays from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of MonthlyRecurrenceByWeekDays if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the MonthlyRecurrenceByWeekDays. + */ + @Generated + public static MonthlyRecurrenceByWeekDays fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + MonthlyRecurrenceByWeekDays deserializedMonthlyRecurrenceByWeekDays = new MonthlyRecurrenceByWeekDays(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("recurrenceEnd".equals(fieldName)) { + JsonMergePatchHelper.getRecurrenceAccessor() + .setRecurrenceEnd(deserializedMonthlyRecurrenceByWeekDays, RecurrenceEnd.fromJson(reader)); + } else if ("frequency".equals(fieldName)) { + deserializedMonthlyRecurrenceByWeekDays.frequency = Frequency.fromString(reader.getString()); + } else if ("weekDaysInMonth".equals(fieldName)) { + List weekDaysInMonth + = reader.readArray(reader1 -> WeekDays.fromString(reader1.getString())); + deserializedMonthlyRecurrenceByWeekDays.weekDaysInMonth = weekDaysInMonth; + } else if ("index".equals(fieldName)) { + deserializedMonthlyRecurrenceByWeekDays.index = reader.getInt(); + } else if ("interval".equals(fieldName)) { + deserializedMonthlyRecurrenceByWeekDays.interval = reader.getInt(); + } else { + reader.skipChildren(); + } + } + + return deserializedMonthlyRecurrenceByWeekDays; + }); + } +} diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/NameAndDescription.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/NameAndDescription.java index 933da7fb8cb2..5a1f27c8385f 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/NameAndDescription.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/NameAndDescription.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Generated; @@ -16,7 +17,6 @@ */ @Immutable public final class NameAndDescription implements JsonSerializable { - /* * The description */ @@ -38,7 +38,7 @@ private NameAndDescription() { /** * Get the description property: The description. - * + * * @return the description value. */ @Generated @@ -48,7 +48,7 @@ public String getDescription() { /** * Get the name property: The name. - * + * * @return the name value. */ @Generated @@ -70,7 +70,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of NameAndDescription from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of NameAndDescription if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. @@ -83,6 +83,7 @@ public static NameAndDescription fromJson(JsonReader jsonReader) throws IOExcept while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); + if ("description".equals(fieldName)) { deserializedNameAndDescription.description = reader.getString(); } else if ("name".equals(fieldName)) { @@ -91,6 +92,7 @@ public static NameAndDescription fromJson(JsonReader jsonReader) throws IOExcept reader.skipChildren(); } } + return deserializedNameAndDescription; }); } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/NotificationEventType.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/NotificationEventType.java new file mode 100644 index 000000000000..c05c9e073539 --- /dev/null +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/NotificationEventType.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.developer.loadtesting.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Notification event type. + */ +public final class NotificationEventType extends ExpandableStringEnum { + /** + * Test run ended event. This event would occur when a test run reaches terminal state. + */ + @Generated + public static final NotificationEventType TEST_RUN_ENDED = fromString("TestRunEnded"); + + /** + * Test run started event. This event would occur when a new test run is triggered. + */ + @Generated + public static final NotificationEventType TEST_RUN_STARTED = fromString("TestRunStarted"); + + /** + * Trigger completed event. This event would occur when a trigger completes. + */ + @Generated + public static final NotificationEventType TRIGGER_COMPLETED = fromString("TriggerCompleted"); + + /** + * Trigger disabled event. This event would occur when a trigger is disabled. + */ + @Generated + public static final NotificationEventType TRIGGER_DISABLED = fromString("TriggerDisabled"); + + /** + * Creates a new instance of NotificationEventType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public NotificationEventType() { + } + + /** + * Creates or finds a NotificationEventType from its string representation. + * + * @param name a name to look for. + * @return the corresponding NotificationEventType. + */ + @Generated + public static NotificationEventType fromString(String name) { + return fromString(name, NotificationEventType.class); + } + + /** + * Gets known NotificationEventType values. + * + * @return known NotificationEventType values. + */ + @Generated + public static Collection values() { + return values(NotificationEventType.class); + } +} diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/NotificationRule.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/NotificationRule.java new file mode 100644 index 000000000000..1e4a06871257 --- /dev/null +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/NotificationRule.java @@ -0,0 +1,364 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.developer.loadtesting.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.core.util.CoreUtils; +import com.azure.developer.loadtesting.implementation.JsonMergePatchHelper; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +/** + * Notification rule model. + */ +@Fluent +public class NotificationRule implements JsonSerializable { + /* + * The scope of the notification rule. + */ + @Generated + private NotificationScopeType scope = NotificationScopeType.fromString("NotificationRule"); + + /* + * The unique identifier of the notification rule. + */ + @Generated + private String notificationRuleId; + + /* + * The name of the notification rule. + */ + @Generated + private String displayName; + + /* + * The action groups to notify. + */ + @Generated + private List actionGroupIds; + + /* + * The creation datetime(RFC 3339 literal format). + */ + @Generated + private OffsetDateTime createdDateTime; + + /* + * The user that created. + */ + @Generated + private String createdBy; + + /* + * The last Modified datetime(RFC 3339 literal format). + */ + @Generated + private OffsetDateTime lastModifiedDateTime; + + /* + * The user that last modified. + */ + @Generated + private String lastModifiedBy; + + /** + * Stores updated model property, the value is property name, not serialized name. + */ + @Generated + private final Set updatedProperties = new HashSet<>(); + + @Generated + private boolean jsonMergePatch; + + @Generated + private void serializeAsJsonMergePatch(boolean jsonMergePatch) { + this.jsonMergePatch = jsonMergePatch; + } + + static { + JsonMergePatchHelper.setNotificationRuleAccessor(new JsonMergePatchHelper.NotificationRuleAccessor() { + @Override + public NotificationRule prepareModelForJsonMergePatch(NotificationRule model, + boolean jsonMergePatchEnabled) { + model.serializeAsJsonMergePatch(jsonMergePatchEnabled); + return model; + } + + @Override + public boolean isJsonMergePatch(NotificationRule model) { + return model.jsonMergePatch; + } + + @Override + public void setNotificationRuleId(NotificationRule model, String notificationRuleId) { + model.notificationRuleId = notificationRuleId; + } + + @Override + public void setDisplayName(NotificationRule model, String displayName) { + model.displayName = displayName; + } + + @Override + public void setActionGroupIds(NotificationRule model, List actionGroupIds) { + model.actionGroupIds = actionGroupIds; + } + + @Override + public void setCreatedDateTime(NotificationRule model, OffsetDateTime createdDateTime) { + model.createdDateTime = createdDateTime; + } + + @Override + public void setCreatedBy(NotificationRule model, String createdBy) { + model.createdBy = createdBy; + } + + @Override + public void setLastModifiedDateTime(NotificationRule model, OffsetDateTime lastModifiedDateTime) { + model.lastModifiedDateTime = lastModifiedDateTime; + } + + @Override + public void setLastModifiedBy(NotificationRule model, String lastModifiedBy) { + model.lastModifiedBy = lastModifiedBy; + } + }); + } + + /** + * Creates an instance of NotificationRule class. + */ + @Generated + public NotificationRule() { + } + + /** + * Get the scope property: The scope of the notification rule. + * + * @return the scope value. + */ + @Generated + public NotificationScopeType getScope() { + return this.scope; + } + + /** + * Get the notificationRuleId property: The unique identifier of the notification rule. + * + * @return the notificationRuleId value. + */ + @Generated + public String getNotificationRuleId() { + return this.notificationRuleId; + } + + /** + * Get the displayName property: The name of the notification rule. + * + * @return the displayName value. + */ + @Generated + public String getDisplayName() { + return this.displayName; + } + + /** + * Set the displayName property: The name of the notification rule. + *

Required when create the resource.

+ * + * @param displayName the displayName value to set. + * @return the NotificationRule object itself. + */ + @Generated + public NotificationRule setDisplayName(String displayName) { + this.displayName = displayName; + this.updatedProperties.add("displayName"); + return this; + } + + /** + * Get the actionGroupIds property: The action groups to notify. + * + * @return the actionGroupIds value. + */ + @Generated + public List getActionGroupIds() { + return this.actionGroupIds; + } + + /** + * Set the actionGroupIds property: The action groups to notify. + *

Required when create the resource.

+ * + * @param actionGroupIds the actionGroupIds value to set. + * @return the NotificationRule object itself. + */ + @Generated + public NotificationRule setActionGroupIds(List actionGroupIds) { + this.actionGroupIds = actionGroupIds; + this.updatedProperties.add("actionGroupIds"); + return this; + } + + /** + * Get the createdDateTime property: The creation datetime(RFC 3339 literal format). + * + * @return the createdDateTime value. + */ + @Generated + public OffsetDateTime getCreatedDateTime() { + return this.createdDateTime; + } + + /** + * Get the createdBy property: The user that created. + * + * @return the createdBy value. + */ + @Generated + public String getCreatedBy() { + return this.createdBy; + } + + /** + * Get the lastModifiedDateTime property: The last Modified datetime(RFC 3339 literal format). + * + * @return the lastModifiedDateTime value. + */ + @Generated + public OffsetDateTime getLastModifiedDateTime() { + return this.lastModifiedDateTime; + } + + /** + * Get the lastModifiedBy property: The user that last modified. + * + * @return the lastModifiedBy value. + */ + @Generated + public String getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + if (jsonMergePatch) { + return toJsonMergePatch(jsonWriter); + } else { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("scope", this.scope == null ? null : this.scope.toString()); + jsonWriter.writeStringField("displayName", this.displayName); + jsonWriter.writeArrayField("actionGroupIds", this.actionGroupIds, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + } + + @Generated + private JsonWriter toJsonMergePatch(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("scope", this.scope.toString()); + if (updatedProperties.contains("displayName")) { + if (this.displayName == null) { + jsonWriter.writeNullField("displayName"); + } else { + jsonWriter.writeStringField("displayName", this.displayName); + } + } + if (updatedProperties.contains("actionGroupIds")) { + if (this.actionGroupIds == null) { + jsonWriter.writeNullField("actionGroupIds"); + } else { + jsonWriter.writeArrayField("actionGroupIds", this.actionGroupIds, + (writer, element) -> writer.writeString(element)); + } + } + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NotificationRule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NotificationRule if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NotificationRule. + */ + @Generated + public static NotificationRule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String discriminatorValue = null; + try (JsonReader readerToUse = reader.bufferObject()) { + readerToUse.nextToken(); // Prepare for reading + while (readerToUse.nextToken() != JsonToken.END_OBJECT) { + String fieldName = readerToUse.getFieldName(); + readerToUse.nextToken(); + if ("scope".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("Tests".equals(discriminatorValue)) { + return TestsNotificationRule.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + @Generated + static NotificationRule fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NotificationRule deserializedNotificationRule = new NotificationRule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("notificationRuleId".equals(fieldName)) { + deserializedNotificationRule.notificationRuleId = reader.getString(); + } else if ("scope".equals(fieldName)) { + deserializedNotificationRule.scope = NotificationScopeType.fromString(reader.getString()); + } else if ("displayName".equals(fieldName)) { + deserializedNotificationRule.displayName = reader.getString(); + } else if ("actionGroupIds".equals(fieldName)) { + List actionGroupIds = reader.readArray(reader1 -> reader1.getString()); + deserializedNotificationRule.actionGroupIds = actionGroupIds; + } else if ("createdDateTime".equals(fieldName)) { + deserializedNotificationRule.createdDateTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("createdBy".equals(fieldName)) { + deserializedNotificationRule.createdBy = reader.getString(); + } else if ("lastModifiedDateTime".equals(fieldName)) { + deserializedNotificationRule.lastModifiedDateTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("lastModifiedBy".equals(fieldName)) { + deserializedNotificationRule.lastModifiedBy = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNotificationRule; + }); + } +} diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/NotificationScopeType.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/NotificationScopeType.java new file mode 100644 index 000000000000..de0414824bdf --- /dev/null +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/NotificationScopeType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.developer.loadtesting.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Scope type of a notification rule. + */ +public final class NotificationScopeType extends ExpandableStringEnum { + /** + * Notification rule is for Tests. + */ + @Generated + public static final NotificationScopeType TESTS = fromString("Tests"); + + /** + * Creates a new instance of NotificationScopeType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public NotificationScopeType() { + } + + /** + * Creates or finds a NotificationScopeType from its string representation. + * + * @param name a name to look for. + * @return the corresponding NotificationScopeType. + */ + @Generated + public static NotificationScopeType fromString(String name) { + return fromString(name, NotificationScopeType.class); + } + + /** + * Gets known NotificationScopeType values. + * + * @return known NotificationScopeType values. + */ + @Generated + public static Collection values() { + return values(NotificationScopeType.class); + } +} diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/OperationKind.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/OperationKind.java new file mode 100644 index 000000000000..46a3eaf73bee --- /dev/null +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/OperationKind.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.developer.loadtesting.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Kind of the long running operation. + */ +public final class OperationKind extends ExpandableStringEnum { + /** + * Operation represents a clone test operation. + */ + @Generated + public static final OperationKind CLONE_TEST = fromString("CloneTest"); + + /** + * Operation represents a test run insights generation operation. + */ + @Generated + public static final OperationKind GENERATE_TEST_RUN_INSIGHTS = fromString("GenerateTestRunInsights"); + + /** + * Operation represents a test plan recommendations generation operation. + */ + @Generated + public static final OperationKind TEST_PLAN_RECOMMENDATIONS = fromString("TestPlanRecommendations"); + + /** + * Creates a new instance of OperationKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public OperationKind() { + } + + /** + * Creates or finds a OperationKind from its string representation. + * + * @param name a name to look for. + * @return the corresponding OperationKind. + */ + @Generated + public static OperationKind fromString(String name) { + return fromString(name, OperationKind.class); + } + + /** + * Gets known OperationKind values. + * + * @return known OperationKind values. + */ + @Generated + public static Collection values() { + return values(OperationKind.class); + } +} diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/OperationState.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/OperationState.java new file mode 100644 index 000000000000..385cd9b3a169 --- /dev/null +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/OperationState.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.developer.loadtesting.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Enum describing allowed operation states. + */ +public final class OperationState extends ExpandableStringEnum { + /** + * The operation has not started. + */ + @Generated + public static final OperationState NOT_STARTED = fromString("NotStarted"); + + /** + * The operation is in progress. + */ + @Generated + public static final OperationState RUNNING = fromString("Running"); + + /** + * The operation has completed successfully. + */ + @Generated + public static final OperationState SUCCEEDED = fromString("Succeeded"); + + /** + * The operation has failed. + */ + @Generated + public static final OperationState FAILED = fromString("Failed"); + + /** + * The operation has been canceled by the user. + */ + @Generated + public static final OperationState CANCELED = fromString("Canceled"); + + /** + * Creates a new instance of OperationState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public OperationState() { + } + + /** + * Creates or finds a OperationState from its string representation. + * + * @param name a name to look for. + * @return the corresponding OperationState. + */ + @Generated + public static OperationState fromString(String name) { + return fromString(name, OperationState.class); + } + + /** + * Gets known OperationState values. + * + * @return known OperationState values. + */ + @Generated + public static Collection values() { + return values(OperationState.class); + } +} diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/OperationStatus.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/OperationStatus.java new file mode 100644 index 000000000000..41302a43395e --- /dev/null +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/OperationStatus.java @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.developer.loadtesting.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.models.ResponseError; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Status of a long running operation. + */ +@Immutable +public final class OperationStatus implements JsonSerializable { + /* + * The unique ID of the operation. + */ + @Generated + private String id; + + /* + * The state of the operation. + */ + @Generated + private final OperationState status; + + /* + * The kind of the operation. + */ + @Generated + private final OperationKind kind; + + /* + * Error object that describes the error when status is "Failed". + */ + @Generated + private ResponseError error; + + /** + * Creates an instance of OperationStatus class. + * + * @param status the status value to set. + * @param kind the kind value to set. + */ + @Generated + private OperationStatus(OperationState status, OperationKind kind) { + this.status = status; + this.kind = kind; + } + + /** + * Get the id property: The unique ID of the operation. + * + * @return the id value. + */ + @Generated + public String getId() { + return this.id; + } + + /** + * Get the status property: The state of the operation. + * + * @return the status value. + */ + @Generated + public OperationState getStatus() { + return this.status; + } + + /** + * Get the kind property: The kind of the operation. + * + * @return the kind value. + */ + @Generated + public OperationKind getKind() { + return this.kind; + } + + /** + * Get the error property: Error object that describes the error when status is "Failed". + * + * @return the error value. + */ + @Generated + public ResponseError getError() { + return this.error; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); + jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString()); + jsonWriter.writeJsonField("error", this.error); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationStatus from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationStatus if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the OperationStatus. + */ + @Generated + public static OperationStatus fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String id = null; + OperationState status = null; + OperationKind kind = null; + ResponseError error = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + id = reader.getString(); + } else if ("status".equals(fieldName)) { + status = OperationState.fromString(reader.getString()); + } else if ("kind".equals(fieldName)) { + kind = OperationKind.fromString(reader.getString()); + } else if ("error".equals(fieldName)) { + error = ResponseError.fromJson(reader); + } else { + reader.skipChildren(); + } + } + OperationStatus deserializedOperationStatus = new OperationStatus(status, kind); + deserializedOperationStatus.id = id; + deserializedOperationStatus.error = error; + + return deserializedOperationStatus; + }); + } +} diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/OptionalLoadTestConfiguration.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/OptionalLoadTestConfiguration.java index f578da152004..d9cb9d2a380b 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/OptionalLoadTestConfiguration.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/OptionalLoadTestConfiguration.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Fluent; @@ -20,7 +21,6 @@ */ @Fluent public final class OptionalLoadTestConfiguration implements JsonSerializable { - /* * Test URL. Provide the complete HTTP URL. For example, https://contoso-app.azurewebsites.net/login */ @@ -75,7 +75,6 @@ private void serializeAsJsonMergePatch(boolean jsonMergePatch) { static { JsonMergePatchHelper .setOptionalLoadTestConfigurationAccessor(new JsonMergePatchHelper.OptionalLoadTestConfigurationAccessor() { - @Override public OptionalLoadTestConfiguration prepareModelForJsonMergePatch(OptionalLoadTestConfiguration model, boolean jsonMergePatchEnabled) { @@ -100,7 +99,7 @@ public OptionalLoadTestConfiguration() { /** * Get the endpointUrl property: Test URL. Provide the complete HTTP URL. For example, * https://contoso-app.azurewebsites.net/login. - * + * * @return the endpointUrl value. */ @Generated @@ -111,7 +110,7 @@ public String getEndpointUrl() { /** * Set the endpointUrl property: Test URL. Provide the complete HTTP URL. For example, * https://contoso-app.azurewebsites.net/login. - * + * * @param endpointUrl the endpointUrl value to set. * @return the OptionalLoadTestConfiguration object itself. */ @@ -125,7 +124,7 @@ public OptionalLoadTestConfiguration setEndpointUrl(String endpointUrl) { /** * Get the requestsPerSecond property: Target throughput (requests per second). This may not be necessarily * achieved. The actual throughput will be lower if the application is not capable of handling it. - * + * * @return the requestsPerSecond value. */ @Generated @@ -136,7 +135,7 @@ public Integer getRequestsPerSecond() { /** * Set the requestsPerSecond property: Target throughput (requests per second). This may not be necessarily * achieved. The actual throughput will be lower if the application is not capable of handling it. - * + * * @param requestsPerSecond the requestsPerSecond value to set. * @return the OptionalLoadTestConfiguration object itself. */ @@ -149,7 +148,7 @@ public OptionalLoadTestConfiguration setRequestsPerSecond(Integer requestsPerSec /** * Get the maxResponseTimeInMs property: Maximum response time in milliseconds of the API/endpoint. - * + * * @return the maxResponseTimeInMs value. */ @Generated @@ -159,7 +158,7 @@ public Integer getMaxResponseTimeInMs() { /** * Set the maxResponseTimeInMs property: Maximum response time in milliseconds of the API/endpoint. - * + * * @param maxResponseTimeInMs the maxResponseTimeInMs value to set. * @return the OptionalLoadTestConfiguration object itself. */ @@ -172,7 +171,7 @@ public OptionalLoadTestConfiguration setMaxResponseTimeInMs(Integer maxResponseT /** * Get the virtualUsers property: No of concurrent virtual users. - * + * * @return the virtualUsers value. */ @Generated @@ -182,7 +181,7 @@ public Integer getVirtualUsers() { /** * Set the virtualUsers property: No of concurrent virtual users. - * + * * @param virtualUsers the virtualUsers value to set. * @return the OptionalLoadTestConfiguration object itself. */ @@ -195,7 +194,7 @@ public OptionalLoadTestConfiguration setVirtualUsers(Integer virtualUsers) { /** * Get the rampUpTime property: Ramp up time in seconds. - * + * * @return the rampUpTime value. */ @Generated @@ -205,7 +204,7 @@ public Integer getRampUpTime() { /** * Set the rampUpTime property: Ramp up time in seconds. - * + * * @param rampUpTime the rampUpTime value to set. * @return the OptionalLoadTestConfiguration object itself. */ @@ -218,7 +217,7 @@ public OptionalLoadTestConfiguration setRampUpTime(Integer rampUpTime) { /** * Get the duration property: Test run duration in seconds. - * + * * @return the duration value. */ @Generated @@ -229,6 +228,23 @@ public Duration getDuration() { return Duration.ofSeconds(this.duration); } + /** + * Set the duration property: Test run duration in seconds. + * + * @param duration the duration value to set. + * @return the OptionalLoadTestConfiguration object itself. + */ + @Generated + public OptionalLoadTestConfiguration setDuration(Duration duration) { + if (duration == null) { + this.duration = null; + } else { + this.duration = duration.getSeconds(); + } + this.updatedProperties.add("duration"); + return this; + } + /** * {@inheritDoc} */ @@ -299,7 +315,7 @@ private JsonWriter toJsonMergePatch(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of OptionalLoadTestConfiguration from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of OptionalLoadTestConfiguration if the JsonReader was pointing to an instance of it, or null * if it was pointing to JSON null. @@ -313,6 +329,7 @@ public static OptionalLoadTestConfiguration fromJson(JsonReader jsonReader) thro while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); + if ("endpointUrl".equals(fieldName)) { deserializedOptionalLoadTestConfiguration.endpointUrl = reader.getString(); } else if ("requestsPerSecond".equals(fieldName)) { @@ -331,24 +348,8 @@ public static OptionalLoadTestConfiguration fromJson(JsonReader jsonReader) thro reader.skipChildren(); } } + return deserializedOptionalLoadTestConfiguration; }); } - - /** - * Set the duration property: Test run duration in seconds. - * - * @param duration the duration value to set. - * @return the OptionalLoadTestConfiguration object itself. - */ - @Generated - public OptionalLoadTestConfiguration setDuration(Duration duration) { - if (duration == null) { - this.duration = null; - } else { - this.duration = duration.getSeconds(); - } - this.updatedProperties.add("duration"); - return this; - } } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/PassFailAction.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/PassFailAction.java index 13e03c7a818c..6ce318f6fc44 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/PassFailAction.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/PassFailAction.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Generated; @@ -11,7 +12,6 @@ * Action to take on failure of pass/fail criteria. */ public final class PassFailAction extends ExpandableStringEnum { - /** * Test will continue to run even if pass fail metric criteria metric gets failed. */ @@ -26,7 +26,7 @@ public final class PassFailAction extends ExpandableStringEnum { /** * Creates a new instance of PassFailAction value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Generated @@ -36,7 +36,7 @@ public PassFailAction() { /** * Creates or finds a PassFailAction from its string representation. - * + * * @param name a name to look for. * @return the corresponding PassFailAction. */ @@ -47,7 +47,7 @@ public static PassFailAction fromString(String name) { /** * Gets known PassFailAction values. - * + * * @return known PassFailAction values. */ @Generated diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/PassFailAggregationFunction.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/PassFailAggregationFunction.java index bbb8ca30a40a..cc9c29450148 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/PassFailAggregationFunction.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/PassFailAggregationFunction.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Generated; @@ -11,7 +12,6 @@ * Aggregation functions for pass/fail criteria. */ public final class PassFailAggregationFunction extends ExpandableStringEnum { - /** * Criteria applies for count value. */ @@ -24,37 +24,6 @@ public final class PassFailAggregationFunction extends ExpandableStringEnum values() { - return values(PassFailAggregationFunction.class); - } - /** * Criteria applies for avg value. */ @@ -132,4 +101,35 @@ public static Collection values() { */ @Generated public static final PassFailAggregationFunction MAXIMUM = fromString("max"); + + /** + * Creates a new instance of PassFailAggregationFunction value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public PassFailAggregationFunction() { + } + + /** + * Creates or finds a PassFailAggregationFunction from its string representation. + * + * @param name a name to look for. + * @return the corresponding PassFailAggregationFunction. + */ + @Generated + public static PassFailAggregationFunction fromString(String name) { + return fromString(name, PassFailAggregationFunction.class); + } + + /** + * Gets known PassFailAggregationFunction values. + * + * @return known PassFailAggregationFunction values. + */ + @Generated + public static Collection values() { + return values(PassFailAggregationFunction.class); + } } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/PassFailCriteria.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/PassFailCriteria.java index 67ed236faebb..94e073540365 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/PassFailCriteria.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/PassFailCriteria.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Fluent; @@ -20,7 +21,6 @@ */ @Fluent public final class PassFailCriteria implements JsonSerializable { - /* * Map of id and pass fail metrics { id : pass fail metrics }. */ @@ -49,7 +49,6 @@ private void serializeAsJsonMergePatch(boolean jsonMergePatch) { static { JsonMergePatchHelper.setPassFailCriteriaAccessor(new JsonMergePatchHelper.PassFailCriteriaAccessor() { - @Override public PassFailCriteria prepareModelForJsonMergePatch(PassFailCriteria model, boolean jsonMergePatchEnabled) { @@ -73,7 +72,7 @@ public PassFailCriteria() { /** * Get the passFailMetrics property: Map of id and pass fail metrics { id : pass fail metrics }. - * + * * @return the passFailMetrics value. */ @Generated @@ -83,7 +82,7 @@ public Map getPassFailMetrics() { /** * Set the passFailMetrics property: Map of id and pass fail metrics { id : pass fail metrics }. - * + * * @param passFailMetrics the passFailMetrics value to set. * @return the PassFailCriteria object itself. */ @@ -96,7 +95,7 @@ public PassFailCriteria setPassFailMetrics(Map passFailM /** * Get the passFailServerMetrics property: Map of id and pass fail server metrics { id : pass fail metrics }. - * + * * @return the passFailServerMetrics value. */ @Generated @@ -106,7 +105,7 @@ public Map getPassFailServerMetrics() { /** * Set the passFailServerMetrics property: Map of id and pass fail server metrics { id : pass fail metrics }. - * + * * @param passFailServerMetrics the passFailServerMetrics value to set. * @return the PassFailCriteria object itself. */ @@ -175,7 +174,7 @@ private JsonWriter toJsonMergePatch(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of PassFailCriteria from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of PassFailCriteria if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. @@ -188,6 +187,7 @@ public static PassFailCriteria fromJson(JsonReader jsonReader) throws IOExceptio while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); + if ("passFailMetrics".equals(fieldName)) { Map passFailMetrics = reader.readMap(reader1 -> PassFailMetric.fromJson(reader1)); @@ -200,6 +200,7 @@ public static PassFailCriteria fromJson(JsonReader jsonReader) throws IOExceptio reader.skipChildren(); } } + return deserializedPassFailCriteria; }); } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/PassFailMetric.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/PassFailMetric.java index b991ac9a9632..d2281c9bf0e2 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/PassFailMetric.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/PassFailMetric.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Fluent; @@ -19,7 +20,6 @@ */ @Fluent public final class PassFailMetric implements JsonSerializable { - /* * The client metric on which the criteria should be applied. */ @@ -88,7 +88,6 @@ private void serializeAsJsonMergePatch(boolean jsonMergePatch) { static { JsonMergePatchHelper.setPassFailMetricAccessor(new JsonMergePatchHelper.PassFailMetricAccessor() { - @Override public PassFailMetric prepareModelForJsonMergePatch(PassFailMetric model, boolean jsonMergePatchEnabled) { model.serializeAsJsonMergePatch(jsonMergePatchEnabled); @@ -111,7 +110,7 @@ public PassFailMetric() { /** * Get the clientMetric property: The client metric on which the criteria should be applied. - * + * * @return the clientMetric value. */ @Generated @@ -119,12 +118,25 @@ public PfMetrics getClientMetric() { return this.clientMetric; } + /** + * Set the clientMetric property: The client metric on which the criteria should be applied. + * + * @param clientMetric the clientMetric value to set. + * @return the PassFailMetric object itself. + */ + @Generated + public PassFailMetric setClientMetric(PfMetrics clientMetric) { + this.clientMetric = clientMetric; + this.updatedProperties.add("clientMetric"); + return this; + } + /** * Get the aggregate property: The aggregation function to be applied on the client metric. Allowed functions * - ‘percentage’ - for error metric , ‘avg’, percentiles like ‘p50’, ‘p90’, & so on, ‘min’, * ‘max’ - for response_time_ms and latency metric, ‘avg’ - for requests_per_sec, * ‘count’ - for requests. - * + * * @return the aggregate value. */ @Generated @@ -132,9 +144,25 @@ public PassFailAggregationFunction getAggregate() { return this.aggregate; } + /** + * Set the aggregate property: The aggregation function to be applied on the client metric. Allowed functions + * - ‘percentage’ - for error metric , ‘avg’, percentiles like ‘p50’, ‘p90’, & so on, ‘min’, + * ‘max’ - for response_time_ms and latency metric, ‘avg’ - for requests_per_sec, + * ‘count’ - for requests. + * + * @param aggregate the aggregate value to set. + * @return the PassFailMetric object itself. + */ + @Generated + public PassFailMetric setAggregate(PassFailAggregationFunction aggregate) { + this.aggregate = aggregate; + this.updatedProperties.add("aggregate"); + return this; + } + /** * Get the condition property: The comparison operator. Supported types ‘>’, ‘<’. - * + * * @return the condition value. */ @Generated @@ -144,7 +172,7 @@ public String getCondition() { /** * Set the condition property: The comparison operator. Supported types ‘>’, ‘<’. - * + * * @param condition the condition value to set. * @return the PassFailMetric object itself. */ @@ -157,7 +185,7 @@ public PassFailMetric setCondition(String condition) { /** * Get the requestName property: Request name for which the Pass fail criteria has to be applied. - * + * * @return the requestName value. */ @Generated @@ -167,7 +195,7 @@ public String getRequestName() { /** * Set the requestName property: Request name for which the Pass fail criteria has to be applied. - * + * * @param requestName the requestName value to set. * @return the PassFailMetric object itself. */ @@ -181,7 +209,7 @@ public PassFailMetric setRequestName(String requestName) { /** * Get the value property: The value to compare with the client metric. Allowed values - ‘error : [0.0 , * 100.0] unit- % ’, response_time_ms and latency : any integer value unit- ms. - * + * * @return the value value. */ @Generated @@ -192,7 +220,7 @@ public Double getValue() { /** * Set the value property: The value to compare with the client metric. Allowed values - ‘error : [0.0 , * 100.0] unit- % ’, response_time_ms and latency : any integer value unit- ms. - * + * * @param value the value value to set. * @return the PassFailMetric object itself. */ @@ -205,7 +233,7 @@ public PassFailMetric setValue(Double value) { /** * Get the action property: Action taken after the threshold is met. Default is ‘continue’. - * + * * @return the action value. */ @Generated @@ -213,9 +241,22 @@ public PassFailAction getAction() { return this.action; } + /** + * Set the action property: Action taken after the threshold is met. Default is ‘continue’. + * + * @param action the action value to set. + * @return the PassFailMetric object itself. + */ + @Generated + public PassFailMetric setAction(PassFailAction action) { + this.action = action; + this.updatedProperties.add("action"); + return this; + } + /** * Get the actualValue property: The actual value of the client metric for the test run. - * + * * @return the actualValue value. */ @Generated @@ -225,7 +266,7 @@ public Double getActualValue() { /** * Get the result property: Outcome of the test run. - * + * * @return the result value. */ @Generated @@ -304,7 +345,7 @@ private JsonWriter toJsonMergePatch(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of PassFailMetric from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of PassFailMetric if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. @@ -317,6 +358,7 @@ public static PassFailMetric fromJson(JsonReader jsonReader) throws IOException while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); + if ("clientMetric".equals(fieldName)) { deserializedPassFailMetric.clientMetric = PfMetrics.fromString(reader.getString()); } else if ("aggregate".equals(fieldName)) { @@ -337,49 +379,8 @@ public static PassFailMetric fromJson(JsonReader jsonReader) throws IOException reader.skipChildren(); } } + return deserializedPassFailMetric; }); } - - /** - * Set the aggregate property: The aggregation function to be applied on the client metric. Allowed functions - * - ‘percentage’ - for error metric , ‘avg’, percentiles like ‘p50’, ‘p90’, & so on, ‘min’, - * ‘max’ - for response_time_ms and latency metric, ‘avg’ - for requests_per_sec, - * ‘count’ - for requests. - * - * @param aggregate the aggregate value to set. - * @return the PassFailMetric object itself. - */ - @Generated - public PassFailMetric setAggregate(PassFailAggregationFunction aggregate) { - this.aggregate = aggregate; - this.updatedProperties.add("aggregate"); - return this; - } - - /** - * Set the action property: Action taken after the threshold is met. Default is ‘continue’. - * - * @param action the action value to set. - * @return the PassFailMetric object itself. - */ - @Generated - public PassFailMetric setAction(PassFailAction action) { - this.action = action; - this.updatedProperties.add("action"); - return this; - } - - /** - * Set the clientMetric property: The client metric on which the criteria should be applied. - * - * @param clientMetric the clientMetric value to set. - * @return the PassFailMetric object itself. - */ - @Generated - public PassFailMetric setClientMetric(PfMetrics clientMetric) { - this.clientMetric = clientMetric; - this.updatedProperties.add("clientMetric"); - return this; - } } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/PassFailResult.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/PassFailResult.java index 7f34e9324110..6bf021cf23d1 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/PassFailResult.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/PassFailResult.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Generated; @@ -11,7 +12,6 @@ * Pass/fail criteria result. */ public final class PassFailResult extends ExpandableStringEnum { - /** * Given pass fail criteria metric has passed. */ @@ -32,7 +32,7 @@ public final class PassFailResult extends ExpandableStringEnum { /** * Creates a new instance of PassFailResult value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Generated @@ -42,7 +42,7 @@ public PassFailResult() { /** * Creates or finds a PassFailResult from its string representation. - * + * * @param name a name to look for. * @return the corresponding PassFailResult. */ @@ -53,7 +53,7 @@ public static PassFailResult fromString(String name) { /** * Gets known PassFailResult values. - * + * * @return known PassFailResult values. */ @Generated diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/PassFailServerMetric.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/PassFailServerMetric.java index 5e0eb3706645..426014cbe369 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/PassFailServerMetric.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/PassFailServerMetric.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Fluent; @@ -19,7 +20,6 @@ */ @Fluent public final class PassFailServerMetric implements JsonSerializable { - /* * The resource id of the resource emitting the metric. */ @@ -90,7 +90,6 @@ private void serializeAsJsonMergePatch(boolean jsonMergePatch) { static { JsonMergePatchHelper.setPassFailServerMetricAccessor(new JsonMergePatchHelper.PassFailServerMetricAccessor() { - @Override public PassFailServerMetric prepareModelForJsonMergePatch(PassFailServerMetric model, boolean jsonMergePatchEnabled) { @@ -114,7 +113,7 @@ public PassFailServerMetric() { /** * Get the resourceId property: The resource id of the resource emitting the metric. - * + * * @return the resourceId value. */ @Generated @@ -125,7 +124,7 @@ public String getResourceId() { /** * Set the resourceId property: The resource id of the resource emitting the metric. *

Required when create the resource.

- * + * * @param resourceId the resourceId value to set. * @return the PassFailServerMetric object itself. */ @@ -138,7 +137,7 @@ public PassFailServerMetric setResourceId(String resourceId) { /** * Get the metricNamespace property: The server metric namespace. - * + * * @return the metricNamespace value. */ @Generated @@ -149,7 +148,7 @@ public String getMetricNamespace() { /** * Set the metricNamespace property: The server metric namespace. *

Required when create the resource.

- * + * * @param metricNamespace the metricNamespace value to set. * @return the PassFailServerMetric object itself. */ @@ -162,7 +161,7 @@ public PassFailServerMetric setMetricNamespace(String metricNamespace) { /** * Get the metricName property: The server metric name. - * + * * @return the metricName value. */ @Generated @@ -173,7 +172,7 @@ public String getMetricName() { /** * Set the metricName property: The server metric name. *

Required when create the resource.

- * + * * @param metricName the metricName value to set. * @return the PassFailServerMetric object itself. */ @@ -186,7 +185,7 @@ public PassFailServerMetric setMetricName(String metricName) { /** * Get the aggregation property: Aggregation Type. - * + * * @return the aggregation value. */ @Generated @@ -197,7 +196,7 @@ public String getAggregation() { /** * Set the aggregation property: Aggregation Type. *

Required when create the resource.

- * + * * @param aggregation the aggregation value to set. * @return the PassFailServerMetric object itself. */ @@ -210,7 +209,7 @@ public PassFailServerMetric setAggregation(String aggregation) { /** * Get the condition property: The comparison operator. Supported types ‘>’, ‘<’. - * + * * @return the condition value. */ @Generated @@ -221,7 +220,7 @@ public String getCondition() { /** * Set the condition property: The comparison operator. Supported types ‘>’, ‘<’. *

Required when create the resource.

- * + * * @param condition the condition value to set. * @return the PassFailServerMetric object itself. */ @@ -234,7 +233,7 @@ public PassFailServerMetric setCondition(String condition) { /** * Get the value property: The value to compare with the server metric. - * + * * @return the value value. */ @Generated @@ -245,7 +244,7 @@ public double getValue() { /** * Set the value property: The value to compare with the server metric. *

Required when create the resource.

- * + * * @param value the value value to set. * @return the PassFailServerMetric object itself. */ @@ -258,7 +257,7 @@ public PassFailServerMetric setValue(double value) { /** * Get the action property: Action taken after the threshold is met. Default is ‘continue’. - * + * * @return the action value. */ @Generated @@ -266,9 +265,22 @@ public PassFailAction getAction() { return this.action; } + /** + * Set the action property: Action taken after the threshold is met. Default is ‘continue’. + * + * @param action the action value to set. + * @return the PassFailServerMetric object itself. + */ + @Generated + public PassFailServerMetric setAction(PassFailAction action) { + this.action = action; + this.updatedProperties.add("action"); + return this; + } + /** * Get the actualValue property: The actual value of the server metric. - * + * * @return the actualValue value. */ @Generated @@ -278,7 +290,7 @@ public Double getActualValue() { /** * Get the result property: Outcome of the test run. - * + * * @return the result value. */ @Generated @@ -360,7 +372,7 @@ private JsonWriter toJsonMergePatch(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of PassFailServerMetric from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of PassFailServerMetric if the JsonReader was pointing to an instance of it, or null if it * was pointing to JSON null. @@ -373,6 +385,7 @@ public static PassFailServerMetric fromJson(JsonReader jsonReader) throws IOExce while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); + if ("resourceId".equals(fieldName)) { deserializedPassFailServerMetric.resourceId = reader.getString(); } else if ("metricNamespace".equals(fieldName)) { @@ -395,20 +408,8 @@ public static PassFailServerMetric fromJson(JsonReader jsonReader) throws IOExce reader.skipChildren(); } } + return deserializedPassFailServerMetric; }); } - - /** - * Set the action property: Action taken after the threshold is met. Default is ‘continue’. - * - * @param action the action value to set. - * @return the PassFailServerMetric object itself. - */ - @Generated - public PassFailServerMetric setAction(PassFailAction action) { - this.action = action; - this.updatedProperties.add("action"); - return this; - } } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/PassFailTestResult.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/PassFailTestResult.java index d47e930ed507..729cb301014d 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/PassFailTestResult.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/PassFailTestResult.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Generated; @@ -11,7 +12,6 @@ * Test result based on pass/fail criteria. */ public final class PassFailTestResult extends ExpandableStringEnum { - /** * Pass/fail criteria has passed. */ @@ -32,7 +32,7 @@ public final class PassFailTestResult extends ExpandableStringEnum { - /** * Pass fail criteria for response time metric in milliseconds. */ @@ -44,7 +44,7 @@ public final class PfMetrics extends ExpandableStringEnum { /** * Creates a new instance of PfMetrics value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Generated @@ -54,7 +54,7 @@ public PfMetrics() { /** * Creates or finds a PfMetrics from its string representation. - * + * * @param name a name to look for. * @return the corresponding PfMetrics. */ @@ -65,7 +65,7 @@ public static PfMetrics fromString(String name) { /** * Gets known PfMetrics values. - * + * * @return known PfMetrics values. */ @Generated diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/RecommendationCategory.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/RecommendationCategory.java index bc17106bc909..79630dae1b43 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/RecommendationCategory.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/RecommendationCategory.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Generated; @@ -11,7 +12,6 @@ * Category of Recommendation. */ public final class RecommendationCategory extends ExpandableStringEnum { - /** * The recommendation for this category optimizes the throughput/RPS (Requests per Second) of the app. */ @@ -26,7 +26,7 @@ public final class RecommendationCategory extends ExpandableStringEnum { + /* + * Frequency of the recurrence. + */ + @Generated + private Frequency frequency = Frequency.fromString("Recurrence"); + + /* + * Recurrence end model. You can specify the end either by providing a numberOfOccurrences (which will end the + * recurrence after the specified number of occurrences) or by providing an endDateTime (which will end the + * recurrence after the specified date). If neither value is provided, the recurrence will continue until it is + * manually ended. However, if both values are provided, an error will be thrown. + */ + @Generated + private RecurrenceEnd recurrenceEnd; + + /** + * Stores updated model property, the value is property name, not serialized name. + */ + @Generated + private final Set updatedProperties = new HashSet<>(); + + @Generated + private boolean jsonMergePatch; + + @Generated + private void serializeAsJsonMergePatch(boolean jsonMergePatch) { + this.jsonMergePatch = jsonMergePatch; + } + + static { + JsonMergePatchHelper.setRecurrenceAccessor(new JsonMergePatchHelper.RecurrenceAccessor() { + @Override + public Recurrence prepareModelForJsonMergePatch(Recurrence model, boolean jsonMergePatchEnabled) { + model.serializeAsJsonMergePatch(jsonMergePatchEnabled); + return model; + } + + @Override + public boolean isJsonMergePatch(Recurrence model) { + return model.jsonMergePatch; + } + + @Override + public void setRecurrenceEnd(Recurrence model, RecurrenceEnd recurrenceEnd) { + model.recurrenceEnd = recurrenceEnd; + } + }); + } + + /** + * Creates an instance of Recurrence class. + */ + @Generated + public Recurrence() { + } + + /** + * Get the frequency property: Frequency of the recurrence. + * + * @return the frequency value. + */ + @Generated + public Frequency getFrequency() { + return this.frequency; + } + + /** + * Get the recurrenceEnd property: Recurrence end model. You can specify the end either by providing a + * numberOfOccurrences (which will end the recurrence after the specified number of occurrences) or by providing an + * endDateTime (which will end the recurrence after the specified date). If neither value is provided, the + * recurrence will continue until it is manually ended. However, if both values are provided, an error will be + * thrown. + * + * @return the recurrenceEnd value. + */ + @Generated + public RecurrenceEnd getRecurrenceEnd() { + return this.recurrenceEnd; + } + + /** + * Set the recurrenceEnd property: Recurrence end model. You can specify the end either by providing a + * numberOfOccurrences (which will end the recurrence after the specified number of occurrences) or by providing an + * endDateTime (which will end the recurrence after the specified date). If neither value is provided, the + * recurrence will continue until it is manually ended. However, if both values are provided, an error will be + * thrown. + * + * @param recurrenceEnd the recurrenceEnd value to set. + * @return the Recurrence object itself. + */ + @Generated + public Recurrence setRecurrenceEnd(RecurrenceEnd recurrenceEnd) { + this.recurrenceEnd = recurrenceEnd; + this.updatedProperties.add("recurrenceEnd"); + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + if (jsonMergePatch) { + return toJsonMergePatch(jsonWriter); + } else { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("frequency", this.frequency == null ? null : this.frequency.toString()); + jsonWriter.writeJsonField("recurrenceEnd", this.recurrenceEnd); + return jsonWriter.writeEndObject(); + } + } + + @Generated + private JsonWriter toJsonMergePatch(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("frequency", this.frequency.toString()); + if (updatedProperties.contains("recurrenceEnd")) { + if (this.recurrenceEnd == null) { + jsonWriter.writeNullField("recurrenceEnd"); + } else { + JsonMergePatchHelper.getRecurrenceEndAccessor().prepareModelForJsonMergePatch(this.recurrenceEnd, true); + jsonWriter.writeJsonField("recurrenceEnd", this.recurrenceEnd); + JsonMergePatchHelper.getRecurrenceEndAccessor() + .prepareModelForJsonMergePatch(this.recurrenceEnd, false); + } + } + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Recurrence from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Recurrence if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IOException If an error occurs while reading the Recurrence. + */ + @Generated + public static Recurrence fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String discriminatorValue = null; + try (JsonReader readerToUse = reader.bufferObject()) { + readerToUse.nextToken(); // Prepare for reading + while (readerToUse.nextToken() != JsonToken.END_OBJECT) { + String fieldName = readerToUse.getFieldName(); + readerToUse.nextToken(); + if ("frequency".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("Daily".equals(discriminatorValue)) { + return DailyRecurrence.fromJson(readerToUse.reset()); + } else if ("Hourly".equals(discriminatorValue)) { + return HourlyRecurrence.fromJson(readerToUse.reset()); + } else if ("MonthlyByDays".equals(discriminatorValue)) { + return MonthlyRecurrenceByWeekDays.fromJson(readerToUse.reset()); + } else if ("MonthlyByDates".equals(discriminatorValue)) { + return MonthlyRecurrenceByDates.fromJson(readerToUse.reset()); + } else if ("Cron".equals(discriminatorValue)) { + return RecurrenceWithCron.fromJson(readerToUse.reset()); + } else if ("Weekly".equals(discriminatorValue)) { + return WeeklyRecurrence.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + @Generated + static Recurrence fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Recurrence deserializedRecurrence = new Recurrence(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("frequency".equals(fieldName)) { + deserializedRecurrence.frequency = Frequency.fromString(reader.getString()); + } else if ("recurrenceEnd".equals(fieldName)) { + deserializedRecurrence.recurrenceEnd = RecurrenceEnd.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedRecurrence; + }); + } +} diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/RecurrenceEnd.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/RecurrenceEnd.java new file mode 100644 index 000000000000..25f89058bb43 --- /dev/null +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/RecurrenceEnd.java @@ -0,0 +1,190 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.developer.loadtesting.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.core.util.CoreUtils; +import com.azure.developer.loadtesting.implementation.JsonMergePatchHelper; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.HashSet; +import java.util.Set; + +/** + * Recurrence end model. Either provide numberOfOccurrences if you want recurrence to end after a specified number of + * occurrences or provide endDate if you want recurrence to end after a specified end date. If both values are provided, + * a validation error will be thrown indicating that only one field should be provided. If neither value is provided, + * the recurrence will end when manually ended. + */ +@Fluent +public final class RecurrenceEnd implements JsonSerializable { + /* + * Number of occurrences after which the recurrence will end. + */ + @Generated + private Integer numberOfOccurrences; + + /* + * The date after which the recurrence will end. (RFC 3339 literal format) + */ + @Generated + private OffsetDateTime endDateTime; + + /** + * Stores updated model property, the value is property name, not serialized name. + */ + @Generated + private final Set updatedProperties = new HashSet<>(); + + @Generated + private boolean jsonMergePatch; + + @Generated + private void serializeAsJsonMergePatch(boolean jsonMergePatch) { + this.jsonMergePatch = jsonMergePatch; + } + + static { + JsonMergePatchHelper.setRecurrenceEndAccessor(new JsonMergePatchHelper.RecurrenceEndAccessor() { + @Override + public RecurrenceEnd prepareModelForJsonMergePatch(RecurrenceEnd model, boolean jsonMergePatchEnabled) { + model.serializeAsJsonMergePatch(jsonMergePatchEnabled); + return model; + } + + @Override + public boolean isJsonMergePatch(RecurrenceEnd model) { + return model.jsonMergePatch; + } + }); + } + + /** + * Creates an instance of RecurrenceEnd class. + */ + @Generated + public RecurrenceEnd() { + } + + /** + * Get the numberOfOccurrences property: Number of occurrences after which the recurrence will end. + * + * @return the numberOfOccurrences value. + */ + @Generated + public Integer getNumberOfOccurrences() { + return this.numberOfOccurrences; + } + + /** + * Set the numberOfOccurrences property: Number of occurrences after which the recurrence will end. + * + * @param numberOfOccurrences the numberOfOccurrences value to set. + * @return the RecurrenceEnd object itself. + */ + @Generated + public RecurrenceEnd setNumberOfOccurrences(Integer numberOfOccurrences) { + this.numberOfOccurrences = numberOfOccurrences; + this.updatedProperties.add("numberOfOccurrences"); + return this; + } + + /** + * Get the endDateTime property: The date after which the recurrence will end. (RFC 3339 literal format). + * + * @return the endDateTime value. + */ + @Generated + public OffsetDateTime getEndDateTime() { + return this.endDateTime; + } + + /** + * Set the endDateTime property: The date after which the recurrence will end. (RFC 3339 literal format). + * + * @param endDateTime the endDateTime value to set. + * @return the RecurrenceEnd object itself. + */ + @Generated + public RecurrenceEnd setEndDateTime(OffsetDateTime endDateTime) { + this.endDateTime = endDateTime; + this.updatedProperties.add("endDateTime"); + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + if (jsonMergePatch) { + return toJsonMergePatch(jsonWriter); + } else { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("numberOfOccurrences", this.numberOfOccurrences); + jsonWriter.writeStringField("endDateTime", + this.endDateTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endDateTime)); + return jsonWriter.writeEndObject(); + } + } + + @Generated + private JsonWriter toJsonMergePatch(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + if (updatedProperties.contains("numberOfOccurrences")) { + if (this.numberOfOccurrences == null) { + jsonWriter.writeNullField("numberOfOccurrences"); + } else { + jsonWriter.writeNumberField("numberOfOccurrences", this.numberOfOccurrences); + } + } + if (updatedProperties.contains("endDateTime")) { + if (this.endDateTime == null) { + jsonWriter.writeNullField("endDateTime"); + } else { + jsonWriter.writeStringField("endDateTime", + this.endDateTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endDateTime)); + } + } + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RecurrenceEnd from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RecurrenceEnd if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the RecurrenceEnd. + */ + @Generated + public static RecurrenceEnd fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RecurrenceEnd deserializedRecurrenceEnd = new RecurrenceEnd(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("numberOfOccurrences".equals(fieldName)) { + deserializedRecurrenceEnd.numberOfOccurrences = reader.getNullable(JsonReader::getInt); + } else if ("endDateTime".equals(fieldName)) { + deserializedRecurrenceEnd.endDateTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedRecurrenceEnd; + }); + } +} diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/RecurrenceStatus.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/RecurrenceStatus.java new file mode 100644 index 000000000000..0ba3c3fd2a00 --- /dev/null +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/RecurrenceStatus.java @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.developer.loadtesting.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; + +/** + * Actual state of the recurrence for the trigger. + */ +@Immutable +public final class RecurrenceStatus implements JsonSerializable { + /* + * The number of occurrences remaining for the trigger. Null if recurrence end has end date instead of number of + * occurrences. + */ + @Generated + private Integer remainingOccurrences; + + /* + * The next three execution times of the trigger. (RFC 3339 literal format) + */ + @Generated + private List nextScheduledDateTimes; + + /** + * Creates an instance of RecurrenceStatus class. + */ + @Generated + private RecurrenceStatus() { + } + + /** + * Get the remainingOccurrences property: The number of occurrences remaining for the trigger. Null if recurrence + * end has end date instead of number of occurrences. + * + * @return the remainingOccurrences value. + */ + @Generated + public Integer getRemainingOccurrences() { + return this.remainingOccurrences; + } + + /** + * Get the nextScheduledDateTimes property: The next three execution times of the trigger. (RFC 3339 literal + * format). + * + * @return the nextScheduledDateTimes value. + */ + @Generated + public List getNextScheduledDateTimes() { + return this.nextScheduledDateTimes; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeNumberField("remainingOccurrences", this.remainingOccurrences); + jsonWriter.writeArrayField("nextScheduledDateTimes", this.nextScheduledDateTimes, (writer, element) -> writer + .writeString(element == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(element))); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RecurrenceStatus from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RecurrenceStatus if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the RecurrenceStatus. + */ + @Generated + public static RecurrenceStatus fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RecurrenceStatus deserializedRecurrenceStatus = new RecurrenceStatus(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("remainingOccurrences".equals(fieldName)) { + deserializedRecurrenceStatus.remainingOccurrences = reader.getNullable(JsonReader::getInt); + } else if ("nextScheduledDateTimes".equals(fieldName)) { + List nextScheduledDateTimes = reader.readArray(reader1 -> reader1 + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); + deserializedRecurrenceStatus.nextScheduledDateTimes = nextScheduledDateTimes; + } else { + reader.skipChildren(); + } + } + + return deserializedRecurrenceStatus; + }); + } +} diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/RecurrenceWithCron.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/RecurrenceWithCron.java new file mode 100644 index 000000000000..4a604d760714 --- /dev/null +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/RecurrenceWithCron.java @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.developer.loadtesting.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.developer.loadtesting.implementation.JsonMergePatchHelper; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.HashSet; +import java.util.Set; + +/** + * Recurrence is set based on cron expression. + */ +@Fluent +public final class RecurrenceWithCron extends Recurrence { + /* + * Frequency of the recurrence. + */ + @Generated + private Frequency frequency = Frequency.CRON; + + /* + * Cron expression for the recurrence. + */ + @Generated + private String cronExpression; + + /** + * Stores updated model property, the value is property name, not serialized name. + */ + @Generated + private final Set updatedProperties = new HashSet<>(); + + /** + * Creates an instance of RecurrenceWithCron class. + */ + @Generated + public RecurrenceWithCron() { + } + + /** + * Get the frequency property: Frequency of the recurrence. + * + * @return the frequency value. + */ + @Generated + @Override + public Frequency getFrequency() { + return this.frequency; + } + + /** + * Get the cronExpression property: Cron expression for the recurrence. + * + * @return the cronExpression value. + */ + @Generated + public String getCronExpression() { + return this.cronExpression; + } + + /** + * Set the cronExpression property: Cron expression for the recurrence. + *

Required when create the resource.

+ * + * @param cronExpression the cronExpression value to set. + * @return the RecurrenceWithCron object itself. + */ + @Generated + public RecurrenceWithCron setCronExpression(String cronExpression) { + this.cronExpression = cronExpression; + this.updatedProperties.add("cronExpression"); + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public RecurrenceWithCron setRecurrenceEnd(RecurrenceEnd recurrenceEnd) { + super.setRecurrenceEnd(recurrenceEnd); + this.updatedProperties.add("recurrenceEnd"); + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + if (JsonMergePatchHelper.getRecurrenceAccessor().isJsonMergePatch(this)) { + return toJsonMergePatch(jsonWriter); + } else { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("recurrenceEnd", getRecurrenceEnd()); + jsonWriter.writeStringField("frequency", this.frequency == null ? null : this.frequency.toString()); + jsonWriter.writeStringField("cronExpression", this.cronExpression); + return jsonWriter.writeEndObject(); + } + } + + @Generated + private JsonWriter toJsonMergePatch(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + if (updatedProperties.contains("recurrenceEnd")) { + if (getRecurrenceEnd() == null) { + jsonWriter.writeNullField("recurrenceEnd"); + } else { + JsonMergePatchHelper.getRecurrenceEndAccessor().prepareModelForJsonMergePatch(getRecurrenceEnd(), true); + jsonWriter.writeJsonField("recurrenceEnd", getRecurrenceEnd()); + JsonMergePatchHelper.getRecurrenceEndAccessor() + .prepareModelForJsonMergePatch(getRecurrenceEnd(), false); + } + } + jsonWriter.writeStringField("frequency", this.frequency.toString()); + if (updatedProperties.contains("cronExpression")) { + if (this.cronExpression == null) { + jsonWriter.writeNullField("cronExpression"); + } else { + jsonWriter.writeStringField("cronExpression", this.cronExpression); + } + } + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of RecurrenceWithCron from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of RecurrenceWithCron if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the RecurrenceWithCron. + */ + @Generated + public static RecurrenceWithCron fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + RecurrenceWithCron deserializedRecurrenceWithCron = new RecurrenceWithCron(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("recurrenceEnd".equals(fieldName)) { + JsonMergePatchHelper.getRecurrenceAccessor() + .setRecurrenceEnd(deserializedRecurrenceWithCron, RecurrenceEnd.fromJson(reader)); + } else if ("frequency".equals(fieldName)) { + deserializedRecurrenceWithCron.frequency = Frequency.fromString(reader.getString()); + } else if ("cronExpression".equals(fieldName)) { + deserializedRecurrenceWithCron.cronExpression = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedRecurrenceWithCron; + }); + } +} diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/RegionalConfiguration.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/RegionalConfiguration.java index 11fbd731d0d8..d2395d658e09 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/RegionalConfiguration.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/RegionalConfiguration.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Fluent; @@ -19,7 +20,6 @@ */ @Fluent public final class RegionalConfiguration implements JsonSerializable { - /* * The number of engine instances to execute load test in specified region. Supported values are in range of 1-400. */ @@ -52,7 +52,6 @@ private void serializeAsJsonMergePatch(boolean jsonMergePatch) { static { JsonMergePatchHelper.setRegionalConfigurationAccessor(new JsonMergePatchHelper.RegionalConfigurationAccessor() { - @Override public RegionalConfiguration prepareModelForJsonMergePatch(RegionalConfiguration model, boolean jsonMergePatchEnabled) { @@ -77,7 +76,7 @@ public RegionalConfiguration() { /** * Get the engineInstances property: The number of engine instances to execute load test in specified region. * Supported values are in range of 1-400. - * + * * @return the engineInstances value. */ @Generated @@ -89,7 +88,7 @@ public int getEngineInstances() { * Set the engineInstances property: The number of engine instances to execute load test in specified region. * Supported values are in range of 1-400. *

Required when create the resource.

- * + * * @param engineInstances the engineInstances value to set. * @return the RegionalConfiguration object itself. */ @@ -106,7 +105,7 @@ public RegionalConfiguration setEngineInstances(int engineInstances) { * example, East US should be passed as "eastus". * The region name must match one of the strings in the "Name" column returned from running the "az account * list-locations -o table" Azure CLI command. - * + * * @return the region value. */ @Generated @@ -121,7 +120,7 @@ public String getRegion() { * The region name must match one of the strings in the "Name" column returned from running the "az account * list-locations -o table" Azure CLI command. *

Required when create the resource.

- * + * * @param region the region value to set. * @return the RegionalConfiguration object itself. */ @@ -166,7 +165,7 @@ private JsonWriter toJsonMergePatch(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of RegionalConfiguration from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of RegionalConfiguration if the JsonReader was pointing to an instance of it, or null if it * was pointing to JSON null. @@ -179,6 +178,7 @@ public static RegionalConfiguration fromJson(JsonReader jsonReader) throws IOExc while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); + if ("engineInstances".equals(fieldName)) { deserializedRegionalConfiguration.engineInstances = reader.getInt(); } else if ("region".equals(fieldName)) { @@ -187,6 +187,7 @@ public static RegionalConfiguration fromJson(JsonReader jsonReader) throws IOExc reader.skipChildren(); } } + return deserializedRegionalConfiguration; }); } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/RequestDataLevel.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/RequestDataLevel.java index 77c5be0f73b6..3eba79f91a9e 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/RequestDataLevel.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/RequestDataLevel.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Generated; @@ -11,7 +12,6 @@ * Request data collection level for test run. */ public final class RequestDataLevel extends ExpandableStringEnum { - /** * No request data will be collected. */ @@ -26,7 +26,7 @@ public final class RequestDataLevel extends ExpandableStringEnum { - /** * Resource is a Azure FunctionApp on Flex Consumption Plan. */ @@ -20,7 +20,7 @@ public final class ResourceKind extends ExpandableStringEnum { /** * Creates a new instance of ResourceKind value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Generated @@ -30,7 +30,7 @@ public ResourceKind() { /** * Creates or finds a ResourceKind from its string representation. - * + * * @param name a name to look for. * @return the corresponding ResourceKind. */ @@ -41,7 +41,7 @@ public static ResourceKind fromString(String name) { /** * Gets known ResourceKind values. - * + * * @return known ResourceKind values. */ @Generated diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/ResourceMetric.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/ResourceMetric.java index 623d05df0d5b..9775d1612846 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/ResourceMetric.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/ResourceMetric.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Fluent; @@ -21,7 +22,6 @@ */ @Fluent public final class ResourceMetric implements JsonSerializable { - /* * Unique name for metric. */ @@ -86,7 +86,6 @@ private void serializeAsJsonMergePatch(boolean jsonMergePatch) { static { JsonMergePatchHelper.setResourceMetricAccessor(new JsonMergePatchHelper.ResourceMetricAccessor() { - @Override public ResourceMetric prepareModelForJsonMergePatch(ResourceMetric model, boolean jsonMergePatchEnabled) { model.serializeAsJsonMergePatch(jsonMergePatchEnabled); @@ -109,7 +108,7 @@ public ResourceMetric() { /** * Get the id property: Unique name for metric. - * + * * @return the id value. */ @Generated @@ -119,7 +118,7 @@ public String getId() { /** * Get the resourceId property: Azure resource id. - * + * * @return the resourceId value. */ @Generated @@ -130,7 +129,7 @@ public String getResourceId() { /** * Set the resourceId property: Azure resource id. *

Required when create the resource.

- * + * * @param resourceId the resourceId value to set. * @return the ResourceMetric object itself. */ @@ -143,7 +142,7 @@ public ResourceMetric setResourceId(String resourceId) { /** * Get the metricNamespace property: Metric name space. - * + * * @return the metricNamespace value. */ @Generated @@ -154,7 +153,7 @@ public String getMetricNamespace() { /** * Set the metricNamespace property: Metric name space. *

Required when create the resource.

- * + * * @param metricNamespace the metricNamespace value to set. * @return the ResourceMetric object itself. */ @@ -167,7 +166,7 @@ public ResourceMetric setMetricNamespace(String metricNamespace) { /** * Get the displayDescription property: Metric description. - * + * * @return the displayDescription value. */ @Generated @@ -177,7 +176,7 @@ public String getDisplayDescription() { /** * Set the displayDescription property: Metric description. - * + * * @param displayDescription the displayDescription value to set. * @return the ResourceMetric object itself. */ @@ -190,7 +189,7 @@ public ResourceMetric setDisplayDescription(String displayDescription) { /** * Get the name property: The invariant value of metric name. - * + * * @return the name value. */ @Generated @@ -201,7 +200,7 @@ public String getName() { /** * Set the name property: The invariant value of metric name. *

Required when create the resource.

- * + * * @param name the name value to set. * @return the ResourceMetric object itself. */ @@ -214,7 +213,7 @@ public ResourceMetric setName(String name) { /** * Get the aggregation property: Metric aggregation. - * + * * @return the aggregation value. */ @Generated @@ -225,7 +224,7 @@ public String getAggregation() { /** * Set the aggregation property: Metric aggregation. *

Required when create the resource.

- * + * * @param aggregation the aggregation value to set. * @return the ResourceMetric object itself. */ @@ -238,7 +237,7 @@ public ResourceMetric setAggregation(String aggregation) { /** * Get the unit property: Metric unit. - * + * * @return the unit value. */ @Generated @@ -248,7 +247,7 @@ public String getUnit() { /** * Set the unit property: Metric unit. - * + * * @param unit the unit value to set. * @return the ResourceMetric object itself. */ @@ -261,7 +260,7 @@ public ResourceMetric setUnit(String unit) { /** * Get the resourceType property: Azure resource type. - * + * * @return the resourceType value. */ @Generated @@ -272,7 +271,7 @@ public String getResourceType() { /** * Set the resourceType property: Azure resource type. *

Required when create the resource.

- * + * * @param resourceType the resourceType value to set. * @return the ResourceMetric object itself. */ @@ -361,7 +360,7 @@ private JsonWriter toJsonMergePatch(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of ResourceMetric from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of ResourceMetric if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. @@ -374,6 +373,7 @@ public static ResourceMetric fromJson(JsonReader jsonReader) throws IOException while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); + if ("id".equals(fieldName)) { deserializedResourceMetric.id = reader.getString(); } else if ("resourceId".equals(fieldName)) { @@ -394,6 +394,7 @@ public static ResourceMetric fromJson(JsonReader jsonReader) throws IOException reader.skipChildren(); } } + return deserializedResourceMetric; }); } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/ScheduleTestsTrigger.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/ScheduleTestsTrigger.java new file mode 100644 index 000000000000..a8dcf0fedb1e --- /dev/null +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/ScheduleTestsTrigger.java @@ -0,0 +1,337 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.developer.loadtesting.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.core.util.CoreUtils; +import com.azure.developer.loadtesting.implementation.JsonMergePatchHelper; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +/** + * ScheduleTestsTrigger model. + */ +@Fluent +public final class ScheduleTestsTrigger extends Trigger { + /* + * The type of the trigger. + */ + @Generated + private TriggerType kind = TriggerType.SCHEDULE_TESTS_TRIGGER; + + /* + * The test id of test to be triggered by this schedule trigger. Currently only one test is supported for a trigger. + */ + @Generated + private List testIds; + + /* + * Start date time of the trigger in UTC timezone. (RFC 3339 literal format) + */ + @Generated + private OffsetDateTime startDateTime; + + /* + * The recurrenceStatus property. + */ + @Generated + private RecurrenceStatus recurrenceStatus; + + /* + * Recurrence details of the trigger. Null if schedule is not recurring. + */ + @Generated + private Recurrence recurrence; + + /** + * Stores updated model property, the value is property name, not serialized name. + */ + @Generated + private final Set updatedProperties = new HashSet<>(); + + /** + * Creates an instance of ScheduleTestsTrigger class. + */ + @Generated + public ScheduleTestsTrigger() { + } + + /** + * Get the kind property: The type of the trigger. + * + * @return the kind value. + */ + @Generated + @Override + public TriggerType getKind() { + return this.kind; + } + + /** + * Get the testIds property: The test id of test to be triggered by this schedule trigger. Currently only one test + * is supported for a trigger. + * + * @return the testIds value. + */ + @Generated + public List getTestIds() { + return this.testIds; + } + + /** + * Set the testIds property: The test id of test to be triggered by this schedule trigger. Currently only one test + * is supported for a trigger. + *

Required when create the resource.

+ * + * @param testIds the testIds value to set. + * @return the ScheduleTestsTrigger object itself. + */ + @Generated + public ScheduleTestsTrigger setTestIds(List testIds) { + this.testIds = testIds; + this.updatedProperties.add("testIds"); + return this; + } + + /** + * Get the startDateTime property: Start date time of the trigger in UTC timezone. (RFC 3339 literal format). + * + * @return the startDateTime value. + */ + @Generated + public OffsetDateTime getStartDateTime() { + return this.startDateTime; + } + + /** + * Set the startDateTime property: Start date time of the trigger in UTC timezone. (RFC 3339 literal format). + * + * @param startDateTime the startDateTime value to set. + * @return the ScheduleTestsTrigger object itself. + */ + @Generated + public ScheduleTestsTrigger setStartDateTime(OffsetDateTime startDateTime) { + this.startDateTime = startDateTime; + this.updatedProperties.add("startDateTime"); + return this; + } + + /** + * Get the recurrenceStatus property: The recurrenceStatus property. + * + * @return the recurrenceStatus value. + */ + @Generated + public RecurrenceStatus getRecurrenceStatus() { + return this.recurrenceStatus; + } + + /** + * Get the recurrence property: Recurrence details of the trigger. Null if schedule is not recurring. + * + * @return the recurrence value. + */ + @Generated + public Recurrence getRecurrence() { + return this.recurrence; + } + + /** + * Set the recurrence property: Recurrence details of the trigger. Null if schedule is not recurring. + * + * @param recurrence the recurrence value to set. + * @return the ScheduleTestsTrigger object itself. + */ + @Generated + public ScheduleTestsTrigger setRecurrence(Recurrence recurrence) { + this.recurrence = recurrence; + this.updatedProperties.add("recurrence"); + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public ScheduleTestsTrigger setDisplayName(String displayName) { + super.setDisplayName(displayName); + this.updatedProperties.add("displayName"); + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public ScheduleTestsTrigger setDescription(String description) { + super.setDescription(description); + this.updatedProperties.add("description"); + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public ScheduleTestsTrigger setState(TriggerState state) { + super.setState(state); + this.updatedProperties.add("state"); + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + if (JsonMergePatchHelper.getTriggerAccessor().isJsonMergePatch(this)) { + return toJsonMergePatch(jsonWriter); + } else { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("displayName", getDisplayName()); + jsonWriter.writeStringField("description", getDescription()); + jsonWriter.writeStringField("state", getState() == null ? null : getState().toString()); + jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString()); + jsonWriter.writeArrayField("testIds", this.testIds, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("startDateTime", + this.startDateTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startDateTime)); + jsonWriter.writeJsonField("recurrence", this.recurrence); + return jsonWriter.writeEndObject(); + } + } + + @Generated + private JsonWriter toJsonMergePatch(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + if (updatedProperties.contains("displayName")) { + if (getDisplayName() == null) { + jsonWriter.writeNullField("displayName"); + } else { + jsonWriter.writeStringField("displayName", getDisplayName()); + } + } + if (updatedProperties.contains("description")) { + if (getDescription() == null) { + jsonWriter.writeNullField("description"); + } else { + jsonWriter.writeStringField("description", getDescription()); + } + } + if (updatedProperties.contains("state")) { + if (getState() == null) { + jsonWriter.writeNullField("state"); + } else { + jsonWriter.writeStringField("state", getState().toString()); + } + } + jsonWriter.writeStringField("kind", this.kind.toString()); + if (updatedProperties.contains("testIds")) { + if (this.testIds == null) { + jsonWriter.writeNullField("testIds"); + } else { + jsonWriter.writeArrayField("testIds", this.testIds, (writer, element) -> writer.writeString(element)); + } + } + if (updatedProperties.contains("startDateTime")) { + if (this.startDateTime == null) { + jsonWriter.writeNullField("startDateTime"); + } else { + jsonWriter.writeStringField("startDateTime", + this.startDateTime == null + ? null + : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startDateTime)); + } + } + if (updatedProperties.contains("recurrence")) { + if (this.recurrence == null) { + jsonWriter.writeNullField("recurrence"); + } else { + JsonMergePatchHelper.getRecurrenceAccessor().prepareModelForJsonMergePatch(this.recurrence, true); + jsonWriter.writeJsonField("recurrence", this.recurrence); + JsonMergePatchHelper.getRecurrenceAccessor().prepareModelForJsonMergePatch(this.recurrence, false); + } + } + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ScheduleTestsTrigger from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ScheduleTestsTrigger if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the ScheduleTestsTrigger. + */ + @Generated + public static ScheduleTestsTrigger fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ScheduleTestsTrigger deserializedScheduleTestsTrigger = new ScheduleTestsTrigger(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("triggerId".equals(fieldName)) { + JsonMergePatchHelper.getTriggerAccessor() + .setTriggerId(deserializedScheduleTestsTrigger, reader.getString()); + } else if ("displayName".equals(fieldName)) { + JsonMergePatchHelper.getTriggerAccessor() + .setDisplayName(deserializedScheduleTestsTrigger, reader.getString()); + } else if ("description".equals(fieldName)) { + JsonMergePatchHelper.getTriggerAccessor() + .setDescription(deserializedScheduleTestsTrigger, reader.getString()); + } else if ("state".equals(fieldName)) { + JsonMergePatchHelper.getTriggerAccessor() + .setState(deserializedScheduleTestsTrigger, TriggerState.fromString(reader.getString())); + } else if ("stateDetails".equals(fieldName)) { + JsonMergePatchHelper.getTriggerAccessor() + .setStateDetails(deserializedScheduleTestsTrigger, StateDetails.fromJson(reader)); + } else if ("createdDateTime".equals(fieldName)) { + JsonMergePatchHelper.getTriggerAccessor() + .setCreatedDateTime(deserializedScheduleTestsTrigger, reader.getNullable( + nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); + } else if ("createdBy".equals(fieldName)) { + JsonMergePatchHelper.getTriggerAccessor() + .setCreatedBy(deserializedScheduleTestsTrigger, reader.getString()); + } else if ("lastModifiedDateTime".equals(fieldName)) { + JsonMergePatchHelper.getTriggerAccessor() + .setLastModifiedDateTime(deserializedScheduleTestsTrigger, reader.getNullable( + nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); + } else if ("lastModifiedBy".equals(fieldName)) { + JsonMergePatchHelper.getTriggerAccessor() + .setLastModifiedBy(deserializedScheduleTestsTrigger, reader.getString()); + } else if ("kind".equals(fieldName)) { + deserializedScheduleTestsTrigger.kind = TriggerType.fromString(reader.getString()); + } else if ("testIds".equals(fieldName)) { + List testIds = reader.readArray(reader1 -> reader1.getString()); + deserializedScheduleTestsTrigger.testIds = testIds; + } else if ("startDateTime".equals(fieldName)) { + deserializedScheduleTestsTrigger.startDateTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("recurrenceStatus".equals(fieldName)) { + deserializedScheduleTestsTrigger.recurrenceStatus = RecurrenceStatus.fromJson(reader); + } else if ("recurrence".equals(fieldName)) { + deserializedScheduleTestsTrigger.recurrence = Recurrence.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedScheduleTestsTrigger; + }); + } +} diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/SecretType.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/SecretType.java index 1448b18151c0..55870cd154f5 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/SecretType.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/SecretType.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Generated; @@ -11,6 +12,11 @@ * Types of secrets supported. */ public final class SecretType extends ExpandableStringEnum { + /** + * If the secret is stored in an Azure Key Vault. + */ + @Generated + public static final SecretType KEY_VAULT_SECRET_URI = fromString("AKV_SECRET_URI"); /** * If the secret value provided as plain text. @@ -20,7 +26,7 @@ public final class SecretType extends ExpandableStringEnum { /** * Creates a new instance of SecretType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Generated @@ -30,7 +36,7 @@ public SecretType() { /** * Creates or finds a SecretType from its string representation. - * + * * @param name a name to look for. * @return the corresponding SecretType. */ @@ -41,17 +47,11 @@ public static SecretType fromString(String name) { /** * Gets known SecretType values. - * + * * @return known SecretType values. */ @Generated public static Collection values() { return values(SecretType.class); } - - /** - * If the secret is stored in an Azure Key Vault. - */ - @Generated - public static final SecretType KEY_VAULT_SECRET_URI = fromString("AKV_SECRET_URI"); } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/StateDetails.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/StateDetails.java new file mode 100644 index 000000000000..90d16d5e0e0a --- /dev/null +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/StateDetails.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.developer.loadtesting.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * State details of the trigger. + */ +@Immutable +public final class StateDetails implements JsonSerializable { + /* + * The error message if the trigger is in disabled state. + */ + @Generated + private String message; + + /** + * Creates an instance of StateDetails class. + */ + @Generated + private StateDetails() { + } + + /** + * Get the message property: The error message if the trigger is in disabled state. + * + * @return the message value. + */ + @Generated + public String getMessage() { + return this.message; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("message", this.message); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of StateDetails from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of StateDetails if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the StateDetails. + */ + @Generated + public static StateDetails fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + StateDetails deserializedStateDetails = new StateDetails(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("message".equals(fieldName)) { + deserializedStateDetails.message = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedStateDetails; + }); + } +} diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TargetResourceConfigurations.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TargetResourceConfigurations.java index 6a26b9658fe9..b69acc753de2 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TargetResourceConfigurations.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TargetResourceConfigurations.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Generated; @@ -19,7 +20,6 @@ */ @Immutable public class TargetResourceConfigurations implements JsonSerializable { - /* * Kind of the resource for which the configurations apply. */ @@ -43,7 +43,6 @@ private void serializeAsJsonMergePatch(boolean jsonMergePatch) { static { JsonMergePatchHelper .setTargetResourceConfigurationsAccessor(new JsonMergePatchHelper.TargetResourceConfigurationsAccessor() { - @Override public TargetResourceConfigurations prepareModelForJsonMergePatch(TargetResourceConfigurations model, boolean jsonMergePatchEnabled) { @@ -67,7 +66,7 @@ public TargetResourceConfigurations() { /** * Get the kind property: Kind of the resource for which the configurations apply. - * + * * @return the kind value. */ @Generated @@ -99,7 +98,7 @@ private JsonWriter toJsonMergePatch(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of TargetResourceConfigurations from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of TargetResourceConfigurations if the JsonReader was pointing to an instance of it, or null * if it was pointing to JSON null. @@ -110,8 +109,7 @@ public static TargetResourceConfigurations fromJson(JsonReader jsonReader) throw return jsonReader.readObject(reader -> { String discriminatorValue = null; try (JsonReader readerToUse = reader.bufferObject()) { - // Prepare for reading - readerToUse.nextToken(); + readerToUse.nextToken(); // Prepare for reading while (readerToUse.nextToken() != JsonToken.END_OBJECT) { String fieldName = readerToUse.getFieldName(); readerToUse.nextToken(); @@ -139,12 +137,14 @@ static TargetResourceConfigurations fromJsonKnownDiscriminator(JsonReader jsonRe while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); + if ("kind".equals(fieldName)) { deserializedTargetResourceConfigurations.kind = ResourceKind.fromString(reader.getString()); } else { reader.skipChildren(); } } + return deserializedTargetResourceConfigurations; }); } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestAppComponents.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestAppComponents.java index 634e2d116931..fa0f92c5c1da 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestAppComponents.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestAppComponents.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Fluent; @@ -22,7 +23,6 @@ */ @Fluent public final class TestAppComponents implements JsonSerializable { - /* * Azure resource collection { resource id (fully qualified resource Id e.g * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}) @@ -77,7 +77,6 @@ private void serializeAsJsonMergePatch(boolean jsonMergePatch) { static { JsonMergePatchHelper.setTestAppComponentsAccessor(new JsonMergePatchHelper.TestAppComponentsAccessor() { - @Override public TestAppComponents prepareModelForJsonMergePatch(TestAppComponents model, boolean jsonMergePatchEnabled) { @@ -103,7 +102,7 @@ public TestAppComponents() { * Get the components property: Azure resource collection { resource id (fully qualified resource Id e.g * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}) * : resource object }. - * + * * @return the components value. */ @Generated @@ -116,7 +115,7 @@ public Map getComponents() { * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}) * : resource object }. *

Required when create the resource.

- * + * * @param components the components value to set. * @return the TestAppComponents object itself. */ @@ -129,7 +128,7 @@ public TestAppComponents setComponents(Map comp /** * Get the testId property: Test identifier. - * + * * @return the testId value. */ @Generated @@ -139,7 +138,7 @@ public String getTestId() { /** * Get the createdDateTime property: The creation datetime(RFC 3339 literal format). - * + * * @return the createdDateTime value. */ @Generated @@ -149,7 +148,7 @@ public OffsetDateTime getCreatedDateTime() { /** * Get the createdBy property: The user that created. - * + * * @return the createdBy value. */ @Generated @@ -159,7 +158,7 @@ public String getCreatedBy() { /** * Get the lastModifiedDateTime property: The last Modified datetime(RFC 3339 literal format). - * + * * @return the lastModifiedDateTime value. */ @Generated @@ -169,7 +168,7 @@ public OffsetDateTime getLastModifiedDateTime() { /** * Get the lastModifiedBy property: The user that last modified. - * + * * @return the lastModifiedBy value. */ @Generated @@ -217,7 +216,7 @@ private JsonWriter toJsonMergePatch(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of TestAppComponents from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of TestAppComponents if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. @@ -230,6 +229,7 @@ public static TestAppComponents fromJson(JsonReader jsonReader) throws IOExcepti while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); + if ("components".equals(fieldName)) { Map components = reader.readMap(reader1 -> LoadTestingAppComponent.fromJson(reader1)); @@ -250,6 +250,7 @@ public static TestAppComponents fromJson(JsonReader jsonReader) throws IOExcepti reader.skipChildren(); } } + return deserializedTestAppComponents; }); } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestCertificate.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestCertificate.java index a597f0fa16de..928bcb7ed6b3 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestCertificate.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestCertificate.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Fluent; @@ -19,7 +20,6 @@ */ @Fluent public final class TestCertificate implements JsonSerializable { - /* * The value of the certificate for respective type */ @@ -54,7 +54,6 @@ private void serializeAsJsonMergePatch(boolean jsonMergePatch) { static { JsonMergePatchHelper.setTestCertificateAccessor(new JsonMergePatchHelper.TestCertificateAccessor() { - @Override public TestCertificate prepareModelForJsonMergePatch(TestCertificate model, boolean jsonMergePatchEnabled) { model.serializeAsJsonMergePatch(jsonMergePatchEnabled); @@ -77,7 +76,7 @@ public TestCertificate() { /** * Get the value property: The value of the certificate for respective type. - * + * * @return the value value. */ @Generated @@ -87,7 +86,7 @@ public String getValue() { /** * Set the value property: The value of the certificate for respective type. - * + * * @param value the value value to set. * @return the TestCertificate object itself. */ @@ -100,7 +99,7 @@ public TestCertificate setValue(String value) { /** * Get the type property: Type of certificate. - * + * * @return the type value. */ @Generated @@ -110,7 +109,7 @@ public CertificateType getType() { /** * Set the type property: Type of certificate. - * + * * @param type the type value to set. * @return the TestCertificate object itself. */ @@ -123,7 +122,7 @@ public TestCertificate setType(CertificateType type) { /** * Get the name property: Name of the certificate. - * + * * @return the name value. */ @Generated @@ -133,7 +132,7 @@ public String getName() { /** * Set the name property: Name of the certificate. - * + * * @param name the name value to set. * @return the TestCertificate object itself. */ @@ -190,7 +189,7 @@ private JsonWriter toJsonMergePatch(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of TestCertificate from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of TestCertificate if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. @@ -203,6 +202,7 @@ public static TestCertificate fromJson(JsonReader jsonReader) throws IOException while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); + if ("value".equals(fieldName)) { deserializedTestCertificate.value = reader.getString(); } else if ("type".equals(fieldName)) { @@ -213,6 +213,7 @@ public static TestCertificate fromJson(JsonReader jsonReader) throws IOException reader.skipChildren(); } } + return deserializedTestCertificate; }); } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestFileInfo.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestFileInfo.java index 6ed442792f82..6a435fe1945a 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestFileInfo.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestFileInfo.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Generated; @@ -18,7 +19,6 @@ */ @Immutable public final class TestFileInfo implements JsonSerializable { - /* * Name of the file. */ @@ -37,6 +37,12 @@ public final class TestFileInfo implements JsonSerializable { @Generated private LoadTestingFileType fileType; + /* + * Expiry time of the file (RFC 3339 literal format) + */ + @Generated + private OffsetDateTime expiresOn; + /* * Validation status of the file */ @@ -58,7 +64,7 @@ private TestFileInfo() { /** * Get the fileName property: Name of the file. - * + * * @return the fileName value. */ @Generated @@ -68,7 +74,7 @@ public String getFileName() { /** * Get the url property: File URL. - * + * * @return the url value. */ @Generated @@ -78,7 +84,7 @@ public String getUrl() { /** * Get the fileType property: File type. - * + * * @return the fileType value. */ @Generated @@ -86,9 +92,19 @@ public LoadTestingFileType getFileType() { return this.fileType; } + /** + * Get the expiresOn property: Expiry time of the file (RFC 3339 literal format). + * + * @return the expiresOn value. + */ + @Generated + public OffsetDateTime getExpiresOn() { + return this.expiresOn; + } + /** * Get the validationStatus property: Validation status of the file. - * + * * @return the validationStatus value. */ @Generated @@ -98,7 +114,7 @@ public FileValidationStatus getValidationStatus() { /** * Get the validationFailureDetails property: Validation failure error details. - * + * * @return the validationFailureDetails value. */ @Generated @@ -118,7 +134,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of TestFileInfo from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of TestFileInfo if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. @@ -132,6 +148,7 @@ public static TestFileInfo fromJson(JsonReader jsonReader) throws IOException { while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); + if ("fileName".equals(fieldName)) { deserializedTestFileInfo.fileName = reader.getString(); } else if ("url".equals(fieldName)) { @@ -149,23 +166,8 @@ public static TestFileInfo fromJson(JsonReader jsonReader) throws IOException { reader.skipChildren(); } } + return deserializedTestFileInfo; }); } - - /* - * Expiry time of the file (RFC 3339 literal format) - */ - @Generated - private OffsetDateTime expiresOn; - - /** - * Get the expiresOn property: Expiry time of the file (RFC 3339 literal format). - * - * @return the expiresOn value. - */ - @Generated - public OffsetDateTime getExpiresOn() { - return this.expiresOn; - } } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestInputArtifacts.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestInputArtifacts.java index 470f8816e3e6..dd65efe03301 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestInputArtifacts.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestInputArtifacts.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Generated; @@ -17,7 +18,6 @@ */ @Immutable public final class TestInputArtifacts implements JsonSerializable { - /* * The load test YAML file that contains the the test configuration */ @@ -30,6 +30,12 @@ public final class TestInputArtifacts implements JsonSerializable { + /* + * Enable or disable AI based insights on Test Run Errors. + */ + @Generated + private Boolean enableAIErrorInsights; + + /** + * Stores updated model property, the value is property name, not serialized name. + */ + @Generated + private final Set updatedProperties = new HashSet<>(); + + @Generated + private boolean jsonMergePatch; + + @Generated + private void serializeAsJsonMergePatch(boolean jsonMergePatch) { + this.jsonMergePatch = jsonMergePatch; + } + + static { + JsonMergePatchHelper.setTestPreferencesAccessor(new JsonMergePatchHelper.TestPreferencesAccessor() { + @Override + public TestPreferences prepareModelForJsonMergePatch(TestPreferences model, boolean jsonMergePatchEnabled) { + model.serializeAsJsonMergePatch(jsonMergePatchEnabled); + return model; + } + + @Override + public boolean isJsonMergePatch(TestPreferences model) { + return model.jsonMergePatch; + } + }); + } + + /** + * Creates an instance of TestPreferences class. + */ + @Generated + public TestPreferences() { + } + + /** + * Get the enableAIErrorInsights property: Enable or disable AI based insights on Test Run Errors. + * + * @return the enableAIErrorInsights value. + */ + @Generated + public Boolean isEnableAIErrorInsights() { + return this.enableAIErrorInsights; + } + + /** + * Set the enableAIErrorInsights property: Enable or disable AI based insights on Test Run Errors. + * + * @param enableAIErrorInsights the enableAIErrorInsights value to set. + * @return the TestPreferences object itself. + */ + @Generated + public TestPreferences setEnableAIErrorInsights(Boolean enableAIErrorInsights) { + this.enableAIErrorInsights = enableAIErrorInsights; + this.updatedProperties.add("enableAIErrorInsights"); + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + if (jsonMergePatch) { + return toJsonMergePatch(jsonWriter); + } else { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enableAIErrorInsights", this.enableAIErrorInsights); + return jsonWriter.writeEndObject(); + } + } + + @Generated + private JsonWriter toJsonMergePatch(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + if (updatedProperties.contains("enableAIErrorInsights")) { + if (this.enableAIErrorInsights == null) { + jsonWriter.writeNullField("enableAIErrorInsights"); + } else { + jsonWriter.writeBooleanField("enableAIErrorInsights", this.enableAIErrorInsights); + } + } + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TestPreferences from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TestPreferences if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the TestPreferences. + */ + @Generated + public static TestPreferences fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TestPreferences deserializedTestPreferences = new TestPreferences(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enableAIErrorInsights".equals(fieldName)) { + deserializedTestPreferences.enableAIErrorInsights = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedTestPreferences; + }); + } +} diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestProfile.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestProfile.java index bff8403fea49..23b32035faad 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestProfile.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestProfile.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Fluent; @@ -18,13 +19,12 @@ /** * Test Profile Model. - * + * * The Test Profile Model. A Test Profile resource enables you to set up a test profile which contains various * configurations for a supported resource type and a load test to execute on that resource. */ @Fluent public final class TestProfile implements JsonSerializable { - /* * Unique identifier for the test profile, must contain only lower-case alphabetic, numeric, underscore or hyphen * characters. @@ -104,7 +104,6 @@ private void serializeAsJsonMergePatch(boolean jsonMergePatch) { static { JsonMergePatchHelper.setTestProfileAccessor(new JsonMergePatchHelper.TestProfileAccessor() { - @Override public TestProfile prepareModelForJsonMergePatch(TestProfile model, boolean jsonMergePatchEnabled) { model.serializeAsJsonMergePatch(jsonMergePatchEnabled); @@ -128,7 +127,7 @@ public TestProfile() { /** * Get the testProfileId property: Unique identifier for the test profile, must contain only lower-case alphabetic, * numeric, underscore or hyphen characters. - * + * * @return the testProfileId value. */ @Generated @@ -138,7 +137,7 @@ public String getTestProfileId() { /** * Get the displayName property: Display name of the test profile. - * + * * @return the displayName value. */ @Generated @@ -148,7 +147,7 @@ public String getDisplayName() { /** * Set the displayName property: Display name of the test profile. - * + * * @param displayName the displayName value to set. * @return the TestProfile object itself. */ @@ -161,7 +160,7 @@ public TestProfile setDisplayName(String displayName) { /** * Get the description property: Description for the test profile. - * + * * @return the description value. */ @Generated @@ -171,7 +170,7 @@ public String getDescription() { /** * Set the description property: Description for the test profile. - * + * * @param description the description value to set. * @return the TestProfile object itself. */ @@ -185,7 +184,7 @@ public TestProfile setDescription(String description) { /** * Get the testId property: Associated test ID for the test profile. This property is required for creating a Test * Profile and it's not allowed to be updated. - * + * * @return the testId value. */ @Generated @@ -196,7 +195,7 @@ public String getTestId() { /** * Set the testId property: Associated test ID for the test profile. This property is required for creating a Test * Profile and it's not allowed to be updated. - * + * * @param testId the testId value to set. * @return the TestProfile object itself. */ @@ -210,7 +209,7 @@ public TestProfile setTestId(String testId) { /** * Get the targetResourceId property: Target resource ID on which the test profile is created. This property is * required for creating a Test Profile and it's not allowed to be updated. - * + * * @return the targetResourceId value. */ @Generated @@ -221,7 +220,7 @@ public String getTargetResourceId() { /** * Set the targetResourceId property: Target resource ID on which the test profile is created. This property is * required for creating a Test Profile and it's not allowed to be updated. - * + * * @param targetResourceId the targetResourceId value to set. * @return the TestProfile object itself. */ @@ -235,7 +234,7 @@ public TestProfile setTargetResourceId(String targetResourceId) { /** * Get the targetResourceConfigurations property: Configurations of the target resource on which testing would be * done. - * + * * @return the targetResourceConfigurations value. */ @Generated @@ -246,7 +245,7 @@ public TargetResourceConfigurations getTargetResourceConfigurations() { /** * Set the targetResourceConfigurations property: Configurations of the target resource on which testing would be * done. - * + * * @param targetResourceConfigurations the targetResourceConfigurations value to set. * @return the TestProfile object itself. */ @@ -259,7 +258,7 @@ public TestProfile setTargetResourceConfigurations(TargetResourceConfigurations /** * Get the createdDateTime property: The creation datetime(RFC 3339 literal format). - * + * * @return the createdDateTime value. */ @Generated @@ -269,7 +268,7 @@ public OffsetDateTime getCreatedDateTime() { /** * Get the createdBy property: The user that created. - * + * * @return the createdBy value. */ @Generated @@ -279,7 +278,7 @@ public String getCreatedBy() { /** * Get the lastModifiedDateTime property: The last Modified datetime(RFC 3339 literal format). - * + * * @return the lastModifiedDateTime value. */ @Generated @@ -289,7 +288,7 @@ public OffsetDateTime getLastModifiedDateTime() { /** * Get the lastModifiedBy property: The user that last modified. - * + * * @return the lastModifiedBy value. */ @Generated @@ -363,7 +362,7 @@ private JsonWriter toJsonMergePatch(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of TestProfile from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of TestProfile if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. @@ -377,6 +376,7 @@ public static TestProfile fromJson(JsonReader jsonReader) throws IOException { while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); + if ("testProfileId".equals(fieldName)) { deserializedTestProfile.testProfileId = reader.getString(); } else if ("displayName".equals(fieldName)) { @@ -404,6 +404,7 @@ public static TestProfile fromJson(JsonReader jsonReader) throws IOException { reader.skipChildren(); } } + return deserializedTestProfile; }); } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestProfileRun.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestProfileRun.java index a904f2778085..ffe3e242d5b9 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestProfileRun.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestProfileRun.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Fluent; @@ -20,13 +21,12 @@ /** * Test Profile Run model. - * + * * The Test Profile Run Model. Test Profile Run resource enables you to instantiate an already created test profile and * run load tests to get recommendations on the optimal configuration for the target resource. */ @Fluent public final class TestProfileRun implements JsonSerializable { - /* * Unique identifier for the test profile run, must contain only lower-case alphabetic, numeric, underscore or * hyphen characters. @@ -148,7 +148,6 @@ private void serializeAsJsonMergePatch(boolean jsonMergePatch) { static { JsonMergePatchHelper.setTestProfileRunAccessor(new JsonMergePatchHelper.TestProfileRunAccessor() { - @Override public TestProfileRun prepareModelForJsonMergePatch(TestProfileRun model, boolean jsonMergePatchEnabled) { model.serializeAsJsonMergePatch(jsonMergePatchEnabled); @@ -172,7 +171,7 @@ public TestProfileRun() { /** * Get the testProfileRunId property: Unique identifier for the test profile run, must contain only lower-case * alphabetic, numeric, underscore or hyphen characters. - * + * * @return the testProfileRunId value. */ @Generated @@ -182,7 +181,7 @@ public String getTestProfileRunId() { /** * Get the displayName property: Display name for the test profile run. - * + * * @return the displayName value. */ @Generated @@ -192,7 +191,7 @@ public String getDisplayName() { /** * Set the displayName property: Display name for the test profile run. - * + * * @param displayName the displayName value to set. * @return the TestProfileRun object itself. */ @@ -205,7 +204,7 @@ public TestProfileRun setDisplayName(String displayName) { /** * Get the description property: The test profile run description. - * + * * @return the description value. */ @Generated @@ -215,7 +214,7 @@ public String getDescription() { /** * Set the description property: The test profile run description. - * + * * @param description the description value to set. * @return the TestProfileRun object itself. */ @@ -229,7 +228,7 @@ public TestProfileRun setDescription(String description) { /** * Get the testProfileId property: Associated test profile ID for the test profile run. This is required to create a * test profile run and can't be updated. - * + * * @return the testProfileId value. */ @Generated @@ -240,7 +239,7 @@ public String getTestProfileId() { /** * Set the testProfileId property: Associated test profile ID for the test profile run. This is required to create a * test profile run and can't be updated. - * + * * @param testProfileId the testProfileId value to set. * @return the TestProfileRun object itself. */ @@ -253,7 +252,7 @@ public TestProfileRun setTestProfileId(String testProfileId) { /** * Get the targetResourceId property: Target resource ID on which the test profile run is created. - * + * * @return the targetResourceId value. */ @Generated @@ -264,7 +263,7 @@ public String getTargetResourceId() { /** * Get the targetResourceConfigurations property: Configurations of the target resource on which the test profile * ran. - * + * * @return the targetResourceConfigurations value. */ @Generated @@ -274,7 +273,7 @@ public TargetResourceConfigurations getTargetResourceConfigurations() { /** * Get the status property: The test profile run status. - * + * * @return the status value. */ @Generated @@ -285,7 +284,7 @@ public TestProfileRunStatus getStatus() { /** * Get the errorDetails property: Error details if there is any failure in test profile run. These errors are * specific to the Test Profile Run. - * + * * @return the errorDetails value. */ @Generated @@ -295,7 +294,7 @@ public List getErrorDetails() { /** * Get the startDateTime property: The test profile run start DateTime(RFC 3339 literal format). - * + * * @return the startDateTime value. */ @Generated @@ -305,7 +304,7 @@ public OffsetDateTime getStartDateTime() { /** * Get the endDateTime property: The test profile run end DateTime(RFC 3339 literal format). - * + * * @return the endDateTime value. */ @Generated @@ -315,7 +314,7 @@ public OffsetDateTime getEndDateTime() { /** * Get the durationInSeconds property: Test profile run duration in seconds. - * + * * @return the durationInSeconds value. */ @Generated @@ -326,7 +325,7 @@ public Long getDurationInSeconds() { /** * Get the testRunDetails property: Details of the test runs ran as part of the test profile run. * Key is the testRunId of the corresponding testRun. - * + * * @return the testRunDetails value. */ @Generated @@ -336,7 +335,7 @@ public Map getTestRunDetails() { /** * Get the recommendations property: Recommendations provided based on a successful test profile run. - * + * * @return the recommendations value. */ @Generated @@ -346,7 +345,7 @@ public List getRecommendations() { /** * Get the createdDateTime property: The creation datetime(RFC 3339 literal format). - * + * * @return the createdDateTime value. */ @Generated @@ -356,7 +355,7 @@ public OffsetDateTime getCreatedDateTime() { /** * Get the createdBy property: The user that created. - * + * * @return the createdBy value. */ @Generated @@ -366,7 +365,7 @@ public String getCreatedBy() { /** * Get the lastModifiedDateTime property: The last Modified datetime(RFC 3339 literal format). - * + * * @return the lastModifiedDateTime value. */ @Generated @@ -376,7 +375,7 @@ public OffsetDateTime getLastModifiedDateTime() { /** * Get the lastModifiedBy property: The user that last modified. - * + * * @return the lastModifiedBy value. */ @Generated @@ -430,7 +429,7 @@ private JsonWriter toJsonMergePatch(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of TestProfileRun from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of TestProfileRun if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. @@ -444,6 +443,7 @@ public static TestProfileRun fromJson(JsonReader jsonReader) throws IOException while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); + if ("testProfileRunId".equals(fieldName)) { deserializedTestProfileRun.testProfileRunId = reader.getString(); } else if ("displayName".equals(fieldName)) { @@ -492,6 +492,7 @@ public static TestProfileRun fromJson(JsonReader jsonReader) throws IOException reader.skipChildren(); } } + return deserializedTestProfileRun; }); } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestProfileRunRecommendation.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestProfileRunRecommendation.java index 8ce2ae18e7aa..c4c91ed107dc 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestProfileRunRecommendation.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestProfileRunRecommendation.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Generated; @@ -17,7 +18,6 @@ */ @Immutable public final class TestProfileRunRecommendation implements JsonSerializable { - /* * Category of the recommendation. */ @@ -33,7 +33,7 @@ public final class TestProfileRunRecommendation implements JsonSerializable { - /** * Test profile run request is accepted. */ @Generated public static final TestProfileRunStatus ACCEPTED = fromString("ACCEPTED"); + /** + * Test profile run is not yet started. + */ + @Generated + public static final TestProfileRunStatus NOT_STARTED = fromString("NOTSTARTED"); + /** * Test profile run has started executing. */ @@ -50,7 +56,7 @@ public final class TestProfileRunStatus extends ExpandableStringEnum values() { return values(TestProfileRunStatus.class); } - - /** - * Test profile run is not yet started. - */ - @Generated - public static final TestProfileRunStatus NOT_STARTED = fromString("NOTSTARTED"); } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestRunAppComponents.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestRunAppComponents.java index 98739712b6b1..27bba56fa9f1 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestRunAppComponents.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestRunAppComponents.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Fluent; @@ -22,7 +23,6 @@ */ @Fluent public final class TestRunAppComponents implements JsonSerializable { - /* * Azure resource collection { resource id (fully qualified resource Id e.g * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}) @@ -77,7 +77,6 @@ private void serializeAsJsonMergePatch(boolean jsonMergePatch) { static { JsonMergePatchHelper.setTestRunAppComponentsAccessor(new JsonMergePatchHelper.TestRunAppComponentsAccessor() { - @Override public TestRunAppComponents prepareModelForJsonMergePatch(TestRunAppComponents model, boolean jsonMergePatchEnabled) { @@ -103,7 +102,7 @@ public TestRunAppComponents() { * Get the components property: Azure resource collection { resource id (fully qualified resource Id e.g * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}) * : resource object }. - * + * * @return the components value. */ @Generated @@ -116,7 +115,7 @@ public Map getComponents() { * subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}) * : resource object }. *

Required when create the resource.

- * + * * @param components the components value to set. * @return the TestRunAppComponents object itself. */ @@ -129,7 +128,7 @@ public TestRunAppComponents setComponents(Map c /** * Get the testRunId property: Test run identifier. - * + * * @return the testRunId value. */ @Generated @@ -139,7 +138,7 @@ public String getTestRunId() { /** * Get the createdDateTime property: The creation datetime(RFC 3339 literal format). - * + * * @return the createdDateTime value. */ @Generated @@ -149,7 +148,7 @@ public OffsetDateTime getCreatedDateTime() { /** * Get the createdBy property: The user that created. - * + * * @return the createdBy value. */ @Generated @@ -159,7 +158,7 @@ public String getCreatedBy() { /** * Get the lastModifiedDateTime property: The last Modified datetime(RFC 3339 literal format). - * + * * @return the lastModifiedDateTime value. */ @Generated @@ -169,7 +168,7 @@ public OffsetDateTime getLastModifiedDateTime() { /** * Get the lastModifiedBy property: The user that last modified. - * + * * @return the lastModifiedBy value. */ @Generated @@ -217,7 +216,7 @@ private JsonWriter toJsonMergePatch(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of TestRunAppComponents from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of TestRunAppComponents if the JsonReader was pointing to an instance of it, or null if it * was pointing to JSON null. @@ -230,6 +229,7 @@ public static TestRunAppComponents fromJson(JsonReader jsonReader) throws IOExce while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); + if ("components".equals(fieldName)) { Map components = reader.readMap(reader1 -> LoadTestingAppComponent.fromJson(reader1)); @@ -250,6 +250,7 @@ public static TestRunAppComponents fromJson(JsonReader jsonReader) throws IOExce reader.skipChildren(); } } + return deserializedTestRunAppComponents; }); } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestRunArtifacts.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestRunArtifacts.java index 475406f11f13..c9a65870dc73 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestRunArtifacts.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestRunArtifacts.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Generated; @@ -16,7 +17,6 @@ */ @Immutable public final class TestRunArtifacts implements JsonSerializable { - /* * The input artifacts for the test run. */ @@ -38,7 +38,7 @@ private TestRunArtifacts() { /** * Get the inputArtifacts property: The input artifacts for the test run. - * + * * @return the inputArtifacts value. */ @Generated @@ -48,7 +48,7 @@ public TestRunInputArtifacts getInputArtifacts() { /** * Get the outputArtifacts property: The output artifacts for the test run. - * + * * @return the outputArtifacts value. */ @Generated @@ -69,7 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of TestRunArtifacts from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of TestRunArtifacts if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. @@ -82,6 +82,7 @@ public static TestRunArtifacts fromJson(JsonReader jsonReader) throws IOExceptio while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); + if ("inputArtifacts".equals(fieldName)) { deserializedTestRunArtifacts.inputArtifacts = TestRunInputArtifacts.fromJson(reader); } else if ("outputArtifacts".equals(fieldName)) { @@ -90,6 +91,7 @@ public static TestRunArtifacts fromJson(JsonReader jsonReader) throws IOExceptio reader.skipChildren(); } } + return deserializedTestRunArtifacts; }); } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestRunDetail.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestRunDetail.java index 1b6f13255d61..d3f9c6d3e57e 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestRunDetail.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestRunDetail.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Generated; @@ -17,7 +18,6 @@ */ @Immutable public final class TestRunDetail implements JsonSerializable { - /* * Status of the test run. */ @@ -36,9 +36,23 @@ public final class TestRunDetail implements JsonSerializable { @Generated private final Map properties; + /** + * Creates an instance of TestRunDetail class. + * + * @param status the status value to set. + * @param configurationId the configurationId value to set. + * @param properties the properties value to set. + */ + @Generated + private TestRunDetail(TestRunStatus status, String configurationId, Map properties) { + this.status = status; + this.configurationId = configurationId; + this.properties = properties; + } + /** * Get the status property: Status of the test run. - * + * * @return the status value. */ @Generated @@ -48,7 +62,7 @@ public TestRunStatus getStatus() { /** * Get the configurationId property: ID of the configuration on which the test ran. - * + * * @return the configurationId value. */ @Generated @@ -58,7 +72,7 @@ public String getConfigurationId() { /** * Get the properties property: Key value pair of extra properties associated with the test run. - * + * * @return the properties value. */ @Generated @@ -81,7 +95,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of TestRunDetail from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of TestRunDetail if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. @@ -97,6 +111,7 @@ public static TestRunDetail fromJson(JsonReader jsonReader) throws IOException { while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); + if ("status".equals(fieldName)) { status = TestRunStatus.fromString(reader.getString()); } else if ("configurationId".equals(fieldName)) { @@ -110,18 +125,4 @@ public static TestRunDetail fromJson(JsonReader jsonReader) throws IOException { return new TestRunDetail(status, configurationId, properties); }); } - - /** - * Creates an instance of TestRunDetail class. - * - * @param status the status value to set. - * @param configurationId the configurationId value to set. - * @param properties the properties value to set. - */ - @Generated - private TestRunDetail(TestRunStatus status, String configurationId, Map properties) { - this.status = status; - this.configurationId = configurationId; - this.properties = properties; - } } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestRunEndedEventCondition.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestRunEndedEventCondition.java new file mode 100644 index 000000000000..2ed8d61249cc --- /dev/null +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestRunEndedEventCondition.java @@ -0,0 +1,192 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.developer.loadtesting.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.developer.loadtesting.implementation.JsonMergePatchHelper; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +/** + * TestRunEnded Event condition. + */ +@Fluent +public final class TestRunEndedEventCondition implements JsonSerializable { + /* + * The test run statuses to send notification for. + */ + @Generated + private List testRunStatuses; + + /* + * The test run results to send notification for. + */ + @Generated + private List testRunResults; + + /** + * Stores updated model property, the value is property name, not serialized name. + */ + @Generated + private final Set updatedProperties = new HashSet<>(); + + @Generated + private boolean jsonMergePatch; + + @Generated + private void serializeAsJsonMergePatch(boolean jsonMergePatch) { + this.jsonMergePatch = jsonMergePatch; + } + + static { + JsonMergePatchHelper + .setTestRunEndedEventConditionAccessor(new JsonMergePatchHelper.TestRunEndedEventConditionAccessor() { + @Override + public TestRunEndedEventCondition prepareModelForJsonMergePatch(TestRunEndedEventCondition model, + boolean jsonMergePatchEnabled) { + model.serializeAsJsonMergePatch(jsonMergePatchEnabled); + return model; + } + + @Override + public boolean isJsonMergePatch(TestRunEndedEventCondition model) { + return model.jsonMergePatch; + } + }); + } + + /** + * Creates an instance of TestRunEndedEventCondition class. + */ + @Generated + public TestRunEndedEventCondition() { + } + + /** + * Get the testRunStatuses property: The test run statuses to send notification for. + * + * @return the testRunStatuses value. + */ + @Generated + public List getTestRunStatuses() { + return this.testRunStatuses; + } + + /** + * Set the testRunStatuses property: The test run statuses to send notification for. + * + * @param testRunStatuses the testRunStatuses value to set. + * @return the TestRunEndedEventCondition object itself. + */ + @Generated + public TestRunEndedEventCondition setTestRunStatuses(List testRunStatuses) { + this.testRunStatuses = testRunStatuses; + this.updatedProperties.add("testRunStatuses"); + return this; + } + + /** + * Get the testRunResults property: The test run results to send notification for. + * + * @return the testRunResults value. + */ + @Generated + public List getTestRunResults() { + return this.testRunResults; + } + + /** + * Set the testRunResults property: The test run results to send notification for. + * + * @param testRunResults the testRunResults value to set. + * @return the TestRunEndedEventCondition object itself. + */ + @Generated + public TestRunEndedEventCondition setTestRunResults(List testRunResults) { + this.testRunResults = testRunResults; + this.updatedProperties.add("testRunResults"); + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + if (jsonMergePatch) { + return toJsonMergePatch(jsonWriter); + } else { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("testRunStatuses", this.testRunStatuses, + (writer, element) -> writer.writeString(element == null ? null : element.toString())); + jsonWriter.writeArrayField("testRunResults", this.testRunResults, + (writer, element) -> writer.writeString(element == null ? null : element.toString())); + return jsonWriter.writeEndObject(); + } + } + + @Generated + private JsonWriter toJsonMergePatch(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + if (updatedProperties.contains("testRunStatuses")) { + if (this.testRunStatuses == null) { + jsonWriter.writeNullField("testRunStatuses"); + } else { + jsonWriter.writeArrayField("testRunStatuses", this.testRunStatuses, + (writer, element) -> writer.writeString(element.toString())); + } + } + if (updatedProperties.contains("testRunResults")) { + if (this.testRunResults == null) { + jsonWriter.writeNullField("testRunResults"); + } else { + jsonWriter.writeArrayField("testRunResults", this.testRunResults, + (writer, element) -> writer.writeString(element.toString())); + } + } + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TestRunEndedEventCondition from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TestRunEndedEventCondition if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the TestRunEndedEventCondition. + */ + @Generated + public static TestRunEndedEventCondition fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TestRunEndedEventCondition deserializedTestRunEndedEventCondition = new TestRunEndedEventCondition(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("testRunStatuses".equals(fieldName)) { + List testRunStatuses + = reader.readArray(reader1 -> TestRunStatus.fromString(reader1.getString())); + deserializedTestRunEndedEventCondition.testRunStatuses = testRunStatuses; + } else if ("testRunResults".equals(fieldName)) { + List testRunResults + = reader.readArray(reader1 -> PassFailTestResult.fromString(reader1.getString())); + deserializedTestRunEndedEventCondition.testRunResults = testRunResults; + } else { + reader.skipChildren(); + } + } + + return deserializedTestRunEndedEventCondition; + }); + } +} diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestRunEndedNotificationEventFilter.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestRunEndedNotificationEventFilter.java new file mode 100644 index 000000000000..a851a1f9ad2a --- /dev/null +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestRunEndedNotificationEventFilter.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.developer.loadtesting.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.developer.loadtesting.implementation.JsonMergePatchHelper; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.HashSet; +import java.util.Set; + +/** + * The notification event filter when the event type is TestRunEnded and scope is Tests. + */ +@Fluent +public final class TestRunEndedNotificationEventFilter extends TestsNotificationEventFilter { + /* + * The event type + */ + @Generated + private NotificationEventType kind = NotificationEventType.TEST_RUN_ENDED; + + /* + * Event filtering condition. + */ + @Generated + private TestRunEndedEventCondition condition; + + /** + * Stores updated model property, the value is property name, not serialized name. + */ + @Generated + private final Set updatedProperties = new HashSet<>(); + + /** + * Creates an instance of TestRunEndedNotificationEventFilter class. + */ + @Generated + public TestRunEndedNotificationEventFilter() { + } + + /** + * Get the kind property: The event type. + * + * @return the kind value. + */ + @Generated + @Override + public NotificationEventType getKind() { + return this.kind; + } + + /** + * Get the condition property: Event filtering condition. + * + * @return the condition value. + */ + @Generated + public TestRunEndedEventCondition getCondition() { + return this.condition; + } + + /** + * Set the condition property: Event filtering condition. + * + * @param condition the condition value to set. + * @return the TestRunEndedNotificationEventFilter object itself. + */ + @Generated + public TestRunEndedNotificationEventFilter setCondition(TestRunEndedEventCondition condition) { + this.condition = condition; + this.updatedProperties.add("condition"); + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + if (JsonMergePatchHelper.getTestsNotificationEventFilterAccessor().isJsonMergePatch(this)) { + return toJsonMergePatch(jsonWriter); + } else { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString()); + jsonWriter.writeJsonField("condition", this.condition); + return jsonWriter.writeEndObject(); + } + } + + @Generated + private JsonWriter toJsonMergePatch(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kind", this.kind.toString()); + if (updatedProperties.contains("condition")) { + if (this.condition == null) { + jsonWriter.writeNullField("condition"); + } else { + JsonMergePatchHelper.getTestRunEndedEventConditionAccessor() + .prepareModelForJsonMergePatch(this.condition, true); + jsonWriter.writeJsonField("condition", this.condition); + JsonMergePatchHelper.getTestRunEndedEventConditionAccessor() + .prepareModelForJsonMergePatch(this.condition, false); + } + } + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TestRunEndedNotificationEventFilter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TestRunEndedNotificationEventFilter if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the TestRunEndedNotificationEventFilter. + */ + @Generated + public static TestRunEndedNotificationEventFilter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TestRunEndedNotificationEventFilter deserializedTestRunEndedNotificationEventFilter + = new TestRunEndedNotificationEventFilter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("kind".equals(fieldName)) { + deserializedTestRunEndedNotificationEventFilter.kind + = NotificationEventType.fromString(reader.getString()); + } else if ("condition".equals(fieldName)) { + deserializedTestRunEndedNotificationEventFilter.condition + = TestRunEndedEventCondition.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedTestRunEndedNotificationEventFilter; + }); + } +} diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestRunFileInfo.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestRunFileInfo.java index 38976fdb8500..a41cc481796b 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestRunFileInfo.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestRunFileInfo.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Generated; @@ -18,7 +19,6 @@ */ @Immutable public final class TestRunFileInfo implements JsonSerializable { - /* * Name of the file. */ @@ -37,6 +37,12 @@ public final class TestRunFileInfo implements JsonSerializable @Generated private LoadTestingFileType fileType; + /* + * Expiry time of the file (RFC 3339 literal format) + */ + @Generated + private OffsetDateTime expiresOn; + /* * Validation status of the file */ @@ -58,7 +64,7 @@ private TestRunFileInfo() { /** * Get the fileName property: Name of the file. - * + * * @return the fileName value. */ @Generated @@ -68,7 +74,7 @@ public String getFileName() { /** * Get the url property: File URL. - * + * * @return the url value. */ @Generated @@ -78,7 +84,7 @@ public String getUrl() { /** * Get the fileType property: File type. - * + * * @return the fileType value. */ @Generated @@ -86,9 +92,19 @@ public LoadTestingFileType getFileType() { return this.fileType; } + /** + * Get the expiresOn property: Expiry time of the file (RFC 3339 literal format). + * + * @return the expiresOn value. + */ + @Generated + public OffsetDateTime getExpiresOn() { + return this.expiresOn; + } + /** * Get the validationStatus property: Validation status of the file. - * + * * @return the validationStatus value. */ @Generated @@ -98,7 +114,7 @@ public FileValidationStatus getValidationStatus() { /** * Get the validationFailureDetails property: Validation failure error details. - * + * * @return the validationFailureDetails value. */ @Generated @@ -118,7 +134,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of TestRunFileInfo from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of TestRunFileInfo if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. @@ -132,6 +148,7 @@ public static TestRunFileInfo fromJson(JsonReader jsonReader) throws IOException while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); + if ("fileName".equals(fieldName)) { deserializedTestRunFileInfo.fileName = reader.getString(); } else if ("url".equals(fieldName)) { @@ -149,23 +166,8 @@ public static TestRunFileInfo fromJson(JsonReader jsonReader) throws IOException reader.skipChildren(); } } + return deserializedTestRunFileInfo; }); } - - /* - * Expiry time of the file (RFC 3339 literal format) - */ - @Generated - private OffsetDateTime expiresOn; - - /** - * Get the expiresOn property: Expiry time of the file (RFC 3339 literal format). - * - * @return the expiresOn value. - */ - @Generated - public OffsetDateTime getExpiresOn() { - return this.expiresOn; - } } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestRunInputArtifacts.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestRunInputArtifacts.java index f3dc033b8f52..1a52f42f88c7 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestRunInputArtifacts.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestRunInputArtifacts.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Generated; @@ -17,7 +18,6 @@ */ @Immutable public final class TestRunInputArtifacts implements JsonSerializable { - /* * The load test YAML file that contains the the test configuration */ @@ -30,6 +30,12 @@ public final class TestRunInputArtifacts implements JsonSerializable { + /* + * Name of the column. + */ + @Generated + private final String name; + + /* + * The data type of the column. + */ + @Generated + private final String dataType; + + /** + * Creates an instance of TestRunInsightColumn class. + * + * @param name the name value to set. + * @param dataType the dataType value to set. + */ + @Generated + private TestRunInsightColumn(String name, String dataType) { + this.name = name; + this.dataType = dataType; + } + + /** + * Get the name property: Name of the column. + * + * @return the name value. + */ + @Generated + public String getName() { + return this.name; + } + + /** + * Get the dataType property: The data type of the column. + * + * @return the dataType value. + */ + @Generated + public String getDataType() { + return this.dataType; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("dataType", this.dataType); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TestRunInsightColumn from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TestRunInsightColumn if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the TestRunInsightColumn. + */ + @Generated + public static TestRunInsightColumn fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String name = null; + String dataType = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + name = reader.getString(); + } else if ("dataType".equals(fieldName)) { + dataType = reader.getString(); + } else { + reader.skipChildren(); + } + } + return new TestRunInsightColumn(name, dataType); + }); + } +} diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestRunInsights.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestRunInsights.java new file mode 100644 index 000000000000..3e16bfc5a967 --- /dev/null +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestRunInsights.java @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.developer.loadtesting.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.developer.loadtesting.implementation.JsonMergePatchHelper; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +/** + * Represents insights for the test run. + */ +@Fluent +public final class TestRunInsights implements JsonSerializable { + /* + * The columns of the insights. + */ + @Generated + private List columns; + + /* + * The rows of the insights. + */ + @Generated + private Map> rows; + + /* + * The version of the insights. + */ + @Generated + private Long version; + + /* + * The status of the insights. + */ + @Generated + private OperationState status; + + /** + * Stores updated model property, the value is property name, not serialized name. + */ + @Generated + private final Set updatedProperties = new HashSet<>(); + + @Generated + private boolean jsonMergePatch; + + @Generated + private void serializeAsJsonMergePatch(boolean jsonMergePatch) { + this.jsonMergePatch = jsonMergePatch; + } + + static { + JsonMergePatchHelper.setTestRunInsightsAccessor(new JsonMergePatchHelper.TestRunInsightsAccessor() { + @Override + public TestRunInsights prepareModelForJsonMergePatch(TestRunInsights model, boolean jsonMergePatchEnabled) { + model.serializeAsJsonMergePatch(jsonMergePatchEnabled); + return model; + } + + @Override + public boolean isJsonMergePatch(TestRunInsights model) { + return model.jsonMergePatch; + } + }); + } + + /** + * Creates an instance of TestRunInsights class. + */ + @Generated + public TestRunInsights() { + } + + /** + * Get the columns property: The columns of the insights. + * + * @return the columns value. + */ + @Generated + public List getColumns() { + return this.columns; + } + + /** + * Get the rows property: The rows of the insights. + * + * @return the rows value. + */ + @Generated + public Map> getRows() { + return this.rows; + } + + /** + * Set the rows property: The rows of the insights. + * + * @param rows the rows value to set. + * @return the TestRunInsights object itself. + */ + @Generated + public TestRunInsights setRows(Map> rows) { + this.rows = rows; + this.updatedProperties.add("rows"); + return this; + } + + /** + * Get the version property: The version of the insights. + * + * @return the version value. + */ + @Generated + public Long getVersion() { + return this.version; + } + + /** + * Get the status property: The status of the insights. + * + * @return the status value. + */ + @Generated + public OperationState getStatus() { + return this.status; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + if (jsonMergePatch) { + return toJsonMergePatch(jsonWriter); + } else { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("rows", this.rows, + (writer, element) -> writer.writeMap(element, (writer1, element1) -> writer1.writeString(element1))); + return jsonWriter.writeEndObject(); + } + } + + @Generated + private JsonWriter toJsonMergePatch(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + if (updatedProperties.contains("rows")) { + if (this.rows == null) { + jsonWriter.writeNullField("rows"); + } else { + jsonWriter.writeMapField("rows", this.rows, + (writer, element) -> writer.writeMap(element, (writer1, element1) -> { + if (element1 != null) { + writer1.writeString(element1); + } else { + writer1.writeNull(); + } + })); + } + } + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TestRunInsights from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TestRunInsights if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the TestRunInsights. + */ + @Generated + public static TestRunInsights fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TestRunInsights deserializedTestRunInsights = new TestRunInsights(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("columns".equals(fieldName)) { + List columns + = reader.readArray(reader1 -> TestRunInsightColumn.fromJson(reader1)); + deserializedTestRunInsights.columns = columns; + } else if ("rows".equals(fieldName)) { + Map> rows + = reader.readMap(reader1 -> reader1.readMap(reader2 -> reader2.getString())); + deserializedTestRunInsights.rows = rows; + } else if ("version".equals(fieldName)) { + deserializedTestRunInsights.version = reader.getNullable(JsonReader::getLong); + } else if ("status".equals(fieldName)) { + deserializedTestRunInsights.status = OperationState.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedTestRunInsights; + }); + } +} diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestRunOutputArtifacts.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestRunOutputArtifacts.java index 26793e3c0f0d..471a7abb75a2 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestRunOutputArtifacts.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestRunOutputArtifacts.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Generated; @@ -16,7 +17,6 @@ */ @Immutable public final class TestRunOutputArtifacts implements JsonSerializable { - /* * The test run results file */ @@ -50,7 +50,7 @@ private TestRunOutputArtifacts() { /** * Get the resultFileInfo property: The test run results file. - * + * * @return the resultFileInfo value. */ @Generated @@ -60,7 +60,7 @@ public TestRunFileInfo getResultFileInfo() { /** * Get the logsFileInfo property: The test run report with metrics. - * + * * @return the logsFileInfo value. */ @Generated @@ -70,7 +70,7 @@ public TestRunFileInfo getLogsFileInfo() { /** * Get the artifactsContainerInfo property: The container for test run artifacts. - * + * * @return the artifactsContainerInfo value. */ @Generated @@ -80,7 +80,7 @@ public ArtifactsContainerInfo getArtifactsContainerInfo() { /** * Get the reportFileInfo property: The report file for the test run. - * + * * @return the reportFileInfo value. */ @Generated @@ -104,7 +104,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of TestRunOutputArtifacts from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of TestRunOutputArtifacts if the JsonReader was pointing to an instance of it, or null if it * was pointing to JSON null. @@ -117,6 +117,7 @@ public static TestRunOutputArtifacts fromJson(JsonReader jsonReader) throws IOEx while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); + if ("resultFileInfo".equals(fieldName)) { deserializedTestRunOutputArtifacts.resultFileInfo = TestRunFileInfo.fromJson(reader); } else if ("logsFileInfo".equals(fieldName)) { @@ -129,6 +130,7 @@ public static TestRunOutputArtifacts fromJson(JsonReader jsonReader) throws IOEx reader.skipChildren(); } } + return deserializedTestRunOutputArtifacts; }); } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestRunServerMetricsConfiguration.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestRunServerMetricsConfiguration.java index 185c8ef3890b..be87f1d079b8 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestRunServerMetricsConfiguration.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestRunServerMetricsConfiguration.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Fluent; @@ -22,7 +23,6 @@ */ @Fluent public final class TestRunServerMetricsConfiguration implements JsonSerializable { - /* * Test run identifier */ @@ -78,7 +78,6 @@ private void serializeAsJsonMergePatch(boolean jsonMergePatch) { static { JsonMergePatchHelper.setTestRunServerMetricsConfigurationAccessor( new JsonMergePatchHelper.TestRunServerMetricsConfigurationAccessor() { - @Override public TestRunServerMetricsConfiguration prepareModelForJsonMergePatch( TestRunServerMetricsConfiguration model, boolean jsonMergePatchEnabled) { @@ -102,7 +101,7 @@ public TestRunServerMetricsConfiguration() { /** * Get the testRunId property: Test run identifier. - * + * * @return the testRunId value. */ @Generated @@ -114,7 +113,7 @@ public String getTestRunId() { * Get the metrics property: Azure resource metrics collection {metric id : metrics object} (Refer : * https://learn.microsoft.com/en-us/rest/api/monitor/metric-definitions/list#metricdefinition * for metric id). - * + * * @return the metrics value. */ @Generated @@ -126,7 +125,7 @@ public Map getMetrics() { * Set the metrics property: Azure resource metrics collection {metric id : metrics object} (Refer : * https://learn.microsoft.com/en-us/rest/api/monitor/metric-definitions/list#metricdefinition * for metric id). - * + * * @param metrics the metrics value to set. * @return the TestRunServerMetricsConfiguration object itself. */ @@ -139,7 +138,7 @@ public TestRunServerMetricsConfiguration setMetrics(Map /** * Get the createdDateTime property: The creation datetime(RFC 3339 literal format). - * + * * @return the createdDateTime value. */ @Generated @@ -149,7 +148,7 @@ public OffsetDateTime getCreatedDateTime() { /** * Get the createdBy property: The user that created. - * + * * @return the createdBy value. */ @Generated @@ -159,7 +158,7 @@ public String getCreatedBy() { /** * Get the lastModifiedDateTime property: The last Modified datetime(RFC 3339 literal format). - * + * * @return the lastModifiedDateTime value. */ @Generated @@ -169,7 +168,7 @@ public OffsetDateTime getLastModifiedDateTime() { /** * Get the lastModifiedBy property: The user that last modified. - * + * * @return the lastModifiedBy value. */ @Generated @@ -215,7 +214,7 @@ private JsonWriter toJsonMergePatch(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of TestRunServerMetricsConfiguration from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of TestRunServerMetricsConfiguration if the JsonReader was pointing to an instance of it, or * null if it was pointing to JSON null. @@ -229,6 +228,7 @@ public static TestRunServerMetricsConfiguration fromJson(JsonReader jsonReader) while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); + if ("testRunId".equals(fieldName)) { deserializedTestRunServerMetricsConfiguration.testRunId = reader.getString(); } else if ("metrics".equals(fieldName)) { @@ -248,6 +248,7 @@ public static TestRunServerMetricsConfiguration fromJson(JsonReader jsonReader) reader.skipChildren(); } } + return deserializedTestRunServerMetricsConfiguration; }); } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestRunStartedNotificationEventFilter.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestRunStartedNotificationEventFilter.java new file mode 100644 index 000000000000..5182d3004672 --- /dev/null +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestRunStartedNotificationEventFilter.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.developer.loadtesting.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.developer.loadtesting.implementation.JsonMergePatchHelper; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.HashSet; +import java.util.Set; + +/** + * The notification event filter when the event type is TestRunStarted and scope is Tests. + */ +@Immutable +public final class TestRunStartedNotificationEventFilter extends TestsNotificationEventFilter { + /* + * The event type + */ + @Generated + private NotificationEventType kind = NotificationEventType.TEST_RUN_STARTED; + + /** + * Stores updated model property, the value is property name, not serialized name. + */ + @Generated + private final Set updatedProperties = new HashSet<>(); + + /** + * Creates an instance of TestRunStartedNotificationEventFilter class. + */ + @Generated + public TestRunStartedNotificationEventFilter() { + } + + /** + * Get the kind property: The event type. + * + * @return the kind value. + */ + @Generated + @Override + public NotificationEventType getKind() { + return this.kind; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + if (JsonMergePatchHelper.getTestsNotificationEventFilterAccessor().isJsonMergePatch(this)) { + return toJsonMergePatch(jsonWriter); + } else { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString()); + return jsonWriter.writeEndObject(); + } + } + + @Generated + private JsonWriter toJsonMergePatch(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kind", this.kind.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TestRunStartedNotificationEventFilter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TestRunStartedNotificationEventFilter if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the TestRunStartedNotificationEventFilter. + */ + @Generated + public static TestRunStartedNotificationEventFilter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TestRunStartedNotificationEventFilter deserializedTestRunStartedNotificationEventFilter + = new TestRunStartedNotificationEventFilter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("kind".equals(fieldName)) { + deserializedTestRunStartedNotificationEventFilter.kind + = NotificationEventType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedTestRunStartedNotificationEventFilter; + }); + } +} diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestRunStatistics.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestRunStatistics.java index 0ddc5a439aa0..a2a72df55f6e 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestRunStatistics.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestRunStatistics.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Generated; @@ -16,7 +17,6 @@ */ @Immutable public final class TestRunStatistics implements JsonSerializable { - /* * Transaction name. */ @@ -35,165 +35,6 @@ public final class TestRunStatistics implements JsonSerializable { - TestRunStatistics deserializedTestRunStatistics = new TestRunStatistics(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("transaction".equals(fieldName)) { - deserializedTestRunStatistics.transaction = reader.getString(); - } else if ("sampleCount".equals(fieldName)) { - deserializedTestRunStatistics.sampleCount = reader.getNullable(JsonReader::getDouble); - } else if ("errorCount".equals(fieldName)) { - deserializedTestRunStatistics.errorCount = reader.getNullable(JsonReader::getDouble); - } else if ("errorPct".equals(fieldName)) { - deserializedTestRunStatistics.errorPercentage = reader.getNullable(JsonReader::getDouble); - } else if ("meanResTime".equals(fieldName)) { - deserializedTestRunStatistics.meanResponseTime = reader.getNullable(JsonReader::getDouble); - } else if ("medianResTime".equals(fieldName)) { - deserializedTestRunStatistics.medianResponseTime = reader.getNullable(JsonReader::getDouble); - } else if ("maxResTime".equals(fieldName)) { - deserializedTestRunStatistics.maxResponseTime = reader.getNullable(JsonReader::getDouble); - } else if ("minResTime".equals(fieldName)) { - deserializedTestRunStatistics.minResponseTime = reader.getNullable(JsonReader::getDouble); - } else if ("pct1ResTime".equals(fieldName)) { - deserializedTestRunStatistics.percentile90ResponseTime = reader.getNullable(JsonReader::getDouble); - } else if ("pct2ResTime".equals(fieldName)) { - deserializedTestRunStatistics.percentile95ResponseTime = reader.getNullable(JsonReader::getDouble); - } else if ("pct3ResTime".equals(fieldName)) { - deserializedTestRunStatistics.percentile99ResponseTime = reader.getNullable(JsonReader::getDouble); - } else if ("pct75ResTime".equals(fieldName)) { - deserializedTestRunStatistics.percentile75ResponseTime = reader.getNullable(JsonReader::getDouble); - } else if ("pct96ResTime".equals(fieldName)) { - deserializedTestRunStatistics.percentile96ResponseTime = reader.getNullable(JsonReader::getDouble); - } else if ("pct97ResTime".equals(fieldName)) { - deserializedTestRunStatistics.percentile97ResponseTime = reader.getNullable(JsonReader::getDouble); - } else if ("pct98ResTime".equals(fieldName)) { - deserializedTestRunStatistics.percentile98ResponseTime = reader.getNullable(JsonReader::getDouble); - } else if ("pct999ResTime".equals(fieldName)) { - deserializedTestRunStatistics.percentile999ResponseTime = reader.getNullable(JsonReader::getDouble); - } else if ("pct9999ResTime".equals(fieldName)) { - deserializedTestRunStatistics.percentile9999ResponseTime - = reader.getNullable(JsonReader::getDouble); - } else if ("throughput".equals(fieldName)) { - deserializedTestRunStatistics.throughput = reader.getNullable(JsonReader::getDouble); - } else if ("receivedKBytesPerSec".equals(fieldName)) { - deserializedTestRunStatistics.receivedKBytesPerSec = reader.getNullable(JsonReader::getDouble); - } else if ("sentKBytesPerSec".equals(fieldName)) { - deserializedTestRunStatistics.sentKBytesPerSec = reader.getNullable(JsonReader::getDouble); - } else { - reader.skipChildren(); - } - } - return deserializedTestRunStatistics; - }); - } - /* * Error percentage. */ @@ -278,9 +119,64 @@ public static TestRunStatistics fromJson(JsonReader jsonReader) throws IOExcepti @Generated private Double percentile9999ResponseTime; + /* + * Throughput. + */ + @Generated + private Double throughput; + + /* + * Received network bytes. + */ + @Generated + private Double receivedKBytesPerSec; + + /* + * Send network bytes. + */ + @Generated + private Double sentKBytesPerSec; + + /** + * Creates an instance of TestRunStatistics class. + */ + @Generated + private TestRunStatistics() { + } + + /** + * Get the transaction property: Transaction name. + * + * @return the transaction value. + */ + @Generated + public String getTransaction() { + return this.transaction; + } + + /** + * Get the sampleCount property: Sampler count. + * + * @return the sampleCount value. + */ + @Generated + public Double getSampleCount() { + return this.sampleCount; + } + + /** + * Get the errorCount property: Error count. + * + * @return the errorCount value. + */ + @Generated + public Double getErrorCount() { + return this.errorCount; + } + /** * Get the errorPercentage property: Error percentage. - * + * * @return the errorPercentage value. */ @Generated @@ -290,7 +186,7 @@ public Double getErrorPercentage() { /** * Get the meanResponseTime property: Mean response time. - * + * * @return the meanResponseTime value. */ @Generated @@ -300,7 +196,7 @@ public Double getMeanResponseTime() { /** * Get the medianResponseTime property: Median response time. - * + * * @return the medianResponseTime value. */ @Generated @@ -310,7 +206,7 @@ public Double getMedianResponseTime() { /** * Get the maxResponseTime property: Max response time. - * + * * @return the maxResponseTime value. */ @Generated @@ -320,7 +216,7 @@ public Double getMaxResponseTime() { /** * Get the minResponseTime property: Minimum response time. - * + * * @return the minResponseTime value. */ @Generated @@ -330,7 +226,7 @@ public Double getMinResponseTime() { /** * Get the percentile90ResponseTime property: 90 percentile response time. - * + * * @return the percentile90ResponseTime value. */ @Generated @@ -340,7 +236,7 @@ public Double getPercentile90ResponseTime() { /** * Get the percentile95ResponseTime property: 95 percentile response time. - * + * * @return the percentile95ResponseTime value. */ @Generated @@ -350,7 +246,7 @@ public Double getPercentile95ResponseTime() { /** * Get the percentile99ResponseTime property: 99 percentile response time. - * + * * @return the percentile99ResponseTime value. */ @Generated @@ -360,7 +256,7 @@ public Double getPercentile99ResponseTime() { /** * Get the percentile75ResponseTime property: 75 percentile response time. - * + * * @return the percentile75ResponseTime value. */ @Generated @@ -370,7 +266,7 @@ public Double getPercentile75ResponseTime() { /** * Get the percentile96ResponseTime property: 96 percentile response time. - * + * * @return the percentile96ResponseTime value. */ @Generated @@ -380,7 +276,7 @@ public Double getPercentile96ResponseTime() { /** * Get the percentile97ResponseTime property: 97 percentile response time. - * + * * @return the percentile97ResponseTime value. */ @Generated @@ -390,7 +286,7 @@ public Double getPercentile97ResponseTime() { /** * Get the percentile98ResponseTime property: 98 percentile response time. - * + * * @return the percentile98ResponseTime value. */ @Generated @@ -400,7 +296,7 @@ public Double getPercentile98ResponseTime() { /** * Get the percentile999ResponseTime property: 99.9 percentile response time. - * + * * @return the percentile999ResponseTime value. */ @Generated @@ -410,11 +306,117 @@ public Double getPercentile999ResponseTime() { /** * Get the percentile9999ResponseTime property: 99.99 percentile response time. - * + * * @return the percentile9999ResponseTime value. */ @Generated public Double getPercentile9999ResponseTime() { return this.percentile9999ResponseTime; } + + /** + * Get the throughput property: Throughput. + * + * @return the throughput value. + */ + @Generated + public Double getThroughput() { + return this.throughput; + } + + /** + * Get the receivedKBytesPerSec property: Received network bytes. + * + * @return the receivedKBytesPerSec value. + */ + @Generated + public Double getReceivedKBytesPerSec() { + return this.receivedKBytesPerSec; + } + + /** + * Get the sentKBytesPerSec property: Send network bytes. + * + * @return the sentKBytesPerSec value. + */ + @Generated + public Double getSentKBytesPerSec() { + return this.sentKBytesPerSec; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TestRunStatistics from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TestRunStatistics if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the TestRunStatistics. + */ + @Generated + public static TestRunStatistics fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TestRunStatistics deserializedTestRunStatistics = new TestRunStatistics(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("transaction".equals(fieldName)) { + deserializedTestRunStatistics.transaction = reader.getString(); + } else if ("sampleCount".equals(fieldName)) { + deserializedTestRunStatistics.sampleCount = reader.getNullable(JsonReader::getDouble); + } else if ("errorCount".equals(fieldName)) { + deserializedTestRunStatistics.errorCount = reader.getNullable(JsonReader::getDouble); + } else if ("errorPct".equals(fieldName)) { + deserializedTestRunStatistics.errorPercentage = reader.getNullable(JsonReader::getDouble); + } else if ("meanResTime".equals(fieldName)) { + deserializedTestRunStatistics.meanResponseTime = reader.getNullable(JsonReader::getDouble); + } else if ("medianResTime".equals(fieldName)) { + deserializedTestRunStatistics.medianResponseTime = reader.getNullable(JsonReader::getDouble); + } else if ("maxResTime".equals(fieldName)) { + deserializedTestRunStatistics.maxResponseTime = reader.getNullable(JsonReader::getDouble); + } else if ("minResTime".equals(fieldName)) { + deserializedTestRunStatistics.minResponseTime = reader.getNullable(JsonReader::getDouble); + } else if ("pct1ResTime".equals(fieldName)) { + deserializedTestRunStatistics.percentile90ResponseTime = reader.getNullable(JsonReader::getDouble); + } else if ("pct2ResTime".equals(fieldName)) { + deserializedTestRunStatistics.percentile95ResponseTime = reader.getNullable(JsonReader::getDouble); + } else if ("pct3ResTime".equals(fieldName)) { + deserializedTestRunStatistics.percentile99ResponseTime = reader.getNullable(JsonReader::getDouble); + } else if ("pct75ResTime".equals(fieldName)) { + deserializedTestRunStatistics.percentile75ResponseTime = reader.getNullable(JsonReader::getDouble); + } else if ("pct96ResTime".equals(fieldName)) { + deserializedTestRunStatistics.percentile96ResponseTime = reader.getNullable(JsonReader::getDouble); + } else if ("pct97ResTime".equals(fieldName)) { + deserializedTestRunStatistics.percentile97ResponseTime = reader.getNullable(JsonReader::getDouble); + } else if ("pct98ResTime".equals(fieldName)) { + deserializedTestRunStatistics.percentile98ResponseTime = reader.getNullable(JsonReader::getDouble); + } else if ("pct999ResTime".equals(fieldName)) { + deserializedTestRunStatistics.percentile999ResponseTime = reader.getNullable(JsonReader::getDouble); + } else if ("pct9999ResTime".equals(fieldName)) { + deserializedTestRunStatistics.percentile9999ResponseTime + = reader.getNullable(JsonReader::getDouble); + } else if ("throughput".equals(fieldName)) { + deserializedTestRunStatistics.throughput = reader.getNullable(JsonReader::getDouble); + } else if ("receivedKBytesPerSec".equals(fieldName)) { + deserializedTestRunStatistics.receivedKBytesPerSec = reader.getNullable(JsonReader::getDouble); + } else if ("sentKBytesPerSec".equals(fieldName)) { + deserializedTestRunStatistics.sentKBytesPerSec = reader.getNullable(JsonReader::getDouble); + } else { + reader.skipChildren(); + } + } + + return deserializedTestRunStatistics; + }); + } } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestRunStatus.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestRunStatus.java index ffd9d08f4ee7..ca85f719b1ac 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestRunStatus.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestRunStatus.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Generated; @@ -11,13 +12,18 @@ * Test run status. */ public final class TestRunStatus extends ExpandableStringEnum { - /** * Test run request is accepted. */ @Generated public static final TestRunStatus ACCEPTED = fromString("ACCEPTED"); + /** + * Test run is not yet started. + */ + @Generated + public static final TestRunStatus NOT_STARTED = fromString("NOTSTARTED"); + /** * Test run is provisioning. */ @@ -104,7 +110,7 @@ public final class TestRunStatus extends ExpandableStringEnum { /** * Creates a new instance of TestRunStatus value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Generated @@ -114,7 +120,7 @@ public TestRunStatus() { /** * Creates or finds a TestRunStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding TestRunStatus. */ @@ -125,17 +131,11 @@ public static TestRunStatus fromString(String name) { /** * Gets known TestRunStatus values. - * + * * @return known TestRunStatus values. */ @Generated public static Collection values() { return values(TestRunStatus.class); } - - /** - * Test run is not yet started. - */ - @Generated - public static final TestRunStatus NOT_STARTED = fromString("NOTSTARTED"); } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestSecret.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestSecret.java index eab66cf3f20d..6ab0142d4471 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestSecret.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestSecret.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Fluent; @@ -19,7 +20,6 @@ */ @Fluent public final class TestSecret implements JsonSerializable { - /* * The value of the secret for the respective type */ @@ -48,7 +48,6 @@ private void serializeAsJsonMergePatch(boolean jsonMergePatch) { static { JsonMergePatchHelper.setTestSecretAccessor(new JsonMergePatchHelper.TestSecretAccessor() { - @Override public TestSecret prepareModelForJsonMergePatch(TestSecret model, boolean jsonMergePatchEnabled) { model.serializeAsJsonMergePatch(jsonMergePatchEnabled); @@ -71,7 +70,7 @@ public TestSecret() { /** * Get the value property: The value of the secret for the respective type. - * + * * @return the value value. */ @Generated @@ -81,7 +80,7 @@ public String getValue() { /** * Set the value property: The value of the secret for the respective type. - * + * * @param value the value value to set. * @return the TestSecret object itself. */ @@ -94,7 +93,7 @@ public TestSecret setValue(String value) { /** * Get the type property: Type of secret. - * + * * @return the type value. */ @Generated @@ -104,7 +103,7 @@ public SecretType getType() { /** * Set the type property: Type of secret. - * + * * @param type the type value to set. * @return the TestSecret object itself. */ @@ -153,7 +152,7 @@ private JsonWriter toJsonMergePatch(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of TestSecret from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of TestSecret if the JsonReader was pointing to an instance of it, or null if it was pointing * to JSON null. @@ -166,6 +165,7 @@ public static TestSecret fromJson(JsonReader jsonReader) throws IOException { while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); + if ("value".equals(fieldName)) { deserializedTestSecret.value = reader.getString(); } else if ("type".equals(fieldName)) { @@ -174,6 +174,7 @@ public static TestSecret fromJson(JsonReader jsonReader) throws IOException { reader.skipChildren(); } } + return deserializedTestSecret; }); } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestServerMetricsConfiguration.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestServerMetricsConfiguration.java index 105ec2dedc39..c64d064d30f2 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestServerMetricsConfiguration.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestServerMetricsConfiguration.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Fluent; @@ -22,7 +23,6 @@ */ @Fluent public final class TestServerMetricsConfiguration implements JsonSerializable { - /* * Test identifier */ @@ -78,7 +78,6 @@ private void serializeAsJsonMergePatch(boolean jsonMergePatch) { static { JsonMergePatchHelper.setTestServerMetricsConfigurationAccessor( new JsonMergePatchHelper.TestServerMetricsConfigurationAccessor() { - @Override public TestServerMetricsConfiguration prepareModelForJsonMergePatch(TestServerMetricsConfiguration model, boolean jsonMergePatchEnabled) { @@ -102,7 +101,7 @@ public TestServerMetricsConfiguration() { /** * Get the testId property: Test identifier. - * + * * @return the testId value. */ @Generated @@ -114,7 +113,7 @@ public String getTestId() { * Get the metrics property: Azure resource metrics collection {metric id : metrics object} (Refer : * https://learn.microsoft.com/en-us/rest/api/monitor/metric-definitions/list#metricdefinition * for metric id). - * + * * @return the metrics value. */ @Generated @@ -127,7 +126,7 @@ public Map getMetrics() { * https://learn.microsoft.com/en-us/rest/api/monitor/metric-definitions/list#metricdefinition * for metric id). *

Required when create the resource.

- * + * * @param metrics the metrics value to set. * @return the TestServerMetricsConfiguration object itself. */ @@ -140,7 +139,7 @@ public TestServerMetricsConfiguration setMetrics(Map met /** * Get the createdDateTime property: The creation datetime(RFC 3339 literal format). - * + * * @return the createdDateTime value. */ @Generated @@ -150,7 +149,7 @@ public OffsetDateTime getCreatedDateTime() { /** * Get the createdBy property: The user that created. - * + * * @return the createdBy value. */ @Generated @@ -160,7 +159,7 @@ public String getCreatedBy() { /** * Get the lastModifiedDateTime property: The last Modified datetime(RFC 3339 literal format). - * + * * @return the lastModifiedDateTime value. */ @Generated @@ -170,7 +169,7 @@ public OffsetDateTime getLastModifiedDateTime() { /** * Get the lastModifiedBy property: The user that last modified. - * + * * @return the lastModifiedBy value. */ @Generated @@ -216,7 +215,7 @@ private JsonWriter toJsonMergePatch(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of TestServerMetricsConfiguration from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of TestServerMetricsConfiguration if the JsonReader was pointing to an instance of it, or * null if it was pointing to JSON null. @@ -230,6 +229,7 @@ public static TestServerMetricsConfiguration fromJson(JsonReader jsonReader) thr while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); + if ("testId".equals(fieldName)) { deserializedTestServerMetricsConfiguration.testId = reader.getString(); } else if ("metrics".equals(fieldName)) { @@ -249,6 +249,7 @@ public static TestServerMetricsConfiguration fromJson(JsonReader jsonReader) thr reader.skipChildren(); } } + return deserializedTestServerMetricsConfiguration; }); } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestsNotificationEventFilter.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestsNotificationEventFilter.java new file mode 100644 index 000000000000..4c1dbf30f1b6 --- /dev/null +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestsNotificationEventFilter.java @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.developer.loadtesting.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.developer.loadtesting.implementation.JsonMergePatchHelper; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.HashSet; +import java.util.Set; + +/** + * The notification event filter for Tests scope. + */ +@Immutable +public class TestsNotificationEventFilter implements JsonSerializable { + /* + * The event type + */ + @Generated + private NotificationEventType kind = NotificationEventType.fromString("TestsNotificationEventFilter"); + + /** + * Stores updated model property, the value is property name, not serialized name. + */ + @Generated + private final Set updatedProperties = new HashSet<>(); + + @Generated + private boolean jsonMergePatch; + + @Generated + private void serializeAsJsonMergePatch(boolean jsonMergePatch) { + this.jsonMergePatch = jsonMergePatch; + } + + static { + JsonMergePatchHelper + .setTestsNotificationEventFilterAccessor(new JsonMergePatchHelper.TestsNotificationEventFilterAccessor() { + @Override + public TestsNotificationEventFilter prepareModelForJsonMergePatch(TestsNotificationEventFilter model, + boolean jsonMergePatchEnabled) { + model.serializeAsJsonMergePatch(jsonMergePatchEnabled); + return model; + } + + @Override + public boolean isJsonMergePatch(TestsNotificationEventFilter model) { + return model.jsonMergePatch; + } + }); + } + + /** + * Creates an instance of TestsNotificationEventFilter class. + */ + @Generated + public TestsNotificationEventFilter() { + } + + /** + * Get the kind property: The event type. + * + * @return the kind value. + */ + @Generated + public NotificationEventType getKind() { + return this.kind; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + if (jsonMergePatch) { + return toJsonMergePatch(jsonWriter); + } else { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString()); + return jsonWriter.writeEndObject(); + } + } + + @Generated + private JsonWriter toJsonMergePatch(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kind", this.kind.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TestsNotificationEventFilter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TestsNotificationEventFilter if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the TestsNotificationEventFilter. + */ + @Generated + public static TestsNotificationEventFilter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String discriminatorValue = null; + try (JsonReader readerToUse = reader.bufferObject()) { + readerToUse.nextToken(); // Prepare for reading + while (readerToUse.nextToken() != JsonToken.END_OBJECT) { + String fieldName = readerToUse.getFieldName(); + readerToUse.nextToken(); + if ("kind".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("TestRunEnded".equals(discriminatorValue)) { + return TestRunEndedNotificationEventFilter.fromJson(readerToUse.reset()); + } else if ("TestRunStarted".equals(discriminatorValue)) { + return TestRunStartedNotificationEventFilter.fromJson(readerToUse.reset()); + } else if ("TriggerCompleted".equals(discriminatorValue)) { + return TriggerCompletedNotificationEventFilter.fromJson(readerToUse.reset()); + } else if ("TriggerDisabled".equals(discriminatorValue)) { + return TriggerDisabledNotificationEventFilter.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + @Generated + static TestsNotificationEventFilter fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TestsNotificationEventFilter deserializedTestsNotificationEventFilter = new TestsNotificationEventFilter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("kind".equals(fieldName)) { + deserializedTestsNotificationEventFilter.kind + = NotificationEventType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedTestsNotificationEventFilter; + }); + } +} diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestsNotificationRule.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestsNotificationRule.java new file mode 100644 index 000000000000..345216739b77 --- /dev/null +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TestsNotificationRule.java @@ -0,0 +1,263 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.developer.loadtesting.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.core.util.CoreUtils; +import com.azure.developer.loadtesting.implementation.JsonMergePatchHelper; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +/** + * Tests Notification rule model. + */ +@Fluent +public final class TestsNotificationRule extends NotificationRule { + /* + * The scope of the notification rule. + */ + @Generated + private NotificationScopeType scope = NotificationScopeType.TESTS; + + /* + * The test ids to include. If not provided, notification will be sent for all testIds. + */ + @Generated + private List testIds; + + /* + * The event to receive notifications for along with filtering conditions. + * Key is a user-assigned identifier for the event filter. + */ + @Generated + private Map eventFilters; + + /** + * Stores updated model property, the value is property name, not serialized name. + */ + @Generated + private final Set updatedProperties = new HashSet<>(); + + /** + * Creates an instance of TestsNotificationRule class. + */ + @Generated + public TestsNotificationRule() { + } + + /** + * Get the scope property: The scope of the notification rule. + * + * @return the scope value. + */ + @Generated + @Override + public NotificationScopeType getScope() { + return this.scope; + } + + /** + * Get the testIds property: The test ids to include. If not provided, notification will be sent for all testIds. + * + * @return the testIds value. + */ + @Generated + public List getTestIds() { + return this.testIds; + } + + /** + * Set the testIds property: The test ids to include. If not provided, notification will be sent for all testIds. + * + * @param testIds the testIds value to set. + * @return the TestsNotificationRule object itself. + */ + @Generated + public TestsNotificationRule setTestIds(List testIds) { + this.testIds = testIds; + this.updatedProperties.add("testIds"); + return this; + } + + /** + * Get the eventFilters property: The event to receive notifications for along with filtering conditions. + * Key is a user-assigned identifier for the event filter. + * + * @return the eventFilters value. + */ + @Generated + public Map getEventFilters() { + return this.eventFilters; + } + + /** + * Set the eventFilters property: The event to receive notifications for along with filtering conditions. + * Key is a user-assigned identifier for the event filter. + *

Required when create the resource.

+ * + * @param eventFilters the eventFilters value to set. + * @return the TestsNotificationRule object itself. + */ + @Generated + public TestsNotificationRule setEventFilters(Map eventFilters) { + this.eventFilters = eventFilters; + this.updatedProperties.add("eventFilters"); + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public TestsNotificationRule setDisplayName(String displayName) { + super.setDisplayName(displayName); + this.updatedProperties.add("displayName"); + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public TestsNotificationRule setActionGroupIds(List actionGroupIds) { + super.setActionGroupIds(actionGroupIds); + this.updatedProperties.add("actionGroupIds"); + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + if (JsonMergePatchHelper.getNotificationRuleAccessor().isJsonMergePatch(this)) { + return toJsonMergePatch(jsonWriter); + } else { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("displayName", getDisplayName()); + jsonWriter.writeArrayField("actionGroupIds", getActionGroupIds(), + (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("scope", this.scope == null ? null : this.scope.toString()); + jsonWriter.writeArrayField("testIds", this.testIds, (writer, element) -> writer.writeString(element)); + jsonWriter.writeMapField("eventFilters", this.eventFilters, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + } + + @Generated + private JsonWriter toJsonMergePatch(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + if (updatedProperties.contains("displayName")) { + if (getDisplayName() == null) { + jsonWriter.writeNullField("displayName"); + } else { + jsonWriter.writeStringField("displayName", getDisplayName()); + } + } + if (updatedProperties.contains("actionGroupIds")) { + if (getActionGroupIds() == null) { + jsonWriter.writeNullField("actionGroupIds"); + } else { + jsonWriter.writeArrayField("actionGroupIds", getActionGroupIds(), + (writer, element) -> writer.writeString(element)); + } + } + jsonWriter.writeStringField("scope", this.scope.toString()); + if (updatedProperties.contains("testIds")) { + if (this.testIds == null) { + jsonWriter.writeNullField("testIds"); + } else { + jsonWriter.writeArrayField("testIds", this.testIds, (writer, element) -> writer.writeString(element)); + } + } + if (updatedProperties.contains("eventFilters")) { + if (this.eventFilters == null) { + jsonWriter.writeNullField("eventFilters"); + } else { + jsonWriter.writeMapField("eventFilters", this.eventFilters, (writer, element) -> { + if (element != null) { + JsonMergePatchHelper.getTestsNotificationEventFilterAccessor() + .prepareModelForJsonMergePatch(element, true); + writer.writeJson(element); + JsonMergePatchHelper.getTestsNotificationEventFilterAccessor() + .prepareModelForJsonMergePatch(element, false); + } else { + writer.writeNull(); + } + }); + } + } + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TestsNotificationRule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TestsNotificationRule if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the TestsNotificationRule. + */ + @Generated + public static TestsNotificationRule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TestsNotificationRule deserializedTestsNotificationRule = new TestsNotificationRule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("notificationRuleId".equals(fieldName)) { + JsonMergePatchHelper.getNotificationRuleAccessor() + .setNotificationRuleId(deserializedTestsNotificationRule, reader.getString()); + } else if ("displayName".equals(fieldName)) { + JsonMergePatchHelper.getNotificationRuleAccessor() + .setDisplayName(deserializedTestsNotificationRule, reader.getString()); + } else if ("actionGroupIds".equals(fieldName)) { + List actionGroupIds = reader.readArray(reader1 -> reader1.getString()); + JsonMergePatchHelper.getNotificationRuleAccessor() + .setActionGroupIds(deserializedTestsNotificationRule, actionGroupIds); + } else if ("createdDateTime".equals(fieldName)) { + JsonMergePatchHelper.getNotificationRuleAccessor() + .setCreatedDateTime(deserializedTestsNotificationRule, reader.getNullable( + nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); + } else if ("createdBy".equals(fieldName)) { + JsonMergePatchHelper.getNotificationRuleAccessor() + .setCreatedBy(deserializedTestsNotificationRule, reader.getString()); + } else if ("lastModifiedDateTime".equals(fieldName)) { + JsonMergePatchHelper.getNotificationRuleAccessor() + .setLastModifiedDateTime(deserializedTestsNotificationRule, reader.getNullable( + nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()))); + } else if ("lastModifiedBy".equals(fieldName)) { + JsonMergePatchHelper.getNotificationRuleAccessor() + .setLastModifiedBy(deserializedTestsNotificationRule, reader.getString()); + } else if ("scope".equals(fieldName)) { + deserializedTestsNotificationRule.scope = NotificationScopeType.fromString(reader.getString()); + } else if ("testIds".equals(fieldName)) { + List testIds = reader.readArray(reader1 -> reader1.getString()); + deserializedTestsNotificationRule.testIds = testIds; + } else if ("eventFilters".equals(fieldName)) { + Map eventFilters + = reader.readMap(reader1 -> TestsNotificationEventFilter.fromJson(reader1)); + deserializedTestsNotificationRule.eventFilters = eventFilters; + } else { + reader.skipChildren(); + } + } + + return deserializedTestsNotificationRule; + }); + } +} diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TimeGrain.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TimeGrain.java index 41c215fe114d..86ee93e19f80 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TimeGrain.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TimeGrain.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Generated; @@ -11,65 +12,64 @@ * Time Grain. */ public final class TimeGrain extends ExpandableStringEnum { - /** - * Creates a new instance of TimeGrain value. - * - * @deprecated Use the {@link #fromString(String)} factory method. + * 5 seconds, available only if test run duration is less than 10 minutes. */ @Generated - @Deprecated - public TimeGrain() { - } + public static final TimeGrain FIVE_SECONDS = fromString("PT5S"); /** - * Creates or finds a TimeGrain from its string representation. - * - * @param name a name to look for. - * @return the corresponding TimeGrain. + * 10 seconds, available only if test run duration is less than 10 minutes. */ @Generated - public static TimeGrain fromString(String name) { - return fromString(name, TimeGrain.class); - } + public static final TimeGrain TEN_SECONDS = fromString("PT10S"); /** - * Gets known TimeGrain values. - * - * @return known TimeGrain values. + * 1 minute. */ @Generated - public static Collection values() { - return values(TimeGrain.class); - } + public static final TimeGrain ONE_MINUTE = fromString("PT1M"); /** - * 5 seconds, available only if test run duration is less than 10 minutes. + * 5 minutes, available only if test run duration is greater than 1 minute. */ @Generated - public static final TimeGrain FIVE_SECONDS = fromString("PT5S"); + public static final TimeGrain FIVE_MINUTES = fromString("PT5M"); /** - * 10 seconds, available only if test run duration is less than 10 minutes. + * 1 hour, available only if test run duration is greater than 1 minute. */ @Generated - public static final TimeGrain TEN_SECONDS = fromString("PT10S"); + public static final TimeGrain ONE_HOUR = fromString("PT1H"); /** - * 1 minute. + * Creates a new instance of TimeGrain value. + * + * @deprecated Use the {@link #fromString(String)} factory method. */ @Generated - public static final TimeGrain ONE_MINUTE = fromString("PT1M"); + @Deprecated + public TimeGrain() { + } /** - * 5 minutes, available only if test run duration is greater than 1 minute. + * Creates or finds a TimeGrain from its string representation. + * + * @param name a name to look for. + * @return the corresponding TimeGrain. */ @Generated - public static final TimeGrain FIVE_MINUTES = fromString("PT5M"); + public static TimeGrain fromString(String name) { + return fromString(name, TimeGrain.class); + } /** - * 1 hour, available only if test run duration is greater than 1 minute. + * Gets known TimeGrain values. + * + * @return known TimeGrain values. */ @Generated - public static final TimeGrain ONE_HOUR = fromString("PT1H"); + public static Collection values() { + return values(TimeGrain.class); + } } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TimeSeriesElement.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TimeSeriesElement.java index bc4ac75d88db..5f6a146ce2c0 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TimeSeriesElement.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TimeSeriesElement.java @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + package com.azure.developer.loadtesting.models; import com.azure.core.annotation.Generated; @@ -17,7 +18,6 @@ */ @Immutable public final class TimeSeriesElement implements JsonSerializable { - /* * An array of data points representing the metric values. */ @@ -39,7 +39,7 @@ private TimeSeriesElement() { /** * Get the data property: An array of data points representing the metric values. - * + * * @return the data value. */ @Generated @@ -49,7 +49,7 @@ public List getData() { /** * Get the dimensionValues property: The dimension values. - * + * * @return the dimensionValues value. */ @Generated @@ -72,7 +72,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of TimeSeriesElement from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of TimeSeriesElement if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. @@ -85,6 +85,7 @@ public static TimeSeriesElement fromJson(JsonReader jsonReader) throws IOExcepti while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); + if ("data".equals(fieldName)) { List data = reader.readArray(reader1 -> MetricValue.fromJson(reader1)); deserializedTimeSeriesElement.data = data; @@ -96,6 +97,7 @@ public static TimeSeriesElement fromJson(JsonReader jsonReader) throws IOExcepti reader.skipChildren(); } } + return deserializedTimeSeriesElement; }); } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/Trigger.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/Trigger.java new file mode 100644 index 000000000000..7d3ce76741b3 --- /dev/null +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/Trigger.java @@ -0,0 +1,425 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.developer.loadtesting.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.core.util.CoreUtils; +import com.azure.developer.loadtesting.implementation.JsonMergePatchHelper; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.HashSet; +import java.util.Set; + +/** + * Trigger model. + */ +@Fluent +public class Trigger implements JsonSerializable { + /* + * The type of the trigger. + */ + @Generated + private TriggerType kind = TriggerType.fromString("Trigger"); + + /* + * The unique identifier of the trigger. + */ + @Generated + private String triggerId; + + /* + * The name of the trigger. + */ + @Generated + private String displayName; + + /* + * The description of the trigger. + */ + @Generated + private String description; + + /* + * The current state of the trigger. + */ + @Generated + private TriggerState state; + + /* + * Details of current state of the trigger. + */ + @Generated + private StateDetails stateDetails; + + /* + * The creation datetime(RFC 3339 literal format). + */ + @Generated + private OffsetDateTime createdDateTime; + + /* + * The user that created. + */ + @Generated + private String createdBy; + + /* + * The last Modified datetime(RFC 3339 literal format). + */ + @Generated + private OffsetDateTime lastModifiedDateTime; + + /* + * The user that last modified. + */ + @Generated + private String lastModifiedBy; + + /** + * Stores updated model property, the value is property name, not serialized name. + */ + @Generated + private final Set updatedProperties = new HashSet<>(); + + @Generated + private boolean jsonMergePatch; + + @Generated + private void serializeAsJsonMergePatch(boolean jsonMergePatch) { + this.jsonMergePatch = jsonMergePatch; + } + + static { + JsonMergePatchHelper.setTriggerAccessor(new JsonMergePatchHelper.TriggerAccessor() { + @Override + public Trigger prepareModelForJsonMergePatch(Trigger model, boolean jsonMergePatchEnabled) { + model.serializeAsJsonMergePatch(jsonMergePatchEnabled); + return model; + } + + @Override + public boolean isJsonMergePatch(Trigger model) { + return model.jsonMergePatch; + } + + @Override + public void setTriggerId(Trigger model, String triggerId) { + model.triggerId = triggerId; + } + + @Override + public void setDisplayName(Trigger model, String displayName) { + model.displayName = displayName; + } + + @Override + public void setDescription(Trigger model, String description) { + model.description = description; + } + + @Override + public void setState(Trigger model, TriggerState state) { + model.state = state; + } + + @Override + public void setStateDetails(Trigger model, StateDetails stateDetails) { + model.stateDetails = stateDetails; + } + + @Override + public void setCreatedDateTime(Trigger model, OffsetDateTime createdDateTime) { + model.createdDateTime = createdDateTime; + } + + @Override + public void setCreatedBy(Trigger model, String createdBy) { + model.createdBy = createdBy; + } + + @Override + public void setLastModifiedDateTime(Trigger model, OffsetDateTime lastModifiedDateTime) { + model.lastModifiedDateTime = lastModifiedDateTime; + } + + @Override + public void setLastModifiedBy(Trigger model, String lastModifiedBy) { + model.lastModifiedBy = lastModifiedBy; + } + }); + } + + /** + * Creates an instance of Trigger class. + */ + @Generated + public Trigger() { + } + + /** + * Get the kind property: The type of the trigger. + * + * @return the kind value. + */ + @Generated + public TriggerType getKind() { + return this.kind; + } + + /** + * Get the triggerId property: The unique identifier of the trigger. + * + * @return the triggerId value. + */ + @Generated + public String getTriggerId() { + return this.triggerId; + } + + /** + * Get the displayName property: The name of the trigger. + * + * @return the displayName value. + */ + @Generated + public String getDisplayName() { + return this.displayName; + } + + /** + * Set the displayName property: The name of the trigger. + *

Required when create the resource.

+ * + * @param displayName the displayName value to set. + * @return the Trigger object itself. + */ + @Generated + public Trigger setDisplayName(String displayName) { + this.displayName = displayName; + this.updatedProperties.add("displayName"); + return this; + } + + /** + * Get the description property: The description of the trigger. + * + * @return the description value. + */ + @Generated + public String getDescription() { + return this.description; + } + + /** + * Set the description property: The description of the trigger. + * + * @param description the description value to set. + * @return the Trigger object itself. + */ + @Generated + public Trigger setDescription(String description) { + this.description = description; + this.updatedProperties.add("description"); + return this; + } + + /** + * Get the state property: The current state of the trigger. + * + * @return the state value. + */ + @Generated + public TriggerState getState() { + return this.state; + } + + /** + * Set the state property: The current state of the trigger. + * + * @param state the state value to set. + * @return the Trigger object itself. + */ + @Generated + public Trigger setState(TriggerState state) { + this.state = state; + this.updatedProperties.add("state"); + return this; + } + + /** + * Get the stateDetails property: Details of current state of the trigger. + * + * @return the stateDetails value. + */ + @Generated + public StateDetails getStateDetails() { + return this.stateDetails; + } + + /** + * Get the createdDateTime property: The creation datetime(RFC 3339 literal format). + * + * @return the createdDateTime value. + */ + @Generated + public OffsetDateTime getCreatedDateTime() { + return this.createdDateTime; + } + + /** + * Get the createdBy property: The user that created. + * + * @return the createdBy value. + */ + @Generated + public String getCreatedBy() { + return this.createdBy; + } + + /** + * Get the lastModifiedDateTime property: The last Modified datetime(RFC 3339 literal format). + * + * @return the lastModifiedDateTime value. + */ + @Generated + public OffsetDateTime getLastModifiedDateTime() { + return this.lastModifiedDateTime; + } + + /** + * Get the lastModifiedBy property: The user that last modified. + * + * @return the lastModifiedBy value. + */ + @Generated + public String getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + if (jsonMergePatch) { + return toJsonMergePatch(jsonWriter); + } else { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString()); + jsonWriter.writeStringField("displayName", this.displayName); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); + return jsonWriter.writeEndObject(); + } + } + + @Generated + private JsonWriter toJsonMergePatch(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kind", this.kind.toString()); + if (updatedProperties.contains("displayName")) { + if (this.displayName == null) { + jsonWriter.writeNullField("displayName"); + } else { + jsonWriter.writeStringField("displayName", this.displayName); + } + } + if (updatedProperties.contains("description")) { + if (this.description == null) { + jsonWriter.writeNullField("description"); + } else { + jsonWriter.writeStringField("description", this.description); + } + } + if (updatedProperties.contains("state")) { + if (this.state == null) { + jsonWriter.writeNullField("state"); + } else { + jsonWriter.writeStringField("state", this.state.toString()); + } + } + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Trigger from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Trigger if the JsonReader was pointing to an instance of it, or null if it was pointing to + * JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the Trigger. + */ + @Generated + public static Trigger fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String discriminatorValue = null; + try (JsonReader readerToUse = reader.bufferObject()) { + readerToUse.nextToken(); // Prepare for reading + while (readerToUse.nextToken() != JsonToken.END_OBJECT) { + String fieldName = readerToUse.getFieldName(); + readerToUse.nextToken(); + if ("kind".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("ScheduleTestsTrigger".equals(discriminatorValue)) { + return ScheduleTestsTrigger.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + @Generated + static Trigger fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Trigger deserializedTrigger = new Trigger(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("triggerId".equals(fieldName)) { + deserializedTrigger.triggerId = reader.getString(); + } else if ("kind".equals(fieldName)) { + deserializedTrigger.kind = TriggerType.fromString(reader.getString()); + } else if ("displayName".equals(fieldName)) { + deserializedTrigger.displayName = reader.getString(); + } else if ("description".equals(fieldName)) { + deserializedTrigger.description = reader.getString(); + } else if ("state".equals(fieldName)) { + deserializedTrigger.state = TriggerState.fromString(reader.getString()); + } else if ("stateDetails".equals(fieldName)) { + deserializedTrigger.stateDetails = StateDetails.fromJson(reader); + } else if ("createdDateTime".equals(fieldName)) { + deserializedTrigger.createdDateTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("createdBy".equals(fieldName)) { + deserializedTrigger.createdBy = reader.getString(); + } else if ("lastModifiedDateTime".equals(fieldName)) { + deserializedTrigger.lastModifiedDateTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else if ("lastModifiedBy".equals(fieldName)) { + deserializedTrigger.lastModifiedBy = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedTrigger; + }); + } +} diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TriggerCompletedNotificationEventFilter.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TriggerCompletedNotificationEventFilter.java new file mode 100644 index 000000000000..e31f99563414 --- /dev/null +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TriggerCompletedNotificationEventFilter.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.developer.loadtesting.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.developer.loadtesting.implementation.JsonMergePatchHelper; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.HashSet; +import java.util.Set; + +/** + * The notification event filter when the event type is TriggerCompleted. + */ +@Immutable +public final class TriggerCompletedNotificationEventFilter extends TestsNotificationEventFilter { + /* + * The event type + */ + @Generated + private NotificationEventType kind = NotificationEventType.TRIGGER_COMPLETED; + + /** + * Stores updated model property, the value is property name, not serialized name. + */ + @Generated + private final Set updatedProperties = new HashSet<>(); + + /** + * Creates an instance of TriggerCompletedNotificationEventFilter class. + */ + @Generated + public TriggerCompletedNotificationEventFilter() { + } + + /** + * Get the kind property: The event type. + * + * @return the kind value. + */ + @Generated + @Override + public NotificationEventType getKind() { + return this.kind; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + if (JsonMergePatchHelper.getTestsNotificationEventFilterAccessor().isJsonMergePatch(this)) { + return toJsonMergePatch(jsonWriter); + } else { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString()); + return jsonWriter.writeEndObject(); + } + } + + @Generated + private JsonWriter toJsonMergePatch(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kind", this.kind.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TriggerCompletedNotificationEventFilter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TriggerCompletedNotificationEventFilter if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the TriggerCompletedNotificationEventFilter. + */ + @Generated + public static TriggerCompletedNotificationEventFilter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TriggerCompletedNotificationEventFilter deserializedTriggerCompletedNotificationEventFilter + = new TriggerCompletedNotificationEventFilter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("kind".equals(fieldName)) { + deserializedTriggerCompletedNotificationEventFilter.kind + = NotificationEventType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedTriggerCompletedNotificationEventFilter; + }); + } +} diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TriggerDisabledNotificationEventFilter.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TriggerDisabledNotificationEventFilter.java new file mode 100644 index 000000000000..e83a3fc742a8 --- /dev/null +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TriggerDisabledNotificationEventFilter.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.developer.loadtesting.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.developer.loadtesting.implementation.JsonMergePatchHelper; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.HashSet; +import java.util.Set; + +/** + * The notification event filter when the event type is TriggerDisabled. + */ +@Immutable +public final class TriggerDisabledNotificationEventFilter extends TestsNotificationEventFilter { + /* + * The event type + */ + @Generated + private NotificationEventType kind = NotificationEventType.TRIGGER_DISABLED; + + /** + * Stores updated model property, the value is property name, not serialized name. + */ + @Generated + private final Set updatedProperties = new HashSet<>(); + + /** + * Creates an instance of TriggerDisabledNotificationEventFilter class. + */ + @Generated + public TriggerDisabledNotificationEventFilter() { + } + + /** + * Get the kind property: The event type. + * + * @return the kind value. + */ + @Generated + @Override + public NotificationEventType getKind() { + return this.kind; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + if (JsonMergePatchHelper.getTestsNotificationEventFilterAccessor().isJsonMergePatch(this)) { + return toJsonMergePatch(jsonWriter); + } else { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString()); + return jsonWriter.writeEndObject(); + } + } + + @Generated + private JsonWriter toJsonMergePatch(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kind", this.kind.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TriggerDisabledNotificationEventFilter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TriggerDisabledNotificationEventFilter if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the TriggerDisabledNotificationEventFilter. + */ + @Generated + public static TriggerDisabledNotificationEventFilter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TriggerDisabledNotificationEventFilter deserializedTriggerDisabledNotificationEventFilter + = new TriggerDisabledNotificationEventFilter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("kind".equals(fieldName)) { + deserializedTriggerDisabledNotificationEventFilter.kind + = NotificationEventType.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedTriggerDisabledNotificationEventFilter; + }); + } +} diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TriggerState.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TriggerState.java new file mode 100644 index 000000000000..fbbf142ee2d4 --- /dev/null +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TriggerState.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.developer.loadtesting.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Current state of a trigger. + */ +public final class TriggerState extends ExpandableStringEnum { + /** + * The trigger is active. + */ + @Generated + public static final TriggerState ACTIVE = fromString("Active"); + + /** + * The trigger is paused manually. + */ + @Generated + public static final TriggerState PAUSED = fromString("Paused"); + + /** + * The trigger is completed. + */ + @Generated + public static final TriggerState COMPLETED = fromString("Completed"); + + /** + * The trigger is disabled due to error. + */ + @Generated + public static final TriggerState DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of TriggerState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public TriggerState() { + } + + /** + * Creates or finds a TriggerState from its string representation. + * + * @param name a name to look for. + * @return the corresponding TriggerState. + */ + @Generated + public static TriggerState fromString(String name) { + return fromString(name, TriggerState.class); + } + + /** + * Gets known TriggerState values. + * + * @return known TriggerState values. + */ + @Generated + public static Collection values() { + return values(TriggerState.class); + } +} diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TriggerType.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TriggerType.java new file mode 100644 index 000000000000..4331230716f9 --- /dev/null +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/TriggerType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.developer.loadtesting.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Type of a trigger. + */ +public final class TriggerType extends ExpandableStringEnum { + /** + * Trigger is a Scheduled Trigger on a Test. + */ + @Generated + public static final TriggerType SCHEDULE_TESTS_TRIGGER = fromString("ScheduleTestsTrigger"); + + /** + * Creates a new instance of TriggerType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public TriggerType() { + } + + /** + * Creates or finds a TriggerType from its string representation. + * + * @param name a name to look for. + * @return the corresponding TriggerType. + */ + @Generated + public static TriggerType fromString(String name) { + return fromString(name, TriggerType.class); + } + + /** + * Gets known TriggerType values. + * + * @return known TriggerType values. + */ + @Generated + public static Collection values() { + return values(TriggerType.class); + } +} diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/WeekDays.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/WeekDays.java new file mode 100644 index 000000000000..76fc7972b86b --- /dev/null +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/WeekDays.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.developer.loadtesting.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines the days of the week. + */ +public final class WeekDays extends ExpandableStringEnum { + /** + * Refers to Sunday. + */ + @Generated + public static final WeekDays SUNDAY = fromString("Sunday"); + + /** + * Refers to Monday. + */ + @Generated + public static final WeekDays MONDAY = fromString("Monday"); + + /** + * Refers to Tuesday. + */ + @Generated + public static final WeekDays TUESDAY = fromString("Tuesday"); + + /** + * Refers to Wednesday. + */ + @Generated + public static final WeekDays WEDNESDAY = fromString("Wednesday"); + + /** + * Refers to Thursday. + */ + @Generated + public static final WeekDays THURSDAY = fromString("Thursday"); + + /** + * Refers to Friday. + */ + @Generated + public static final WeekDays FRIDAY = fromString("Friday"); + + /** + * Refers to Saturday. + */ + @Generated + public static final WeekDays SATURDAY = fromString("Saturday"); + + /** + * Creates a new instance of WeekDays value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public WeekDays() { + } + + /** + * Creates or finds a WeekDays from its string representation. + * + * @param name a name to look for. + * @return the corresponding WeekDays. + */ + @Generated + public static WeekDays fromString(String name) { + return fromString(name, WeekDays.class); + } + + /** + * Gets known WeekDays values. + * + * @return known WeekDays values. + */ + @Generated + public static Collection values() { + return values(WeekDays.class); + } +} diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/WeeklyRecurrence.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/WeeklyRecurrence.java new file mode 100644 index 000000000000..3c51a652d3a1 --- /dev/null +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/WeeklyRecurrence.java @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.developer.loadtesting.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Generated; +import com.azure.developer.loadtesting.implementation.JsonMergePatchHelper; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +/** + * Recurrence model when frequency is set as weekly. + */ +@Fluent +public final class WeeklyRecurrence extends Recurrence { + /* + * Frequency of the recurrence. + */ + @Generated + private Frequency frequency = Frequency.WEEKLY; + + /* + * Recurrence set to repeat on the specified days of the week. + */ + @Generated + private List daysOfWeek; + + /* + * The interval at which the recurrence should repeat. It signifies the number of weeks between each recurrence. + */ + @Generated + private Integer interval; + + /** + * Stores updated model property, the value is property name, not serialized name. + */ + @Generated + private final Set updatedProperties = new HashSet<>(); + + /** + * Creates an instance of WeeklyRecurrence class. + */ + @Generated + public WeeklyRecurrence() { + } + + /** + * Get the frequency property: Frequency of the recurrence. + * + * @return the frequency value. + */ + @Generated + @Override + public Frequency getFrequency() { + return this.frequency; + } + + /** + * Get the daysOfWeek property: Recurrence set to repeat on the specified days of the week. + * + * @return the daysOfWeek value. + */ + @Generated + public List getDaysOfWeek() { + return this.daysOfWeek; + } + + /** + * Set the daysOfWeek property: Recurrence set to repeat on the specified days of the week. + * + * @param daysOfWeek the daysOfWeek value to set. + * @return the WeeklyRecurrence object itself. + */ + @Generated + public WeeklyRecurrence setDaysOfWeek(List daysOfWeek) { + this.daysOfWeek = daysOfWeek; + this.updatedProperties.add("daysOfWeek"); + return this; + } + + /** + * Get the interval property: The interval at which the recurrence should repeat. It signifies the number of weeks + * between each recurrence. + * + * @return the interval value. + */ + @Generated + public Integer getInterval() { + return this.interval; + } + + /** + * Set the interval property: The interval at which the recurrence should repeat. It signifies the number of weeks + * between each recurrence. + * + * @param interval the interval value to set. + * @return the WeeklyRecurrence object itself. + */ + @Generated + public WeeklyRecurrence setInterval(Integer interval) { + this.interval = interval; + this.updatedProperties.add("interval"); + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public WeeklyRecurrence setRecurrenceEnd(RecurrenceEnd recurrenceEnd) { + super.setRecurrenceEnd(recurrenceEnd); + this.updatedProperties.add("recurrenceEnd"); + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + if (JsonMergePatchHelper.getRecurrenceAccessor().isJsonMergePatch(this)) { + return toJsonMergePatch(jsonWriter); + } else { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("recurrenceEnd", getRecurrenceEnd()); + jsonWriter.writeStringField("frequency", this.frequency == null ? null : this.frequency.toString()); + jsonWriter.writeArrayField("daysOfWeek", this.daysOfWeek, + (writer, element) -> writer.writeString(element == null ? null : element.toString())); + jsonWriter.writeNumberField("interval", this.interval); + return jsonWriter.writeEndObject(); + } + } + + @Generated + private JsonWriter toJsonMergePatch(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + if (updatedProperties.contains("recurrenceEnd")) { + if (getRecurrenceEnd() == null) { + jsonWriter.writeNullField("recurrenceEnd"); + } else { + JsonMergePatchHelper.getRecurrenceEndAccessor().prepareModelForJsonMergePatch(getRecurrenceEnd(), true); + jsonWriter.writeJsonField("recurrenceEnd", getRecurrenceEnd()); + JsonMergePatchHelper.getRecurrenceEndAccessor() + .prepareModelForJsonMergePatch(getRecurrenceEnd(), false); + } + } + jsonWriter.writeStringField("frequency", this.frequency.toString()); + if (updatedProperties.contains("daysOfWeek")) { + if (this.daysOfWeek == null) { + jsonWriter.writeNullField("daysOfWeek"); + } else { + jsonWriter.writeArrayField("daysOfWeek", this.daysOfWeek, + (writer, element) -> writer.writeString(element.toString())); + } + } + if (updatedProperties.contains("interval")) { + if (this.interval == null) { + jsonWriter.writeNullField("interval"); + } else { + jsonWriter.writeNumberField("interval", this.interval); + } + } + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WeeklyRecurrence from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WeeklyRecurrence if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the WeeklyRecurrence. + */ + @Generated + public static WeeklyRecurrence fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WeeklyRecurrence deserializedWeeklyRecurrence = new WeeklyRecurrence(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("recurrenceEnd".equals(fieldName)) { + JsonMergePatchHelper.getRecurrenceAccessor() + .setRecurrenceEnd(deserializedWeeklyRecurrence, RecurrenceEnd.fromJson(reader)); + } else if ("frequency".equals(fieldName)) { + deserializedWeeklyRecurrence.frequency = Frequency.fromString(reader.getString()); + } else if ("daysOfWeek".equals(fieldName)) { + List daysOfWeek = reader.readArray(reader1 -> WeekDays.fromString(reader1.getString())); + deserializedWeeklyRecurrence.daysOfWeek = daysOfWeek; + } else if ("interval".equals(fieldName)) { + deserializedWeeklyRecurrence.interval = reader.getNullable(JsonReader::getInt); + } else { + reader.skipChildren(); + } + } + + return deserializedWeeklyRecurrence; + }); + } +} diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/package-info.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/package-info.java index b9dd67b8cd88..cf2423294b58 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/package-info.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/models/package-info.java @@ -1,10 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) TypeSpec Code Generator. + /** - * * Package containing the data models for LoadTesting. * These APIs allow end users to create, view and run load tests using Azure Load Test Service. - * */ package com.azure.developer.loadtesting.models; diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/package-info.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/package-info.java index 009f697b6870..704d263e2bfc 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/package-info.java +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/package-info.java @@ -1,8 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. + /** - * Package containing the classes for LoadTestingClient. These APIs allow end users to create, view and run load tests - * using Azure Load Test Service. + * Package containing the classes for LoadTesting. + * These APIs allow end users to create, view and run load tests using Azure Load Test Service. */ package com.azure.developer.loadtesting; 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 77ec5de9f67b..2cd5beb41bab 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 @@ -4,10 +4,10 @@ module com.azure.developer.loadtesting { requires transitive com.azure.core; - requires com.azure.json; exports com.azure.developer.loadtesting; exports com.azure.developer.loadtesting.models; + opens com.azure.developer.loadtesting.implementation.models to com.azure.core; opens com.azure.developer.loadtesting.models to com.azure.core; } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/resources/META-INF/azure-developer-loadtesting_apiview_properties.json b/sdk/loadtesting/azure-developer-loadtesting/src/main/resources/META-INF/azure-developer-loadtesting_apiview_properties.json index a71bce44534e..e857ca465782 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/resources/META-INF/azure-developer-loadtesting_apiview_properties.json +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/resources/META-INF/azure-developer-loadtesting_apiview_properties.json @@ -1,68 +1,110 @@ { "flavor": "azure", "CrossLanguageDefinitionId": { - "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient": "Customizations.AdministrationOperationsJava", - "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.createOrUpdateAppComponents": "Customizations.AdministrationOperationsJava.createOrUpdateAppComponents", - "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.createOrUpdateAppComponentsWithResponse": "Customizations.AdministrationOperationsJava.createOrUpdateAppComponents", - "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.createOrUpdateServerMetricsConfig": "Customizations.AdministrationOperationsJava.createOrUpdateServerMetricsConfig", - "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.createOrUpdateServerMetricsConfigWithResponse": "Customizations.AdministrationOperationsJava.createOrUpdateServerMetricsConfig", - "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.createOrUpdateTest": "Customizations.AdministrationOperationsJava.createOrUpdateTest", - "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.createOrUpdateTestProfile": "Customizations.AdministrationOperationsJava.createOrUpdateTestProfile", - "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.createOrUpdateTestProfileWithResponse": "Customizations.AdministrationOperationsJava.createOrUpdateTestProfile", - "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.createOrUpdateTestWithResponse": "Customizations.AdministrationOperationsJava.createOrUpdateTest", - "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.deleteTest": "Customizations.AdministrationOperationsJava.deleteTest", - "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.deleteTestFile": "Customizations.AdministrationOperationsJava.deleteTestFile", - "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.deleteTestFileWithResponse": "Customizations.AdministrationOperationsJava.deleteTestFile", - "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.deleteTestProfile": "Customizations.AdministrationOperationsJava.deleteTestProfile", - "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.deleteTestProfileWithResponse": "Customizations.AdministrationOperationsJava.deleteTestProfile", - "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.deleteTestWithResponse": "Customizations.AdministrationOperationsJava.deleteTest", - "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.getAppComponents": "Customizations.AdministrationOperationsJava.getAppComponents", - "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.getAppComponentsWithResponse": "Customizations.AdministrationOperationsJava.getAppComponents", - "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.getServerMetricsConfig": "Customizations.AdministrationOperationsJava.getServerMetricsConfig", - "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.getServerMetricsConfigWithResponse": "Customizations.AdministrationOperationsJava.getServerMetricsConfig", - "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.getTest": "Customizations.AdministrationOperationsJava.getTest", - "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.getTestFile": "Customizations.AdministrationOperationsJava.getTestFile", - "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.getTestFileWithResponse": "Customizations.AdministrationOperationsJava.getTestFile", - "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.getTestProfile": "Customizations.AdministrationOperationsJava.getTestProfile", - "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.getTestProfileWithResponse": "Customizations.AdministrationOperationsJava.getTestProfile", - "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.getTestWithResponse": "Customizations.AdministrationOperationsJava.getTest", - "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.listTestFiles": "Customizations.AdministrationOperationsJava.listTestFiles", - "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.listTestProfiles": "Customizations.AdministrationOperationsJava.listTestProfiles", - "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.listTests": "Customizations.AdministrationOperationsJava.listTests", - "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.uploadTestFile": "Customizations.AdministrationOperationsJava.uploadTestFile", - "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.uploadTestFileWithResponse": "Customizations.AdministrationOperationsJava.uploadTestFile", - "com.azure.developer.loadtesting.LoadTestAdministrationClient": "Customizations.AdministrationOperationsJava", - "com.azure.developer.loadtesting.LoadTestAdministrationClient.createOrUpdateAppComponents": "Customizations.AdministrationOperationsJava.createOrUpdateAppComponents", - "com.azure.developer.loadtesting.LoadTestAdministrationClient.createOrUpdateAppComponentsWithResponse": "Customizations.AdministrationOperationsJava.createOrUpdateAppComponents", - "com.azure.developer.loadtesting.LoadTestAdministrationClient.createOrUpdateServerMetricsConfig": "Customizations.AdministrationOperationsJava.createOrUpdateServerMetricsConfig", - "com.azure.developer.loadtesting.LoadTestAdministrationClient.createOrUpdateServerMetricsConfigWithResponse": "Customizations.AdministrationOperationsJava.createOrUpdateServerMetricsConfig", - "com.azure.developer.loadtesting.LoadTestAdministrationClient.createOrUpdateTest": "Customizations.AdministrationOperationsJava.createOrUpdateTest", - "com.azure.developer.loadtesting.LoadTestAdministrationClient.createOrUpdateTestProfile": "Customizations.AdministrationOperationsJava.createOrUpdateTestProfile", - "com.azure.developer.loadtesting.LoadTestAdministrationClient.createOrUpdateTestProfileWithResponse": "Customizations.AdministrationOperationsJava.createOrUpdateTestProfile", - "com.azure.developer.loadtesting.LoadTestAdministrationClient.createOrUpdateTestWithResponse": "Customizations.AdministrationOperationsJava.createOrUpdateTest", - "com.azure.developer.loadtesting.LoadTestAdministrationClient.deleteTest": "Customizations.AdministrationOperationsJava.deleteTest", - "com.azure.developer.loadtesting.LoadTestAdministrationClient.deleteTestFile": "Customizations.AdministrationOperationsJava.deleteTestFile", - "com.azure.developer.loadtesting.LoadTestAdministrationClient.deleteTestFileWithResponse": "Customizations.AdministrationOperationsJava.deleteTestFile", - "com.azure.developer.loadtesting.LoadTestAdministrationClient.deleteTestProfile": "Customizations.AdministrationOperationsJava.deleteTestProfile", - "com.azure.developer.loadtesting.LoadTestAdministrationClient.deleteTestProfileWithResponse": "Customizations.AdministrationOperationsJava.deleteTestProfile", - "com.azure.developer.loadtesting.LoadTestAdministrationClient.deleteTestWithResponse": "Customizations.AdministrationOperationsJava.deleteTest", - "com.azure.developer.loadtesting.LoadTestAdministrationClient.getAppComponents": "Customizations.AdministrationOperationsJava.getAppComponents", - "com.azure.developer.loadtesting.LoadTestAdministrationClient.getAppComponentsWithResponse": "Customizations.AdministrationOperationsJava.getAppComponents", - "com.azure.developer.loadtesting.LoadTestAdministrationClient.getServerMetricsConfig": "Customizations.AdministrationOperationsJava.getServerMetricsConfig", - "com.azure.developer.loadtesting.LoadTestAdministrationClient.getServerMetricsConfigWithResponse": "Customizations.AdministrationOperationsJava.getServerMetricsConfig", - "com.azure.developer.loadtesting.LoadTestAdministrationClient.getTest": "Customizations.AdministrationOperationsJava.getTest", - "com.azure.developer.loadtesting.LoadTestAdministrationClient.getTestFile": "Customizations.AdministrationOperationsJava.getTestFile", - "com.azure.developer.loadtesting.LoadTestAdministrationClient.getTestFileWithResponse": "Customizations.AdministrationOperationsJava.getTestFile", - "com.azure.developer.loadtesting.LoadTestAdministrationClient.getTestProfile": "Customizations.AdministrationOperationsJava.getTestProfile", - "com.azure.developer.loadtesting.LoadTestAdministrationClient.getTestProfileWithResponse": "Customizations.AdministrationOperationsJava.getTestProfile", - "com.azure.developer.loadtesting.LoadTestAdministrationClient.getTestWithResponse": "Customizations.AdministrationOperationsJava.getTest", - "com.azure.developer.loadtesting.LoadTestAdministrationClient.listTestFiles": "Customizations.AdministrationOperationsJava.listTestFiles", - "com.azure.developer.loadtesting.LoadTestAdministrationClient.listTestProfiles": "Customizations.AdministrationOperationsJava.listTestProfiles", - "com.azure.developer.loadtesting.LoadTestAdministrationClient.listTests": "Customizations.AdministrationOperationsJava.listTests", - "com.azure.developer.loadtesting.LoadTestAdministrationClient.uploadTestFile": "Customizations.AdministrationOperationsJava.uploadTestFile", - "com.azure.developer.loadtesting.LoadTestAdministrationClient.uploadTestFileWithResponse": "Customizations.AdministrationOperationsJava.uploadTestFile", - "com.azure.developer.loadtesting.LoadTestAdministrationClientBuilder": "Customizations.AdministrationOperationsJava", + "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient": "Customizations.AdministrationOperations", + "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.beginCloneTest": "Customizations.AdministrationOperations.cloneTest", + "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.beginCloneTestWithModel": "Customizations.AdministrationOperations.cloneTest", + "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.beginGenerateTestPlanRecommendations": "Customizations.AdministrationOperations.generateTestPlanRecommendations", + "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.beginGenerateTestPlanRecommendationsWithModel": "Customizations.AdministrationOperations.generateTestPlanRecommendations", + "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.createOrUpdateAppComponents": "Customizations.AdministrationOperations.createOrUpdateAppComponents", + "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.createOrUpdateAppComponentsWithResponse": "Customizations.AdministrationOperations.createOrUpdateAppComponents", + "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.createOrUpdateNotificationRule": "Customizations.AdministrationOperations.createOrUpdateNotificationRule", + "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.createOrUpdateNotificationRuleWithResponse": "Customizations.AdministrationOperations.createOrUpdateNotificationRule", + "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.createOrUpdateServerMetricsConfig": "Customizations.AdministrationOperations.createOrUpdateServerMetricsConfig", + "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.createOrUpdateServerMetricsConfigWithResponse": "Customizations.AdministrationOperations.createOrUpdateServerMetricsConfig", + "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.createOrUpdateTest": "Customizations.AdministrationOperations.createOrUpdateTest", + "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.createOrUpdateTestProfile": "Customizations.AdministrationOperations.createOrUpdateTestProfile", + "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.createOrUpdateTestProfileWithResponse": "Customizations.AdministrationOperations.createOrUpdateTestProfile", + "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.createOrUpdateTestWithResponse": "Customizations.AdministrationOperations.createOrUpdateTest", + "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.createOrUpdateTrigger": "Customizations.AdministrationOperations.createOrUpdateTrigger", + "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.createOrUpdateTriggerWithResponse": "Customizations.AdministrationOperations.createOrUpdateTrigger", + "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.deleteNotificationRule": "Customizations.AdministrationOperations.deleteNotificationRule", + "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.deleteNotificationRuleWithResponse": "Customizations.AdministrationOperations.deleteNotificationRule", + "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.deleteTest": "Customizations.AdministrationOperations.deleteTest", + "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.deleteTestFile": "Customizations.AdministrationOperations.deleteTestFile", + "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.deleteTestFileWithResponse": "Customizations.AdministrationOperations.deleteTestFile", + "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.deleteTestProfile": "Customizations.AdministrationOperations.deleteTestProfile", + "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.deleteTestProfileWithResponse": "Customizations.AdministrationOperations.deleteTestProfile", + "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.deleteTestWithResponse": "Customizations.AdministrationOperations.deleteTest", + "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.deleteTrigger": "Customizations.AdministrationOperations.deleteTrigger", + "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.deleteTriggerWithResponse": "Customizations.AdministrationOperations.deleteTrigger", + "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.getAppComponents": "Customizations.AdministrationOperations.getAppComponents", + "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.getAppComponentsWithResponse": "Customizations.AdministrationOperations.getAppComponents", + "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.getNotificationRule": "Customizations.AdministrationOperations.getNotificationRule", + "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.getNotificationRuleWithResponse": "Customizations.AdministrationOperations.getNotificationRule", + "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.getOperationStatus": "Customizations.AdministrationOperations.getOperationStatus", + "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.getOperationStatusWithResponse": "Customizations.AdministrationOperations.getOperationStatus", + "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.getServerMetricsConfig": "Customizations.AdministrationOperations.getServerMetricsConfig", + "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.getServerMetricsConfigWithResponse": "Customizations.AdministrationOperations.getServerMetricsConfig", + "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.getTest": "Customizations.AdministrationOperations.getTest", + "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.getTestFile": "Customizations.AdministrationOperations.getTestFile", + "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.getTestFileWithResponse": "Customizations.AdministrationOperations.getTestFile", + "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.getTestProfile": "Customizations.AdministrationOperations.getTestProfile", + "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.getTestProfileWithResponse": "Customizations.AdministrationOperations.getTestProfile", + "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.getTestWithResponse": "Customizations.AdministrationOperations.getTest", + "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.getTrigger": "Customizations.AdministrationOperations.getTrigger", + "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.getTriggerWithResponse": "Customizations.AdministrationOperations.getTrigger", + "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.listNotificationRules": "Customizations.AdministrationOperations.listNotificationRules", + "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.listTestFiles": "Customizations.AdministrationOperations.listTestFiles", + "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.listTestProfiles": "Customizations.AdministrationOperations.listTestProfiles", + "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.listTests": "Customizations.AdministrationOperations.listTests", + "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.listTriggers": "Customizations.AdministrationOperations.listTriggers", + "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.uploadTestFile": "Customizations.AdministrationOperations.uploadTestFile", + "com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.uploadTestFileWithResponse": "Customizations.AdministrationOperations.uploadTestFile", + "com.azure.developer.loadtesting.LoadTestAdministrationClient": "Customizations.AdministrationOperations", + "com.azure.developer.loadtesting.LoadTestAdministrationClient.beginCloneTest": "Customizations.AdministrationOperations.cloneTest", + "com.azure.developer.loadtesting.LoadTestAdministrationClient.beginCloneTestWithModel": "Customizations.AdministrationOperations.cloneTest", + "com.azure.developer.loadtesting.LoadTestAdministrationClient.beginGenerateTestPlanRecommendations": "Customizations.AdministrationOperations.generateTestPlanRecommendations", + "com.azure.developer.loadtesting.LoadTestAdministrationClient.beginGenerateTestPlanRecommendationsWithModel": "Customizations.AdministrationOperations.generateTestPlanRecommendations", + "com.azure.developer.loadtesting.LoadTestAdministrationClient.createOrUpdateAppComponents": "Customizations.AdministrationOperations.createOrUpdateAppComponents", + "com.azure.developer.loadtesting.LoadTestAdministrationClient.createOrUpdateAppComponentsWithResponse": "Customizations.AdministrationOperations.createOrUpdateAppComponents", + "com.azure.developer.loadtesting.LoadTestAdministrationClient.createOrUpdateNotificationRule": "Customizations.AdministrationOperations.createOrUpdateNotificationRule", + "com.azure.developer.loadtesting.LoadTestAdministrationClient.createOrUpdateNotificationRuleWithResponse": "Customizations.AdministrationOperations.createOrUpdateNotificationRule", + "com.azure.developer.loadtesting.LoadTestAdministrationClient.createOrUpdateServerMetricsConfig": "Customizations.AdministrationOperations.createOrUpdateServerMetricsConfig", + "com.azure.developer.loadtesting.LoadTestAdministrationClient.createOrUpdateServerMetricsConfigWithResponse": "Customizations.AdministrationOperations.createOrUpdateServerMetricsConfig", + "com.azure.developer.loadtesting.LoadTestAdministrationClient.createOrUpdateTest": "Customizations.AdministrationOperations.createOrUpdateTest", + "com.azure.developer.loadtesting.LoadTestAdministrationClient.createOrUpdateTestProfile": "Customizations.AdministrationOperations.createOrUpdateTestProfile", + "com.azure.developer.loadtesting.LoadTestAdministrationClient.createOrUpdateTestProfileWithResponse": "Customizations.AdministrationOperations.createOrUpdateTestProfile", + "com.azure.developer.loadtesting.LoadTestAdministrationClient.createOrUpdateTestWithResponse": "Customizations.AdministrationOperations.createOrUpdateTest", + "com.azure.developer.loadtesting.LoadTestAdministrationClient.createOrUpdateTrigger": "Customizations.AdministrationOperations.createOrUpdateTrigger", + "com.azure.developer.loadtesting.LoadTestAdministrationClient.createOrUpdateTriggerWithResponse": "Customizations.AdministrationOperations.createOrUpdateTrigger", + "com.azure.developer.loadtesting.LoadTestAdministrationClient.deleteNotificationRule": "Customizations.AdministrationOperations.deleteNotificationRule", + "com.azure.developer.loadtesting.LoadTestAdministrationClient.deleteNotificationRuleWithResponse": "Customizations.AdministrationOperations.deleteNotificationRule", + "com.azure.developer.loadtesting.LoadTestAdministrationClient.deleteTest": "Customizations.AdministrationOperations.deleteTest", + "com.azure.developer.loadtesting.LoadTestAdministrationClient.deleteTestFile": "Customizations.AdministrationOperations.deleteTestFile", + "com.azure.developer.loadtesting.LoadTestAdministrationClient.deleteTestFileWithResponse": "Customizations.AdministrationOperations.deleteTestFile", + "com.azure.developer.loadtesting.LoadTestAdministrationClient.deleteTestProfile": "Customizations.AdministrationOperations.deleteTestProfile", + "com.azure.developer.loadtesting.LoadTestAdministrationClient.deleteTestProfileWithResponse": "Customizations.AdministrationOperations.deleteTestProfile", + "com.azure.developer.loadtesting.LoadTestAdministrationClient.deleteTestWithResponse": "Customizations.AdministrationOperations.deleteTest", + "com.azure.developer.loadtesting.LoadTestAdministrationClient.deleteTrigger": "Customizations.AdministrationOperations.deleteTrigger", + "com.azure.developer.loadtesting.LoadTestAdministrationClient.deleteTriggerWithResponse": "Customizations.AdministrationOperations.deleteTrigger", + "com.azure.developer.loadtesting.LoadTestAdministrationClient.getAppComponents": "Customizations.AdministrationOperations.getAppComponents", + "com.azure.developer.loadtesting.LoadTestAdministrationClient.getAppComponentsWithResponse": "Customizations.AdministrationOperations.getAppComponents", + "com.azure.developer.loadtesting.LoadTestAdministrationClient.getNotificationRule": "Customizations.AdministrationOperations.getNotificationRule", + "com.azure.developer.loadtesting.LoadTestAdministrationClient.getNotificationRuleWithResponse": "Customizations.AdministrationOperations.getNotificationRule", + "com.azure.developer.loadtesting.LoadTestAdministrationClient.getOperationStatus": "Customizations.AdministrationOperations.getOperationStatus", + "com.azure.developer.loadtesting.LoadTestAdministrationClient.getOperationStatusWithResponse": "Customizations.AdministrationOperations.getOperationStatus", + "com.azure.developer.loadtesting.LoadTestAdministrationClient.getServerMetricsConfig": "Customizations.AdministrationOperations.getServerMetricsConfig", + "com.azure.developer.loadtesting.LoadTestAdministrationClient.getServerMetricsConfigWithResponse": "Customizations.AdministrationOperations.getServerMetricsConfig", + "com.azure.developer.loadtesting.LoadTestAdministrationClient.getTest": "Customizations.AdministrationOperations.getTest", + "com.azure.developer.loadtesting.LoadTestAdministrationClient.getTestFile": "Customizations.AdministrationOperations.getTestFile", + "com.azure.developer.loadtesting.LoadTestAdministrationClient.getTestFileWithResponse": "Customizations.AdministrationOperations.getTestFile", + "com.azure.developer.loadtesting.LoadTestAdministrationClient.getTestProfile": "Customizations.AdministrationOperations.getTestProfile", + "com.azure.developer.loadtesting.LoadTestAdministrationClient.getTestProfileWithResponse": "Customizations.AdministrationOperations.getTestProfile", + "com.azure.developer.loadtesting.LoadTestAdministrationClient.getTestWithResponse": "Customizations.AdministrationOperations.getTest", + "com.azure.developer.loadtesting.LoadTestAdministrationClient.getTrigger": "Customizations.AdministrationOperations.getTrigger", + "com.azure.developer.loadtesting.LoadTestAdministrationClient.getTriggerWithResponse": "Customizations.AdministrationOperations.getTrigger", + "com.azure.developer.loadtesting.LoadTestAdministrationClient.listNotificationRules": "Customizations.AdministrationOperations.listNotificationRules", + "com.azure.developer.loadtesting.LoadTestAdministrationClient.listTestFiles": "Customizations.AdministrationOperations.listTestFiles", + "com.azure.developer.loadtesting.LoadTestAdministrationClient.listTestProfiles": "Customizations.AdministrationOperations.listTestProfiles", + "com.azure.developer.loadtesting.LoadTestAdministrationClient.listTests": "Customizations.AdministrationOperations.listTests", + "com.azure.developer.loadtesting.LoadTestAdministrationClient.listTriggers": "Customizations.AdministrationOperations.listTriggers", + "com.azure.developer.loadtesting.LoadTestAdministrationClient.uploadTestFile": "Customizations.AdministrationOperations.uploadTestFile", + "com.azure.developer.loadtesting.LoadTestAdministrationClient.uploadTestFileWithResponse": "Customizations.AdministrationOperations.uploadTestFile", + "com.azure.developer.loadtesting.LoadTestAdministrationClientBuilder": "Customizations.AdministrationOperations", "com.azure.developer.loadtesting.LoadTestRunAsyncClient": "Customizations.TestRunOperations", + "com.azure.developer.loadtesting.LoadTestRunAsyncClient.beginGenerateTestRunInsights": "Customizations.TestRunOperations.generateTestRunInsights", + "com.azure.developer.loadtesting.LoadTestRunAsyncClient.beginGenerateTestRunInsightsWithModel": "Customizations.TestRunOperations.generateTestRunInsights", "com.azure.developer.loadtesting.LoadTestRunAsyncClient.createOrUpdateAppComponents": "Customizations.TestRunOperations.createOrUpdateAppComponents", "com.azure.developer.loadtesting.LoadTestRunAsyncClient.createOrUpdateAppComponentsWithResponse": "Customizations.TestRunOperations.createOrUpdateAppComponents", "com.azure.developer.loadtesting.LoadTestRunAsyncClient.createOrUpdateServerMetricsConfig": "Customizations.TestRunOperations.createOrUpdateServerMetricsConfig", @@ -77,6 +119,8 @@ "com.azure.developer.loadtesting.LoadTestRunAsyncClient.deleteTestRunWithResponse": "Customizations.TestRunOperations.deleteTestRun", "com.azure.developer.loadtesting.LoadTestRunAsyncClient.getAppComponents": "Customizations.TestRunOperations.getAppComponents", "com.azure.developer.loadtesting.LoadTestRunAsyncClient.getAppComponentsWithResponse": "Customizations.TestRunOperations.getAppComponents", + "com.azure.developer.loadtesting.LoadTestRunAsyncClient.getLatestTestRunInsights": "Customizations.TestRunOperations.getLatestTestRunInsights", + "com.azure.developer.loadtesting.LoadTestRunAsyncClient.getLatestTestRunInsightsWithResponse": "Customizations.TestRunOperations.getLatestTestRunInsights", "com.azure.developer.loadtesting.LoadTestRunAsyncClient.getMetricDefinitions": "Customizations.TestRunOperations.listMetricDefinitions", "com.azure.developer.loadtesting.LoadTestRunAsyncClient.getMetricDefinitionsWithResponse": "Customizations.TestRunOperations.listMetricDefinitions", "com.azure.developer.loadtesting.LoadTestRunAsyncClient.getMetricNamespaces": "Customizations.TestRunOperations.listMetricNamespaces", @@ -97,7 +141,11 @@ "com.azure.developer.loadtesting.LoadTestRunAsyncClient.stopTestProfileRunWithResponse": "Customizations.TestRunOperations.stopTestProfileRun", "com.azure.developer.loadtesting.LoadTestRunAsyncClient.stopTestRun": "Customizations.TestRunOperations.stop", "com.azure.developer.loadtesting.LoadTestRunAsyncClient.stopTestRunWithResponse": "Customizations.TestRunOperations.stop", + "com.azure.developer.loadtesting.LoadTestRunAsyncClient.updateLatestTestRunInsights": "Customizations.TestRunOperations.updateLatestTestRunInsights", + "com.azure.developer.loadtesting.LoadTestRunAsyncClient.updateLatestTestRunInsightsWithResponse": "Customizations.TestRunOperations.updateLatestTestRunInsights", "com.azure.developer.loadtesting.LoadTestRunClient": "Customizations.TestRunOperations", + "com.azure.developer.loadtesting.LoadTestRunClient.beginGenerateTestRunInsights": "Customizations.TestRunOperations.generateTestRunInsights", + "com.azure.developer.loadtesting.LoadTestRunClient.beginGenerateTestRunInsightsWithModel": "Customizations.TestRunOperations.generateTestRunInsights", "com.azure.developer.loadtesting.LoadTestRunClient.createOrUpdateAppComponents": "Customizations.TestRunOperations.createOrUpdateAppComponents", "com.azure.developer.loadtesting.LoadTestRunClient.createOrUpdateAppComponentsWithResponse": "Customizations.TestRunOperations.createOrUpdateAppComponents", "com.azure.developer.loadtesting.LoadTestRunClient.createOrUpdateServerMetricsConfig": "Customizations.TestRunOperations.createOrUpdateServerMetricsConfig", @@ -112,6 +160,8 @@ "com.azure.developer.loadtesting.LoadTestRunClient.deleteTestRunWithResponse": "Customizations.TestRunOperations.deleteTestRun", "com.azure.developer.loadtesting.LoadTestRunClient.getAppComponents": "Customizations.TestRunOperations.getAppComponents", "com.azure.developer.loadtesting.LoadTestRunClient.getAppComponentsWithResponse": "Customizations.TestRunOperations.getAppComponents", + "com.azure.developer.loadtesting.LoadTestRunClient.getLatestTestRunInsights": "Customizations.TestRunOperations.getLatestTestRunInsights", + "com.azure.developer.loadtesting.LoadTestRunClient.getLatestTestRunInsightsWithResponse": "Customizations.TestRunOperations.getLatestTestRunInsights", "com.azure.developer.loadtesting.LoadTestRunClient.getMetricDefinitions": "Customizations.TestRunOperations.listMetricDefinitions", "com.azure.developer.loadtesting.LoadTestRunClient.getMetricDefinitionsWithResponse": "Customizations.TestRunOperations.listMetricDefinitions", "com.azure.developer.loadtesting.LoadTestRunClient.getMetricNamespaces": "Customizations.TestRunOperations.listMetricNamespaces", @@ -132,18 +182,24 @@ "com.azure.developer.loadtesting.LoadTestRunClient.stopTestProfileRunWithResponse": "Customizations.TestRunOperations.stopTestProfileRun", "com.azure.developer.loadtesting.LoadTestRunClient.stopTestRun": "Customizations.TestRunOperations.stop", "com.azure.developer.loadtesting.LoadTestRunClient.stopTestRunWithResponse": "Customizations.TestRunOperations.stop", + "com.azure.developer.loadtesting.LoadTestRunClient.updateLatestTestRunInsights": "Customizations.TestRunOperations.updateLatestTestRunInsights", + "com.azure.developer.loadtesting.LoadTestRunClient.updateLatestTestRunInsightsWithResponse": "Customizations.TestRunOperations.updateLatestTestRunInsights", "com.azure.developer.loadtesting.LoadTestRunClientBuilder": "Customizations.TestRunOperations", + "com.azure.developer.loadtesting.implementation.models.CloneTestRequest1": "Customizations.cloneTest.Request.anonymous", "com.azure.developer.loadtesting.models.AggregationType": "Microsoft.LoadTestService.Aggregation", "com.azure.developer.loadtesting.models.ArtifactsContainerInfo": "Microsoft.LoadTestService.ArtifactsContainerInfo", "com.azure.developer.loadtesting.models.AutoStopCriteria": "Microsoft.LoadTestService.AutoStopCriteria", "com.azure.developer.loadtesting.models.CertificateType": "Microsoft.LoadTestService.CertificateType", "com.azure.developer.loadtesting.models.CreatedByType": "Microsoft.LoadTestService.CreatedByType", + "com.azure.developer.loadtesting.models.DailyRecurrence": "Microsoft.LoadTestService.DailyRecurrence", "com.azure.developer.loadtesting.models.DimensionFilter": "Microsoft.LoadTestService.DimensionFilter", "com.azure.developer.loadtesting.models.DimensionValue": "Microsoft.LoadTestService.DimensionValue", "com.azure.developer.loadtesting.models.ErrorDetails": "Microsoft.LoadTestService.ErrorDetails", "com.azure.developer.loadtesting.models.FileValidationStatus": "Microsoft.LoadTestService.FileValidationStatus", + "com.azure.developer.loadtesting.models.Frequency": "Microsoft.LoadTestService.Frequency", "com.azure.developer.loadtesting.models.FunctionFlexConsumptionResourceConfiguration": "Microsoft.LoadTestService.FunctionFlexConsumptionResourceConfiguration", "com.azure.developer.loadtesting.models.FunctionFlexConsumptionTargetResourceConfigurations": "Microsoft.LoadTestService.FunctionFlexConsumptionTargetResourceConfigurations", + "com.azure.developer.loadtesting.models.HourlyRecurrence": "Microsoft.LoadTestService.HourlyRecurrence", "com.azure.developer.loadtesting.models.LoadTest": "Microsoft.LoadTestService.Test", "com.azure.developer.loadtesting.models.LoadTestConfiguration": "Microsoft.LoadTestService.LoadTestConfiguration", "com.azure.developer.loadtesting.models.LoadTestKind": "Microsoft.LoadTestService.TestKind", @@ -159,7 +215,15 @@ "com.azure.developer.loadtesting.models.MetricUnit": "Microsoft.LoadTestService.MetricUnit", "com.azure.developer.loadtesting.models.MetricValue": "Microsoft.LoadTestService.MetricValue", "com.azure.developer.loadtesting.models.MetricsFilters": "Microsoft.LoadTestService.MetricRequestPayload", + "com.azure.developer.loadtesting.models.MonthlyRecurrenceByDates": "Microsoft.LoadTestService.MonthlyRecurrenceByDates", + "com.azure.developer.loadtesting.models.MonthlyRecurrenceByWeekDays": "Microsoft.LoadTestService.MonthlyRecurrenceByWeekDays", "com.azure.developer.loadtesting.models.NameAndDescription": "Microsoft.LoadTestService.NameAndDescription", + "com.azure.developer.loadtesting.models.NotificationEventType": "Microsoft.LoadTestService.NotificationEventType", + "com.azure.developer.loadtesting.models.NotificationRule": "Microsoft.LoadTestService.NotificationRule", + "com.azure.developer.loadtesting.models.NotificationScopeType": "Microsoft.LoadTestService.NotificationScopeType", + "com.azure.developer.loadtesting.models.OperationKind": "Microsoft.LoadTestService.OperationKind", + "com.azure.developer.loadtesting.models.OperationState": "Azure.Core.Foundations.OperationState", + "com.azure.developer.loadtesting.models.OperationStatus": "Microsoft.LoadTestService.OperationStatus", "com.azure.developer.loadtesting.models.OptionalLoadTestConfiguration": "Microsoft.LoadTestService.OptionalLoadTestConfiguration", "com.azure.developer.loadtesting.models.PassFailAction": "Microsoft.LoadTestService.PassFailAction", "com.azure.developer.loadtesting.models.PassFailAggregationFunction": "Microsoft.LoadTestService.PassFailAggregationFunction", @@ -170,16 +234,23 @@ "com.azure.developer.loadtesting.models.PassFailTestResult": "Microsoft.LoadTestService.PassFailTestResult", "com.azure.developer.loadtesting.models.PfMetrics": "Microsoft.LoadTestService.PFMetrics", "com.azure.developer.loadtesting.models.RecommendationCategory": "Microsoft.LoadTestService.RecommendationCategory", + "com.azure.developer.loadtesting.models.Recurrence": "Microsoft.LoadTestService.Recurrence", + "com.azure.developer.loadtesting.models.RecurrenceEnd": "Microsoft.LoadTestService.RecurrenceEnd", + "com.azure.developer.loadtesting.models.RecurrenceStatus": "Microsoft.LoadTestService.RecurrenceStatus", + "com.azure.developer.loadtesting.models.RecurrenceWithCron": "Microsoft.LoadTestService.RecurrenceWithCron", "com.azure.developer.loadtesting.models.RegionalConfiguration": "Microsoft.LoadTestService.RegionalConfiguration", "com.azure.developer.loadtesting.models.RequestDataLevel": "Microsoft.LoadTestService.RequestDataLevel", "com.azure.developer.loadtesting.models.ResourceKind": "Microsoft.LoadTestService.ResourceKind", "com.azure.developer.loadtesting.models.ResourceMetric": "Microsoft.LoadTestService.ResourceMetric", + "com.azure.developer.loadtesting.models.ScheduleTestsTrigger": "Microsoft.LoadTestService.ScheduleTestsTrigger", "com.azure.developer.loadtesting.models.SecretType": "Microsoft.LoadTestService.SecretType", + "com.azure.developer.loadtesting.models.StateDetails": "Microsoft.LoadTestService.StateDetails", "com.azure.developer.loadtesting.models.TargetResourceConfigurations": "Microsoft.LoadTestService.TargetResourceConfigurations", "com.azure.developer.loadtesting.models.TestAppComponents": "Microsoft.LoadTestService.TestAppComponents", "com.azure.developer.loadtesting.models.TestCertificate": "Microsoft.LoadTestService.CertificateMetadata", "com.azure.developer.loadtesting.models.TestFileInfo": "Microsoft.LoadTestService.TestFileInfo", "com.azure.developer.loadtesting.models.TestInputArtifacts": "Microsoft.LoadTestService.TestInputArtifacts", + "com.azure.developer.loadtesting.models.TestPreferences": "Microsoft.LoadTestService.TestPreferences", "com.azure.developer.loadtesting.models.TestProfile": "Microsoft.LoadTestService.TestProfile", "com.azure.developer.loadtesting.models.TestProfileRun": "Microsoft.LoadTestService.TestProfileRun", "com.azure.developer.loadtesting.models.TestProfileRunRecommendation": "Microsoft.LoadTestService.TestProfileRunRecommendation", @@ -187,15 +258,29 @@ "com.azure.developer.loadtesting.models.TestRunAppComponents": "Microsoft.LoadTestService.TestRunAppComponents", "com.azure.developer.loadtesting.models.TestRunArtifacts": "Microsoft.LoadTestService.TestRunArtifacts", "com.azure.developer.loadtesting.models.TestRunDetail": "Microsoft.LoadTestService.TestRunDetail", + "com.azure.developer.loadtesting.models.TestRunEndedEventCondition": "Microsoft.LoadTestService.TestRunEndedEventCondition", + "com.azure.developer.loadtesting.models.TestRunEndedNotificationEventFilter": "Microsoft.LoadTestService.TestRunEndedNotificationEventFilter", "com.azure.developer.loadtesting.models.TestRunFileInfo": "Microsoft.LoadTestService.TestRunFileInfo", "com.azure.developer.loadtesting.models.TestRunInputArtifacts": "Microsoft.LoadTestService.TestRunInputArtifacts", + "com.azure.developer.loadtesting.models.TestRunInsightColumn": "Microsoft.LoadTestService.TestRunInsightColumn", + "com.azure.developer.loadtesting.models.TestRunInsights": "Microsoft.LoadTestService.TestRunInsights", "com.azure.developer.loadtesting.models.TestRunOutputArtifacts": "Microsoft.LoadTestService.TestRunOutputArtifacts", "com.azure.developer.loadtesting.models.TestRunServerMetricsConfiguration": "Microsoft.LoadTestService.TestRunServerMetricsConfiguration", + "com.azure.developer.loadtesting.models.TestRunStartedNotificationEventFilter": "Microsoft.LoadTestService.TestRunStartedNotificationEventFilter", "com.azure.developer.loadtesting.models.TestRunStatistics": "Microsoft.LoadTestService.TestRunStatistics", "com.azure.developer.loadtesting.models.TestRunStatus": "Microsoft.LoadTestService.TestRunStatus", "com.azure.developer.loadtesting.models.TestSecret": "Microsoft.LoadTestService.Secret", "com.azure.developer.loadtesting.models.TestServerMetricsConfiguration": "Microsoft.LoadTestService.TestServerMetricsConfiguration", + "com.azure.developer.loadtesting.models.TestsNotificationEventFilter": "Microsoft.LoadTestService.TestsNotificationEventFilter", + "com.azure.developer.loadtesting.models.TestsNotificationRule": "Microsoft.LoadTestService.TestsNotificationRule", "com.azure.developer.loadtesting.models.TimeGrain": "Microsoft.LoadTestService.TimeGrain", - "com.azure.developer.loadtesting.models.TimeSeriesElement": "Microsoft.LoadTestService.TimeSeriesElement" + "com.azure.developer.loadtesting.models.TimeSeriesElement": "Microsoft.LoadTestService.TimeSeriesElement", + "com.azure.developer.loadtesting.models.Trigger": "Microsoft.LoadTestService.Trigger", + "com.azure.developer.loadtesting.models.TriggerCompletedNotificationEventFilter": "Microsoft.LoadTestService.TriggerCompletedNotificationEventFilter", + "com.azure.developer.loadtesting.models.TriggerDisabledNotificationEventFilter": "Microsoft.LoadTestService.TriggerDisabledNotificationEventFilter", + "com.azure.developer.loadtesting.models.TriggerState": "Microsoft.LoadTestService.TriggerState", + "com.azure.developer.loadtesting.models.TriggerType": "Microsoft.LoadTestService.TriggerType", + "com.azure.developer.loadtesting.models.WeekDays": "Microsoft.LoadTestService.WeekDays", + "com.azure.developer.loadtesting.models.WeeklyRecurrence": "Microsoft.LoadTestService.WeeklyRecurrence" } } diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/resources/META-INF/azure-developer-loadtesting_metadata.json b/sdk/loadtesting/azure-developer-loadtesting/src/main/resources/META-INF/azure-developer-loadtesting_metadata.json index 1101e2e613bd..1374f285daff 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/src/main/resources/META-INF/azure-developer-loadtesting_metadata.json +++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/resources/META-INF/azure-developer-loadtesting_metadata.json @@ -1 +1 @@ -{"flavor":"azure","apiVersion":"2024-12-01-preview","crossLanguageDefinitions":{"com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient":"Customizations.AdministrationOperationsJava","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.createOrUpdateAppComponents":"Customizations.AdministrationOperationsJava.createOrUpdateAppComponents","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.createOrUpdateAppComponentsWithResponse":"Customizations.AdministrationOperationsJava.createOrUpdateAppComponents","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.createOrUpdateServerMetricsConfig":"Customizations.AdministrationOperationsJava.createOrUpdateServerMetricsConfig","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.createOrUpdateServerMetricsConfigWithResponse":"Customizations.AdministrationOperationsJava.createOrUpdateServerMetricsConfig","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.createOrUpdateTest":"Customizations.AdministrationOperationsJava.createOrUpdateTest","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.createOrUpdateTestProfile":"Customizations.AdministrationOperationsJava.createOrUpdateTestProfile","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.createOrUpdateTestProfileWithResponse":"Customizations.AdministrationOperationsJava.createOrUpdateTestProfile","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.createOrUpdateTestWithResponse":"Customizations.AdministrationOperationsJava.createOrUpdateTest","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.deleteTest":"Customizations.AdministrationOperationsJava.deleteTest","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.deleteTestFile":"Customizations.AdministrationOperationsJava.deleteTestFile","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.deleteTestFileWithResponse":"Customizations.AdministrationOperationsJava.deleteTestFile","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.deleteTestProfile":"Customizations.AdministrationOperationsJava.deleteTestProfile","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.deleteTestProfileWithResponse":"Customizations.AdministrationOperationsJava.deleteTestProfile","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.deleteTestWithResponse":"Customizations.AdministrationOperationsJava.deleteTest","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.getAppComponents":"Customizations.AdministrationOperationsJava.getAppComponents","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.getAppComponentsWithResponse":"Customizations.AdministrationOperationsJava.getAppComponents","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.getServerMetricsConfig":"Customizations.AdministrationOperationsJava.getServerMetricsConfig","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.getServerMetricsConfigWithResponse":"Customizations.AdministrationOperationsJava.getServerMetricsConfig","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.getTest":"Customizations.AdministrationOperationsJava.getTest","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.getTestFile":"Customizations.AdministrationOperationsJava.getTestFile","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.getTestFileWithResponse":"Customizations.AdministrationOperationsJava.getTestFile","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.getTestProfile":"Customizations.AdministrationOperationsJava.getTestProfile","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.getTestProfileWithResponse":"Customizations.AdministrationOperationsJava.getTestProfile","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.getTestWithResponse":"Customizations.AdministrationOperationsJava.getTest","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.listTestFiles":"Customizations.AdministrationOperationsJava.listTestFiles","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.listTestProfiles":"Customizations.AdministrationOperationsJava.listTestProfiles","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.listTests":"Customizations.AdministrationOperationsJava.listTests","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.uploadTestFile":"Customizations.AdministrationOperationsJava.uploadTestFile","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.uploadTestFileWithResponse":"Customizations.AdministrationOperationsJava.uploadTestFile","com.azure.developer.loadtesting.LoadTestAdministrationClient":"Customizations.AdministrationOperationsJava","com.azure.developer.loadtesting.LoadTestAdministrationClient.createOrUpdateAppComponents":"Customizations.AdministrationOperationsJava.createOrUpdateAppComponents","com.azure.developer.loadtesting.LoadTestAdministrationClient.createOrUpdateAppComponentsWithResponse":"Customizations.AdministrationOperationsJava.createOrUpdateAppComponents","com.azure.developer.loadtesting.LoadTestAdministrationClient.createOrUpdateServerMetricsConfig":"Customizations.AdministrationOperationsJava.createOrUpdateServerMetricsConfig","com.azure.developer.loadtesting.LoadTestAdministrationClient.createOrUpdateServerMetricsConfigWithResponse":"Customizations.AdministrationOperationsJava.createOrUpdateServerMetricsConfig","com.azure.developer.loadtesting.LoadTestAdministrationClient.createOrUpdateTest":"Customizations.AdministrationOperationsJava.createOrUpdateTest","com.azure.developer.loadtesting.LoadTestAdministrationClient.createOrUpdateTestProfile":"Customizations.AdministrationOperationsJava.createOrUpdateTestProfile","com.azure.developer.loadtesting.LoadTestAdministrationClient.createOrUpdateTestProfileWithResponse":"Customizations.AdministrationOperationsJava.createOrUpdateTestProfile","com.azure.developer.loadtesting.LoadTestAdministrationClient.createOrUpdateTestWithResponse":"Customizations.AdministrationOperationsJava.createOrUpdateTest","com.azure.developer.loadtesting.LoadTestAdministrationClient.deleteTest":"Customizations.AdministrationOperationsJava.deleteTest","com.azure.developer.loadtesting.LoadTestAdministrationClient.deleteTestFile":"Customizations.AdministrationOperationsJava.deleteTestFile","com.azure.developer.loadtesting.LoadTestAdministrationClient.deleteTestFileWithResponse":"Customizations.AdministrationOperationsJava.deleteTestFile","com.azure.developer.loadtesting.LoadTestAdministrationClient.deleteTestProfile":"Customizations.AdministrationOperationsJava.deleteTestProfile","com.azure.developer.loadtesting.LoadTestAdministrationClient.deleteTestProfileWithResponse":"Customizations.AdministrationOperationsJava.deleteTestProfile","com.azure.developer.loadtesting.LoadTestAdministrationClient.deleteTestWithResponse":"Customizations.AdministrationOperationsJava.deleteTest","com.azure.developer.loadtesting.LoadTestAdministrationClient.getAppComponents":"Customizations.AdministrationOperationsJava.getAppComponents","com.azure.developer.loadtesting.LoadTestAdministrationClient.getAppComponentsWithResponse":"Customizations.AdministrationOperationsJava.getAppComponents","com.azure.developer.loadtesting.LoadTestAdministrationClient.getServerMetricsConfig":"Customizations.AdministrationOperationsJava.getServerMetricsConfig","com.azure.developer.loadtesting.LoadTestAdministrationClient.getServerMetricsConfigWithResponse":"Customizations.AdministrationOperationsJava.getServerMetricsConfig","com.azure.developer.loadtesting.LoadTestAdministrationClient.getTest":"Customizations.AdministrationOperationsJava.getTest","com.azure.developer.loadtesting.LoadTestAdministrationClient.getTestFile":"Customizations.AdministrationOperationsJava.getTestFile","com.azure.developer.loadtesting.LoadTestAdministrationClient.getTestFileWithResponse":"Customizations.AdministrationOperationsJava.getTestFile","com.azure.developer.loadtesting.LoadTestAdministrationClient.getTestProfile":"Customizations.AdministrationOperationsJava.getTestProfile","com.azure.developer.loadtesting.LoadTestAdministrationClient.getTestProfileWithResponse":"Customizations.AdministrationOperationsJava.getTestProfile","com.azure.developer.loadtesting.LoadTestAdministrationClient.getTestWithResponse":"Customizations.AdministrationOperationsJava.getTest","com.azure.developer.loadtesting.LoadTestAdministrationClient.listTestFiles":"Customizations.AdministrationOperationsJava.listTestFiles","com.azure.developer.loadtesting.LoadTestAdministrationClient.listTestProfiles":"Customizations.AdministrationOperationsJava.listTestProfiles","com.azure.developer.loadtesting.LoadTestAdministrationClient.listTests":"Customizations.AdministrationOperationsJava.listTests","com.azure.developer.loadtesting.LoadTestAdministrationClient.uploadTestFile":"Customizations.AdministrationOperationsJava.uploadTestFile","com.azure.developer.loadtesting.LoadTestAdministrationClient.uploadTestFileWithResponse":"Customizations.AdministrationOperationsJava.uploadTestFile","com.azure.developer.loadtesting.LoadTestAdministrationClientBuilder":"Customizations.AdministrationOperationsJava","com.azure.developer.loadtesting.LoadTestRunAsyncClient":"Customizations.TestRunOperations","com.azure.developer.loadtesting.LoadTestRunAsyncClient.createOrUpdateAppComponents":"Customizations.TestRunOperations.createOrUpdateAppComponents","com.azure.developer.loadtesting.LoadTestRunAsyncClient.createOrUpdateAppComponentsWithResponse":"Customizations.TestRunOperations.createOrUpdateAppComponents","com.azure.developer.loadtesting.LoadTestRunAsyncClient.createOrUpdateServerMetricsConfig":"Customizations.TestRunOperations.createOrUpdateServerMetricsConfig","com.azure.developer.loadtesting.LoadTestRunAsyncClient.createOrUpdateServerMetricsConfigWithResponse":"Customizations.TestRunOperations.createOrUpdateServerMetricsConfig","com.azure.developer.loadtesting.LoadTestRunAsyncClient.createOrUpdateTestProfileRun":"Customizations.TestRunOperations.createOrUpdateTestProfileRun","com.azure.developer.loadtesting.LoadTestRunAsyncClient.createOrUpdateTestProfileRunWithResponse":"Customizations.TestRunOperations.createOrUpdateTestProfileRun","com.azure.developer.loadtesting.LoadTestRunAsyncClient.createOrUpdateTestRun":"Customizations.TestRunOperations.createOrUpdateTestRun","com.azure.developer.loadtesting.LoadTestRunAsyncClient.createOrUpdateTestRunWithResponse":"Customizations.TestRunOperations.createOrUpdateTestRun","com.azure.developer.loadtesting.LoadTestRunAsyncClient.deleteTestProfileRun":"Customizations.TestRunOperations.deleteTestProfileRun","com.azure.developer.loadtesting.LoadTestRunAsyncClient.deleteTestProfileRunWithResponse":"Customizations.TestRunOperations.deleteTestProfileRun","com.azure.developer.loadtesting.LoadTestRunAsyncClient.deleteTestRun":"Customizations.TestRunOperations.deleteTestRun","com.azure.developer.loadtesting.LoadTestRunAsyncClient.deleteTestRunWithResponse":"Customizations.TestRunOperations.deleteTestRun","com.azure.developer.loadtesting.LoadTestRunAsyncClient.getAppComponents":"Customizations.TestRunOperations.getAppComponents","com.azure.developer.loadtesting.LoadTestRunAsyncClient.getAppComponentsWithResponse":"Customizations.TestRunOperations.getAppComponents","com.azure.developer.loadtesting.LoadTestRunAsyncClient.getMetricDefinitions":"Customizations.TestRunOperations.listMetricDefinitions","com.azure.developer.loadtesting.LoadTestRunAsyncClient.getMetricDefinitionsWithResponse":"Customizations.TestRunOperations.listMetricDefinitions","com.azure.developer.loadtesting.LoadTestRunAsyncClient.getMetricNamespaces":"Customizations.TestRunOperations.listMetricNamespaces","com.azure.developer.loadtesting.LoadTestRunAsyncClient.getMetricNamespacesWithResponse":"Customizations.TestRunOperations.listMetricNamespaces","com.azure.developer.loadtesting.LoadTestRunAsyncClient.getServerMetricsConfig":"Customizations.TestRunOperations.getServerMetricsConfig","com.azure.developer.loadtesting.LoadTestRunAsyncClient.getServerMetricsConfigWithResponse":"Customizations.TestRunOperations.getServerMetricsConfig","com.azure.developer.loadtesting.LoadTestRunAsyncClient.getTestProfileRun":"Customizations.TestRunOperations.getTestProfileRun","com.azure.developer.loadtesting.LoadTestRunAsyncClient.getTestProfileRunWithResponse":"Customizations.TestRunOperations.getTestProfileRun","com.azure.developer.loadtesting.LoadTestRunAsyncClient.getTestRun":"Customizations.TestRunOperations.getTestRun","com.azure.developer.loadtesting.LoadTestRunAsyncClient.getTestRunFile":"Customizations.TestRunOperations.getTestRunFile","com.azure.developer.loadtesting.LoadTestRunAsyncClient.getTestRunFileWithResponse":"Customizations.TestRunOperations.getTestRunFile","com.azure.developer.loadtesting.LoadTestRunAsyncClient.getTestRunWithResponse":"Customizations.TestRunOperations.getTestRun","com.azure.developer.loadtesting.LoadTestRunAsyncClient.listMetricDimensionValues":"Customizations.TestRunOperations.listMetricDimensionValues","com.azure.developer.loadtesting.LoadTestRunAsyncClient.listMetrics":"Customizations.TestRunOperations.listMetrics","com.azure.developer.loadtesting.LoadTestRunAsyncClient.listTestProfileRuns":"Customizations.TestRunOperations.listTestProfileRuns","com.azure.developer.loadtesting.LoadTestRunAsyncClient.listTestRuns":"Customizations.TestRunOperations.listTestRuns","com.azure.developer.loadtesting.LoadTestRunAsyncClient.stopTestProfileRun":"Customizations.TestRunOperations.stopTestProfileRun","com.azure.developer.loadtesting.LoadTestRunAsyncClient.stopTestProfileRunWithResponse":"Customizations.TestRunOperations.stopTestProfileRun","com.azure.developer.loadtesting.LoadTestRunAsyncClient.stopTestRun":"Customizations.TestRunOperations.stop","com.azure.developer.loadtesting.LoadTestRunAsyncClient.stopTestRunWithResponse":"Customizations.TestRunOperations.stop","com.azure.developer.loadtesting.LoadTestRunClient":"Customizations.TestRunOperations","com.azure.developer.loadtesting.LoadTestRunClient.createOrUpdateAppComponents":"Customizations.TestRunOperations.createOrUpdateAppComponents","com.azure.developer.loadtesting.LoadTestRunClient.createOrUpdateAppComponentsWithResponse":"Customizations.TestRunOperations.createOrUpdateAppComponents","com.azure.developer.loadtesting.LoadTestRunClient.createOrUpdateServerMetricsConfig":"Customizations.TestRunOperations.createOrUpdateServerMetricsConfig","com.azure.developer.loadtesting.LoadTestRunClient.createOrUpdateServerMetricsConfigWithResponse":"Customizations.TestRunOperations.createOrUpdateServerMetricsConfig","com.azure.developer.loadtesting.LoadTestRunClient.createOrUpdateTestProfileRun":"Customizations.TestRunOperations.createOrUpdateTestProfileRun","com.azure.developer.loadtesting.LoadTestRunClient.createOrUpdateTestProfileRunWithResponse":"Customizations.TestRunOperations.createOrUpdateTestProfileRun","com.azure.developer.loadtesting.LoadTestRunClient.createOrUpdateTestRun":"Customizations.TestRunOperations.createOrUpdateTestRun","com.azure.developer.loadtesting.LoadTestRunClient.createOrUpdateTestRunWithResponse":"Customizations.TestRunOperations.createOrUpdateTestRun","com.azure.developer.loadtesting.LoadTestRunClient.deleteTestProfileRun":"Customizations.TestRunOperations.deleteTestProfileRun","com.azure.developer.loadtesting.LoadTestRunClient.deleteTestProfileRunWithResponse":"Customizations.TestRunOperations.deleteTestProfileRun","com.azure.developer.loadtesting.LoadTestRunClient.deleteTestRun":"Customizations.TestRunOperations.deleteTestRun","com.azure.developer.loadtesting.LoadTestRunClient.deleteTestRunWithResponse":"Customizations.TestRunOperations.deleteTestRun","com.azure.developer.loadtesting.LoadTestRunClient.getAppComponents":"Customizations.TestRunOperations.getAppComponents","com.azure.developer.loadtesting.LoadTestRunClient.getAppComponentsWithResponse":"Customizations.TestRunOperations.getAppComponents","com.azure.developer.loadtesting.LoadTestRunClient.getMetricDefinitions":"Customizations.TestRunOperations.listMetricDefinitions","com.azure.developer.loadtesting.LoadTestRunClient.getMetricDefinitionsWithResponse":"Customizations.TestRunOperations.listMetricDefinitions","com.azure.developer.loadtesting.LoadTestRunClient.getMetricNamespaces":"Customizations.TestRunOperations.listMetricNamespaces","com.azure.developer.loadtesting.LoadTestRunClient.getMetricNamespacesWithResponse":"Customizations.TestRunOperations.listMetricNamespaces","com.azure.developer.loadtesting.LoadTestRunClient.getServerMetricsConfig":"Customizations.TestRunOperations.getServerMetricsConfig","com.azure.developer.loadtesting.LoadTestRunClient.getServerMetricsConfigWithResponse":"Customizations.TestRunOperations.getServerMetricsConfig","com.azure.developer.loadtesting.LoadTestRunClient.getTestProfileRun":"Customizations.TestRunOperations.getTestProfileRun","com.azure.developer.loadtesting.LoadTestRunClient.getTestProfileRunWithResponse":"Customizations.TestRunOperations.getTestProfileRun","com.azure.developer.loadtesting.LoadTestRunClient.getTestRun":"Customizations.TestRunOperations.getTestRun","com.azure.developer.loadtesting.LoadTestRunClient.getTestRunFile":"Customizations.TestRunOperations.getTestRunFile","com.azure.developer.loadtesting.LoadTestRunClient.getTestRunFileWithResponse":"Customizations.TestRunOperations.getTestRunFile","com.azure.developer.loadtesting.LoadTestRunClient.getTestRunWithResponse":"Customizations.TestRunOperations.getTestRun","com.azure.developer.loadtesting.LoadTestRunClient.listMetricDimensionValues":"Customizations.TestRunOperations.listMetricDimensionValues","com.azure.developer.loadtesting.LoadTestRunClient.listMetrics":"Customizations.TestRunOperations.listMetrics","com.azure.developer.loadtesting.LoadTestRunClient.listTestProfileRuns":"Customizations.TestRunOperations.listTestProfileRuns","com.azure.developer.loadtesting.LoadTestRunClient.listTestRuns":"Customizations.TestRunOperations.listTestRuns","com.azure.developer.loadtesting.LoadTestRunClient.stopTestProfileRun":"Customizations.TestRunOperations.stopTestProfileRun","com.azure.developer.loadtesting.LoadTestRunClient.stopTestProfileRunWithResponse":"Customizations.TestRunOperations.stopTestProfileRun","com.azure.developer.loadtesting.LoadTestRunClient.stopTestRun":"Customizations.TestRunOperations.stop","com.azure.developer.loadtesting.LoadTestRunClient.stopTestRunWithResponse":"Customizations.TestRunOperations.stop","com.azure.developer.loadtesting.LoadTestRunClientBuilder":"Customizations.TestRunOperations","com.azure.developer.loadtesting.models.AggregationType":"Microsoft.LoadTestService.Aggregation","com.azure.developer.loadtesting.models.ArtifactsContainerInfo":"Microsoft.LoadTestService.ArtifactsContainerInfo","com.azure.developer.loadtesting.models.AutoStopCriteria":"Microsoft.LoadTestService.AutoStopCriteria","com.azure.developer.loadtesting.models.CertificateType":"Microsoft.LoadTestService.CertificateType","com.azure.developer.loadtesting.models.CreatedByType":"Microsoft.LoadTestService.CreatedByType","com.azure.developer.loadtesting.models.DimensionFilter":"Microsoft.LoadTestService.DimensionFilter","com.azure.developer.loadtesting.models.DimensionValue":"Microsoft.LoadTestService.DimensionValue","com.azure.developer.loadtesting.models.ErrorDetails":"Microsoft.LoadTestService.ErrorDetails","com.azure.developer.loadtesting.models.FileValidationStatus":"Microsoft.LoadTestService.FileValidationStatus","com.azure.developer.loadtesting.models.FunctionFlexConsumptionResourceConfiguration":"Microsoft.LoadTestService.FunctionFlexConsumptionResourceConfiguration","com.azure.developer.loadtesting.models.FunctionFlexConsumptionTargetResourceConfigurations":"Microsoft.LoadTestService.FunctionFlexConsumptionTargetResourceConfigurations","com.azure.developer.loadtesting.models.LoadTest":"Microsoft.LoadTestService.Test","com.azure.developer.loadtesting.models.LoadTestConfiguration":"Microsoft.LoadTestService.LoadTestConfiguration","com.azure.developer.loadtesting.models.LoadTestKind":"Microsoft.LoadTestService.TestKind","com.azure.developer.loadtesting.models.LoadTestRun":"Microsoft.LoadTestService.TestRun","com.azure.developer.loadtesting.models.LoadTestingAppComponent":"Microsoft.LoadTestService.AppComponent","com.azure.developer.loadtesting.models.LoadTestingFileType":"Microsoft.LoadTestService.FileType","com.azure.developer.loadtesting.models.LoadTestingManagedIdentityType":"Microsoft.LoadTestService.ManagedIdentityType","com.azure.developer.loadtesting.models.MetricAvailability":"Microsoft.LoadTestService.MetricAvailability","com.azure.developer.loadtesting.models.MetricDefinition":"Microsoft.LoadTestService.MetricDefinition","com.azure.developer.loadtesting.models.MetricDefinitions":"Microsoft.LoadTestService.MetricDefinitionCollection","com.azure.developer.loadtesting.models.MetricNamespace":"Microsoft.LoadTestService.MetricNamespace","com.azure.developer.loadtesting.models.MetricNamespaces":"Microsoft.LoadTestService.MetricNamespaceCollection","com.azure.developer.loadtesting.models.MetricUnit":"Microsoft.LoadTestService.MetricUnit","com.azure.developer.loadtesting.models.MetricValue":"Microsoft.LoadTestService.MetricValue","com.azure.developer.loadtesting.models.MetricsFilters":"Microsoft.LoadTestService.MetricRequestPayload","com.azure.developer.loadtesting.models.NameAndDescription":"Microsoft.LoadTestService.NameAndDescription","com.azure.developer.loadtesting.models.OptionalLoadTestConfiguration":"Microsoft.LoadTestService.OptionalLoadTestConfiguration","com.azure.developer.loadtesting.models.PassFailAction":"Microsoft.LoadTestService.PassFailAction","com.azure.developer.loadtesting.models.PassFailAggregationFunction":"Microsoft.LoadTestService.PassFailAggregationFunction","com.azure.developer.loadtesting.models.PassFailCriteria":"Microsoft.LoadTestService.PassFailCriteria","com.azure.developer.loadtesting.models.PassFailMetric":"Microsoft.LoadTestService.PassFailMetric","com.azure.developer.loadtesting.models.PassFailResult":"Microsoft.LoadTestService.PassFailResult","com.azure.developer.loadtesting.models.PassFailServerMetric":"Microsoft.LoadTestService.PassFailServerMetric","com.azure.developer.loadtesting.models.PassFailTestResult":"Microsoft.LoadTestService.PassFailTestResult","com.azure.developer.loadtesting.models.PfMetrics":"Microsoft.LoadTestService.PFMetrics","com.azure.developer.loadtesting.models.RecommendationCategory":"Microsoft.LoadTestService.RecommendationCategory","com.azure.developer.loadtesting.models.RegionalConfiguration":"Microsoft.LoadTestService.RegionalConfiguration","com.azure.developer.loadtesting.models.RequestDataLevel":"Microsoft.LoadTestService.RequestDataLevel","com.azure.developer.loadtesting.models.ResourceKind":"Microsoft.LoadTestService.ResourceKind","com.azure.developer.loadtesting.models.ResourceMetric":"Microsoft.LoadTestService.ResourceMetric","com.azure.developer.loadtesting.models.SecretType":"Microsoft.LoadTestService.SecretType","com.azure.developer.loadtesting.models.TargetResourceConfigurations":"Microsoft.LoadTestService.TargetResourceConfigurations","com.azure.developer.loadtesting.models.TestAppComponents":"Microsoft.LoadTestService.TestAppComponents","com.azure.developer.loadtesting.models.TestCertificate":"Microsoft.LoadTestService.CertificateMetadata","com.azure.developer.loadtesting.models.TestFileInfo":"Microsoft.LoadTestService.TestFileInfo","com.azure.developer.loadtesting.models.TestInputArtifacts":"Microsoft.LoadTestService.TestInputArtifacts","com.azure.developer.loadtesting.models.TestProfile":"Microsoft.LoadTestService.TestProfile","com.azure.developer.loadtesting.models.TestProfileRun":"Microsoft.LoadTestService.TestProfileRun","com.azure.developer.loadtesting.models.TestProfileRunRecommendation":"Microsoft.LoadTestService.TestProfileRunRecommendation","com.azure.developer.loadtesting.models.TestProfileRunStatus":"Microsoft.LoadTestService.TestProfileRunStatus","com.azure.developer.loadtesting.models.TestRunAppComponents":"Microsoft.LoadTestService.TestRunAppComponents","com.azure.developer.loadtesting.models.TestRunArtifacts":"Microsoft.LoadTestService.TestRunArtifacts","com.azure.developer.loadtesting.models.TestRunDetail":"Microsoft.LoadTestService.TestRunDetail","com.azure.developer.loadtesting.models.TestRunFileInfo":"Microsoft.LoadTestService.TestRunFileInfo","com.azure.developer.loadtesting.models.TestRunInputArtifacts":"Microsoft.LoadTestService.TestRunInputArtifacts","com.azure.developer.loadtesting.models.TestRunOutputArtifacts":"Microsoft.LoadTestService.TestRunOutputArtifacts","com.azure.developer.loadtesting.models.TestRunServerMetricsConfiguration":"Microsoft.LoadTestService.TestRunServerMetricsConfiguration","com.azure.developer.loadtesting.models.TestRunStatistics":"Microsoft.LoadTestService.TestRunStatistics","com.azure.developer.loadtesting.models.TestRunStatus":"Microsoft.LoadTestService.TestRunStatus","com.azure.developer.loadtesting.models.TestSecret":"Microsoft.LoadTestService.Secret","com.azure.developer.loadtesting.models.TestServerMetricsConfiguration":"Microsoft.LoadTestService.TestServerMetricsConfiguration","com.azure.developer.loadtesting.models.TimeGrain":"Microsoft.LoadTestService.TimeGrain","com.azure.developer.loadtesting.models.TimeSeriesElement":"Microsoft.LoadTestService.TimeSeriesElement"},"generatedFiles":["src/main/java/com/azure/developer/loadtesting/LoadTestAdministrationAsyncClient.java","src/main/java/com/azure/developer/loadtesting/LoadTestAdministrationClient.java","src/main/java/com/azure/developer/loadtesting/LoadTestAdministrationClientBuilder.java","src/main/java/com/azure/developer/loadtesting/LoadTestRunAsyncClient.java","src/main/java/com/azure/developer/loadtesting/LoadTestRunClient.java","src/main/java/com/azure/developer/loadtesting/LoadTestRunClientBuilder.java","src/main/java/com/azure/developer/loadtesting/LoadTestingServiceVersion.java","src/main/java/com/azure/developer/loadtesting/LoadTestingServiceVersion.java","src/main/java/com/azure/developer/loadtesting/implementation/JsonMergePatchHelper.java","src/main/java/com/azure/developer/loadtesting/implementation/LoadTestAdministrationClientImpl.java","src/main/java/com/azure/developer/loadtesting/implementation/LoadTestRunClientImpl.java","src/main/java/com/azure/developer/loadtesting/implementation/package-info.java","src/main/java/com/azure/developer/loadtesting/models/AggregationType.java","src/main/java/com/azure/developer/loadtesting/models/ArtifactsContainerInfo.java","src/main/java/com/azure/developer/loadtesting/models/AutoStopCriteria.java","src/main/java/com/azure/developer/loadtesting/models/CertificateType.java","src/main/java/com/azure/developer/loadtesting/models/CreatedByType.java","src/main/java/com/azure/developer/loadtesting/models/DimensionFilter.java","src/main/java/com/azure/developer/loadtesting/models/DimensionValue.java","src/main/java/com/azure/developer/loadtesting/models/ErrorDetails.java","src/main/java/com/azure/developer/loadtesting/models/FileValidationStatus.java","src/main/java/com/azure/developer/loadtesting/models/FunctionFlexConsumptionResourceConfiguration.java","src/main/java/com/azure/developer/loadtesting/models/FunctionFlexConsumptionTargetResourceConfigurations.java","src/main/java/com/azure/developer/loadtesting/models/LoadTest.java","src/main/java/com/azure/developer/loadtesting/models/LoadTestConfiguration.java","src/main/java/com/azure/developer/loadtesting/models/LoadTestKind.java","src/main/java/com/azure/developer/loadtesting/models/LoadTestRun.java","src/main/java/com/azure/developer/loadtesting/models/LoadTestingAppComponent.java","src/main/java/com/azure/developer/loadtesting/models/LoadTestingFileType.java","src/main/java/com/azure/developer/loadtesting/models/LoadTestingManagedIdentityType.java","src/main/java/com/azure/developer/loadtesting/models/MetricAvailability.java","src/main/java/com/azure/developer/loadtesting/models/MetricDefinition.java","src/main/java/com/azure/developer/loadtesting/models/MetricDefinitions.java","src/main/java/com/azure/developer/loadtesting/models/MetricNamespace.java","src/main/java/com/azure/developer/loadtesting/models/MetricNamespaces.java","src/main/java/com/azure/developer/loadtesting/models/MetricUnit.java","src/main/java/com/azure/developer/loadtesting/models/MetricValue.java","src/main/java/com/azure/developer/loadtesting/models/MetricsFilters.java","src/main/java/com/azure/developer/loadtesting/models/NameAndDescription.java","src/main/java/com/azure/developer/loadtesting/models/OptionalLoadTestConfiguration.java","src/main/java/com/azure/developer/loadtesting/models/PassFailAction.java","src/main/java/com/azure/developer/loadtesting/models/PassFailAggregationFunction.java","src/main/java/com/azure/developer/loadtesting/models/PassFailCriteria.java","src/main/java/com/azure/developer/loadtesting/models/PassFailMetric.java","src/main/java/com/azure/developer/loadtesting/models/PassFailResult.java","src/main/java/com/azure/developer/loadtesting/models/PassFailServerMetric.java","src/main/java/com/azure/developer/loadtesting/models/PassFailTestResult.java","src/main/java/com/azure/developer/loadtesting/models/PfMetrics.java","src/main/java/com/azure/developer/loadtesting/models/RecommendationCategory.java","src/main/java/com/azure/developer/loadtesting/models/RegionalConfiguration.java","src/main/java/com/azure/developer/loadtesting/models/RequestDataLevel.java","src/main/java/com/azure/developer/loadtesting/models/ResourceKind.java","src/main/java/com/azure/developer/loadtesting/models/ResourceMetric.java","src/main/java/com/azure/developer/loadtesting/models/SecretType.java","src/main/java/com/azure/developer/loadtesting/models/TargetResourceConfigurations.java","src/main/java/com/azure/developer/loadtesting/models/TestAppComponents.java","src/main/java/com/azure/developer/loadtesting/models/TestCertificate.java","src/main/java/com/azure/developer/loadtesting/models/TestFileInfo.java","src/main/java/com/azure/developer/loadtesting/models/TestInputArtifacts.java","src/main/java/com/azure/developer/loadtesting/models/TestProfile.java","src/main/java/com/azure/developer/loadtesting/models/TestProfileRun.java","src/main/java/com/azure/developer/loadtesting/models/TestProfileRunRecommendation.java","src/main/java/com/azure/developer/loadtesting/models/TestProfileRunStatus.java","src/main/java/com/azure/developer/loadtesting/models/TestRunAppComponents.java","src/main/java/com/azure/developer/loadtesting/models/TestRunArtifacts.java","src/main/java/com/azure/developer/loadtesting/models/TestRunDetail.java","src/main/java/com/azure/developer/loadtesting/models/TestRunFileInfo.java","src/main/java/com/azure/developer/loadtesting/models/TestRunInputArtifacts.java","src/main/java/com/azure/developer/loadtesting/models/TestRunOutputArtifacts.java","src/main/java/com/azure/developer/loadtesting/models/TestRunServerMetricsConfiguration.java","src/main/java/com/azure/developer/loadtesting/models/TestRunStatistics.java","src/main/java/com/azure/developer/loadtesting/models/TestRunStatus.java","src/main/java/com/azure/developer/loadtesting/models/TestSecret.java","src/main/java/com/azure/developer/loadtesting/models/TestServerMetricsConfiguration.java","src/main/java/com/azure/developer/loadtesting/models/TimeGrain.java","src/main/java/com/azure/developer/loadtesting/models/TimeSeriesElement.java","src/main/java/com/azure/developer/loadtesting/models/package-info.java","src/main/java/com/azure/developer/loadtesting/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file +{"flavor":"azure","apiVersion":"2025-11-01-preview","crossLanguageDefinitions":{"com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient":"Customizations.AdministrationOperations","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.beginCloneTest":"Customizations.AdministrationOperations.cloneTest","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.beginCloneTestWithModel":"Customizations.AdministrationOperations.cloneTest","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.beginGenerateTestPlanRecommendations":"Customizations.AdministrationOperations.generateTestPlanRecommendations","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.beginGenerateTestPlanRecommendationsWithModel":"Customizations.AdministrationOperations.generateTestPlanRecommendations","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.createOrUpdateAppComponents":"Customizations.AdministrationOperations.createOrUpdateAppComponents","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.createOrUpdateAppComponentsWithResponse":"Customizations.AdministrationOperations.createOrUpdateAppComponents","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.createOrUpdateNotificationRule":"Customizations.AdministrationOperations.createOrUpdateNotificationRule","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.createOrUpdateNotificationRuleWithResponse":"Customizations.AdministrationOperations.createOrUpdateNotificationRule","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.createOrUpdateServerMetricsConfig":"Customizations.AdministrationOperations.createOrUpdateServerMetricsConfig","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.createOrUpdateServerMetricsConfigWithResponse":"Customizations.AdministrationOperations.createOrUpdateServerMetricsConfig","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.createOrUpdateTest":"Customizations.AdministrationOperations.createOrUpdateTest","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.createOrUpdateTestProfile":"Customizations.AdministrationOperations.createOrUpdateTestProfile","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.createOrUpdateTestProfileWithResponse":"Customizations.AdministrationOperations.createOrUpdateTestProfile","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.createOrUpdateTestWithResponse":"Customizations.AdministrationOperations.createOrUpdateTest","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.createOrUpdateTrigger":"Customizations.AdministrationOperations.createOrUpdateTrigger","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.createOrUpdateTriggerWithResponse":"Customizations.AdministrationOperations.createOrUpdateTrigger","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.deleteNotificationRule":"Customizations.AdministrationOperations.deleteNotificationRule","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.deleteNotificationRuleWithResponse":"Customizations.AdministrationOperations.deleteNotificationRule","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.deleteTest":"Customizations.AdministrationOperations.deleteTest","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.deleteTestFile":"Customizations.AdministrationOperations.deleteTestFile","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.deleteTestFileWithResponse":"Customizations.AdministrationOperations.deleteTestFile","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.deleteTestProfile":"Customizations.AdministrationOperations.deleteTestProfile","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.deleteTestProfileWithResponse":"Customizations.AdministrationOperations.deleteTestProfile","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.deleteTestWithResponse":"Customizations.AdministrationOperations.deleteTest","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.deleteTrigger":"Customizations.AdministrationOperations.deleteTrigger","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.deleteTriggerWithResponse":"Customizations.AdministrationOperations.deleteTrigger","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.getAppComponents":"Customizations.AdministrationOperations.getAppComponents","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.getAppComponentsWithResponse":"Customizations.AdministrationOperations.getAppComponents","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.getNotificationRule":"Customizations.AdministrationOperations.getNotificationRule","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.getNotificationRuleWithResponse":"Customizations.AdministrationOperations.getNotificationRule","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.getOperationStatus":"Customizations.AdministrationOperations.getOperationStatus","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.getOperationStatusWithResponse":"Customizations.AdministrationOperations.getOperationStatus","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.getServerMetricsConfig":"Customizations.AdministrationOperations.getServerMetricsConfig","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.getServerMetricsConfigWithResponse":"Customizations.AdministrationOperations.getServerMetricsConfig","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.getTest":"Customizations.AdministrationOperations.getTest","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.getTestFile":"Customizations.AdministrationOperations.getTestFile","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.getTestFileWithResponse":"Customizations.AdministrationOperations.getTestFile","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.getTestProfile":"Customizations.AdministrationOperations.getTestProfile","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.getTestProfileWithResponse":"Customizations.AdministrationOperations.getTestProfile","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.getTestWithResponse":"Customizations.AdministrationOperations.getTest","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.getTrigger":"Customizations.AdministrationOperations.getTrigger","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.getTriggerWithResponse":"Customizations.AdministrationOperations.getTrigger","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.listNotificationRules":"Customizations.AdministrationOperations.listNotificationRules","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.listTestFiles":"Customizations.AdministrationOperations.listTestFiles","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.listTestProfiles":"Customizations.AdministrationOperations.listTestProfiles","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.listTests":"Customizations.AdministrationOperations.listTests","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.listTriggers":"Customizations.AdministrationOperations.listTriggers","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.uploadTestFile":"Customizations.AdministrationOperations.uploadTestFile","com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient.uploadTestFileWithResponse":"Customizations.AdministrationOperations.uploadTestFile","com.azure.developer.loadtesting.LoadTestAdministrationClient":"Customizations.AdministrationOperations","com.azure.developer.loadtesting.LoadTestAdministrationClient.beginCloneTest":"Customizations.AdministrationOperations.cloneTest","com.azure.developer.loadtesting.LoadTestAdministrationClient.beginCloneTestWithModel":"Customizations.AdministrationOperations.cloneTest","com.azure.developer.loadtesting.LoadTestAdministrationClient.beginGenerateTestPlanRecommendations":"Customizations.AdministrationOperations.generateTestPlanRecommendations","com.azure.developer.loadtesting.LoadTestAdministrationClient.beginGenerateTestPlanRecommendationsWithModel":"Customizations.AdministrationOperations.generateTestPlanRecommendations","com.azure.developer.loadtesting.LoadTestAdministrationClient.createOrUpdateAppComponents":"Customizations.AdministrationOperations.createOrUpdateAppComponents","com.azure.developer.loadtesting.LoadTestAdministrationClient.createOrUpdateAppComponentsWithResponse":"Customizations.AdministrationOperations.createOrUpdateAppComponents","com.azure.developer.loadtesting.LoadTestAdministrationClient.createOrUpdateNotificationRule":"Customizations.AdministrationOperations.createOrUpdateNotificationRule","com.azure.developer.loadtesting.LoadTestAdministrationClient.createOrUpdateNotificationRuleWithResponse":"Customizations.AdministrationOperations.createOrUpdateNotificationRule","com.azure.developer.loadtesting.LoadTestAdministrationClient.createOrUpdateServerMetricsConfig":"Customizations.AdministrationOperations.createOrUpdateServerMetricsConfig","com.azure.developer.loadtesting.LoadTestAdministrationClient.createOrUpdateServerMetricsConfigWithResponse":"Customizations.AdministrationOperations.createOrUpdateServerMetricsConfig","com.azure.developer.loadtesting.LoadTestAdministrationClient.createOrUpdateTest":"Customizations.AdministrationOperations.createOrUpdateTest","com.azure.developer.loadtesting.LoadTestAdministrationClient.createOrUpdateTestProfile":"Customizations.AdministrationOperations.createOrUpdateTestProfile","com.azure.developer.loadtesting.LoadTestAdministrationClient.createOrUpdateTestProfileWithResponse":"Customizations.AdministrationOperations.createOrUpdateTestProfile","com.azure.developer.loadtesting.LoadTestAdministrationClient.createOrUpdateTestWithResponse":"Customizations.AdministrationOperations.createOrUpdateTest","com.azure.developer.loadtesting.LoadTestAdministrationClient.createOrUpdateTrigger":"Customizations.AdministrationOperations.createOrUpdateTrigger","com.azure.developer.loadtesting.LoadTestAdministrationClient.createOrUpdateTriggerWithResponse":"Customizations.AdministrationOperations.createOrUpdateTrigger","com.azure.developer.loadtesting.LoadTestAdministrationClient.deleteNotificationRule":"Customizations.AdministrationOperations.deleteNotificationRule","com.azure.developer.loadtesting.LoadTestAdministrationClient.deleteNotificationRuleWithResponse":"Customizations.AdministrationOperations.deleteNotificationRule","com.azure.developer.loadtesting.LoadTestAdministrationClient.deleteTest":"Customizations.AdministrationOperations.deleteTest","com.azure.developer.loadtesting.LoadTestAdministrationClient.deleteTestFile":"Customizations.AdministrationOperations.deleteTestFile","com.azure.developer.loadtesting.LoadTestAdministrationClient.deleteTestFileWithResponse":"Customizations.AdministrationOperations.deleteTestFile","com.azure.developer.loadtesting.LoadTestAdministrationClient.deleteTestProfile":"Customizations.AdministrationOperations.deleteTestProfile","com.azure.developer.loadtesting.LoadTestAdministrationClient.deleteTestProfileWithResponse":"Customizations.AdministrationOperations.deleteTestProfile","com.azure.developer.loadtesting.LoadTestAdministrationClient.deleteTestWithResponse":"Customizations.AdministrationOperations.deleteTest","com.azure.developer.loadtesting.LoadTestAdministrationClient.deleteTrigger":"Customizations.AdministrationOperations.deleteTrigger","com.azure.developer.loadtesting.LoadTestAdministrationClient.deleteTriggerWithResponse":"Customizations.AdministrationOperations.deleteTrigger","com.azure.developer.loadtesting.LoadTestAdministrationClient.getAppComponents":"Customizations.AdministrationOperations.getAppComponents","com.azure.developer.loadtesting.LoadTestAdministrationClient.getAppComponentsWithResponse":"Customizations.AdministrationOperations.getAppComponents","com.azure.developer.loadtesting.LoadTestAdministrationClient.getNotificationRule":"Customizations.AdministrationOperations.getNotificationRule","com.azure.developer.loadtesting.LoadTestAdministrationClient.getNotificationRuleWithResponse":"Customizations.AdministrationOperations.getNotificationRule","com.azure.developer.loadtesting.LoadTestAdministrationClient.getOperationStatus":"Customizations.AdministrationOperations.getOperationStatus","com.azure.developer.loadtesting.LoadTestAdministrationClient.getOperationStatusWithResponse":"Customizations.AdministrationOperations.getOperationStatus","com.azure.developer.loadtesting.LoadTestAdministrationClient.getServerMetricsConfig":"Customizations.AdministrationOperations.getServerMetricsConfig","com.azure.developer.loadtesting.LoadTestAdministrationClient.getServerMetricsConfigWithResponse":"Customizations.AdministrationOperations.getServerMetricsConfig","com.azure.developer.loadtesting.LoadTestAdministrationClient.getTest":"Customizations.AdministrationOperations.getTest","com.azure.developer.loadtesting.LoadTestAdministrationClient.getTestFile":"Customizations.AdministrationOperations.getTestFile","com.azure.developer.loadtesting.LoadTestAdministrationClient.getTestFileWithResponse":"Customizations.AdministrationOperations.getTestFile","com.azure.developer.loadtesting.LoadTestAdministrationClient.getTestProfile":"Customizations.AdministrationOperations.getTestProfile","com.azure.developer.loadtesting.LoadTestAdministrationClient.getTestProfileWithResponse":"Customizations.AdministrationOperations.getTestProfile","com.azure.developer.loadtesting.LoadTestAdministrationClient.getTestWithResponse":"Customizations.AdministrationOperations.getTest","com.azure.developer.loadtesting.LoadTestAdministrationClient.getTrigger":"Customizations.AdministrationOperations.getTrigger","com.azure.developer.loadtesting.LoadTestAdministrationClient.getTriggerWithResponse":"Customizations.AdministrationOperations.getTrigger","com.azure.developer.loadtesting.LoadTestAdministrationClient.listNotificationRules":"Customizations.AdministrationOperations.listNotificationRules","com.azure.developer.loadtesting.LoadTestAdministrationClient.listTestFiles":"Customizations.AdministrationOperations.listTestFiles","com.azure.developer.loadtesting.LoadTestAdministrationClient.listTestProfiles":"Customizations.AdministrationOperations.listTestProfiles","com.azure.developer.loadtesting.LoadTestAdministrationClient.listTests":"Customizations.AdministrationOperations.listTests","com.azure.developer.loadtesting.LoadTestAdministrationClient.listTriggers":"Customizations.AdministrationOperations.listTriggers","com.azure.developer.loadtesting.LoadTestAdministrationClient.uploadTestFile":"Customizations.AdministrationOperations.uploadTestFile","com.azure.developer.loadtesting.LoadTestAdministrationClient.uploadTestFileWithResponse":"Customizations.AdministrationOperations.uploadTestFile","com.azure.developer.loadtesting.LoadTestAdministrationClientBuilder":"Customizations.AdministrationOperations","com.azure.developer.loadtesting.LoadTestRunAsyncClient":"Customizations.TestRunOperations","com.azure.developer.loadtesting.LoadTestRunAsyncClient.beginGenerateTestRunInsights":"Customizations.TestRunOperations.generateTestRunInsights","com.azure.developer.loadtesting.LoadTestRunAsyncClient.beginGenerateTestRunInsightsWithModel":"Customizations.TestRunOperations.generateTestRunInsights","com.azure.developer.loadtesting.LoadTestRunAsyncClient.createOrUpdateAppComponents":"Customizations.TestRunOperations.createOrUpdateAppComponents","com.azure.developer.loadtesting.LoadTestRunAsyncClient.createOrUpdateAppComponentsWithResponse":"Customizations.TestRunOperations.createOrUpdateAppComponents","com.azure.developer.loadtesting.LoadTestRunAsyncClient.createOrUpdateServerMetricsConfig":"Customizations.TestRunOperations.createOrUpdateServerMetricsConfig","com.azure.developer.loadtesting.LoadTestRunAsyncClient.createOrUpdateServerMetricsConfigWithResponse":"Customizations.TestRunOperations.createOrUpdateServerMetricsConfig","com.azure.developer.loadtesting.LoadTestRunAsyncClient.createOrUpdateTestProfileRun":"Customizations.TestRunOperations.createOrUpdateTestProfileRun","com.azure.developer.loadtesting.LoadTestRunAsyncClient.createOrUpdateTestProfileRunWithResponse":"Customizations.TestRunOperations.createOrUpdateTestProfileRun","com.azure.developer.loadtesting.LoadTestRunAsyncClient.createOrUpdateTestRun":"Customizations.TestRunOperations.createOrUpdateTestRun","com.azure.developer.loadtesting.LoadTestRunAsyncClient.createOrUpdateTestRunWithResponse":"Customizations.TestRunOperations.createOrUpdateTestRun","com.azure.developer.loadtesting.LoadTestRunAsyncClient.deleteTestProfileRun":"Customizations.TestRunOperations.deleteTestProfileRun","com.azure.developer.loadtesting.LoadTestRunAsyncClient.deleteTestProfileRunWithResponse":"Customizations.TestRunOperations.deleteTestProfileRun","com.azure.developer.loadtesting.LoadTestRunAsyncClient.deleteTestRun":"Customizations.TestRunOperations.deleteTestRun","com.azure.developer.loadtesting.LoadTestRunAsyncClient.deleteTestRunWithResponse":"Customizations.TestRunOperations.deleteTestRun","com.azure.developer.loadtesting.LoadTestRunAsyncClient.getAppComponents":"Customizations.TestRunOperations.getAppComponents","com.azure.developer.loadtesting.LoadTestRunAsyncClient.getAppComponentsWithResponse":"Customizations.TestRunOperations.getAppComponents","com.azure.developer.loadtesting.LoadTestRunAsyncClient.getLatestTestRunInsights":"Customizations.TestRunOperations.getLatestTestRunInsights","com.azure.developer.loadtesting.LoadTestRunAsyncClient.getLatestTestRunInsightsWithResponse":"Customizations.TestRunOperations.getLatestTestRunInsights","com.azure.developer.loadtesting.LoadTestRunAsyncClient.getMetricDefinitions":"Customizations.TestRunOperations.listMetricDefinitions","com.azure.developer.loadtesting.LoadTestRunAsyncClient.getMetricDefinitionsWithResponse":"Customizations.TestRunOperations.listMetricDefinitions","com.azure.developer.loadtesting.LoadTestRunAsyncClient.getMetricNamespaces":"Customizations.TestRunOperations.listMetricNamespaces","com.azure.developer.loadtesting.LoadTestRunAsyncClient.getMetricNamespacesWithResponse":"Customizations.TestRunOperations.listMetricNamespaces","com.azure.developer.loadtesting.LoadTestRunAsyncClient.getServerMetricsConfig":"Customizations.TestRunOperations.getServerMetricsConfig","com.azure.developer.loadtesting.LoadTestRunAsyncClient.getServerMetricsConfigWithResponse":"Customizations.TestRunOperations.getServerMetricsConfig","com.azure.developer.loadtesting.LoadTestRunAsyncClient.getTestProfileRun":"Customizations.TestRunOperations.getTestProfileRun","com.azure.developer.loadtesting.LoadTestRunAsyncClient.getTestProfileRunWithResponse":"Customizations.TestRunOperations.getTestProfileRun","com.azure.developer.loadtesting.LoadTestRunAsyncClient.getTestRun":"Customizations.TestRunOperations.getTestRun","com.azure.developer.loadtesting.LoadTestRunAsyncClient.getTestRunFile":"Customizations.TestRunOperations.getTestRunFile","com.azure.developer.loadtesting.LoadTestRunAsyncClient.getTestRunFileWithResponse":"Customizations.TestRunOperations.getTestRunFile","com.azure.developer.loadtesting.LoadTestRunAsyncClient.getTestRunWithResponse":"Customizations.TestRunOperations.getTestRun","com.azure.developer.loadtesting.LoadTestRunAsyncClient.listMetricDimensionValues":"Customizations.TestRunOperations.listMetricDimensionValues","com.azure.developer.loadtesting.LoadTestRunAsyncClient.listMetrics":"Customizations.TestRunOperations.listMetrics","com.azure.developer.loadtesting.LoadTestRunAsyncClient.listTestProfileRuns":"Customizations.TestRunOperations.listTestProfileRuns","com.azure.developer.loadtesting.LoadTestRunAsyncClient.listTestRuns":"Customizations.TestRunOperations.listTestRuns","com.azure.developer.loadtesting.LoadTestRunAsyncClient.stopTestProfileRun":"Customizations.TestRunOperations.stopTestProfileRun","com.azure.developer.loadtesting.LoadTestRunAsyncClient.stopTestProfileRunWithResponse":"Customizations.TestRunOperations.stopTestProfileRun","com.azure.developer.loadtesting.LoadTestRunAsyncClient.stopTestRun":"Customizations.TestRunOperations.stop","com.azure.developer.loadtesting.LoadTestRunAsyncClient.stopTestRunWithResponse":"Customizations.TestRunOperations.stop","com.azure.developer.loadtesting.LoadTestRunAsyncClient.updateLatestTestRunInsights":"Customizations.TestRunOperations.updateLatestTestRunInsights","com.azure.developer.loadtesting.LoadTestRunAsyncClient.updateLatestTestRunInsightsWithResponse":"Customizations.TestRunOperations.updateLatestTestRunInsights","com.azure.developer.loadtesting.LoadTestRunClient":"Customizations.TestRunOperations","com.azure.developer.loadtesting.LoadTestRunClient.beginGenerateTestRunInsights":"Customizations.TestRunOperations.generateTestRunInsights","com.azure.developer.loadtesting.LoadTestRunClient.beginGenerateTestRunInsightsWithModel":"Customizations.TestRunOperations.generateTestRunInsights","com.azure.developer.loadtesting.LoadTestRunClient.createOrUpdateAppComponents":"Customizations.TestRunOperations.createOrUpdateAppComponents","com.azure.developer.loadtesting.LoadTestRunClient.createOrUpdateAppComponentsWithResponse":"Customizations.TestRunOperations.createOrUpdateAppComponents","com.azure.developer.loadtesting.LoadTestRunClient.createOrUpdateServerMetricsConfig":"Customizations.TestRunOperations.createOrUpdateServerMetricsConfig","com.azure.developer.loadtesting.LoadTestRunClient.createOrUpdateServerMetricsConfigWithResponse":"Customizations.TestRunOperations.createOrUpdateServerMetricsConfig","com.azure.developer.loadtesting.LoadTestRunClient.createOrUpdateTestProfileRun":"Customizations.TestRunOperations.createOrUpdateTestProfileRun","com.azure.developer.loadtesting.LoadTestRunClient.createOrUpdateTestProfileRunWithResponse":"Customizations.TestRunOperations.createOrUpdateTestProfileRun","com.azure.developer.loadtesting.LoadTestRunClient.createOrUpdateTestRun":"Customizations.TestRunOperations.createOrUpdateTestRun","com.azure.developer.loadtesting.LoadTestRunClient.createOrUpdateTestRunWithResponse":"Customizations.TestRunOperations.createOrUpdateTestRun","com.azure.developer.loadtesting.LoadTestRunClient.deleteTestProfileRun":"Customizations.TestRunOperations.deleteTestProfileRun","com.azure.developer.loadtesting.LoadTestRunClient.deleteTestProfileRunWithResponse":"Customizations.TestRunOperations.deleteTestProfileRun","com.azure.developer.loadtesting.LoadTestRunClient.deleteTestRun":"Customizations.TestRunOperations.deleteTestRun","com.azure.developer.loadtesting.LoadTestRunClient.deleteTestRunWithResponse":"Customizations.TestRunOperations.deleteTestRun","com.azure.developer.loadtesting.LoadTestRunClient.getAppComponents":"Customizations.TestRunOperations.getAppComponents","com.azure.developer.loadtesting.LoadTestRunClient.getAppComponentsWithResponse":"Customizations.TestRunOperations.getAppComponents","com.azure.developer.loadtesting.LoadTestRunClient.getLatestTestRunInsights":"Customizations.TestRunOperations.getLatestTestRunInsights","com.azure.developer.loadtesting.LoadTestRunClient.getLatestTestRunInsightsWithResponse":"Customizations.TestRunOperations.getLatestTestRunInsights","com.azure.developer.loadtesting.LoadTestRunClient.getMetricDefinitions":"Customizations.TestRunOperations.listMetricDefinitions","com.azure.developer.loadtesting.LoadTestRunClient.getMetricDefinitionsWithResponse":"Customizations.TestRunOperations.listMetricDefinitions","com.azure.developer.loadtesting.LoadTestRunClient.getMetricNamespaces":"Customizations.TestRunOperations.listMetricNamespaces","com.azure.developer.loadtesting.LoadTestRunClient.getMetricNamespacesWithResponse":"Customizations.TestRunOperations.listMetricNamespaces","com.azure.developer.loadtesting.LoadTestRunClient.getServerMetricsConfig":"Customizations.TestRunOperations.getServerMetricsConfig","com.azure.developer.loadtesting.LoadTestRunClient.getServerMetricsConfigWithResponse":"Customizations.TestRunOperations.getServerMetricsConfig","com.azure.developer.loadtesting.LoadTestRunClient.getTestProfileRun":"Customizations.TestRunOperations.getTestProfileRun","com.azure.developer.loadtesting.LoadTestRunClient.getTestProfileRunWithResponse":"Customizations.TestRunOperations.getTestProfileRun","com.azure.developer.loadtesting.LoadTestRunClient.getTestRun":"Customizations.TestRunOperations.getTestRun","com.azure.developer.loadtesting.LoadTestRunClient.getTestRunFile":"Customizations.TestRunOperations.getTestRunFile","com.azure.developer.loadtesting.LoadTestRunClient.getTestRunFileWithResponse":"Customizations.TestRunOperations.getTestRunFile","com.azure.developer.loadtesting.LoadTestRunClient.getTestRunWithResponse":"Customizations.TestRunOperations.getTestRun","com.azure.developer.loadtesting.LoadTestRunClient.listMetricDimensionValues":"Customizations.TestRunOperations.listMetricDimensionValues","com.azure.developer.loadtesting.LoadTestRunClient.listMetrics":"Customizations.TestRunOperations.listMetrics","com.azure.developer.loadtesting.LoadTestRunClient.listTestProfileRuns":"Customizations.TestRunOperations.listTestProfileRuns","com.azure.developer.loadtesting.LoadTestRunClient.listTestRuns":"Customizations.TestRunOperations.listTestRuns","com.azure.developer.loadtesting.LoadTestRunClient.stopTestProfileRun":"Customizations.TestRunOperations.stopTestProfileRun","com.azure.developer.loadtesting.LoadTestRunClient.stopTestProfileRunWithResponse":"Customizations.TestRunOperations.stopTestProfileRun","com.azure.developer.loadtesting.LoadTestRunClient.stopTestRun":"Customizations.TestRunOperations.stop","com.azure.developer.loadtesting.LoadTestRunClient.stopTestRunWithResponse":"Customizations.TestRunOperations.stop","com.azure.developer.loadtesting.LoadTestRunClient.updateLatestTestRunInsights":"Customizations.TestRunOperations.updateLatestTestRunInsights","com.azure.developer.loadtesting.LoadTestRunClient.updateLatestTestRunInsightsWithResponse":"Customizations.TestRunOperations.updateLatestTestRunInsights","com.azure.developer.loadtesting.LoadTestRunClientBuilder":"Customizations.TestRunOperations","com.azure.developer.loadtesting.implementation.models.CloneTestRequest1":"Customizations.cloneTest.Request.anonymous","com.azure.developer.loadtesting.models.AggregationType":"Microsoft.LoadTestService.Aggregation","com.azure.developer.loadtesting.models.ArtifactsContainerInfo":"Microsoft.LoadTestService.ArtifactsContainerInfo","com.azure.developer.loadtesting.models.AutoStopCriteria":"Microsoft.LoadTestService.AutoStopCriteria","com.azure.developer.loadtesting.models.CertificateType":"Microsoft.LoadTestService.CertificateType","com.azure.developer.loadtesting.models.CreatedByType":"Microsoft.LoadTestService.CreatedByType","com.azure.developer.loadtesting.models.DailyRecurrence":"Microsoft.LoadTestService.DailyRecurrence","com.azure.developer.loadtesting.models.DimensionFilter":"Microsoft.LoadTestService.DimensionFilter","com.azure.developer.loadtesting.models.DimensionValue":"Microsoft.LoadTestService.DimensionValue","com.azure.developer.loadtesting.models.ErrorDetails":"Microsoft.LoadTestService.ErrorDetails","com.azure.developer.loadtesting.models.FileValidationStatus":"Microsoft.LoadTestService.FileValidationStatus","com.azure.developer.loadtesting.models.Frequency":"Microsoft.LoadTestService.Frequency","com.azure.developer.loadtesting.models.FunctionFlexConsumptionResourceConfiguration":"Microsoft.LoadTestService.FunctionFlexConsumptionResourceConfiguration","com.azure.developer.loadtesting.models.FunctionFlexConsumptionTargetResourceConfigurations":"Microsoft.LoadTestService.FunctionFlexConsumptionTargetResourceConfigurations","com.azure.developer.loadtesting.models.HourlyRecurrence":"Microsoft.LoadTestService.HourlyRecurrence","com.azure.developer.loadtesting.models.LoadTest":"Microsoft.LoadTestService.Test","com.azure.developer.loadtesting.models.LoadTestConfiguration":"Microsoft.LoadTestService.LoadTestConfiguration","com.azure.developer.loadtesting.models.LoadTestKind":"Microsoft.LoadTestService.TestKind","com.azure.developer.loadtesting.models.LoadTestRun":"Microsoft.LoadTestService.TestRun","com.azure.developer.loadtesting.models.LoadTestingAppComponent":"Microsoft.LoadTestService.AppComponent","com.azure.developer.loadtesting.models.LoadTestingFileType":"Microsoft.LoadTestService.FileType","com.azure.developer.loadtesting.models.LoadTestingManagedIdentityType":"Microsoft.LoadTestService.ManagedIdentityType","com.azure.developer.loadtesting.models.MetricAvailability":"Microsoft.LoadTestService.MetricAvailability","com.azure.developer.loadtesting.models.MetricDefinition":"Microsoft.LoadTestService.MetricDefinition","com.azure.developer.loadtesting.models.MetricDefinitions":"Microsoft.LoadTestService.MetricDefinitionCollection","com.azure.developer.loadtesting.models.MetricNamespace":"Microsoft.LoadTestService.MetricNamespace","com.azure.developer.loadtesting.models.MetricNamespaces":"Microsoft.LoadTestService.MetricNamespaceCollection","com.azure.developer.loadtesting.models.MetricUnit":"Microsoft.LoadTestService.MetricUnit","com.azure.developer.loadtesting.models.MetricValue":"Microsoft.LoadTestService.MetricValue","com.azure.developer.loadtesting.models.MetricsFilters":"Microsoft.LoadTestService.MetricRequestPayload","com.azure.developer.loadtesting.models.MonthlyRecurrenceByDates":"Microsoft.LoadTestService.MonthlyRecurrenceByDates","com.azure.developer.loadtesting.models.MonthlyRecurrenceByWeekDays":"Microsoft.LoadTestService.MonthlyRecurrenceByWeekDays","com.azure.developer.loadtesting.models.NameAndDescription":"Microsoft.LoadTestService.NameAndDescription","com.azure.developer.loadtesting.models.NotificationEventType":"Microsoft.LoadTestService.NotificationEventType","com.azure.developer.loadtesting.models.NotificationRule":"Microsoft.LoadTestService.NotificationRule","com.azure.developer.loadtesting.models.NotificationScopeType":"Microsoft.LoadTestService.NotificationScopeType","com.azure.developer.loadtesting.models.OperationKind":"Microsoft.LoadTestService.OperationKind","com.azure.developer.loadtesting.models.OperationState":"Azure.Core.Foundations.OperationState","com.azure.developer.loadtesting.models.OperationStatus":"Microsoft.LoadTestService.OperationStatus","com.azure.developer.loadtesting.models.OptionalLoadTestConfiguration":"Microsoft.LoadTestService.OptionalLoadTestConfiguration","com.azure.developer.loadtesting.models.PassFailAction":"Microsoft.LoadTestService.PassFailAction","com.azure.developer.loadtesting.models.PassFailAggregationFunction":"Microsoft.LoadTestService.PassFailAggregationFunction","com.azure.developer.loadtesting.models.PassFailCriteria":"Microsoft.LoadTestService.PassFailCriteria","com.azure.developer.loadtesting.models.PassFailMetric":"Microsoft.LoadTestService.PassFailMetric","com.azure.developer.loadtesting.models.PassFailResult":"Microsoft.LoadTestService.PassFailResult","com.azure.developer.loadtesting.models.PassFailServerMetric":"Microsoft.LoadTestService.PassFailServerMetric","com.azure.developer.loadtesting.models.PassFailTestResult":"Microsoft.LoadTestService.PassFailTestResult","com.azure.developer.loadtesting.models.PfMetrics":"Microsoft.LoadTestService.PFMetrics","com.azure.developer.loadtesting.models.RecommendationCategory":"Microsoft.LoadTestService.RecommendationCategory","com.azure.developer.loadtesting.models.Recurrence":"Microsoft.LoadTestService.Recurrence","com.azure.developer.loadtesting.models.RecurrenceEnd":"Microsoft.LoadTestService.RecurrenceEnd","com.azure.developer.loadtesting.models.RecurrenceStatus":"Microsoft.LoadTestService.RecurrenceStatus","com.azure.developer.loadtesting.models.RecurrenceWithCron":"Microsoft.LoadTestService.RecurrenceWithCron","com.azure.developer.loadtesting.models.RegionalConfiguration":"Microsoft.LoadTestService.RegionalConfiguration","com.azure.developer.loadtesting.models.RequestDataLevel":"Microsoft.LoadTestService.RequestDataLevel","com.azure.developer.loadtesting.models.ResourceKind":"Microsoft.LoadTestService.ResourceKind","com.azure.developer.loadtesting.models.ResourceMetric":"Microsoft.LoadTestService.ResourceMetric","com.azure.developer.loadtesting.models.ScheduleTestsTrigger":"Microsoft.LoadTestService.ScheduleTestsTrigger","com.azure.developer.loadtesting.models.SecretType":"Microsoft.LoadTestService.SecretType","com.azure.developer.loadtesting.models.StateDetails":"Microsoft.LoadTestService.StateDetails","com.azure.developer.loadtesting.models.TargetResourceConfigurations":"Microsoft.LoadTestService.TargetResourceConfigurations","com.azure.developer.loadtesting.models.TestAppComponents":"Microsoft.LoadTestService.TestAppComponents","com.azure.developer.loadtesting.models.TestCertificate":"Microsoft.LoadTestService.CertificateMetadata","com.azure.developer.loadtesting.models.TestFileInfo":"Microsoft.LoadTestService.TestFileInfo","com.azure.developer.loadtesting.models.TestInputArtifacts":"Microsoft.LoadTestService.TestInputArtifacts","com.azure.developer.loadtesting.models.TestPreferences":"Microsoft.LoadTestService.TestPreferences","com.azure.developer.loadtesting.models.TestProfile":"Microsoft.LoadTestService.TestProfile","com.azure.developer.loadtesting.models.TestProfileRun":"Microsoft.LoadTestService.TestProfileRun","com.azure.developer.loadtesting.models.TestProfileRunRecommendation":"Microsoft.LoadTestService.TestProfileRunRecommendation","com.azure.developer.loadtesting.models.TestProfileRunStatus":"Microsoft.LoadTestService.TestProfileRunStatus","com.azure.developer.loadtesting.models.TestRunAppComponents":"Microsoft.LoadTestService.TestRunAppComponents","com.azure.developer.loadtesting.models.TestRunArtifacts":"Microsoft.LoadTestService.TestRunArtifacts","com.azure.developer.loadtesting.models.TestRunDetail":"Microsoft.LoadTestService.TestRunDetail","com.azure.developer.loadtesting.models.TestRunEndedEventCondition":"Microsoft.LoadTestService.TestRunEndedEventCondition","com.azure.developer.loadtesting.models.TestRunEndedNotificationEventFilter":"Microsoft.LoadTestService.TestRunEndedNotificationEventFilter","com.azure.developer.loadtesting.models.TestRunFileInfo":"Microsoft.LoadTestService.TestRunFileInfo","com.azure.developer.loadtesting.models.TestRunInputArtifacts":"Microsoft.LoadTestService.TestRunInputArtifacts","com.azure.developer.loadtesting.models.TestRunInsightColumn":"Microsoft.LoadTestService.TestRunInsightColumn","com.azure.developer.loadtesting.models.TestRunInsights":"Microsoft.LoadTestService.TestRunInsights","com.azure.developer.loadtesting.models.TestRunOutputArtifacts":"Microsoft.LoadTestService.TestRunOutputArtifacts","com.azure.developer.loadtesting.models.TestRunServerMetricsConfiguration":"Microsoft.LoadTestService.TestRunServerMetricsConfiguration","com.azure.developer.loadtesting.models.TestRunStartedNotificationEventFilter":"Microsoft.LoadTestService.TestRunStartedNotificationEventFilter","com.azure.developer.loadtesting.models.TestRunStatistics":"Microsoft.LoadTestService.TestRunStatistics","com.azure.developer.loadtesting.models.TestRunStatus":"Microsoft.LoadTestService.TestRunStatus","com.azure.developer.loadtesting.models.TestSecret":"Microsoft.LoadTestService.Secret","com.azure.developer.loadtesting.models.TestServerMetricsConfiguration":"Microsoft.LoadTestService.TestServerMetricsConfiguration","com.azure.developer.loadtesting.models.TestsNotificationEventFilter":"Microsoft.LoadTestService.TestsNotificationEventFilter","com.azure.developer.loadtesting.models.TestsNotificationRule":"Microsoft.LoadTestService.TestsNotificationRule","com.azure.developer.loadtesting.models.TimeGrain":"Microsoft.LoadTestService.TimeGrain","com.azure.developer.loadtesting.models.TimeSeriesElement":"Microsoft.LoadTestService.TimeSeriesElement","com.azure.developer.loadtesting.models.Trigger":"Microsoft.LoadTestService.Trigger","com.azure.developer.loadtesting.models.TriggerCompletedNotificationEventFilter":"Microsoft.LoadTestService.TriggerCompletedNotificationEventFilter","com.azure.developer.loadtesting.models.TriggerDisabledNotificationEventFilter":"Microsoft.LoadTestService.TriggerDisabledNotificationEventFilter","com.azure.developer.loadtesting.models.TriggerState":"Microsoft.LoadTestService.TriggerState","com.azure.developer.loadtesting.models.TriggerType":"Microsoft.LoadTestService.TriggerType","com.azure.developer.loadtesting.models.WeekDays":"Microsoft.LoadTestService.WeekDays","com.azure.developer.loadtesting.models.WeeklyRecurrence":"Microsoft.LoadTestService.WeeklyRecurrence"},"generatedFiles":["src/main/java/com/azure/developer/loadtesting/LoadTestAdministrationAsyncClient.java","src/main/java/com/azure/developer/loadtesting/LoadTestAdministrationClient.java","src/main/java/com/azure/developer/loadtesting/LoadTestAdministrationClientBuilder.java","src/main/java/com/azure/developer/loadtesting/LoadTestRunAsyncClient.java","src/main/java/com/azure/developer/loadtesting/LoadTestRunClient.java","src/main/java/com/azure/developer/loadtesting/LoadTestRunClientBuilder.java","src/main/java/com/azure/developer/loadtesting/LoadTestingServiceVersion.java","src/main/java/com/azure/developer/loadtesting/LoadTestingServiceVersion.java","src/main/java/com/azure/developer/loadtesting/implementation/JsonMergePatchHelper.java","src/main/java/com/azure/developer/loadtesting/implementation/LoadTestAdministrationClientImpl.java","src/main/java/com/azure/developer/loadtesting/implementation/LoadTestRunClientImpl.java","src/main/java/com/azure/developer/loadtesting/implementation/models/CloneTestRequest1.java","src/main/java/com/azure/developer/loadtesting/implementation/models/package-info.java","src/main/java/com/azure/developer/loadtesting/implementation/package-info.java","src/main/java/com/azure/developer/loadtesting/models/AggregationType.java","src/main/java/com/azure/developer/loadtesting/models/ArtifactsContainerInfo.java","src/main/java/com/azure/developer/loadtesting/models/AutoStopCriteria.java","src/main/java/com/azure/developer/loadtesting/models/CertificateType.java","src/main/java/com/azure/developer/loadtesting/models/CreatedByType.java","src/main/java/com/azure/developer/loadtesting/models/DailyRecurrence.java","src/main/java/com/azure/developer/loadtesting/models/DimensionFilter.java","src/main/java/com/azure/developer/loadtesting/models/DimensionValue.java","src/main/java/com/azure/developer/loadtesting/models/ErrorDetails.java","src/main/java/com/azure/developer/loadtesting/models/FileValidationStatus.java","src/main/java/com/azure/developer/loadtesting/models/Frequency.java","src/main/java/com/azure/developer/loadtesting/models/FunctionFlexConsumptionResourceConfiguration.java","src/main/java/com/azure/developer/loadtesting/models/FunctionFlexConsumptionTargetResourceConfigurations.java","src/main/java/com/azure/developer/loadtesting/models/HourlyRecurrence.java","src/main/java/com/azure/developer/loadtesting/models/LoadTest.java","src/main/java/com/azure/developer/loadtesting/models/LoadTestConfiguration.java","src/main/java/com/azure/developer/loadtesting/models/LoadTestKind.java","src/main/java/com/azure/developer/loadtesting/models/LoadTestRun.java","src/main/java/com/azure/developer/loadtesting/models/LoadTestingAppComponent.java","src/main/java/com/azure/developer/loadtesting/models/LoadTestingFileType.java","src/main/java/com/azure/developer/loadtesting/models/LoadTestingManagedIdentityType.java","src/main/java/com/azure/developer/loadtesting/models/MetricAvailability.java","src/main/java/com/azure/developer/loadtesting/models/MetricDefinition.java","src/main/java/com/azure/developer/loadtesting/models/MetricDefinitions.java","src/main/java/com/azure/developer/loadtesting/models/MetricNamespace.java","src/main/java/com/azure/developer/loadtesting/models/MetricNamespaces.java","src/main/java/com/azure/developer/loadtesting/models/MetricUnit.java","src/main/java/com/azure/developer/loadtesting/models/MetricValue.java","src/main/java/com/azure/developer/loadtesting/models/MetricsFilters.java","src/main/java/com/azure/developer/loadtesting/models/MonthlyRecurrenceByDates.java","src/main/java/com/azure/developer/loadtesting/models/MonthlyRecurrenceByWeekDays.java","src/main/java/com/azure/developer/loadtesting/models/NameAndDescription.java","src/main/java/com/azure/developer/loadtesting/models/NotificationEventType.java","src/main/java/com/azure/developer/loadtesting/models/NotificationRule.java","src/main/java/com/azure/developer/loadtesting/models/NotificationScopeType.java","src/main/java/com/azure/developer/loadtesting/models/OperationKind.java","src/main/java/com/azure/developer/loadtesting/models/OperationState.java","src/main/java/com/azure/developer/loadtesting/models/OperationStatus.java","src/main/java/com/azure/developer/loadtesting/models/OptionalLoadTestConfiguration.java","src/main/java/com/azure/developer/loadtesting/models/PassFailAction.java","src/main/java/com/azure/developer/loadtesting/models/PassFailAggregationFunction.java","src/main/java/com/azure/developer/loadtesting/models/PassFailCriteria.java","src/main/java/com/azure/developer/loadtesting/models/PassFailMetric.java","src/main/java/com/azure/developer/loadtesting/models/PassFailResult.java","src/main/java/com/azure/developer/loadtesting/models/PassFailServerMetric.java","src/main/java/com/azure/developer/loadtesting/models/PassFailTestResult.java","src/main/java/com/azure/developer/loadtesting/models/PfMetrics.java","src/main/java/com/azure/developer/loadtesting/models/RecommendationCategory.java","src/main/java/com/azure/developer/loadtesting/models/Recurrence.java","src/main/java/com/azure/developer/loadtesting/models/RecurrenceEnd.java","src/main/java/com/azure/developer/loadtesting/models/RecurrenceStatus.java","src/main/java/com/azure/developer/loadtesting/models/RecurrenceWithCron.java","src/main/java/com/azure/developer/loadtesting/models/RegionalConfiguration.java","src/main/java/com/azure/developer/loadtesting/models/RequestDataLevel.java","src/main/java/com/azure/developer/loadtesting/models/ResourceKind.java","src/main/java/com/azure/developer/loadtesting/models/ResourceMetric.java","src/main/java/com/azure/developer/loadtesting/models/ScheduleTestsTrigger.java","src/main/java/com/azure/developer/loadtesting/models/SecretType.java","src/main/java/com/azure/developer/loadtesting/models/StateDetails.java","src/main/java/com/azure/developer/loadtesting/models/TargetResourceConfigurations.java","src/main/java/com/azure/developer/loadtesting/models/TestAppComponents.java","src/main/java/com/azure/developer/loadtesting/models/TestCertificate.java","src/main/java/com/azure/developer/loadtesting/models/TestFileInfo.java","src/main/java/com/azure/developer/loadtesting/models/TestInputArtifacts.java","src/main/java/com/azure/developer/loadtesting/models/TestPreferences.java","src/main/java/com/azure/developer/loadtesting/models/TestProfile.java","src/main/java/com/azure/developer/loadtesting/models/TestProfileRun.java","src/main/java/com/azure/developer/loadtesting/models/TestProfileRunRecommendation.java","src/main/java/com/azure/developer/loadtesting/models/TestProfileRunStatus.java","src/main/java/com/azure/developer/loadtesting/models/TestRunAppComponents.java","src/main/java/com/azure/developer/loadtesting/models/TestRunArtifacts.java","src/main/java/com/azure/developer/loadtesting/models/TestRunDetail.java","src/main/java/com/azure/developer/loadtesting/models/TestRunEndedEventCondition.java","src/main/java/com/azure/developer/loadtesting/models/TestRunEndedNotificationEventFilter.java","src/main/java/com/azure/developer/loadtesting/models/TestRunFileInfo.java","src/main/java/com/azure/developer/loadtesting/models/TestRunInputArtifacts.java","src/main/java/com/azure/developer/loadtesting/models/TestRunInsightColumn.java","src/main/java/com/azure/developer/loadtesting/models/TestRunInsights.java","src/main/java/com/azure/developer/loadtesting/models/TestRunOutputArtifacts.java","src/main/java/com/azure/developer/loadtesting/models/TestRunServerMetricsConfiguration.java","src/main/java/com/azure/developer/loadtesting/models/TestRunStartedNotificationEventFilter.java","src/main/java/com/azure/developer/loadtesting/models/TestRunStatistics.java","src/main/java/com/azure/developer/loadtesting/models/TestRunStatus.java","src/main/java/com/azure/developer/loadtesting/models/TestSecret.java","src/main/java/com/azure/developer/loadtesting/models/TestServerMetricsConfiguration.java","src/main/java/com/azure/developer/loadtesting/models/TestsNotificationEventFilter.java","src/main/java/com/azure/developer/loadtesting/models/TestsNotificationRule.java","src/main/java/com/azure/developer/loadtesting/models/TimeGrain.java","src/main/java/com/azure/developer/loadtesting/models/TimeSeriesElement.java","src/main/java/com/azure/developer/loadtesting/models/Trigger.java","src/main/java/com/azure/developer/loadtesting/models/TriggerCompletedNotificationEventFilter.java","src/main/java/com/azure/developer/loadtesting/models/TriggerDisabledNotificationEventFilter.java","src/main/java/com/azure/developer/loadtesting/models/TriggerState.java","src/main/java/com/azure/developer/loadtesting/models/TriggerType.java","src/main/java/com/azure/developer/loadtesting/models/WeekDays.java","src/main/java/com/azure/developer/loadtesting/models/WeeklyRecurrence.java","src/main/java/com/azure/developer/loadtesting/models/package-info.java","src/main/java/com/azure/developer/loadtesting/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/loadtesting/azure-developer-loadtesting/tsp-location.yaml b/sdk/loadtesting/azure-developer-loadtesting/tsp-location.yaml index bebd86b3cded..dbe48116c588 100644 --- a/sdk/loadtesting/azure-developer-loadtesting/tsp-location.yaml +++ b/sdk/loadtesting/azure-developer-loadtesting/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/loadtestservice/data-plane/loadtesting -commit: eee9708f799c7e394128033f11bdc21231bae454 +commit: 9f359b18eb30d827a201b951b71ad8f2426dd3bf repo: Azure/azure-rest-api-specs additionalDirectories: